I’m trying to draw an open rectangle using a Polygon:
int[] xPoints = {1,1,3,3};
int[] xPoints = {0,5,5,0};
polygone = new Polygon(xPoints, yPoints, 4);
g2d.draw(polygone);
Is there any way to have an open Polygon?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You might look at
java.awt.geom.Path2D, used here, orjava.awt.geom.GeneralPath, illustrated here.