[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] Bug in sun.java2d.pisces.Stroker ?!
From:       mail () josef-hahn ! de (Josef Hahn)
Date:       2008-05-20 1:57:51
Message-ID: 1211248671.7992.5.camel () voyager ! kawo1 ! rwth-aachen ! de
[Download RAW message or body]

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): josef.hahn at jabber.rwth-aachen.de
VoIP: sip:ProjectColeslaw at ekiga.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20080520/3fa6e54a/attachment.bin 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic