[cairo] Path following

Behdad Esfahbod behdad at behdad.org
Wed Dec 12 06:07:19 PST 2007


On Wed, 2007-12-12 at 08:56 -0500, Carl Worth wrote:
> 
> If you want regularly-spaced positions along the path, then you'll
> need to sum up the length of each segment and interpolate to the
> desired position.

You can find code doing that here:

http://svn.gnome.org/viewvc/pango/trunk/examples/cairotwisted.c?view=markup

Or checkout Pango and it's under examples/cairotwisted.c  Give it a run.


-- 
behdad
http://behdad.org/

...very few phenomena can pull someone out of Deep Hack Mode, with two
noted exceptions: being struck by lightning, or worse, your *computer*
being struck by lightning.  -- Matt Welsh



More information about the cairo mailing list