summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/geom
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2012-10-15 20:24:17 -0700
committerHarvey Harrison <[email protected]>2012-10-15 20:30:44 -0700
commitb9653e6f55a96f3769a980b2569fc9fabad9f374 (patch)
tree1184c926e417e6a2c223bee87ed158e59043cc50 /src/jogl/classes/jogamp/graph/geom
parent19bee7d8946721b8d094937abf1b33889b7c32e5 (diff)
jogl: remove infinite loop in Path2D.contains(AABBox)
It is impossible to use this method as it will get into an infinite loop as it just calls itself. Base the implementation on the contains method shortly before this method. As this method is impossible to actually use, it could also just be removed. Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/jogl/classes/jogamp/graph/geom')
-rw-r--r--src/jogl/classes/jogamp/graph/geom/plane/Path2D.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java
index 8082fe4e1..bf5f5e9b6 100644
--- a/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java
+++ b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java
@@ -397,7 +397,12 @@ public final class Path2D implements Cloneable {
}
public boolean contains(AABBox r) {
- return contains(r);
+ float lx = r.getMinX();
+ float ly = r.getMinY();
+ float w = r.getWidth();
+ float h = r.getHeight();
+ int cross = Crossing.intersectShape(this, lx, ly, w, h);
+ return cross != Crossing.CROSSING && isInside(cross);
}
public boolean intersects(AABBox r) {