
using OpenCvSharp;

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

public class EdgeElement:IGraphicsElement
{
    public bool Editable { get; set; }
    public bool IsGood { get; set; }
    public Vector2 Location { get; set; }
    public float Rotation { get; set; }
    public void Draw(ICanvas canvas)
    {
        float endX = Location.X + MathF.Cos(Rotation)*1000;
        float endY = Location.Y + MathF.Sin(Rotation) * 1000;
        float startX = Location.X - MathF.Cos(Rotation) * 1000;
        float startY = Location.Y - MathF.Sin(Rotation) * 1000;
        canvas.DrawLine(new Vector2(startX,startY), new Vector2(endX, endY), LineType.Construction);
    }

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

    public INode? GetNode(Vector2 position, float thDistance)
    {
        throw new NotImplementedException();
    }

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

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