The basic set of transformations are illustrated below:

SVG file break_path make_abs add_subpath make_xml Internal XML consisting of M, Z, N, E, C, L and A Divided into subpaths <s> back_to_svg simplify_and_back_to_svg (mode: abs, rel, relMabs) ( toline: ctol, no) Revised SVG file reverse_path apply_transform remove_arc smooth_short_lines break_cubic path_length change_accuracy remove_line Revised SVG file remove_basic

Figure 4.1: Basic Transformations

The following pages give an introduction to each:

  • 5. Conversion to XML: the 4-stage process that generates the internal form
  • 6. Using path_ology: how to access and use the library
  • 7. Conversion back to SVG: options whether absolute or relative and what optimisations to perform
  • 8. remove_basic: translating circle, rect etc to path elements
  • 9. reverse_path: reversing a path
  • 10. apply_transform: applying a transform element to the coordinates of a path
  • 11. remove_arc: turning arc commands to cubics
  • 12. smooth_short_lines: converting two short lines to a cubic
  • 13. break_cubic: splitting a cubic into two
  • 14. path_length: finding the length of a path
  • 15. remove_line: replaces lines with curves
  • 16. change_accuracy: changes accuracy