sprite

package
v0.0.0-...-7a1692d Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransparentPixel uint32 = 0x000000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Width        int
	Height       int
	OffsetX      []int
	OffsetY      []int
	PackedWidth  []int
	PackedHeight []int
	Colors       []uint32
	Index        [][]uint8
}

func DecodeGroup

func DecodeGroup(bs []byte) *Group

func (*Group) Get

func (s *Group) Get(n int) *Sprite

type PixelEncoding

type PixelEncoding uint8
const (
	HorizontalEncoding PixelEncoding = 0
	VerticalEncoding   PixelEncoding = 1
)

type Sprite

type Sprite struct {
	Width        int
	Height       int
	OffsetX      int
	OffsetY      int
	PackedWidth  int
	PackedHeight int
	Colors       []uint32
	Index        []uint8
}

func (*Sprite) ToImage

func (s *Sprite) ToImage() image.Image

Jump to

Keyboard shortcuts

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