[cairo] cairo anti aliasing

Bill Spitzak spitzak at d2.com
Mon Feb 28 13:36:23 PST 2005



Tim Janik wrote:

>> You can't substitute filtering for
>> antialiasing. (Well, unless you render at a higher resolution and
>> scale down when filtering. Which is essentially what antialiasing
>> is.)
> 
> exactly, which is why i essentially want to point sample a gauss integral
> (with varying radius) and not blur an image with aliasing.

I might need a clearer explanation of exactly what you want, or what you 
think Gimp is doing, because I think you are misled about what is happening.

"Point sample a gauss integral" *IS* blurring the image. That is in fact 
the exact definition of blurring the image by a 2D filter. Blurring will 
*not* remove aliasing artifacts. If you have a stairstep shape, you will 
get a blurry stairstep. You even posted images showing this. The fact 
that if you blur it a *lot* it gets hard to see the steps is irrelevant. 
Your Gimp examples are nowhere near blurry enough to be demonstrating this.

I believe your original Gimp image is not using *any* filtering. It is 
point-sampling a geometric shape with 1-pixel thick ramps drawn along 
the edge. The fact that if you make these ramps much thicker than 1 
pixel and it *looks* like a blur does not mean it *is* a blur.

What Gimp is doing is really an anti-aliasing algorithim. This 
algorithim has the (perhaps unfortunate) effect that if you change just 
one parameter it also is a fake-blur algorithim. This algorithim is 
nowhere near state-of-the-art and it would be a bad idea for Cairo to be 
defined as using it.



More information about the cairo mailing list