← back to roto on ba3a.dev

AseSprite

data class AseSprite(val width: Int, val height: Int, val palette: List<Int>, val layers: List<AseLayer>, val frames: List<AseFrame>, val transparentIndex: Int = 0, val tags: List<AseTag> = emptyList())

An indexed-colour Aseprite sprite: the subset of the .ase format Roto writes and reads.

palette holds up to 256 Argb colours; every cel index must point into it. transparentIndex is the palette entry Aseprite and LibreSprite treat as transparent on non-background layers. layers are listed bottom to top, the way the format stores them.

Constructors

Link copied to clipboard
constructor(width: Int, height: Int, palette: List<Int>, layers: List<AseLayer>, frames: List<AseFrame>, transparentIndex: Int = 0, tags: List<AseTag> = emptyList())

Properties

Link copied to clipboard

the animation frames, in order; at least one

Link copied to clipboard
val height: Int

canvas height in pixels, 1..65535

Link copied to clipboard

the layers, bottom to top; at least one

Link copied to clipboard

the colours as Argb, 1 to 256 of them

Link copied to clipboard

the named frame ranges the artist set; read from a file, never written back

Link copied to clipboard

the palette entry shown as transparent on non-background layers

Link copied to clipboard
val width: Int

canvas width in pixels, 1..65535