If it tries to draw a polygon with more than 256 vertices, it throws an ArrayIndexOutOfBoundsException mentioning that it tries to access 512th index.
I tried to draw a polygon with 348 vertices which passes (348 xPoints, 348 yPoints, 348) in to following function.
fillPolygon(double[] xPoints, double[] yPoints, int nPoints)
Then it throws an ArrayIndexOutOfBoundsException saying it tries to access 512th index. This exception is thrown in any case where it passes more than 256 points into the fillPolygon function.
Used java version is JDK 7u45 release which includes JavaFX version 2.2.45.
I tried to draw a polygon with 348 vertices which passes (348 xPoints, 348 yPoints, 348) in to following function.
fillPolygon(double[] xPoints, double[] yPoints, int nPoints)
Then it throws an ArrayIndexOutOfBoundsException saying it tries to access 512th index. This exception is thrown in any case where it passes more than 256 points into the fillPolygon function.
Used java version is JDK 7u45 release which includes JavaFX version 2.2.45.
- duplicates
-
JDK-8124166 ArrayIndexOutOfBoundsException for Polygon and Polyline on Canvas with number of points greater than 256
-
- Resolved
-