Beispiel #1
0
 public static bool Equals(SizeI size1, SizeI size2)
 {
     if (size1.IsEmpty)
     {
         return(size2.IsEmpty);
     }
     return(size1.Width.Equals(obj: size2.Width) && size1.Height.Equals(obj: size2.Height));
 }
Beispiel #2
0
 public RectangleI(SizeI size)
 {
     if (size.IsEmpty)
     {
         this = Empty;
     }
     else
     {
         this._x      = this._y = 0;
         this._width  = size.Width;
         this._height = size.Height;
     }
 }
Beispiel #3
0
 public RectangleI(PointI location, SizeI size)
 {
     if (size.IsEmpty)
     {
         this = Empty;
     }
     else
     {
         this._x      = location._x;
         this._y      = location._y;
         this._width  = size._width;
         this._height = size._height;
     }
 }
Beispiel #4
0
 public static RectangleI Inflate(RectangleI rect, SizeI size)
 {
     rect.Inflate(width: size._width, height: size._height);
     return(rect);
 }
Beispiel #5
0
 public void Inflate(SizeI size)
 {
     Inflate(width: size._width, height: size._height);
 }