Regarding PGF decorations, consider the two dimensions with the catchy names (p. 1001 of the TikZ & PGF manual for version 3.0.1a)
\pgfdecoratedinputsegmentremainingdistance... The remaining distance on the current input segment of the input path.
\pgfdecoratedinputsegmentcompleteddistance... The completed distance on the current input segment of the input path.
I don't understand
- what an input segment is?
- how PGF calculates the remaining (resp. completed) distance on the current input segment?
The answer to the first question is complicated by the fact that there are several similar concepts that can be described as input segments.
- An input segment is a part of the input path. Every path breaks down to zero or more parts. Generally speaking, a part starts with a
movetooperation, and ends just before the next
movetooperation or just before the next
pgfuseoperation, whichever comes first.
- An input segment is the subset of the path that corresponds to a single path extending operation:
The input path may consist of many line and curve input segments (for example, a circle or an ellipse consists of four curves.) (bottom of p. 996)
- The input path is broken into segments by the decoration automaton as follows: when the automaton enters a new state,
s, the next segment is that subset of the input path from the end,
e, of the previous segment to the point,
p, further along the input path, whose curvilinear distance from
eis specified by
- A segment(1) can consist of several segments(2).
- A segment(2) can consist of several segments(3).
- A segment(3) can span several segments(1) as well as several segments(2).
The answer to the second question is complicated by the following facts:
The decoration output path is not the same as the decoration input path.
'The width the you provide need not be the “real” width of the segment, which allows decoration segments to overlap or to be spaced far apart.' (p. 997)