Java中的Polygon.Double在哪里? [英] Where's Polygon.Double in Java?
本文介绍了Java中的Polygon.Double在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我再次做Java图形(Graphics2D),但我注意到没有Polygon.Double或Polygon.Float类,而有Rectangle2D.Float和Rectangle2D.Double类。
有人知道这是为什么吗?我只需要用双打作为点来绘制一个三角形。 docs.oracle.com/javase/8/docs/api/java/awt/geom/Path2D.htmlrel =nofollow noreferrer> Path2D
(或 Path2D.Float
或 Path2D.Double
)以获得相同效果。
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.
解决方案
You can use a Path2D
(or a Path2D.Float
or Path2D.Double
) to get the same effect.
这篇关于Java中的Polygon.Double在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文