/// <summary> /// Construct bezier control points from points /// </summary> /// <param name="stylusPoints">Original StylusPointCollection</param> /// <param name="fitError">Fitting error</param> /// <returns>Whether the algorithm succeeded</returns> internal bool ConstructBezierState(StylusPointCollection stylusPoints, double fitError) { // If the point count is zero, the curve cannot be constructed if ((null == stylusPoints) || (stylusPoints.Count == 0)) return false; // Compile list of distinct points and their nodes CuspData dat = new CuspData(); dat.Analyze(stylusPoints, fitError /*typically zero*/); return ConstructFromData(dat, fitError); }
/// <summary> /// Construct bezier control points from points /// </summary> /// <param name="stylusPoints">Original StylusPointCollection</param> /// <param name="fitError">Fitting error</param> /// <returns>Whether the algorithm succeeded</returns> internal bool ConstructBezierState(StylusPointCollection stylusPoints, double fitError) { // If the point count is zero, the curve cannot be constructed if ((null == stylusPoints) || (stylusPoints.Count == 0)) { return(false); } // Compile list of distinct points and their nodes CuspData dat = new CuspData(); dat.Analyze(stylusPoints, fitError /*typically zero*/); return(ConstructFromData(dat, fitError)); }