Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContent ¶
FromContent encodes the SVG file content as IconVG.
Types ¶
type ConverterOptions ¶
type ConverterOptions struct { // OutputSize is the size of the IconVG output image. OutputSize float32 // ExcludePath is a list of paths to exclude from the IconVG image. ExcludePath []Path }
ConverterOptions contains options for the SVG to IconVG converter.
type Option ¶
type Option func(*ConverterOptions)
Option is a function that configures a ConverterOptions.
func WithExcludePath ¶
WithExcludePath sets the list of paths to exclude from the IconVG image.
func WithOutputSize ¶
WithOutputSize sets the size of the IconVG image.
type SVG ¶
type SVG struct { Width float32 `xml:"width,attr"` Height float32 `xml:"height,attr"` ViewBox ViewBox `xml:"viewBox,attr"` Paths []Path `xml:"path"` // Some of the SVG files contain <circle> elements, not just <path> // elements. IconVG doesn't have circles per se. Instead, we convert such // circles to be paired arcTo commands, tacked on to the first path. // // In general, this isn't correct if the circles and the path overlap, but // that doesn't happen in the specific case of the Material Design icons. Circles []Circle `xml:"circle"` }
Click to show internal directories.
Click to hide internal directories.