Re: Visible lines between adjacent semi-transparent polygons
"Hezekiah M. Carty" <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CAMfPyLDq+LSyCgjpTMcZ2Si06nTOPJeYLcSa=Q_JVMzZcbQ+LQ@mail.gmail.com> |
On Mon, Nov 21, 2011 at 1:35 PM, Jennifer Adams <[email protected]> wrote: > I am working toward implementing Cairo in GrADS, an open source program for > the analysis and display of meteorological data. My use of cairo is fairly > basic. In a test program, I am drawing two adjacent triangles with > transparency set to 0.50, writing out .pdf and .png formats. A faint line > shows up along the common boundary of the two triangles (i.e., along the > diagonal of what should be a solid rectangle). Disabling anti-aliasing makes > the line go away in the .png file, but it persists in the .pdf. What is > causing this and is there a remedy? The solution used in PLplot is to fill the polygon with a cairo_fill and cairo_stroke. Lines 1399 - 1431: http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/drivers/cairo.c?revision=12032&view=markup An example of the result (PNG with antialiasing enabled): http://plplot.sourceforge.net/examples-data/demo16/x16.02.png The cairo_stroke call is needed to avoid seams between adjacent polygons when the polygons are antialiased (Cairo-dependent for raster output, renderer dependent for PDF/PS output). Somewhat off-topic - I'm looking forward to Cairo-based GrADS rendering! Hez -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo