// ----------------------- // Public Constructors // ----------------------- /// <summary> /// Rectangle Constructor /// </summary> /// /// <remarks> /// Creates a Rectangle from Point and Size values. /// </remarks> public Rectangle(Point location, Size size) { x = location.X; y = location.Y; width = size.Width; height = size.Height; }
/// <summary> /// Inflate Method /// </summary> /// /// <remarks> /// Inflates the Rectangle by a specified Size. /// </remarks> public void Inflate(Size size) { x -= size.Width; y -= size.Height; Width += size.Width * 2; Height += size.Height * 2; }