Ejemplo n.º 1
0
Archivo: Use.java Proyecto: uazure/josm
  public Rectangle2D getBoundingBox() throws SVGException {
    SVGElement ref = diagram.getUniverse().getElement(href);
    if (ref instanceof ShapeElement) {
      ShapeElement shapeEle = (ShapeElement) ref;
      shapeEle.pushParentContext(this);
      Rectangle2D bounds = shapeEle.getBoundingBox();
      shapeEle.popParentContext();

      bounds = refXform.createTransformedShape(bounds).getBounds2D();
      bounds = boundsToParent(bounds);

      return bounds;
    }

    return null;
  }