&& isFitPage()
&& graphComponent.getHorizontalScrollBar().isVisible()
&& graphComponent.getVerticalScrollBar().isVisible();
double graphScale = graphComponent.getGraph().getView()
.getScale();
mxPoint trans = graphComponent.getGraph().getView()
.getTranslate();
int w = (int) outlineSize.getWidth() - 2 * outlineBorder;
int h = (int) outlineSize.getHeight() - 2 * outlineBorder;
if (magnifyPage)
{
gw -= 2 * Math.round(trans.getX() * graphScale);
gh -= 2 * Math.round(trans.getY() * graphScale);
}
newScale = Math.min((double) w / gw, (double) h / gh);
dx += (int) Math
.round((outlineSize.getWidth() - gw * newScale) / 2);
dy += (int) Math
.round((outlineSize.getHeight() - gh * newScale) / 2);
if (magnifyPage)
{
dx -= Math.round(trans.getX() * newScale * graphScale);
dy -= Math.round(trans.getY() * newScale * graphScale);
}
}
}
if (newScale != scale || translate.x != dx || translate.y != dy)