Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion tex/generic/pgf/modules/pgfmoduledecorations.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,12 @@
\pgfgetpath\pgfdecoratedpath%
\pgfsetpath\pgfdecorateexistingpath%
%
% Restore the last path coordinates for the automaton's
% redundancy check.
%
\pgf@process{\pgfpoint@decorate@existingpathlast}
\global\pgf@path@lastx=\pgf@x
\global\pgf@path@lasty=\pgf@y
\ifx\pgfdecoratedpath\pgfutil@empty%
\pgferror{I cannot decorate an empty path}%
\else%
Expand Down Expand Up @@ -1238,7 +1244,19 @@
\pgf@decorate@is@closepath@false%
\pgf@decorate@currentinputsegmentobject%
\ifx\pgfdecorationcurrentinputsegment\pgfdecorationinputsegmentmoveto%
\pgfpathmoveto{\pgf@decorate@inputsegment@first}%
%
% Avoid a \pgfpathmoveto if we are already in the exact same
% coordinate.
%
\pgf@process{\pgf@decorate@inputsegment@first}
\ifdim\pgf@x=\pgf@path@lastx\relax%
\ifdim\pgf@y=\pgf@path@lasty\relax%
\else%
\pgfpathmoveto{\pgf@decorate@inputsegment@first}%
\fi%
\else%
\pgfpathmoveto{\pgf@decorate@inputsegment@first}%
\fi%
\let\pgfdecorationpreviousinputsegment\pgfdecorationcurrentinputsegment%
\let\pgf@decorate@currentinputsegmentobject\pgf@decorate@nextinputsegmentobject%
\pgf@decorate@getnextinputsegmentobject\pgf@decorate@nextinputsegmentobject%
Expand Down