Table of Contents

Struct SpriteDrawCommand

Namespace
TileWorld.Engine.Render
Assembly
TileWorld.Engine.dll

Describes a single sprite draw request in backend-neutral terms.

public readonly record struct SpriteDrawCommand : IEquatable<SpriteDrawCommand>
Implements
Inherited Members

Constructors

SpriteDrawCommand(string, RectI, RectI, ColorRgba32, float)

Describes a single sprite draw request in backend-neutral terms.

public SpriteDrawCommand(string TextureKey, RectI SourceRect, RectI DestinationRectPixels, ColorRgba32 Tint, float LayerDepth)

Parameters

TextureKey string

The host-defined texture identifier to sample from.

SourceRect RectI

The source rectangle inside the texture.

DestinationRectPixels RectI

The destination rectangle in screen pixels passed to the render backend.

Tint ColorRgba32

The multiplicative tint color applied during drawing.

LayerDepth float

The layer depth used to sort draw order.

Properties

DestinationRectPixels

The destination rectangle in screen pixels passed to the render backend.

public RectI DestinationRectPixels { get; init; }

Property Value

RectI

LayerDepth

The layer depth used to sort draw order.

public float LayerDepth { get; init; }

Property Value

float

SourceRect

The source rectangle inside the texture.

public RectI SourceRect { get; init; }

Property Value

RectI

TextureKey

The host-defined texture identifier to sample from.

public string TextureKey { get; init; }

Property Value

string

Tint

The multiplicative tint color applied during drawing.

public ColorRgba32 Tint { get; init; }

Property Value

ColorRgba32