svg

package
v0.0.0-...-dd6b452 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Colorize

func Colorize(src []byte, clr color.Color) []byte

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL