using System;
using System.Collections.Generic;
using CrossCutting;

namespace InterpreterLibrary.Models.Transform
{
 public   class AffineTransformer : IPointTransformer
    {
        private readonly AffineTransform.Registration _registration;
        public AffineTransformer(IEnumerable<Tuple<PointF, PointF>> pointPairs)
        {
            _registration = AffineTransform.SetupTransformation(pointPairs);
        }

        public PointF TransformPoint(PointF point)
        {
            return AffineTransform.Transform(point, _registration);
        }
    }
}

