Re: [Numpy-discussion] OT: How are SVG data converted into curves

2013-10-19 Thread Robert Kern
On Thu, Oct 17, 2013 at 12:06 AM, David Goldsmith d.l.goldsm...@gmail.com
wrote:

 Does anyone on this list know how Scalable Vector Graphics C, S, etc.
command data are translated into curves (i.e., pixel maps) and might you be
willing to answer some questions off-list?  Thanks!

It's not clear if you are asking about how the SVG path command are parsed,
normalized, and interpreted into a path composed of vector primitives or
how those paths actually get rendered into pixels. If the former, you may
be interested in the svg.path package which does exactly that (and only
that). Most vector drawing libraries (Agg, the painting API of any
reasonable GUI toolkit) will be able to implement those primitives to draw
onto a pixel image.

  https://pypi.python.org/pypi/svg.path/

--
Robert Kern
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] OT: How are SVG data converted into curves

2013-10-18 Thread Chris Barker
On Wed, Oct 16, 2013 at 4:23 PM, Daniele Nicolodi dani...@grinta.net wrote:

 the format is quite clearly documented. For the path data you can see
 http://www.w3.org/TR/SVG/paths.html. There are several open source
 libraries that implement SVG rendering, you may look at those to see how
 the rendering can be implemented in practice.

InkScape is particularly nice -- it's an open source desktop vector
drawing program, but can also be called on the command line and used
as a SVG renderer.

Someone wrote a minimal wxPython-based SVG renderer a while back --
not sure what happened to that.

-Chris




-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] OT: How are SVG data converted into curves

2013-10-16 Thread David Goldsmith
Does anyone on this list know how Scalable Vector Graphics C, S, etc.
command data are translated into curves (i.e., pixel maps) and might you be
willing to answer some questions off-list?  Thanks!

DG

PS: I receive numpy-discussion in digest mode, so if you qualify, please
reply directly to my email.  Thanks again.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] OT: How are SVG data converted into curves

2013-10-16 Thread Daniele Nicolodi
On 17/10/2013 01:06, David Goldsmith wrote:
 Does anyone on this list know how Scalable Vector Graphics C, S, etc.
 command data are translated into curves (i.e., pixel maps) and might you
 be willing to answer some questions off-list?  Thanks!

Hello,

the format is quite clearly documented. For the path data you can see
http://www.w3.org/TR/SVG/paths.html. There are several open source
libraries that implement SVG rendering, you may look at those to see how
the rendering can be implemented in practice.

Cheers,
Daniele



___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion