[cairo] Incorrect rendering of the edges of overlapping polygons

David Benbennick dbenbenn at gmail.com
Mon Dec 5 13:53:05 PST 2005


On 12/4/05, mental at rydia.net <mental at rydia.net> wrote:
> Quoting David Benbennick <dbenbenn at gmail.com>:
>
> > For what it's worth, it appears that Postscript renderers don't
> > suffer from this problem.  At least, Metapost, which produces
> > Postscript output, doesn't have this problem.
>
> Metapost isn't a renderer (rasterizer), is it?

No.  Metapost is a programming language that produces Postscript.  All
I know is that if I make a figure in Metapost where one polygon
obscures another, then use Ghostscript to turn the Postscript to PNG,
the output looks right.  I don't know whether that's because
Ghostscript deals with this issue correctly when rendering Postscript,
or whether Metapost avoids the issue by removing hidden parts of
polygons before writing the Postscript output file.

By the way, for a "real life" example of this problem, see
http://commons.wikimedia.org/wiki/Image:Map_of_Colorado_highlighting_Baca_County.svg
 That page has a map of Colorado, with a red square.  The right and
bottom edges of the red square should not have any black, since the
red square completely obscures the black line beneath it.


More information about the cairo mailing list