Added the rectangle methods for the canvas