aboutsummaryrefslogtreecommitdiffstatsci
path: root/Drawing2D/src/Rectangle.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2025-07-29 10:48:01 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2025-07-29 10:48:01 +0200
commit04b647974ed73fe719e5acfaedfcffb2e09717d9 (patch)
tree4a7fd9efb458e5c56a36d710d33c3e7713f3bd49 /Drawing2D/src/Rectangle.cs
parent3f16c00248623bac4c883d3c6cd43afeaaa0d630 (diff)
widget Margin as Size -> h and v margin nowtextBufferForLabel
Diffstat (limited to 'Drawing2D/src/Rectangle.cs')
-rw-r--r--Drawing2D/src/Rectangle.cs7
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);