SurfaceIOOps

Representation of a surface operation, with the common Monad operations.

class Object
trait Matchable
class Any
object CanvasIO.type
object MSurfaceIO.type
object SurfaceIO.type

Value members

Concrete methods

def accessSurface[A](f: Surface => A): SurfaceIO[A]

Wrap surface operations in a SurfaceIO.

Wrap surface operations in a SurfaceIO.

def getPixel(x: Int, y: Int): SurfaceIO[Option[Color]]

Gets the color from the this surface. This operation can be perfomance intensive, so it might be worthwile to either use getPixels to fetch multiple pixels at the same time or to implement this operation on the application code.

Gets the color from the this surface. This operation can be perfomance intensive, so it might be worthwile to either use getPixels to fetch multiple pixels at the same time or to implement this operation on the application code.

Value parameters:
x

pixel x position

y

pixel y position

Concrete fields

Returns the pixels from this surface. This operation can be perfomance intensive, so it might be worthwile to implement this operation on the application code.

Returns the pixels from this surface. This operation can be perfomance intensive, so it might be worthwile to implement this operation on the application code.

Returns:

color matrix

Returns the surfaace height

Returns the surfaace height

val view: SurfaceIO[SurfaceView]

Returns a view over this surface.

Returns a view over this surface.

Operations performed on a view are executed in a defered fashion.

Returns the surfaace width

Returns the surfaace width