Versions in this module Expand all Collapse all v0 v0.2.0 Jun 26, 2024 Changes in this version type Canvas + func (ctx *Canvas) Reset() + func (ctx *Canvas) Resize(sf int) + func (ctx *Canvas) Smake(cx, cy, cw, ch, sw, sh int) *image.Paletted + func (ctx *Canvas) Sput(im *image.Paletted, x, y int, ax, ay float64) v0.1.7 Jun 23, 2024 v0.1.6 Jun 23, 2024 v0.1.5 Jun 22, 2024 v0.1.4 Jun 22, 2024 Changes in this version + func EachPixel(r image.Rectangle, fn func(x, y int)) + func Fix(x float64) fixed.Int26_6 + func FromFloat64(value float64) (fixed.Int26_6, fixed.Int26_6) + func Unfix(x fixed.Int26_6) float64 + func UnfixI(x fixed.Int26_6) int v0.1.3 Jun 19, 2024 v0.1.2 Jun 18, 2024 Changes in this version type Canvas + func (ctx *Canvas) At(x, y int) int v0.1.1 Jun 18, 2024 v0.1.0 Jun 18, 2024 Changes in this version + var Palette1Bit = color.Palette + var Palette2BitGrayScale = color.Palette + var Palette3Bit = color.Palette + var PaletteByName = PaletteLookup + var PaletteCGA = color.Palette + var PaletteFamicube = color.Palette + var PaletteInk = color.Palette + var PalettePICO8 = color.Palette + var PalettesByNumberOfColors = func() map[int]PaletteLookup { ... }() + func Color(p color.Palette, n int) color.NRGBA + type Align int + const AlignCenter + const AlignLeft + const AlignRight + type Canvas struct + func New(img *image.Paletted) Canvas + func (ctx *Canvas) Circ(x0, y0, r int) + func (ctx *Canvas) CircFill(x, y, r int) + func (ctx *Canvas) Cls(idx int) + func (ctx *Canvas) Color(idx int) + func (ctx *Canvas) Height() int + func (ctx *Canvas) Line(x1, y1, x2, y2 int) + func (ctx *Canvas) MeasureString(s string) (int, int) + func (ctx *Canvas) Pix(x, y int) + func (ctx *Canvas) Print(s string, x, y int) + func (ctx *Canvas) Record() + func (ctx *Canvas) Rect(x1, y1, x2, y2 int) + func (ctx *Canvas) RectFill(x1, y1, x2, y2 int) + func (ctx *Canvas) RoundRect(x1, y1, x2, y2, r int) + func (ctx *Canvas) RoundRectFill(x1, y1, x2, y2, r int) + func (ctx *Canvas) Save(fn string) error + func (ctx *Canvas) Width() int + func (ctx *Canvas) X2() + func (dc *Canvas) Identity() + func (dc *Canvas) InvertY() + func (dc *Canvas) Rotate(angle float64) + func (dc *Canvas) RotateAbout(angle, x, y float64) + func (dc *Canvas) Scale(x, y float64) + func (dc *Canvas) ScaleAbout(sx, sy, x, y float64) + func (dc *Canvas) Shear(x, y float64) + func (dc *Canvas) ShearAbout(sx, sy, x, y float64) + func (dc *Canvas) TransformPoint(x, y float64) (tx, ty float64) + func (dc *Canvas) Translate(x, y float64) + type Character struct + Advance [2]int + Alpha *image.Alpha + Encoding rune + LowerPoint [2]int + Name string + type Face struct + Font *Font + func (f *Face) Close() error + func (f *Face) Glyph(dot fixed.Point26_6, r rune) (dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ...) + func (f *Face) GlyphAdvance(r rune) (advance fixed.Int26_6, ok bool) + func (f *Face) GlyphBounds(r rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool) + func (f *Face) Kern(_, _ rune) fixed.Int26_6 + func (f *Face) Metrics() font.Metrics + type Font struct + Ascent int + BPP int + CapHeight int + CharMap map[rune]*Character + Characters []Character + DPI [2]int + DefaultChar rune + Descent int + Encoding string + Name string + PixelSize int + Size int + XHeight int + func LoadFont(data []byte) (*Font, error) + func MustLoadFont(data []byte) *Font + func (f *Font) NewFace() font.Face + type Matrix struct + X0 float64 + XX float64 + XY float64 + Y0 float64 + YX float64 + YY float64 + func Identity() Matrix + func Rotate(angle float64) Matrix + func Scale(x, y float64) Matrix + func Shear(x, y float64) Matrix + func Translate(x, y float64) Matrix + func (a Matrix) Multiply(b Matrix) Matrix + func (a Matrix) Rotate(angle float64) Matrix + func (a Matrix) Scale(x, y float64) Matrix + func (a Matrix) Shear(x, y float64) Matrix + func (a Matrix) TransformPoint(x, y float64) (tx, ty float64) + func (a Matrix) TransformVector(x, y float64) (tx, ty float64) + func (a Matrix) Translate(x, y float64) Matrix + type PaletteLookup map[PaletteName]color.Palette + type PaletteName string