Object

eu.joaocosta.minart.pure

CanvasIO

Related Doc: package pure

Permalink

object CanvasIO

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

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CanvasIO
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def accessCanvas[A](f: (Canvas) ⇒ A): CanvasIO[A]

    Permalink

    Store an unsafe canvas operation in a CanvasIO.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def changeSettings(newSettings: Settings): CanvasIO[Unit]

    Permalink

    Changes the settings applied to the canvas.

    Changes the settings applied to the canvas.

    newSettings

    new canvas settings

  7. def clear(resources: Set[Resource] = Canvas.Resource.all): CanvasIO[Unit]

    Permalink

    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

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def foreach[A](it: () ⇒ Iterator[A])(f: (A) ⇒ CanvasIO[Any]): CanvasIO[Unit]

    Permalink

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

  13. def foreach[A](it: Iterable[A])(f: (A) ⇒ CanvasIO[Any]): CanvasIO[Unit]

    Permalink

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

  14. def fromCallback[A](operation: ((Try[A]) ⇒ Unit) ⇒ Unit): CanvasIO[Poll[A]]

    Permalink

    Returns a Poll from a function that receives a callback

  15. val getBackbuffer: CanvasIO[Vector[Vector[Color]]]

    Permalink

    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.

  16. def getBackbufferPixel(x: Int, y: Int): CanvasIO[Color]

    Permalink

    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 getBackbuffer to fetch multiple pixels at the same time or to implement this operation on the application code.

    x

    pixel x position

    y

    pixel y position

  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. val getKeyboardInput: CanvasIO[KeyboardInput]

    Permalink

    Gets the current keyboard input.

  19. val getPointerInput: CanvasIO[PointerInput]

    Permalink

    Gets the current pointer input.

  20. val getSettings: CanvasIO[Settings]

    Permalink

    Fetches the canvas settings.

  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. val noop: CanvasIO[Unit]

    Permalink

    An operation that does nothing.

  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def pure[A](x: A): CanvasIO[A]

    Permalink

    Lifts a value into a CanvasIO.

  28. def putPixel(x: Int, y: Int, color: Color): CanvasIO[Unit]

    Permalink

    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

    Color to apply to the pixel

  29. val redraw: CanvasIO[Unit]

    Permalink

    Flips buffers and redraws the screen.

  30. def sequence[A](it: Iterable[CanvasIO[A]]): CanvasIO[List[A]]

    Permalink

    Converts an Iterable[CanvasIO[A]] into a CanvasIO[List[A]].

  31. def sequence_(it: Iterable[CanvasIO[Any]]): CanvasIO[Unit]

    Permalink

    Converts an Iterable[CanvasIO[A]] into a CanvasIO[Unit].

  32. def suspend[A](x: ⇒ A): CanvasIO[A]

    Permalink

    Suspends a computation into a CanvasIO.

  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  35. def traverse[A, B](it: Iterable[A])(f: (A) ⇒ CanvasIO[B]): CanvasIO[List[B]]

    Permalink

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

  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def when(predicate: Boolean)(io: ⇒ CanvasIO[Unit]): CanvasIO[Unit]

    Permalink

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

Inherited from AnyRef

Inherited from Any

Ungrouped