13

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.

openidsucks
  • 245
  • 1
  • 4
  • 9

1 Answers1

15

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

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614