[cairo] Non-antialiased rendering in image surface

cu cairouser at yahoo.com
Sun Jun 27 07:30:02 PDT 2010

Bill Spitzak wrote:
> The problem is that "turn off antialiasing" is NOT the solution. This
> may solve the internal lines, but the outer edge of the polygon ends
> up aliased, and all the other lines look bad.

I see what you are saying about other lines, but there are no "other
lines" as far as our drawing is concerned. I turn antialiasing off
before drawing a certain kind of polygons, then turn it back on for
other lines and polygons. I am a proponent of solving problems as they
appear, without introducing others so if turning antialiasing off for
some drawing solves it - then that's the approach to take.

Any solution involving downscaling, temporary surfaces etc would likely
incur an unacceptable performance penalty.
> Another idea I had is a flag you can set to say that a particular edge
> should be aliased. This would be set by the program on edges that it
> knows adjoin another polygon. I don't like this as much as it makes
> assumptions about the implementation, and the program would have to
> determine if the adjacent polygons are actually on opposite sides of
> the line (rather than overlapping each other).
It's a very interesting idea. Although in this particular case, as of
now, we only know in principle that certain polygons would adjoin others
(as opposed to overlapping) but not always what edges are shared
(although often it's "all edges" :) ). That could probably be discovered

 My main concern based on what was said here previously was not so much
about functionality but about performance. A few people mentioned that
non-antialiased drawing may not be as well optimized. I think it would
be great to have at least some common optimization paths in there. In my
testing the overall difference in results is not huge, so it may not
even be a big deal - it is simply something worth keeping in mind.

More information about the cairo mailing list