OpenTK.Graphics.Rectangle.Inflate C# (CSharp) Method

Inflate() public method

Inflate Method
Inflates the Rectangle by a specified width and height.
public Inflate ( int width, int height ) : void
width int
height int
return void
        public void Inflate(int width, int height)
        {
            Inflate(new Size(width, height));
        }

Same methods

Rectangle::Inflate ( Rectangle rect, int x, int y ) : Rectangle
Rectangle::Inflate ( Size size ) : void

Usage Example

Ejemplo n.º 1
0
        /// <summary>
        ///	Inflate Shared Method
        /// </summary>
        ///
        /// <remarks>
        ///	Produces a new Rectangle by inflating an existing 
        ///	Rectangle by the specified coordinate values.
        /// </remarks>

        public static Rectangle Inflate(Rectangle rect, int x, int y)
        {
            Rectangle r = new Rectangle(rect.Location, rect.Size);
            r.Inflate(x, y);
            return r;
        }