object CanvasIO
Representation of a canvas operation, with the common Monad operations.
- Alphabetic
- By Inheritance
- CanvasIO
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def accessCanvas[A](f: (Canvas) => A): CanvasIO[A]
Store an unsafe canvas operation in a CanvasIO.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clear(resources: Set[Resource] = Canvas.Resource.all): CanvasIO[Unit]
Clears resources, such as the backbuffer and keyboard inputs.
Clears resources, such as the backbuffer and keyboard inputs.
- resources
set of Canvas.Resources to be cleared
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def foreach[A](it: Iterable[A])(f: (A) => CanvasIO[Any]): CanvasIO[Unit]
Applies an operation to each element of a
Iterable[A]and discards the result. - val getBackbuffer: CanvasIO[Vector[Vector[Color]]]
Returns the backbuffer.
Returns the backbuffer. This operation can be perfomance intensive, so it might be worthwile to implement this operation on the application code.
- def getBackbufferPixel(x: Int, y: Int): CanvasIO[Color]
Gets the color from the backbuffer.
Gets the color from the backbuffer. This operation can be perfomance intensive, so it might be worthwile to either use
getBackbufferto fetch multiple pixels at the same time or to implement this operation on the application code.- x
pixel x position
- y
pixel y position
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val getKeyboardInput: CanvasIO[KeyboardInput]
Gets the current keyboard input.
- val getPointerInput: CanvasIO[PointerInput]
Gets the current pointer input.
- val getSettings: CanvasIO[Settings]
Fetches the canvas settings.
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val noop: CanvasIO[Unit]
An operation that does nothing *
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def pollFuture[A](future: Future[A]): CanvasIO[Option[Try[A]]]
Polls a future and optionally returns its result.
- def pure[A](x: A): CanvasIO[A]
Lifts a value into a CanvasIO.
- def putPixel(x: Int, y: Int, color: Color): CanvasIO[Unit]
Puts a pixel in the back buffer with a certain color.
Puts a pixel in the back buffer with a certain color.
- x
pixel x position
- y
pixel y position
- color
Colorto apply to the pixel
- val redraw: CanvasIO[Unit]
Flips buffers and redraws the screen.
- def sequence[A](it: Iterable[CanvasIO[A]]): CanvasIO[List[A]]
Converts an
Iterable[CanvasIO[A]]into aCanvasIO[List[A]]. - def sequence_(it: Iterable[CanvasIO[Any]]): CanvasIO[Unit]
Converts an
Iterable[CanvasIO[A]]into aCanvasIO[Unit]. - def suspend[A](x: => A): CanvasIO[A]
Suspends a computation into a CanvasIO.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def traverse[A, B](it: Iterable[A])(f: (A) => CanvasIO[B]): CanvasIO[List[B]]
Converts an
Iterable[A]into aCanvasIO[List[B]]by applying an operation to each element. - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()