oksvg

module
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

README

SVG parser and renderer, written in Go (experimental)

This package is a fork of github.com/srwiley/oksvg: most of the code is copied from it and the core logic is the same.

However, it adds the possiblity of using differents rendering target, by splitting the parsing and processing of the SVG file from its actual drawing.

Of course, you can still raster an icon into a PNG image (using svgraster.RasterSVGIconToImage, built on github.com/srwiley/rasterx), but you can also use a PDF backend (using svgpdf.RenderSVGIconToPDF, built on github.com/phpdave11/gofpdf). Be aware that the PDF backend is still experimental and is missing features like miter limit control and gradient support.

Other backends should be easy to add, by implementing the oksvg.Driver interface.

See Godoc for more details.

Directories

Path Synopsis
Provides parsing and rendering of SVG images.
Provides parsing and rendering of SVG images.
Package svgpdf implements a PDF backend to render SVG images, by wrapping github.com/benoitkugler/pdf TODO: Some features are missing: MiterLimit and Gradient.
Package svgpdf implements a PDF backend to render SVG images, by wrapping github.com/benoitkugler/pdf TODO: Some features are missing: MiterLimit and Gradient.
Implements a raster backend to render SVG images, by wrapping github.com/srwiley/rasterx.
Implements a raster backend to render SVG images, by wrapping github.com/srwiley/rasterx.

Jump to

Keyboard shortcuts

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