Sets the values of x, y, width and height of the given box in pixels. Returns 0 if OK, or 1 if error.