From 749bf6e3f077c865dc9923c3a7950bad40989caf Mon Sep 17 00:00:00 2001 From: Jaex Date: Fri, 2 Sep 2016 19:53:53 +0300 Subject: [PATCH] Use DrawLines method instead of AddLine loop --- .../Shapes/Drawing/FreehandDrawingShape.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ShareX.ScreenCaptureLib/Shapes/Drawing/FreehandDrawingShape.cs b/ShareX.ScreenCaptureLib/Shapes/Drawing/FreehandDrawingShape.cs index 98b862697..fad86b676 100644 --- a/ShareX.ScreenCaptureLib/Shapes/Drawing/FreehandDrawingShape.cs +++ b/ShareX.ScreenCaptureLib/Shapes/Drawing/FreehandDrawingShape.cs @@ -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()); } }