[cairo] Difference in Cairo and Qt4 adjacent polygon rendering

Bill Spitzak spitzak at thefoundry.co.uk
Fri May 1 11:44:23 PDT 2009


If you really want to fix this *and* reduce the output size, see if you 
can make each shape include any enclosed shape that has not been drawn 
yet. IE:

    +----------+
    |   +---+  |
    | A | B |  |
    |   +---+  |
    |          |
    +----------+

Currently you are drawing the donut-shaped piece 'A' and then the square 
called 'B'. If instead you drew the filled square of both A+B, then drew 
B, you would have no seams, and the B square path would only be sent 
once instead of twice. This would probably also make the Qt output 
smaller as well.

This looks like it would work for your data, though I can imagine it is 
not going to be easy to change the software. I think a solution like 
this would solve a lot of problems people are having with drawing such 
images using Cairo, though it gets harder/impossible if the shapes share 
common edges or the "overlap" goes in a loop.

-- 
Bill Spitzak, Senior Software Engineer
The Foundry, 618 Hampton Drive, Venice, CA, 90291, USA
Tel: +1 310 399-4555 * Fax: +1 310 450-4516 * Web: www.thefoundry.co.uk
The Foundry Visionmongers Ltd * Registered in England and Wales No: 4642027


More information about the cairo mailing list