[JAVA2D] Area.getPathIterator() question
I have an Area that I want to break down into discrete paths, for
example, if I have an Area that looks like a doughnut, I want to extract
two discrete paths from it.
I do this by getting the PathIterator from the Area as follows:
PathIterator pi = myArea.getPathIterator(new AffineTransform(),
Then I look at the segment type, e.g. SEG_LINETO, on each iteration to
determine whether I should add the current point to my current path or
start a new path.
When I iterate over the path iterator, I find many DUPLICATE CONSECUTIVE
So if I build up a GeneralPath from the points given to me by the
PathIterator as follows:
if(segmentType == PathIterator.SEG_LINETO)
I wind up with a GeneralPath that looks fine when drawn on screen,
however, examination shows that it can have many DUPLICATE CONSECUTIVE
Is there some way to get a PathIterator from an Area that will not have
duplicate consecutive points?
To unsubscribe, send email to email@example.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
firstname.lastname@example.org and include in the body of the message "help".