I have checked and GeneralPath is considered up-to-date programming in
J1.4.2. The "winding rules" are means the GeneralPath object uses to work out whether a particular point is inside or outside the area of the object. I think non zero is easier to use.
You have to check that the Path is closed, and that it doesn't have any "moveTo" operations, otherwise you have a gap in the line drawn.
Try getting a PathIterator for pathA, if its Points are inside pathB if(pathB.contains(p)). . . put "p" in a List, then repeat for the other way round.
Possible easier way I have just found. Look up
the Area class in J2SE1.4.2. You can use a Shape in its constructor,
Use pathA and pathB in the constructors to set up areaA and areaB.Set up a third Area (temp) same shape as areaA. Don't say "temp = areaA"subtract areaA from the temp Area,and subtract what remains of the temp Area from areaB.Now re-create the GeneralPath from what remains of areaB. [ March 27, 2007: Message edited by: Campbell Ritchie ]