Implemented By

Supported Methods

Description of Methods

SetDrawTo(destBitmap as Object, rgbaBackground as Integer) as Void

Set the destBitmap (roBitmap or roScreen) and the background color.

Draw() as Void

Draw any dirty sprites (that is, whatever is new or has changed since the last Draw). No compositor or sprite operations will be reflected on the display until Draw() is called.

After calling Draw(), you must call Finish() (if single buffered) or SwapBuffers() (if double buffered) before the changes will be user visible.

DrawAll() as Void

Redraw all sprites even if not dirty.

After calling Draw(), you must call Finish() (if single buffered) or SwapBuffers() (if double buffered) before the changes will be user visible.

NewSprite(x as Integer, y as Integer, region as Object, z as Integer) as Object

Returns an roSprite object

Create a new sprite, using an roRegion to define the sprite's bitmap. Position the sprite at coordinate x,y.

If z is provided, position the sprite in front of all other sprites with equal or lower z value. Sprites with negative z values are not rendered or displayed on the screen.

NewAnimatedSprite(x as Integer, y as Integer, regionArray as Object, z as Integer) as Object

Returns an roSprite object.

Create a new sprite that consists of a sequence of frames to be animated. The frames are defined by the regionArray which is an roArray of roRegions

Position the sprite at coordinate x,y.

If z is provided, position the sprite in front of all other sprites with equal or lower z value

AnimationTick(duration as Integer) as Void

Duration is the number of ms since the last call.

Moves all animated sprites.

Sprites will not animate unless you call this function regularly.

ChangeMatchingRegions(oldRegion as Object, newRegion as Object) as Void

Global search and replace of Sprite roRegions.

Replaces regions that match oldRegion with newRegion.