Where's Polygon.Double in Java?

倖福魔咒の 提交于 2019-12-06 20:33:23

问题


Once again I'm doing Java graphics (Graphics2D) but I noticed there is no Polygon.Double or Polygon.Float classes whereas there is Rectangle2D.Float and Rectangle2D.Double class.

Does anyone know why this is? I just need to draw a triangle using doubles as points.


回答1:


You can use a Path2D (or a Path2D.Float or Path2D.Double) to get the same effect.



来源:https://stackoverflow.com/questions/2377551/wheres-polygon-double-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!