inkscape

package
v0.0.0-...-e8051b5 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// the name/path for the inkscape CLI command
	// If left empty, the default inkscape command will be used.
	Command string
}

Client is an implementation of an Inkscape CLI wrapper. It assumes a locally available inkscape command can be run.

func (Client) IsAvailable

func (c Client) IsAvailable() bool

IsAvailable checks whether the inkscape command is locally available. Provides feature detection for a sort of progressive enhancement.

func (Client) SVGStringToPNG

func (c Client) SVGStringToPNG(svgText string, width, height int) (image.Image, error)

SVGStringToPNG rasterizes the provided SVG text to PNG format.

func (Client) SVGToPNG

func (c Client) SVGToPNG(path string, width, height int) (image.Image, error)

SVGToPNG rasterizes the SVG at the specified path to PNG format.

Jump to

Keyboard shortcuts

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