Add viewportToImageRectangle method and add support to pass a point to viewportToImageCoordinates and imageToViewportCoordinates