private void DrawWavyLine(Graphics graphics, Point start, Point end)
{
if (end.X - start.X < 2)
{
graphics.DrawLine(Pen, start, end);
return;
}
var offset = -1;
var points = new List<Point>();
for (int i = start.X; i <= end.X; i += 2)
{
points.Add(new Point(i, start.Y + offset));
offset = -offset;
}
graphics.DrawLines(Pen, points.ToArray());
}