How to add a rectangle

Command: addRect

Description: Adds a rectangle. The rectangle is defined by the end points P1 and P2 of its diagonal. The rectangle is represented as a path. After a modification the component might not be rectangular anymore.

Example: