SPABuilder.SpriteFrame Class Reference

Detailed Description

A sprite frame is essentially a single graphic which contains multiple frames. An SPA file is a set of sprite frames.

Public Member Functions

 SpriteFrame (SPA animation, int frameCount)
 Creates a new sprite which belongs to the given animation and will hold the given number of frames. More...
 
void AddFrame (Frame frame, int frameIndex)
 Adds the given frame to this sprite. More...
 
void Output (string tempFile, CompressionMode compression, BinaryWriter sw)
 Writes this sprite out into the given writer. More...
 

Public Attributes

Bitmap Image
 The bitmap that will actually be output. More...
 
Graphics Canvas
 The graphic that the frames will be written to. More...
 
int FrameCount
 How many frames of the animation this sprite holds. More...
 
SPA ParentAnimation
 The animation this sprite belongs to. More...
 

Constructor & Destructor Documentation

SPABuilder.SpriteFrame.SpriteFrame ( SPA  animation,
int  frameCount 
)
inline

Creates a new sprite which belongs to the given animation and will hold the given number of frames.

Parameters
animationThe parent animation this sprite will belong to.
frameCountThe number of frames this sprite will hold.

Member Function Documentation

void SPABuilder.SpriteFrame.AddFrame ( Frame  frame,
int  frameIndex 
)
inline

Adds the given frame to this sprite.

Parameters
frameThe frame to add to the sprite.
frameIndexThe index/position to add it to.
void SPABuilder.SpriteFrame.Output ( string  tempFile,
CompressionMode  compression,
BinaryWriter  sw 
)
inline

Writes this sprite out into the given writer.

Parameters
tempFileThe path to a temp file that this sprite can write to for compression.
compressionThe compression mode to use.
swThe writer the sprite will be written to.

Member Data Documentation

Graphics SPABuilder.SpriteFrame.Canvas

The graphic that the frames will be written to.

int SPABuilder.SpriteFrame.FrameCount

How many frames of the animation this sprite holds.

Bitmap SPABuilder.SpriteFrame.Image

The bitmap that will actually be output.

SPA SPABuilder.SpriteFrame.ParentAnimation

The animation this sprite belongs to.