Gets height and width of a rectangle