This content has been marked as final. Show 2 replies
You need to find the resulting Polygon and fill that.
<ul><li>Find center point of all Polygons (or the current 2 if you do sequientially)
<li>find all points where Polygon lines cross.
<li>For all the point you have no check if the line between the current point and the center crosses any existing line. <ul><li>yes: dismiss point. <li>no: add poin to resulting polygon</ul></ul>
This does only apply to convex polygons.
Use Area class. Pass the Polygons in constructor (public Area(Shape s)).
Area has methods
So you can build any Area combining areas of the polygons.
public void subtract(Area rhs) public void intersect(Area rhs) public void add(Area rhs)