Пример #1
0
 public static NaviPoint getComponentPointRelativeToDomElement(Element element, NaviPoint p) {
   SVGMatrix mat = ((SVGLocatable) element).getScreenCTM();
   return p.matrixTransform(mat);
 }
Пример #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);
 }