Esempio n. 1
0
 public static NaviPoint getComponentPointRelativeToDomElement(Element element, NaviPoint p) {
   SVGMatrix mat = ((SVGLocatable) element).getScreenCTM();
   return p.matrixTransform(mat);
 }
Esempio n. 2
0
 public static NaviPoint getLocalPointFromDomElement(Element element, float x, float y) {
   SVGMatrix mat = ((SVGLocatable) element).getScreenCTM();
   SVGMatrix imat = mat.inverse(); // screen -> elem
   NaviPoint pt = new NaviPoint(x, y);
   return pt.matrixTransform(imat);
 }