[cairo] Drawing an arrow

Stefan Salewski mail at ssalewski.de
Tue Nov 23 09:09:27 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.
> Thanks
> 

Can you imagine building an arrow of 3 or more line segments?
I guess there will not be an arrow primitive in cairo, because arrows
can have so many shapes. But it is easy to define your own, adapted to
your desire.




More information about the cairo mailing list