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

Inflate() public static method

Inflate Shared Method
Produces a new Rectangle by inflating an existing Rectangle by the specified coordinate values.
public static Inflate ( Rectangle rect, int x, int y ) : Rectangle
rect Rectangle
x int
y int
return Rectangle
        public static Rectangle Inflate(Rectangle rect, int x, int y)
        {
            Rectangle r = new Rectangle(rect.Location, rect.Size);
            r.Inflate(x, y);
            return r;
        }

Same methods

Rectangle::Inflate ( Size size ) : void
Rectangle::Inflate ( int width, int height ) : 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;
        }