Skip to content

GraphicsAPI reference

Class AtlasOptions

Namespace: MicroEngine.Graphics
Assembly: MicroEngine.Graphics2D.dll
Guide: Graphics

How atlas files are read.

C#
public sealed record AtlasOptions : IEquatable<AtlasOptions>

Inheritance

object ← AtlasOptions

Implements

IEquatable<AtlasOptions>

Constructors

AtlasOptions(Vector2, bool)

How atlas files are read.

C#
public AtlasOptions(Vector2 Pivot = default, bool KeepExtensions = false)

Parameters

Pivot Vector2

The anchor of frames whose file gives none, as a fraction of the untrimmed frame: (0, 0) is its top-left (the default), (0.5, 1) the middle of its bottom edge (feet).

KeepExtensions bool

Keeps “.png”, “.aseprite” and similar endings in frame names (false by default: “hero.png” is “hero”).

Properties

Default

Top-left anchors, names without image extensions.

C#
public static AtlasOptions Default { get; }

Property Value

AtlasOptions

KeepExtensions

Keeps “.png”, “.aseprite” and similar endings in frame names (false by default: “hero.png” is “hero”).

C#
public bool KeepExtensions { get; init; }

Property Value

bool

Pivot

The anchor of frames whose file gives none, as a fraction of the untrimmed frame: (0, 0) is its top-left (the default), (0.5, 1) the middle of its bottom edge (feet).

C#
public Vector2 Pivot { get; init; }

Property Value

Vector2

Methods

<Clone>$()

C#
public AtlasOptions <Clone>$()

Returns

AtlasOptions

Deconstruct(out Vector2, out bool)

C#
public void Deconstruct(out Vector2 Pivot, out bool KeepExtensions)

Parameters

Pivot Vector2

KeepExtensions bool

Equals(object?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(AtlasOptions?)

C#
public bool Equals(AtlasOptions? other)

Parameters

other AtlasOptions?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(AtlasOptions?, AtlasOptions?)

C#
public static bool operator ==(AtlasOptions? left, AtlasOptions? right)

Parameters

left AtlasOptions?

right AtlasOptions?

Returns

bool

operator !=(AtlasOptions?, AtlasOptions?)

C#
public static bool operator !=(AtlasOptions? left, AtlasOptions? right)

Parameters

left AtlasOptions?

right AtlasOptions?

Returns

bool