Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用多边形绘制一个开放的矩形:
int[] xPoints = {1,1,3,3}; int[] xPoints = {0,5,5,0}; polygone = new Polygon(xPoints, yPoints, 4); g2d.draw(polygone);
有什么办法可以有一个开放的多边形?
您可能会看java.awt.geom.Path2D,在这里使用,或者java.awt.geom.GeneralPath,在这里说明。
java.awt.geom.Path2D
java.awt.geom.GeneralPath