animator

package
v0.0.0-...-2efb1be Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeApng

func MakeApng(g *gol.Gol, outputFilepath string, generations int) error

MakeApng : make an animated-png (apng) for a number of generations for a game-of-life instance.

func MakeGif

func MakeGif(g *gol.Gol, outputFilepath string, generations int, delay int, scaler *ImgScaler) error

MakeGif : make a gif animation for some generations

func MakeStdout

func MakeStdout(g *gol.Gol, generations int, delay int) error

MakeStdout : make a terminal animation for some generations

func MakeSvg

func MakeSvg(g *gol.Gol, outputFilepath string, generations int, delay int) error

MakeSvg : make a svg animation for some generations

Types

type ImgScaler

type ImgScaler struct {
	// contains filtered or unexported fields
}

ImgScaler : scales images to a width and height following an interpolation algorithm

func NewImgScaler

func NewImgScaler(width, height int, interpolatorStr string) *ImgScaler

NewImgScaler : creates a new ImgScaler from a with, height and interpolator string

func (*ImgScaler) ScalePaletted

func (is *ImgScaler) ScalePaletted(src image.Image) *image.Paletted

ScalePaletted : scale a Paletted image

func (*ImgScaler) ScaleRGBA

func (is *ImgScaler) ScaleRGBA(src image.Image) *image.RGBA

ScaleRGBA : scale a RGB image

Jump to

Keyboard shortcuts

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