A 2D library to trace contours.
- Trace contours using the Theo Pavlidis' algorithm (connectivity: 4-connected)
- Trace outlines in clockwise direction
- Trace holes in counterclockwise direction
- Input format: a 2D array of bits
- Output format: a string of SVG Path commands
- User can specify to close or not the paths (with the SVG Path Z command)
For examples, have a look at the bits_to_paths function below.
A function that takes a 2D array of bits and an option as input and return a string of SVG Path commands as output.