[cairo] Re: simulating partial coverage with alpha

Bill Spitzak spitzak at d2.com
Thu Mar 10 19:38:30 PST 2005



mental at rydia.net wrote:
> Quoting Nathan Hurst <njh at hawthorn.csse.monash.edu.au>:

> I'm not suggesting Cairo should abandon using alpha to simulate
> partial coverage when rasterizing (it works well enough for most
> cases), but I would like to be able to turn it off (at least for
> image surfaces) when I need to to avoid these kinds of artifacts in
> preference to avoiding aliasing (since I can filter afterwards).
> 
> Or am I missing something here?

This is the one reason I see to truly turn off antialiasing. But it has 
to be supported on *individual* straight edges of polygons. If you 
cannot draw a polygon with some edges antialiased, then you cannot make 
an antialiased shape where the interior is opaque.

My main complaint is that a bunch of people are thinking the solution is 
to have a global switch called "turn off antialiasing". This is NOT what 
is wanted and is in fact totally counter-productive. It does not allow 
me to draw a polygon with *some* edges aliased. Please don't do this!

I still stand by my position:

There is *ONLY ONE* reason to turn off antialiasing: on *individual*, 
*straight*, edges of polygons. This will allow a higher-level piece of 
code to construct surfaces where portions use different textures or 
different projections of textures, without seams between them. It can 
still use antialising for the outer edges of the surface.



More information about the cairo mailing list