Class Scribbler



  • public class Scribbler
    extends Object
    This scribbles an existing path to create a casual, hand-drawn (scribbled) look.
    • Constructor Detail

      • Scribbler

        public Scribbler()
    • Method Detail

      • create

        public static GeneralPath create(Shape s,
                                         float tol,
                                         float movement)
        Parameters:
        tol - a float from [0,1]
        movement - a float from [0,1]
      • create

        public static GeneralPath create(Shape s,
                                         float tol,
                                         float movement,
                                         long randomSeed)
        Parameters:
        tol - a float from [0,1]
        movement - a float from [0,1]
      • create

        public static void create(Shape s,
                                  float tol,
                                  float movement,
                                  long randomSeed,
                                  PathWriter writer)
        Parameters:
        tol - a float from [0,1]
        movement - a float from [0,1]
      • fillBody

        public static Shape fillBody(Shape body,
                                     float strokeWidth,
                                     double angle,
                                     double density)
        Parameters:
        body - the shape to fill
        strokeWidth - the width of the stroke.
        angle - the angle (in radians) to scribble
        density - a float from [0,1]
        Returns:
        a shape that resembles a crayon scribbling the body