AgateLib.Sprites.SpriteFrame Class Reference

Class for a single frame of a sprite. More...

Inheritance diagram for AgateLib.Sprites.SpriteFrame:

AgateLib.DisplayLib.ISpriteFrame

List of all members.

Public Member Functions

SpriteFrame Clone ()
 Copies this object.
bool IsBlank ()
 Returns true if the entire frame is transparent.
void Draw (float dest_x, float dest_y, float rotationCenterX, float rotationCenterY)
 Draws the sprite frame at the specified location rotated around the specified point.
override string ToString ()
 Converst to a string.

Properties

Rectangle SourceRect [get, set]
 Gets or sets the source rectangle for this frame.
Point Offset [get, set]
 Gets or sets the offset for drawing this frame.
Size DisplaySize [get, set]
 Gets or sets the display size.
Surface Surface [get]


Detailed Description

Class for a single frame of a sprite.

This class can automatically trim the frame, so that extra space around the object which is transparent is not drawn. This is taken advantage of if surfaces are packed to create a tighter packing and fit more objects on the same texture.

SpriteFrame contains a reference count. If you manually copy it, be sure to call AddRef unless you use the Clone method.


Member Function Documentation

SpriteFrame AgateLib.Sprites.SpriteFrame.Clone (  ) 

Copies this object.

Actually, this just returns this object, since there are no unmanaged resources to deal with. Be sure to Dispose the result when finished with it.

Returns:

void AgateLib.Sprites.SpriteFrame.Draw ( float  dest_x,
float  dest_y,
float  rotationCenterX,
float  rotationCenterY 
)

Draws the sprite frame at the specified location rotated around the specified point.

Parameters:
dest_x 
dest_y 
rotationCenterX 
rotationCenterY 

Implements AgateLib.DisplayLib.ISpriteFrame.

bool AgateLib.Sprites.SpriteFrame.IsBlank (  ) 

Returns true if the entire frame is transparent.

override string AgateLib.Sprites.SpriteFrame.ToString (  ) 

Converst to a string.

Returns:


Property Documentation

Size AgateLib.Sprites.SpriteFrame.DisplaySize [get, set]

Gets or sets the display size.

Point AgateLib.Sprites.SpriteFrame.Offset [get, set]

Gets or sets the offset for drawing this frame.

Rectangle AgateLib.Sprites.SpriteFrame.SourceRect [get, set]

Gets or sets the source rectangle for this frame.

Implements AgateLib.DisplayLib.ISpriteFrame.

Surface AgateLib.Sprites.SpriteFrame.Surface [get]


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo