Versions in this module Expand all Collapse all v0 v0.1.1 Nov 7, 2026 v0.1.0 Oct 30, 2026 Changes in this version + const DefaultMaxPixels + const DefaultMaxTiles + var ErrMalformed = errors.New("tilemask: malformed input") + var ErrTooLarge = errors.New("tilemask: size exceeds the cap") + var ErrUnsupported = errors.New("tilemask: unsupported encoding or compression") + func MapSize(r io.Reader, f Format) (w, h int, err error) + type Format uint8 + const TMJ + const TMX + type Layer struct + Name string + Tiles []image.Point + type Map struct + Height int + Layers []Layer + Width int + func DecodeMap(r io.Reader, f Format, opts Options) (Map, error) + type Mask struct + Height int + Width int + func DecodePNG(r io.Reader, opts Options) (*Mask, error) + func ReadMask(r io.Reader, opts Options) (*Mask, error) + func (m *Mask) At(x, y int) bool + func (m *Mask) Cells(src image.Rectangle, dst image.Point, cell int) iter.Seq[image.Point] + func (m *Mask) WriteTo(w io.Writer) (int64, error) + type Options struct + MaxPixels int64 + MaxTiles int64