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