MSurfaceIOOps

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

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

Value members

Concrete methods

def accessMSurface[A](f: MutableSurface => A): MSurfaceIO[A]

Wrap mutable surface operations in a MSurfaceIO.

Wrap mutable surface operations in a MSurfaceIO.

def blit(that: Surface, mask: Option[Color])(x: Int, y: Int, cx: Int, cy: Int, cw: Int, ch: Int): MSurfaceIO[Unit]

Draws a surface on top of this surface.

Draws a surface on top of this surface.

Value parameters:
ch

clip height of the source surface

cw

clip width of the source surface

cx

leftmost pixel on the source surface

cy

topmost pixel on the source surface

mask

color to use as a mask (pixels with this color won't be merged)

that

surface to draw

x

leftmost pixel on the destination surface

y

topmost pixel on the destination surface

def fill(color: Color): MSurfaceIO[Unit]

Fill the surface with a certain color

Fill the surface with a certain color

Value parameters:
color

Color to fill the surface with

def putPixel(x: Int, y: Int, color: Color): MSurfaceIO[Unit]

Put a pixel in the surface with a certain color.

Put a pixel in the surface with a certain color.

Value parameters:
color

Color to apply to the pixel

x

pixel x position

y

pixel y position

Deprecated methods

@deprecated("Use blit instead")
def blitWithMask(that: Surface, mask: Color)(x: Int, y: Int, cx: Int, cy: Int, cw: Int, ch: Int): MSurfaceIO[Unit]

Draws a surface on top of this surface and masks the pixels with a certain color.

Draws a surface on top of this surface and masks the pixels with a certain color.

Value parameters:
ch

clip height of the source surface

cw

clip width of the source surface

cx

leftmost pixel on the source surface

cy

topmost pixel on the source surface

mask

color to usa as a mask

that

surface to draw

x

leftmost pixel on the destination surface

y

topmost pixel on the destination surface

Deprecated

Inherited methods

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

Wrap surface operations in a SurfaceIO.

Wrap surface operations in a SurfaceIO.

Inherited from:
SurfaceIOOps
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

Inherited from:
SurfaceIOOps

Inherited 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

Inherited from:
SurfaceIOOps

Returns the surfaace height

Returns the surfaace height

Inherited from:
SurfaceIOOps
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.

Inherited from:
SurfaceIOOps

Returns the surfaace width

Returns the surfaace width

Inherited from:
SurfaceIOOps