phoenix_title wx.svg._nanosvg

NanoSVG is a “simple stupid single-header-file SVG parser” from https://github.com/memononen/nanosvg. The output of the parser is a collection of data structures representing cubic bezier shapes.

NanoSVG supports a wide range of SVG features. The library is well suited for anything from rendering scalable icons in your editor application to prototyping a game. There is not a full coverage of the SVG specification, however the features needed for typical icons or even more advanced vector images are present.

The shapes in the SVG images are transformed by the viewBox and converted to specified units. That is, you should get the same looking data as you designed in your favorite app.

NanoSVG can return the paths in few different units. For example if you want to render an image, you may choose to get the paths in pixels, or if you are feeding the data into a CNC-cutter, you may want to use millimeters.

The units passed to NanoSVG should be one of: ‘px’, ‘pt’, ‘pc’ ‘mm’, ‘cm’, or ‘in’. DPI (dots-per-inch) controls how the unit conversion is done.

If you don’t know or care about the units stuff, “px” and 96 should get you going.

This module implements a Cython-based wrapper for the NanoSVG code, providing access to the parsed SVG data as a nested collection of objects and properties. Note that these classes are essentially read-only. There is no support (yet?) for manipulating the SVG shape info in memory.

class_summary Classes Summary

SVGfillRule

An enumeration.

SVGflags

An enumeration.

SVGgradient

A gradient is a method used to fade from one color to another, either

SVGgradientStop

A Gradient stop is an offset and a color, which is used when drawing gradients.

SVGimageBase

A SVGimageBase can be created either from an SVG file or from an in-memory

SVGlineCap

An enumeration.

SVGlineJoin

An enumeration.

SVGpaint

This class defines how to fill or stroke a shape when rendering the SVG

SVGpaintType

An enumeration.

SVGpath

An SVGpath is essentially just a collection of bezier curves, defined by a

SVGshape

SVGshape is a set of attributes describing how to draw one shape in the SVG,

SVGspreadType

An enumeration.