Sprite Properties
Animation Studio Reference

Sprite Properties

The properties of the Sprite class are listed below. For a complete list of Sprite class members, see the Sprite Members topic.

Public Instance Properties

AutoCalc If set to true, the resulting path is calculated immediately after any change of the Timeline parameters, keyframes etc. If set to false, you must call CalcFrames to recalculate the resulting path of the sprite.
BorderColor Set or get the Color of the sprite border.
BorderWidth Sets or get the border width of the sprite.
Container (inherited from Component) Gets the IContainer that contains the Component.
DetectCollisions If a SpriteCollisionHandler is present, the event is fired, if this property is set to true
DrawBorder If set to true, a rectangle with a given BorderColor and BorderWidth is drawn around the sprite.
DrawPath If set to true, the path of the Timeline is drawn. This feature is commonly used at design time, to control the position of the KeyFrames.
DrawText If set to true, the sprite will be rendered as 'Textsprite', using the font set with Font.
Font Get or set the font for the sprite. The font is used to render the sprite as text. DrawText must be set to true, to display the sprite as Textsprite.
Image The Bitmap of the sprite. DrawText must be set to false to show the sprite. TransparentColor matches the color of regions which should be shown transparent.
Loops If the sprite is started, this parameter controls, how often the path wil be traversed. If PathClosed is set to true, this property has no effect on the sprite.
Opacity Gets or sets the opacity of the sprite. 0.0F = fully transparent (invisible), 1.0F = no transpareny. This property is overriden, when used in keyframes of the Timeline.
PathClosed Connects the first and last frame of the sprite. The resulting path is closed. Some times you need to insert an additional KeyFrame for the path to appear smooth.
PathForm Set or get the PathFormEnumeration of the sprite. This parameter controls the shape of the path (bezier or linear).
Position Sets or gets the position relative to the upper left corner of the SpritePanel containing the sprite. The origin within the sprite is the center point of the surrounding rectangle. This property is overriden, when used in keyframes of the Timeline.
Rotation Rotates the Sprite in degrees. A negative value rotates the Sprte counterclockwise, a positive value rotates the Sprite clockwise.
Site (inherited from Component) Gets or sets the ISite of the Component.
Size Gets or sets the size of the sprite. This property is overriden, when used in keyframes of the Timeline.
Sound Get or set the Sound object assocciated with this Sprite.
Started Starts or stops the sprite animation, if a Timeline exists. If Loops is greater than 0, the animation is repeated Loops times. If PathClosed is set to true, the sprite begins the animation circular at the first keyframe, after reaching its last frame of the timeline.
Text The text which will be shown, if the sprite is rendered as 'Textsprite'.
TextColor The color of the sprite, when it is rendered as a 'Textsprite'.
Timeline Returns the Timeline of the sprite.
TransparentColor Set or get the color which should be invisible. Regions of the sprite which match this color are shown transparent and events like Click, MouseUp, MouseDown, Collision are not fired when the event occurs in the transparent region.
Visible Show or hide the sprite. This property is overriden, when used in keyframes of the Timeline
XScale Gets or sets the X Scale of the sprite. This property is overriden, when used in keyframes of the Timeline.
YScale Gets or sets the Y Scale of the sprite. This property is overriden, when used in keyframes of the Timeline.
ZOrder Gets or sets the Zorder of the sprite. You can assign any integer value where higher values mean that the sprite is placed in the foreground. This property is overriden, when used in keyframes of the Timeline.

See Also

Sprite Class | AnimationStudio Namespace | Timeline | KeyFrame | AnimationStudio | AutoCalc | CalcFrames