Class DrawSnapshot
- Namespace
- TrinketTinker.Companions.Anim
- Assembly
- TrinketTinker.dll
Record holding all info needed to draw with Microsoft.Xna.Framework.Graphics.SpriteBatch. The position given is the map X,Y position, to be translated to the viewport position on draw.
public sealed record DrawSnapshot : IEquatable<DrawSnapshot>
- Inheritance
-
DrawSnapshot
- Implements
- Inherited Members
Constructors
DrawSnapshot(Texture2D, Vector2, Rectangle, Color, float, Vector2, Vector2, SpriteEffects, float, int)
Record holding all info needed to draw with Microsoft.Xna.Framework.Graphics.SpriteBatch. The position given is the map X,Y position, to be translated to the viewport position on draw.
public DrawSnapshot(Texture2D Texture, Vector2 Position, Rectangle SourceRect, Color DrawColor, float Rotation, Vector2 Origin, Vector2 TextureScale, SpriteEffects Effects, float LayerDepth, int CurrentFrame = -1)
Parameters
Texture
Texture2DPosition
Vector2SourceRect
RectangleDrawColor
ColorRotation
floatOrigin
Vector2TextureScale
Vector2Effects
SpriteEffectsLayerDepth
floatCurrentFrame
int
Properties
CurrentFrame
public int CurrentFrame { get; init; }
Property Value
DrawColor
public Color DrawColor { get; init; }
Property Value
- Color
Effects
public SpriteEffects Effects { get; init; }
Property Value
- SpriteEffects
LayerDepth
public float LayerDepth { get; init; }
Property Value
Origin
public Vector2 Origin { get; init; }
Property Value
- Vector2
Position
public Vector2 Position { get; init; }
Property Value
- Vector2
Rotation
public float Rotation { get; init; }
Property Value
SourceRect
public Rectangle SourceRect { get; init; }
Property Value
- Rectangle
Texture
public Texture2D Texture { get; init; }
Property Value
- Texture2D
TextureScale
public Vector2 TextureScale { get; init; }
Property Value
- Vector2