using Hawkeye.VisionBuilder.Workflow.Datatypes.Elements.Parent;
using Hawkeye.VisionBuilder.Workflow.Links;

using OpenCvSharp;

namespace Hawkeye.VisionBuilder.Workflow.Datatypes.Elements.Poly;

public class PolyElement : IGraphicsElement
{
    
    public IGraphicsElement Parent { get; set; }
    public Vector2 Location { get; set; }
    public bool Editable { get; set; }
    public bool IsGood { get; set; }

    public void Draw(ICanvas canvas)
    {
        canvas.DrawPoly(Points, IsGood);
    }

    public void FillMat(Mat mat)
    {
        throw new NotImplementedException();
    }

    public INode? GetNode(Vector2 position, float thDistance)
    {
        return null;
    }

    public void SetPivot(Vector2 pivot)
    {
        throw new NotImplementedException();
    }

    public void MovePivot(Vector2 pivot)
    {
        throw new NotImplementedException();
    }

    public Vector2[] Points { get; set; } = Array.Empty<Vector2>();
}