internal

package
v0.0.0-...-c9e4a7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlendMode

type BlendMode uint16
const (
	BlendModeNormal     BlendMode = 0
	BlendModeMultiply   BlendMode = 1
	BlendModeScreen     BlendMode = 2
	BlendModeOverlay    BlendMode = 3
	BlendModeDarken     BlendMode = 4
	BlendModeLighten    BlendMode = 5
	BlendModeColorDodge BlendMode = 6
	BlendModeColorBurn  BlendMode = 7
	BlendModeHardLight  BlendMode = 8
	BlendModeSoftLight  BlendMode = 9
	BlendModeDifference BlendMode = 10
	BlendModeExclusion  BlendMode = 11
	BlendModeHue        BlendMode = 12
	BlendModeSaturation BlendMode = 13
	BlendModeColor      BlendMode = 14
	BlendModeLuminosity BlendMode = 15
	BlendModeAddition   BlendMode = 16
	BlendModeSubtract   BlendMode = 17
	BlendModeDivide     BlendMode = 18
)

type Cel

type Cel struct {
	LayerIndex uint16
	Type       CelType
	Opacity    byte
	X          int
	Y          int
	Width      uint16
	Height     uint16
	ZIndex     int16
	Image      CelImage
	Link       uint16
	Tilemap    CelTilemap
	Raw        []byte
	CelExtra
	UserData UserData
}

type CelExtra

type CelExtra struct {
	Flags    uint32
	X        [4]byte
	Y        [4]byte
	Width    [4]byte
	Height   [4]byte
	UserData UserData
}

type CelImage

type CelImage struct {
	Width  int
	Height int
	Bytes  []byte
}

type CelTilemap

type CelTilemap struct {
	Width       uint16
	Height      uint16
	BitsPerTile uint16
	TileIDMask  uint32
	XFlipMask   uint32
	YFlipMask   uint32
	DFlipMask   uint32
	Tiles       []uint32
}

type CelType

type CelType uint16
const (
	CelTypeRawImage CelType = iota
	CelTypeLinkedCel
	CelTypeCompressedImage
	CelTypeCompressedTilemap
)

type ColorProfile

type ColorProfile struct {
	Type     uint16
	Flags    uint16
	Gamma    [4]byte
	ICC      []byte
	UserData UserData
}

type Element

type Element struct {
	Bool       bool
	Int        int
	Uint       uint
	Float      float64
	Fixed      [4]byte
	String     string
	Point      Point
	Size       Size
	Rect       Rect
	Vector     []Element
	Properties map[uint32][]Property
	UUID       [16]byte
}

type ExternalFile

type ExternalFile struct {
	EntryID uint32
	Type    byte
	Name    string
}

type ExternalFiles

type ExternalFiles struct {
	Entries  []ExternalFile
	UserData UserData
}

type File

type File struct {
	Width          int
	Height         int
	ColorDepth     uint16
	PaletteIndex   byte
	NumberOfColors uint16
	PixelWidth     byte
	PixelHeight    byte
	XGridPosition  int16
	YGridPosition  int16
	GridWidth      uint16
	GridHeight     uint16
	Frames         []Frame
	FileChunks
}

type FileChunks

type FileChunks struct {
	Palette       []color.Color
	ExternalFiles ExternalFiles
	ColorProfile  ColorProfile
	Tags          Tags
	Slices        []Slice
	Tilesets      []Tileset
}

type Frame

type Frame struct {
	Duration uint16
	Layers   []Layer
}

type Layer

type Layer struct {
	Name          string
	Flags         LayerFlag
	Type          uint16
	DefaultWidth  uint16
	DefaultHeight uint16
	BlendMode     BlendMode
	Opacity       byte
	TilesetID     uint32
	Cel           Cel
	UserData      UserData
	Image         image.Image
}

type LayerFlag

type LayerFlag uint16
const (
	LayerFlagVisible LayerFlag = 1 << iota
	LayerFlagEditable
	LayerFlagLockMovement
	LayerFlagBackground
	LayerFlagPreferLinkedCels
	LayerFlagCollapsed
	LayerFlagReference
)

type Mask

type Mask struct {
	X        int16
	Y        int16
	Width    uint16
	Height   uint16
	Name     string
	Data     []byte
	UserData UserData
}

type OldPacket

type OldPacket struct {
	Colors []color.Color
}

type OldPalette

type OldPalette struct {
	Packets  []OldPacket
	UserData UserData
}

type Palette

type Palette struct {
	FirstIndex uint32
	LastIndex  uint32
	Entries    []PaletteEntry
	UserData   UserData
}

type PaletteEntry

type PaletteEntry struct {
	Name  string
	Flags uint16
	Color color.Color
}

type Point

type Point struct {
	X, Y int32
}

type PreProcessedFrame

type PreProcessedFrame struct {
	Duration uint16
	Chunks   []any
}

type Property

type Property struct {
	Name string
	Type uint16
	Element
}

type PropertyMap

type PropertyMap map[uint32][]Property

type Rect

type Rect struct {
	Origin Point
	Size   Size
}

type Size

type Size struct {
	Width, Height int32
}

type Slice

type Slice struct {
	Name     string
	Flags    uint32
	Keys     []SliceKey
	UserData UserData
}

type Slice9Patches

type Slice9Patches struct {
	X, Y   int32
	Width  uint32
	Height uint32
}

type SliceKey

type SliceKey struct {
	Frame   uint32
	X, Y    int32
	Width   uint32
	Height  uint32
	Patches Slice9Patches
	Pivot   SlicePivot
}

type SlicePivot

type SlicePivot struct {
	X, Y int32
}

type Tag

type Tag struct {
	Name          string
	From          uint16
	To            uint16
	LoopDirection byte
	Repeat        byte
	Color         color.Color
	UserData      UserData
}

type Tags

type Tags []Tag

type Tile

type Tile struct {
	image.Image
	UserData UserData
}

type Tileset

type Tileset struct {
	ID                uint32
	Name              string
	Flags             uint32
	Width             uint16
	Height            uint16
	Index             int16
	ExternalID        uint32
	ExternalTilesetID uint32
	Tiles             []Tile
	UserData          UserData
}

type UserData

type UserData struct {
	Flags      uint32
	Text       string
	Color      color.Color
	Properties PropertyMap
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL