예제 #1
0
        public override void MoveToCore(Point newPosition)
        {
            ILinearFigure figure = LinearFigure;

            Parameter   = figure.GetNearestParameterFromPoint(newPosition);
            newPosition = figure.GetPointFromParameter(Parameter);
            base.MoveToCore(newPosition);
        }
예제 #2
0
        public static Point SnapPointToFigure(this ILinearFigure figure, Point point)
        {
            var parameter = figure.GetNearestParameterFromPoint(point);

            return(figure.GetPointFromParameter(parameter));
        }