import org.simantics.scl.runtime.function.Function2;
import org.simantics.utils.threads.AWTThread;
+import com.kitfox.svg.RenderableElement;
import com.kitfox.svg.SVGCache;
import com.kitfox.svg.SVGDiagram;
import com.kitfox.svg.SVGElement;
return ret;
}
+ public Rectangle2D getElementBounds(String id) throws SVGException {
+ SVGElement e = diagramCache.getElement(id);
+ if (e instanceof RenderableElement) {
+ return ((RenderableElement)e).getBoundingBox();
+ } else {
+ return null;
+ }
+ }
+
}