Implemented selection for rectangles, circles and freehand shapes.