[cairo] cairo anti aliasing
Tim Janik
timj at gtk.org
Sat Feb 19 07:45:52 PST 2005
On Fri, 18 Feb 2005, Carl Worth wrote:
> On Sat, 19 Feb 2005 00:38:07 +0100 (CET), Tim Janik wrote:
>> adjusting the amount of anti-aliasing:
>> currently, i can render rectangles with varying amounts of smoothness at
>> the edges, similar to the "Feather Edge" feature of the gimp "rectangle
>> select" command. this is essentially adjusting the radius of a 2D gaussian
>> curve in pixels, used to smooth the figure edges.
>> as an example, i have attached an image, containing 4 times the same
>> rectangle, rendered with feather edges of 0, 1, 2 and 3 from left to right.
>
> 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.
> As far as the antialiasing algorithm within cairo, (ie. in Render and
> in libpixman), it is currently doing point sampling within the
> provided geometry. I don't see any simple way to extend that to the
> kind of operation you are describing here.
all i'm currently asking for is a pointer into the source code where
the point sampling is currently being performed. i'm willing to look
into this myself ;)
>
> -Carl
>
---
ciaoTJ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: feathervsgauss.png
Type: image/png
Size: 3608 bytes
Desc: feathervsgauss.png
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050219/0499e8de/feathervsgauss.png
More information about the cairo
mailing list