Documentation ¶
Index ¶
Constants ¶
View Source
const Version = "0.1.2-20230402"
Variables ¶
View Source
var Cache = make(map[string]*pixelart.Image)
///
todo/check - make (local) cache public - why? why not? or just keep as "internal" detail note: remember map always requires make or map literal to init/setup
Functions ¶
Types ¶
type Collection ¶
type Collection struct { Name string Width int Height int Path string Url string // note: background==false (default) => transparent // background==true => images have backgrounds (NOT transparent) Background bool Count int }
func DownloadCollections ¶ added in v1.1.0
func DownloadCollections(url string) []*Collection
func ParseCollections ¶ added in v1.1.0
func ParseCollections(txt string) []*Collection
func ReadCollections ¶ added in v1.1.0
func ReadCollections(path string) []*Collection
func (*Collection) HandleStripPNG ¶ added in v0.0.5
func (col *Collection) HandleStripPNG() []byte
func (*Collection) HandleTilePNG ¶
func (col *Collection) HandleTilePNG(id int, opts PNGOpts) []byte
func (*Collection) HandleTileSVG ¶
func (col *Collection) HandleTileSVG(id int, opts SVGOpts) []byte
func (*Collection) Image ¶
func (col *Collection) Image() *pixelart.ImageComposite
type PNGOpts ¶
type PNGOpts struct { Background color.Color // default: nil BackgroundName string // default: "" Silhouette color.Color // default: nil SilhouetteName string // default: "" Circle bool // default: false Mirror bool // default: false Transparent bool // default: false Zoom int // default: FIX??? use 1 NOT 0 - how? Resize int // default: 0 (only specified if > 0) Save bool // default: false Flag string // default: "" }
Click to show internal directories.
Click to hide internal directories.