Ejemplo n.º 1
0
 /// <summary>
 ///   Constructs a new rectangle with the specified position and size.
 /// </summary>
 /// <param name="x">
 ///   X-component of the rectangle position.
 /// </param>
 /// <param name="y">
 ///   Y-component of the rectangle position.
 /// </param>
 /// <param name="size">
 ///   Rectangle size.
 /// </param>
 public RectangleI(int x, int y, Vector2I size)
     : this(new Vector2I(x, y), size)
 {
 }
Ejemplo n.º 2
0
 /// <summary>
 ///   Checks whether this rectangle contains the point denoted by the specified vector.
 /// </summary>
 /// <param name="point">
 ///   Point to check.
 /// </param>
 /// <returns>
 ///   <c>true</c>, if this rectangle contains <paramref name="point" />, and <c>false</c> otherwise.
 /// </returns>
 public bool Contains(Vector2I point)
 {
     return(point.X.IsWithinBounds(this.X, this.MaxX) && point.Y.IsWithinBounds(this.Y, this.MaxY));
 }