Drawing Application--Line Selection?
-
hey.. i am currently working on a C#/openGL drawing application.....drawing is great but I need to incorporate functionality to select and edit lines with the help of mouse...plz suggest good tutorials from your expereince cheers
Because a line is not an object, you will have to write your selection process from the ground up. You will have to register the points contained by lines (perhaps recognizing members from end points for instance); detect clicks or other process you might provide for selecting lines; and then perhaps re-draw the line/polygon/etc... to indicate it has been selected. A process you might use to select graphic elements could be to iterate through a list of the elements your processes have drawn, re-drawing each to indicate selection as the list is iterated by arrow keys, navigation buttons, or whatever.