When previous states have exactly used up the length of the decorated path, the coordinate transformation of the final state is the one belonging to the first state (usually initial). When there is some length remaining, the transformation is correct.
\pgfpointdecoratedpathlast is correct in both cases, which is probably why this is not an issue in the standard decorations.
Minimal working example (MWE)
Blue circles mark (0pt,0pt) in the initial state, the red circle marks (0pt,0pt) in the final state, the green circle marks \pgfpointdecoratedpathlast.
Brief outline of the bug
When previous states have exactly used up the length of the decorated path, the coordinate transformation of the
final
state is the one belonging to the first state (usuallyinitial
). When there is some length remaining, the transformation is correct.\pgfpointdecoratedpathlast
is correct in both cases, which is probably why this is not an issue in the standard decorations.Minimal working example (MWE)
Blue circles mark
(0pt,0pt)
in theinitial
state, the red circle marks(0pt,0pt)
in thefinal state
, the green circle marks\pgfpointdecoratedpathlast
.