GraphicsAPI reference
Class AtlasData
Namespace: MicroEngine.Graphics
Assembly: MicroEngine.Graphics2D.dll
Guide: Graphics
The description of an atlas image written by a packing tool, read without any graphics device: the JSON of TexturePacker, Free Texture Packer and Aseprite (hash or array of frames; Aseprite’s frame durations and tags), and the Starling/Sparrow XML of TexturePacker, ShoeBox and Kenney’s packs. Trimmed frames keep their place in the untrimmed frame; rotated frames are refused (turn rotation off in the tool).
public sealed class AtlasDataInheritance
Properties
Animations
The frame tags (Aseprite), in the file’s order; empty for formats without tags.
public IReadOnlyList<AtlasAnimation> Animations { get; }Property Value
ImagePath
The atlas image as the file names it (relative to the file), or null when it names none.
public string? ImagePath { get; }Property Value
Regions
The frames, in the file’s order.
public IReadOnlyList<AtlasRegion> Regions { get; }Property Value
Methods
Load(string, AtlasOptions?)
Reads an atlas file (JSON or XML).
public static AtlasData Load(string path, AtlasOptions? options = null)Parameters
path string
options AtlasOptions?
Returns
Exceptions
The file is not an atlas in a known format; the message names it.
Parse(string, AtlasOptions?)
Reads atlas JSON or XML, recognised by its first character.
public static AtlasData Parse(string text, AtlasOptions? options = null)Parameters
text string
The file’s text.
options AtlasOptions?
Pivot and naming; null for Default.
Returns
Exceptions
The text is not an atlas in a known format; the message says what is wrong.