[cairo] Drawing an arrow
jeremy at emperorlinux.com
Wed Nov 24 20:42:45 PST 2010
On Tue, 2010-11-23 at 16:27 +0000, necko necko wrote:
> A set of 2D coordinates needs be connected by lines, but some of these
> lines need be arrows;
> meaning, the sequence
> cairo_move_to (cr, A.x, A.y);
> cairo_line_to (cr, B.x, B.y);
> that draws a line from A to B, needs to be replaced with an arrow from
> A to B.
> Any help on how to achieve this is highly welcome.
It turns out, Behdad has already provided some code that does something
very similar to this! I include the code in Cairocks, the function is
called "map_path_onto" and I got it from some of his code... somewhere.
Please see the attached image for a demonstration. I only use a simple
arc as the path, but you could just as well use anything.
> cairo mailing list
> cairo at cairographics.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 11433 bytes
Desc: not available
More information about the cairo