Class Sprite
Inherits the following classes: GraphicsObject
Public Attributes
| Type | Name |
|---|---|
| uint16_t | color = 0x00 |
| uint16_t | frame = 0 |
| const uint8_t ** | frames |
| int16_t | height |
| bool | negative = false |
| uint16_t | numFrames |
| void(* | tick |
| int16_t | width |
Public Attributes inherited from GraphicsObject
See GraphicsObject
| Type | Name |
|---|---|
| Display::Display * | display |
| int16_t | x = 0 |
| int16_t | y = 0 |
Public Functions
| Type | Name |
|---|---|
| Sprite (const uint8_t * frames, uint16_t numFrames, int16_t width, int16_t height) |
|
| void | advanceFrame (uint16_t startFrame, uint16_t endFrame, uint16_t ticksPerFrame, FrameLoopMode mode) |
| void | decrementFrame () |
| void | incrementFrame () |
| void | setColor (uint16_t color) |
| void | setFrame (uint16_t frame) |
| void | setNegative (bool negative) |
| void | translate (int16_t x, int16_t y) |
| void | translate (int16_t x, int16_t y, int16_t distance) |
| ~Sprite () |
Public Functions inherited from GraphicsObject
See GraphicsObject
| Type | Name |
|---|---|
| virtual void | draw () = 0 |
| virtual void | erase (int16_t lastRenderedX, int16_t lastRenderedY) = 0 |
| bool | isVisible () |
| virtual void | onSetDisplay () |
| virtual void | onSetVisible () |
| void | render () |
| void | setDisplay (Display::Display * display) |
| void | setPosition (int16_t x, int16_t y) |
| void | setVisible (bool visible) |
Protected Functions
| Type | Name |
|---|---|
| virtual void | draw () |
| virtual void | erase (int16_t lastRenderedX, int16_t lastRenderedY) |
Public Attributes Documentation
variable color
variable frame
variable frames
variable height
variable negative
variable numFrames
variable tick
variable width
Public Functions Documentation
function Sprite
function advanceFrame
void Sprite::advanceFrame (
uint16_t startFrame,
uint16_t endFrame,
uint16_t ticksPerFrame,
FrameLoopMode mode
)
function decrementFrame
function incrementFrame
function setColor
function setFrame
function setNegative
function translate [1/2]
function translate [2/2]
function ~Sprite
Protected Functions Documentation
function draw
Implements GraphicsObject::draw
function erase
Implements GraphicsObject::erase
The documentation for this class was generated from the following file src/Sprite.hpp