I really need some advice on how to implement features below:
A user clicks an icon (I will provide it), then clicks again in a drawing area, a shape represented by the icon will be there. If a user (right) clicks on the shape, a popup menu will come out with several options, like Add a solid line, convert it, etc. If a user selects "add a solid line", a solid line will be extened from the shape, with an active hot spot at the end. If clicking the hot spot, a user will get the same popup menu again. Users can drag the line to scale it.
If the user selects "convert it", the shape will become another equivalent shape.