[Bug 506] Jagged round endcaps when drawing scaled up lines.

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Wed Jun 16 07:37:10 PDT 2010


------- Comment #6 from ptisnovs at redhat.com  2010-06-16 14:37 -------
I think you are using good approximation of ellipse circumference. But maybe
this code:
+        double mappedD1 = dx1*dx1 + dy1*dy1;
+        double mappedD2 = dx2*dx2 + dy2*dy2;
+        double mappedD = radius * java.lang.Math.sqrt(Math.max(mappedD1,

is somewhat quickier than:
+        double mappedD1 = radius * java.lang.Math.sqrt(dx1*dx1 + dy1*dy1);
+        double mappedD2 = radius * java.lang.Math.sqrt(dx2*dx2 + dy2*dy2);
+        double mappedD = (mappedD1 < mappedD2) ? mappedD2 : mappedD1;

(because one sqrt and one multiplication is eliminated)

But it's just minor enhancement (I'll try your patch to check if there is any
performance difference in Java2D benchmark). Have your patch been accepted by
Oracle engineers? I just read response from James Graham.

Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the distro-pkg-dev mailing list