Versions in this module Expand all Collapse all v0 v0.2.4 Aug 24, 2026 v0.2.3 Aug 24, 2026 v0.2.2 Aug 24, 2026 v0.2.1 Aug 23, 2026 v0.2.0 Aug 23, 2026 Changes in this version + const StrokeSubPixels type GlyphKey + DashCap Cap + EndCap Cap + Join Join + MiterLimit float32 + StartCap Cap + Stroked bool + Width float32 v0.1.0 Aug 22, 2026 Changes in this version + const DefaultFlatness + const SubPixels + var EmptyRect = Rect + var Identity = Matrix + var InfiniteRect = Rect + func Blur(p *Pixmap, sigmaX, sigmaY float32) + type BlendMode int + const BlendColor + const BlendColorBurn + const BlendColorDodge + const BlendDarken + const BlendDifference + const BlendExclusion + const BlendHardLight + const BlendHue + const BlendLighten + const BlendLuminosity + const BlendMultiply + const BlendNormal + const BlendOverlay + const BlendSaturation + const BlendScreen + const BlendSoftLight + func (b BlendMode) Separable() bool + func (b BlendMode) String() string + type Blitter interface + BlitCover func(x, y int, cover []uint8) + BlitSolid func(x, y, w int, alpha uint8) + type Cap int + const CapButt + const CapRound + const CapSquare + const CapTriangle + type FillRule int + const EvenOdd + const NonZero + type Flattener interface + Close func() + LineTo func(x, y float32) + MoveTo func(x, y float32) + type GlyphCache struct + func NewGlyphCache(max int) *GlyphCache + func (c *GlyphCache) Clear() + func (c *GlyphCache) Get(k GlyphKey) *Pixmap + func (c *GlyphCache) Put(k GlyphKey, mask *Pixmap) + type GlyphKey struct + A float32 + B float32 + C float32 + D float32 + Font any + GID int32 + SubX uint8 + SubY uint8 + type Gradient struct + func NewGradient(s GradientSpec) *Gradient + func (g *Gradient) Opaque() bool + func (g *Gradient) Shade(x, y, w int, span []uint8) + func (g *Gradient) ShadeRow(dst *Pixmap, x, y, w int) + type GradientSpec struct + A []uint8 + C0 Point + C1 Point + Ext0 bool + Ext1 bool + LUT []uint8 + Matrix Matrix + N int + R0 float32 + R1 float32 + Radial bool + type Join int + const JoinBevel + const JoinMiter + const JoinRound + type Matrix struct + A float32 + B float32 + C float32 + D float32 + E float32 + F float32 + func Concat(m, n Matrix) Matrix + func Rotate(deg float64) Matrix + func Scale(x, y float32) Matrix + func Translate(x, y float32) Matrix + func (m Matrix) Apply(p Point) Point + func (m Matrix) ApplyRect(r Rect) Rect + func (m Matrix) Det() float32 + func (m Matrix) Expansion() float32 + func (m Matrix) Invert() (Matrix, bool) + func (m Matrix) MaxExpansion() float32 + func (m Matrix) UnapplyRect(r Rect) (Rect, bool) + type Model interface + Components func() int + FromRGB func(dst, src []uint8) + ToRGB func(dst, src []uint8) + var ModelCMYK Model = cmykModel{} + var ModelGray Model = grayModel{} + var ModelRGB Model = rgbModel{} + type Paint struct + Alpha uint8 + Clip *Pixmap + Color []uint8 + type Path struct + func (p *Path) Append(q *Path) + func (p *Path) AsRect(m Matrix) (Rect, bool) + func (p *Path) Bounds(m Matrix) Rect + func (p *Path) Clone() *Path + func (p *Path) Close() + func (p *Path) Current() Point + func (p *Path) CurveTo(x1, y1, x2, y2, x3, y3 float32) + func (p *Path) CurveToV(x2, y2, x3, y3 float32) + func (p *Path) CurveToY(x1, y1, x3, y3 float32) + func (p *Path) Flatten(m Matrix, tol float32, f Flattener) + func (p *Path) IsEmpty() bool + func (p *Path) LineTo(x, y float32) + func (p *Path) MoveTo(x, y float32) + func (p *Path) Rect(x, y, w, h float32) + func (p *Path) Reset() + func (p *Path) Start() Point + func (p *Path) StrokeBounds(s *Stroke, m Matrix) Rect + func (p *Path) Transform(m Matrix) *Path + func (p *Path) Walk(w Walker) + type Pixmap struct + Alpha bool + H int + Model Model + N int + Samples []uint8 + Stride int + W int + X int + Y int + func NewMask(w, h int) *Pixmap + func NewPixmap(model Model, w, h int, alpha bool) *Pixmap + func (p *Pixmap) BlendOver(src *Pixmap, alpha uint8, mode BlendMode) + func (p *Pixmap) Blitter(paint Paint) Blitter + func (p *Pixmap) Bounds() Rect + func (p *Pixmap) Clear() + func (p *Pixmap) ClearWhite() + func (p *Pixmap) Comps() int + func (p *Pixmap) Coverage() *Pixmap + func (p *Pixmap) DrawMask(mask *Pixmap, paint Paint) + func (p *Pixmap) FillRect(x0, y0, x1, y1 int, paint Paint) + func (p *Pixmap) FillTriangle(v0, v1, v2 Vertex) + func (p *Pixmap) KnockoutOver(src *Pixmap, alpha uint8) + func (p *Pixmap) Mask(luminosity bool, table *[256]uint8) *Pixmap + func (p *Pixmap) MaskBlitter() Blitter + func (p *Pixmap) MulImage(src *Pixmap, inv Matrix) + func (p *Pixmap) MulMask(m *Pixmap) + func (p *Pixmap) Row(y int) []uint8 + func (p *Pixmap) Subsample(n int) *Pixmap + type Point struct + X float32 + Y float32 + type Rasterizer struct + func NewRasterizer(w, h int) *Rasterizer + func (r *Rasterizer) AddPath(p *Path, m Matrix) + func (r *Rasterizer) Bounds() (x0, y0, x1, y1 int) + func (r *Rasterizer) Close() + func (r *Rasterizer) Fill(dst *Pixmap, rule FillRule, paint Paint) + func (r *Rasterizer) FillImage(dst, src *Pixmap, inv Matrix, paint Paint, smooth bool) + func (r *Rasterizer) FillShader(dst *Pixmap, rule FillRule, sh Shader, paint Paint) + func (r *Rasterizer) LineTo(x, y float32) + func (r *Rasterizer) MoveTo(x, y float32) + func (r *Rasterizer) Reset() + func (r *Rasterizer) SetClip(box Rect) + func (r *Rasterizer) SetFlatness(tol float32) + func (r *Rasterizer) SetSize(w, h int) + func (r *Rasterizer) Sweep(rule FillRule, b Blitter) + type Rect struct + X0 float32 + X1 float32 + Y0 float32 + Y1 float32 + func (r Rect) AddPoint(p Point) Rect + func (r Rect) Contains(s Rect) bool + func (r Rect) Intersect(s Rect) Rect + func (r Rect) IsEmpty() bool + func (r Rect) IsInfinite() bool + func (r Rect) Normalized() Rect + func (r Rect) Outer() (x0, y0, x1, y1 int) + func (r Rect) Union(s Rect) Rect + type RowShader interface + ShadeRow func(dst *Pixmap, x, y, w int) + type Shader interface + Shade func(x, y, w int, span []uint8) + type Shrinker struct + func NewMaskShrinker(w, h, n int) *Shrinker + func NewShrinker(model Model, w, h int, alpha bool, n int) *Shrinker + func (s *Shrinker) Commit() + func (s *Shrinker) Pixmap() *Pixmap + func (s *Shrinker) Row() []uint8 + type Stroke struct + Dash []float32 + DashCap Cap + DashPhase float32 + EndCap Cap + Join Join + MiterLimit float32 + StartCap Cap + Width float32 + func DefaultStroke() Stroke + func (s *Stroke) Clone() *Stroke + func (s *Stroke) Outline(p *Path, scale float32) *Path + func (s *Stroke) OutlineInto(dst *Path, p *Path, scale float32) *Path + func (s *Stroke) SetCaps(c Cap) + type Vertex struct + Color [4]uint8 + X float32 + Y float32 + type Walker interface + Close func() + CurveTo func(x1, y1, x2, y2, x3, y3 float32) + LineTo func(x, y float32) + MoveTo func(x, y float32)