private Rectangle GetScaledBoundsOld (Rectangle bounds, SizeF factor, BoundsSpecified specified)
{
RectangleF new_bounds = new RectangleF(bounds.Location, bounds.Size);
// Top level controls do not scale location
if (!is_toplevel) {
if ((specified & BoundsSpecified.X) == BoundsSpecified.X)
new_bounds.X *= factor.Width;
if ((specified & BoundsSpecified.Y) == BoundsSpecified.Y)
new_bounds.Y *= factor.Height;
}
if ((specified & BoundsSpecified.Width) == BoundsSpecified.Width && !GetStyle (ControlStyles.FixedWidth)) {
int border = (this is Form) ? (this.bounds.Width - this.client_size.Width) : 0;
new_bounds.Width = ((new_bounds.Width - border) * factor.Width + border);
}
if ((specified & BoundsSpecified.Height) == BoundsSpecified.Height && !GetStyle (ControlStyles.FixedHeight)) {
int border = (this is Form) ? (this.bounds.Height - this.client_size.Height) : 0;
new_bounds.Height = ((new_bounds.Height - border) * factor.Height + border);
}
bounds.X = (int)Math.Round (new_bounds.X);
bounds.Y = (int)Math.Round (new_bounds.Y);
bounds.Width = (int)Math.Round (new_bounds.Right) - bounds.X;
bounds.Height = (int)Math.Round (new_bounds.Bottom) - bounds.Y;
return bounds;
}