Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Colorize ¶
Colorize creates a new SVG from a given one by replacing all fill colors by the given color.
func ToImage ¶
func ToImage(file io.Reader, width, height int, validateSize func(origW, origH int) bool) (*image.NRGBA, error)
ToImage reads an SVG from an io.Reader and renders it into an image.NRGBA using the requested width and height. The optional `validateSize` callback can be used to cancel the rendering depending on the SVG’s original size. In this case `nil` is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.