Esempio n. 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;
     }
 }
Esempio n. 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;
     }
 }
Esempio n. 3
0
 public bool Equals(ScreenRect rect)
 => x1 == rect.x1 && x2 == rect.x2 && y1 == rect.y1 && y2 == rect.y2;