[cairo] Thick paths redux [Hack solution]

donn donn.ingle at gmail.com
Fri Feb 19 20:07:55 PST 2010


Hello list,
I include my python code for the solution I came up with. It took some 
googling and an eventual helpful answer on Stackoverflow.

http://stackoverflow.com/questions/133897/how-do-you-find-a-point-a-given-perpendicular-distance-from-a-line

The task:
Given a curve of 1px thickness, get a series of points around it such 
that they are all 'thickness' away from the curve. This is a kind of 
stroke-to-path thang.

I attach the relevant function, not the entire mess which I am still 
hacking on.

HTH,
\d

-- 
Fonty Python and Things! -- http://otherwise.relics.co.za/wiki/Software
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thick_path_solution.py
Type: text/x-python
Size: 2397 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20100220/90377f04/attachment.py 


More information about the cairo mailing list