Sprite Class

SFML.Net

Sprite Class
This class defines a sprite : texture, transformations, color, and draw on screen
Inheritance Hierarchy
SystemObject  SFMLObjectBase
    SFML.GraphicsTransformable
      SFML.GraphicsSprite

Namespace: SFML.Graphics
Assembly: sfmlnet-graphics-2 (in sfmlnet-graphics-2.dll) Version: 2.2.0.0 (2.2.0)
Syntax
public class Sprite : Transformable, Drawable
Public Class Sprite
	Inherits Transformable
	Implements Drawable
public ref class Sprite : public Transformable, 
	Drawable
type Sprite =  
    class
        inherit Transformable
        interface Drawable
    end

The Sprite type exposes the following members.

Constructors
  NameDescription
Public methodSprite
Default constructor
Public methodSprite(Sprite)
Construct the sprite from another sprite
Public methodSprite(Texture)
Construct the sprite from a source texture
Public methodSprite(Texture, IntRect)
Construct the sprite from a source texture
Top
Methods
  NameDescription
Protected methodDestroy
Handle the destruction of the object
(Overrides TransformableDestroy(Boolean).)
Public methodDispose
Explicitely dispose the object
(Inherited from ObjectBase.)
Public methodDraw
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Dispose the object
(Inherited from ObjectBase.)
Public methodGetGlobalBounds
Get the global bounding rectangle of the entity. The returned rectangle is in global coordinates, which means that it takes in account the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the sprite in the global 2D world's coordinate system.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLocalBounds
Get the local bounding rectangle of the entity. The returned rectangle is in local coordinates, which means that it ignores the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the entity in the entity's coordinate system.
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
Provide a string describing the object
(Overrides ObjectToString.)
Top
Properties
  NameDescription
Public propertyColor
Global color of the object
Public propertyCPointer
Access to the internal pointer of the object. For internal use only
(Inherited from ObjectBase.)
Public propertyInverseTransform
The combined transform of the object
(Inherited from Transformable.)
Public propertyOrigin
The origin of an object defines the center point for all transformations (position, scale, rotation). The coordinates of this point must be relative to the top-left corner of the object, and ignore all transformations (position, scale, rotation).
(Inherited from Transformable.)
Public propertyPosition
Position of the object
(Inherited from Transformable.)
Public propertyRotation
Rotation of the object
(Inherited from Transformable.)
Public propertyScale
Scale of the object
(Inherited from Transformable.)
Public propertyTexture
Source texture displayed by the sprite
Public propertyTextureRect
Sub-rectangle of the source image displayed by the sprite
Public propertyTransform
The combined transform of the object
(Inherited from Transformable.)
Top
Remarks
See also the note on coordinates and undistorted rendering in SFML.Graphics.Transformable.
See Also