Sprite

Undocumented in source.

Constructors

this
this(SimpleWindow win, Image i)

Makes a sprite based on the image with the initial contents from the Image

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

dispose
void dispose()

Call this when you're ready to get rid of it

draw
ScreenPainter draw()
drawAt
void drawAt(ScreenPainter painter, Point where, Point imageUpperLeft, Size sliceSize)

Draws the image on the specified painter at the specified point. The point is the upper-left point where the image will be drawn.

takeScreenshot
TrueColorImage takeScreenshot()

Copies the sprite's current state into a TrueColorImage.

Properties

height
int height [@property getter]
width
int width [@property getter]

Static functions

fromMemoryImage
Sprite fromMemoryImage(SimpleWindow win, MemoryImage img, bool enableAlpha)

Inherited Members

From CapableOfBeingDrawnUpon

draw
ScreenPainter draw()
width
int width()
height
int height()
takeScreenshot
TrueColorImage takeScreenshot()

Be warned: this can be a very slow operation

Suggestion Box / Bug Report