Documentation
¶
Index ¶
- Variables
- func Parse(mdicons string, pkg string, genData, genDataTest bool, outSize float32) error
- func ParsePath(enc ivg.Destination, p *Path, adjs map[float32]uint8, size float32, ...) error
- func ParsePathData(enc ivg.Destination, pathData string, adj uint8, size float32, offset f32.Vec2, ...) error
- type Circle
- type Path
- type SVG
- type Statistics
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSkip = errors.New("skipping SVG to IconVG conversion")
ErrSkip is returned to deliberately skip generating an icon.
When manually debugging one particular icon, it can be useful to add something like:
if baseName != "check_box" { return errSkip }
at the top of func ParseFile.
Functions ¶
Types ¶
type SVG ¶
type SVG struct { Width float32 `xml:"width,attr"` Height float32 `xml:"height,attr"` ViewBox string `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"` }
type Statistics ¶
type Statistics struct { VarNames []string Failures []string TotalFiles int TotalIVGBytes int TotalPNG24Bytes int TotalPNG48Bytes int TotalSVGBytes int }
func (Statistics) Add ¶
func (s Statistics) Add(other Statistics) Statistics
Click to show internal directories.
Click to hide internal directories.