diff options
Diffstat (limited to 'Drawing2D/src/Size.cs')
| -rw-r--r-- | Drawing2D/src/Size.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Drawing2D/src/Size.cs b/Drawing2D/src/Size.cs index dd3a6c1b..4fdf0cd5 100644 --- a/Drawing2D/src/Size.cs +++ b/Drawing2D/src/Size.cs @@ -44,8 +44,11 @@ namespace Drawing2D public static bool operator != (Size s, int i) => (s.Width != i || s.Height != i);*/ public static Size operator + (Size s1, Size s2) => new Size (s1.Width + s2.Width, s1.Height + s2.Height); public static Size operator + (Size s, int i) => new Size (s.Width + i, s.Height + i); + public static Size operator - (Size s1, Size s2) => new Size (s1.Width - s2.Width, s1.Height - s2.Height); + public static Size operator - (Size s, int i) => new Size (s.Width - i, s.Height - i); public static Size operator * (Size s, int i) => new Size (s.Width * i, s.Height * i); public static Size operator / (Size s, int i) => new Size (s.Width / i, s.Height / i); + public static Size operator -(Size s) => new Size (-s.Width, -s.Height); public static Size operator * (Size s, double i) => new Size ((int)(s.Width * i), (int)(s.Height * i)); #endregion |