[cairo] Survey of polygon rasterization techniques

Bill Baxter wbaxter at gmail.com
Tue Jul 31 00:38:27 PDT 2007

> agg
>         - coverage based antialiasing from freetype
>         - compute edge flags for all edges into a list of cells
>         - quick sorts cells into pixel order
>         - scanline rasterize the cells
>         - O(p log p) : p is the number of pixels on edges

AGG also supports a different rasterizer made specifically for
implementing Flash more accurately.  It's called
agg_compound_rasterizer or something like that.  The problem as I
understand it is that in order to properly rasterize and adjacent
fills with anti-aliasing, you need a rasterizer that is aware of the
color on the "both sides of the fence".  This is because the
compositing used for implementing edge anti-aliasing is
order-dependent.  Usual techniques treat a half covered pixel as a
fully covered pixel that is half transparent.  If you come back and
exactly fill the other half with a different color the result should
be 0.5 c1 + 0.5 c2.   But that's not what you get.  You get a 50% c2
over 50% c1 over background compositing operation which is not the
same value.


More information about the cairo mailing list