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

CreateFromXYWidthHeight() public static méthode

${WP_core_Rectangle2D_method_CreateFromXYWidthHeight_D}
public static CreateFromXYWidthHeight ( double x, double y, double width, double height ) : Rectangle2D
x double ${WP_core_Rectangle2D_method_CreateFromXYWidthHeight_param_x}
y double ${WP_core_Rectangle2D_method_CreateFromXYWidthHeight_param_y}
width double ${WP_core_Rectangle2D_method_CreateFromXYWidthHeight_param_width}
height double ${WP_core_Rectangle2D_method_CreateFromXYWidthHeight_param_height}
Résultat Rectangle2D
        public static Rectangle2D CreateFromXYWidthHeight(double x, double y, double width, double height)
        {
            if (!x.ValueCheck() || !y.ValueCheck() || !width.ValueCheck() || !height.ValueCheck())
            {
                return Rectangle2D.Empty;
            }

            return new Rectangle2D(x, y, x + width, y + height);
        }