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
Post a Comment