Re: Visible lines between adjacent semi-transparent polygons
Maarten Bosmans <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <CA+CvcKSL=3J+1de6f6==at-qCr5rD31mKeKbByy9ieNOc597Gg@mail.gmail.com> |
2011/11/21 Jennifer Adams <[email protected]>: > Dear Experts, > 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? Well, for the PDF you're also at the mercy of the renderer. It might very well be that it renders incorrectly. I sometimes get better results by using a temporary surface (push_group), drawing multiple things (with the add operator) and then painting the surface with pop_group, paint (wiht the normal over operator). And of course, you could consider drawing a rectangle instead of two triangles. Maarten -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo