Rectangle2D bounds = null;
while(it.hasNext()) {
IG2DNode node = it.next();
- Rectangle2D b = node.getBounds();
+ Rectangle2D b = node.getBoundsInLocal(ignoreNulls);
if(b == null && !ignoreNulls)
return null;
if(b != null) {
if(!GeometryUtils.isUndefinedRectangle(b)) {
+ b = node.localToParent(b);
if(bounds == null) {
bounds = b.getFrame();
} else {
@Override
public Rectangle2D getBoundsInLocal() {
+ return getBoundsInLocal(false);
+ }
+
+ @Override
+ public Rectangle2D getBoundsInLocal(boolean ignoreNulls) {
// Safety against cyclic cases.
if (hasFlags(IN_GET_BOUNDS))
return new Rectangle2D.Double();
setFlags(IN_GET_BOUNDS);
try {
- Rectangle2D bounds = n.getBoundsInLocal();
+ Rectangle2D bounds = n.getBoundsInLocal(ignoreNulls);
if (transform != null && !transform.isIdentity())
bounds = transform.createTransformedShape(bounds).getBounds2D();
return bounds;