README.md

 1# oksvg
 2oksvg is a rasterizer for a partial implementation of the SVG2.0 specification in golang.
 3
 4Although 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.
 5
 6oksvg uses the [rasterx](https://github.com/srwiley/rasterx) rasterizer package which implements full SVG2.0 path functions, including the newer 'arc' join-mode.
 7
 8![arcs and caps](doc/TestShapes.png)
 9
10### Extra non-standard features.
11
12In 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.
13
14#### Rasterizations of SVG to PNG from creative commons 3.0 sources.
15
16Example renderings of unedited open source SVG files by oksvg and rasterx are shown below.
17
18Thanks to [Freepik](http://www.freepik.com) from [Flaticon](https://www.flaticon.com/)
19Licensed by [Creative Commons 3.0](http://creativecommons.org/licenses/by/3.0/) for the example icons shown below, and also used as test icons in the testdata folder.
20
21![Jupiter](doc/jupiter.png)
22
23![lander](doc/lander.png)
24
25![mountains](doc/mountains.png)
26
27![bus](doc/school-bus.png)
28
29### Non-standard library dependencies
30oksvg requires the following imports which are not included in the go standard library:
31
32* golang.org/x/net/html/charset
33* golang.org/x/image/colornames
34* golang.org/x/image/math/fixed
35
36These can be included in your gopath by the following 'get' commands:
37
38* "go get golang.org/x/image/math/fixed"
39* "go get golang.org/x/image/colornames"
40* "go get golang.org/x/net/html/charset"
41
42oksvg also requires the user to get or clone into the workspace the rasterx package located here:
43
44* github.com/srwiley/rasterx
45
46
47
48
49