GraphicsAPI reference
Class AtlasOptions
Namespace: MicroEngine.Graphics
Assembly: MicroEngine.Graphics2D.dll
Guide: Graphics
How atlas files are read.
public sealed record AtlasOptions : IEquatable<AtlasOptions>Inheritance
Implements
Constructors
AtlasOptions(Vector2, bool)
How atlas files are read.
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.
public static AtlasOptions Default { get; }Property Value
KeepExtensions
Keeps “.png”, “.aseprite” and similar endings in frame names (false by default: “hero.png” is “hero”).
public bool KeepExtensions { get; init; }Property Value
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).
public Vector2 Pivot { get; init; }Property Value
Methods
<Clone>$()
public AtlasOptions <Clone>$()Returns
Deconstruct(out Vector2, out bool)
public void Deconstruct(out Vector2 Pivot, out bool KeepExtensions)Parameters
Pivot Vector2
KeepExtensions bool
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(AtlasOptions?)
public bool Equals(AtlasOptions? other)Parameters
other AtlasOptions?
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(AtlasOptions?, AtlasOptions?)
public static bool operator ==(AtlasOptions? left, AtlasOptions? right)Parameters
left AtlasOptions?
right AtlasOptions?
Returns
operator !=(AtlasOptions?, AtlasOptions?)
public static bool operator !=(AtlasOptions? left, AtlasOptions? right)Parameters
left AtlasOptions?
right AtlasOptions?