DrawableImage

A DrawableImage is a variant of Image that can be associated with a CanvasIO in order to be drawn.

Prepare images for drawing using load() in resizeImpl:

CanvasIO canvasIO;
DrawableImage image;
void resizeImpl(Vector2 space) {
    require(canvasIO);
    load(canvasIO, image);
}

Draw images in drawImpl:

void drawImpl(Rectangle outer, Rectangle inner) {
    image.draw(inner.start);
}

Alias This

image

Members

Functions

draw
void draw(Vector2 destination, Color tint)

Draw the image.

draw
void draw(Rectangle destination, Color tint)
drawHinted
void drawHinted(Rectangle destination, Color tint)
void drawHinted(Vector2 destination, Color tint)

Draw the image.

id
int id()
load
void load(CanvasIO canvasIO, int id)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
Image opAssign(Image other)

Assign an image to draw.

opEquals
bool opEquals(DrawableImage other)
bool opEquals(Image other)

Compare to another image image.

Variables

image
Image image;

Image to be drawn.

Meta