svgraster

package
v0.0.0-...-1380579 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Implements a raster backend to render SVG images, by wrapping github.com/srwiley/rasterx.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RasterSVGIconToImage

func RasterSVGIconToImage(icon io.Reader) (*image.RGBA, error)

RasterSVGIconToImage uses a default scanner rasterx.ScannerGV instance to renderer the icon into an image and return it.

Types

type Driver

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

func NewDriver

func NewDriver(width, height int, scanner rasterx.Scanner) Driver

NewDriver returns a renderer with default values, which will raster into `scanner`.

func (Driver) SetupDrawers

func (rd Driver) SetupDrawers(willFill, willStroke bool) (f svgicon.Filler, s svgicon.Stroker)

Jump to

Keyboard shortcuts

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