Skip to content

Naming conventions

Paul van Dinther edited this page Sep 25, 2021 · 1 revision

There is a tradeoff between code readability and being able to oversee a sequence of fairly simple commands. The designers of the svg path syntax clearly decided to keep commands very short. One character in fact. Pathbuilder sticks with the same syntax and as such defines the 20 one character command modules as well.

In order for pathBuilder to work as a single file tool, it brings along bunch of fairly generic utilities which are all prefixed with pb_ this is done to keep them out of the way of other library code you might have. functions intended for internal use are designated to be private and are prefixed with pb

The main high level commands such as svgPath, svgShape are considered specific enough that they are not prefixed.

Clone this wiki locally