diff options
Diffstat (limited to 'Drawing2D/src/Rectangle.cs')
| -rw-r--r-- | Drawing2D/src/Rectangle.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Drawing2D/src/Rectangle.cs b/Drawing2D/src/Rectangle.cs index d120de69..a959b555 100644 --- a/Drawing2D/src/Rectangle.cs +++ b/Drawing2D/src/Rectangle.cs @@ -72,6 +72,13 @@ namespace Drawing2D { this.Y -= yDelta; this.Height += 2 * yDelta; } + public void Inflate(Size delta) + { + this.X -= delta.Width; + this.Width += 2 * delta.Width; + this.Y -= delta.Height; + this.Height += 2 * delta.Height; + } public void Inflate(int delta) { Inflate (delta, delta); |