[cairo] Difference in Cairo and Qt4 adjacent polygon rendering

Hezekiah M. Carty hcarty at atmos.umd.edu
Fri May 1 12:50:17 PDT 2009


On Fri, May 1, 2009 at 2:46 PM, Bill Spitzak <spitzak at thefoundry.co.uk> wrote:
> Hezekiah M. Carty wrote:
>
>> That said, when the stroke is added in the Cairo case, it creates a
>> sort of saw-tooth pattern along the edge of some plots (see [1]
>> below).  This does not happen in the Qt4 output (see [2] below).  In
>> this case, the polygons which make up the plotted surface do not seem
>> to be stroked in the Qt4 output, according to Inkscape.  They do,
>> however, render cleanly (and without the "sawtooth" effect) in Evince.
>>  Cairo output without the outline stroke does not render cleanly,
>> again showing seams between the polygons.
>
> You need to change the line joins and caps, perhaps to round (I'm not sure
> what the best one is).

Thank you very much.  This works wonderfully with the caps set to
CAIRO_LINE_CAP_BUTT and the joins set to CAIRO_LINE_JOIN_BEVEL.

Hez

-- 
Hezekiah M. Carty
Graduate Research Assistant
University of Maryland
Department of Atmospheric and Oceanic Science


More information about the cairo mailing list