

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

public class RotatedRectangleHalfWidthNode:INode
{
    private readonly RotatedRectangleElement _owner;

    public RotatedRectangleHalfWidthNode(RotatedRectangleElement owner)
    {
        _owner = owner;
    }

    public void SetPosition(Vector2 position)
    {
        _owner.HalfWidth = (position - (_owner.Height + _owner.Location + _owner.Offset)).Length();
    }
}