Description
1. Draw lines using your mouse.
2. Use the drawing panel we used in class remove the for-loop
a. Create global list of line objects
b. Add a MouseDown and a MouseMove listener
c. In MouseDown start line and add to Line list
d. In mouseMove add points to the line
e. In OnPaint, draw those lines
f. Any changes to the lines (creating lines, adding points to the line, etc.), need to force the
OnPaint to kick in and redraw. To do this you need to call Invalidate() to kick that off
i. This should cause jumping and lots of redraws that will look bad
ii. To fix this set the panel’s DoubleBuffered = true
g. You can set global values for color and pen thickness to be used by lines
Reviews
There are no reviews yet.