Когда я рисую линию с точками и проверяю длину точек> 2:
gh.DrawLines(pen, points);
Моя ручка
Pen pen = new Pen(Color.Red,1);
Мои точки
(200,200)
(100,500)
(200,500)
Но когда я бегу, возникает исключение, как показано ниже:
System.ArgumentException
HResult=0x80070057
Message=Parameter is not valid.
Source=System.Drawing
StackTrace:
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawLines(Pen pen, PointF[] points)
at CWD.Service.DrawHelper.DrawLayer.DrawLineLayerAsync(Graphics gh, Pen pen, PointF[] points) in D:\workings\repositories\control-work-draw\CWD\CWD.Service\DrawHelper\DrawLayer.cs:line 11
at CWD.Service.DrawHelper.DrawFile.<>c__DisplayClass3_0.<ExecuteLineAsync>b__0() in D:\workings\repositories\control-work-draw\CWD\CWD.Service\DrawHelper\DrawFile.cs:line 67
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()