mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-07 07:26:05 +12:00
Use AddPolygon method instead of AddLine loop
This commit is contained in:
parent
749bf6e3f0
commit
1d24e205b2
|
@ -97,16 +97,9 @@ public override void OnUpdate()
|
|||
|
||||
public override void OnShapePathRequested(GraphicsPath gp, Rectangle rect)
|
||||
{
|
||||
if (points.Count > 1)
|
||||
if (points.Count > 2)
|
||||
{
|
||||
gp.StartFigure();
|
||||
|
||||
for (int i = 0; i < points.Count - 1; i++)
|
||||
{
|
||||
gp.AddLine(points[i], points[i + 1]);
|
||||
}
|
||||
|
||||
gp.CloseFigure();
|
||||
gp.AddPolygon(points.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue