SuperMap.WinRT.Core.Rectangle2D.Inflate C# (CSharp) Method

Inflate() public method

${core_Rectangle2D_method_inflate_D}
public Inflate ( double width, double height ) : Rectangle2D
width double ${core_Rectangle2D_method_inflate_param_width}
height double ${core_Rectangle2D_method_inflate_param_height}
return Rectangle2D
        public Rectangle2D Inflate(double width, double height)
        {
            if (width < -this.Width * 0.5)
            {
                return Rectangle2D.Empty;
            }
            if (height < -this.Height * 0.5)
            {
                return Rectangle2D.Empty;
            }
            Rectangle2D clone = this.Clone();
            clone._x -= width;
            clone._y -= height;
            clone._width += width * 2;
            clone._height += height * 2;

            return clone;
        }