ICanvas

Implementation of the interface for interacting with the rendering canvas.

Members

Functions

allocatePlace
void allocatePlace(uint width, uint height)

Allocate memory for the canvas at the specified size.

blendOperation
void blendOperation(BlendFactor sfactor, BlendFactor dfactor)

Sets the color mixing factor (which formula to mix colors with).

blendOperation
BlendFactor[2] blendOperation()

Mixing factor (sfactor, dfactor).

clearPlane
void clearPlane(Color!ubyte color)

Cleared the canvas with one color.

drawTo
void drawTo()

Draws a buffer to a storage object.

move
void move(int x, int y)

Move the visibility port to the specified coordinates.

pointTo
void pointTo(Vecf position, Color!ubyte color)

Draw a point on the canvas. Draw only a point, the rest of the shapes are rendered.

viewport
void viewport(uint w, uint h)

Set port of visibility.

Properties

blendMode
BlendMode blendMode [@property setter]
BlendMode blendMode [@property getter]

Blending mode (blend or not).

cameraPosition
int[2] cameraPosition [@property getter]

Camera position (offset of all drawing points).

data
ubyte[] data [@property getter]

Canvas data.

portSize
uint[2] portSize [@property getter]

The real size of the world, where from the world it will be drawn to the size of the canvas.

size
uint[2] size [@property getter]

Canvas size.

Meta