← back to roto on ba3a.dev

Package-level declarations

Types

Link copied to clipboard
data class AseCel(val layerIndex: Int, val image: IndexedRaster, val x: Int = 0, val y: Int = 0, val opacity: Int = Argb.OPAQUE_ALPHA)

The image one layer shows in one frame, placed with its top-left corner at (x, y) on the canvas. A cel may extend past the canvas edge. opacity is 0..255.

Link copied to clipboard
object AseCodec

Reads and writes AseSprites as Aseprite .ase files, readable by Aseprite and LibreSprite.

Link copied to clipboard
class AseFormatException(message: String, cause: Throwable? = null) : IOException

An .ase file that is malformed, or that uses a feature outside the subset AseSprite models.

Link copied to clipboard
data class AseFrame(val durationMs: Int, val cels: List<AseCel>)

One animation frame, shown for durationMs. A layer with no cel in cels is empty in this frame.

Link copied to clipboard
data class AseLayer(val name: String, val opacity: Int = Argb.OPAQUE_ALPHA, val visible: Boolean = true, val editable: Boolean = true)

One layer. opacity is 0..255. Layer opacity is a later Aseprite addition that older readers may ignore; AseCel.opacity is understood everywhere, so prefer it for anything that must look the same in every editor.

Link copied to clipboard
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.

Link copied to clipboard
data class AseTag(val name: String, val from: Int, val to: Int, val repeat: Int = 0)

A named run of frames, from..to inclusive.