hisence-yolo-detection/XKRS.UI/Polygon.cs

48 lines
1016 B
C#
Raw Normal View History

2024-06-17 11:02:28 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace XKRS.UI
{
public class Polygon
{
// public ShapesContent[]? shapes { get; set; }
public Color FillColor { get; set; }
public Color LineColor { get; set; }
private List<PointF> Points = new List<PointF>();
public Polygon()
{
}
public Polygon(Color fillColor, Color lineColor, List<PointF> points)
{
FillColor = fillColor;
LineColor = lineColor;
Points = points;
}
public void SetPoints(List<PointF> pointsList)
{
this.Points = pointsList;
}
public void AddPoint(PointF p)
{
Points.Add(p);
}
public void RemovePoint(int index)
{
Points.RemoveAt(index);
}
public List<PointF> GetPoints()
{
return Points;
}
}
}