mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-07 07:26:05 +12:00
Use DrawLines method instead of AddLine loop
This commit is contained in:
parent
c483491611
commit
749bf6e3f0
|
@ -123,14 +123,8 @@ public override void OnDraw(Graphics g)
|
|||
else
|
||||
{
|
||||
using (Pen pen = new Pen(BorderColor, BorderSize) { StartCap = LineCap.Round, EndCap = LineCap.Round, LineJoin = LineJoin.Round })
|
||||
using (GraphicsPath gp = new GraphicsPath())
|
||||
{
|
||||
for (int i = 0; i < points.Count - 1; i++)
|
||||
{
|
||||
gp.AddLine(points[i], points[i + 1]);
|
||||
}
|
||||
|
||||
g.DrawPath(pen, gp);
|
||||
g.DrawLines(pen, points.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue