SurfaceIO

eu.joaocosta.minart.graphics.pure.package$.SurfaceIO$
object SurfaceIO extends SurfaceIOOps with IOOps[Surface]

Object containing the operations that act on a Surface.

Attributes

Graph
Supertypes
trait IOOps[Surface]
trait IOBaseOps[Surface]
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Inherited methods

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

Returns a operation that requires this resource.

Returns a operation that requires this resource.

Attributes

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

Wrap surface operations in a SurfaceIO.

Wrap surface operations in a SurfaceIO.

Attributes

Inherited from:
SurfaceIOOps
def foreach[A](it: () => Iterator[A])(f: A => RIO[Surface, Any]): RIO[R, 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.

Attributes

Inherited from:
IOOps
def foreach[A](it: Iterable[A])(f: A => RIO[Surface, Any]): RIO[R, 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.

Attributes

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

Returns a Poll from a function that receives a callback

Returns a Poll from a function that receives a callback

Attributes

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.

Attributes

x

pixel x position

y

pixel y position

Inherited from:
SurfaceIOOps
def pure[A](x: A): RIO[R, A]

Lifts a value into a RIO.

Lifts a value into a RIO.

Attributes

Inherited from:
IOBaseOps
def sequence[A](it: Iterable[RIO[Surface, A]]): RIO[R, 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]].

Attributes

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

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

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

Attributes

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

Suspends a computation into a RIO.

Suspends a computation into a RIO.

Attributes

Inherited from:
IOBaseOps
def traverse[A, B](it: Iterable[A])(f: A => RIO[Surface, B]): RIO[R, 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.

Attributes

Inherited from:
IOOps
def when(predicate: Boolean)(io: => RIO[Surface, Unit]): RIO[R, 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

Attributes

Inherited from:
IOOps

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.

Attributes

Returns:

color matrix

Inherited from:
SurfaceIOOps

Returns the surfaace height

Returns the surfaace height

Attributes

Inherited from:
SurfaceIOOps
val noop: RIO[Surface, Unit]

An operation that does nothing.

An operation that does nothing.

Attributes

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.

Attributes

Inherited from:
SurfaceIOOps

Returns the surfaace width

Returns the surfaace width

Attributes

Inherited from:
SurfaceIOOps