Beispiel #1
0
 /// <summary>
 /// Writes the given <see cref="Rectanglel"/> to an <see cref="Ibasa.IO.BinaryWriter">.
 /// </summary>
 public static void Write(this Ibasa.IO.BinaryWriter writer, Rectanglel rectangle)
 {
     writer.Write(rectangle.X);
     writer.Write(rectangle.Y);
     writer.Write(rectangle.Width);
     writer.Write(rectangle.Height);
 }
Beispiel #2
0
 public static bool Contains(Rectanglel rectangle, Point2l point)
 {
     return((rectangle.Left <= point.X) && (rectangle.Right >= point.X) &&
            (rectangle.Bottom <= point.Y) && (rectangle.Top >= point.Y));
 }
Beispiel #3
0
 /// <summary>
 /// Returns a value that indicates whether two rectangles are equal.
 /// </summary>
 /// <param name="left">The first rectangle to compare.</param>
 /// <param name="right">The second rectangle to compare.</param>
 /// <returns>true if the left and right are equal; otherwise, false.</returns>
 public static bool Equals(Rectanglel left, Rectanglel right)
 {
     return(left == right);
 }