// You can't specify a boundary, intrastroke,
    // by using the Tablet SDK's NearestPoint method.
    public int FindClosestPointTo(Point p, int start, int finish)
    {
        FcptImpl fi = new FcptImpl(stroke,p);
        GoldenSectionDescender.F f = new GoldenSectionDescender.F(fi.F);
        GoldenSectionDescender gsd = new GoldenSectionDescender(f);

        return MathEx.Round(gsd.FindMinimumWithin(start,finish,1));
    }
Esempio n. 2
0
    // You can't specify a boundary, intrastroke,
    // by using the Tablet SDK's NearestPoint method.
    public int FindClosestPointTo(Point p, int start, int finish)
    {
        FcptImpl fi = new FcptImpl(stroke, p);

        GoldenSectionDescender.F f   = new GoldenSectionDescender.F(fi.F);
        GoldenSectionDescender   gsd = new GoldenSectionDescender(f);

        return(MathEx.Round(gsd.FindMinimumWithin(start, finish, 1)));
    }