Sprite Class |
Namespace: DigitalRune.Graphics
The Sprite type exposes the following members.
Name | Description | |
---|---|---|
Clone |
Creates a new Sprite that is a clone (deep copy) of the current instance.
| |
CloneCore |
Makes the instance a clone (deep copy) of the specified Sprite.
| |
CreateInstanceCore |
When implemented in a derived class, creates a new instance of the
Sprite derived class.
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
A sprite is a 2D image, such as a bitmap or a text. Sprites are positioned in world space, but rendered in screen space. That means, a 16x16 pixel sprite is usually exactly 16x16 pixel on screen. (Internally the images and texts are rendered using the XNA SpriteBatch, hence the name.)
DigitalRune Graphics supports two types of sprites:
A sprite is positioned in world space by creating a new SpriteNode and adding it to a 3D scene.
Cloning:
Sprites are cloneable. Clone creates a copy of the current
sprite. The Texture of a ImageSprite or the
Text of a TextSprite is copied by reference (no deep
copy).