Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Jan 2, 2013 11:09 PM by
Java2D, filling polygon
Jan 2, 2013 4: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 2, 2013 11:09 PM
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)