limweb / degrafa

Automatically exported from code.google.com/p/degrafa
1 stars 0 forks source link

GeometryUnion behaves more like an Exclude than a Union #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Geometry Union using two overlapping shapes:

<geometry:GeometryUnion>
                    <geometry:fill>
                        <degrafa:SolidFill color="#000000" />
                    </geometry:fill>
                    <geometry:geometry>
                        <degrafa:Circle radius="100">
                            <degrafa:fill>
                                <degrafa:SolidFill color="#00ff00" />
                            </degrafa:fill>
                        </degrafa:Circle>
                        <degrafa:Circle centerX="70" radius="150">
                            <degrafa:fill>
                                <degrafa:SolidFill color="#0000ff" />
                            </degrafa:fill>
                        </degrafa:Circle>
                    </geometry:geometry>
                </geometry:GeometryUnion>

What is the expected output? What do you see instead?
The expected output is two black overlapping circles. I've attached an
image of the result, as well as the expected result (sorry for my lousy
illustrator drawing skills). It seems that instead of the expected behavior
that both the circle shapes are drawn with the same fill, the overlapping
area no longer is drawn, much like a exclude in illustrator.

What version of the product are you using? On what operating system?
Beta 3.2, on both Mac OSX and Windows Vista

Please provide any additional information below.

Original issue reported on code.google.com by sarah.pl...@gmail.com on 17 May 2010 at 10:43

Attachments:

GoogleCodeExporter commented 9 years ago
Unfortunately we haven't implemented 'real' geometric operations yet in degrafa.
GeometryUnion is a little misleading as a class name in that sense. It is 
simply a
class that draws its children without resetting paint styles between - 
basically it
issues the drawing commands for all the children as a single sequence with the 
fill
and stroke styles that it defines on the GeometryUnion parent. The fill 
exclusion
zone you see from the overlapping circles is as a result of the flash drawing 
api's
default fill-rule (called 'even-odd') which basically fills parts of a shape 
based on
alternating areas of enclosed spaces defined by enclosed sub-paths or
self-intersections. We do have plans to add geometric operations in the future, 
this
has been our intention all along...however if I were to suggest a timeframe I 
would
say Q3-4 earliest.

Original comment by greg.d...@gmail.com on 19 May 2010 at 7:24