diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2025-07-29 10:48:01 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2025-07-29 10:48:01 +0200 |
| commit | 04b647974ed73fe719e5acfaedfcffb2e09717d9 (patch) | |
| tree | 4a7fd9efb458e5c56a36d710d33c3e7713f3bd49 /Drawing2D/src/Rectangle.cs | |
| parent | 3f16c00248623bac4c883d3c6cd43afeaaa0d630 (diff) | |
widget Margin as Size -> h and v margin nowtextBufferForLabel
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); |