[cairo] Avoiding seams (again)

MenTaLguY mental at rydia.net
Fri Apr 7 09:03:51 PDT 2006


On Thu, 6 Apr 2006 15:36:53 -0700, "Mike Emmel" <mike.emmel at gmail.com> wrote:
> In this case you would rasterize only the alpha plane and maintain the
> flattened paths in the firt pass you could even use and extended concept
> of alpha say a 16-32 but number that used the extra bits to say record
> how many times the pixel was colored or in this case alpha was set. That
> may be enough information itself. Saving the flattened paths is simply
> to not rasterize them agian but the extended alpha format would/could
> have enough info so you don't need the paths.

For accurate coverage, within each pixel you need to know not only "how many",
and "how much", but "where".  Coverage implies geometric knowledge.  This is
trivial if you are supersampling (or not antialiasing edges at all, which is
a degenerate case of that), but once you've converted coverage to alpha you've
already thrown away the most important information.

Alpha and coverage are separate concepts; the artifacts are a result of trying
to combine them.

That said, you may get a better handle on the issue if you implement some
simple code to demonstrate your idea.  A rasterizer for polygons is not hard to
write; I can give you some pointers if you like.

-mental



More information about the cairo mailing list