c# - How do I draw a line between all the drawn points? -


in paint event did:

list<point> drawpoints = getdrawpoints();  if (drawpoints.count > 1) {     foreach (point p in drawpoints)     {         e.graphics.drawline(pen, p.x - 2, p.y - 2, 4, 4);     } } 

but instead of drawing lines between subsequential points, it's drawing 2 lines same place each point.

i want connect point single line.

use drawlines , pass list array:

if (drawpoints.count > 1) {     e.graphics.drawlines(pen, drawpoints.toarray()); } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -