Table of Contents

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 Texture2D
Position Vector2
SourceRect Rectangle
DrawColor Color
Rotation float
Origin Vector2
TextureScale Vector2
Effects SpriteEffects
LayerDepth float
CurrentFrame int

Properties

CurrentFrame

public int CurrentFrame { get; init; }

Property Value

int

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

float

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

float

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