Click or drag to resize
DigitalRuneSprite Class
Represents a 2D image rendered in screen space.
Inheritance Hierarchy

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public abstract class Sprite : INamedObject

The Sprite type exposes the following members.

Constructors
  NameDescription
Protected methodSprite
Initializes a new instance of the Sprite class
Top
Methods
  NameDescription
Public methodClone
Creates a new Sprite that is a clone (deep copy) of the current instance.
Protected methodCloneCore
Makes the instance a clone (deep copy) of the specified Sprite.
Protected methodCreateInstanceCore
When implemented in a derived class, creates a new instance of the Sprite derived class.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyName
Gets or sets the name of the sprite.
Top
Remarks

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).

See Also