12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System.Drawing;
- namespace Microsoft.Drawing
- {
-
-
-
- public static class SizeEx
- {
-
-
-
-
- public static void MakeNotEmpty(ref Size size)
- {
- if (size.Width < 1)
- size.Width = 1;
- if (size.Height < 1)
- size.Height = 1;
- }
-
-
-
-
-
-
- public static Size MultiplyWidth(Size size, int count)
- {
- return new Size(size.Width * count, size.Height);
- }
-
-
-
-
-
-
- public static Size MultiplyHeight(Size size, int count)
- {
- return new Size(size.Width, size.Height * count);
- }
-
-
-
-
-
-
- public static Size MultiplyBoth(Size size, int count)
- {
- return new Size(size.Width * count, size.Height * count);
- }
- }
- }
|