2D - just drawing

Hi
I'm trying to find any solution for simple drawing in 2D. I'm wondering e.g. how to draw line or polyline just by clicking mouse on the screen. I can find click point coordinates (Convert() method), but i don't if (and how) add dynamicly points to polyline - is it possible? Or is it possible create simple line - just click to start line and then move mouse with second end moving follow mouse on the view? Maybe parameters for created 2D objects could be changed dynamicly? Any solutions for that? Or only option is creating and destroying object each time (each mouse move?), however it sounds like a nonsense for me.

marek99's picture

Hi
For drawing you probably should use V2d_view class. It has mathod Convert. It takes mouse position and converts it to view position. Dynamic drawing in my application is made by destroying old object and creating new one.