cogl-path: Don't try to union sub paths
authorNeil Roberts <neil@linux.intel.com>
Mon, 19 Apr 2010 17:54:40 +0000 (18:54 +0100)
committerNeil Roberts <neil@linux.intel.com>
Wed, 21 Apr 2010 10:39:28 +0000 (11:39 +0100)
commit44c86fceadf4e770fa93df1605cf93f16103b195
treeff4f078c76b605f46b284dfbc60dc6e6e87674a4
parent78dc59b34859686c89e9b96dc0fc78f453031262
cogl-path: Don't try to union sub paths

When drawing a path with only a single sub path, Cogl uses the
'even-odd' fill rule which means that if a part of the path intersects
with another part then the intersection would be inverted. However
when combining sub paths it treats them as separate paths and then
unions them together. This doesn't match the semantics of the even-odd
rule in SVG and Cairo. This patch makes it so that a new sub path is
just drawn as another triangle fan so that it will continue to invert
the stencil buffer. This is also much simpler and more efficient as
well as being more correct.

http://bugzilla.openedhand.com/show_bug.cgi?id=2088
clutter/cogl/cogl/cogl-path.c