Implemented resizing of rectangles and lines.