[cairo] Best strategy for complex screen drawing

Alexander Larsson alexl at redhat.com
Sat Nov 26 02:24:38 PST 2005


On Fri, 2005-11-25 at 18:07 +0100, Timothée Lecomte wrote:

>     cairo_set_line_width(cr, 1);
>     cairo_stroke(cr);

Why are you stroking each polygon? That is a pretty complicated
operation and doesn't seem necessary for producing the kind of image you
show in your screenshot.

Maybe this is an issue with "seams" between the polygons? If so, you
need to render all the polygons comprising the larger 3d surface using
CAIRO_OPERATOR_ADD to a temporary cairo surface and then composite that
to the real cairo surface (using CAIRO_OPERATOR_OVER, or whatever mode
you currently use).

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl at redhat.com    alla at lysator.liu.se 
He's an underprivileged arachnophobic cyborg on the wrong side of the law. 
She's a psychotic tomboy nun with an evil twin sister. They fight crime! 



More information about the cairo mailing list