[cairo] turn off antialiasing

Owen Taylor otaylor at redhat.com
Mon Mar 7 16:52:33 PST 2005


On Mon, 2005-03-07 at 19:42 -0500, mental at rydia.net wrote:
> 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...

You have to use an intermediate surface and the ADD operator.

Regards,
					Owen





More information about the cairo mailing list