Versions in this module Expand all Collapse all v0 v0.1.0 Aug 27, 2026 Changes in this version + var BulgeQuarter = 0.4142135623730951 + type ACI int + const Blue + const ByBlock + const ByLayer + const Cyan + const Green + const Grey + const Magenta + const Red + const White + const Yellow + type Drawing struct + func New(opts ...Option) *Drawing + func (d *Drawing) AddLayer(name string, opts ...LayerOption) + func (d *Drawing) AddTextStyle(name, font string) + func (d *Drawing) Arc(layer string, centre Point, radius, startDeg, endDeg float64) + func (d *Drawing) Circle(layer string, centre Point, radius float64) + func (d *Drawing) Layers() []Layer + func (d *Drawing) Len() int + func (d *Drawing) Line(layer string, a, b Point) + func (d *Drawing) Polyline(layer string, verts []Vertex, closed bool) + func (d *Drawing) Save(path string) error + func (d *Drawing) Text(layer, s string, at Point, height float64, opts ...TextOption) + func (d *Drawing) TextStyles() []TextStyle + func (d *Drawing) WriteTo(w io.Writer) (int64, error) + type HAlign int + const Center + const Left + const Right + type Layer struct + Color ACI + Name string + type LayerOption func(*Layer) + func WithColor(c ACI) LayerOption + type Option func(*Drawing) + func WithUnits(u Units) Option + type Point struct + X float64 + Y float64 + type TextOption func(*entity) + func WithJustify(h HAlign, v VAlign) TextOption + func WithRotation(deg float64) TextOption + func WithStyle(name string) TextOption + type TextStyle struct + Font string + Name string + type Units int + const Centimeters + const Feet + const Inches + const Meters + const Millimeters + const Unitless + type VAlign int + const Baseline + const Bottom + const Middle + const Top + type Vertex struct + Bulge float64 + X float64 + Y float64