[cairo] Very large number of lines

Arjen Nienhuis a.g.nienhuis at gmail.com
Sun Aug 29 12:41:23 PDT 2010

What version of cairo do use?
Did you finish() the surface?
Can you send a simple program (source code) that reproduces the problem?

Groeten, Arjen

On Sunday, August 29, 2010, necko necko <opustenom at hotmail.com> wrote:
> The pdf output file is supposed to display very large number of lines, connections
> between a number of points. This is the code sample which specifies around 8million
> lines:
> .............
> while (myIter!=edges.end()) {
>      .......
>     cairo_move_to (cr, *firstIter, *(firstIter+1));
>     cairo_line_to (cr, *secondIter, *(secondIter+1));
>     ..........
>     ++myIter;
> }
> cairo_set_line_width (cr, .05);
> cairo_stroke (cr);
> .........................
> Note that the above code produces pdf files which were viewed with Evince, but not
> with Adobe Reader (drawing error occurred, shown in the report window).
> I used the same code for showing larger number of lines, more than 20million. The output
> pdf files had names as specified, but their size was around 400 bytes, and when I try to
> open them, they are simply empty(white, in Evince), while Adobe says that the file has no
> pages to display.
> In order to overcome this problem, I put stroke() within the while() loop, but when I tried
> to draw files showing more than 20million lines, the process got "Killed" (Ubuntu Linux) at
> around 33% of the total.
> .............................
> What would be the way to properly draw the pdf file specifying very large number of lines?
> What would be the code to try? Note that the variations work properly with smaller number
> of lines.
> Thanks

More information about the cairo mailing list