DrawInfo

Namespace: Murder.Core.Graphics
Assembly: Murder.dll

public sealed struct DrawInfo

Generic struct for drawing things without cluttering methods full of arguments. Note that not all fields are supported by all methods. Tip: Create a new one like this: new DrawInfo(){ Color = Color.Red, Sort = 0.2f}

⭐ Constructors

public DrawInfo()
public DrawInfo(Color color, float sort)

Parameters
color Color
sort float

public DrawInfo(float sort)

Parameters
sort float

⭐ Properties

BlendMode

public BlendStyle BlendMode { get; public set; }

Returns
BlendStyle

Clip

public Rectangle Clip { get; public set; }

Returns
Rectangle

Color

public Color Color { get; public set; }

Returns
Color

Debug

public bool Debug { get; public set; }

Returns
bool

Default

public static DrawInfo Default { get; }

Returns
DrawInfo

ImageFlip

public ImageFlip ImageFlip { get; public set; }

Returns
ImageFlip

Offset

public Vector2 Offset { get; public set; }

An offset to draw this image. In pixels

Returns
Vector2

Origin

public Vector2 Origin { get; public set; }

The origin of the image. From 0 to 1. Vector2Helper.Center is the center.

Returns
Vector2

Outline

public T? Outline { get; public set; }

Returns
T?

OutlineStyle

public OutlineStyle OutlineStyle { get; public set; }

Returns
OutlineStyle

Rotation

public float Rotation { get; public set; }

In degrees.

Returns
float

Scale

public Vector2 Scale { get; public set; }

Returns
Vector2

Shadow

public T? Shadow { get; public set; }

Returns
T?

Sort

public float Sort { get; public set; }

Returns
float

⭐ Methods

WithSort(float)

public DrawInfo WithSort(float sort)

Parameters
sort float

Returns
DrawInfo

GetBlendMode()

public Vector3 GetBlendMode()

Returns
Vector3