-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
7
-
x86
-
linux
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
When one renders an antialiased rectangle with using a clip (a complex clip that doesn't get optimized away into a rectangle, like an Ellipse) the rectangle is filled instead of drawn.
REGRESSION. Last worked in version 7
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the source.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No exception.
ACTUAL -
Exception.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static void main(String[] args) throws Exception {
BufferedImage bImg = new BufferedImage(512, 512, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = (Graphics2D) bImg.getGraphics();
g2d.setRenderingHint(KEY_ANTIALIASING, VALUE_ANTIALIAS_ON);
g2d.setClip(new Ellipse2D.Double(0, 0, 100, 100));
g2d.drawRect(10, 10, 100, 100);
if (new Color(bImg.getRGB(50, 50)).equals(Color.white)) {
throw new Exception("Rectangle should be drawn, not filled");
}
}
---------- END SOURCE ----------
A DESCRIPTION OF THE PROBLEM :
When one renders an antialiased rectangle with using a clip (a complex clip that doesn't get optimized away into a rectangle, like an Ellipse) the rectangle is filled instead of drawn.
REGRESSION. Last worked in version 7
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the source.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No exception.
ACTUAL -
Exception.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static void main(String[] args) throws Exception {
BufferedImage bImg = new BufferedImage(512, 512, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = (Graphics2D) bImg.getGraphics();
g2d.setRenderingHint(KEY_ANTIALIASING, VALUE_ANTIALIAS_ON);
g2d.setClip(new Ellipse2D.Double(0, 0, 100, 100));
g2d.drawRect(10, 10, 100, 100);
if (new Color(bImg.getRGB(50, 50)).equals(Color.white)) {
throw new Exception("Rectangle should be drawn, not filled");
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-7023591 Xrender: java2D font demo - text highlighting tab content is black
-
- Closed
-