All Projects → srwiley → oksvg

srwiley / oksvg

Licence: BSD-3-Clause license
Partial implementation of SVG 2.0 specification in golang.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to oksvg

jquery-svg-convert
Convert .svg images to code on the fly with jQuery
Stars: ✭ 30 (-73.21%)
Mutual labels:  svg-path
wave-maker
Wave maker based on SVG Arcs
Stars: ✭ 22 (-80.36%)
Mutual labels:  svg-path
Vectalign
Tool for create complex morphing animations using VectorDrawables (allows morphing between any pair of SVG images)
Stars: ✭ 2,047 (+1727.68%)
Mutual labels:  svg-path
Svgo
Go Language Library for SVG generation
Stars: ✭ 1,779 (+1488.39%)
Mutual labels:  svg-path
Rough
Create graphics with a hand-drawn, sketchy, appearance
Stars: ✭ 16,472 (+14607.14%)
Mutual labels:  svg-path
svg-path-outline
Create an outline surrounding an SVG path
Stars: ✭ 56 (-50%)
Mutual labels:  svg-path
MROGeometry
♊️ Mirror of http://purl.mro.name/ios/MROGeometry | √ C and Objective C math and geometry helpers
Stars: ✭ 58 (-48.21%)
Mutual labels:  svg-path
convertPath
A node lib to convert svg shape elements into path svg elements.
Stars: ✭ 94 (-16.07%)
Mutual labels:  svg-path
path-that-svg
Path that SVG!
Stars: ✭ 45 (-59.82%)
Mutual labels:  svg-path

oksvg

oksvg is a rasterizer for a partial implementation of the SVG2.0 specification in golang.

Although many SVG elements will not be read by oksvg, it is good enough to faithfully produce thousands, but certainly not all, SVG icons available both for free and commercially. A list of valid and invalid elements is in the doc folder.

oksvg uses the rasterx rasterizer package which implements full SVG2.0 path functions, including the newer 'arc' join-mode.

arcs and caps

Extra non-standard features.

In addition to 'arc' as a valid join mode value, oksvg also allows 'arc-clip' which is the arc analog of miter-clip and some extra capping and gap values. It can also specify different capping functions for line starts and ends.

Rasterizations of SVG to PNG from creative commons 3.0 sources.

Example renderings of unedited open source SVG files by oksvg and rasterx are shown below.

Thanks to Freepik from Flaticon Licensed by Creative Commons 3.0 for the example icons shown below, and also used as test icons in the testdata folder.

Jupiter

lander

mountains

bus

Non-standard library dependencies

oksvg requires the following imports which are not included in the go standard library:

  • golang.org/x/net/html/charset
  • golang.org/x/image/colornames
  • golang.org/x/image/math/fixed

These can be included in your gopath by the following 'get' commands:

  • "go get golang.org/x/image/math/fixed"
  • "go get golang.org/x/image/colornames"
  • "go get golang.org/x/net/html/charset"

oksvg also requires the user to get or clone into the workspace the rasterx package located here:

  • github.com/srwiley/rasterx
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].