Added a translate function to the rectangle object.