Search code examples
c#listgraphicsmouseclick-event

How to remember coordinates of mouseclick event to the List?


I need that to program polygon-fill with Scanline algorithm.

but how i still don't know how to get coordinates of mouseclick and save this in list then get next point and do the same and i don't know how many times i will need to do that


Solution

  • Capture the MouseUp event instead of the Click event. MouseUp event has a MouseEventArgs that contains the X, Y coordinates.