[cairo] White seams (lines) appearing between objects

Kristof Van Landschoot kristof at coin-c.com
Tue Jan 15 00:55:27 PST 2008


Hi,

Thanks for the observations so far.  However, I'm not sure I'm with  
you on this all...

On 14 Jan 2008, at 18:33, MenTaLguY wrote:

> 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.
>
> -mental
>
> [1] i.e. NxN supersampling
>

Isn't what we're doing in the code sample turning antialiasing off?  
I.e., the call to

cairo_set_antialias(lCairoState,CAIRO_ANTIALIAS_NONE);

is what should take care of it, no?  But we still get the white line?

And then I don't see how supersampling could solve the issue since  
even from supersampling a fine white line you would still get a  
lighter color than the red or the black on either side of the line,  
wouldn't you?

Thanks,
Kristof

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080115/df504459/attachment.htm 


More information about the cairo mailing list