<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div><br class="webkit-block-placeholder"></div><div>Hi,</div><div><br class="webkit-block-placeholder"></div><div>Thanks for the observations so far. However, I'm not sure I'm with you on this all...</div><div><br class="webkit-block-placeholder"></div><div>On 14 Jan 2008, at 18:33, MenTaLguY wrote:</div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Mon, 14 Jan 2008 16:03:19 +0100, Kristof Van Landschoot <<a href="mailto:kristof@coin-c.com">kristof@coin-c.com</a>> wrote:</div> <blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hi,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">We've isolated a problem where we seem to get white seams between two</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">objects that really shouldn't have them.<span class="Apple-converted-space"> </span>A black rectangle and a red</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">image should touch seamlessly, but using these parameters for</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">transformation matrix and image size they do generate a pixel-wide</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">white line between them.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Is there anything we can do about this?</div> </blockquote><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The simplest solution is to render without antialiasing and then decimate</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">the output with an NxN averaging filter to get an antialiased result[1].</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">In the general case, the fringing is impossible to avoid when using</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">"incremental" antialiasing.<span class="Apple-converted-space"> </span>In some specific cases, you can use the</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">SATURATE compositing mode, but it only works when the shapes are entirely</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">opaque and/or do not actually overlap anywhere.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-mental</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">[1] i.e. NxN supersampling</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </blockquote></div><br><div>Isn't what we're doing in the code sample turning antialiasing off? I.e., the call to</div><div><br class="webkit-block-placeholder"></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Courier" size="3" color="#001bd0" style="font: 12.0px Courier; color: #001bd0">cairo_set_antialias(lCairoState,CAIRO_ANTIALIAS_NONE);</font></div><div><font class="Apple-style-span" color="#001BD0" face="Courier"><br class="webkit-block-placeholder"></font></div><div><font class="Apple-style-span" color="#001BD0" face="Courier"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; "><div>is what should take care of it, no? But we still get the white line?</div><div><br class="webkit-block-placeholder"></div><div>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?</div><div><br></div><div>Thanks,</div><div>Kristof</div><div><br class="webkit-block-placeholder"></div></span></font></div></div></body></html>