Drawing island polygons

Hi,
I’m working on utility to display maps, which means I have to put several layers with point, line and polygon features on top of each other.

It can be that some of the polygons have holes. I tried to implement this with the “Area”-class by creating first polygons for the outline as well as for the island polygons (holes). Then I converted them into Areas and substracted the holes from the outline-polygon. However, the substraction is very slow, as it takes several seconds to completely draw the hole map.

I wonder if anyone of you knows any faster way of drawing polygons with holes, perhaps I could build directly an Area-object without the subtraction-method or implement a Shape-Object myself. Implementing a polygon-drawing-algorithm in Java would not be fast, as I suspect.

Update: meanwhile I found a possible solution by implementing the Interfaces “Shape” and “PathIterator” myself for a Polygon class which supports these holes.

Never mind and thanks for reading anyway :wink:

Crest