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] |
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.
| 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.
| 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.
| 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.
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] |
Surface AgateLib.Sprites.SpriteFrame.Surface [get] |
Implements AgateLib.DisplayLib.ISpriteFrame.
|
AgateLib Awesome Game and Tool Engine Library |
|