tbx
0.7.6
|
Common base class for the UserSprite and WimpSprite classes. More...
#include <sprite.h>
Public Member Functions | |
virtual void | plot (int x, int y) const |
Plot sprite to screen. More... | |
virtual void | plot (const Point &pos) const |
Plot sprite to screen. More... | |
virtual void | plot_raw (const Point &pos, int code=SPA_USE_MASK) const =0 |
Plot sprite with no scaling or colour translation. More... | |
virtual void | plot_scaled (const Point &pos, const ScaleFactors *sf, const TranslationTable *tt=0, int code=SPA_USE_MASK) const =0 |
Plot sprite scaled. More... | |
virtual void | plot_screen (const Point &pos, int code=SPA_USE_MASK) const =0 |
Plot sprite to screen calculating the correct colour translation and scaling. More... | |
virtual void | plot_raw (int x, int y, int code=SPA_USE_MASK) const =0 |
Plot sprite with no scaling or colour translation. More... | |
virtual void | plot_scaled (int x, int y, const ScaleFactors *sf, const TranslationTable *tt=0, int code=SPA_USE_MASK) const =0 |
Plot sprite scaled. More... | |
virtual void | plot_screen (int x, int y, int code=SPA_USE_MASK) const =0 |
Plot sprite to screen calculating the correct colour translation and scaling. More... | |
virtual std::string | name () const =0 |
Get the name of the sprite. More... | |
virtual int | area_id () const =0 |
Return sprite area id used for calls that take an area pointer or a special value for WIMP/System areas. | |
virtual bool | info (Size *pixel_size, int *mode=NULL, bool *mask=NULL) const =0 |
Get information about the sprite. More... | |
Size | size () const |
Return the size of the sprite. More... | |
int | width () const |
Return the width of the sprite. More... | |
int | height () const |
Return the height of the sprite. More... | |
Size | pixel_size () const |
Get size of the sprite in pixels. More... | |
int | mode () const |
Get the mode of the sprite. More... | |
bool | has_mask () const |
Check if the sprite has a mask. More... | |
virtual void | get_wimp_scale (ScaleFactors &factor) const =0 |
Get the scale factors required to plot this sprite in the WIMP as its logical size. More... | |
Common base class for the UserSprite and WimpSprite classes.
|
pure virtual |
Get the scale factors required to plot this sprite in the WIMP as its logical size.
factor | scale factors updated with the correct value |
Implemented in tbx::WimpSprite, and tbx::UserSprite.
|
inline |
Check if the sprite has a mask.
int Sprite::height | ( | ) | const |
Return the height of the sprite.
Return height of sprite in OS Units.
|
pure virtual |
Get information about the sprite.
pixel_size | pointer to Size to be updated with size of sprite in pixels |
mode | pointer to integer to receive the sprite mode number or 0 (the default) not to return the mode |
mask | pointer to a boolean which will be set to true if the sprite has a mask or 0 (the default) not to return the mask |
Implemented in tbx::WimpSprite, and tbx::UserSprite.
|
inline |
Get the mode of the sprite.
|
pure virtual |
Get the name of the sprite.
Implemented in tbx::WimpSprite, and tbx::UserSprite.
|
inline |
Get size of the sprite in pixels.
|
virtual |
|
virtual |
|
pure virtual |
Plot sprite with no scaling or colour translation.
pos | OS coordinates of bottom left of where to plot the sprite |
code | sprite_plot_action flags speficying how the sprite is combined with the screen (default SPA_USE_MASK) |
Implemented in tbx::WimpSprite, and tbx::UserSprite.
|
pure virtual |
Plot sprite with no scaling or colour translation.
x | left of destination to plot the sprite in OS coordinates |
y | bottom of destination to plot the sprite in OS coordinates |
code | sprite_plot_action flags |
Implemented in tbx::WimpSprite, and tbx::UserSprite.
|
pure virtual |
Plot sprite scaled.
pos | OS coordinates of bottom left of where to plot the sprite |
sf | ScaleFactors used to scale the sprite |
tt | Translation table for colours in plot, 0 (the default) means don't translate the colours |
code | sprite_plot_action flags speficying how the sprite is combined with the screen (default SPA_USE_MASK) |
Implemented in tbx::WimpSprite, and tbx::UserSprite.
|
pure virtual |
Plot sprite scaled.
x | left of destination to plot the sprite in OS coordinates |
y | bottom of destination to plot the sprite in OS coordinates |
sf | ScaleFactors used to scale the sprite |
tt | Translation table for colours in plot, 0 (the default) means don't translate the colours |
code | sprite_plot_action flags speficying how the sprite is combined with the screen (default SPA_USE_MASK) |
Implemented in tbx::WimpSprite, and tbx::UserSprite.
|
pure virtual |
Plot sprite to screen calculating the correct colour translation and scaling.
pos | OS coordinates of bottom left of where to plot the sprite |
code | sprite_plot_action flags speficying how the sprite is combined with the screen (default SPA_USE_MASK) |
Implemented in tbx::WimpSprite, and tbx::UserSprite.
|
pure virtual |
Plot sprite to screen calculating the correct colour translation and scaling.
x | left of destination to plot the sprite in OS coordinates |
y | bottom of destination to plot the sprite in OS coordinates |
code | sprite_plot_action flags speficying how the sprite is combined with the screen (default SPA_USE_MASK) |
Implemented in tbx::WimpSprite, and tbx::UserSprite.
Size Sprite::size | ( | ) | const |
Return the size of the sprite.
int Sprite::width | ( | ) | const |
Return the width of the sprite.
Return width of sprite in OS units.