Oracle Community Directory
Oracle Community FAQ
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Jan 3, 2013 5:09 AM by
Java2D, filling polygon
Jan 2, 2013 10:57 AM
I have two polygons, one is inside the other. I want to fill the portion
between the polygons using some Paint. Currently I am doing as follows:
Polygon outer, inner;
This gives the desired results. But is affecting the performance when a
large number of nested polygons exist.
Is there any other direct, better, and efficient method to do this.
Kindly help. Thanks in advance and best regards
This content has been marked as final.
Show 1 reply
Re: Java2D, filling polygon
Jan 3, 2013 5:09 AM
in response to
Use java.awt.geom.Area class. Create a new Area based on the bigger Polygon and subtract an Area based on smaller one.
Use the method
public void subtract(Area rhs)