use of org.apache.batik.dom.svg.SVGOMRect in project scout.rt by eclipse.
the class SVGUtility method getElementsAt.
public static List<Element> getElementsAt(SVGDocument doc, SVGPoint point) {
ArrayList<Element> list = new ArrayList<Element>();
SVGOMRect svgOMRect = new SVGOMRect(point.getX(), point.getY(), 1, 1);
NodeList intersectedElements = doc.getRootElement().getIntersectionList(svgOMRect, null);
int n = intersectedElements.getLength();
for (int i = 0; i < n; i++) {
Node node = intersectedElements.item(i);
if (node instanceof Element) {
list.add((Element) node);
}
}
return list;
}
Aggregations