summaryrefslogtreecommitdiff
path: root/java/awt/geom/GeneralPath.java
diff options
context:
space:
mode:
authorSven de Marothy <sven@physto.se>2004-09-07 16:01:50 +0000
committerSven de Marothy <sven@physto.se>2004-09-07 16:01:50 +0000
commitaab60a3ef7e9f5a3ba9f1dd363d731dc76c24fc5 (patch)
treee872f10cbf12fd0240cc39a0fcd35ac27e3b4bd3 /java/awt/geom/GeneralPath.java
parent3305158444f949244f1a34253fd9c188a32b117f (diff)
downloadclasspath-aab60a3ef7e9f5a3ba9f1dd363d731dc76c24fc5.tar.gz
2004-09-07 Sven de Marothy <sven@physto.se>
* java/awt/geom/doc-files/Area-1.png: Graphics for Area documentation. New file. * java/awt/geom/doc-files/Ellipse-1.png: Graphics for Ellipse2D documentation. New file. * java/awt/geom/doc-files/GeneralPath-1.png: Graphics for GeneralPath documentation. New file. * java/awt/geom/Arc2D.java: (intersects): Fix: Now checks the arc segment. (contains): Cleaned up. * java/awt/geom/Area.java: (isRectangular): Should return true on an empty path. (equals): Check for null. (rayIntersects): Fix insideness-test * java/awt/geom/CubicCurve2D.java: Fix insideness-test to comply with the correct behavior on edges * java/awt/geom/GeneralPath.java: Likewise * java/awt/geom/QuadCurve2D.java: Likewise
Diffstat (limited to 'java/awt/geom/GeneralPath.java')
-rw-r--r--java/awt/geom/GeneralPath.java31
1 files changed, 17 insertions, 14 deletions
diff --git a/java/awt/geom/GeneralPath.java b/java/awt/geom/GeneralPath.java
index 40182eabf..2131c2443 100644
--- a/java/awt/geom/GeneralPath.java
+++ b/java/awt/geom/GeneralPath.java
@@ -793,11 +793,11 @@ public final class GeneralPath implements Shape, Cloneable
y1 = firsty;
if (y0 == 0.0)
- y0 += epsilon;
+ y0 -= epsilon;
if (y1 == 0.0)
- y1 += epsilon;
- if (Line2D.linesIntersect(x0, y0, x1, y1, 0.0, 0.0, distance,
- 0.0))
+ y1 -= epsilon;
+ if (Line2D.linesIntersect(x0, y0, x1, y1,
+ epsilon, 0.0, distance, 0.0))
windingNumber += (y1 < y0) ? 1 : negative;
cx = firstx;
@@ -814,10 +814,11 @@ public final class GeneralPath implements Shape, Cloneable
y1 = firsty;
if (y0 == 0.0)
- y0 += epsilon;
+ y0 -= epsilon;
if (y1 == 0.0)
- y1 += epsilon;
- if (Line2D.linesIntersect(x0, y0, x1, y1, 0.0, 0.0, distance, 0.0))
+ y1 -= epsilon;
+ if (Line2D.linesIntersect(x0, y0, x1, y1,
+ epsilon, 0.0, distance, 0.0))
windingNumber += (y1 < y0) ? 1 : negative;
cx = firstx;
@@ -832,10 +833,11 @@ public final class GeneralPath implements Shape, Cloneable
y1 = ypoints[pos++] - (float) y;
if (y0 == 0.0)
- y0 += epsilon;
+ y0 -= epsilon;
if (y1 == 0.0)
- y1 += epsilon;
- if (Line2D.linesIntersect(x0, y0, x1, y1, 0.0, 0.0, distance, 0.0))
+ y1 -= epsilon;
+ if (Line2D.linesIntersect(x0, y0, x1, y1,
+ epsilon, 0.0, distance, 0.0))
windingNumber += (y1 < y0) ? 1 : negative;
cx = xpoints[pos - 1] - (float) x;
@@ -854,9 +856,9 @@ public final class GeneralPath implements Shape, Cloneable
&& (y0 * y1 <= 0 || y1 * y2 <= 0))
{
if (y0 == 0.0)
- y0 += epsilon;
+ y0 -= epsilon;
if (y2 == 0.0)
- y2 += epsilon;
+ y2 -= epsilon;
r[0] = y0;
r[1] = 2 * (y1 - y0);
@@ -897,9 +899,9 @@ public final class GeneralPath implements Shape, Cloneable
&& (y0 * y1 <= 0 || y1 * y2 <= 0 || y2 * y3 <= 0))
{
if (y0 == 0.0)
- y0 += epsilon;
+ y0 -= epsilon;
if (y3 == 0.0)
- y3 += epsilon;
+ y3 -= epsilon;
r[0] = y0;
r[1] = 3 * (y1 - y0);
@@ -942,3 +944,4 @@ public final class GeneralPath implements Shape, Cloneable
return (windingNumber);
}
} // class GeneralPath
+