[cairo] Question about pixman's antialiasing

Clemens Eisserer linuxhippy at gmail.com
Thu Feb 26 18:39:03 PST 2009


Hi,

I am playing a bit with implementing pixman's antialiasing as shader.
The RENDER spec mentiones:

> When rasterized with Smooth edges, the mask is generated by creating a square
> around each pixel coordinate and computing the amount of that square covered
> by the polygon.  This ignores sampling theory but it provides a precise
> definition which is close to the right answer.
> ................................................
> Rasterization
> Alpha values are generated by point sampling the coverage of a square
> surrounding the center of each pixel by the polygon.

So, does pixman in "Imprecise" mode antialiasing with "unweighted area
sampling"?
Does it define the intensity by calculating how much of a pixel is
"covered" by the edge without any additional filtering or
postprocessing?

If so, do you know maybe some easy/unoptimized (unobfuscated^^) sample
code which examples the stuff used for this?
I don't have an idea how to calculate the covered area :-/

Thanks, Clemens


More information about the cairo mailing list