Re: Isn't there a way to pass multiple points to Cairo? (sorry for duplicate)
Jonathan Morton <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <1312192954.30761.555.camel@sd070> |
On Sat, 2011-07-30 at 18:04 +0200, Andrej Mitrovic wrote:
> If I want to draw a waveform made out of 400 points and connect the
> points together to form lines (meaning point one has a line to point
> two, point two to pint three, etc.), I have to call cairo_move_to()
> and cairo_line_to() 400 times each.
Why are you calling cairo_move_to() each time? If you call it once at
the beginning, and then just cairo_line_to() for each subsequent point,
you get:
1) Half the number of API calls.
2) A single line, instead of many lines whose beginnings and ends
overlap.
--
------
From: Jonathan Morton
[email protected]
--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo