diff options
Diffstat (limited to 'UVtools.Core/Extensions/SizeExtensions.cs')
-rw-r--r-- | UVtools.Core/Extensions/SizeExtensions.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/UVtools.Core/Extensions/SizeExtensions.cs b/UVtools.Core/Extensions/SizeExtensions.cs index 8e164ec..455dfee 100644 --- a/UVtools.Core/Extensions/SizeExtensions.cs +++ b/UVtools.Core/Extensions/SizeExtensions.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Drawing; using System.Text; namespace UVtools.Core.Extensions @@ -34,5 +35,8 @@ namespace UVtools.Core.Extensions adjustedSize, SizeSuffixes[mag]); } + + public static Size Inflate(this Size size, int pixels) => new (size.Width + pixels, size.Height + pixels); + public static Size Inflate(this Size size, int width, int height) => new (size.Width + width, size.Height + height); } } |