ImageSprite Class |
Namespace: DigitalRune.Graphics
The ImageSprite type exposes the following members.
Name | Description | |
---|---|---|
ImageSprite |
Initializes a new instance of the ImageSprite class.
| |
ImageSprite(PackedTexture) |
Initializes a new instance of the ImageSprite class with the specified
texture.
|
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.
(Overrides SpriteCloneCore(Sprite).) | |
CreateInstanceCore |
When implemented in a derived class, creates a new instance of the
Sprite derived class.
(Overrides SpriteCreateInstanceCore.) | |
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.) |
Name | Description | |
---|---|---|
Name |
Gets or sets the name of the sprite.
(Inherited from Sprite.) | |
Texture |
Gets or sets the texture.
|
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).