summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/kitfox/svg/ShapeElement.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/kitfox/svg/ShapeElement.java')
-rw-r--r--src/main/java/com/kitfox/svg/ShapeElement.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/main/java/com/kitfox/svg/ShapeElement.java b/src/main/java/com/kitfox/svg/ShapeElement.java
index e122753..9bb7b27 100644
--- a/src/main/java/com/kitfox/svg/ShapeElement.java
+++ b/src/main/java/com/kitfox/svg/ShapeElement.java
@@ -66,20 +66,19 @@ abstract public class ShapeElement extends RenderableElement
void pick(Point2D point, Vector retVec) throws SVGException
{
- /*
- Point2D xPoint = new Point2D.Double();
- try
- {
- xform.inverseTransform(point, xPoint);
- }
- catch (NoninvertibleTransformException ex)
+ StyleAttribute styleAttrib = new StyleAttribute();
+// if (getStyle(styleAttrib.setName("fill")) && getShape().contains(point))
+ if (getShape().contains(point))
{
- throw new SVGException(ex);
+ retVec.add(getPath(null));
}
- */
-
+ }
+
+ void pick(Rectangle2D pickArea, AffineTransform ltw, Vector retVec) throws SVGException
+ {
StyleAttribute styleAttrib = new StyleAttribute();
- if (getStyle(styleAttrib.setName("fill")) && getShape().contains(point))
+// if (getStyle(styleAttrib.setName("fill")) && getShape().contains(point))
+ if (ltw.createTransformedShape(getShape()).intersects(pickArea))
{
retVec.add(getPath(null));
}