Versions in this module Expand all Collapse all v1 v1.0.0 Jul 24, 2025 Changes in this version + var NewImageRenderer func(size math32.Vector2) render.Renderer + var NewSVGRenderer func(size math32.Vector2) render.Renderer + var NewSourceRenderer func(size math32.Vector2) render.Renderer + func ClampBorderRadius(r sides.Floats, w, h float32) sides.Floats + func EdgeBlurFactors(sigma, radiusFactor float32) []float32 + func RenderToImage(pc *Painter) image.Image + func RenderToSVG(pc *Painter) []byte + type Painter struct + func NewPainter(size math32.Vector2) *Painter + func (pc *Painter) ArcTo(rx, ry, rot float32, large, sweep bool, x, y float32) + func (pc *Painter) BeveledRectangle(x, y, w, h, r float32) + func (pc *Painter) BlitBox(pos, size math32.Vector2, img image.Image) + func (pc *Painter) BlurBox(pos, size math32.Vector2, blurRadius float32) + func (pc *Painter) Border(x, y, w, h float32, bs styles.Border) + func (pc *Painter) BoundingBox(minX, minY, maxX, maxY float32) image.Rectangle + func (pc *Painter) BoundingBoxFromPoints(points []math32.Vector2) image.Rectangle + func (pc *Painter) Circle(cx, cy, r float32) + func (pc *Painter) CircularArc(x, y, r, theta0, theta1 float32) + func (pc *Painter) Clear() + func (pc *Painter) Close() + func (pc *Painter) CubeTo(cp1x, cp1y, cp2x, cp2y, x, y float32) + func (pc *Painter) Draw() + func (pc *Painter) DrawBox(pos, size math32.Vector2, img image.Image, op draw.Op) + func (pc *Painter) DrawImage(src image.Image, rect image.Rectangle, srcStart image.Point, op draw.Op) + func (pc *Painter) DrawImageAnchored(src image.Image, x, y, ax, ay float32) + func (pc *Painter) DrawImageScaled(src image.Image, x, y, w, h float32) + func (pc *Painter) DrawText(tx *shaped.Lines, pos math32.Vector2) + func (pc *Painter) Ellipse(cx, cy, rx, ry float32) + func (pc *Painter) EllipticalArc(x, y, rx, ry, rot, theta0, theta1 float32) + func (pc *Painter) FillBox(pos, size math32.Vector2, img image.Image) + func (pc *Painter) Grid(x, y, w, h float32, nx, ny int, r float32) + func (pc *Painter) Line(x1, y1, x2, y2 float32) + func (pc *Painter) LineTo(x, y float32) + func (pc *Painter) MoveTo(x, y float32) + func (pc *Painter) Polygon(points ...math32.Vector2) + func (pc *Painter) PolygonPx(points ...math32.Vector2) + func (pc *Painter) Polyline(points ...math32.Vector2) + func (pc *Painter) PolylinePx(points ...math32.Vector2) + func (pc *Painter) QuadTo(cpx, cpy, x, y float32) + func (pc *Painter) Rectangle(x, y, w, h float32) + func (pc *Painter) RegularPolygon(x, y float32, n int, r float32, up bool) + func (pc *Painter) RegularStarPolygon(x, y float32, n, d int, r float32, up bool) + func (pc *Painter) RoundedRectangle(x, y, w, h, r float32) + func (pc *Painter) RoundedRectangleSides(x, y, w, h float32, r sides.Floats) + func (pc *Painter) RoundedShadowBlur(blurSigma, radiusFactor, x, y, w, h float32, r sides.Floats) + func (pc *Painter) SetMask(mask *image.Alpha) error + func (pc *Painter) SetPixel(x, y int) + func (pc *Painter) StandardBox(st *styles.Style, pos math32.Vector2, size math32.Vector2, pabg image.Image) + func (pc *Painter) StarPolygon(x, y float32, n int, R, r float32, up bool) + func (pc *Painter) Transform() math32.Matrix2 + func (pc *Painter) Triangle(x, y, r float32) + type State struct + Path ppath.Path + Render render.Render + Size math32.Vector2 + Stack []*render.Context + func (rs *State) Context() *render.Context + func (rs *State) Init(sty *styles.Paint, size math32.Vector2) + func (rs *State) PopContext() + func (rs *State) PushContext(sty *styles.Paint, bounds *render.Bounds) *render.Context + func (rs *State) RenderDone() render.Render