output

package
v0.0.0-...-5a2c5e0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blend

func Blend(dest, src image.Image, mode internal.BlendMode) image.Image

func CreateCelImage

func CreateCelImage(file internal.File, cel internal.Cel, index int) image.Image

func CreateFrameImage

func CreateFrameImage(file internal.File, frame internal.Frame) (image.Image, error)

func CreateGrayscaleImage

func CreateGrayscaleImage(file internal.File, cel internal.Cel, index int) image.Image

func CreateRGBAImage

func CreateRGBAImage(file internal.File, cel internal.Cel, index int) image.Image

func Divide

func Divide(a, b image.Image) image.Image

func Frames

func Frames(file internal.File) (frames []FrameImage, tags []Tag, err error)

func Gif

func Gif(file internal.File, path string) error

func Png

func Png(file internal.File, path string) error

func SortLayers

func SortLayers(layers []internal.Layer, cels []internal.Cel) []internal.Layer

func SplitFramesAndLayers

func SplitFramesAndLayers(file internal.File) (frames []Frame, tags []Tag)

Types

type Frame

type Frame struct {
	Width      int
	Height     int
	Duration   int
	GridWidth  int
	GridHeight int
	Layers     []Layer
}

type FrameImage

type FrameImage struct {
	Duration   int
	Image      image.Image
	GridWidth  int
	GridHeight int
}

type ImageFrame

type ImageFrame struct {
	Duration int
	Image    image.Image
}

type Layer

type Layer struct {
	Name      string
	BlendMode internal.BlendMode
	Opacity   byte
	IsVisible bool
	Image     image.Image
}

func LayersForFrame

func LayersForFrame(file internal.File, frame internal.Frame) (layers []Layer)

type LoopDirection

type LoopDirection byte
const (
	LoopDirectionForward         LoopDirection = 0
	LoopDirectionReverse         LoopDirection = 1
	LoopDirectionPingPong        LoopDirection = 2
	LoopDirectionPingPongReverse LoopDirection = 3
)

type Tag

type Tag struct {
	Name string
	From int
	To   int
	LoopDirection
	Repeat int
}

func Tags

func Tags(file internal.File) (tags []Tag)

Jump to

Keyboard shortcuts

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