/// <summary> /// Constructs a new Rectangle instance. /// </summary> /// <param name="location">The top-left corner of the Rectangle.</param> /// <param name="size">The width and height of the Rectangle.</param> public TRectangle(TPoint location, TSize size) : this() { Location = location; Size = size; }
/// <summary> /// Tests whether this instance contains the specified Point. /// </summary> /// <param name="point">The <see cref="TPoint"/> to test.</param> /// <returns>True if this instance contains point; false otherwise.</returns> /// <remarks>The left and top edges are inclusive. The right and bottom edges /// are exclusive.</remarks> public bool Contains(TPoint point) { return(point.X >= Left && point.X < Right && point.Y >= Top && point.Y < Bottom); }