Hi people, i was not able to find your bugtracker, so i post it here:
the following code throws an exception iff antialiasing is activated.
imho it is a bug in
"sun.java2d.pisces.Stroker.finish(Stroker.java:698)". here, it divides
by the line length (which can be zero):
-------------------------------------------
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import javax.swing.JFrame;
public class Example {
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setSize(100, 100);
frame.setVisible(true);
Graphics2D g = (Graphics2D) frame.getGraphics();
g.setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
// here everything is fine
g.drawOval(10, 10, 80, 80);
// here it crashes with a divide by zero (only with
// enabled antialiasing)
g.drawOval(0, 0, 0, 0);
}
}
-------------------------------------------
ps: i'm using the openjdk, which is shipped with fedora 9.
--
Josef Alexander Hahn
Instant Messenging (per Jabber): [EMAIL PROTECTED]
VoIP: sip:[EMAIL PROTECTED]
signature.asc
Description: This is a digitally signed message part
