Class Smoother


  • public class Smoother
    extends java.lang.Object
    • Constructor Detail

      • Smoother

        public Smoother()
    • Method Detail

      • getNearestCurveLocation

        public static CurveLocation getNearestCurveLocation​(Vertex vertex,
                                                            java.awt.geom.CubicCurve2D curve,
                                                            java.util.Map<java.lang.Double,​Point2d> samples,
                                                            SmoothedSegment smoothedSegment)
      • createSamples

        public static java.util.Map<java.lang.Double,​Point2d> createSamples​(java.awt.geom.CubicCurve2D curve)
      • getDiagonalLength

        public static double getDiagonalLength​(java.awt.Rectangle bounds)
      • sample

        public static java.util.Map<java.lang.Double,​Point2d> sample​(java.awt.geom.CubicCurve2D curve,
                                                                           int nSamples)
      • getBezierLocation

        public static void getBezierLocation​(java.awt.geom.CubicCurve2D curve,
                                             double t,
                                             Point2d sampleLocation)
      • reverse

        public static void reverse​(java.awt.geom.CubicCurve2D curve)
      • getSubCruveFromP1

        public static java.awt.geom.CubicCurve2D getSubCruveFromP1​(CurveLocation curveLocation,
                                                                   java.awt.geom.CubicCurve2D curve)
      • getSubCruveToP2

        public static java.awt.geom.CubicCurve2D getSubCruveToP2​(CurveLocation curveLocation,
                                                                 java.awt.geom.CubicCurve2D curve)
      • newCubicCurve2D

        public static java.awt.geom.CubicCurve2D newCubicCurve2D​(java.lang.Class<? extends java.awt.geom.CubicCurve2D> curveType)
        Creates a new instance of CubicCurve2D while the specific type CubicCurve2D.Float or CubicCurve2D.Double.
        Parameters:
        curveType -
        Returns:
      • createGeneralPath

        public static java.awt.geom.GeneralPath createGeneralPath​(java.util.List<SmoothedSegment> smoothedSegments)