MSurfaceIO

object MSurfaceIO extends MSurfaceIOOps with IOOps[MutableSurface]

Object containing the operations that act on a Mutable Surface.

trait IOOps[MutableSurface]
trait IOBaseOps[MutableSurface]
class Object
trait Matchable
class Any

Value members

Inherited methods

def access[A](f: MutableSurface => A): RIO[MutableSurface, A]

Returns a operation that requires this resource.

Returns a operation that requires this resource.

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

Wrap mutable surface operations in a MSurfaceIO.

Wrap mutable surface operations in a MSurfaceIO.

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

Wrap surface operations in a SurfaceIO.

Wrap surface operations in a SurfaceIO.

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

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

Inherited from:
MSurfaceIOOps
def foreach[A](it: () => Iterator[A])(f: A => RIO[MutableSurface, Any]): RIO[MutableSurface, Unit]

Applies an operation to each element of a Iterator[A] and discards the result.

Applies an operation to each element of a Iterator[A] and discards the result.

Inherited from:
IOOps
def foreach[A](it: Iterable[A])(f: A => RIO[MutableSurface, Any]): RIO[MutableSurface, Unit]

Applies an operation to each element of a Iterable[A] and discards the result.

Applies an operation to each element of a Iterable[A] and discards the result.

Inherited from:
IOOps
def fromCallback[A](operation: Try[A] => Unit => Unit): RIO[MutableSurface, Poll[A]]

Returns a Poll from a function that receives a callback

Returns a Poll from a function that receives a callback

Inherited from:
IOBaseOps
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
def pure[A](x: A): RIO[MutableSurface, A]

Lifts a value into a RIO.

Lifts a value into a RIO.

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

Inherited from:
MSurfaceIOOps
def sequence[A](it: Iterable[RIO[MutableSurface, A]]): RIO[MutableSurface, List[A]]

Converts an Iterable[RIO[R, A]] into a RIO[R, List[A]].

Converts an Iterable[RIO[R, A]] into a RIO[R, List[A]].

Inherited from:
IOOps
def sequence_(it: Iterable[RIO[MutableSurface, Any]]): RIO[MutableSurface, Unit]

Converts an Iterable[RIO[R, A]] into a RIO[R, Unit].

Converts an Iterable[RIO[R, A]] into a RIO[R, Unit].

Inherited from:
IOOps
def suspend[A](x: => A): RIO[MutableSurface, A]

Suspends a computation into a RIO.

Suspends a computation into a RIO.

Inherited from:
IOBaseOps
def traverse[A, B](it: Iterable[A])(f: A => RIO[MutableSurface, B]): RIO[MutableSurface, List[B]]

Converts an Iterable[A] into a RIO[R, List[B]] by applying an operation to each element.

Converts an Iterable[A] into a RIO[R, List[B]] by applying an operation to each element.

Inherited from:
IOOps
def when(predicate: Boolean)(io: => RIO[MutableSurface, Unit]): RIO[MutableSurface, Unit]

Runs a computation only if the predicate is true, otherwise does nothing

Runs a computation only if the predicate is true, otherwise does nothing

Inherited from:
IOOps

Deprecated and Inherited 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 from:
MSurfaceIOOps

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 noop: RIO[MutableSurface, Unit]

An operation that does nothing.

An operation that does nothing.

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