classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: GeneralPath.contains fix


From: Sven de Marothy
Subject: [cp-patches] FYI: GeneralPath.contains fix
Date: Sun, 07 Nov 2004 18:23:00 +0100

Hi,

This fixes a small bug with GeneralPath.contains()/intersects()
Thanks to noa for pointing this one out.

/Sven

2004-11-07  Sven de Marothy  <address@hidden>

        * java/awt/geom/GeneralPath.java (evaluateCrossings):
        Fixed epsilon value, should always be nonzero.


--- classpath/classpath/java/awt/geom/GeneralPath.java  2004/10/28
09:54:43        1.10
+++ classpath/classpath/java/awt/geom/GeneralPath.java  2004/11/07 17:18:07     
1.11
@@ -778,7 +778,10 @@
 
     /* Get a value which is hopefully small but not insignificant relative
      the path. */
-    epsilon = ypoints[0] * 1E-9;
+    epsilon = ypoints[0] * 1E-7;
+
+    if(epsilon == 0) 
+      epsilon = 1E-7;
 
     pos = 0;
     while (pos < index)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]