diff --git a/MBS.Framework/Drawing/Rectangle.cs b/MBS.Framework/Drawing/Rectangle.cs index 54c3e43..4856d2a 100644 --- a/MBS.Framework/Drawing/Rectangle.cs +++ b/MBS.Framework/Drawing/Rectangle.cs @@ -68,6 +68,11 @@ namespace MBS.Framework.Drawing public double Right { get { return X + Width; } set { Width = value - X; } } public double Bottom { get { return Y + Height; } set { Height = value - Y; } } + public Rectangle Translate(double x, int y) + { + return new Rectangle(X + x, Y + y, Width, Height); + } + public Rectangle Deflate(Padding padding) { Rectangle rect = this;