Skip to content

Optimize path decoration with redundancy check#1439

Open
peaR-red wants to merge 1 commit into
pgf-tikz:masterfrom
peaR-red:peaR-red-patch-1
Open

Optimize path decoration with redundancy check#1439
peaR-red wants to merge 1 commit into
pgf-tikz:masterfrom
peaR-red:peaR-red-patch-1

Conversation

@peaR-red

@peaR-red peaR-red commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Instruct the decoration automaton to drop any moveto that is purely redundant by updating \pgf@path@last... to \pgfpoint@decorate@existingpathlast and evaluates the x and y coordinates against \pgf@path@last... counterparts to suppress unnecessary moveto operations.

Motivation for this change
First reported in https://tex.stackexchange.com/q/761240/399147, nested decorations in the decorate subpath disconnect them from the rest of the path. The effect is most visible with --cycle.

Checklist

Please signoff your commits to explicitly state your agreement to the Developer Certificate of Origin. If that is not possible you may check the boxes below instead:

Added redundancy check to avoid unnecessary moveto commands. (see https://tex.stackexchange.com/q/761240/399147)
@peaR-red

Copy link
Copy Markdown
Contributor Author

Requesting follow-up...

@hmenke

hmenke commented Jun 16, 2026

Copy link
Copy Markdown
Member

On 2026-06-15 a more comprehensive testsuite was introduced for PGF/TikZ. This tests all new contributions against the examples extracted from the manual and checks whether anything has changed to avoid regressions. Since this pull request was opened before that, these tests were not run automatically. I have run l3build check on the result of the merge of this pull request branch into master. The result can be found below.

Tip

Your pull request might have failed some tests. This does not mean that your contribution will be rejected. In fact, depending on the changes you propose, it might even be expected that some tests fail, however, this needs to be evaluated carefully.

Failed tests
  • pdftex
    • config-examples
      • pgfmanual-en-base-decorations
      • pgfmanual-en-library-circuits
      • pgfmanual-en-library-decorations
      • pgfmanual-en-library-mindmaps
      • pgfmanual-en-library-spy
      • pgfmanual-en-tikz-actions
      • pgfmanual-en-tikz-decorations
      • pgfmanual-en-tikz-shapes
      • pgfmanual-en-tutorial-map
      • pgfmanual-en-tutorial-nodes
  • latexdvips
    • config-examples
      • pgfmanual-en-base-decorations
      • pgfmanual-en-library-circuits
      • pgfmanual-en-library-decorations
      • pgfmanual-en-library-mindmaps
      • pgfmanual-en-library-spy
      • pgfmanual-en-tikz-actions
      • pgfmanual-en-tikz-decorations
      • pgfmanual-en-tikz-shapes
      • pgfmanual-en-tutorial-map
      • pgfmanual-en-tutorial-nodes
  • latexdvisvgm
    • config-examples
      • pgfmanual-en-base-decorations
      • pgfmanual-en-gd-overview
      • pgfmanual-en-library-circuits
      • pgfmanual-en-library-decorations
      • pgfmanual-en-library-mindmaps
      • pgfmanual-en-library-spy
      • pgfmanual-en-tikz-actions
      • pgfmanual-en-tikz-decorations
      • pgfmanual-en-tikz-shapes
      • pgfmanual-en-tutorial-map
      • pgfmanual-en-tutorial-nodes
  • luatex
    • config-examples
      • pgfmanual-en-base-decorations
      • pgfmanual-en-gd-overview
      • pgfmanual-en-library-circuits
      • pgfmanual-en-library-decorations
      • pgfmanual-en-library-mindmaps
      • pgfmanual-en-library-spy
      • pgfmanual-en-tikz-actions
      • pgfmanual-en-tikz-decorations
      • pgfmanual-en-tikz-shapes
      • pgfmanual-en-tutorial-map
      • pgfmanual-en-tutorial-nodes
  • xetex
    • config-examples
      • pgfmanual-en-base-decorations
      • pgfmanual-en-library-circuits
      • pgfmanual-en-library-decorations
      • pgfmanual-en-library-mindmaps
      • pgfmanual-en-library-spy
      • pgfmanual-en-tikz-actions
      • pgfmanual-en-tikz-decorations
      • pgfmanual-en-tikz-shapes
      • pgfmanual-en-tutorial-map
      • pgfmanual-en-tutorial-nodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants