mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-05 20:54:31 +13:00
Use DrawLines method instead of AddLine loop
This commit is contained in:
parent
c483491611
commit
749bf6e3f0
1 changed files with 1 additions and 7 deletions
|
@ -123,14 +123,8 @@ public override void OnDraw(Graphics g)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
using (Pen pen = new Pen(BorderColor, BorderSize) { StartCap = LineCap.Round, EndCap = LineCap.Round, LineJoin = LineJoin.Round })
|
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++)
|
g.DrawLines(pen, points.ToArray());
|
||||||
{
|
|
||||||
gp.AddLine(points[i], points[i + 1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
g.DrawPath(pen, gp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue