Sprite Members
Animation Studio Reference

Sprite Members

Sprite overview

Public Instance Constructors

SpriteOverloaded. Initializes a new instance of the Sprite class.

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.

Public Instance Methods

Collides Tests if a sprite collides this sprite
CreateObjRef (inherited from MarshalByRefObject)Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Dispose (inherited from Component) Releases all resources used by the Component.
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetLifetimeService (inherited from MarshalByRefObject)Retrieves the current lifetime service object that controls the lifetime policy for this instance.
GetType (inherited from Object)Gets the Type of the current instance.
InitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
PointInSprite Tests if a point is within the visible part of a Sprite.
ToString (inherited from Component) 

Public Instance Events

Click This event fires, when the mouse is clicked within the visible region of a sprite.
Collision This event fires, when a collision between sprites occurs. Property DetectCollisions must be set to true, for the event to occur.
Disposed (inherited from Component)Adds an event handler to listen to the Disposed event on the component.
MouseDown This event fires, when the mouse button is pressed within the visible region of a sprite.
MouseUp This event fires, when the mouse button is released within the visible region of a sprite.
NextFrame This event fires, when the next frame of the sprite is rendered into the SpritePanel.
Paint This event is fired, each time a paint evant occurs. Normally you do not need this event.

See Also

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