[cairo] more svg to cairo stuff

Donn donn.ingle at gmail.com
Wed Nov 7 12:01:35 PST 2007


I have it in mind to open an svg file, extract the path node and then turn 
that inscrutable "d" variable into a series of <pycairo commands> that will 
draw the same curve when run.

I found some neat code that will parse it and one looks like this:
[['M', [591.42857000000004, 835.21933000000001]], ['C', [861.36627999999996, 
952.71894999999995, 101.54696, -257.41887000000003, 100.0, 
146.64789999999999]], ['C', [98.453036999999995, 550.71466999999996, 
321.49086, 717.71970999999996, 591.42857000000004, 835.21933000000001]], 
['Z', []]]

Has anyone some idea about how I could turn that into a path? Keep in mind 
that when two bricks get together they are still smarter than I am :)

\d


More information about the cairo mailing list