#include <sprite.h>
This abstract class defines the interface used by the map to sort and display the sprite.
Definition at line 31 of file sprite.h.
Public Member Functions | |
| virtual | ~Sprite () |
| Destructor. | |
| virtual void | draw (Graphics *graphics, int offsetX, int offsetY) const =0 |
| Draws the sprite to the given graphics context. | |
| virtual int | getWidth () const |
| Returns the horizontal size of the sprites graphical representation in pixels or 0 when it is undefined. | |
| virtual int | getHeight () const |
| Returns the vertical size of the sprites graphical representation in pixels or 0 when it is undefined. | |
| virtual int | getPixelY () const =0 |
| Returns the pixel Y coordinate of the sprite. | |
| virtual void Sprite::draw | ( | Graphics * | graphics, | |
| int | offsetX, | |||
| int | offsetY | |||
| ) | const [pure virtual] |
Draws the sprite to the given graphics context.
Note: this function could be simplified if the graphics context would support setting a translation offset. It already does this partly with the clipping rectangle support.
Implemented in FloorItem, ImageParticle, Particle, and TextParticle.
| virtual int Sprite::getWidth | ( | void | ) | const [inline, virtual] |
| virtual int Sprite::getHeight | ( | void | ) | const [inline, virtual] |
| virtual int Sprite::getPixelY | ( | ) | const [pure virtual] |
1.5.5