[cairo] cairo anti aliasing

Tim Janik timj at gtk.org
Sat Feb 26 16:18:49 PST 2005


On Sun, 20 Feb 2005, Owen Taylor wrote:

> Tim Janik wrote:

>>> Would you be satisfied here with an operation for applying some filter
>>> to an image, (eg. a Gaussian or some other convolution kernel)?
>>  no, the result is different. i've attached a new image. the left rectangle
>> is rotated by 12.5 degrees with a feather edge of 3 pixels applied before
>> rotation. the right rectangle is rotated by 12.5 degrees and a gaussian
>> blur (3x3 matrix) applied after rotation.
>> edges in the right rectangle still contain step artefacts from the 
>> rotation,
>> just blurred, while edges in the left rectangle are properly anti-aliased.
>
> I think if you filter a properly antaliased rotated rectangle you'll get
> better results than that.

better than a non-antialiased image + blur, yes.

> 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.

> Image below on left is rotated rectangle drawn with Cairo, image on right is 
> that same image filtered (radius 1.5 guassian blur
> in the GIMP).  The steps in your image don't appear.

your image on the right stil has visible steps (though a lot less than the
1-pixel anti-aliased version) and looks a lot more blurry than the feather
edge versions (point sampled gauss integral).
so no, this isn't a proper substitute, and i'm not sure supersampling
would help that much here.

>
> Regards,
> 							Owen
>

---
ciaoTJ



More information about the cairo mailing list