Versions in this module Expand all Collapse all v0 v0.0.2 Mar 7, 2023 v0.0.1 Mar 5, 2023 Changes in this version + var Default = DPI + var ZeroPoint = NewPoint(0, 0) + type Circle struct + CenterX float64 + CenterY float64 + Radius float64 + func (c *Circle) Draw() (sdf.SDF2, error) + type ClosePath struct + func NewClosePath() *ClosePath + func (m *ClosePath) DrawTo(b *sdf.Bezier) + func (m *ClosePath) MM(dpi DPI) + func (m *ClosePath) Matrix(matrix *Matrix) + type CubicBezier struct + End Point + Mid Point + Start Point + func NewCubicBezier(start, mid, end Point) *CubicBezier + func (cb *CubicBezier) DrawTo(b *sdf.Bezier) + func (cb *CubicBezier) MM(dpi DPI) + func (cb *CubicBezier) Matrix(matrix *Matrix) + type DPI struct + func NewDPI(dpi float64) DPI + func NewDPIWithSize(pixel, mm float64) DPI + func (d DPI) DPI() float64 + func (d DPI) MM(pixel float64) float64 + func (d DPI) Pixel(mm float64) float64 + func (d DPI) String() string + type Drawable interface + DrawTo func(b *sdf.Bezier) + MM func(dpi DPI) + Matrix func(matrix *Matrix) + type Graphic struct + Circles []*Circle + Graphics []*Graphic + ID string + Matrix *Matrix + Paths []*Path + Rects []*Rect + func (gr *Graphic) Draw() (sdf.SDF2, error) + func (gr *Graphic) Find(id string) *Graphic + func (gr *Graphic) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type LineTo struct + Point Point + func NewLineTo(p Point) *LineTo + func (l *LineTo) DrawTo(b *sdf.Bezier) + func (l *LineTo) MM(dpi DPI) + func (l *LineTo) Matrix(matrix *Matrix) + type Matrix struct + A float64 + B float64 + C float64 + D float64 + E float64 + F float64 + func NewMatrix(a, b, c, d, e, f float64) *Matrix + func (m *Matrix) Dot(matrix *Matrix) *Matrix + type MoveTo struct + Point Point + func NewMoveTo(p Point) *MoveTo + func (m *MoveTo) DrawTo(b *sdf.Bezier) + func (m *MoveTo) MM(dpi DPI) + func (m *MoveTo) Matrix(matrix *Matrix) + type NotFoundError string + func (err NotFoundError) Error() string + type Option struct + DPI DPI + type Path struct + Drawables []Drawable + Stroke string + StrokeLineJoin string + StrokeLinecap string + func (pa *Path) ToBeziers(m *Matrix) ([]*sdf.Bezier, error) + func (pa *Path) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type Point struct + X float64 + Y float64 + func NewPoint(x float64, y float64) Point + func (pt Point) Add(point Point) Point + func (pt Point) MM(dpi DPI) Point + func (pt Point) Matrix(m *Matrix) Point + type Rect struct + Height float64 + Width float64 + X float64 + Y float64 + func (r *Rect) Draw() (sdf.SDF2, error) + type SVG struct + Fill string + Graphics []*Graphic + Height string + ViewBox string + Width string + XMLNS string + func New(r io.Reader, option *Option) (*SVG, error) + func (svg *SVG) Find(id string) (*Graphic, error)