Documentation
¶
Overview ¶
Package usvg is a port of the subset of usvg 0.46 (with svgtypes, simplecss and kurbo's arc code) that turns an SVG document into the tree of groups and paths the icon transform walks: element and attribute resolution (presentation attributes, CSS, style, inherit), use/switch/nested svg expansion, markers, shapes to paths, and fill/stroke resolution. Rendering-only features (text, images, filters, masks, clip geometry) are resolved only as far as they decide whether an element is kept.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrInvalidSize = errors.New("SVG has an invalid size")
)
Error kinds, with usvg's messages.
Functions ¶
This section is empty.
Types ¶
type ParseError ¶
type ParseError struct{ Cause error }
ParseError is usvg's Error::ParsingFailed.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
func (*ParseError) Unwrap ¶
func (e *ParseError) Unwrap() error
type Stroke ¶
type Stroke struct {
Width float32
MiterLimit float32
LineCap skpath.LineCap
LineJoin skpath.LineJoin
DashArray []float32 // nil for a solid stroke
DashOffset float32
}
Stroke is a resolved stroke.