package svg

import "fyne.io/fyne/v2/internal/svg"

Index

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)

Source Files

svg.go

Version
v2.5.1-rc1
Published
Aug 19, 2024
Platform
linux/amd64
Imports
15 packages
Last checked
2 hours ago

Tools for package owners.