Represents a single frame of the animation. These are compacted onto a sprite. An spa contains multiple sprites.
Public Member Functions | |
Frame (string filePath) | |
Creates a new frame for the given image. More... | |
int | ParseNumber () |
Figures out the frame ID by parsing it's name. More... | |
bool | LoadGraphic () |
Attempts to load the Graphic property from the file. More... | |
void | WriteInto (Graphics canvas, int x, int y) |
Writes this frame into the given canvas. More... | |
Public Attributes | |
int | ID |
The frame number. More... | |
Image | Graphic |
The graphic for the frame. More... | |
string | FilePath |
The original filepath where this frame was loaded from. More... | |
|
inline |
Creates a new frame for the given image.
filePath | The path to the image to create a frame from. |
|
inline |
Attempts to load the Graphic property from the file.
|
inline |
Figures out the frame ID by parsing it's name.
|
inline |
Writes this frame into the given canvas.
canvas | The graphics object to write this image to. Usually a sprite frame. |
x | The x position in pixels to write the frame at. From the left. |
y | The y position in pixels to write the frame at. From the bottom. |
string SPABuilder.Frame.FilePath |
The original filepath where this frame was loaded from.
Image SPABuilder.Frame.Graphic |
The graphic for the frame.
int SPABuilder.Frame.ID |
The frame number.