SuperMap.WindowsPhone.Core.Rectangle2D.Inflate C# (CSharp) Méthode

Inflate() public méthode

${WP_core_Rectangle2D_method_inflate_D_sl}
public Inflate ( double width, double height ) : Rectangle2D
width double ${WP_core_Rectangle2D_method_inflate_param_width_sl}
height double ${WP_core_Rectangle2D_method_inflate_param_height_sl}
Résultat 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;
        }