Versions in this module Expand all Collapse all v0 v0.1.3 Sep 24, 2026 Changes in this version + const BackendCanvas + const BackendDraw2D + const BackendFGG + const BackendFTGG + const BackendGG + const BackendTinySkia + func BackendNames() []string + func BackendPluginPath(name string) string + func JoinNames(names []string) string + func RegisterBackend(name string, factory BackendFactory) error + func RegisterOrReplaceBackend(name string, factory BackendFactory) error + func RegisteredBackends() []string + type Backend interface + Raster func() *image.RGBA + type BackendFactory func(width, height float64, resolution geom.Resolution) (Backend, error) + func LookupBackend(name string) (BackendFactory, bool) + type CTColor struct + Gradient geom.Gradient + HasValue bool + Value color.RGBA + type DrawContext interface + ClearFill func() + ClearStroke func() + CopyStrokeToFill func() + CurrentMatrix func() geom.Matrix + DrawImage func(img image.Image, x, y float64, dpmm float64) + DrawPath func(x, y float64, p *geom.Path) + Pop func() + Push func() + RenderImage func(img image.Image, m geom.Matrix) + Rotate func(deg float64) + Scale func(sx, sy float64) + SetDashes func(offset float64, dashes ...float64) + SetFillColor func(c color.Color) + SetFillGradient func(g geom.Gradient) + SetFillPaint func(paint geom.Paint) + SetFillRule func(rule geom.FillRule) + SetStrokeCapper func(cap geom.Capper) + SetStrokeColor func(c color.Color) + SetStrokeGradient func(g geom.Gradient) + SetStrokeJoiner func(join geom.Joiner) + SetStrokePaint func(paint geom.Paint) + SetStrokeWidth func(w float64) + StrokeCapper func() geom.Capper + StrokeJoiner func() geom.Joiner + StrokeWidth func() float64 + TextPath func(p *geom.Path, x, y float64) + Translate func(x, y float64) + type FontEngine interface + FaceObject func(family FontFamily, object models.TextObject, fill *CTColor) FontFace + FallbackFontFamily func(id models.StRefID) string + HasLoadedEmbeddedFont func(id models.StRefID) bool + LoadFont func(id models.StRefID) (FontFamily, error) + RegisterPageGlyphs func(doc *parser.Document, page *parser.Page, content *models.PageContent) + RemoveFallbackFont func(family string) + RenderLock func(family FontFamily) *sync.Mutex + UseFallbackFont func(family string) error + type FontFace interface + DirectPath func(value string) *geom.Path + Fill func() geom.Paint + GlyphIndex func(r rune) uint16 + IsCFF func() bool + ShapedRun func(value string) TextRun + Size func() float64 + TextWidth func(value string) float64 + ToPath func(value string) *geom.Path + type FontFamily interface + Name func() string + type FontStyle int + const FontBlack + const FontBold + const FontExtraBold + const FontExtraLight + const FontItalic + const FontLight + const FontMedium + const FontRegular + const FontSemiBold + const FontThin + func (s FontStyle) CSS() int + func (s FontStyle) Italic() bool + func (s FontStyle) Weight() FontStyle + type PDFDocument interface + AddPage func(page VectorSurface) error + Close func() error + type PDFOptions struct + Compress bool + LossyImages bool + SubsetFonts bool + type SVGScene interface + Height func() float64 + Rasterize func(resolution geom.Resolution) image.Image + RenderVector func(ctx any, m geom.Matrix) bool + Width func() float64 + type TextRun interface + type VectorSurface interface + Height func() float64 + Rasterize func(resolution geom.Resolution) *image.RGBA + Width func() float64 + Write func(w io.Writer, format string) error