Package snap.geom

Class PathFitCurves

java.lang.Object
snap.geom.PathFitCurves

public class PathFitCurves extends Object
Bezier curve fitting code adapted from "An Algorithm for Automatically Fitting Digitized Curves", by Philip J. Schneider "Graphics Gems", 1990 - Andrew S. Glassner, ed.
  • Constructor Details

    • PathFitCurves

      public PathFitCurves()
  • Method Details

    • fitCurveFromPointIndex

      public static void fitCurveFromPointIndex(Path2D aPath, int anIndex)
      Takes a path with a bunch of line-to segments and replaces them with curves.
    • getCurveFitPathForPoints

      public static Shape getCurveFitPathForPoints(Point[] thePoints)
      Returns a curve fit path for given points.