eu.joaocosta.minart.graphics
Type members
Classlikes
Window with a canvas that can be painted.
Window with a canvas that can be painted.
The Canvas is the main concept behind minart, providing access to both rendering and input functionallity.
A canvas represents a window with a width * height
pixels.
There's also a scale
variable that controls the integer scaling
and a clearColor
that is applied to the whole canvas when it's cleared.
- Companion:
- object
Abstraction that provides an init
operation to create a new canvas.
Abstraction that provides an init
operation to create a new canvas.
This is helpful to deal with the fact that creating a new canvas is a side-effectful operation.
- Companion:
- object
A render loop that takes a side-effectful renderFrame operation.
A render loop that takes a side-effectful renderFrame operation.
A low-level version of a canvas that provides its own canvas manager.
A low-level version of a canvas that provides its own canvas manager.
- Companion:
- object
A surface that can be drawn on using mutable operations.
A surface that can be drawn on using mutable operations.
A mutable surface stored in RAM.
A mutable surface stored in RAM.
- Value parameters:
- data
the raw data that backs this surface
Render loop that keeps an internal state that is passed to every iteration.
Render loop that keeps an internal state that is passed to every iteration.
- Type parameters:
- S
State
- Companion:
- object
A Surface is an object that contains a set of pixels.
A Surface is an object that contains a set of pixels.
Canvas backed by a mutable surface.
Canvas backed by a mutable surface.
A view over a surface, stored as a plane limited by a width and height. Allows lazy operations to be applied over a surface.
A view over a surface, stored as a plane limited by a width and height. Allows lazy operations to be applied over a surface.
This can have a performance impact. However, a new RAM surface with the operations already applied can be constructed using toRamSurface
- Companion:
- object