Пример #1
0
 public void Union(ScreenRect rect)
 {
     if (rect.x1 < x1)
     {
         x1 = rect.x1;
     }
     if (rect.x2 > x2)
     {
         x2 = rect.x2;
     }
     if (rect.y1 < y1)
     {
         y1 = rect.y1;
     }
     if (rect.y2 > y2)
     {
         y2 = rect.y2;
     }
 }
Пример #2
0
 public void Intersect(ScreenRect rect)
 {
     if (rect.x1 > x1)
     {
         x1 = rect.x1;
     }
     if (rect.x2 < x2)
     {
         x2 = rect.x2;
     }
     if (rect.y1 > y1)
     {
         y1 = rect.y1;
     }
     if (rect.y2 < y2)
     {
         y2 = rect.y2;
     }
 }
Пример #3
0
 public bool Equals(ScreenRect rect)
 => x1 == rect.x1 && x2 == rect.x2 && y1 == rect.y1 && y2 == rect.y2;