Class Sprite
A renderable sprite - hold rendering params.
Inheritance
System.Object
Sprite
Namespace: BonEngineSharp.Framework
Assembly: BonEngineSharp.dll
Syntax
public class Sprite : Object
Constructors
Sprite()
Declaration
public Sprite()
Fields
Blend
Blending mode.
Declaration
public BlendModes Blend
Field Value
| Type | Description |
|---|---|
| BlendModes |
Color
Drawing color.
Declaration
public Color Color
Field Value
| Type | Description |
|---|---|
| Color |
Image
Source Image.
Declaration
public ImageAsset Image
Field Value
| Type | Description |
|---|---|
| ImageAsset |
Origin
Drawing origin (0.0 - 1.0 relative to sprite size).
Declaration
public PointF Origin
Field Value
| Type | Description |
|---|---|
| PointF |
Position
Position.
Declaration
public PointF Position
Field Value
| Type | Description |
|---|---|
| PointF |
Rotation
Drawing rotation.
Declaration
public float Rotation
Field Value
| Type | Description |
|---|---|
| System.Single |
Size
Drawing size.
Declaration
public PointI Size
Field Value
| Type | Description |
|---|---|
| PointI |
SourceRect
Source rectangle.
Declaration
public RectangleI SourceRect
Field Value
| Type | Description |
|---|---|
| RectangleI |
Properties
DestSize
Get destination size in pixels.
Declaration
public PointI DestSize { get; }
Property Value
| Type | Description |
|---|---|
| PointI |
LooseDestRect
Get estimated dest rect, without rotation applied.
Declaration
public RectangleI LooseDestRect { get; }
Property Value
| Type | Description |
|---|---|
| RectangleI |
Methods
Clone()
Clone this sprite.
Declaration
public Sprite Clone()
Returns
| Type | Description |
|---|---|
| Sprite | Cloned sprite. |