Class SpriteFromTexture
[DataContract("SpriteFromTexture")]
[Display("Texture", null)]
public class SpriteFromTexture : ISpriteProvider
- Inheritance
-
SpriteFromTexture
- Implements
Constructors
SpriteFromTexture()
Creates a new instance of SpriteFromTexture.
public SpriteFromTexture()
Properties
Center
The position of the center of the image in pixels.
[DataMember(10)]
public Vector2 Center { get; set; }
Property Value
CenterFromMiddle
Gets or sets the value indicating position provided to Center is from the middle of the sprite region or from the left/top corner.
[DataMember(15)]
public bool CenterFromMiddle { get; set; }
Property Value
IsTransparent
Gets or sets the transparency value of the sprite.
[DataMember(20)]
public bool IsTransparent { get; set; }
Property Value
PixelsPerUnit
Gets or sets the value specifying the size of one pixel in scene units
[DataMember(8)]
public float PixelsPerUnit { get; set; }
Property Value
SpritesCount
Gets the number of sprites available in the provider.
public int SpritesCount { get; }
Property Value
Texture
Gets or sets the texture of representing the sprite
[DataMember(5)]
public Texture Texture { get; set; }
Property Value
Methods
GetSprite()
Get a sprite from the provider.
public Sprite GetSprite()
Returns
Operators
explicit operator SpriteFromTexture(Sprite)
public static explicit operator SpriteFromTexture(Sprite sprite)
Parameters
sprite
Sprite