Esempio n. 1
0
 public RectangleInt2 Inflate(VectorInt2 width) =>
 new RectangleInt2(Start - width, End + width);
Esempio n. 2
0
 public static RectangleInt2 FromLTRB(VectorInt2 start, VectorInt2 size) => new RectangleInt2(start, start + size);
Esempio n. 3
0
 public bool Contains(VectorInt2 point) =>
 Start.X <= point.X && End.X >= point.X && Start.Y <= point.Y && End.Y >= point.Y;
Esempio n. 4
0
 public RectangleInt2 Union(RectangleInt2 other) =>
 new RectangleInt2(VectorInt2.Min(Start, other.Start), VectorInt2.Max(End, other.End));
Esempio n. 5
0
 public RectangleInt2 Intersect(RectangleInt2 other) =>
 new RectangleInt2(VectorInt2.Max(Start, other.Start), VectorInt2.Min(End, other.End));
Esempio n. 6
0
 public RectangleInt2(int x0, int y0, int x1, int y1)
 {
     Start = new VectorInt2(x0, y0);
     End   = new VectorInt2(x1, y1);
 }
Esempio n. 7
0
 public RectangleInt2(VectorInt2 start, VectorInt2 end)
 {
     Start = start;
     End   = end;
 }