[cairo] turn off antialiasing

mental at rydia.net mental at rydia.net
Mon Mar 7 16:42:36 PST 2005


Quoting Owen Taylor <otaylor at redhat.com>:

> Actually, Cairo *is* set up exactly so that polygon edges
> add up perfectly.

I may be misunderstanding how cairo rendering works, but if I were
to draw two shapes with precisely matching edges, one after
another, their simultaneous coverage isn't considered, is it?

For example, let's say we're drawing black shapes on a white
background; half of a particular pixel is exactly covered by one
shape, and the remainder is exactly covered by the other shape.

Now, before the first shape is painted, the pixel would be rgb(255,
255, 255).  After the first shape is painted, the pixel value ends
up being rgb(127, 127, 127) or similar.

Now, after the second shape is painted, does the pixel end up being
rgb(0, 0, 0) or rgb(63, 63, 63)?

The former case is "correct" in terms of reflecting the actual
coverage by the shapes (none of the white background should show
through), but I'm not sure how the latter case can be avoided if
the two shapes are composited separately...

-mental



More information about the cairo mailing list