Documentation
¶
Index ¶
- Constants
- func CloneIcons(path string, url string)
- func GenerateAdditionalIcons(path string, subset map[string]string, hook func(newBase string, color string))
- func GenerateAdditionalIconsSVG(path string, sizes []int, subset map[string]string, ...)
- func GenerateIconPNG(path string, text string)
- func GenerateIconSVG(path string, text string, sizes []int) string
- func GenerateIconsPNG(path, url string, hook func(newBase string, color string))
- func GenerateIconsSVG(path string, url string, sizes []int, coloredIcons map[string][]string, ...)
- func GenerateSizes(newBase string, newPath string)
- func GenerateSizesSVG(newBase string, newPath string, color string, sizes []int)
- type MaterialIconSVG
- type Path
Constants ¶
View Source
const ( DefaultSvgURL = "https://github.com/dreadl0ck/material-icons.git" DefaultPngURL = "https://github.com/dreadl0ck/material-icons-png.git" )
Variables ¶
This section is empty.
Functions ¶
func CloneIcons ¶
func GenerateAdditionalIcons ¶
func GenerateAdditionalIcons(path string, subset map[string]string, hook func(newBase string, color string))
this will generate a subset of the icons with a different imgType call after generateIcons, the image repo needs to be present
func GenerateIconPNG ¶
func GenerateIconsPNG ¶
func GenerateIconsSVG ¶
func GenerateSizes ¶
Types ¶
type MaterialIconSVG ¶
type MaterialIconSVG struct {
XMLName xml.Name `xml:"svg"`
Xmlns string `xml:"xmlns,attr"`
Width string `xml:"width,attr"`
Height string `xml:"height,attr"`
ViewBox string `xml:"viewBox,attr"`
Paths []Path `xml:"path"`
Rect *struct {
Text string `xml:",chardata"`
X string `xml:"x,attr"`
Y string `xml:"y,attr"`
Width string `xml:"width,attr"`
Height string `xml:"height,attr"`
Stroke string `xml:"stroke,attr"`
StrokeWidth string `xml:"stroke-width,attr"`
Fill string `xml:"fill,attr"`
} `xml:"rect,omitempty"`
Text *struct {
Text string `xml:",chardata"`
X string `xml:"x,attr"`
Y string `xml:"y,attr"`
DominantBaseline string `xml:"dominant-baseline,attr"`
TextAnchor string `xml:"text-anchor,attr"`
} `xml:"text,omitempty"`
}
MaterialIconSVG models the material icon svg structure
func (*MaterialIconSVG) ResizeSVG ¶
func (s *MaterialIconSVG) ResizeSVG(width, height int)
Click to show internal directories.
Click to hide internal directories.