的多边形。在Java双吗?

时间:2023-02-09 16:23:28

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.

我又一次在做Java图形(Graphics2D),但我注意到没有多边形。双或多边形。浮动类,而矩形是二维的。和Rectangle2D浮动。两类。

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

有人知道为什么吗?我只需要用双数作为点来画一个三角形。

1 个解决方案

#1


15  

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

您可以使用Path2D(或Path2D)。浮动或路径双)以获得相同的效果。

#1


15  

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

您可以使用Path2D(或Path2D)。浮动或路径双)以获得相同的效果。