Hi Nicolas,
> I use your excellent class Area to merge polygon and extract the outline.
> So, i have lots of cases where the result is a mix of plain polygons and holes.
> But, the pathiterator doesnt tell when you iterate the subpaths if its a
> plain polygon or a hole ....
> Is there a field or an information to retrieve this information ?
Unfortunately such classification isn't explicitly included in the
iteration interface. The interface and the Shape/Path system in general
are designed around the concept of classifying interior spaces as inside
or outside as opposed to subpaths being holes or not.
The code that we have in the system that needs to know the insideness
can usually deduce it pretty easily as a byproduct of the other calculations
on the operation that it is performing so we haven't had a need to make
this more explicit.
Also, the classification can change quicky if, for instance, you take an
EVEN_ODD path and draw a big box around it - suddenly all the non-holes
become holes and vice versa, so it could be hard to keep such information
up to date.
Another problem with trying to classify a subpath in general is that
a path with an internal loop in it is both non-hole and hole at the same
time. (On the other hand, an Area would not include such a complex
subpath due to the nature of its calculations so this is more of a
theoretical issue with trying to create an interface to express that
classification in a system designed for arbitrary shapes...)
...jim
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".