Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoInkScape = errors.New("inkscape not installed. inkscape (https://www.inkscape.org/) is needed to convert SVG files.")
View Source
var Log = func(args ...interface{}) {}
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
*Container `json:"-"`
AppIcon *ImageSet `json:"-"`
Info CatalogInfo `json:"info"`
}
func NewCatalog ¶
type CatalogInfo ¶
type Container ¶
func NewContainer ¶
type Group ¶
type Group struct {
*Container `json:"-"`
Info CatalogInfo `json:"info"`
Properties GroupProperties `json:"properties"`
}
type GroupProperties ¶
type GroupProperties struct {
ResourceTags
ProvidesNamespace bool `json:"provides-namespace"`
}
type Image ¶
type Image struct {
FileName string `json:"filename"`
Size string `json:"size,omitempty"`
GraphicsFeatureSet string `json:"graphics-feature-set,omitempty"`
Idiom string `json:"idiom,omitempty"`
Memory string `json:"memory,omitempty"`
Scale string `json:"scale,omitempty"`
Subtype string `json:"subtype,omitempty"`
ScreenWidth string `json:"screen-width,omitempty"`
WidthClass string `json:"width-class,omitempty"`
HeightClass string `json:"height-class,omitempty"`
Unassigned bool `json:"unassigned,omitempty"`
AlignmentInsets map[string]interface{} `json:"alignment-insets,omitempty"`
// contains filtered or unexported fields
}
type ImageSet ¶
type ImageSet struct {
Dir string `json:"-"`
Info CatalogInfo `json:"info"`
Properties ResourceTags
Images []Image `json:"images"`
}
func NewImageSet ¶
type InkScapeConverter ¶
type InkScapeConverter struct{}
type PhantomJSConverter ¶
type PhantomJSConverter struct {
// contains filtered or unexported fields
}
func StartPhantomJSConverter ¶
func StartPhantomJSConverter() (*PhantomJSConverter, error)
func (*PhantomJSConverter) Convert ¶
func (p *PhantomJSConverter) Convert(scale int, height, width float32, svgFile, pngFile string) error
func (*PhantomJSConverter) Stop ¶
func (p *PhantomJSConverter) Stop() error
type ResourceTags ¶
type ResourceTags struct {
OnDemandResourceTags []string `json:"on-demand-resource-tags,omitempty"`
}
type SVGConverter ¶
type SVGWalker ¶
type SVGWalker struct {
Converter SVGConverter
Catalog *Catalog
SanitizePaths bool
ForceUpdate bool
}
func (*SVGWalker) AddAppIconSVG ¶
Click to show internal directories.
Click to hide internal directories.