[cairo] Very large number of lines

necko necko opustenom at hotmail.com
Sun Aug 29 06:09:08 PDT 2010


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
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100829/ec69a93b/attachment.html>


More information about the cairo mailing list