-
Bug
-
Resolution: Fixed
-
P3
-
6
-
None
-
b81
-
generic
-
generic
The following test case creates a RadialGradient with the focus on the
perimeter of the circle. It generates an ArrayIndexOutOfBoundsException.
import java.awt.*;
import java.awt.image.*;
import java.awt.MultipleGradientPaint.*;
public class FocusRadial {
public static void main(String argv[]) {
BufferedImage bimg = new BufferedImage(10, 10,
BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = bimg.createGraphics();
g2d.setPaint(new RadialGradientPaint(5, 5, 2, 3, 5,
new float[] {0f, 1f},
new Color[] {Color.white,
Color.black},
CycleMethod.REPEAT));
g2d.fillRect(0, 0, 10, 10);
}
}
perimeter of the circle. It generates an ArrayIndexOutOfBoundsException.
import java.awt.*;
import java.awt.image.*;
import java.awt.MultipleGradientPaint.*;
public class FocusRadial {
public static void main(String argv[]) {
BufferedImage bimg = new BufferedImage(10, 10,
BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = bimg.createGraphics();
g2d.setPaint(new RadialGradientPaint(5, 5, 2, 3, 5,
new float[] {0f, 1f},
new Color[] {Color.white,
Color.black},
CycleMethod.REPEAT));
g2d.fillRect(0, 0, 10, 10);
}
}