TBX has classes built in to display Sprites, JPEGs and DrawFiles.
They are all derived from the tbx::Image
class
which provides a simple method called plot
that plots the image full size at the given location on the screen.
Each of the sub classes provides methods to load the images,
to find out more information about the image, and plot it in
different ways. The main image subclasses are tbx::Sprite
,
tbx::DrawFile
and tbx:JPEG
.
The standard bitmap image format in RISC OS is the sprite. There
are two location these can come from in TBX. Using the class
tbx::WimpSprite
you can plot sprites
from the WIMP sprite pool. The class tbx::UserSprite
is used to plot sprites from application memory.
The tbx::UserSprite
class is a reference
to a sprite in a user sprite area. The tbx::SpriteArea
class is responsible for managing a number of sprites. It provides methods
to load and save the whole sprite area and create new sprites.
TBX provides a method sprite_area
on the tbx::Application
class which gives a
pointer to the sprite area automatically loaded from the file "Sprites"
by the Toolbox.