svg

package
v2.0.0-...-96ae00f Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: BSD-3-Clause Imports: 15 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 IsFileSVG

func IsFileSVG(path string) bool

func IsResourceSVG

func IsResourceSVG(res fyne.Resource) bool

IsResourceSVG checks if the resource is an SVG or not.

Types

type Config

type Config struct {
	Width  int
	Height int
	Aspect float32
}

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(stream io.Reader) (*Decoder, error)

func (*Decoder) Config

func (d *Decoder) Config() Config

func (*Decoder) Draw

func (d *Decoder) Draw(width, height int) (*image.NRGBA, error)

Jump to

Keyboard shortcuts

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