[cairo] White seams (lines) appearing between objects

MenTaLguY mental at rydia.net
Mon Jan 14 09:33:10 PST 2008

On Mon, 14 Jan 2008 16:03:19 +0100, Kristof Van Landschoot <kristof at coin-c.com> wrote:
> Hi,
> We've isolated a problem where we seem to get white seams between two
> objects that really shouldn't have them.  A black rectangle and a red
> image should touch seamlessly, but using these parameters for
> transformation matrix and image size they do generate a pixel-wide
> white line between them.
> Is there anything we can do about this?

The simplest solution is to render without antialiasing and then decimate
the output with an NxN averaging filter to get an antialiased result[1].

In the general case, the fringing is impossible to avoid when using
"incremental" antialiasing.  In some specific cases, you can use the
SATURATE compositing mode, but it only works when the shapes are entirely
opaque and/or do not actually overlap anywhere.


[1] i.e. NxN supersampling

More information about the cairo mailing list