liveBook · Manning

Path

As explained in How Computers Make Books

A path is an ordered sequence of graphical segments that defines a connected outline or shape.

A single Bézier curve can make a graceful stroke, but a letterform needs more than one stroke. A path is a chain of curve segments: the endpoint of each segment meets the endpoint of the next, so the segments together trace an outline. Paths let a designer build a complicated shape from small, adjustable pieces rather than trying to describe the whole shape at once. section 2.2

Figure 2.6 Three Bézier curve chains (paths) used to draw an ampersand character

An ampersand is assembled from three paths: one traces the main shape, while two separate paths trace its holes. Together they contain 58 curves, including five straight lines. section 2.2

Joining endpoints is necessary, but it does not guarantee a polished outline. If adjacent endpoints do not meet, the path has a gap and is discontinuous. If they meet, it is continuous; it becomes smooth continuous only when the control points at the join lie opposite one another at 180°, avoiding a change in slope. Otherwise the join remains a visible corner. section 2.2

A path can also be an outline used for filling. An O uses two separate closed paths, an outer boundary and an inner boundary. With the even–odd rule, a point is filled when a line from it to the outside crosses the outline an odd number of times, leaving the inner path as a hole. That rule can give an unwanted result when a path crosses itself. section 2.3

The nonzero filling rule instead counts crossings by direction: clockwise crossings add 1 and anticlockwise crossings subtract 1. A nonzero total is filled, which handles the self-crossing case, but can fill an O’s hole too. Reversing the direction of either the inner or outer path restores the hole, showing that path direction can affect the final printed shape. section 2.3

A hole in an O

Imagine a point in the middle of an O. A line from that point to outside crosses the outer and inner outlines twice, an even number, so even–odd filling leaves it unpainted. Under nonzero filling, orient one of the two paths in the opposite direction so their directional crossing counts cancel for the hole. section 2.3

How How Computers Make Books covers it

How deep it goes
Explains endpoint continuity, smooth joins, gaps, fill rules, self-crossings, and path reversal without formal path-data syntax.
Examples
Illustrates paths through an ampersand with three curve chains, an O with inner and outer boundaries, and a self-crossing outline.
What it assumes
Starts from interactive Bézier control points and introduces paths through visible letter-shape construction.
What you can do after
Evaluate/understand how joining, smoothing, orienting, and filling paths changes a rendered letter shape.
How it connects
Connects paths with Bézier curves, control points, continuity, letterforms, even–odd filling, and nonzero filling.

Also explained in

Compare how 4 books explain path →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of How Computers Make Books. The section links point to the parts of the book it draws on.