.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. module:: wx.svg._nanosvg

.. currentmodule:: wx.svg._nanosvg

.. highlight:: python



.. _wx.svg._nanosvg:

==========================================================================================================================================
|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
===============================

================================================================================ ================================================================================
:ref:`~wx.svg._nanosvg.SVGgradient`                                              A gradient is a method used to fade from one color to another, either
:ref:`~wx.svg._nanosvg.SVGgradientStop`                                          A Gradient stop is an offset and a color, which is used when drawing gradients.
:ref:`~wx.svg._nanosvg.SVGimageBase`                                             A SVGimageBase can be created either from an SVG file or from an in-memory
:ref:`~wx.svg._nanosvg.SVGpaint`                                                 This class defines how to fill or stroke a shape when rendering the SVG
:ref:`~wx.svg._nanosvg.SVGpath`                                                  An SVGpath is essentially just a collection of bezier curves, defined by a
:ref:`~wx.svg._nanosvg.SVGshape`                                                 SVGshape is a set of attributes describing how to draw one shape in the SVG,
================================================================================ ================================================================================


|


.. toctree::
   :maxdepth: 1
   :hidden:

   wx.svg._nanosvg.SVGgradient
   wx.svg._nanosvg.SVGgradientStop
   wx.svg._nanosvg.SVGimageBase
   wx.svg._nanosvg.SVGpaint
   wx.svg._nanosvg.SVGpath
   wx.svg._nanosvg.SVGshape



