pixelart

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: CC0-1.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.1.0_(2022-02-28)"

Variables

View Source
var ColorMap = map[string]color.RGBA{}/* 149 elements not displayed */

Functions

func Download

func Download(url, outpath string)

func ParseColor

func ParseColor(s string) (color.RGBA, error)

func ParseHexColor

func ParseHexColor(s string) (c color.RGBA, err error)

func ReadImage

func ReadImage(path string) image.Image

Types

type ColorInfo

type ColorInfo struct {
	Count int // no. of pixels
	Index int // zero-based running index (0,1,2, etc.)
}

todo/check: find a better name - why? why not?

type ImageComposite

type ImageComposite struct {
	image.Image           // use "composition"
	TileWidth, TileHeight int
	Count                 int // optional - not all tiles (full cap(acity) might be used)
}

func ReadImageComposite

func ReadImageComposite(path string, tileSize *image.Point) *ImageComposite

func (*ImageComposite) Max

func (composite *ImageComposite) Max() int

func (*ImageComposite) Tile

func (composite *ImageComposite) Tile(id int) *ImageTile

type ImageTile

type ImageTile struct {
	image.Image // use "composition" - for "nicer" api - why? why not?
}

func (*ImageTile) Background

func (tile *ImageTile) Background(background color.Color) *ImageTile

func (*ImageTile) Mirror

func (tile *ImageTile) Mirror() *ImageTile

func (*ImageTile) Save

func (tile *ImageTile) Save(path string)

func (*ImageTile) ToSVG

func (tile *ImageTile) ToSVG() string

func (*ImageTile) Zoom

func (tile *ImageTile) Zoom(zoom int) *ImageTile

Jump to

Keyboard shortcuts

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