summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex164
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex37
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex3
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex16
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex21
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex655
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex46
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex183
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex14
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex417
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex228
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex228
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex42
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex124
-rw-r--r--Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex26
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.code.tex53
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.ee.IEC.code.tex117
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.ee.code.tex17
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.CDH.code.tex7
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.IEC.code.tex11
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.US.code.tex11
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.code.tex7
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.3d.code.tex23
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.barcharts.code.tex8
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex455
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.formats.functions.code.tex6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.polar.code.tex64
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.sparklines.code.tex11
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex836
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.standard.code.tex22
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex273
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary3d.code.tex45
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryangles.code.tex42
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex904
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryautomata.code.tex92
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybabel.code.tex6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybackgrounds.code.tex76
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybending.code.tex6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex126
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex120
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarychains.code.tex54
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.code.tex38
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.footprints.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.fractals.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.markings.code.tex12
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathmorphing.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathreplacing.code.tex40
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.shapes.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.text.code.tex188
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryer.code.tex22
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfadings.code.tex16
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfit.code.tex21
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfixedpointarithmetic.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex1831
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfpu.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex62
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarylindenmayersystems.code.tex116
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex1014
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex50
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex177
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.code.tex12
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.meta.code.tex24
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypetri.code.tex138
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplothandlers.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypositioning.code.tex46
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex44
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryrdf.code.tex291
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryscopes.code.tex34
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadings.code.tex6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadows.code.tex19
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.arrows.code.tex6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.callouts.code.tex30
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.code.tex14
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.IEC.code.tex50
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.US.code.tex52
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.geometric.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.misc.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.multipart.code.tex26
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.symbols.code.tex8
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysnakes.code.tex36
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex18
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysvg.path.code.tex12
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarythrough.code.tex6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex41
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytrees.code.tex44
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryturtle.code.tex30
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryviews.code.tex45
-rw-r--r--Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex2563
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings/Binding.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings/BindingToPGF.lua102
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/Tantau2012.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/library.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Anchoring.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentAlign.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDirection.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDistance.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentOrder.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Distances.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/FineTune.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/LayoutPipeline.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/NodeAnchors.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Orientation.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Sublayouts.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/library.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Cluster.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Edge.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Graph.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Iterators.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Node.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Vector.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FMMMLayout.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FastMultipoleEmbedder.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/GEMLayout.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/MultilevelLayout.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFR.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFRExact.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderKK.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/BarycenterPlacer.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/CirclePlacer.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/EdgeCoverMerger.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/IndependentSetMerger.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/LocalBiconnectedMerger.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MatchingMerger.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MedianPlacer.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomMerger.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomPlacer.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarMerger.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarPlacer.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/ZeroPlacer.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/BarycenterHeuristic.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/CoffmanGrahamRanking.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/DfsAcyclicSubgraph.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastHierarchyLayout.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastSimpleHierarchyLayout.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyCycleRemoval.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyInsertHeuristic.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/LongestPathRanking.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/MedianHeuristic.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/OptimalRanking.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SiftingHeuristic.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SplitHeuristic.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SugiyamaLayout.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/BalloonLayout.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/CircularLayout.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/AcyclicSubgraphModule.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/HierarchyLayoutModule.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/InitialPlacer.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/MultilevelBuilder.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/RankingModule.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/TwoLayerCrossMin.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity/PlanarizationLayout.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleDemo.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleEdgeDemo.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleHuffman.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/library.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/GraphAnimationCoordination.lua638
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/GreedyTemporalCycleRemoval.lua177
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/Skambath2016.lua875
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/Supergraph.lua570
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/SupergraphVertexSplitOptimization.lua196
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/TimeSpec.lua60
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/doc.lua116
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/layered.lua107
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/library.lua33
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/CoarseGraph.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/Control.lua28
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlCoarsening.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlDeclare.lua41
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlElectric.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlIteration.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlSprings.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlStart.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/QuadTree.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalHu2006.lua16
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalLayouts.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalWalshaw2000.lua14
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringHu2006.lua9
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringLayouts.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/library.lua4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceCore.lua14
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToAlgorithms.lua6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToC.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToDisplay.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/Scope.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CrossingMinimizationGansnerKNV1993.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990a.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990b.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalEadesLS1993.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/EdgeRoutingGansnerKNV1993.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NetworkSimplex.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodePositioningGansnerKNV1993.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingGansnerKNV1993.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingMinimumHeight.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/Ranking.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/Sugiyama.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/crossing_minimization.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/cycle_removal.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/edge_routing.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/library.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_positioning.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_ranking.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib.lua28
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Bezier.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/DepthFirstSearch.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Direct.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Event.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/LookupTable.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/PathLengths.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/PriorityQueue.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Simplifiers.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Stack.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Storage.lua4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Transform.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Arc.lua35
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Collection.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Coordinate.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Digraph.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Edge.lua10
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Hyperedge.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path.lua6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path_arced.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua37
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/library.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/ogdf.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/ogdf/library.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/Koerner2015.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/library.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/AuthorDefinedPhylogeny.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedMinimumEvolution.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedNearestNeighbourInterchange.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/DistanceMatrix.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/Maeusle2012.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/PhylogeneticTree.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/SokalMichener1958.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/library.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar.lua6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/BoyerMyrvold2004.lua678
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/Embedding.lua787
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/LinkedList.lua88
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/List.lua49
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/PDP.lua576
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/PlanarLayout.lua159
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/ShiftMethod.lua128
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/library.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/parameters.lua144
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/Hints.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/NecklaceRouting.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/library.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/tools/make_gd_wrap.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/ChildSpec.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/ReingoldTilford1981.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/SpanningTreeComputation.lua4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/doc.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/library.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/experimental/tikzlibrarygraphdrawing.evolving.code.tex21
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.circular.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex499
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.examples.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.force.code.tex14
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.layered.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.trees.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex101
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.barcharts.code.tex34
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.formats.functions.code.tex46
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.polar.code.tex54
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.footprints.code.tex52
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.fractals.code.tex28
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex52
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathmorphing.code.tex103
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex163
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.shapes.code.tex186
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.text.code.tex522
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgf/luamath/functions.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgf/luamath/parser.lua30
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgflibraryluamath.code.tex231
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex112
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex149
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.spaced.code.tex118
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarycurvilinear.code.tex52
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex34
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfixedpointarithmetic.code.tex881
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfpu.code.tex3329
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex1484
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarylindenmayersystems.code.tex356
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex336
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.meta.code.tex56
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex270
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex188
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryprofiler.code.tex634
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshadings.code.tex42
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex6
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysvg.path.code.tex142
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytimelines.code.tex197
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.ee.IEC.code.tex425
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.ee.code.tex137
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.IEC.code.tex408
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.US.code.tex4312
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.code.tex34
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.arrows.code.tex4579
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.callouts.code.tex1570
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.code.tex10
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.geometric.code.tex8070
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.misc.code.tex2100
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.multipart.code.tex2118
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.symbols.code.tex548
-rw-r--r--Master/texmf-dist/tex/generic/pgf/lua/pgf/manual.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/lua/pgf/manual/DocumentParser.lua2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex17
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex53
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex17
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex26
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleanimations.code.tex1314
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex12
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmodulenonlineartransformations.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex37
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleparser.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex40
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesorting.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/pgf.revision.tex15
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg3
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf-via-dvi.def53
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def8
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def7
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def1325
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvi.def4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfm.def58
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def12
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def32
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def149
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-luatex.def14
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def7
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def4
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def8
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex823
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysanimations.code.tex2009
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex11
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex23
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex10
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex90
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex579
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def3
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def12
-rw-r--r--Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def32
-rw-r--r--Master/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pgf/compatibility/pgfarrows.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pgf/compatibility/pgfautomata.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pgf/compatibility/pgfheaps.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pgf/compatibility/pgfnodes.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pgf/compatibility/pgfshade.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex17
-rw-r--r--Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.prettyprinter.code.tex51
-rw-r--r--Master/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex5
-rw-r--r--Master/texmf-dist/tex/latex/pgf/utilities/pgfpages.sty105
-rw-r--r--Master/texmf-dist/tex/latex/pgf/utilities/xxcolor.sty2
-rw-r--r--Master/texmf-dist/tex/plain/pgf/basiclayer/pgf.tex2
397 files changed, 37358 insertions, 23417 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
index 8a7ab4a2862..cae780ebfba 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
@@ -7,9 +7,10 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcore.code.tex,v 1.7 2010/04/11 07:09:19 ludewich Exp $
+\ProvidesPackageRCS{pgfcore.code.tex}
\newif\ifpgf@draftmode
+\def\pgf@typeout{\immediate\write0}
\input pgfmath.code.tex
@@ -28,8 +29,9 @@
\input pgfcorelayers.code.tex
\input pgfcoretransparency.code.tex
\input pgfcorepatterns.code.tex
+\input pgfcorerdf.code.tex
\pgfutil@ifundefined{pgf@texdist@protect}{%
- \def\pgf@texdist@protect{}%
+ \def\pgf@texdist@protect{}%
}{}
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
index 887e86e00e7..843a8cd23f4 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorearrows.code.tex,v 1.43 2015/05/14 14:43:05 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfcorearrows.code.tex}
@@ -19,7 +19,7 @@
%
% This command is used to define a new arrow tip kind. For more
% details on the description of the keys, please see the pgfmanual.
-%
+%
% name = Name of the arrow. If the name contains a dash
% (hyphen), the text before the hyphen is the start name
% and the text behind it the end name.
@@ -36,7 +36,7 @@
% will then be available inside the "code". Values needed
% only for the "... end" keys and the convex hull do not
% need to be saved since these are also executed only
-% once.
+% once.
% drawing code = Code for drawing the arrow. When the cache key is set to
% true, which is the default, the code will be protocolled
% and the resulting code is inserted using \pgflowlevelobj.
@@ -56,10 +56,10 @@
% arrow tip was already installed with the same macro
% names (and caching is true), the cached code is
% used. Note that when you use dimensions here, add \the.
-%
-% Inside the setup code, the following macros are available:
%
-% \pgfarrowsettipend
+% Inside the setup code, the following macros are available:
+%
+% \pgfarrowssettipend
% The code should draw an arrow pointing "right along the x
% axis". The "tip" key specifies how far the arrow goes
% along the x axis, that is, it should be the x coordinate
@@ -69,20 +69,20 @@
% "\pgfarrowresult", which is \let to be equal to
% \pgf@x. A \relax will be added after the code provided
% here, so you can write things like "\pgfarrowresult=1pt".
-% \pgfarrowsetbackend
+% \pgfarrowssetbackend
% The leftmost x-coordinate that is still part of the
% arrow tip (the "back end" of the arrow"). This coordinate
% will be used when multiple arrow tips are
% composed. Defaults to 0pt.
-% \pgfarrowsetlineend
+% \pgfarrowssetlineend
% The x-coordinate where a line should stop inside the arrow
% tip so that it gets "obscured" by the arrow. Defaults to 0pt.
-% \pgfarrowsetvisualtipend
+% \pgfarrowssetvisualtipend
% When the arrow tip is drawn in flex mode, it is rotated
% such that the x-coordinates of "visual tip end" and "visual
-% back end" lie on the path. Defaults to \pgfarrowsettipend.
-% \pgfarrowsetvisualbackend
-% See above. Defaults to \pgfarrowsetbackend
+% back end" lie on the path. Defaults to \pgfarrowssettipend.
+% \pgfarrowssetvisualbackend
+% See above. Defaults to \pgfarrowssetbackend
\def\pgfdeclarearrow#1{%
\let\pgf@decl@arrow@defaults\pgfutil@empty%
@@ -136,10 +136,10 @@
\expandafter\let\csname pgf@ar@do@cache@\pgf@decl@arrow@name@end\endcsname\pgf@decl@arrow@cache%
\else%
\pgferror{Arrow tip '\pgf@decl@arrow@name@end' was already
- defined with key 'means' previously and you cannot change this}%
+ defined with key 'means' previously and you cannot change this}%
\fi%
\else%
- \pgferror{You cannot set both the 'means' and also the 'drawing code'
+ \pgferror{You cannot set both the 'means' and also the 'drawing code'
keys for arrow tip '\pgf@decl@arrow@name@end'}%
\fi%
\fi%
@@ -185,11 +185,11 @@
% Handler for defining arrow tips:
-%
+%
% Description:
-%
+%
% When you write "my name/.tip = arrow spec", this has the same
-% effect as writeing \pgfdeclarearrow{name = my name, means = arrow spec}.
+% effect as writing \pgfdeclarearrow{name = my name, means = arrow spec}.
\pgfkeys{/handlers/.tip/.code=%
\expandafter\expandafter\expandafter\pgf@arrows@unravel\pgfkeyscurrentpath/\pgf@stop%
@@ -201,11 +201,11 @@
% Draw an arrow
-%
+%
% #1 = arrow specification
-%
+%
% Description:
-%
+%
% Draws the arrow in the given specification (and "end"
% specification). The arrow will be drawn such that it touches the
% origin "from the left", that is, the arrow will lie completely in
@@ -223,14 +223,14 @@
% Compute the length of an arrow
-%
+%
% #1 = arrow specification
-%
+%
% Description:
-%
+%
% In \pgf@x, this will return the total length of the arrow given as
% #1, in \pgf@xa it will return the distance from the tip to the line
-% end.
+% end.
\def\pgfarrowtotallength#1{%
{%
@@ -250,10 +250,10 @@
% #1 = An arrow specification
%
% Description:
-%
+%
% An "arrow specification" is a sequence of names of meta arrow tips
% together with options in brackets. In detail:
-%
+%
% In #1, consider the text from the start up to the first bracket. If
% this text is the name of a (meta) arrow tip, we use this arrow tip
% with the provided options. If it is the name of a arrow tip
@@ -261,8 +261,8 @@
% each arrow tip inside the shorthand. If the text is neither or the
% above, the first letter of text is treated as a shorthand without
% options.
-%
-% The special arrow tip "." is used to indicate the end of the line.
+%
+% The special arrow tip "." is used to indicate the end of the line.
%
% \pgfsetarrowsend{stealth[reversed]}
% \pgfsetarrowsend{stealth[length=1pt] . stealth[length=2pt]}
@@ -322,11 +322,11 @@
\fi%
\fi%
\fi%
- \expandafter\pgf@next\pgf@temp[%
+ \expandafter\pgf@next\pgf@temp[%
}
\def\pgf@arrows@empty[#1]{%
- \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
+ \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
}
\def\pgf@arrows@single@char@parser#1{%
@@ -343,13 +343,13 @@
\let\pgf@temp\pgf@untranslated%
\let\pgf@next\pgf@arrows@unknown%
\else%
- \let\pgf@next\pgf@arrows@shorthand@parsed%
+ \let\pgf@next\pgf@arrows@shorthand@parsed%
\fi%
\else%
- \let\pgf@next\pgf@arrows@meta@parsed%
+ \let\pgf@next\pgf@arrows@meta@parsed%
\fi
\fi
- \expandafter\pgf@next\pgf@temp[]%
+ \expandafter\pgf@next\pgf@temp[]%
}
\def\pgf@arrows@unknown#1[]#2[#3]{%
\pgferror{Unknown arrow tip kind '#1#2'}%
@@ -357,12 +357,12 @@
\def\pgf@arrows@meta@parsed#1[#2]{%
% Ok, run the keys #2. This will add commands to \pgf@arrows@options:
- %
+ %
\let\pgf@arrows@options\pgf@arrows@options@initial%
\pgfkeys{/pgf/arrow keys/.cd,#2}%
% Append the arrow and its options to the arrow tip sequence:
\expandafter\pgf@arrows@meta@set\expandafter{\pgf@arrows@options}{#1}{\pgf@arrow@handle}%
- \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
+ \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
}
\def\pgf@arrows@parser@done#1{%
@@ -370,7 +370,7 @@
\def\pgf@arrows@dot@parsed#1[#2]{%
\pgf@arrows@append@to@tips{\pgf@arrow@handle@dot}%
- \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
+ \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
}
\def\pgf@arrows@meta@set#1#2#3{%
@@ -385,7 +385,7 @@
\fi%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\pgf@arrow@tip@sequence%
- \expandafter\expandafter\expandafter{\expandafter\pgf@tempa\pgf@tempb}%
+ \expandafter\expandafter\expandafter{\expandafter\pgf@tempa\pgf@tempb}%
}
\def\pgf@arrows@shorthand@parsed#1[#2]{%
@@ -398,7 +398,7 @@
\expandafter\expandafter\expandafter\pgf@arrows@meta@set\expandafter\expandafter\expandafter{%
\expandafter\pgf@arrows@options\expandafter}\expandafter{\csname pgf@ar@means@#1\endcsname}{\pgf@arrow@handle@shorthand}%
\fi%
- \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
+ \pgfutil@ifnextchar\pgf@stop\pgf@arrows@parser@done\pgfarrows@parser%
}
@@ -426,7 +426,7 @@
% #1 = An arrow specification
%
% Description:
-%
+%
% This works like \pgfsetarrowsend, only the order of the tips in the
% arrow specification is reversed and the "reversed names" are used.
%
@@ -517,14 +517,14 @@
},
fill/.value required,
open/.style={fill=none},
- .unknown/.code={
+ .unknown/.code={
\expandafter\pgfutil@in@\expandafter!\expandafter{\pgfkeyscurrentname}%
\ifpgfutil@in@%
% this is a color!
\expandafter\pgfarrowsaddtooptions\expandafter{\expandafter\def\expandafter\pgf@arrows@stroke@color\expandafter{\pgfkeyscurrentname}}%
\else%
\pgfutil@doifcolorelse{\pgfkeyscurrentname}
- {%
+ {%
\expandafter\pgfarrowsaddtooptions\expandafter{\expandafter\def\expandafter\pgf@arrows@stroke@color\expandafter{\pgfkeyscurrentname}}%
}
{%
@@ -586,7 +586,7 @@
\pgf@x#1%
\ifdim\pgfinnerlinewidth>0pt%
\pgf@arrows@inner@line@width@dep{#2}{#3}%
- \else%
+ \else%
\advance\pgf@x by#2\pgflinewidth%
\fi%
}
@@ -618,12 +618,12 @@
\def\pgf@arrow@id@count{0}%
% Compute the arrow id of an arrow
-%
+%
% #1 = arrow name
% #2 = options
-%
+%
% Description:
-%
+%
% Returns the an id in \pgf@arrow@id that identifies the instantiation
% of the given arrow. If the arrow was not instantiated, this happens now.
@@ -637,7 +637,7 @@
% 3. Local:
#2\relax%
% 4. Nested:
- \pgf@arrows@nested@options%
+ \pgf@arrows@nested@options%
% 5. Last options:
\pgf@arrows@late@options%
% 6. Scaling:
@@ -658,6 +658,7 @@
\expandafter\global\expandafter\let\csname\pgf@arrow@fullname{#1}\endcsname\pgf@arrow@id@count%
\global\let\pgf@arrow@id\pgf@arrow@id@count%
{%
+ \pgfclearid%
\csname pgf@ar@setup@#1\endcsname%
% Handle reversal
\ifpgfarrowreversed%
@@ -773,12 +774,12 @@
\def\pgfarrowssetvisualbackend#1{\pgf@x#1\edef\pgf@arrows@the@visualbackend{\the\pgf@x}}
-% Internal computatin of the line end (shortening) for an arrow
-%
+% Internal computation of the line end (shortening) for an arrow
+%
% #1 = arrow tip list
-%
+%
% Description:
-%
+%
% \pgf@xa will contain the necessary path shortening for the given
% arrow tip list, \pgf@xb will contain the total length of the arrow
% tip list (sum of the differences between tip end and back end plus
@@ -820,15 +821,52 @@
+\def\pgf@arrow@rigid@arrow#1#2{%
+ {%
+ \pgf@xb=#2%
+ \pgftransformxshift{-\pgf@xb}%
+ \let\pgf@arrow@handle\pgf@arrow@rigid
+ \let\pgf@arrow@handle@dot\relax%
+ #1%
+ }%
+}
+
+
+\def\pgf@arrow@rigid#1#2{%
+ % Prepare:
+ {%
+ \pgfarrows@getid{#1}{#2}%
+ % Do shift:
+ \expandafter\expandafter\expandafter\pgf@arrow@drawer@shift\csname pgf@ar@ends@\pgf@arrow@id\endcsname%
+ % Do slant:
+ \ifdim\pgfarrows@slant pt=0pt%
+ \else%
+ \pgftransformxslant{\pgfarrows@slant}%
+ \fi%
+ % do swap:
+ \ifpgfarrowswap%
+ \pgftransformyscale{-1}%
+ \fi%
+ {%
+ \csname pgf@ar@saves@\pgf@arrow@id\endcsname%
+ \pgf@arrows@rigid@hull%
+ }%
+ \expandafter}%
+ % Transform to next tip:
+ \expandafter\pgftransformxshift\expandafter{\the\pgf@xc}%
+}
+
+
+
% Draw an arrow
-%
+%
% #1 = arrow tip list
% #2 = total length of the arrow (the value of \pgf@xb computed by
% \pgf@arrow@compute@shortening)
-%
+%
% Description:
-%
+%
% Draws an arrow tip list. The coordinate system must have been
% transformed so that the to-be-drawn arrow points right and should
% "end" at the origin.
@@ -850,7 +888,7 @@
\pgfarrows@getid{#1}{#2}%
% Do shift:
\expandafter\expandafter\expandafter\pgf@arrow@drawer@shift\csname pgf@ar@ends@\pgf@arrow@id\endcsname%
- % Do slant:
+ % Do slant:
\ifdim\pgfarrows@slant pt=0pt%
\else%
\pgftransformxslant{\pgfarrows@slant}%
@@ -866,7 +904,7 @@
\pgflowlevelsynccm\csname pgf@ar@cache@\pgf@arrow@id\endcsname%
\endpgfscope%
\pgf@arrows@rigid@hull%
- }%
+ }%
\expandafter}%
% Transform to next tip:
\expandafter\pgftransformxshift\expandafter{\the\pgf@xc}%
@@ -890,7 +928,7 @@
\pgf@arrows@color@setup@restore@std@colors
\pgfsetfillcolor{pgfstrokecolor}%
\fi%
- \else%
+ \else%
\pgf@arrows@color@setup@restore@std@colors
\pgfsetfillcolor{\pgf@arrows@fill@color}%
\fi%
@@ -958,12 +996,13 @@
}
+
% Sets arrows
%
% #1 = An arrow specification of the form
% <start spec>-<end spec>. This will call \pgfsetstartarrow{start
% spec} and \pgfsetendarrow{end spec}.
-%
+%
% Alternatively, it may be of the form [options]. In this case,
% the arrow options are set for the local scope and all arrows in
% the current scope will have these options set.
@@ -986,7 +1025,7 @@
\pgfutil@ifnextchar\pgf@stop{%
\let\pgf@arrows@options\pgf@arrows@options@scope%
\pgfkeys{/pgf/arrow keys/.cd,#1}%
- \let\pgf@arrows@options@scope\pgf@arrows@options%
+ \let\pgf@arrows@options@scope\pgf@arrows@options%
% Ok, setup the options
\pgfutil@gobble%
}{%
@@ -999,10 +1038,9 @@
-
%
% Predefined arrows:
-%
+%
% A dot is used to indicate the end of the line:
@@ -1036,7 +1074,7 @@
-% Compatibility with old arrow system:
+% Compatibility with old arrow system:
\pgfkeys {}
@@ -1054,7 +1092,7 @@
\def\pgfsetarrowoptions#1#2{\expandafter\def\csname pgf@arrow@compat@opt@#1\endcsname{#2}}
\def\pgfgetarrowoptions#1{\csname pgf@arrow@compat@opt@#1\endcsname}
\def\pgfarrowsdeclare#1#2#3#4{%
- \pgfdeclarearrow{ name ={#1}-{#2}, setup code ={#3}, drawing code={#4}, parameters/.expand once={\csname pgf@arrow@compat@opt@#2\endcsname}}
+ \pgfdeclarearrow{ name ={#1}-{#2}, setup code ={#3}, drawing code={#4}, parameters/.expand once={\csname pgf@arrow@compat@opt@#2\endcsname}}%
\expandafter\def\csname pgf@arrow@compat@opt@#2\endcsname{0}}
\def\pgfarrowsleftextend#1{\pgfmathsetlength\pgf@xa{#1}\pgfarrowssetbackend{\pgf@xa}}
\def\pgfarrowsrightextend#1{\pgfmathsetlength\pgf@xb{#1}\pgfarrowssettipend{\pgf@xb}}
@@ -1213,5 +1251,3 @@
\endinput
-
-
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
index 31fa80f3635..8e150972a97 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreexternal.code.tex,v 1.21 2014/07/09 14:01:22 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfcoreexternal.code.tex}
@@ -51,8 +51,8 @@
% ignored. Otherwise, the code is executed normally.
%
% Things change when you run tex on your file with the \jobname set to
-% the name of a decalred graphics name. In this case, only your
-% graphic will be typeset, the rest of the document will be "thrown away".
+% the name of a declared graphics name. In this case, only your
+% graphic will be typeset, the rest of the document will be "thrown away".
% To be more precise, everything is gobbled up to the beginning
% of the first \beginpgfexternal with the given graphics name. Then,
% the content of the "environment" is put in a box (this "environment"
@@ -80,7 +80,7 @@
%
% This command is used to tell pgf that the file named #1 should be
% typeset normally. If \jobname is not equal to #1, only
-% the graphic called \jobname will be typeset.
+% the graphic called \jobname will be typeset.
%
% Example:
%
@@ -128,7 +128,7 @@
% this context anyway).
%
% This here works well:
- \immediate\write16{Package TikZ externalization: calling \string\geometry{driver=none} during externalization.^^J}%
+ \pgf@typeout{Package TikZ externalization: calling \string\geometry{driver=none} during externalization.^^J}%
\geometry{driver=none}%
}%
}%
@@ -141,7 +141,7 @@
\let\pgfexternal@nofiles@=\relax
\def\relax{\relax}%
%
- % suppress generation of LaTeX .aux, .toc etc files.
+ % suppress generation of LaTeX .aux, .toc etc files.
% generation of these files is not thread-safe.
% the \csname \endcsname yields \relax if \nofiles doesn't exist.
\csname nofiles\endcsname
@@ -211,7 +211,7 @@
\AtBeginDocument{
- \let\beginpgfgraphicnamed=\pgf@externalbegin% overwrite definition of pgfexternal.tex if necessary
+ \let\beginpgfgraphicnamed=\pgf@externalbegin% overwrite definition of pgfexternal.tex if necessary
\let\endpgfgraphicnamed=\unskip
}
@@ -227,7 +227,7 @@
\else%
\let\pgf@next=\pgf@replacepicturebygraphic%
\fi%
- \pgf@next%
+ \pgf@next%
}
\long\def\pgf@replacepicturebygraphic#1\endpgfgraphicnamed{%
@@ -262,12 +262,12 @@
% Reads the .dpth file which contains meta data of the external
% picture.
-%
+%
% This command handles the following stuff:
% - it defines \pgfexternaldepth . The macro contains the contents of
% a line which does not start with a control sequence (for example a
% line containing '50pt')
-% - it defines \pgfexternaltrimleft and \pgfexternaltrimright
+% - it defines \pgfexternaltrimleft and \pgfexternaltrimright
% - it checks if the .dpth file contains content stored by means of
% \pgfexternalstorecommand. If so, the argument of
% \pgfexternalstorecommand will be restored.
@@ -339,11 +339,11 @@
\toks0={#1}%
% believe it or not, but the
% \def\dpthimport{...}\dpthimport *makes* a
- % difference! In ensures any occuring `##' characters are properly expanded to `#'.
+ % difference! In ensures any occurring `##' characters are properly expanded to `#'.
\immediate\write\@auxout{%
\noexpand\def\noexpand\dpthimport{\the\toks0}\noexpand\dpthimport}%
}%
- \fi
+ \fi
}%
\fi
\else% it is the depth (which is simply a number for backwards compatibility)
@@ -352,7 +352,7 @@
}%
% Stores '#1' (expanded!) into the .dpth file of the currently
-% exported image.
+% exported image.
%
% This command has only an effect if an image is being exported.
%
@@ -369,12 +369,12 @@
% Grab operation: If jobname matches the graphic name, typeset this
-% picture normall.
+% picture normal.
% REMARK:
% this method is also invoked from within the tikz external library.
\def\pgf@external@grab#1{%
\def\pgf@filename{#1}%
- \ifpgfexternal@aux@in@dpth
+ \ifpgfexternal@aux@in@dpth
\begingroup
\pgf@external@init@aux@in@dpth
\let\G@refundefinedtrue=\pgf@external@grab@refundefinedtrue
@@ -394,11 +394,16 @@
\begingroup
\def\n{\pgfexternal@hat\pgfexternal@hat J}%
\pgfexternalstorecommand{%
+ \pgf@external@grab@refundefinedtrue@code
\noexpand\immediate\noexpand\write16{\pgf@external@grab@refundefinedtrue@warning}%
\noexpand\G@refundefinedtrue
}%
\endgroup
}%
+
+% A hook. will be overwritten by \usetikzlibrary{external}
+\def\pgf@external@grab@refundefinedtrue@code{}
+
\def\pgf@external@grab@refundefinedtrue@warning{%
LaTeX Warning: External picture `\pgfactualjobname' contains undefined references\noexpand\on@line.\n
}%
@@ -456,7 +461,7 @@
\if1\pgf@external@trim
% UNDO the trimming! export to pdf doesn't supported trimmed
% bounding boxes (has to do with the mediabox/trimbox etc).
- % I'll keep the bounding box intact and store the trim information
+ % I'll keep the bounding box intact and store the trim information
% into the .dpth file.
\setbox\pgfpic=\hbox{%
\ifx\pgf@trimleft@final\pgfutil@empty\else\kern-\pgf@trimleft@final\fi
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
index a0a7ac9651e..7b11d45d630 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex,v 1.12 2014/11/02 21:38:01 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfcoregraphicstate.code.tex}
% Globals
@@ -77,6 +77,7 @@
% \pgfsetmiterlimit{3}
\def\pgfsetmiterlimit#1{%
+ \ifdim#1pt<1pt\pgferror{miter limit cannot be less than 1}\fi%
\pgfsys@setmiterlimit{#1}%
\ignorespaces}
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
index 1f2d6ea5d17..710ece1fa80 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreimage.code.tex,v 1.18 2013/07/15 15:41:24 tantau Exp $
+\ProvidesFileRCS{pgfcoreimage.code.tex}
@@ -22,7 +22,7 @@
%
% This command declares an image file for later use. Even if the image
% is used several times in the document, in PDF it will only be stored
-% once.
+% once.
%
% Example:
%
@@ -41,7 +41,7 @@
\ifx\pgf@filename\pgfutil@empty%
\expandafter\pgf@findfile\pgfsys@imagesuffixlist:+{#3}%
\else%
- \pgfkeys{/pgf/images/page=}% make page empty
+ \pgfkeys{/pgf/images/page=}% make page empty
\fi%
\ifx\pgf@filename\pgfutil@empty%
\pgfwarning%
@@ -60,8 +60,8 @@
\pgfkeys{
- /pgf/images/draft/.is if=pgf@draftmode,
- /pgf/images/draft/.default=true}
+ /pgf/images/draft/.is if=pgf@draftmode,
+ /pgf/images/draft/.default=true}
\pgfkeys{/pgf/images/width/.estore in=\pgf@imagewidth}
\pgfkeys{/pgf/images/height/.estore in=\pgf@imageheight}
\pgfkeys{/pgf/images/page/.estore in=\pgf@imagepage}
@@ -99,7 +99,7 @@
\ifx\pgf@imageheight\pgfutil@empty%
\pgfwarning{Missing height for image "#1" ("#2") in draft mode. Using 1cm instead}%
\edef\pgf@imageheight{1cm}%
- \fi%
+ \fi%
\ifx\pgf@imagepage\pgfutil@empty\else\edef\pgf@imagepagetext{ page \pgf@imagepage}\fi%
\edef\pgf@image{%
\hbox to \pgf@imagewidth{%
@@ -117,7 +117,7 @@
% Declare a soft mask
%
% #1 = optional argument: matte specification. default matte is
-% white.
+% white.
% #2 = name of the mask for later use
% #3 = filename without extension, automatic extensions are .pdf,
% .jpg, and .png for PDF. Postscript is not supported.
@@ -171,7 +171,7 @@
\expandafter\global\expandafter\let\csname pgf@image@#1!\endcsname=\pgf@temp%
}
-
+
% Use an image
%
% #1 = name of a previously declared image
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
index 880b41c4a30..1c7c01d1eac 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorelayers.code.tex,v 1.7 2013/07/18 17:07:38 tantau Exp $
+\ProvidesFileRCS{pgfcorelayers.code.tex}
% Creates a new pgf layer
@@ -44,7 +44,24 @@
%
% \pgfsetlayers{background,main}
-\def\pgfsetlayers#1{\edef\pgf@layerlist{#1}}
+\def\pgfsetlayers#1{%
+ \let\pgf@layerlist\pgfutil@empty%
+ \pgf@dosetlayer#1,,\relax%
+}
+
+\def\pgf@dosetlayer#1,#2,\relax{%
+ \ifx\pgf@layerlist\pgfutil@empty%
+ \edef\pgf@layerlist{\pgfutil@trimspaces{#1}}%
+ \else
+ \edef\pgf@layerlist{\pgf@layerlist,\pgfutil@trimspaces{#1}}%
+ \fi
+ \def\pgf@test{#2}%
+ \ifx\pgf@test\pgfutil@empty%
+ \else%
+ \pgf@dosetlayer#2,\relax%
+ \fi%
+}
+
\pgfsetlayers{main}
% Adds code to a layer
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
index 557558d82ef..1cbdfa0dd22 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreobjects.code.tex,v 1.2 2006/10/11 15:22:25 tantau Exp $
+\ProvidesFileRCS{pgfcoreobjects.code.tex}
% Object reuse
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
index 60cede3f006..c5b9ee1e99a 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex,v 1.29 2013/10/07 15:51:46 tantau Exp $
+\ProvidesFileRCS{pgfcorepathconstruct.code.tex}
\newdimen\pgf@path@lastx
@@ -22,9 +22,9 @@
%
% #1 = in-size of arc
% #2 = out-size of arc
-%
+%
% Description:
-%
+%
% This command influences path construction command like
% \pgfpathlineto or \pgfpatharc. It will cause the corners at the end
% of these commands to be replaced by little arcs. If the
@@ -33,9 +33,9 @@
% the quarter circle will instead by a quarter ellipse. If the angle
% is different from 90 degrees, a deformed quarter circle will
% result, which may or may not be desirable. For a ``perfect'' arc you
-% must use the \pgfpatharc command.
-%
-%
+% must use the \pgfpatharc command.
+%
+%
% Example: One rounded corner.
%
% \pgfpathmoveto{\pgfpointxy{0}{0}}
@@ -80,7 +80,7 @@
% The following protocol the passed sizes and all the corresponding
% softpath commands. The nonlinear transformation (nlt) module
-% overwrites these commands.
+% overwrites these commands.
\def\pgf@lt@moveto#1#2{%
\pgf@protocolsizes{#1}{#2}%
@@ -110,7 +110,7 @@
% Move current point to #1.
%
% #1 = new current point
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfxy(0,0)}
@@ -169,7 +169,7 @@
% Append a line from the current point to #1 to the current path.
%
% #1 = end of line
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfxy(0,0)}
@@ -213,7 +213,7 @@
% #1 = first control point
% #2 = second control point
% #3 = end point
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfpointxy{0}{0}}
@@ -241,7 +241,7 @@
%
% #1 = control point
% #2 = end point
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfpointxy{0}{0}}
@@ -279,7 +279,7 @@
% #1 = angle of first point
% #2 = angle of second point
% #3 = radius or x-radius/y-radius
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfxy(0,0)}
@@ -347,7 +347,7 @@
\pgfutil@tempdima=\pgf@arc@radius@a pt%
\pgfutil@tempdimb=\pgf@arc@radius@b pt%
%
- \pgf@xa=\pgf@arc@local@angle@a\relax%
+ \pgf@xa=\pgf@arc@local@angle@a\relax%
\pgf@xb=\pgf@arc@local@angle@b\relax%
\advance\pgf@xb by-\pgf@xa\relax%
\ifdim\pgf@xb<0pt\relax%
@@ -368,7 +368,7 @@
\else%
\advance\pgf@xa by -90pt\relax%
\fi%
- \edef\pgf@arc@angle{\pgf@sys@tonumber{\pgf@xa}}%
+ \edef\pgf@arc@angle{\pgf@sys@tonumber{\pgf@xa}}%
\pgfpointtransformed{\pgfpointpolar{\pgf@arc@angle}{\pgfutil@tempdima and \pgfutil@tempdimb}}%
\advance\pgf@x by-\pgf@pt@x%
\advance\pgf@y by-\pgf@pt@y%
@@ -412,7 +412,7 @@
% #2 = angle of second point
% #3 = first axis
% #4 = second axis
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfxy(0,0)}
@@ -428,7 +428,7 @@
-% Append an arc to the current point that ends at a given position.
+% Append an arc to the current point that ends at a given position.
%
% #1 = x-radius
% #2 = y-radius
@@ -442,18 +442,18 @@
% This command implements an arc drawing where a given target
% coordinate (#6) is given and the task is to draw an arc of an
% ellipse with the given radii. The center point of the ellipse is not
-% give, but computed automatically.
+% give, but computed automatically.
%
% This kind of "endpoint parameterization" of an arc is exactly the
% same as the one specified by the SVG-specification for the "A" and
% "a" path commands. Please see the SVG-specification for details.
-%
+%
% Note that the problem is internally converted to drawing an arc
% using \pgfpatharc. This means that there may be a heavy loss of
% accuracy.
-%
+%
% Example:
-%
+%
% \pgfpathmoveto{\pgfpoint{1cm}{1cm}}
% \pgfpatharcto{1cm}{1cm}{0}{0}{0}{\pgfpoint{0cm}{2cm}}
@@ -461,10 +461,10 @@
{%
% The following code is based on the transformation described in svg
% 1.1 specification Section F.6.5
- %
+ %
% Step 1: store the simple parameters (xa=x1 since TeX does not
% allow numbers in names)
- %
+ %
\pgfmathsetmacro\pgf@arcto@rx{abs(#1)}%
\pgfmathsetmacro\pgf@arcto@ry{abs(#2)}%
\ifdim\pgf@arcto@rx pt=0pt% special rule: zero radius=straight line
@@ -487,11 +487,11 @@
\pgf@process{#6}
\edef\pgf@arcto@xb{\the\pgf@x}%
\edef\pgf@arcto@yb{\the\pgf@y}%
- %
+ %
% Step 2: x1,y1 is more complicated to compute: It is given by lastx
% and lasty, but these are transformed coordinates, we need the
% untransformed ones. So, we inverse the transformation (arghh...)
- %
+ %
\pgftransforminvert%
\pgf@process{\pgfpointtransformed{\pgfqpoint{\pgf@path@lastx}{\pgf@path@lasty}}}
\edef\pgf@arcto@xa{\the\pgf@x}
@@ -504,15 +504,15 @@
%
% Ok, now we got all the parameters setup. Now comes the
% computation...
- %
- %
+ %
+ %
% Step 3: Start with a new coordinate system and rotate everything
% by the negated phi.
- %
+ %
\pgftransformreset
\pgftransformrotate{-\pgf@arcto@phi}
% Ok, using \pgfpointtransformed we now get transformed points...
- %
+ %
% Step 4: Compute x1' and y1' (xaprime and yaprime)
%
\pgf@process{
@@ -524,8 +524,8 @@
}
\edef\pgf@arcto@xaprime{\pgf@sys@tonumber\pgf@x}
\edef\pgf@arcto@yaprime{\pgf@sys@tonumber\pgf@y}
- %
- % Compute Lambda
+ %
+ % Compute Lambda
%
\pgfmathsetmacro\pgf@arcto@frac@x{\pgf@arcto@xaprime/\pgf@arcto@rx}
\pgfmathsetmacro\pgf@arcto@frac@y{\pgf@arcto@yaprime/\pgf@arcto@ry}
@@ -537,9 +537,9 @@
\pgfmathsetmacro\pgf@arcto@rx{\pgf@arcto@sqrt@lambda*\pgf@arcto@rx}
\pgfmathsetmacro\pgf@arcto@ry{\pgf@arcto@sqrt@lambda*\pgf@arcto@ry}
\fi
- %
- % Do some scaling
- %
+ %
+ % Do some scaling
+ %
\pgfmathsetmacro\pgf@arcto@xaprime@abs{abs(\pgf@arcto@xaprime)}
\pgfmathsetmacro\pgf@arcto@yaprime@abs{abs(\pgf@arcto@yaprime)}
\pgfmathmax@{\pgf@arcto@rx,\pgf@arcto@ry,\pgf@arcto@xaprime@abs,\pgf@arcto@yaprime@abs}
@@ -548,9 +548,9 @@
\pgfmathsetmacro\pgf@arcto@ry@scaled{\pgf@arcto@scaling*\pgf@arcto@ry}
\pgfmathsetmacro\pgf@arcto@xaprime@scaled{\pgf@arcto@scaling*\pgf@arcto@xaprime}
\pgfmathsetmacro\pgf@arcto@yaprime@scaled{\pgf@arcto@scaling*\pgf@arcto@yaprime}
- %
- % Step 5: Now comes the messy computation of c1' and c2'.
- %
+ %
+ % Step 5: Now comes the messy computation of c1' and c2'.
+ %
\ifdim\pgf@arcto@rx pt>\pgf@arcto@ry pt%
\pgfmathsetmacro\pgf@arcto@rx@over@ry{\pgf@arcto@rx/\pgf@arcto@ry}
\pgfmathsetmacro\pgf@arcto@ry@over@rx{\pgf@arcto@ry/\pgf@arcto@rx}
@@ -595,9 +595,9 @@
\pgfmathsetmacro\pgf@arcto@cyprime{
-\pgf@arcto@factor*\pgf@arcto@ry@over@rx*\pgf@arcto@xaprime
}
- %
- % Step 6: Ok, now compute cx,cy
- %
+ %
+ % Step 6: Ok, now compute cx,cy
+ %
\pgftransformreset
\pgftransformrotate{\pgf@arcto@phi}
\pgf@process{
@@ -613,9 +613,9 @@
}
\edef\pgf@arcto@cx{\the\pgf@x}
\edef\pgf@arcto@cy{\the\pgf@y}
- %
- % Step 7: Compute start angle:
- %
+ %
+ % Step 7: Compute start angle:
+ %
\pgfmathsetmacro\pgf@arcto@vec@x{(\pgf@arcto@xaprime-\pgf@arcto@cxprime)/\pgf@arcto@rx}
\pgfmathsetmacro\pgf@arcto@vec@y{(\pgf@arcto@yaprime-\pgf@arcto@cyprime)/\pgf@arcto@ry}
\pgfmathsetmacro\pgf@arcto@denominator{veclen(\pgf@arcto@vec@x,\pgf@arcto@vec@y)}
@@ -624,9 +624,9 @@
\ifdim\pgf@arcto@vec@y pt<0pt
\pgfmathsetmacro\pgf@arcto@theta@start{-\pgf@arcto@theta@start}
\fi
- %
- % Step 8: Compute end angle:
- %
+ %
+ % Step 8: Compute end angle:
+ %
\pgfmathsetmacro\pgf@arcto@vec@x{(-\pgf@arcto@xaprime-\pgf@arcto@cxprime)/\pgf@arcto@rx}
\pgfmathsetmacro\pgf@arcto@vec@y{(-\pgf@arcto@yaprime-\pgf@arcto@cyprime)/\pgf@arcto@ry}
\pgfmathsetmacro\pgf@arcto@denominator{veclen(\pgf@arcto@vec@x,\pgf@arcto@vec@y)}
@@ -695,190 +695,190 @@
% #7 the ratio xradius/yradius of the ellipse
% #8 the ratio yradius/xradius of the ellipse
% Example:
-% \def\cx{1cm}% center x
-% \def\cy{1cm}% center y
-% \def\startangle{0}%
-% \def\endangle{45}%
-% \def\a{5cm}% xradius
-% \def\b{10cm}% yradius
-% \pgfmathparse{\a/\b}\let\abratio=\pgfmathresult
-% \pgfmathparse{\b/\a}\let\baratio=\pgfmathresult
+% \def\cx{1cm}% center x
+% \def\cy{1cm}% center y
+% \def\startangle{0}%
+% \def\endangle{45}%
+% \def\a{5cm}% xradius
+% \def\b{10cm}% yradius
+% \pgfmathparse{\a/\b}\let\abratio=\pgfmathresult
+% \pgfmathparse{\b/\a}\let\baratio=\pgfmathresult
%
% \pgfpathmoveto{\pgfpoint{\cx+\a*cos(\startangle)}{\cy+\b*sin(\startangle)}}%
% \pgfpatharctoprecomputed
-% {\pgfpoint{\cx}{\cy}}
-% {\startangle}
-% {\endangle}
-% {\pgfpoint{\cx+\a*cos(\endangle)}{\cy+\b*sin(\endangle)}}%
-% {\a}
-% {\b}
-% {\abratio}
-% {\baratio}
+% {\pgfpoint{\cx}{\cy}}
+% {\startangle}
+% {\endangle}
+% {\pgfpoint{\cx+\a*cos(\endangle)}{\cy+\b*sin(\endangle)}}%
+% {\a}
+% {\b}
+% {\abratio}
+% {\baratio}
%
\def\pgfpatharctoprecomputed#1#2#3#4#5#6#7#8{%
- \begingroup
- % Implementation idea:
- %
- % let
- % m = center (#1)
- % \gamma_0 = start angle
- % \gamma_1 = end angle
- % a = x radius
- % b = y radius
- %
- % an axis parallel ellipse is parameterized by
- % C(\gamma) = m + ( a cos(\gamma), b sin(\gamma) ), \gamma in [0,360].
- %
- % Now, consider the segment \gamma(t),
- % \gamma:[0,1] -> [\gamma_0,\gamma_1],
- % t -> \gamma_0 + t(\gamma_1 - \gamma_0)
- % and
- % C(\gamma(t)) which is defined on [0,1].
- %
- % I'd like to approximate the arc by one or more cubic bezier
- % splines which interpolate through the last and first provided
- % points.
- %
- % In general, a Bezier spline C:[0,1] -> \R of order n fulfills
- % C'(0) = n ( P_1 - P_0 ),
- % C'(1) = n ( P_n - P_{n-1} ).
- % For n=3 and given P_0 and P_3, I can directly compute P_1 and P_2 once I know
- % the derivatives at t=0 and t=1.
- %
- % The derivatives in our case are
- % ( C \circ \gamma )'(t) = C'[\gamma(t)] * \gamma'(t)
- % = ( -a pi/180 sin(\gamma(t)), b pi/180 cos(\gamma(t)) ) * (\gamma_1 - \gamma_0).
- % The pi/180 comes into play since we are working with degrees.
- %
- % Expression (C\circ\gamma)'(0) using P_0 and (C \circ \gamma)'(1)
- % using P_3 yields the expressions
- % (C \circ \gamma)'(0) =
- % pi/180 * (\gamma_1 - \gamma_0)* [ - a/b(P_0^y - my), b/a (P_0^x - mx) ]
- % (C \circ \gamma)'(1) =
- % pi/180 * (\gamma_1 - \gamma_0)* [ - a/b(P_3^y - my), b/a (P_3^x - mx) ]
- %
- % defining
- % scaleA = a/b * pi / (3*180) * (\gamma_1 - \gamma_0)
- % and
- % scaleB = b/a * pi / (3*180) * (\gamma_1 - \gamma_0)
- % yields the direct expressions for the intermediate bezier
- % control points
- %
- % P_1 = [
- % P_0^x - scaleA* ( P_0^y -my),
- % P_0^y + scaleB* ( P_0^x -mx) ]
- % and
- % P_2 = [
- % P_3^x + scaleA* ( P_3^y -my),
- % P_3^y - scaleB* ( P_3^x -mx) ].
- %
- % This works fast, with few operations, if
- % - a/b and b/a are known in advance
- % - P_0 and P_3 are known in advance
- % - \gamma_0 and \gamma_1 are known.
- %
- % It is also reliable if (\gamma_1 - \gamma_0) is small
- %
- \pgf@process{#1}%
- \edef\pgfpath@center@x{\the\pgf@x}%
- \edef\pgfpath@center@y{\the\pgf@y}%
- \def\pgfpath@completearcend{#4}%
- % compute scale (#3-#2) * pi/(3*180) = (#3 - #2) * pi/27 * 1/20
- % splitting pi/(3*180) into two scales has higher TeX accuracy
- \pgf@xa=#2pt
- \pgf@xb=#3pt
- \edef\pgfpath@startangle{#2pt}%
- \edef\pgfpath@endangle{\pgf@sys@tonumber\pgf@xb}%
- %
- \pgf@ya=\pgf@xb
- \advance\pgf@ya by-\pgf@xa
- %
- \ifx\pgfpatharctomaxstepsize\pgfutil@empty
- \def\pgfpath@N{1}%
- \pgf@xc=\pgf@ya
- \else
- \pgf@xc=\pgf@ya% compute N = floor((gamma_1 - gamma_0) / max) +1
- \ifdim\pgf@xc<0pt
- \multiply\pgf@xc by-1
- \fi
- \divide\pgf@xc by\pgfpatharctomaxstepsize\relax
- \afterassignment\pgfutil@gobble@until@relax
- \c@pgf@counta=\the\pgf@xc\relax
- \advance\c@pgf@counta by1
- \edef\pgfpath@N{\the\c@pgf@counta}%
- %
- \pgf@xc=\pgf@ya
- \divide\pgf@xc by\c@pgf@counta
- \fi
- %
- \edef\pgfpath@h{\pgf@sys@tonumber\pgf@xc}%
- %
+ \begingroup
+ % Implementation idea:
+ %
+ % let
+ % m = center (#1)
+ % \gamma_0 = start angle
+ % \gamma_1 = end angle
+ % a = x radius
+ % b = y radius
+ %
+ % an axis parallel ellipse is parameterized by
+ % C(\gamma) = m + ( a cos(\gamma), b sin(\gamma) ), \gamma in [0,360].
+ %
+ % Now, consider the segment \gamma(t),
+ % \gamma:[0,1] -> [\gamma_0,\gamma_1],
+ % t -> \gamma_0 + t(\gamma_1 - \gamma_0)
+ % and
+ % C(\gamma(t)) which is defined on [0,1].
+ %
+ % I'd like to approximate the arc by one or more cubic bezier
+ % splines which interpolate through the last and first provided
+ % points.
+ %
+ % In general, a Bezier spline C:[0,1] -> \R of order n fulfills
+ % C'(0) = n ( P_1 - P_0 ),
+ % C'(1) = n ( P_n - P_{n-1} ).
+ % For n=3 and given P_0 and P_3, I can directly compute P_1 and P_2 once I know
+ % the derivatives at t=0 and t=1.
+ %
+ % The derivatives in our case are
+ % ( C \circ \gamma )'(t) = C'[\gamma(t)] * \gamma'(t)
+ % = ( -a pi/180 sin(\gamma(t)), b pi/180 cos(\gamma(t)) ) * (\gamma_1 - \gamma_0).
+ % The pi/180 comes into play since we are working with degrees.
+ %
+ % Expression (C\circ\gamma)'(0) using P_0 and (C \circ \gamma)'(1)
+ % using P_3 yields the expressions
+ % (C \circ \gamma)'(0) =
+ % pi/180 * (\gamma_1 - \gamma_0)* [ - a/b(P_0^y - my), b/a (P_0^x - mx) ]
+ % (C \circ \gamma)'(1) =
+ % pi/180 * (\gamma_1 - \gamma_0)* [ - a/b(P_3^y - my), b/a (P_3^x - mx) ]
+ %
+ % defining
+ % scaleA = a/b * pi / (3*180) * (\gamma_1 - \gamma_0)
+ % and
+ % scaleB = b/a * pi / (3*180) * (\gamma_1 - \gamma_0)
+ % yields the direct expressions for the intermediate bezier
+ % control points
+ %
+ % P_1 = [
+ % P_0^x - scaleA* ( P_0^y -my),
+ % P_0^y + scaleB* ( P_0^x -mx) ]
+ % and
+ % P_2 = [
+ % P_3^x + scaleA* ( P_3^y -my),
+ % P_3^y - scaleB* ( P_3^x -mx) ].
+ %
+ % This works fast, with few operations, if
+ % - a/b and b/a are known in advance
+ % - P_0 and P_3 are known in advance
+ % - \gamma_0 and \gamma_1 are known.
+ %
+ % It is also reliable if (\gamma_1 - \gamma_0) is small
+ %
+ \pgf@process{#1}%
+ \edef\pgfpath@center@x{\the\pgf@x}%
+ \edef\pgfpath@center@y{\the\pgf@y}%
+ \def\pgfpath@completearcend{#4}%
+ % compute scale (#3-#2) * pi/(3*180) = (#3 - #2) * pi/27 * 1/20
+ % splitting pi/(3*180) into two scales has higher TeX accuracy
+ \pgf@xa=#2pt
+ \pgf@xb=#3pt
+ \edef\pgfpath@startangle{#2pt}%
+ \edef\pgfpath@endangle{\pgf@sys@tonumber\pgf@xb}%
+ %
+ \pgf@ya=\pgf@xb
+ \advance\pgf@ya by-\pgf@xa
+ %
+ \ifx\pgfpatharctomaxstepsize\pgfutil@empty
+ \def\pgfpath@N{1}%
+ \pgf@xc=\pgf@ya
+ \else
+ \pgf@xc=\pgf@ya% compute N = floor((gamma_1 - gamma_0) / max) +1
+ \ifdim\pgf@xc<0pt
+ \multiply\pgf@xc by-1
+ \fi
+ \divide\pgf@xc by\pgfpatharctomaxstepsize\relax
+ \afterassignment\pgfutil@gobble@until@relax
+ \c@pgf@counta=\the\pgf@xc\relax
+ \advance\c@pgf@counta by1
+ \edef\pgfpath@N{\the\c@pgf@counta}%
+ %
+ \pgf@xc=\pgf@ya
+ \divide\pgf@xc by\c@pgf@counta
+ \fi
+ %
+ \edef\pgfpath@h{\pgf@sys@tonumber\pgf@xc}%
+ %
%\message{pgfpathellipse: using N =\pgfpath@N\space spline points y0 = \pgfpath@startangle, y0+i*h, yN=\pgfpath@endangle, i=1,...,(\pgfpath@N-1), with h=\pgfpath@h\space mesh width (total arc angle \pgf@sys@tonumber\pgf@ya).}%
- %
- %
- \pgf@xc=0.116355283466289\pgf@xc % pi/27
- \divide\pgf@xc by20
- \pgf@xa=#7\pgf@xc
- \edef\pgfpath@scale@A{\pgf@sys@tonumber\pgf@xa}%
- \pgf@xa=#8\pgf@xc
- \edef\pgfpath@scale@B{\pgf@sys@tonumber\pgf@xa}%
- %
- % compute intermediate spline segments for
- % i = 1,...,N-1
- % this is a no-op for N=1.
- \c@pgf@countd=1
- \pgfutil@loop
- \ifnum\c@pgf@countd<\pgfpath@N\relax
- %
- \pgf@xa=\pgfpath@startangle % compute \pgf@xa = y_0 + i*h
- \pgf@xb=\pgfpath@h pt
- \multiply\pgf@xb by\c@pgf@countd
- \advance\pgf@xa by\pgf@xb
- \edef\pgfpath@angle@i{\pgf@sys@tonumber\pgf@xa}%
+ %
+ %
+ \pgf@xc=0.116355283466289\pgf@xc % pi/27
+ \divide\pgf@xc by20
+ \pgf@xa=#7\pgf@xc
+ \edef\pgfpath@scale@A{\pgf@sys@tonumber\pgf@xa}%
+ \pgf@xa=#8\pgf@xc
+ \edef\pgfpath@scale@B{\pgf@sys@tonumber\pgf@xa}%
+ %
+ % compute intermediate spline segments for
+ % i = 1,...,N-1
+ % this is a no-op for N=1.
+ \c@pgf@countd=1
+ \pgfutil@loop
+ \ifnum\c@pgf@countd<\pgfpath@N\relax
+ %
+ \pgf@xa=\pgfpath@startangle % compute \pgf@xa = y_0 + i*h
+ \pgf@xb=\pgfpath@h pt
+ \multiply\pgf@xb by\c@pgf@countd
+ \advance\pgf@xa by\pgf@xb
+ \edef\pgfpath@angle@i{\pgf@sys@tonumber\pgf@xa}%
%\message{angle \the\c@pgf@countd: \pgfpath@angle@i...}%
- %
- \pgfpatharcofellipse@{%
- \pgfpoint
- {\pgfpath@center@x + #5*cos(\pgfpath@angle@i)}
- {\pgfpath@center@y + #6*sin(\pgfpath@angle@i)}%
- }%
- %
- \advance\c@pgf@countd by1
- \pgfutil@repeat
- %
- % compute final spline segment. It only differs insofar as the
- % final point is already known explicitly and should be
- % interpolated without additional math error.
+ %
+ \pgfpatharcofellipse@{%
+ \pgfpoint
+ {\pgfpath@center@x + #5*cos(\pgfpath@angle@i)}
+ {\pgfpath@center@y + #6*sin(\pgfpath@angle@i)}%
+ }%
+ %
+ \advance\c@pgf@countd by1
+ \pgfutil@repeat
+ %
+ % compute final spline segment. It only differs insofar as the
+ % final point is already known explicitly and should be
+ % interpolated without additional math error.
%\message{angle \pgfpath@N: \pgfpath@endangle...}%
- \pgfpatharcofellipse@{\pgfpath@completearcend}%
- \endgroup
+ \pgfpatharcofellipse@{\pgfpath@completearcend}%
+ \endgroup
}%
\def\pgfpatharcofellipse@#1{%
- \begingroup
- \pgf@process{#1}%
- \edef\pgfpath@endpt{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}%
- %
- \pgfpathcurveto{
- \begingroup
- \global\pgf@x=\pgf@path@lastx
- \global\pgf@y=\pgf@path@lasty
- \pgf@xa=\pgf@x \advance\pgf@xa by-\pgfpath@center@x
- \pgf@ya=\pgf@y \advance\pgf@ya by-\pgfpath@center@y
- \global\advance\pgf@x by-\pgfpath@scale@A\pgf@ya
- \global\advance\pgf@y by \pgfpath@scale@B\pgf@xa
- \endgroup
- }{%
- \begingroup
- \pgfpath@endpt
- \pgf@xa=\pgf@x \advance\pgf@xa by-\pgfpath@center@x
- \pgf@ya=\pgf@y \advance\pgf@ya by-\pgfpath@center@y
- \global\advance\pgf@x by \pgfpath@scale@A\pgf@ya
- \global\advance\pgf@y by-\pgfpath@scale@B\pgf@xa
- \endgroup
- }{%
- \pgfpath@endpt
- }%
- \endgroup
+ \begingroup
+ \pgf@process{#1}%
+ \edef\pgfpath@endpt{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}%
+ %
+ \pgfpathcurveto{
+ \begingroup
+ \global\pgf@x=\pgf@path@lastx
+ \global\pgf@y=\pgf@path@lasty
+ \pgf@xa=\pgf@x \advance\pgf@xa by-\pgfpath@center@x
+ \pgf@ya=\pgf@y \advance\pgf@ya by-\pgfpath@center@y
+ \global\advance\pgf@x by-\pgfpath@scale@A\pgf@ya
+ \global\advance\pgf@y by \pgfpath@scale@B\pgf@xa
+ \endgroup
+ }{%
+ \begingroup
+ \pgfpath@endpt
+ \pgf@xa=\pgf@x \advance\pgf@xa by-\pgfpath@center@x
+ \pgf@ya=\pgf@y \advance\pgf@ya by-\pgfpath@center@y
+ \global\advance\pgf@x by \pgfpath@scale@A\pgf@ya
+ \global\advance\pgf@y by-\pgfpath@scale@B\pgf@xa
+ \endgroup
+ }{%
+ \pgfpath@endpt
+ }%
+ \endgroup
}
@@ -894,7 +894,7 @@
% #1 = center
% #2 = first axis
% #3 = second axis
-%
+%
% Example:
%
% % Add a circle of radius 3cm around the origin
@@ -980,7 +980,7 @@
\advance\pgf@x by\pgf@xc%
\advance\pgf@y by\pgf@yc%
\advance\pgf@xb by\pgf@xc%
- \advance\pgf@yb by\pgf@yc%
+ \advance\pgf@yb by\pgf@yc%
\pgf@temp%
\pgf@nlt@curveto{\pgf@xc}{\pgf@yc}{\pgf@x}{\pgf@y}{\pgf@xb}{\pgf@yb}%
}%
@@ -1001,7 +1001,7 @@
\advance\pgf@x by\pgf@xc%
\advance\pgf@y by\pgf@yc%
\advance\pgf@xa by\pgf@xc%
- \advance\pgf@ya by\pgf@yc%
+ \advance\pgf@ya by\pgf@yc%
\pgf@temp%
\pgf@nlt@curveto{\pgf@xc}{\pgf@yc}{\pgf@x}{\pgf@y}{\pgf@xa}{\pgf@ya}%
}%
@@ -1015,10 +1015,10 @@
%
% #1 = center
% #2 = radius
-%
+%
% Example:
%
-% % Append a circle of radius 3cm around the the point (1,1)
+% % Append a circle of radius 3cm around the point (1,1)
% \pgfpathcircle{\pgxy(1,1)}{3cm}
\def\pgfpathcircle#1#2{\pgfpathellipse{#1}{\pgfpoint{#2}{0pt}}{\pgfpoint{0pt}{#2}}}
@@ -1030,7 +1030,7 @@
%
% #1 = lower left corner point of rectangle
% #2 = width and height vector
-%
+%
% Example:
%
% % A rectangle with corners (2,2) and (3,3)
@@ -1082,7 +1082,7 @@
%
% #1 = one corner of the rectangle
% #2 = opposite corner of the rectangle
-%
+%
% Example:
%
% % A rectangle with corners (2,2) and (3,3)
@@ -1103,13 +1103,13 @@
%
% #1 = first corner point of grid
% #2 = second corner point of grid
-%
-% Options:
-%
+%
+% Options:
+%
% stepx = x-step dimension (default 1cm)
% stepy = y-step dimension (default 1cm)
-% step = dimesion vector
-%
+% step = dimension vector
+%
% Example:
%
% \pgfsetlinewidth{0.8pt}
@@ -1146,75 +1146,82 @@
\pgf@yb=\pgf@ya%
\pgf@ya=\pgf@y%
\fi%
- \c@pgf@counta=\pgf@ya\relax%
- \c@pgf@countb=\pgf@yc\relax%
- \divide\c@pgf@counta by\c@pgf@countb\relax%
- \pgfutil@tempdima=\c@pgf@counta\pgf@yc\relax%
- \ifdim\pgfutil@tempdima<\pgf@ya%
+ \ifdim \pgf@yc > .01pt\relax% if to draw horizontal lines
+ \c@pgf@counta=\pgf@ya\relax%
+ \c@pgf@countb=\pgf@yc\relax%
+ \divide\c@pgf@counta by\c@pgf@countb\relax%
+ \pgfutil@tempdima=\c@pgf@counta\pgf@yc\relax%
+ \ifdim\pgfutil@tempdima<\pgf@ya%
+ \advance\pgfutil@tempdima by\pgf@yc%
+ \fi%
+ \pgfutil@tempdimb\pgf@x
+ \pgfutil@loop% horizontal lines
+ {%
+ \pgf@xa=\pgfutil@tempdimb%
+ \pgf@ya=\pgfutil@tempdima%
+ \pgf@pos@transform{\pgf@xa}{\pgf@ya}
+ \pgf@nlt@moveto{\pgf@xa}{\pgf@ya}%
+ \pgf@xa=\pgf@xb%
+ \pgf@ya=\pgfutil@tempdima%
+ \pgf@pos@transform{\pgf@xa}{\pgf@ya}
+ \pgf@nlt@lineto{\pgf@xa}{\pgf@ya}%
+ }%
\advance\pgfutil@tempdima by\pgf@yc%
+ \ifdim\pgfutil@tempdima<\pgf@yb%
+ \pgfutil@repeat%
+ \advance\pgfutil@tempdima by-0.01pt\relax%
+ \ifdim\pgfutil@tempdima<\pgf@yb%
+ {%
+ \pgf@xa=\pgfutil@tempdimb%
+ \pgf@ya=\pgfutil@tempdima%
+ \pgf@pos@transform{\pgf@xa}{\pgf@ya}
+ \pgf@nlt@moveto{\pgf@xa}{\pgf@ya}%
+ \pgf@xa=\pgf@xb%
+ \pgf@ya=\pgfutil@tempdima%
+ \pgf@pos@transform{\pgf@xa}{\pgf@ya}
+ \pgf@nlt@lineto{\pgf@xa}{\pgf@ya}%
+ }%
+ \fi%
\fi%
- \pgfutil@tempdimb\pgf@x
- \pgfutil@loop% horizontal lines
- {%
- \pgf@xa=\pgfutil@tempdimb%
- \pgf@ya=\pgfutil@tempdima%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgf@nlt@moveto{\pgf@xa}{\pgf@ya}%
- \pgf@xa=\pgf@xb%
- \pgf@ya=\pgfutil@tempdima%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgf@nlt@lineto{\pgf@xa}{\pgf@ya}%
- }%
- \advance\pgfutil@tempdima by\pgf@yc%
- \ifdim\pgfutil@tempdima<\pgf@yb%
- \pgfutil@repeat%
- \advance\pgfutil@tempdima by-0.01pt\relax%
- \ifdim\pgfutil@tempdima<\pgf@yb%
- {%
- \pgf@xa=\pgfutil@tempdimb%
- \pgf@ya=\pgfutil@tempdima%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgf@nlt@moveto{\pgf@xa}{\pgf@ya}%
- \pgf@xa=\pgf@xb%
- \pgf@ya=\pgfutil@tempdima%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}
- \pgf@nlt@lineto{\pgf@xa}{\pgf@ya}%
- }%
- \fi%
- \c@pgf@counta=\pgfutil@tempdimb\relax%
- \c@pgf@countb=\pgf@xc\relax%
- \divide\c@pgf@counta by\c@pgf@countb\relax%
- \pgfutil@tempdimb=\c@pgf@counta\pgf@xc\relax%
- \ifdim\pgfutil@tempdimb<\pgf@xa%
- \advance\pgfutil@tempdimb by\pgf@xc%
- \fi%
- \pgfutil@loop% vertical lines
- {%
- \pgf@xc=\pgfutil@tempdimb%
- \pgf@yc=\pgf@ya%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgf@nlt@moveto{\pgf@xc}{\pgf@yc}%
- \pgf@xc=\pgfutil@tempdimb%
- \pgf@yc=\pgf@yb%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgf@nlt@lineto{\pgf@xc}{\pgf@yc}%
- }%
- \advance\pgfutil@tempdimb by\pgf@xc%
- \ifdim\pgfutil@tempdimb<\pgf@xb%
- \pgfutil@repeat%
- \advance\pgfutil@tempdimb by-0.01pt\relax%
- \ifdim\pgfutil@tempdimb<\pgf@xb%
- {%
- \pgf@xc=\pgfutil@tempdimb%
- \pgf@yc=\pgf@ya%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgf@nlt@moveto{\pgf@xc}{\pgf@yc}%
- \pgf@xc=\pgfutil@tempdimb%
- \pgf@yc=\pgf@yb%
- \pgf@pos@transform{\pgf@xc}{\pgf@yc}
- \pgf@nlt@lineto{\pgf@xc}{\pgf@yc}%
- }%
+ \ifdim \pgf@xc > .01pt\relax% if to draw vertical lines
+ \c@pgf@counta=\pgf@xa\relax%
+ \c@pgf@countb=\pgf@xc\relax%
+ \divide\c@pgf@counta by\c@pgf@countb\relax%
+ \pgfutil@tempdimb=\c@pgf@counta\pgf@xc\relax%
+ \ifdim\pgfutil@tempdimb<\pgf@xa%
+ \advance\pgfutil@tempdimb by\pgf@xc%
+ \fi%
+ \pgfutil@loop% vertical lines
+ {%
+ \pgf@xc=\pgfutil@tempdimb%
+ \pgf@yc=\pgf@ya%
+ \pgf@pos@transform{\pgf@xc}{\pgf@yc}
+ \pgf@nlt@moveto{\pgf@xc}{\pgf@yc}%
+ \pgf@xc=\pgfutil@tempdimb%
+ \pgf@yc=\pgf@yb%
+ \pgf@pos@transform{\pgf@xc}{\pgf@yc}
+ \pgf@nlt@lineto{\pgf@xc}{\pgf@yc}%
+ }%
+ \advance\pgfutil@tempdimb by\pgf@xc%
+ \ifdim\pgfutil@tempdimb<\pgf@xb%
+ \pgfutil@repeat%
+ \advance\pgfutil@tempdimb by-0.01pt\relax%
+ \ifdim\pgfutil@tempdimb<\pgf@xb%
+ {%
+ \pgf@xc=\pgfutil@tempdimb%
+ \pgf@yc=\pgf@ya%
+ \pgf@pos@transform{\pgf@xc}{\pgf@yc}
+ \pgf@nlt@moveto{\pgf@xc}{\pgf@yc}%
+ \pgf@xc=\pgfutil@tempdimb%
+ \pgf@yc=\pgf@yb%
+ \pgf@pos@transform{\pgf@xc}{\pgf@yc}
+ \pgf@nlt@lineto{\pgf@xc}{\pgf@yc}%
+ }%
+ \fi%
\fi%
+ \pgf@process{#3}%
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@nlt@moveto{\pgf@x}{\pgf@y}%
}
@@ -1223,20 +1230,20 @@
%
% #1 = bend (relative to current point)
% #2 = end point (relative to bend point)
-%
+%
% Description:
-%
+%
% This command appends a half-parabola that starts at the current point
% and has its bend at #1+current point. Then, a second parabola is
% appended that starts at #1+current point, where it also has its
% minimum/maximum, and ends at #1+current point+#2, which becomes the
-% new current point.
-%
+% new current point.
+%
% By setting #2 = (0,0) you draw only a half parabola that goes from the
% current point to the bend; by setting #1 = (0,0)
% you draw a half parabola that going to current point + #2 and has its
-% bend at the current point.
-%
+% bend at the current point.
+%
% Examples:
%
% % Half-parabola going ``up and right''
@@ -1264,7 +1271,7 @@
\ifdim\pgf@yb=0pt\relax%
\pgfutil@tempswafalse%
\fi%
- \fi%
+ \fi%
{%
\ifpgfutil@tempswa%
\pgf@arccornersfalse
@@ -1276,7 +1283,7 @@
\pgfutil@tempswafalse%
\fi%
\fi%
- \ifpgfutil@tempswa
+ \ifpgfutil@tempswa
{%
\pgf@pt@x=\pgf@path@lastx%
\pgf@pt@y=\pgf@path@lasty%
@@ -1299,8 +1306,8 @@
{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
}%
\fi%
- }%
-}
+ }%
+}
@@ -1308,12 +1315,12 @@
% Append a sine curve between 0 and \pi/2 to the path.
%
% #1 = vector, describing the width and height of the curve
-%
+%
% Description:
-%
+%
% This command appends a sine curve in the interval 0 and \pi/2 to the
% current path. The sine curve ends at currentpoint+#1.
-%
+%
% Examples:
%
% % One complete sine in the interval [0,\pi]
@@ -1329,16 +1336,16 @@
\pgf@pt@x=\pgf@path@lastx% evil trickery to transform to the last point
\pgf@pt@y=\pgf@path@lasty%
\pgfpathcurveto%
- {\pgfqpoint{.31831\pgf@xc}{.5\pgf@yc}}% found by trial and error
- {\pgfqpoint{.63503\pgf@xc}{\pgf@yc}}% found by trial and error
+ {\pgfqpoint{.3260\pgf@xc}{.5120\pgf@yc}}%
+ {\pgfqpoint{.6380\pgf@xc}{\pgf@yc}}%
{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
- }%
-}
+ }%
+}
% Append a cosine curve between 0 and \pi/2 to the path.
%
% #1 = vector, describing the width and height of the curve
-%
+%
% Examples:
%
% % One complete sine in the interval [0,\pi]
@@ -1354,11 +1361,11 @@
\pgf@pt@x=\pgf@path@lastx% evil trickery to transform to the last point
\pgf@pt@y=\pgf@path@lasty%
\pgfpathcurveto%
- {\pgfqpoint{.36497\pgf@xc}{0pt}}% found by trial and error
- {\pgfqpoint{.68169\pgf@xc}{.5\pgf@yc}}% found by trial and error
+ {\pgfqpoint{.3620\pgf@xc}{0pt}}%
+ {\pgfqpoint{.6740\pgf@xc}{.4880\pgf@yc}}%
{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
- }%
-}
+ }%
+}
@@ -1371,7 +1378,7 @@
% #5 - second control
% #6 - end point of the curve
%
-% There are two versions, \pgfpathcurvebetweentime and
+% There are two versions, \pgfpathcurvebetweentime and
% \pgfpathcurvebetweentimecontinue. The latter does not insert a
% moveto to the first point.
%
@@ -1395,7 +1402,7 @@
\def\pgf@@@pathcurvebetweentime#1#2#3#4#5{%
% Q1 = P1.
- \pgf@process{#2}%
+ \pgf@process{#2}%
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
% Q2 = P1 + t*(P2-P1).
@@ -1417,7 +1424,7 @@
\pgf@process{%
\pgf@process{#4}%
\pgf@xa=#1\pgf@x%
- \pgf@ya=#1\pgf@y%
+ \pgf@ya=#1\pgf@y%
%
\pgf@process{#3}%
\pgf@xc=\pgf@x%
@@ -1428,7 +1435,7 @@
\pgf@x=\pgf@xb%
\pgf@y=\pgf@yb%
\advance\pgf@x by#1\pgf@xa%
- \advance\pgf@y by#1\pgf@ya%
+ \advance\pgf@y by#1\pgf@ya%
\advance\pgf@x by-#1\pgf@xb%
\advance\pgf@y by-#1\pgf@yb%
\advance\pgf@x by#1\pgf@xc%
@@ -1437,7 +1444,7 @@
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
% Q4 = (1-t)^3*P1 + 3*t(1-t)^2*P2 + 3*t^2(1-t)*P3 + t^3*P4.
- \pgf@process{\pgfpointcurveattime{#1}{#2}{#3}{#4}{#5}}%
+ \pgf@process{\pgfpointcurveattime{#1}{#2}{#3}{#4}{#5}}%
\ifx#1\pgf@time@t%
% First time round...
\pgfmathdivide@{\pgf@time@s}{\pgf@time@t}%
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
index b9c47231afa..0f52985c194 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
@@ -7,20 +7,20 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex,v 1.9 2013/09/09 10:05:41 tantau Exp $
+\ProvidesFileRCS{pgfcorepathprocessing.code.tex}
% Split a path at the last subpath of a path
%
% #1 = a macro that stores a path
-%
+%
% Description:
%
% This command will split the path into two parts:
%
% \pgfprocessresultpathprefix
% The part of the path before the last subpath.
-%
+%
% \pgfprocessresultpathsuffix
% The last subpath on the path.
%
@@ -31,7 +31,7 @@
\def\pgfprocesssplitpath#1{%
\let\pgfprocessresultpathprefix\pgfutil@empty%
\let\pgfprocessresultpathsuffix\pgfutil@empty%
- \let\pgf@next\pgf@process@split%
+ \let\pgf@next\pgf@process@split%
\expandafter\pgf@process@split#1\pgfsyssoftpath@movetotoken{}{}\pgf@stop%
}
@@ -51,13 +51,13 @@
% Split a subpath at the end
-%
+%
% #1 = a macro that stores an open subpath that contains at least two
% path commands (so, not just a moveto);
-%
+%
% Description:
-%
-% Splits the supath into two parts:
+%
+% Splits the subpath into two parts:
%
% \pgfprocessresultsubpathsuffix
% This macro contains the last two "relevant" path commands: The end
@@ -87,7 +87,7 @@
\expandafter\def\expandafter\pgfprocessresultsubpathsuffix\expandafter{\pgfprocessresultsubpathsuffix#1{#2}{#3}}%
\let\pgf@next\pgfutil@gobble%
\else%
- \pgf@split@movetrue%
+ \pgf@split@movetrue%
\ifx#1\pgfsyssoftpath@curvetosupportatoken%
\pgf@split@movefalse%
\else
@@ -122,7 +122,7 @@
% put in the pgfpoint-macros \pgfpointfirstonpath,
% \pgfpointsecondonpath, \pgfpointsecondlastonpath, and
% \pgfpointlastonpath. If the path is empty, these macros are set to
-% \pgfpointorigin.
+% \pgfpointorigin.
%
% Example:
%
@@ -131,7 +131,7 @@
% \pgfsyssoftpath@curveto{20}{20}{30}{30}{40}{40}
% \pgfsyssoftpath@getcurrentpath\mypath
% \pgfprocesspathextractpoints\mypath
-%
+%
% % \pgfpointfirstonpath is now \pgfpoint{0}{0}
% % \pgfpointsecondonpath is now \pgfpoint{10bp}{10bp}
% % \pgfpointsecondlastonpath is now \pgfpoint{30bp}{30bp}
@@ -234,7 +234,7 @@
\pgf@proc@todo%
}
-
+
% Resolve specialround
%
% #1 = a macro that stores a path
@@ -243,7 +243,7 @@
% Description:
%
% Resolves all specialround tokens. When such a token is encountered,
-% the objective is to replace the next corner by a rounded corner.
+% the objective is to replace the next corner by a rounded corner.
%
\def\pgfprocessround#1#2{%
@@ -264,7 +264,7 @@
}
-\def\pgf@@processround#1#2{%
+\def\pgf@@processround#1#2{%
\let\pgfprocess@newpath\pgfutil@empty%
\let\pgfprocess@moveto\pgfutil@empty%
\let\pgfprocess@firstto\pgfutil@empty%
@@ -309,7 +309,7 @@
\let\next=\pgfprocess@round%
\fi%
\fi%
- \next%
+ \next%
}
\def\pgfprocess@specialround#1#2#3{%
@@ -322,7 +322,7 @@
\let\next=\pgfprocess@specialroundcope%
\else%
\ifx#1\pgfsyssoftpath@curvetosupportatoken%
- % Ok, round a curveto.
+ % Ok, round a curveto.
\let\next=\pgfprocess@specialroundcurveto%
\else%
\ifx#1\pgfsyssoftpath@closepathtoken%
@@ -343,17 +343,17 @@
\pgf@yc=#6%
\let\next=\pgfprocess@@specialround%
\else%
- \ifx#4\pgfsyssoftpath@curvetosupportatoken%
+ \ifx#4\pgfsyssoftpath@curvetosupportatoken%
\pgf@xc=#5%
\pgf@yc=#6%
\let\next=\pgfprocess@@specialround%
\else%
- \ifx#4\pgfsyssoftpath@closepathtoken%
+ \ifx#4\pgfsyssoftpath@closepathtoken%
\pgf@xc=#5%
\pgf@yc=#6%
\let\next=\pgfprocess@@specialround%
\else
- \ifx#4\pgfsyssoftpath@specialroundtoken%
+ \ifx#4\pgfsyssoftpath@specialroundtoken%
\let\next=\pgfprocess@@findrightcoordinates%
\fi%
\fi%
@@ -445,7 +445,7 @@
\expandafter\expandafter\expandafter\noexpand\expandafter\pgfprocess@@specialclosemoveto\pgfprocess@moveto%
}%
\fi%
- \fi%
+ \fi%
\next%
}
@@ -462,7 +462,7 @@
\def\pgfprocess@cleanupafterclose#1#2#3{%
\edef\pgfprocess@moveto{\noexpand\pgfsyssoftpath@movetotoken{\the\pgf@xc}{\the\pgf@yc}}%
\edef\pgf@marshal{\noexpand\pgfprocess@round\noexpand\pgfsyssoftpath@closepathtoken{\the\pgf@xc}{\the\pgf@yc}}%
- \pgf@marshal%
+ \pgf@marshal%
}
@@ -546,7 +546,7 @@
\pgfsyssoftpath@addtocurrentpath{#1{#2}{#3}}%
\fi%
\pgf@next#4%
-}
+}
\def\pgf@replace@handle@move{%
\pgfsyssoftpath@getcurrentpath\pgf@restpath%
@@ -559,5 +559,5 @@
% Redo first.
\let\pgf@@next=\pgf@replaceprocessfirst%
}
-
+
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
index 0c36d3c1a4f..4ca277c9923 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathusage.code.tex,v 1.24 2014/11/02 21:38:01 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfcorepathusage.code.tex}
% Stroke/fill/clip/etc. the current path. Depending on the options,
@@ -15,7 +15,7 @@
% are given, the path is stroked. If multiple options are given, all
% of them are performed (in a sensible order).
%
-% #1 = action(s) to be applied to the current path. Valid actions are:
+% #1 = action(s) to be applied to the current path. Valid actions are:
% stroke - strokes the path.
% draw - strokes the path and adds arrow tips.
% tips - adds arrow tips.
@@ -101,11 +101,11 @@
\let\pgf@up@action=\pgfutil@empty%
\ifx\pgf@up@clip\pgfutil@empty%
\else%
- % only clipping
+ % only clipping
\let\pgf@up@action=\pgfsys@discardpath%
\fi%
\fi%
- \fi%
+ \fi%
\pgfsyssoftpath@getcurrentpath\pgf@last@processed@path
\pgfprocessround{\pgf@last@processed@path}{\pgf@last@processed@path}% change the path
\pgfsyssoftpath@setcurrentpath\pgf@last@processed@path%
@@ -139,7 +139,7 @@
\ifnum\pgf@tips@mode=4\relax%
\pgf@up@draw@arrows@only%
\fi%
- \else%
+ \else%
\pgfsyssoftpath@invokecurrentpath%
\pgf@up@action%
\fi%
@@ -149,13 +149,16 @@
\pgfprocesscheckclosed{\pgf@arrowpath}{\pgfutil@tempswafalse}%
\pgf@path@check@proper%
\ifpgfutil@tempswa%
+ \pgf@check@for@arrow@and@animation%
\pgf@prepare@end@of@path%
\begingroup%
\pgf@prepare@start@of@path%
\fi%
- \pgfsyssoftpath@invokecurrentpath%
+ \pgfsyssoftpath@invokecurrentpath%
\pgf@up@action%
- \pgf@stroke@inner@line@if@needed%
+ \ifdim\pgfinnerlinewidth>0pt\relax%
+ \pgf@stroke@inner@line%
+ \fi%
\ifpgfutil@tempswa%
\pgf@add@arrow@at@start%
\endgroup%
@@ -186,6 +189,7 @@
\pgfprocesscheckclosed{\pgf@arrowpath}{\pgfutil@tempswafalse}%
\pgf@path@check@proper%
\ifpgfutil@tempswa%
+ \pgf@check@for@arrow@and@animation%
\pgf@prepare@end@of@path%
\begingroup%
\pgf@prepare@start@of@path%
@@ -195,6 +199,22 @@
\fi%
}
+\def\pgf@check@for@arrow@and@animation{\pgfsys@if@fresh@currentid{\pgf@check@for@arrow@and@animation@}{}}%
+\def\pgf@check@for@arrow@and@animation@{%
+ \expandafter\ifx\csname pgfsysanim@path@is@animated@\pgf@sys@id@current@id @\pgfsys@current@type\endcsname\pgfutil@empty%
+ % Ok, an animation is here!
+ \ifx\pgf@end@tip@sequence\pgfutil@empty%
+ \ifx\pgf@start@tip@sequence\pgfutil@empty%
+ \else%
+ \pgf@check@for@arrow@and@animation@error%
+ \fi%
+ \else%
+ \pgf@check@for@arrow@and@animation@error%
+ \fi%
+ \fi%
+}
+\def\pgf@check@for@arrow@and@animation@error{\pgferror{Animated path may not have normal arrow tips. Use a base path with arrow tips}}
+
\def\pgf@path@check@proper{%
\ifpgfutil@tempswa%
\ifnum\pgf@tips@mode>2\relax%
@@ -203,7 +223,6 @@
\fi%
}
-
\def\pgf@path@check@proper@{%
{%
\pgf@x0pt\pgf@y\pgf@x%
@@ -234,24 +253,20 @@
-\def\pgf@stroke@inner@line@if@needed{%
- \ifdim\pgfinnerlinewidth>0pt\relax%
- \let\pgf@temp@save=\pgf@strokecolor@global
- \pgfsys@beginscope%
- {%
- \pgfsys@setlinewidth{\pgfinnerlinewidth}%
- \pgfsetstrokecolor{\pgfinnerstrokecolor}%
- \pgfsyssoftpath@invokecurrentpath%
- \pgfsys@stroke%
- }%
- \pgfsys@endscope%
- \global\let\pgf@strokecolor@global=\pgf@temp@save
- \fi%
+\def\pgf@stroke@inner@line{%
+ \let\pgf@temp@save=\pgf@strokecolor@global
+ \pgfsys@beginscope%
+ {%
+ \pgfsys@setlinewidth{\pgfinnerlinewidth}%
+ \pgfsetstrokecolor{\pgfinnerstrokecolor}%
+ \pgfsyssoftpath@invokecurrentpath%
+ \pgfsys@stroke%
+ }%
+ \pgfsys@endscope%
+ \global\let\pgf@strokecolor@global=\pgf@temp@save
}
\let\pgf@prepare@start@of@path\relax%
-\let\pgf@add@arrow@at@end\relax%
-\let\pgf@add@arrow@at@start\relax%
@@ -278,11 +293,11 @@
-%
-%
-% Handling the end of a path
-%
-%
+%
+%
+% Handling the end of a path
+%
+%
% The "handling" consists of first testing whether we need to do
% anything at all, namely because either an arrow tip should be drawn
% at the end or because the path should be shortened at the end. If
@@ -296,20 +311,23 @@
% (step 0) and, if so, split the path (step 1), extract the interesting points from
% the path (step 2), prepare further computations (step 3), shorten
% the path (step 4) if necessary, and add the arrow tip (step 4 in
-% macro \pgf@add@arrow@at@end, which is called later).
+% macro \pgf@add@arrow@at@end, which is called later).
\def\pgf@prepare@end@of@path{%
\let\pgfprocessresultpathsuffix\relax% flag that nothing has happened...
\let\pgfprocessresultsubpathsuffix\relax%
\pgfsyssoftpath@getcurrentpath\pgf@arrowpath%
- %
+ %
% Step 0 start:
- %
- % Do we need to worry about the end?
- %
+ %
+ % Do we need to worry about the end?
+ %
\ifx\pgf@arrowpath\pgfutil@empty\else%
\pgf@worryfalse%
- \ifx\pgf@end@tip@sequence\pgfutil@empty\else\pgf@worrytrue\fi% Yes, worry if we have to draw an arrow
+ \ifx\pgf@end@tip@sequence\pgfutil@empty%
+ \else%
+ \pgf@worrytrue% Yes, worry if we have to draw an arrow
+ \fi%
\pgf@precise@shorteningfalse%
\pgf@arrow@compute@shortening\pgf@end@tip@sequence%
\advance\pgf@xa by\pgf@shorten@end@additional%
@@ -317,28 +335,28 @@
\ifdim\pgf@xa=0pt\relax\else\pgf@worrytrue\fi% Also, worry if shortening is requested
\edef\pgf@path@shortening@distance{\the\pgf@xa}%
\edef\pgf@arrow@tip@total@length{\the\pgf@xb}%
- %
+ %
% Step 0 done.
- %
+ %
\ifpgf@worry%
% Ok, need to "worry" about the end, either because we need to
% shorten it or to draw an arrow head.
%
% Step 1: Split
- %
+ %
\pgfprocesssplitpath{\pgf@arrowpath}%
\pgfprocesssplitsubpath{\pgfprocessresultpathsuffix}%
- %
+ %
% Step 2: extract
%
\expandafter\pgf@parse@end\pgfprocessresultsubpathsuffix\pgf@stop\pgf@stop\pgf@stop%
- %
- % Step 3: prep
- %
+ %
+ % Step 3: prep
+ %
\pgf@prep@end%
- %
+ %
% Step 4: shorten
- %
+ %
\ifdim\pgf@path@shortening@distance=0pt\else\pgf@do@shorten@end\fi%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\pgf@arrowpath%
@@ -376,7 +394,7 @@
\def\pgfpointlastonpath{\pgfqpoint{#5}{#6}}%
\let\pgfpointfourthlastonpath\relax%
\let\pgfpointthirdlastonpath\relax%
- \let\pgf@next\pgf@parse@end@gobble@three%
+ \let\pgf@next\pgf@parse@end@gobble@three%
\let\pgf@do@shorten@end\pgf@do@shorten@straightend%
\let\pgf@do@draw@end\pgf@do@draw@straightend%
\let\pgf@prep@end\pgf@prep@straightend%
@@ -394,8 +412,8 @@
\fi%
}
-%
-% Preps
+%
+% Preps
%
\def\pgf@prep@movetoend{%
\pgf@process{\pgfpointlastonpath}%
@@ -422,7 +440,7 @@
}
-%
+%
% Line shortening for straight lines:
%
\def\pgf@do@shorten@straightend{%
@@ -433,21 +451,21 @@
}
-%
+%
% Draw an end arrow by calling an appropriate subfunction, if necessary
-%
+%
\def\pgf@add@arrow@at@end{%
\ifx\pgf@arrowpath\pgfutil@empty\else%
\ifx\pgf@end@tip@sequence\pgfutil@empty\else%
\pgf@do@draw@end%
- \fi%
+ \fi%
\fi%
}
-%
+%
% Draw an end arrow at the end of a straight line
-%
+%
\def\pgf@do@draw@straightend{%
{%
\pgftransformreset%
@@ -458,29 +476,31 @@
-%
-%
-% Handling the start of a path
-%
-%
+
+
+%
+%
+% Handling the start of a path
+%
+%
% The "handling" is similar to the case for the start of the path. We
% may be able to skip the splitting if that was done already for the
% end. Otherwise, things are basically the same.
%
% Prepare the start of the path: Test whether anything must be done
-% (step 0) and, if so, split the path (step 1) if necesssary, extract
+% (step 0) and, if so, split the path (step 1) if necessary, extract
% the interesting points from the path (step 2), prepare computations
% (step 3) needed for both shortening and tip adding, shorten the path
% (step 4), and add the arrow tip (step 5 in macro
-% \pgf@add@arrow@at@start, which is called later).
+% \pgf@add@arrow@at@start, which is called later).
\def\pgf@prepare@start@of@path{%
- %
+ %
% Step 0 start:
- %
- % Do we need to worry about the start?
- %
+ %
+ % Do we need to worry about the start?
+ %
\ifx\pgf@arrowpath\pgfutil@empty\else%
\pgf@worryfalse%
\ifx\pgf@start@tip@sequence\pgfutil@empty\else\pgf@worrytrue\fi% Yes, worry if we have to draw an arrow
@@ -491,30 +511,30 @@
\ifdim\pgf@xa=0pt\relax\else\pgf@worrytrue\fi% Also, worry if shortening is requested
\edef\pgf@path@shortening@distance{\the\pgf@xa}%
\edef\pgf@arrow@tip@total@length{\the\pgf@xb}%
- %
+ %
% Step 0 done.
- %
+ %
\ifpgf@worry%
% Ok, need to "worry" about the start, either because we need to
% shorten it or to draw an arrow head.
%
% Step 1: Split
- %
+ %
\ifx\pgfprocessresultpathsuffix\relax%
% Ok, still need to compute the split:
\pgfprocesssplitpath{\pgf@arrowpath}%
\fi%
- %
+ %
% Step 2: extract
%
\expandafter\pgf@parse@start\pgfprocessresultpathsuffix\pgf@stop\pgf@stop\pgf@stop%
- %
+ %
% Step 3: prep
%
\pgf@prep@start%
- %
+ %
% Step 4: shorten
- %
+ %
\ifdim\pgf@path@shortening@distance=0pt\else\pgf@do@shorten@start\fi%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\pgf@arrowpath%
@@ -549,7 +569,7 @@
\let\pgf@prep@start\pgf@prep@straightstart%
\fi%
\else% A straight line -> great!
- \let\pgf@next\pgf@parse@start@till@stop%
+ \let\pgf@next\pgf@parse@start@till@stop%
\let\pgf@do@shorten@start\pgf@do@shorten@straightstart%
\let\pgf@do@draw@start\pgf@do@draw@straightstart%
\let\pgf@prep@start\pgf@prep@straightstart%
@@ -571,8 +591,8 @@
\def\pgfsubpathend{#1{#2}{#3}#4{#5}{#6}#7}%
}
-%
-% Preps
+%
+% Preps
%
\def\pgf@prep@movetostart{%
\pgf@process{\pgfpointfirstonpath}%
@@ -598,7 +618,7 @@
\pgf@ya\pgf@y%
}
-%
+%
% Line shortening for straight lines:
%
\def\pgf@do@shorten@straightstart{%
@@ -609,21 +629,21 @@
}
-%
+%
% Draw a start arrow by calling an appropriate subfunction, if necessary
-%
+%
\def\pgf@add@arrow@at@start{%
\ifx\pgf@arrowpath\pgfutil@empty\else%
\ifx\pgf@start@tip@sequence\pgfutil@empty\else%
\pgf@do@draw@start%
- \fi%
+ \fi%
\fi%
}
-%
+%
% Draw an start arrow at the start of a straight line
-%
+%
\def\pgf@do@draw@straightstart{%
{%
\pgftransformreset%
@@ -639,8 +659,3 @@
\endinput%
-
-
-
-
-
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
index 54b5afcf6ae..d2186d66bc2 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepatterns.code.tex,v 1.5 2013/11/07 15:45:46 tantau Exp $
+\ProvidesFileRCS{pgfcorepatterns.code.tex}
% Creates a new uncolored pattern
%
@@ -110,16 +110,16 @@
\pgf@next}
\long\def\pgf@declarepatternformonly#1#2#3#4#5{\pgf@declarepattern{#1}{#2}{#3}{#4}{#5}{0}}
-
+
\long\def\pgf@declarepatterninherentlycolored#1#2#3#4#5{\pgf@declarepattern{#1}{#2}{#3}{#4}{#5}{1}}
-
+
\long\def\pgf@declarepatternformonly@mutable#1#2#3#4#5{%
- \def\pgf@marshal{\pgf@declarepatternmutable{#1}}%
+ \def\pgf@marshal{\pgf@declarepatternmutable{#1}}%
\expandafter\pgf@marshal\expandafter{\pgf@pattern@tempvars}{#2}{#3}{#4}{#5}{2}%
}
\long\def\pgf@declarepatterninherentlycolored@mutable#1#2#3#4#5#6{%
- \def\pgf@marshal{\pgf@declarepatternmutable{#1}}%
+ \def\pgf@marshal{\pgf@declarepatternmutable{#1}}%
\expandafter\pgf@marshal\expandafter{\pgf@pattern@tempvars}{#2}{#3}{#4}{#5}{3}%
}
@@ -177,7 +177,7 @@
\expandafter\gdef\csname pgf@pattern@upperright@#1\endcsname{#4}%
\expandafter\gdef\csname pgf@pattern@tilesize@#1\endcsname{#5}%
\expandafter\long\expandafter\gdef\csname pgf@pattern@code@#1\endcsname{#6}%
- \expandafter\gdef\csname pgf@pattern@type@#1\endcsname{7}%
+ \expandafter\gdef\csname pgf@pattern@type@#1\endcsname{7}%
}{\pgferror{The pattern `#1' is already defined}}%
}
@@ -218,7 +218,7 @@
{%
\pgf@ifpatternismutable{#1}%
{%
- % So, a mutable pattern. Check to see if the pattern
+ % So, a mutable pattern. Check to see if the pattern
% has been used with the current variable values...
\let\pgf@pattern@tempvars\pgfutil@empty%
\expandafter\expandafter\expandafter\pgf@pattern@check@vars%
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
index b546d5df40f..57db0d20ba2 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepoints.code.tex,v 1.27 2013/10/07 15:51:46 tantau Exp $
+\ProvidesFileRCS{pgfcorepoints.code.tex}
\newdimen\pgf@picminx
\newdimen\pgf@picmaxx
@@ -34,18 +34,18 @@
% \pgfextract@process\myarcpoint{\pgfpointpolar{30}{5cm and 2cm}}
\def\pgfextract@process#1#2{%
- \pgf@process{#2}%
- \edef#1{\noexpand\pgf@x=\the\pgf@x\noexpand\relax\noexpand\pgf@y=\the\pgf@y\noexpand\relax}%
+ \pgf@process{#2}%
+ \edef#1{\noexpand\global\pgf@x=\the\pgf@x\noexpand\relax\noexpand\global\pgf@y=\the\pgf@y\noexpand\relax}%
}
% This needed until old shapes code changed.
\let\pgfsavepgf@process\pgfextract@process%
% Return a point
-%
-% #1 = x-coordinate of the point
-% #2 = y-coordinate of the point
-%
+%
+% #1 = x-coordinate of the point
+% #2 = y-coordinate of the point
+%
% x = #1
% y = #2
%
@@ -59,10 +59,10 @@
% Quickly a point
-%
+%
% #1 = x-coordinate of the point (no calculations done)
% #2 = y-coordinate of the point (no calculations done)
-%
+%
% x = #1
% y = #2
%
@@ -70,12 +70,12 @@
%
% \pgfpathmoveto{\pgfqpoint{2pt}{3cm}}
-\def\pgfqpoint#1#2{\pgf@x=#1\pgf@y=#2}
+\def\pgfqpoint#1#2{\global\pgf@x=#1\relax\global\pgf@y=#2\relax}
% Return the origin.
-%
+%
% x = 0
% y = 0
%
@@ -83,12 +83,12 @@
%
% \pgfpathmoveto{\pgfpointorigin}
-\def\pgfpointorigin{\pgf@x=0pt\pgf@y=\pgf@x\ignorespaces}
+\def\pgfpointorigin{\global\pgf@x=0pt \global\pgf@y=\pgf@x\ignorespaces}
% Return a transformed point
-%
+%
% #1 = a point
%
% Description:
@@ -108,18 +108,18 @@
\def\pgfpointtransformed#1{%
\pgf@process{%
#1%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
}%
}
% Return the difference vector of two points.
-%
-% #1 = start of vector
-% #2 = end of vector
-%
-% x = x-component of difference
-% y = y-component of difference
+%
+% #1 = start of vector
+% #2 = end of vector
+%
+% x = x-component of difference
+% y = y-component of difference
%
% Example:
%
@@ -130,14 +130,14 @@
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\pgf@process{#2}%
- \advance\pgf@x by-\pgf@xa\relax%
- \advance\pgf@y by-\pgf@ya\relax\ignorespaces}
-
-% Add two vectors.
-%
-% #1 = first vector
-% #2 = second vector
-%
+ \global\advance\pgf@x by-\pgf@xa\relax%
+ \global\advance\pgf@y by-\pgf@ya\relax\ignorespaces}
+
+% Add two vectors.
+%
+% #1 = first vector
+% #2 = second vector
+%
% x = x-component of addition
% y = y-component of addition
%
@@ -150,15 +150,15 @@
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\pgf@process{#2}%
- \advance\pgf@x by\pgf@xa%
- \advance\pgf@y by\pgf@ya}
+ \global\advance\pgf@x by\pgf@xa%
+ \global\advance\pgf@y by\pgf@ya}
% Multiply a vector by a factor.
-%
-% #1 = factor
-% #2 = vector
+%
+% #1 = factor
+% #2 = vector
%
% Example:
%
@@ -167,20 +167,20 @@
\def\pgfpointscale#1#2{%
\pgf@process{#2}%
\pgfmathparse{#1}%
- \pgf@x=\pgfmathresult\pgf@x%
- \pgf@y=\pgfmathresult\pgf@y%
+ \global\pgf@x=\pgfmathresult\pgf@x%
+ \global\pgf@y=\pgfmathresult\pgf@y%
}
% A "quick" variant of \pgfpointscale which doesn't invoke the math parser for '#1'.
% #1 must be a number without units, no registers are accepted.
\def\pgfqpointscale#1#2{%
\pgf@process{#2}%
- \pgf@x=#1\pgf@x%
- \pgf@y=#1\pgf@y%
+ \global\pgf@x=#1\pgf@x%
+ \global\pgf@y=#1\pgf@y%
}
% The intersection of two lines
-%
+%
% #1 = point on first line
% #2 = another point on first line
% #3 = point on second line
@@ -196,9 +196,9 @@
\def\pgfpointintersectionoflines#1#2#3#4{%
{%
- %
+ %
% Compute orthogonal vector to #1--#2
- %
+ %
\pgf@process{#2}%
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
@@ -226,12 +226,12 @@
%
\pgf@xc=\pgf@sys@tonumber{\pgf@ya}\pgf@x%
\advance\pgf@xc by\pgf@sys@tonumber{\pgf@xa}\pgf@y%
- %
+ %
% The orthogonal vector is (\pgf@ya,\pgf@xa)
- %
- %
+ %
+ %
% Compute orthogonal vector to #3--#4
- %
+ %
\pgf@process{#4}%
\pgf@xb=\pgf@x%
\pgf@yb=\pgf@y%
@@ -259,12 +259,12 @@
%
\pgf@yc=\pgf@sys@tonumber{\pgf@yb}\pgf@x%
\advance\pgf@yc by\pgf@sys@tonumber{\pgf@xb}\pgf@y%
- %
+ %
% The orthogonal vector is (\pgf@yb,\pgf@xb)
- %
- % Setup transformation matrx (this is just to use the matrix
+ %
+ % Setup transformation matrix (this is just to use the matrix
% inversion)
- %
+ %
\pgfsettransform{{\pgf@sys@tonumber\pgf@ya}{\pgf@sys@tonumber\pgf@yb}{\pgf@sys@tonumber\pgf@xa}{\pgf@sys@tonumber\pgf@xb}{0pt}{0pt}}%
\pgftransforminvert%
\pgf@process{\pgfpointtransformed{\pgfpoint{\pgf@xc}{\pgf@yc}}}%
@@ -273,7 +273,7 @@
% The intersection of two circles
-%
+%
% #1 = center of first circle
% #2 = center of second circle
% #3 = radius of first circle
@@ -404,7 +404,7 @@
\pgf@xb=\pgf@sys@tonumber{\dimen0}\dimen9%
\pgf@xb=-\pgf@xb%
\advance\pgf@y by\pgf@xb\relax%
- \else%
+ \else%
% x = a + ek/p - (f/p)sqrt(r^2 - k^2)
\pgf@x=\pgf@xa%
\advance\pgf@x by\pgf@sys@tonumber{\dimen0}\dimen8\relax%
@@ -426,13 +426,13 @@
% Returns point on a line from #2 to #3 at time #1.
-%
+%
% #1 = a time, where 0 is the start and 1 is the end
% #2 = start point
-% #3 = end point
-%
+% #3 = end point
+%
% x = x-component of #1*start + (1-#1)*end
-% y = y-component of #1*start + (1-#1)*end
+% y = y-component of #1*start + (1-#1)*end
% xa/ya = #1*start + (1-#1)*end
% xb/yb = start point
% xc/yc = end point
@@ -454,21 +454,21 @@
\pgfmathsetmacro\pgf@temp{#1}%
\advance\pgf@xa by-\pgf@x%
\advance\pgf@ya by-\pgf@y%
- \advance\pgf@x by\pgf@temp\pgf@xa%
- \advance\pgf@y by\pgf@temp\pgf@ya%
+ \global\advance\pgf@x by\pgf@temp\pgf@xa%
+ \global\advance\pgf@y by\pgf@temp\pgf@ya%
}
% Move point #2 #1 many units in the direction of #3.
-%
+%
% #1 = a distance
% #2 = start point
-% #3 = end point
+% #3 = end point
%
% Description:
%
% Computes
-%
+%
% x/y = start + #1*(normalise(end-start))
%
% and additionally
@@ -490,27 +490,27 @@
\pgf@process{#3}%
\pgf@xc\pgf@x%
\pgf@yc\pgf@y%
- \advance\pgf@x by-\pgf@xb\relax%
- \advance\pgf@y by-\pgf@yb\relax%
+ \global\advance\pgf@x by-\pgf@xb\relax%
+ \global\advance\pgf@y by-\pgf@yb\relax%
\pgf@process{\pgfpointnormalised{}}% x/y = normalised vector
\pgf@ya=\pgf@xa\relax%
\pgf@xa=\pgf@sys@tonumber{\pgf@x}\pgf@xa%
\pgf@ya=\pgf@sys@tonumber{\pgf@y}\pgf@ya%
- \pgf@x=\pgf@xb\relax%
- \pgf@y=\pgf@yb\relax%
- \advance\pgf@x by\pgf@xa\relax%
- \advance\pgf@y by\pgf@ya\relax%
+ \global\pgf@x=\pgf@xb\relax%
+ \global\pgf@y=\pgf@yb\relax%
+ \global\advance\pgf@x by\pgf@xa\relax%
+ \global\advance\pgf@y by\pgf@ya\relax%
}
% Returns point on a curve from #2 to #5 with controls #3 and #4 at time #1.
-%
+%
% #1 = a time
% #2 = start point
% #3 = first control point
% #4 = second control point
-% #5 = end point
-%
+% #5 = end point
+%
% x = x-component of place on the curve at time t
% y = y-component of place on the curve at time t
%
@@ -528,8 +528,8 @@
\def\pgfpointcurveattime#1#2#3#4#5{%
\pgfmathparse{#1}%
\let\pgf@time@s=\pgfmathresult%
- \pgf@x=\pgfmathresult pt%
- \pgf@x=-\pgf@x%
+ \global\pgf@x=\pgfmathresult pt%
+ \global\pgf@x=-\pgf@x%
\advance\pgf@x by 1pt%
\edef\pgf@time@t{\pgf@sys@tonumber{\pgf@x}}%
\pgf@process{#5}%
@@ -543,30 +543,30 @@
\pgf@ya=\pgf@y%
\pgf@process{#2}%
% First iteration:
- \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
- \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
+ \global\pgf@x=\pgf@time@t\pgf@x\global\advance\pgf@x by\pgf@time@s\pgf@xa%
+ \global\pgf@y=\pgf@time@t\pgf@y\global\advance\pgf@y by\pgf@time@s\pgf@ya%
\pgf@xa=\pgf@time@t\pgf@xa\advance\pgf@xa by\pgf@time@s\pgf@xb%
\pgf@ya=\pgf@time@t\pgf@ya\advance\pgf@ya by\pgf@time@s\pgf@yb%
\pgf@xb=\pgf@time@t\pgf@xb\advance\pgf@xb by\pgf@time@s\pgf@xc%
\pgf@yb=\pgf@time@t\pgf@yb\advance\pgf@yb by\pgf@time@s\pgf@yc%
% Second iteration:
- \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
- \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
+ \global\pgf@x=\pgf@time@t\pgf@x\global\advance\pgf@x by\pgf@time@s\pgf@xa%
+ \global\pgf@y=\pgf@time@t\pgf@y\global\advance\pgf@y by\pgf@time@s\pgf@ya%
\pgf@xa=\pgf@time@t\pgf@xa\advance\pgf@xa by\pgf@time@s\pgf@xb%
\pgf@ya=\pgf@time@t\pgf@ya\advance\pgf@ya by\pgf@time@s\pgf@yb%
% Save x/y
\pgf@xb=\pgf@x%
\pgf@yb=\pgf@y%
% Third iteration:
- \pgf@x=\pgf@time@t\pgf@x\advance\pgf@x by\pgf@time@s\pgf@xa%
- \pgf@y=\pgf@time@t\pgf@y\advance\pgf@y by\pgf@time@s\pgf@ya%
+ \global\pgf@x=\pgf@time@t\pgf@x\global\advance\pgf@x by\pgf@time@s\pgf@xa%
+ \global\pgf@y=\pgf@time@t\pgf@y\global\advance\pgf@y by\pgf@time@s\pgf@ya%
}
% Returns point on an arc at a certain "time"
-%
-% #1 = a time
+%
+% #1 = a time
% #2 = center of a ellipse
% #3 = 0-degree exis of the ellipse
% #4 = 90-degree exis of the ellipse
@@ -589,8 +589,8 @@
\pgfmathsetmacro\pgf@angle@start{#5}%
\pgfmathsetmacro\pgf@angle@end{#6}%
\pgfmathparse{#1}%
- \pgf@x=\pgfmathresult pt%
- \pgf@x=-\pgf@x%
+ \global\pgf@x=\pgfmathresult pt%
+ \global\pgf@x=-\pgf@x%
\advance\pgf@x by 1pt%
\pgfmathsetmacro\pgf@angle@mid{\pgf@angle@end*\pgfmathresult+\pgf@angle@start*\pgf@sys@tonumber{\pgf@x}}%
\pgfmathcos@{\pgf@angle@mid}%
@@ -605,11 +605,11 @@
\pgf@process{\pgfpointadd{\pgfpointscale{\pgf@angle@sin}{\pgf@angle@zero@axis}}%
{\pgfpointscale{-\pgf@angle@cos}{\pgf@angle@ninety@axis}}}%
\ifdim\pgf@angle@start pt>\pgf@angle@end pt%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
\else%
- \pgf@xa=-\pgf@x%
- \pgf@ya=-\pgf@y%
+ \pgf@xa=-\pgf@x%
+ \pgf@ya=-\pgf@y%
\fi%
% Compute position
\pgf@process{\pgfpointadd{#2}{%
@@ -632,12 +632,12 @@
% A polar coordinate
%
% #1 = a degree
-% #2 = a radius -- either a dimension or two dimensions separated by
-% " and ".
+% #2 = a radius -- either a dimension or two dimensions separated by
+% " and ".
%
% x = (first dimension in #2) * cos(#1)
% y = (second dimension in #2) * sin(#2)
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfpointpolar{30}{1cm}}
@@ -649,29 +649,29 @@
\pgf@polar@#2\@@%
\else%
\pgf@polar@#2 and #2\@@%
- \fi%
+ \fi%
\pgfmathparse{#1}%
\let\pgfpoint@angle=\pgfmathresult%
\pgfmathcos@{\pgfpoint@angle}%
- \pgf@x=\pgfmathresult\pgf@x%
+ \global\pgf@x=\pgfmathresult\pgf@x%
\pgfmathsin@{\pgfpoint@angle}%
- \pgf@y=\pgfmathresult\pgf@y%
+ \global\pgf@y=\pgfmathresult\pgf@y%
}
\def\pgf@polar@#1and #2\@@{%
\pgfmathsetlength{\pgf@y}{#2}%
- \pgfmathsetlength{\pgf@x}{#1}%
+ \pgfmathsetlength{\pgf@x}{#1}%
}
% Quick version of the polar coordinate method
\def\pgfqpointpolar#1#2{%
- \pgf@x=#2%
- \pgf@y=\pgf@x%
+ \global\pgf@x=#2%
+ \global\pgf@y=\pgf@x%
\pgfmathcos@{#1}%
- \pgf@x=\pgfmathresult\pgf@x%
+ \global\pgf@x=\pgfmathresult\pgf@x%
\pgfmathsin@{#1}%
- \pgf@y=\pgfmathresult\pgf@y\relax%
+ \global\pgf@y=\pgfmathresult\pgf@y\relax%
}
@@ -680,11 +680,11 @@
% A polar coordinate in the xy plane.
%
% #1 = a degree
-% #2 = a radius given as a number or two radi
+% #2 = a radius given as a number or two radii
%
% result = (first dim in #2) * x-vector * cos(#1) +
% (second dim in #2) * y-vector * sin(#1)
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfpointpolarxy{30}{2}}
@@ -695,17 +695,17 @@
\pgf@polarxy@#2\@@%
\else%
\pgf@polarxy@#2and #2\@@%
- \fi%
+ \fi%
\pgfmathparse{#1}%
\let\pgfpoint@angle=\pgfmathresult%
\pgfmathcos@{\pgfpoint@angle}%
\pgf@xa=\pgfmathresult\pgf@xa%
\pgfmathsin@{\pgfpoint@angle}%
\pgf@ya=\pgfmathresult\pgf@ya%
- \pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@xx%
- \advance\pgf@x by \pgf@sys@tonumber{\pgf@ya}\pgf@yx%
- \pgf@y=\pgf@sys@tonumber{\pgf@xa}\pgf@xy%
- \advance\pgf@y by \pgf@sys@tonumber{\pgf@ya}\pgf@yy}
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@xx%
+ \global\advance\pgf@x by \pgf@sys@tonumber{\pgf@ya}\pgf@yx%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xa}\pgf@xy%
+ \global\advance\pgf@y by \pgf@sys@tonumber{\pgf@ya}\pgf@yy}
\def\pgf@polarxy@#1and #2\@@{%
\pgfmathsetlength{\pgf@xa}{#1}%
@@ -721,7 +721,7 @@
% #3 = a height given as a number
%
% result = #2*(x-vector * cos(#1) + y-vector * sin(#1)) + #3*z-vector
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfpointcylindrical{30}{2}{1}}
@@ -729,8 +729,8 @@
\def\pgfpointcylindrical#1#2#3{%
\pgfpointpolarxy{#1}{#2}%
\pgfmathparse{#3}%
- \advance\pgf@x by \pgfmathresult\pgf@zx%
- \advance\pgf@y by \pgfmathresult\pgf@zy}
+ \global\advance\pgf@x by \pgfmathresult\pgf@zx%
+ \global\advance\pgf@y by \pgfmathresult\pgf@zy}
% A spherical coordinate.
@@ -740,7 +740,7 @@
% #3 = a radius
%
% result = #3*(cos(#2)*(x-vector * cos(#1) + y-vector * sin(#1)) + sin(#2)*z-vector)
-%
+%
% Example:
%
% \pgfpathmoveto{\pgfpointspherical{30}{30}{2}}
@@ -764,33 +764,33 @@
\advance\pgf@xc by \pgfmathresult\pgf@zx%
\advance\pgf@yc by \pgfmathresult\pgf@zy%
\pgfmathparse{#3}%
- \pgf@x=\pgfmathresult\pgf@xc%
- \pgf@y=\pgfmathresult\pgf@yc\relax%
+ \global\pgf@x=\pgfmathresult\pgf@xc%
+ \global\pgf@y=\pgfmathresult\pgf@yc\relax%
}
% Store the vector #1 * x-vec + #2 * y-vec
%
% #1 = a factor for the x-vector
-% #2 = a factor fot the y-vector
+% #2 = a factor for the y-vector
%
% x = x-component of result vector
% y = y-component of result vector
%
% Description:
-%
+%
% This command can be used to create a new coordinate system
% without using the rotate/translate/scale commands. This
% may be useful, if you do not want arrows and line width to
% be scaled/transformed together with the coordinate system.
-%
+%
% Example:
%
% % Create a slanted rectangle
%
% \pgfsetxvec{\pgfpoint{1cm}{1cm}}
% \pgfsetyvec{\pgfpoint{0cm}{1cm}}
-%
+%
% \pgfpathmoveto{\pgfpointxy{0}{0}}
% \pgfpathlineto{\pgfpointxy{1}{0}}
% \pgfpathlineto{\pgfpointxy{1}{1}}
@@ -802,40 +802,40 @@
\let\pgftemp@x=\pgfmathresult%
\pgfmathparse{#2}%
\let\pgftemp@y=\pgfmathresult%
- \pgf@x=\pgftemp@x\pgf@xx%
- \advance\pgf@x by \pgftemp@y\pgf@yx%
- \pgf@y=\pgftemp@x\pgf@xy%
- \advance\pgf@y by \pgftemp@y\pgf@yy}
+ \global\pgf@x=\pgftemp@x\pgf@xx%
+ \global\advance\pgf@x by \pgftemp@y\pgf@yx%
+ \global\pgf@y=\pgftemp@x\pgf@xy%
+ \global\advance\pgf@y by \pgftemp@y\pgf@yy}
% "Quick" variant for \pgfpointxy.
%
% Only numbers without unit are allowed here.
\def\pgfqpointxy#1#2{%
- \pgf@x=#1\pgf@xx%
- \advance\pgf@x by #2\pgf@yx%
- \pgf@y=#1\pgf@xy%
- \advance\pgf@y by #2\pgf@yy}
+ \global\pgf@x=#1\pgf@xx%
+ \global\advance\pgf@x by #2\pgf@yx%
+ \global\pgf@y=#1\pgf@xy%
+ \global\advance\pgf@y by #2\pgf@yy}
% Store the vector #1 * x-vec + #2 * y-vec + #3 * z-vec
%
% #1 = a factor for the x-vector
-% #2 = a factor fot the y-vector
-% #3 = a factor fot the z-vector
+% #2 = a factor for the y-vector
+% #3 = a factor for the z-vector
%
% x = x-component of result vector
% y = y-component of result vector
%
%
% Description:
-%
+%
% This command allows you to use a 3d coordinate system.
-%
+%
%
% Example:
%
% % Draw a cubus
-%
+%
% \pgfline{\pgfpointxyz{0}{0}{0}}{\pgfpointxyz{0}{0}{1}}
% \pgfline{\pgfpointxyz{0}{1}{0}}{\pgfpointxyz{0}{1}{1}}
% \pgfline{\pgfpointxyz{1}{0}{0}}{\pgfpointxyz{1}{0}{1}}
@@ -856,23 +856,23 @@
\let\pgftemp@y=\pgfmathresult%
\pgfmathparse{#3}%
\let\pgftemp@z=\pgfmathresult%
- \pgf@x=\pgftemp@x\pgf@xx%
- \advance\pgf@x by \pgftemp@y\pgf@yx%
- \advance\pgf@x by \pgftemp@z\pgf@zx%
- \pgf@y=\pgftemp@x\pgf@xy%
- \advance\pgf@y by \pgftemp@y\pgf@yy%
- \advance\pgf@y by \pgftemp@z\pgf@zy}
+ \global\pgf@x=\pgftemp@x\pgf@xx%
+ \global\advance\pgf@x by \pgftemp@y\pgf@yx%
+ \global\advance\pgf@x by \pgftemp@z\pgf@zx%
+ \global\pgf@y=\pgftemp@x\pgf@xy%
+ \global\advance\pgf@y by \pgftemp@y\pgf@yy%
+ \global\advance\pgf@y by \pgftemp@z\pgf@zy}
% "Quick" variant for \pgfpointxyz.
%
% Only numbers without unit are allowed.
\def\pgfqpointxyz#1#2#3{%
- \pgf@x=#1\pgf@xx%
- \advance\pgf@x by #2\pgf@yx%
- \advance\pgf@x by #3\pgf@zx%
- \pgf@y=#1\pgf@xy%
- \advance\pgf@y by #2\pgf@yy%
- \advance\pgf@y by #3\pgf@zy}
+ \global\pgf@x=#1\pgf@xx%
+ \global\advance\pgf@x by #2\pgf@yx%
+ \global\advance\pgf@x by #3\pgf@zx%
+ \global\pgf@y=#1\pgf@xy%
+ \global\advance\pgf@y by #2\pgf@yy%
+ \global\advance\pgf@y by #3\pgf@zy}
@@ -946,7 +946,7 @@
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\ifdim\pgf@x<0pt\relax% move into first quadrant
- \pgf@x=-\pgf@x%
+ \global\pgf@x=-\pgf@x%
\fi%
\ifdim\pgf@y<0pt\relax%
\pgf@y=-\pgf@y%
@@ -958,29 +958,29 @@
\ifnum\c@pgf@counta=0\relax%
\c@pgf@counta=1\relax%
\fi%
- \divide\pgf@x by\c@pgf@counta%
- \divide\pgf@y by\c@pgf@counta%
+ \global\divide\pgf@x by\c@pgf@counta%
+ \global\divide\pgf@y by\c@pgf@counta%
\divide\pgf@xa by\c@pgf@counta%
\divide\pgf@ya by\c@pgf@counta%
% ok.
- \pgf@x=.125\pgf@x%
- \pgf@y=.125\pgf@y%
+ \global\pgf@x=.125\pgf@x%
+ \global\pgf@y=.125\pgf@y%
\c@pgf@counta=\pgf@x%
\c@pgf@countb=\pgf@y%
\multiply\c@pgf@countb by 100%
\ifnum\c@pgf@counta<64\relax%
- \pgf@x=1pt\relax%
- \pgf@y=0pt\relax%
+ \global\pgf@x=1pt\relax%
+ \global\pgf@y=0pt\relax%
\else%
\divide\c@pgf@countb by \c@pgf@counta%
- \pgf@x=\csname pgf@cosfrac\the\c@pgf@countb\endcsname pt%
+ \global\pgf@x=\csname pgf@cosfrac\the\c@pgf@countb\endcsname pt%
\pgf@xc=8192pt%
\divide\pgf@xc by\c@pgf@counta%
- \pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@ya%
- \pgf@y=\pgf@sys@tonumber{\pgf@x}\pgf@y%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@ya%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@x}\pgf@y%
\fi%
\ifdim\pgf@xa<0pt%
- \pgf@x=-\pgf@x%
+ \global\pgf@x=-\pgf@x%
\fi%
\else% x <= y
% make point small
@@ -989,29 +989,29 @@
\ifnum\c@pgf@counta=0\relax%
\c@pgf@counta=1\relax%
\fi%
- \divide\pgf@x by\c@pgf@counta%
- \divide\pgf@y by\c@pgf@counta%
+ \global\divide\pgf@x by\c@pgf@counta%
+ \global\divide\pgf@y by\c@pgf@counta%
\divide\pgf@xa by\c@pgf@counta%
\divide\pgf@ya by\c@pgf@counta%
% ok.
- \pgf@x=.125\pgf@x%
- \pgf@y=.125\pgf@y%
+ \global\pgf@x=.125\pgf@x%
+ \global\pgf@y=.125\pgf@y%
\c@pgf@counta=\pgf@y%
\c@pgf@countb=\pgf@x%
\multiply\c@pgf@countb by 100%
\ifnum\c@pgf@counta<64\relax%
- \pgf@y=1pt\relax%
- \pgf@x=0pt\relax%
+ \global\pgf@y=1pt\relax%
+ \global\pgf@x=0pt\relax%
\else%
\divide\c@pgf@countb by \c@pgf@counta%
- \pgf@y=\csname pgfmath@cosfrac@\the\c@pgf@countb\endcsname pt%
+ \global\pgf@y=\csname pgfmath@cosfrac@\the\c@pgf@countb\endcsname pt%
\pgf@xc=8192pt%
\divide\pgf@xc by\c@pgf@counta%
- \pgf@x=\pgf@sys@tonumber{\pgf@xc}\pgf@xa%
- \pgf@x=\pgf@sys@tonumber{\pgf@y}\pgf@x%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xc}\pgf@xa%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@y}\pgf@x%
\fi%
\ifdim\pgf@ya<0pt%
- \pgf@y=-\pgf@y%
+ \global\pgf@y=-\pgf@y%
\fi%
\fi\ignorespaces%
}
@@ -1043,10 +1043,10 @@
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\ifnum\pgf@xa<0\relax% move into first quadrant
- \pgf@x=-\pgf@x%
+ \global\pgf@x=-\pgf@x%
\fi%
\ifnum\pgf@ya<0\relax%
- \pgf@y=-\pgf@y%
+ \global\pgf@y=-\pgf@y%
\fi%
\pgf@xc=.125\pgf@x%
\pgf@yc=.125\pgf@y%
@@ -1054,62 +1054,62 @@
\c@pgf@countb=\pgf@yc%
\ifnum\c@pgf@countb<\c@pgf@counta%
\ifnum\c@pgf@counta<255\relax%
- \pgf@y=\pgf@yb\relax%
- \pgf@x=0pt\relax%
+ \global\pgf@y=\pgf@yb\relax%
+ \global\pgf@x=0pt\relax%
\else%
\pgf@xc=8192pt%
\divide\pgf@xc by\c@pgf@counta% \pgf@xc = 1/\pgf@x
- \pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@y%
- \pgf@y=\pgf@sys@tonumber{\pgf@xb}\pgf@y%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@y%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xb}\pgf@y%
\ifnum\pgf@y<\pgf@yb%
- \pgf@x=\pgf@xb%
+ \global\pgf@x=\pgf@xb%
\else% rats, calculate intersection on upper side
\ifnum\c@pgf@countb<255\relax%
- \pgf@x=\pgf@xb\relax%
- \pgf@y=0pt\relax%
+ \global\pgf@x=\pgf@xb\relax%
+ \global\pgf@y=0pt\relax%
\else%
\pgf@yc=8192pt%
\divide\pgf@yc by\c@pgf@countb% \pgf@xc = 1/\pgf@x
- \pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
- \pgf@x=\pgf@sys@tonumber{\pgf@yb}\pgf@x%
- \pgf@y=\pgf@yb%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@yb}\pgf@x%
+ \global\pgf@y=\pgf@yb%
\fi%
- \fi%
+ \fi%
\fi%
\else%
\ifnum\c@pgf@countb<255\relax%
- \pgf@x=\pgf@xb\relax%
- \pgf@y=0pt\relax%
+ \global\pgf@x=\pgf@xb\relax%
+ \global\pgf@y=0pt\relax%
\else%
\pgf@yc=8192pt%
\divide\pgf@yc by\c@pgf@countb% \pgf@xc = 1/\pgf@x
- \pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
- \pgf@x=\pgf@sys@tonumber{\pgf@yb}\pgf@x%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@yb}\pgf@x%
\ifnum\pgf@x<\pgf@xb%
- \pgf@y=\pgf@yb%
+ \global\pgf@y=\pgf@yb%
\else%
\ifnum\c@pgf@counta<255\relax%
- \pgf@y=\pgf@yb\relax%
- \pgf@x=0pt\relax%
+ \global\pgf@y=\pgf@yb\relax%
+ \global\pgf@x=0pt\relax%
\else%
\pgf@xc=8192pt%
\divide\pgf@xc by\c@pgf@counta% \pgf@xc = 1/\pgf@x
- \pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@y%
- \pgf@y=\pgf@sys@tonumber{\pgf@xb}\pgf@y%
- \pgf@x=\pgf@xb%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@y%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xb}\pgf@y%
+ \global\pgf@x=\pgf@xb%
\fi%
- \fi%
+ \fi%
\fi%
- \fi%
- \ifnum\pgf@xa<0\relax\pgf@x=-\pgf@x\fi%
- \ifnum\pgf@ya<0\relax\pgf@y=-\pgf@y\fi%
+ \fi%
+ \ifnum\pgf@xa<0\relax\global\pgf@x=-\pgf@x\fi%
+ \ifnum\pgf@ya<0\relax\global\pgf@y=-\pgf@y\fi%
}
% An approximation to a point on an ellipse in a certain
-% direction. Will be exact only if the ellipse is a circle.
+% direction. Will be exact only if the ellipse is a circle.
%
% #1 = a point pointing in some direction
% #2 = upper right corner of a bounding box for the ellipse
@@ -1128,44 +1128,44 @@
\pgf@ya=\pgf@y%
\ifdim\pgf@xa=\pgf@ya% circle. that's easy!
\pgf@process{\pgfpointnormalised{#1}}%
- \pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
- \pgf@y=\pgf@sys@tonumber{\pgf@xa}\pgf@y%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xa}\pgf@y%
\else%
\ifdim\pgf@xa<\pgf@ya%
% Ok, first, let's compute x/y:
\c@pgf@countb=\pgf@ya%
\divide\c@pgf@countb by65536\relax%
- \divide\pgf@x by\c@pgf@countb%
- \divide\pgf@y by\c@pgf@countb%
+ \global\divide\pgf@x by\c@pgf@countb%
+ \global\divide\pgf@y by\c@pgf@countb%
\pgf@xc=\pgf@x%
\pgf@yc=8192pt%
- \pgf@y=.125\pgf@y%
+ \global\pgf@y=.125\pgf@y%
\c@pgf@countb=\pgf@y%
\divide\pgf@yc by\c@pgf@countb%
\pgf@process{#1}%
- \pgf@y=\pgf@sys@tonumber{\pgf@yc}\pgf@y%
- \pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@y%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@yc}\pgf@y%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@xc}\pgf@y%
\pgf@process{\pgfpointnormalised{}}%
- \pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
- \pgf@y=\pgf@sys@tonumber{\pgf@ya}\pgf@y%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@ya}\pgf@y%
\else%
% Ok, now let's compute y/x:
\c@pgf@countb=\pgf@xa%
\divide\c@pgf@countb by65536\relax%
- \divide\pgf@x by\c@pgf@countb%
- \divide\pgf@y by\c@pgf@countb%
+ \global\divide\pgf@x by\c@pgf@countb%
+ \global\divide\pgf@y by\c@pgf@countb%
\pgf@yc=\pgf@y%
\pgf@xc=8192pt%
- \pgf@x=.125\pgf@x%
+ \global\pgf@x=.125\pgf@x%
\c@pgf@countb=\pgf@x%
\divide\pgf@xc by\c@pgf@countb%
\pgf@process{#1}%
- \pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
- \pgf@x=\pgf@sys@tonumber{\pgf@xc}\pgf@x%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@yc}\pgf@x%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xc}\pgf@x%
\pgf@process{\pgfpointnormalised{}}%
- \pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
- \pgf@y=\pgf@sys@tonumber{\pgf@ya}\pgf@y%
- \fi%
+ \global\pgf@x=\pgf@sys@tonumber{\pgf@xa}\pgf@x%
+ \global\pgf@y=\pgf@sys@tonumber{\pgf@ya}\pgf@y%
+ \fi%
\fi%
}
@@ -1174,7 +1174,7 @@
% Extract the x-coordinate of a point to a dimensions
-%
+%
% #1 = a TeX dimension
% #2 = a point
%
@@ -1190,7 +1190,7 @@
% Extract the y-coordinate of a point to a dimensions
-%
+%
% #1 = a TeX dimension
% #2 = a point
%
@@ -1205,11 +1205,10 @@
#1=\pgf@y\relax}
-% Stores the most recently used (x,y) coordinates into two macros, #1
-% and #2.
+% Stores the most recently used (x,y) coordinates into two macros, #1 and #2.
\def\pgfgetlastxy#1#2{%
- \edef#1{\the\pgf@x}%
- \edef#2{\the\pgf@y}%
+ \edef#1{\the\pgf@x}%
+ \edef#2{\the\pgf@y}%
}%
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
index d5817ce4282..21e115846fc 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorequick.code.tex,v 1.3 2008/10/09 16:46:56 tantau Exp $
+\ProvidesFileRCS{pgfcorequick.code.tex}
% Quick version of basic drawing commands. Most high-level commands
% are not available if these commands are used.
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex
new file mode 100644
index 00000000000..ae7e5351716
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex
@@ -0,0 +1,228 @@
+% Copyright 2016 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS{pgfcorerdf.code.tex}
+
+
+
+%
+%
+% The Resource Description Framework (RDF) is a method of enriching
+% output files with semantic information. In PGF, you can use the
+% following commands to create RDF information that will be inserted
+% into the output, provided the output format allows this (SVG
+% does). You call any of these commands before an ID-scope and it will
+% attach the attribute(s) to this id scope.
+%
+%
+% Example:
+%
+% ...
+% \pgfrdftypeof{http://purl.org/dc/dcmitype/Image}
+% \pgfrdfresource{/paper/figures/1}
+% \pgfidscope
+% % This ID scope will be flagged as the resource "/paper/figures/1"
+% % and typeof "Image" from the Dublin Core.
+% ...
+% \endidscope
+
+
+
+
+
+% Adds the rdf attribute "about" with value #1 to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "a SafeCURIEorCURIEorIRI, used for stating what
+% the data is about (a 'subject' in RDF terminology);"
+
+\def\pgfrdfabout#1{\pgfsys@rdf@about{#1}}
+
+
+
+% Adds the rdf attribute content with value #1 to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "a CDATA string, for supplying machine-readable
+% content for a literal (a 'literal object', in RDF terminology);"
+
+\def\pgfrdfcontent#1{\pgfsys@rdf@content{#1}}
+
+
+
+% Adds the rdf attribute datatype with value #1 to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "a TERMorCURIEorAbsIRI representing a datatype,
+% to express the datatype of a literal;"
+
+\def\pgfrdfdatatype#1{\pgfsys@rdf@datatype{#1}}
+
+
+
+% Adds the rdf attribute href with value #1 to the next idscope
+% The RDF-spec says: "a traditionally navigable IRI for
+% expressing the partner resource of a relationship (a 'resource object', in RDF terminology);"
+
+\def\pgfrdfhref#1{\pgfsys@rdf@href{#1}}
+
+
+
+% Adds the rdf attribute inlist to the next idscope.
+%
+% Description:
+%
+% The RDF-spec says: "An attribute used to indicate that the object
+% associated with a rel or property attribute on the same element is
+% to be added to the list for that predicate. Presence of this
+% attribute causes a list to be created if it does not already exist."
+
+\def\pgfrdfinlist{\pgfsys@rdf@inlist}
+
+
+
+
+% Adds #1 to the list of the rdf prefix attribute to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% Can be called several times, in which case all values of #1 are
+% concatenated with whitespaces. The RDF-spec says: "a white space
+% separated list of prefix-name IRI pairs of the form NCName ':' ' '+
+% xsd:anyURI"
+
+\def\pgfrdfprefix#1{\pgfsys@rdf@prefix{#1}}
+
+
+
+
+% Adds #1 to the list of the rdf property attribute to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% Can be called repeatedly. The RDF-spec says: "a white space
+% separated list of TERMorCURIEorAbsIRIs, used for expressing
+% relationships between a subject and either a resource object if
+% given or some literal text (also a 'predicate');"
+
+\def\pgfrdfproperty#1{\pgfsys@rdf@property{#1}}
+
+
+
+% Adds #1 to the list of the rdf rel attribute to the next
+% next idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% Can be called repeatedly. The RDF-spec says: "a white space
+% separated list of TERMorCURIEorAbsIRIs, used for expressing
+% relationships between two resources ('predicates' in RDF
+% terminology);"
+
+\def\pgfrdfrel#1{\pgfsys@rdf@rel{#1}}
+
+
+% Adds the rdf attribute resource with value #1 to the next idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "a SafeCURIEorCURIEorIRI for expressing the
+% partner resource of a relationship that is not intended to be
+% navigable (e.g., a 'clickable' link) (also an 'object');"
+
+\def\pgfrdfresource#1{\pgfsys@rdf@resource{#1}}
+
+
+
+
+% Adds #1 to the list of the rdf rev attribute to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% Can be called repeatedly. The RDF-spec says: "a white space
+% separated list of TERMorCURIEorAbsIRIs, used for expressing reverse
+% relationships between two resources (also 'predicates');
+
+\def\pgfrdfrev#1{\pgfsys@rdf@rev{#1}}
+
+
+
+
+% Adds an rdf attribute src with value #1 to the next idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "an IRI for expressing the partner resource of a
+% relationship when the resource is embedded (also a 'resource object');"
+
+\def\pgfrdfsrc#1{\pgfsys@rdf@src{#1}}
+
+
+
+
+% Adds #1 to the list of the rdf typeof attribute to the next
+% idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% Can be called repeatedly. The RDF-spec says: "a white space
+% separated list of TERMorCURIEorAbsIRIs that indicate the RDF type(s)
+% to associate with a subject;"
+
+\def\pgfrdftypeof#1{\pgfsys@rdf@typeof{#1}}
+
+
+
+
+% Adds an rdf attribute vocab with value #1 to the next idscope.
+%
+% #1 = A URL
+%
+% Description:
+%
+% The RDF-spec says: "an IRI that defines the mapping to use when a
+% TERM is referenced in an attribute value. See General Use of Terms
+% in Attributes and the section on Vocabulary Expansion."
+
+\def\pgfrdfvocab#1{\pgfsys@rdf@vocab{#1}}
+
+
+
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
index 02687fc29c3..50a820f6126 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorescopes.code.tex,v 1.46 2015/05/08 10:23:50 tantau Exp $
+\ProvidesFileRCS{pgfcorescopes.code.tex}
% Globals
@@ -37,7 +37,7 @@
% Pgf scope environment. All changes of the graphic state are local to
% the scope.
-%
+%
% Example:
%
% \begin{pgfscope}
@@ -64,30 +64,30 @@
% Quickly insert a box can contain normal TeX text at the origin.
-%
+%
% #1 = box of width/height and depth 0pt
-%
+%
% Example:
%
% \pgfqbox{\mybox}
\def\pgfqbox#1{%
\pgfsys@hbox#1%
-}
+}
% Insert a box that can contain normal TeX text at the origin, but
% with the current coordinate transformation matrix synced with the
% low-level transformation matrix.
-%
+%
% #1 = box of width/height and depth 0pt
%
% In essence, this command does the same as if you first said
% \pgflowlevelsynccm and then \pgfqbox. However, pgf will use a
% ``TeX-translation'' for the translation part of the transformation
% cm. This will ensure that hyperlinks ``survive'' at least
-% translations.
-%
+% translations.
+%
% Example:
%
% \pgfqboxsynced{\mybox}
@@ -99,11 +99,11 @@
% Puts some text in a box and inserts it with the current
% transformations applied.
-%
+%
% #1 = List of optional positioning. Possible values are ``left'', ``right'',
% ``top'', ``bottom'' and ``base''.
% #2 = TeX text. May contain verbatims.
-%
+%
% Example:
%
% \pgftransformshift{\pgfpoint{1cm}{0cm}}
@@ -173,7 +173,7 @@
\def\pgf@textdone{%
\endpgfinterruptpicture%
\egroup%
- \pgf@@maketextafter%
+ \pgf@@maketextafter%
}
\long\def\pgf@makehbox#1{%
@@ -248,10 +248,10 @@
\def\endpgfpicture{%
\ifpgfrememberpicturepositiononpage%
\hbox to0pt{\pgfsys@markposition{\pgfpictureid}}%
- \fi%
+ \fi%
% ok, now let's position the box
\ifdim\pgf@picmaxx=-16000pt\relax%
- % empty picture. make size 0.
+ % empty picture. make size 0.
\global\pgf@picmaxx=0pt\relax%
\global\pgf@picminx=0pt\relax%
\global\pgf@picmaxy=0pt\relax%
@@ -261,14 +261,14 @@
\pgf@relevantforpicturesizefalse%
\pgf@process{\pgf@baseline}%
\xdef\pgf@shift@baseline{\the\pgf@y}%
- %
+ %
\pgf@process{\pgf@trimleft}%
\global\advance\pgf@x by-\pgf@picminx
% prepare \hskip\pgf@trimleft@final.
% note that \pgf@trimleft@final is also queried
% by the pgf image externalization.
\xdef\pgf@trimleft@final{-\the\pgf@x}%
- %
+ %
\pgf@process{\pgf@trimright}%
\global\advance\pgf@x by-\pgf@picmaxx
% prepare \hskip\pgf@trimright@final.
@@ -282,7 +282,7 @@
\egroup%
\pgf@restore@layerlist@from@global
\pgf@insertlayers%
- \endgroup%
+ \endgroup%
\pgfsys@discardpath%
\endgroup%
\pgfsys@endscope%
@@ -328,7 +328,7 @@
%
% Sets the baseline of the picture to the y-coordinate of a given
% point. However, the point will be evaluated *at the end of the
-% picture*.
+% picture*.
%
% Example:
%
@@ -434,7 +434,7 @@
% The environment can be used to insert some drawing commands while
% constructing a path. The drawing commands inside the environment
% will not interfere with the path being constructed ``outside.''
-% However, you must ward against graphic state changes using a scope.
+% However, you must ward against graphic state changes using a scope.
%
% Example: Draw two parallel lines
%
@@ -458,7 +458,6 @@
\pgfsyssoftpath@setcurrentpath\pgfutil@empty%
\edef\pgfscope@linewidth{\the\pgflinewidth}%
\let\pgf@interrupt@lastmoveto=\pgfsyssoftpath@lastmoveto%
- \let\pgf@interrupt@nlt@infos=\pgf@nlt@infos%
\begingroup%
}
\def\endpgfinterruptpath
@@ -470,7 +469,6 @@
\global\pgf@path@lastx\pgf@interrupt@savex%
\global\pgf@path@lasty\pgf@interrupt@savey%
\global\let\pgfsyssoftpath@lastmoveto\pgf@interrupt@lastmoveto%
- \global\let\pgf@nlt@infos=\pgf@interrupt@nlt@infos%
\endgroup%
}
@@ -483,9 +481,9 @@
% The environment can be used to temporarily setup a new bounding box
% computation. The bounding box will be made empty at the beginning of
% the environment and will be reset to its old value after the
-% environment.
+% environment.
%
-% Example:
+% Example:
%
% \begin{pgfinterruptboundinbox}
% \pgfmoveto{\pgfpoint{1cm}{0cm}}
@@ -519,6 +517,190 @@
+% Creates an id scope.
+%
+% Description:
+%
+% An id scope is not (conceptually) a graphic scope, but a scope that
+% has a unique name or "id". This id can be used as a reference point
+% for instance for a hyperlink or for an animation (currently, only
+% SVG supports ids, all other drivers ignore id scopes).
+%
+% Prior to using \pgfidscope, call \pgfuseid to install an
+% id (and possibly \pgfusetype). The scope will then get this id and,
+% likely, a graphic scope is installed. If \pgfuseid has not been
+% called or if you try to call \pgfidscope again for the same id,
+% nothing happens (except for a \TeX\ group being established).
+
+\def\pgfidscope{\pgfsys@begin@idscope}
+\def\endpgfidscope{\pgfsys@end@idscope}
+
+\let\startpgfidscope\pgfidscope
+\let\stoppgfidscope\pgfendidscope
+
+
+
+
+% Use an id on the next graphic object
+%
+% #1 = a name
+%
+% The next scope or path can be the target of an animation command or
+% a hyperlink.
+
+\def\pgfuseid#1{%
+ \edef\pgf@temp{#1}%
+ \ifx\pgf@temp\pgfutil@empty%
+ \else%
+ \pgf@lookup@id{#1}%
+ \pgfsys@use@id{\pgf@next@id}%
+ \expandafter\xdef\csname pgf@id@names@#1\endcsname{{\pgf@next@id}{}}%
+ \fi%
+}
+
+\def\pgf@lookup@id#1{%
+ \expandafter\let\expandafter\pgf@id@name\csname pgf@id@names@#1\endcsname%
+ \ifx\pgf@id@name\relax%
+ \let\pgf@prev@id\pgfutil@empty%
+ \let\pgf@next@id\pgfutil@empty%
+ \else%
+ \expandafter\pgf@id@parse\pgf@id@name%
+ \fi%
+ \ifx\pgf@next@id\pgfutil@empty%
+ \pgfsys@new@id\pgf@next@id%
+ \expandafter\xdef\csname pgf@id@names@#1\endcsname{{\pgf@prev@id}{\pgf@next@id}}%
+ \fi%
+}
+\def\pgf@id@parse#1#2{%
+ \def\pgf@prev@id{#1}%
+ \def\pgf@next@id{#2}%
+}
+
+
+
+% Clear the current id
+%
+% Description:
+%
+% Sets the current id to be empty so that it cannot be referenced.
+
+\def\pgfclearid{%
+ \pgfsys@clear@id%
+}
+
+
+% Get the id that will be given to a name upon the next use
+%
+% #1 = a macro
+% #2 = a name
+%
+% Description:
+%
+% #1 will get the id that will be used by \pgfuseid next time for the
+% given name.
+
+\def\pgfidrefnextuse#1#2{%
+ \edef\pgf@temp{#2}\ifx\pgf@temp\pgfutil@empty\pgferror{Missing name reference for ``\string#1''}\fi%
+ \pgf@lookup@id{#2}%
+ \let#1\pgf@next@id%
+}
+
+
+% Get the id was last used
+%
+% #1 = a macro
+% #2 = a name
+%
+% Description:
+%
+% #1 will get the id that was last used by \pgfuseid for #2.
+
+\def\pgfidrefprevuse#1#2{%
+ \edef\pgf@temp{#2}\ifx\pgf@temp\pgfutil@empty\pgferror{Missing name reference for ``\string#1''}\fi%
+ \pgf@lookup@id{#2}%
+ \let#1\pgf@prev@id%
+}
+
+
+% Use a type
+%
+% #1 = an id type; when starting with a dot, it is added to the
+% current type.
+%
+% The next scope or path can be the target of an animation command or
+% a hyperlink.
+
+\def\pgfusetype#1{%
+ \edef\pgf@temp{#1}%
+ \expandafter\pgfutil@ifnextchar\expandafter.\expandafter\pgf@id@use@type@add\expandafter\pgf@id@use@type@replace\pgf@temp\pgf@stop
+}
+\def\pgf@id@use@type@add.#1\pgf@stop{\pgfsys@append@type{#1}}
+\def\pgf@id@use@type@replace#1\pgf@stop{\pgfsys@use@type{#1}}
+
+% Push the current type on a global stack
+%
+% Description:
+%
+% The current type is pushed onto a global type stack. It can be
+% restored using \pgfpoptype.
+
+\def\pgfpushtype{\pgfsys@push@type}
+
+
+% Pop a type from the type stack
+%
+% Description:
+%
+% Restores the most current value from the type stack.
+
+\def\pgfpoptype{\pgfsys@pop@type}
+
+
+
+
+% Alias an id locally or globally
+%
+% #1 = the alias name
+% #2 = a existing id name
+%
+% Description:
+%
+% Creates an alias of a name
+
+\def\pgfaliasid#1#2{%
+ \expandafter\let\expandafter\pgf@temp\csname pgf@id@names@#2\endcsname%
+ \expandafter\let\csname pgf@id@names@#1\endcsname\pgf@temp%
+}
+\def\pgfgaliasid#1#2{%
+ \expandafter\let\expandafter\pgf@temp\csname pgf@id@names@#2\endcsname%
+ \expandafter\global\expandafter\let\csname pgf@id@names@#1\endcsname\pgf@temp%
+}
+
+
+% Check whether a name has been forward-referenced
+%
+% #1 = a name
+% #2 = what to do, when has been forward-referenced
+% #3 = what to do otherwise
+%
+% Description:
+%
+% Depending on whether #1 has been forward-referenced, #2 or #3 will be executed.
+
+\def\pgfifidreferenced#1#2#3{%
+ \expandafter\let\expandafter\pgf@id@name\csname pgf@id@names@#1\endcsname%
+ \ifx\pgf@id@name\relax%
+ #3%
+ \else
+ \expandafter\pgf@id@parse\pgf@id@name%
+ \ifx\pgf@next@id\pgfutil@empty%
+ #3%
+ \else%
+ #2%
+ \fi%
+ \fi%
+}
+
% Interrupts a picture
%
@@ -528,7 +710,7 @@
% normal TeX mode. All sorts of things are saved and restored by this
% environment.
%
-% WARNING: Using this environment in conjuction with low level
+% WARNING: Using this environment in conjunction with low level
% transformations can *strongly* upset the typesetting. Typically, the
% contents of this environment should have size/height/depth 0pt in
% the end.
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
index 86bd57c32fe..971752304a7 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreshade.code.tex,v 1.15 2013/07/15 14:24:02 tantau Exp $
+\ProvidesFileRCS{pgfcoreshade.code.tex}
%
% Parsing functions
@@ -170,11 +170,11 @@
% "rgb(1cm)=(1,0,0)". Multiple specifications are separated by a
% semicolon and a space. At least two specifications must be
% given. The specified positions must be given in increasing
-% order.
+% order.
%
% Description:
%
-% The optional dependecies have the following effect: If present, it
+% The optional dependencies have the following effect: If present, it
% should consist of a list of colors, separated by commas. Each time
% the shading is used, these colors will be reevaluated. It will be
% checked whether the colors still have their "original meaning". If
@@ -204,12 +204,12 @@
\fi}
-% Declares a vertical shading for later use.
+% Declares a vertical shading for later use.
%
-% #1 = optinal dependecies
+% #1 = optional dependencies
% #2 = name of the shading for later use
% #3 = height of the shading
-% #4 = color specification
+% #4 = color specification
%
% Example:
%
@@ -234,12 +234,12 @@
\fi}
-% Declares a radial shading for later use.
+% Declares a radial shading for later use.
%
% #1 = optional dependencies
% #2 = name of the shading for later use
% #3 = center of inner circle
-% #4 = color specification
+% #4 = color specification
%
% Description:
%
@@ -248,7 +248,7 @@
% radius is the start of the color specification. The
% center of the outer circle is at the center of the whole shading,
% whose radius is the end of the color specification. For example,
-% suppose the color specification is "rgb(1cm)=(1,1,1); rgb(2cm)=(0,0,0)".
+% suppose the color specification is "rgb(1cm)=(1,1,1); rgb(2cm)=(0,0,0)".
% Then the shading would be 4cm times 4cm large. The inner circle would
% have diameter 1cm and the outer circle would have diameter 2cm. The
% outer circle would be centered in the middle of the shading, whereas
@@ -279,14 +279,14 @@
-% Declares a functional shading for later use.
+% Declares a functional shading for later use.
%
-% #1 = optional dependecies
+% #1 = optional dependencies
% #2 = name of the shading for later use
% #3 = lower left corner of the shading as a pgfpoint.
% #4 = upper right corner of the shading as a pgfpoint.
% #5 = Preparation code
-% #6 = a PDF type 4 function (restricted Postscript function), see the
+% #6 = a PDF type 4 function (restricted Postscript function), see the
% PDF-specification 1.7, section 3.9.4
%
% Description:
@@ -297,7 +297,7 @@
% color as an output. Note that the function is evaluated by the
% *renderer*, not by PGF or TeX or someone else at compile-time. This
% means that the evaluation of this function has to be done *extremely
-% quickly* and the funciton should be *very simple*. For this reason,
+% quickly* and the function should be *very simple*. For this reason,
% only a very restricted set of operations are possible in the
% function (see 3.9.4 of the PDF-spec 1.7). Also functions should be
% kept small. Any errors in the function will only be noticed by the
@@ -318,9 +318,9 @@
%
% Because of the rather difficult PostScript syntax, use this macro
% only *if you know what you are doing* (or if you are advanterous, of
-% course).
+% course).
%
-% As for other shadings, the optional depencies argument is used to
+% As for other shadings, the optional dependencies argument is used to
% determine whether a shading needs to be recalculated when a color
% has changed.
%
@@ -331,10 +331,10 @@
% Inside the PostScript function #6 you cannot use colors
% directly. Rather, you must push the color components on the
% stack. For this, it is useful to call \pgfshadergb in the startup
-% code #4. The macro takes a color name as input and stores the color's
+% code #4. The macro takes a color name as input and stores the color's
% red/green/blue components real numbers between 0.0 and 1.0 separated
% by spaces (which is exactly what you need if you want to push it on
-% a stack) in a macro.
+% a stack) in a macro.
%
% Example:
%
@@ -412,7 +412,7 @@
% Inserts a box into the text that contains a previously defined
-% shading.
+% shading.
%
% #1 = Name of a shading
%
@@ -467,7 +467,7 @@
\ifpgfpicture%
\pgfsys@shadinginsidepgfpicture{#1}%
\else%
- \pgfsys@shadingoutsidepgfpicture{#1}%
+ \pgfsys@shadingoutsidepgfpicture{#1}%
\fi%
}
@@ -533,7 +533,7 @@
\ifdim\pgf@pathminx=16000pt%
\pgfwarning{No path specified that can be filled}%
\else%
- \begingroup%
+ \begingroup%
% Calculate center:
\pgf@xb=.5\pgf@pathmaxx%
\advance\pgf@xb by.5\pgf@pathminx%
@@ -573,7 +573,7 @@
\fi%
\pgfuseshading{#1}%
\pgfsys@endscope%
- \fi%
+ \fi%
\endgroup%
\fi%
}
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
index 5e13c6cb660..961c657e8cd 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoretransformations.code.tex,v 1.20 2015/08/07 10:17:34 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfcoretransformations.code.tex}
% Position transformations
@@ -34,7 +34,7 @@
% \pgfgettransform\mytransform
\def\pgfgettransform#1{%
- \edef#1{{\pgf@pt@aa}{\pgf@pt@ab}{\pgf@pt@ba}{\pgf@pt@bb}{\the\pgf@pt@x}{\the\pgf@pt@y}}
+ \edef#1{{\pgf@pt@aa}{\pgf@pt@ab}{\pgf@pt@ba}{\pgf@pt@bb}{\the\pgf@pt@x}{\the\pgf@pt@y}}%
}
% Store the current transformation matrix in a set of macros, one for
@@ -50,7 +50,7 @@
% \pgfgettransform\aa\ab\ba\bb\shiftx\shifty
%
% ->
-%
+%
% \pgftransformcm\aa\ab\ba\bb{\pgfqpoint{\shiftx}{\shifty}}
%
% or
@@ -127,6 +127,18 @@
\advance#1 by\pgf@pt@x%
\advance#2 by\pgf@pt@y%
}
+\def\pgf@pos@transform@glob{%
+ \ifpgf@pt@identity%
+ \else%
+ \pgf@pt@temp=\pgf@x%
+ \global\pgf@x=\pgf@pt@aa\pgf@x%
+ \global\advance\pgf@x by\pgf@pt@ba\pgf@y%
+ \global\pgf@y=\pgf@pt@bb\pgf@y%
+ \global\advance\pgf@y by\pgf@pt@ab\pgf@pt@temp%
+ \fi%
+ \global\advance\pgf@x by\pgf@pt@x%
+ \global\advance\pgf@y by\pgf@pt@y%
+}
% Invert the current transformation matrix
@@ -135,7 +147,7 @@
%
% This command replaces the current transformation matrix by its
% inverse. The inversion is not very exact if the matrix is nearly
-% singular.
+% singular.
%
% Example:
%
@@ -196,7 +208,7 @@
% PGF-Level concatenation of the transformation matrix with a given
-% matrix.
+% matrix.
%
% #1 - #5 = a concatenation matrix (see pdf spec). Entry #5 is a
% translation point.
@@ -213,7 +225,7 @@
%
% \pgftransformcm{1}{0}{0}{1}{\pgfpoint{100pt}{0pt}} % 100pt to the right.
%
-% \pgftransformcm{2}{0}{0}{2}{\pgfpointorigin} % double in in size
+% \pgftransformcm{2}{0}{0}{2}{\pgfpointorigin} % double in size
% \pgfpathmoveto{\pgfpoint{0cm}{0cm}}
% \pgfpathlineto{\pgflineto{1cm}{1cm}} % actually 2cm/2cm
@@ -280,7 +292,7 @@
% triangle are called "origin", "x" and "y" are given. After this
% transformation has been applied, the canvas origin is at "origin",
% the vector (1pt,0pt) lies at "x" and the vector (0pt,1pt) lies at
-% "y".
+% "y".
%
% #1 = origin
% #2 = x
@@ -419,14 +431,14 @@
%
% \ifpgfallowupsidedowattime decides whether the transformation should
% be done in such a way that the text is always ``upright,'' that is,
-% text drawn in this coordiante system is never upside-down.
+% text drawn in this coordinate system is never upside-down.
%
% \ifpgfresetnontranslationattime decides whether the coordinate
% system of an xxxattime transformation command should be reset
% (concerning the non-translations) before a possible rotation is
% applied. This is useful, for example, if the main coordinate system
% is scaled by, say, a factor of 2 and you do not want that to apply
-% to the text, but you do want the rotation to applyu.
+% to the text, but you do want the rotation to apply.
\newif\ifpgfslopedattime
\newif\ifpgfallowupsidedownattime
@@ -469,7 +481,7 @@
\advance\pgf@yc by-\pgf@yb%
\ifpgfallowupsidedownattime%
\else%
- \ifdim\pgf@xc<0pt%
+ \ifdim\pgf@xc<0pt%
\pgf@xc=-\pgf@xc%
\pgf@yc=-\pgf@yc%
\fi%
@@ -503,7 +515,7 @@
% }
\def\pgftransformarcaxesattime#1#2#3#4#5#6{%
- \pgfpointarcaxesattime{#1}{#2}{#3}{#4}{#5}{#6}%
+ \pgfpointarcaxesattime{#1}{#2}{#3}{#4}{#5}{#6}%
\pgftransformshift{\pgfqpoint{\pgf@x}{\pgf@y}}%
\ifpgfresetnontranslationattime%
\pgftransformresetnontranslations%
@@ -612,10 +624,10 @@
% Computes transformations adjustments for the current transformation
-% matrix
+% matrix
%
% Description:
-%
+%
% This command is used when you install a transformation matrix that
% scales everything by a certain factor, but you still wish to draw
% something with "an absolute size". Suppose for instance that you
@@ -624,18 +636,18 @@
% if you do not reset the transformation matrix, you can draw a line
% of logical length 2.5mm, which will then get scaled to a line of
% 1cm.
-%
+%
% Things get more difficult in case you scale things only, say,
-% vertically. In this case, the adjustement necessary for horizontal
+% vertically. In this case, the adjustment necessary for horizontal
% lines is different from the one needed for vertical lines.
-%
+%
% This function computes the necessary scaling factors and puts them
% in the macros \pgfhorizontaltransformationadjustment and
% \pgfverticaltransformationadjustment.
-%
+%
% Note that the "right" way to draw a line of absolute length 1cm in a
% transformed coordinate system is to first compute the start point
-% and to then reset the transformation matrix. The transofmration
+% and to then reset the transformation matrix. The transformation
% adjustments computed here are important only in situations where you
% cannot do this, for instance when an "outer xsep" must be set.
@@ -660,7 +672,7 @@
\let\pgfhorizontaltransformationadjustment\pgf@temp@hori%
\let\pgfverticaltransformationadjustment\pgf@temp@vert%
\fi%
-}
+}
\let\pgfhorizontaltransformationadjustment\pgf@one@text
\let\pgfverticaltransformationadjustment\pgf@one@text
@@ -685,12 +697,12 @@
{\pgf@pt@x}{\pgf@pt@y}%
\pgftransformreset%
\pgf@relevantforpicturesizefalse%
-}
+}
% Causes a transformation command to be applied to the ``lowlevel''
-% transformation matrix.
+% transformation matrix.
%
% #1 - a high-level transformation command
%
@@ -706,7 +718,7 @@
%
% \pgflowlevel{\pgftransformcm{1}{0}{0}{1}{\pgfpoint{100pt}{0pt}}} % 100bp to the right.
%
-% \begin{pgflowlevelscope}{\pgftransformcm{2}{0}{0}{2}{\pgfpointorigin}} % double in in size
+% \begin{pgflowlevelscope}{\pgftransformcm{2}{0}{0}{2}{\pgfpointorigin}} % double in size
% \pgfmoveto{\pgfpoint{0cm}{0cm}}
% \pgflineto{\pgflineto{1cm}{1cm}} % actually 2cm/2cm
% \end{pgflowlevelscope}
@@ -727,6 +739,74 @@
+% View boxes
+
+% Establishes a view box scope
+%
+% #1 and #2 = two opposite corners of the source rectangle
+% #3 and #4 = two opposite corners of the target rectangle
+% #5 = "meet" or "slice"
+%
+% Description:
+%
+% Inside the viewbox scope, the source rectangle will be translated
+% and scaled so that it becomes centered on the target rectangle and
+% will, for "meet", be as large as possible so that it fits inside the
+% target and, for "slice", be as small as possible so that it
+% encompasses the target.
+
+\def\pgfviewboxscope#1#2#3#4#5{%
+ {% Compute rectangle corners
+ \pgf@process{#1}%
+ \pgf@pos@transform@glob
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{#2}%
+ \pgf@pos@transform@glob
+ \ifdim\pgf@x<\pgf@xa%
+ \pgf@xb\pgf@x%
+ \pgf@xc\pgf@xa%
+ \else%
+ \pgf@xb\pgf@xa%
+ \pgf@xc\pgf@x%
+ \fi%
+ \ifdim\pgf@y<\pgf@ya%
+ \pgf@yb\pgf@y%
+ \pgf@yc\pgf@ya%
+ \else%
+ \pgf@yb\pgf@ya%
+ \pgf@yc\pgf@y%
+ \fi%
+ \pgf@process{#3}%
+ \pgf@pos@transform@glob
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{#4}%
+ \pgf@pos@transform@glob
+ \ifdim\pgf@x<\pgf@xa%
+ \else%
+ \pgfutil@tempdima\pgf@x
+ \pgf@x\pgf@xa%
+ \pgf@xa\pgfutil@tempdima%
+ \fi%
+ \ifdim\pgf@y<\pgf@ya%
+ \else%
+ \pgfutil@tempdima\pgf@y
+ \pgf@y\pgf@ya%
+ \pgf@ya\pgfutil@tempdima%
+ \fi%
+ \pgfusetype{.view}%
+ \edef\pgf@marshal{\expandafter\noexpand\csname pgfsys@viewbox#5\endcsname{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}{\the\pgf@xb}{\the\pgf@yb}{\the\pgf@xc}{\the\pgf@yc}}%
+ \pgf@marshal%
+ }%
+ \pgf@relevantforpicturesizefalse%
+}
+
+\def\endpgfviewboxscope{\pgfsys@endviewbox}
+
+\let\startpgfviewboxscope=\pgfviewboxscope
+\let\stoppgfviewboxscope=\endpgfviewboxscope
+
% Forward declarations for nonlinear stuff (have no effect till module
% nonlineartransformations is loaded)
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
index 47484997af7..181450ac27a 100644
--- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
@@ -7,13 +7,13 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoretransparency.code.tex,v 1.5 2013/09/30 18:30:15 tantau Exp $
+\ProvidesFileRCS{pgfcoretransparency.code.tex}
% Sets the opacity of stroking operations.
-%
+%
% #1 = opacity, where 1 means fully opaque and 0 means fully
-% transparent.
+% transparent.
%
% Example:
%
@@ -25,9 +25,9 @@
% Sets the opacity of stroking operations.
-%
+%
% #1 = opacity, where 1 means fully opaque and 0 means fully
-% transparent.
+% transparent.
%
% Example:
%
@@ -40,8 +40,8 @@
% Sets the current blend mode. See Section 7.2.4 of the PDF
-% Specification 1.7 for an introduction to blend modes in general.
-%
+% Specification 1.7 for an introduction to blend modes in general.
+%
% #1 = One of the following modes, see also section 7.2.4 of the
% PDF Specification 1.7. (The PGF names, which are all lowercase with
% spaces as usual, must be mapped to the PDF or SVG by the drivers.)
@@ -81,7 +81,7 @@
% the TeX box. The mask can later be used to mask other graphics.
%
% The box is used to determine where the mask is opaque: At the
-% beginning, the mask is completely transparent. Whereever the box
+% beginning, the mask is completely transparent. Wherever the box
% contains something (like text or a picture or whatever), the
% luminosity of the text/graphic is used to determine how opaque the
% point will be. The greater the luminosity, the more opaque. The net
@@ -121,7 +121,7 @@
% Description:
%
% The command should be used *inside* a pgfpicture to install a
-% fading. The fading is a part of the graphic state. (This command
+% fading. The fading is a part of the graphic state. (This command
% works much like \pgfsetstrokeopacity).
%
% The mask will be centered on the origin. The transformation code #2 is
@@ -153,7 +153,7 @@
% the additional transformation #2 is applied. Finally, the mask is
% made part of the graphic state (as with \pgfsetfading). The path
% used for computation purposes only -- it is not drawn or otherwise
-% used.
+% used.
%
% If no transformations occur, the lower left corner of the path will
% lie on (25bp, 25bp), the upper right corner on (75bp, 75bp).
@@ -253,13 +253,13 @@
%
% This takes groups pgf commands inside a pgfpicture in a transparency
% group. This means that any transparency settings apply to commands a
-% whole. For instance, if a box contains two overlapping black
+% whole. For instance, if a box contains two overlapping black
% circles and you draw them normally with 50% transparency, then the
% overlap will be darker than the rest. By comparison, if the circles
% are part of a transparency group, the overlap will get the same
% color as the rest.
%
-%
+%
\def\pgftransparencygroup{%
\pgfutil@ifnextchar[{\pgftransparencygroup@}{\pgftransparencygroup@[]}%
@@ -277,7 +277,7 @@
isolated/.is if=pgfsys@transparency@group@isolated,
knockout/.is if=pgfsys@transparency@group@knockout
}
-
+
\def\endpgftransparencygroup{%
\egroup%
% Now compute the correct position. This is a bit tricky...
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.code.tex
index e8aeabd2468..56a5340f99e 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{decorations.markings,calc}
+\usetikzlibrary{calc,decorations.markings}%
%
@@ -23,7 +23,7 @@
\def\tikz@lib@circ@end{-- (\tikztotarget) \tikztonodes}
}
}
-}
+}%
\newif\iftikz@lib@circ@on@to
@@ -75,10 +75,10 @@
\pgfkeysalso{#1}
\fi
}
-}
+}%
\newcount\tikz@lib@circ@count
-\def\tikz@zero@text{0.0}
-\def\tikz@one@text{1.0}
+\def\tikz@zero@text{0.0}%
+\def\tikz@one@text{1.0}%
\def\tikz@lib@circ@compute@direction#1{%
\tikz@scan@one@point\tikz@lib@circ@save@start(\tikztostart)%
@@ -86,9 +86,9 @@
\pgf@process{\pgfpointnormalised{\pgfpointdiff{\tikz@lib@circ@start}{\tikz@lib@circ@target}}}%
\pgf@ya=-\pgf@y%
\pgftransformcm{\the\pgf@x}{\the\pgf@y}{\the\pgf@ya}{\the\pgf@x}{#1}%
-}
-\def\tikz@lib@circ@save@start#1{\def\tikz@lib@circ@start{#1}}
-\def\tikz@lib@circ@save@target#1{\def\tikz@lib@circ@target{#1}}
+}%
+\def\tikz@lib@circ@save@start#1{\def\tikz@lib@circ@start{#1}}%
+\def\tikz@lib@circ@save@target#1{\def\tikz@lib@circ@target{#1}}%
\tikzset{
circuits/pos grabber/.is family,
@@ -100,7 +100,7 @@
near end/.belongs to family=/tikz/circuits/pos grabber,
very near end/.belongs to family=/tikz/circuits/pos grabber,
at end/.belongs to family=/tikz/circuits/pos grabber
-}
+}%
%
@@ -126,7 +126,7 @@
% node look like the symbol. For instance, for a resistor that is
% rendered as a rectangle, this keys can be set, basically, to
% "rectangle,draw". Set this key to use a different appearance for
- % symbols of kind #1.
+ % symbols of kind #1.
%
% every #1
% This style will be included with every symbols of this kind and
@@ -154,7 +154,7 @@
medium circuit symbols/.style={circuit symbol unit=7pt},
small circuit symbols/.style={circuit symbol unit=6pt},
tiny circuit symbols/.style={circuit symbol unit=5pt},
-}
+}%
\newdimen\tikzcircuitssizeunit
\tikzcircuitssizeunit=7pt
@@ -199,7 +199,7 @@
/utils/exec={\pgfsetarrowoptions{direction ee}{.4*\the\tikzcircuitssizeunit+.3*\the\pgflinewidth}},
>=direction ee
}
-}
+}%
@@ -211,7 +211,7 @@
point down/.style={rotate=-90},
point left/.style={rotate=180},
point right/.style={}
-}
+}%
@@ -225,7 +225,7 @@
circuit symbol filled/.style={draw,fill=black},
circuit symbol lines/.style={draw},
circuit symbol wires/.style={draw},
-}
+}%
@@ -242,28 +242,25 @@
info' sloped/.code={\pgfutil@ifnextchar[\tikz@lib@circ@lab@slopedp@plain{\tikz@lib@circ@lab@slopedp@plain[]}#1\pgf@stop},%}
circuit declare unit/.style 2 args={
%
- % Defines four styles that can be used to add labels to a node.
+ % Defines four styles that can be used to add labels to a node.
%
#1/.code={\pgfutil@ifnextchar[\tikz@lib@circ@lab{\tikz@lib@circ@lab[]}##1\pgf@stop{#2}{#1}},%}
#1 sloped/.code={\pgfutil@ifnextchar[\tikz@lib@circ@lab@sloped{\tikz@lib@circ@lab@sloped[]}##1\pgf@stop{#2}{#1}},%}
- #1'/.code={\pgfutil@ifnextchar[\tikz@lib@circ@labp{\tikz@lib@circ@labp[]}##1\pgf@stop{#2}{#1}},%}
+ #1'/.code={\pgfutil@ifnextchar[\tikz@lib@circ@labp{\tikz@lib@circ@labp[]}##1\pgf@stop{#2}{#1}},%}
#1' sloped/.code={\pgfutil@ifnextchar[\tikz@lib@circ@lab@slopedp{\tikz@lib@circ@lab@slopedp[]}##1\pgf@stop{#2}{#1}}%}
}
-}
+}%
-\def\tikz@lib@circ@lab[#1]#2\pgf@stop#3#4{\tikzset{label={[every info/.try,every #4/.try,#1]$\mathrm{#2#3}$}}}
-\def\tikz@lib@circ@lab@sloped[#1]#2\pgf@stop#3#4{\tikzset{label={[every info/.try,every #4/.try,transform shape,#1]$\mathrm{#2#3}$}}}
-\def\tikz@lib@circ@labp[#1]#2\pgf@stop#3#4{\tikzset{label={[label position=below,every info/.try,every #4/.try,#1]$\mathrm{#2#3}$}}}
-\def\tikz@lib@circ@lab@slopedp[#1]#2\pgf@stop#3#4{\tikzset{label={[label
-position=below,every info/.try,every #4/.try,transform shape,#1]$\mathrm{#2#3}$}}}
+\def\tikz@lib@circ@lab[#1]#2\pgf@stop#3#4{\tikzset{label={[every info/.try,every #4/.try,#1]$\mathrm{#2#3}$}}}%
+\def\tikz@lib@circ@lab@sloped[#1]#2\pgf@stop#3#4{\tikzset{label={[every info/.try,every #4/.try,transform shape,#1]$\mathrm{#2#3}$}}}%
+\def\tikz@lib@circ@labp[#1]#2\pgf@stop#3#4{\tikzset{label={[label position=below,every info/.try,every #4/.try,#1]$\mathrm{#2#3}$}}}%
+\def\tikz@lib@circ@lab@slopedp[#1]#2\pgf@stop#3#4{\tikzset{label={[label position=below,every info/.try,every #4/.try,transform shape,#1]$\mathrm{#2#3}$}}}%
-\def\tikz@lib@circ@lab@plain[#1]#2\pgf@stop{\tikzset{label={[every info/.try,#1]#2}}}
-\def\tikz@lib@circ@lab@sloped@plain[#1]#2\pgf@stop{\tikzset{label={[every info/.try,transform shape,#1]#2}}}
-\def\tikz@lib@circ@labp@plain[#1]#2\pgf@stop{\tikzset{label={[label position=below,every info/.try,#1]#2}}}
-\def\tikz@lib@circ@lab@slopedp@plain[#1]#2\pgf@stop{\tikzset{label={[label
-position=below,every info/.try,transform shape,#1]#2}}}
+\def\tikz@lib@circ@lab@plain[#1]#2\pgf@stop{\tikzset{label={[every info/.try,#1]#2}}}%
+\def\tikz@lib@circ@lab@sloped@plain[#1]#2\pgf@stop{\tikzset{label={[every info/.try,transform shape,#1]#2}}}%
+\def\tikz@lib@circ@labp@plain[#1]#2\pgf@stop{\tikzset{label={[label position=below,every info/.try,#1]#2}}}%
+\def\tikz@lib@circ@lab@slopedp@plain[#1]#2\pgf@stop{\tikzset{label={[label position=below,every info/.try,transform shape,#1]#2}}}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.ee.IEC.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.ee.IEC.code.tex
index 1de9232e63c..75457107643 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.ee.IEC.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.ee.IEC.code.tex
@@ -7,10 +7,10 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{circuits.ee}
-\usetikzlibrary{arrows}
+\usetikzlibrary{arrows}%
+\usetikzlibrary{circuits.ee}%
-\usepgflibrary{shapes.gates.ee.IEC}
+\usepgflibrary{shapes.gates.ee.IEC}%
%
@@ -38,8 +38,8 @@
set current source graphic = current source IEC graphic,
set make contact graphic = make contact IEC graphic,
set break contact graphic = break contact IEC graphic,
- }
-}
+ },
+}%
%
@@ -51,7 +51,7 @@
circuit symbol open,
circuit symbol size=width 4 height 1,
shape=rectangle ee,
- transform shape
+ transform shape,
},
var resistor IEC graphic/.style={
circuit symbol lines,
@@ -59,9 +59,9 @@
shape=var resistor IEC,
transform shape,
outer sep=0pt,
- cap=round
- }
-}
+ cap=round,
+ },
+}%
@@ -76,15 +76,15 @@
transform shape,
shape=inductor IEC,
outer sep=0pt,
- cap=round
+ cap=round,
},
var inductor IEC graphic/.style={
circuit symbol filled,
circuit symbol size=width 4 height 1,
transform shape,
- shape=rectangle ee
- }
-}
+ shape=rectangle ee,
+ },
+}%
@@ -97,9 +97,9 @@
circuit symbol lines,
circuit symbol size=width .5 height 2,
transform shape,
- shape=capacitor IEC
- }
-}
+ shape=capacitor IEC,
+ },
+}%
@@ -112,9 +112,9 @@
circuit symbol lines,
circuit symbol size=width .75 height 2,
transform shape,
- shape=ground IEC
- }
-}
+ shape=ground IEC,
+ },
+}%
@@ -129,9 +129,9 @@
circuit symbol size=width .5 height 2.5,
transform shape,
shape=battery IEC,
- transform shape
- }
-}
+ transform shape,
+ },
+}%
@@ -156,9 +156,9 @@
},
var diode IEC graphic/.style={
diode IEC graphic,
- circuit symbol filled
- }
-}
+ circuit symbol filled,
+ },
+}%
\tikzset{
%
@@ -175,9 +175,9 @@
},
var Zener diode IEC graphic/.style={
Zener diode IEC graphic,
- circuit symbol filled
- }
-}
+ circuit symbol filled,
+ },
+}%
\tikzset{
%
@@ -197,9 +197,9 @@
},
var Schottky diode IEC graphic/.style={
Schottky diode IEC graphic,
- circuit symbol filled
- }
-}
+ circuit symbol filled,
+ },
+}%
\tikzset{
%
@@ -217,12 +217,12 @@
},
var tunnel diode IEC graphic/.style={
tunnel diode IEC graphic,
- circuit symbol filled
- }
-}
+ circuit symbol filled,
+ },
+}%
\tikzset{
- %
+ %
% backward diode
%
backward diode IEC graphic/.style={
@@ -239,9 +239,9 @@
},
var backward diode IEC graphic/.style={
backward diode IEC graphic,
- circuit symbol filled
- }
-}
+ circuit symbol filled,
+ },
+}%
\tikzset{
@@ -256,9 +256,9 @@
},
var breakdown diode IEC graphic/.style={
breakdown diode IEC graphic,
- circuit symbol filled
- }
-}
+ circuit symbol filled,
+ },
+}%
@@ -271,15 +271,15 @@
circuit symbol filled,
circuit symbol size=width .5 height .5,
shape=circle ee,
- outer sep=.25\pgflinewidth
+ outer sep=.25\pgflinewidth,
},
% connection IEC graphic/.style={
% circuit symbol open,
% circuit symbol size=width 1 height 1,
% shape=circle ee,
-% outer sep=.25\pgflinewidth
-% }
-}
+% outer sep=.25\pgflinewidth,
+% },
+}%
%
@@ -298,9 +298,9 @@
\pgfpathlineto{\pgfpointpolar{135}{1pt}}
\pgfusepathqstroke
},
- transform shape
- }
-}
+ transform shape,
+ },
+}%
%
@@ -317,7 +317,7 @@
\pgfpathlineto{\pgfqpoint{0pt}{1pt}}
\pgfusepathqstroke
},
- transform shape
+ transform shape,
},
voltage source IEC graphic/.style={
circuit symbol lines,
@@ -328,9 +328,9 @@
\pgfpathlineto{\pgfqpoint{1pt}{0pt}}
\pgfusepathqstroke
},
- transform shape
- }
-}
+ transform shape,
+ },
+}%
@@ -345,7 +345,7 @@
transform shape,
shape=make contact IEC,
outer sep=0pt,
- cap=round
+ cap=round,
},
var make contact IEC graphic/.style={
circuit symbol wires,
@@ -353,9 +353,9 @@
transform shape,
shape=var make contact IEC,
outer sep=0pt,
- cap=round
- }
-}
+ cap=round,
+ },
+}%
\tikzset{
@@ -365,12 +365,11 @@
transform shape,
shape=break contact IEC,
outer sep=0pt,
- cap=round
+ cap=round,
},
-}
+}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.ee.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.ee.code.tex
index d8337acefcd..9a7108aebfb 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.ee.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.ee.code.tex
@@ -8,8 +8,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{circuits}
-\usepgflibrary{shapes.gates.ee}
+\usetikzlibrary{circuits}%
+\usepgflibrary{shapes.gates.ee}%
%
@@ -20,7 +20,7 @@
circuit,
every circuit ee/.try
}
-}
+}%
%
@@ -50,7 +50,7 @@
%
set current direction graphic = current direction ee graphic,
set current direction' graphic = current direction' ee graphic,
-}
+}%
%
@@ -68,7 +68,7 @@
circuit declare unit={voltampere}{VA},
circuit declare unit={watt}{W},
circuit declare unit={hertz}{Hz},
-}
+}%
@@ -85,7 +85,7 @@
>=direction ee,
direction ee arrow = direction ee,
}
-}
+}%
@@ -103,7 +103,7 @@
current direction ee graphic,
rotate=180
}
-}
+}%
@@ -137,8 +137,7 @@
[shift=(\tikzlastnode.center)]
(-1.5\tikzcircuitssizeunit,1.5\tikzcircuitssizeunit) edge[line to] (1.5\tikzcircuitssizeunit,-1.5\tikzcircuitssizeunit)
}
-}
+}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.CDH.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.CDH.code.tex
index 4fe276ff0a0..c0168992532 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.CDH.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.CDH.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{circuits.logic.US}
+\usetikzlibrary{circuits.logic.US}%
\tikzset{
circuit logic CDH/.style =
@@ -16,14 +16,13 @@
set and gate graphic = and gate CDH graphic,
set nand gate graphic = nand gate CDH graphic,
}
-}
+}%
\tikzset{
circuit logic US make graphic=and gate CDH,
circuit logic US make graphic=nand gate CDH,
-}
+}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.IEC.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.IEC.code.tex
index 64d1f764b71..54a1068eb4c 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.IEC.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.IEC.code.tex
@@ -7,8 +7,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{circuits.logic}
-\usepgflibrary{shapes.gates.logic.IEC}
+\usetikzlibrary{circuits.logic}%
+\usepgflibrary{shapes.gates.logic.IEC}%
%
@@ -37,7 +37,7 @@
not gate IEC symbol = {$\scriptstyle1$},
buffer gate IEC symbol = {$\scriptstyle1$},
},
-}
+}%
%
@@ -54,7 +54,7 @@
inner sep=.5ex
}
}
-}
+}%
\tikzset{
@@ -68,9 +68,8 @@
circuit logic IEC make graphic=buffer gate IEC,
circuit logic IEC make graphic=and gate CDH,
circuit logic IEC make graphic=nand gate CDH,
-}
+}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.US.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.US.code.tex
index 1f724912549..76d48c863ab 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.US.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.US.code.tex
@@ -7,8 +7,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{circuits.logic}
-\usepgflibrary{shapes.gates.logic.US}
+\usetikzlibrary{circuits.logic}%
+\usepgflibrary{shapes.gates.logic.US}%
%
@@ -28,7 +28,7 @@
set not gate graphic = not gate US graphic,
set buffer gate graphic = buffer gate US graphic
}
-}
+}%
%
@@ -45,7 +45,7 @@
transform shape
}
}
-}
+}%
\tikzset{
@@ -57,9 +57,8 @@
circuit logic US make graphic=xnor gate US,
circuit logic US make graphic=not gate US,
circuit logic US make graphic=buffer gate US,
-}
+}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.code.tex
index 0fc662f92c5..fb896e6a065 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/circuits/tikzlibrarycircuits.logic.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{circuits}
+\usetikzlibrary{circuits}%
@@ -22,7 +22,7 @@
logic gate inverted radius=.25\tikzcircuitssizeunit,
every circuit logic/.try,
}
-}
+}%
@@ -39,8 +39,7 @@
circuit declare symbol = xnor gate,
circuit declare symbol = not gate,
circuit declare symbol = buffer gate
-}
+}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.3d.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.3d.code.tex
index 8018de58018..a01a5720c54 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.3d.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.3d.code.tex
@@ -7,9 +7,9 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.3d.code.tex,v 1.1 2008/12/17 22:48:46 tantau Exp $
+\ProvidesFileRCS{tikzlibrarydatavisualization.3d.code.tex}
-\usetikzlibrary{datavisualization}
+\usetikzlibrary{datavisualization}%
@@ -38,9 +38,9 @@
% visualize ticks={common={x axis={goto=0},y axis={goto=0},direction axis=y axis}}
},
new line plot,
- every school book plot/.try
- }
-}
+ every school book plot/.try,
+ },
+}%
% A 3d version of the scientific plot
@@ -58,23 +58,22 @@
visualize axis={y axis={goto=min},z axis={goto=min}},
visualize axis={y axis={goto=max},z axis={goto=min}},
visualize axis={y axis={goto=min},z axis={goto=max}},
- visualize axis={y axis={goto=max},z axis={goto=max}}
+ visualize axis={y axis={goto=max},z axis={goto=max}},
},
y axis={
length=\pgfkeysvalueof{/tikz/data visualization/scientific 3d plot/length},
visualize axis={x axis={goto=min},z axis={goto=min}},
visualize axis={x axis={goto=max},z axis={goto=min}},
visualize axis={x axis={goto=min},z axis={goto=max}},
- visualize axis={x axis={goto=max},z axis={goto=max}}
+ visualize axis={x axis={goto=max},z axis={goto=max}},
},
z axis={
length=\pgfkeysvalueof{/tikz/data visualization/scientific 3d plot/length},
visualize axis={x axis={goto=min},y axis={goto=min}},
visualize axis={x axis={goto=max},y axis={goto=min}},
visualize axis={x axis={goto=min},y axis={goto=max}},
- visualize axis={x axis={goto=max},y axis={goto=max}}
+ visualize axis={x axis={goto=max},y axis={goto=max}},
},
- new line plot
- }
-}
-
+ new line plot,
+ },
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.barcharts.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.barcharts.code.tex
index 40fa0e87169..3eefe0f81a7 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.barcharts.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.barcharts.code.tex
@@ -7,10 +7,10 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.barcharts.code.tex,v 1.2 2008/07/21 06:22:22 tantau Exp $
+\ProvidesFileRCS{tikzlibrarydatavisualization.barcharts.code.tex}
-\usetikzlibrary{datavisualization}
-\usepgflibrary{datavisualization.barcharts}
+\usetikzlibrary{datavisualization}%
+\usepgflibrary{datavisualization.barcharts}%
\tikzdatavisualizationset{%
@@ -37,7 +37,7 @@
},
},
index/source/.initial=index,
-}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex
index ba79c22b33f..7f26cc00177 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex
@@ -7,15 +7,15 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.code.tex,v 1.48 2015/05/18 17:01:16 tantau Exp $
+\ProvidesFileRCS{tikzlibrarydatavisualization.code.tex}
-\usepgfmodule{datavisualization}
-\usetikzlibrary{backgrounds}
+\usepgfmodule{datavisualization}%
+\usetikzlibrary{backgrounds}%
\tikzset{/tikz/data visualization/.is family,
/tikz/data visualization/.unknown/.code={
- \let\tikz@dv@key\pgfkeyscurrentname%
+ \let\tikz@dv@key\pgfkeyscurrentname%
\pgfkeys{/tikz/\tikz@dv@key/.try={#1}}%
\ifpgfkeyssuccess%
\else%
@@ -25,17 +25,17 @@
},
/tikz/data visualization/data/.unknown/.code={%
% Redirect to /pgf/data
- \let\tikz@dv@key\pgfkeyscurrentname%
+ \let\tikz@dv@key\pgfkeyscurrentname%
\pgfkeys{/pgf/data/\tikz@dv@key/.try={#1}}%
\ifpgfkeyssuccess%
\else%
\edef\pgf@temp{/errors/unknown key={/pgf/data/\tikz@dv@key}}%
\expandafter\pgfkeys\expandafter{\pgf@temp{#1}}%
\fi%
- }
-}
+ },
+}%
-\def\tikzdatavisualizationset{\pgfqkeys{/tikz/data visualization}}
+\def\tikzdatavisualizationset{\pgfqkeys{/tikz/data visualization}}%
@@ -53,7 +53,7 @@
% "data" blocks.
%
% Syntax: data [options] % options specify an external source
-% Syntax: data [options] { inline data }
+% Syntax: data [options] { inline data }
%
% The optional arguments may either specify an
% external data source or the data may follow inline.
@@ -67,7 +67,7 @@
%
% Syntax: data set [options] {name} = { ... }
% Syntax: data set [options] {name} += { ... }
-% Syntax: data set [options] {name}
+% Syntax: data set [options] {name}
%
% The first syntax allows you to define a data set. The data block
% inside {...} will be stored inside the data set
@@ -83,7 +83,7 @@
%
% A block starting with "info" or "info'" may contain any code. It
% will be executed after the visualization (info) or before the
-% visualization (info').
+% visualization (info').
%
%
% Options blocks.
@@ -176,9 +176,9 @@
\pgfset{/pgf/data/continue code=\tikz@lib@dv@parse@loop}%
% Now enter parse loop
\tikz@lib@dv@parse@loop
-}
+}%
-\def\tikz@lib@dv@parse@loop{%
+\def\tikz@lib@dv@parse@loop{%
\pgfutil@ifnextchar d\tikz@lib@dv@handle@data{%
\pgfutil@ifnextchar ;\tikz@lib@dv@parse@end{%
\pgfutil@ifnextchar \par\tikz@lib@dv@handle@par{%
@@ -195,25 +195,25 @@
}%
}%
}%
-}
+}%
\def\tikz@lib@dv@parse@end;{%
% Go!
\tikz@main@dv.survey()%
\tikz@main@dv.visualize()%
\endgroup%
\tikz@path@do@at@end%
-}
-\def\tikz@lib@dv@handle@par\par{\tikz@lib@dv@parse@loop}
+}%
+\def\tikz@lib@dv@handle@par\par{\tikz@lib@dv@parse@loop}%
\def\tikz@lib@dv@handle@options[#1]{%
\tikzdatavisualizationset{#1}%
\tikz@lib@dv@parse@loop%
-}
+}%
\def\tikz@lib@dv@handle@beginscope scope{%
\begingroup%
\pgfutil@ifnextchar[\tikz@lib@dv@beg@opt{\tikz@lib@dv@beg@opt[]}%}
-}
+}%
\def\tikz@lib@dv@beg@opt[#1]{%
\pgfkeys{/pgf/data/.cd,/pgf/every data/.try,#1}%
\pgf@dv@do@adddata{\pgfkeysvalueof{/pgf/data visualization/obj}.add data({{\begingroup\pgfkeys{/pgf/data/.cd,/pgf/every data/.try,#1}}})}%
@@ -224,30 +224,30 @@
\tikzerror{Opening brace expected}%
\tikz@lib@dv@parse@loop%
}%
-}
+}%
\def\tikz@lib@dv@handle@endscope{%
\pgf@dv@do@adddata{\pgfkeysvalueof{/pgf/data visualization/obj}.add data(\endgroup)}%
\endgroup%
\afterassignment\tikz@lib@dv@parse@loop%
\let\tikz@dummy=%get rid of \egroup
-}
+}%
\def\tikz@lib@dv@handle@data data{%
\pgfutil@ifnextchar g{\tikz@lib@dv@handle@data@group}{%
\pgfutil@ifnextchar p{\tikz@lib@dv@handle@data@point}{%
- \pgfdata}}}
+ \pgfdata}}}%
-\def\tikz@lib@dv@handle@data@group group{\pgfutil@ifnextchar[{\tikz@lib@dv@handle@data@group@opt}{\tikz@lib@dv@handle@data@group@opt[]}}%}
+\def\tikz@lib@dv@handle@data@group group{\pgfutil@ifnextchar[{\tikz@lib@dv@handle@data@group@opt}{\tikz@lib@dv@handle@data@group@opt[]}}%}%
\def\tikz@lib@dv@handle@data@group@opt[#1]#2{%
\pgfutil@ifnextchar={\tikz@lib@dv@handle@data@group@def{#1}{#2}}{%
\pgfutil@ifnextchar+{\tikz@lib@dv@handle@data@group@extend{#1}{#2}}{%
- \tikz@lib@dv@handle@data@group@use{#1}{#2}}}}
+ \tikz@lib@dv@handle@data@group@use{#1}{#2}}}}%
\def\tikz@lib@dv@handle@data@group@def#1#2={%
\pgfkeys{/pgf/data/new group=#2}%
\tikz@lib@dv@handle@data@group@extend{#1}{#2}+=%
-}
+}%
\def\tikz@lib@dv@handle@data@group@extend#1#2+={%
\pgfutil@ifnextchar\bgroup{
@@ -260,40 +260,40 @@
\tikzerror{Opening brace expected}%
\tikz@lib@dv@parse@loop%
}%
-}
+}%
\def\tikz@lib@dv@handle@data@group@use#1#2{%
\pgfdata[#1,use group=#2]%
-}
+}%
-\def\tikz@lib@dv@handle@data@point point{\pgfutil@ifnextchar[{\tikz@lib@dv@handle@data@point@opt}{\tikz@lib@dv@handle@data@point@opt[]}}%]
+\def\tikz@lib@dv@handle@data@point point{\pgfutil@ifnextchar[{\tikz@lib@dv@handle@data@point@opt}{\tikz@lib@dv@handle@data@point@opt[]}}%]%
\def\tikz@lib@dv@handle@data@point@opt[#1]{%
- \pgf@dv@do@adddata{\pgfkeysvalueof{/pgf/data visualization/obj}.add data({{\bgroup\pgfkeys{/data point/.cd,#1}\pgfdatapoint\egroup}})}%
- \tikz@lib@dv@parse@loop%
-}
+ \pgf@dv@do@adddata{\pgfkeysvalueof{/pgf/data visualization/obj}.add data({{\bgroup\pgfkeys{/data point/.cd,#1}\pgfdatapoint\egroup}})}%
+ \tikz@lib@dv@parse@loop%
+}%
\def\tikz@lib@dv@handle@info info{%
- \pgfutil@ifnextchar'{\tikz@lib@dv@handle@info@prime}{\tikz@lib@dv@handle@info@noprime}}
+ \pgfutil@ifnextchar'{\tikz@lib@dv@handle@info@prime}{\tikz@lib@dv@handle@info@noprime}}%
\def\tikz@lib@dv@handle@info@noprime{%
- \pgfutil@ifnextchar[{\tikz@lib@dv@handle@info@block@opt}{\tikz@lib@dv@handle@info@block@opt[]}}%}
+ \pgfutil@ifnextchar[{\tikz@lib@dv@handle@info@block@opt}{\tikz@lib@dv@handle@info@block@opt[]}}%}%
\def\tikz@lib@dv@handle@info@block@opt[#1]#2{%
\tikz@main@dv.after visualization({\scope[#1]#2\endscope})%
\tikz@lib@dv@parse@loop
-}
+}%
\def\tikz@lib@dv@handle@info@prime'{%
- \pgfutil@ifnextchar[{\tikz@lib@dv@handle@info@block@opt@prime}{\tikz@lib@dv@handle@info@block@opt@prime[]}}%}
+ \pgfutil@ifnextchar[{\tikz@lib@dv@handle@info@block@opt@prime}{\tikz@lib@dv@handle@info@block@opt@prime[]}}%}%
\def\tikz@lib@dv@handle@info@block@opt@prime[#1]#2{%
\tikz@main@dv.before visualization({\scope[#1]#2\endscope})%
\tikz@lib@dv@parse@loop
-}
+}%
-\pgfset{/pgf/every data/.style={/tikz/every data/.try,/tikz/data visualization/every data/.try}}
+\pgfset{/pgf/every data/.style={/tikz/every data/.try,/tikz/data visualization/every data/.try}}%
%
% Performing before/after stuff via keys
-%
+%
\tikzdatavisualizationset{
before survey/.code=\tikz@main@dv.before survey({#1}),
@@ -304,26 +304,26 @@
at end survey/.code=\tikz@main@dv.at end survey({#1}),
at start visualization/.code=\tikz@main@dv.at start visualization({#1}),
at end visualization/.code=\tikz@main@dv.at end visualization({#1}),
-}
+}%
\def\tikz@lib@dv@alias@dv@bb{
\pgfnodealias{data bounding box}{data visualization bounding box}%
\pgfkeys{/pgf/freeze local bounding box=data bounding box}%
-}
+}%
%
% The data point key
%
\tikzdatavisualizationset{
data point/.code={
- \pgf@dv@do@adddata{\pgfkeysvalueof{/pgf/data visualization/obj}.add data({{\bgroup\pgfkeys{/data point/.cd,#1}\pgfdatapoint\egroup}})}%
+ \pgf@dv@do@adddata{\pgfkeysvalueof{/pgf/data visualization/obj}.add data({{\bgroup\pgfkeys{/data point/.cd,#1}\pgfdatapoint\egroup}})}%
}
-}
+}%
%
-% Object setup
+% Object setup
%
% The following key is used to create objects for the rendering
@@ -348,10 +348,10 @@
% The following styles may be useful:
%
% arg1 from key = use the contents of the given key as arg1. Similar
-% for other args
+% for other args
% arg1 handle from key = the contents of the given key should contain
% an object. Then arg1 will be a handle to this
-% object. Similar for other args
+% object. Similar for other args
\tikzdatavisualizationset{%
new object/.code={%
@@ -368,7 +368,7 @@
new object/grab/store/.store in=\tikz@dv@grabbed@store,
new object/grab/when/.store in=\tikz@dv@grabbed@when,
new object/grab/.unknown/.code={},%ignore
-}
+}%
\def\tikz@dv@newobject#1#2{%
\def\tikz@dv@new@obj@store{#1}%
@@ -406,8 +406,8 @@
\fi%
\tikz@dv@new@after%
\fi
-}
-\def\tikz@lib@notused{\tikz@lib@notused}
+}%
+\def\tikz@lib@notused{\tikz@lib@notused}%
\def\tikz@dv@add@arg#1#2{%
\ifx#2\tikz@lib@notused%
@@ -416,7 +416,7 @@
\expandafter\expandafter\expandafter\pgf@marshal%
\expandafter\expandafter\expandafter{\expandafter\pgf@marshal#1#2}%
\fi%
-}
+}%
\tikzdatavisualizationset{%
new object/parse/.cd,
@@ -449,12 +449,12 @@
arg6 handle from key/.code=\tikz@dv@handle@from@key{#1}{\tikz@dv@handle@f}{\tikz@dv@arg@f},
arg7 handle from key/.code=\tikz@dv@handle@from@key{#1}{\tikz@dv@handle@g}{\tikz@dv@arg@g},
arg8 handle from key/.code=\tikz@dv@handle@from@key{#1}{\tikz@dv@handle@h}{\tikz@dv@arg@h}
-}
+}%
\def\tikz@dv@handle@from@key#1#2#3{%
\pgfkeysvalueof{#1}.get handle(#2)%
\def#3{#2}%
-}
+}%
@@ -472,7 +472,7 @@
{%
\tikzset{/data point/.cd,#1}%
\pgfpointdvlocaldatapoint%
-}
+}%
@@ -592,21 +592,21 @@
at ticks/.code={%
\expandafter\pgfkeysalso\expandafter{\tikz@lib@dv@ticks@default@at}%
\expandafter\pgfkeysalso\expandafter{\tikz@lib@dv@ticks@at}},
-}
+}%
-\def\tikz@lib@dv@add@#1#2{\pgfkeysaddvalue{/tikz/data visualization/#1}{}{,#2}}
+\def\tikz@lib@dv@add@#1#2{\pgfkeysaddvalue{/tikz/data visualization/#1}{}{,#2}}%
\def\tikz@dv@lib@parse@scaling#1 at#2and #3 at#4\pgf@stop{%
\pgfmathsetmacro{\tikz@dv@lib@min@at}{#2}
\pgfmathsetmacro{\tikz@dv@lib@max@at}{#4}
\edef\tikz@temp{#1 at \tikz@dv@lib@min@at and #3 at \tikz@dv@lib@max@at}%
-}
+}%
% Ticks at
\tikzdatavisualizationset{
at/.code={\def\tikz@dv@at@list{#1}},
- also at/.code={\expandafter\def\expandafter\tikz@dv@at@list\expandafter{\tikz@dv@at@list,{#1}}},
+ also at/.code={\expandafter\def\expandafter\tikz@dv@at@list\expandafter{\tikz@dv@at@list,#1}},
major at/.style={major={at={#1}}},
minor at/.style={minor={at={#1}}},
subminor at/.style={subminor={at={#1}}},
@@ -615,19 +615,19 @@
subminor also at/.style={subminor={also at={#1}}},
options at/.code={\expandafter\def\expandafter\tikz@dv@style@at@list\expandafter{\tikz@dv@style@at@list,{#1}}},
no tick text at/.style={options at={#1 as [no tick text]}}
-}
+}%
\def\tikz@lib@dv@do@axis#1{%
\def\tikz@marshal{#1=}
\expandafter\expandafter\expandafter\tikzdatavisualizationset%
\expandafter\expandafter\expandafter{\expandafter\tikz@marshal\expandafter{\tikz@lib@dv@args}}
-}
+}%
\def\tikz@do@axis@options#1#2{
\pgfkeys{/tikz/data visualization/axis options/.cd,#2}
\def\tikz@dv@axis{#1}
-}
+}%
\let\tikz@dv@axis\pgfutil@empty
\tikzdatavisualizationset{
@@ -656,7 +656,7 @@
font=\pgfutil@font@small,
}
}
-}
+}%
\tikzset{
@@ -707,22 +707,22 @@
grid/.style={\tikz@dv@axis/grid at/.append={,#1}},
grid/.default=at default ticks,
visualize grid/.code=\expandafter\tikz@lib@dv@gv\expandafter{\tikz@dv@axis}{#1},
- %
+ %
ticks and grid/.style={\tikz@dv@axis/ticks at/.append={,#1},\tikz@dv@axis/grid at/.append={,#1}},
- %
+ %
% Visualizing axis labels
- %
+ %
visualize label/.code=\expandafter\tikz@lib@dv@lv\expandafter{\tikz@dv@axis}{#1},
-}
+}%
-\def\tikz@lib@dv@auto@attribute{\tikz@lib@dv@auto@attribute}
+\def\tikz@lib@dv@auto@attribute{\tikz@lib@dv@auto@attribute}%
% Range options
\tikzdatavisualizationset{
axis options/.cd,
- %
- % Including a value in the range
+ %
+ % Including a value in the range
%
include value/.style={%
/tikz/data visualization/before survey/.expanded={%
@@ -732,9 +732,9 @@
}%
}%
},
- %
+ %
% Directly setting the min or max
- %
+ %
min value/.style={
/tikz/data visualization/at end survey/.expanded={%
\noexpand\pgfkeysgetvalue{\tikz@dv@axis/scaling mapper}\noexpand\tikz@dv@axis@mapper%
@@ -747,13 +747,13 @@
\noexpand\tikz@lib@dv@set\noexpand\tikz@dv@axis@mapper{#1}{max}%
}
},
-}
+}%
\def\tikz@lib@dv@set#1#2#3{%
\pgfdvmathenter{\pgf@dv@value}{#2}%
#1.get in range interval()%
\pgfdvinrangeinterval.let #3(\pgf@dv@value)%
-}
+}%
% Layer options
\tikzdatavisualizationset{
@@ -761,7 +761,7 @@
ticks layer/.style=on background layer,
ticks node layer/.style=,
grid layer/.style=on background layer,
-}
+}%
% Axis visualization
@@ -773,7 +773,7 @@
\tikzdatavisualizationset{
axes actions/.append={\tikz@lib@dv@show@axis{#1}{#2}}
}
-}
+}%
\def\tikz@lib@dv@show@axis#1#2{%
\scope[data visualization/axis layer,/tikz/data visualization/.cd,low=min,high=max,every axis/.try,#2]
@@ -793,7 +793,7 @@
}
};
\endscope
-}
+}%
\def\tikz@dv@goto#1#2{%
\edef\pgf@@temp{#2}%
@@ -814,23 +814,23 @@
\pgfkeysvalueof{#1/scaling mapper}.set in to(#2)%
\fi%
\fi%
-}
+}%
\def\tikz@dv@goto@pos#1#2{%
\pgfkeyssetvalue{/data point/\pgfkeysvalueof{#1/attribute}/out pos}{#2}%
-}
+}%
+
+\def\tikz@lib@dv@padded@min@text{padded min}%
+\def\tikz@lib@dv@padded@max@text{padded max}%
-\def\tikz@lib@dv@padded@min@text{padded min}
-\def\tikz@lib@dv@padded@max@text{padded max}
-
\def\tikz@lib@dv@special@at#1#2{%
% Ok, calculate direction vector:
\tikzpointandanchordirection{\pgfkeysvalueof{#1/scaling mapper}.set in to(min)}{\pgfkeysvalueof{#1/scaling mapper}.set in to(max)}
\tikzset{anchor/.expanded=#2}
-}
+}%
-% Ticks visualization
+% Ticks visualization
%
% #1 = name of axis on which ticks should be shown
% #2 = options for the visualization
@@ -842,7 +842,7 @@
minor ticks actions/.append={\tikz@lib@dv@show@ticks{minor}{#1}{#2}},
subminor ticks actions/.append={\tikz@lib@dv@show@ticks{subminor}{#1}{#2}}
}
-}
+}%
\def\tikz@lib@dv@default@action#1#2#3{%
\let\tikz@marshal\pgfutil@empty%
@@ -867,7 +867,7 @@
\fi
}%
\pgfkeyslet{#2/default #1 at}\tikz@marshal
-}
+}%
\def\tikz@lib@dv@show@ticks#1#2#3{%
% First, check whether there is anything to do at all:
@@ -896,7 +896,7 @@
\expandafter\tikzdatavisualizationset\expandafter{\tikz@temp}
\pgfkeysgetvalue{/tikz/data visualization/\pgfkeysvalueof{/tikz/data visualization/direction axis}/scaling mapper}\pgf@dv@tick@dir@mapper
% Ok, now it's time to draw the ticks!
- \foreach \tikz@dv@tick@pos[count=\tikz@dv@tick@count] in \tikz@dv@at@list
+ \foreach \tikz@dv@tick@pos[count=\tikz@dv@tick@count] in \tikz@dv@at@list
{
\ifx\tikz@dv@tick@pos\pgfutil@empty
\c@pgf@counta=\tikz@dv@tick@count\relax%
@@ -948,32 +948,32 @@
\path [/tikz/data visualization/styling] (\tikz@dv@max@tick) \tikz@dv@handle@tick{\tikz@dv@max@anchor};
\endscope
\fi
- \fi
+ \fi
}
\endscope
}
\fi
-}
+}%
\def\tikz@lib@dv@parse#1\pgf@stop{%
\pgfutil@in@{as}{#1}%
\ifpgfutil@in@%
- \tikz@lib@dv@parse@as#1\pgf@stop%
+ \tikz@lib@dv@parse@as#1\pgf@stop%
\else%
\tikz@lib@dv@parse@as#1as\tikz@lib@dv@typeset\pgf@stop%
\fi%
-}
+}%
\def\tikz@lib@dv@parse@as#1as{%
\def\tikz@dv@tick@pos{#1}%
\pgfutil@ifnextchar[{\tikz@lib@dv@parse@as@opt}{\tikz@lib@dv@parse@as@opt[]}%]
-}
+}%
\def\tikz@lib@dv@parse@as@opt[#1]{%
\def\tikz@lib@dv@tick@opt{#1}%
\pgfutil@ifnextchar\pgf@stop{\tikz@lib@dv@parse@as@text\tikz@lib@dv@typeset}{\tikz@lib@dv@parse@as@text}
-}
+}%
\def\tikz@lib@dv@parse@as@text#1\pgf@stop{%
\def\tikz@lib@dv@tick@text{#1}%
-}
+}%
\def\tikz@lib@dv@typeset{%
\pgfdvmathenter{\tikz@lib@dv@typesetnum}{\tikz@dv@tick@pos}%
@@ -981,7 +981,7 @@
\pgfkeysvalueof{/tikz/data visualization/tick prefix}%
\pgfkeys{/tikz/data visualization/tick typesetter=\tikz@lib@dv@typesetnum}%
\pgfkeysvalueof{/tikz/data visualization/tick suffix}%
-}
+}%
\newif\iftikz@dv@min@tick@node
\newif\iftikz@dv@max@tick@node
@@ -996,7 +996,7 @@
\fi
\expandafter}%
\tikz@dv@tick@marshal
-}
+}%
\def\tikz@lib@handle@at@style{%
@@ -1016,7 +1016,7 @@
\expandafter\tikzdatavisualizationset\expandafter{\tikz@dv@lib@this@at@style}%
\fi%
\fi%
-}
+}%
\def\tikz@dv@lib@handle@one@at@style#1as#2[#3]#4\tikz@stop{%
\pgfdvmathenter{\tikz@lib@dv@at@math@var}{#1}%
@@ -1025,7 +1025,7 @@
% Bingo!
\expandafter\gdef\expandafter\tikz@dv@lib@this@at@style\expandafter{\tikz@dv@lib@this@at@style,#3}%
\fi%
-}
+}%
% Help function
@@ -1042,12 +1042,12 @@
\tikz@auto@anchor@prime
\xdef\tikz@dv@min@anchor{\tikz@anchor}
}
-}
+}%
-% Grid visualization
+% Grid visualization
%
% #1 = name of axis on which grid lines should be shown
% #2 = options for the visualization
@@ -1059,7 +1059,7 @@
minor grid actions/.append={\tikz@lib@dv@show@grid{minor}{#1}{#2}},
subminor grid actions/.append={\tikz@lib@dv@show@grid{subminor}{#1}{#2}},
}
-}
+}%
\def\tikz@lib@dv@show@grid#1#2#3{%
% First, check whether there is anything to do at all:
@@ -1090,7 +1090,7 @@
\expandafter\tikzdatavisualizationset\expandafter{\tikz@temp}
\edef\tikz@lib@dv@dir@axis{/tikz/data visualization/\pgfkeysvalueof{/tikz/data visualization/direction axis}}%
% Ok, now it's time to draw the grid!
- \foreach \tikz@dv@grid@pos in \tikz@dv@at@list
+ \foreach \tikz@dv@grid@pos in \tikz@dv@at@list
{
\ifx\tikz@dv@grid@pos\pgfutil@empty
\else
@@ -1110,7 +1110,7 @@
\endscope
}
\fi
-}
+}%
@@ -1120,15 +1120,15 @@
-%
-% Label visualization
+%
+% Label visualization
%
\def\tikz@lib@dv@lv#1#2{
\tikzdatavisualizationset{
label actions/.append={\tikz@lib@dv@show@label{#1}{#2}}
}
-}
+}%
\def\tikz@lib@dv@show@label#1#2{%
% First, check whether there is anything to do at all:
@@ -1140,14 +1140,14 @@
\expandafter\tikz@lib@dv@parse@node\tikz@dv@lib@label\pgf@stop
\endscope
\fi
-}
+}%
-\def\tikz@lib@dv@parse@node{\pgfutil@ifnextchar[\tikz@lib@dv@parse@node@opt{\tikz@lib@dv@parse@node@opt[]}}%}
+\def\tikz@lib@dv@parse@node{\pgfutil@ifnextchar[\tikz@lib@dv@parse@node@opt{\tikz@lib@dv@parse@node@opt[]}}%}%
\def\tikz@lib@dv@parse@node@opt[#1]#2\pgf@stop{
\tikzdatavisualizationset{#1}
- \pgftransformshift{\pgfpointdvlocaldatapoint}%
+ \pgftransformshift{\pgfpointdvlocaldatapoint}%
\node [/tikz/data visualization/node styling] {#2};
-}
+}%
@@ -1164,8 +1164,8 @@
tick typesetter/.code=\pgfmathprintnumber{#1},
tick prefix/.initial=,
tick suffix/.initial=,
- tick unit/.style={tick suffix={$\,\rm#1$}},% this is an alias
-}
+ tick unit/.style={tick suffix={$\,\pgfutil@font@normalfont#1$}},% this is an alias
+}%
\def\tikz@lib@dv@compute@at@linear{%
% Setup about:
@@ -1221,14 +1221,14 @@
\pgfdvmathadd{\tikz@lib@dv@current}{\tikz@lib@dv@current}{\tikz@dv@lib@step}%
\pgfdvmathifless{\tikz@lib@dv@current}{\tikz@lib@dv@max@plus@epsilon}{\tikz@lib@dv@continuetrue}{\tikz@lib@dv@continuefalse}%
\iftikz@lib@dv@continue%
- \repeat%
+ \repeat%
\tikzdatavisualizationset{major/.expanded={at={\tikz@lib@dv@ats}},minor/.expanded={at={\tikz@lib@dv@minor@ats}}}%
}{%
\pgfdvmathexitbyserializing{\tikz@temp}{\pgfdvmin}%
\tikzdatavisualizationset{major/.expanded={at={\tikz@temp}}}%
- }%
+ }%
\fi%
-}
+}%
\newif\iftikz@lib@dv@continue
\def\tikz@lib@dv@subloop{
@@ -1243,13 +1243,13 @@
\let\tikz@lib@dv@next=\relax
\fi
\tikz@lib@dv@next
-}
+}%
%
% Ticks about settings
-%
+%
\tikzdatavisualizationset{
about/.style={compute step=\tikz@lib@dv@compute@about{#1}},
@@ -1265,7 +1265,7 @@
few/.style={about=3},
some/.style={about=5},
many/.style={about=10},
-}
+}%
\def\tikz@lib@dv@about@linear#1{%
\tikz@lib@dv@mapper.get in range interval()%
@@ -1287,18 +1287,18 @@
\ifdim\pgf@xc<10pt%
\pgfmathfloatcreate{\tikz@lib@dv@flags}{\pgf@sys@tonumber{\pgf@xc}}{\tikz@lib@dv@exp}%
\else
- \begingroup
- \c@pgf@countd=\tikz@lib@dv@exp
- \advance\c@pgf@countd by1
- \edef\tikz@lib@dv@exp{\the\c@pgf@countd}%
- \pgfmath@smuggleone\tikz@lib@dv@exp
- \endgroup
- \divide\pgf@xc by 10\relax
+ \begingroup
+ \c@pgf@countd=\tikz@lib@dv@exp
+ \advance\c@pgf@countd by1
+ \edef\tikz@lib@dv@exp{\the\c@pgf@countd}%
+ \pgfmath@smuggleone\tikz@lib@dv@exp
+ \endgroup
+ \divide\pgf@xc by 10\relax
\pgfmathfloatcreate{\tikz@lib@dv@flags}{\pgf@sys@tonumber{\pgf@xc}}{\tikz@lib@dv@exp}%
\fi
\pgfmathfloattofixed{\pgfmathresult}%
\let\tikz@lib@dv@step=\pgfmathresult
-}
+}%
@@ -1319,7 +1319,7 @@
\tikz@dv@axis/scaling/default=1 at 0 and 10 at 1,
exponential steps
}
-}
+}%
\def\tikz@lib@dv@compute@at@log{%
% Setup about:
@@ -1376,10 +1376,10 @@
\pgfdvmathadd{\tikz@lib@dv@current}{\tikz@lib@dv@current}{\tikz@dv@lib@step}%
\pgfdvmathifless{\tikz@lib@dv@current}{\tikz@lib@dv@max@plus@epsilon}{\tikz@lib@dv@continuetrue}{\tikz@lib@dv@continuefalse}%
\iftikz@lib@dv@continue%
- \repeat%
+ \repeat%
\tikzdatavisualizationset{major/.expanded={at={\tikz@lib@dv@ats}},minor/.expanded={at={\tikz@lib@dv@minor@ats}}}%
\fi%
-}
+}%
\newif\iftikz@lib@dv@continue
@@ -1407,7 +1407,7 @@
\fi%
\pgfmathfloattofixed{\pgfmathresult}
\let\tikz@lib@dv@step=\pgfmathresult
-}
+}%
@@ -1431,7 +1431,7 @@
#1/scaling/default/.initial=0 at 0 and 1 at 1cm,
#1/unit vector/.initial=\pgfqpoint{1pt}{0pt},
}
-}
+}%
\tikzset{
/tikz/data visualization/axis options/.cd,
@@ -1439,11 +1439,11 @@
length/.style={\tikz@dv@axis/scaling=min at 0 and max at #1},
unit length/.code={\tikz@dv@parse@unit@length{#1}},
power unit length/.style={\tikz@dv@axis/scaling=1 at 0 and 10 at #1}
-}
+}%
\def\tikz@lib@dv@uv#1{%
\pgfkeyssetvalue{\tikz@dv@axis/unit vector}{#1}
-}
+}%
\def\tikz@dv@parse@unit@length#1{
\pgfutil@in@{per}{#1}
@@ -1452,14 +1452,14 @@
\else%
\tikz@dv@parse@unit@length@#1per1units\pgf@stop%
\fi%
-}
+}%
\def\tikz@dv@parse@unit@length@#1per#2units\pgf@stop{
\pgfkeysalso{\tikz@dv@axis/scaling=0 at 0 and #2 at #1}
-}
+}%
-%
-% Common visualizer interface
+%
+% Common visualizer interface
%
\tikzdatavisualizationset{
@@ -1492,7 +1492,7 @@
},
style sheet/.style={/data point/set/.style sheet={#1}},
/pgf/data/set/.style={/data point/set=#1},
-}
+}%
\tikzdatavisualizationset{
new sub visualizer/.style n args={4}{
@@ -1516,14 +1516,14 @@
/tikz/data visualization/visualizers/#4/#1/styling/.style=,
/tikz/data visualization/visualizers/#4/#1/label in legend options/.style={#3},
}
-}
+}%
\def\tikz@do@visualizer#1#2{%
\tikzdatavisualizationset{
#2=#1
}
-}
+}%
\newcount\tikzdvvisualizercounter
@@ -1542,12 +1542,12 @@
polygon/.style={straight cycle},% alias
gap line/.style={@set={\pgfplothandlergaplineto}{default label in legend path}},
gap cycle/.style={@set={\pgfplothandlergapcycle}{gap circular label in legend line}}
-}
+}%
-%
-% Label visualizer
+%
+% Label visualizer
%
\tikzdatavisualizationset{
@@ -1595,7 +1595,7 @@
},
% Label style
text colored/.style={node style={text=visualizer color}}
-}
+}%
\def\tikz@create@label@count#1{
\tikzdatavisualizationset{
@@ -1607,7 +1607,7 @@
after creation={\tikzdvobj.set filter(\pgfdvvisualizerfilter{#1})}
}
}
-}
+}%
\pgfkeys{
/tikz/data visualization/visualizer label options/.cd,
@@ -1635,7 +1635,7 @@
text colored/.style=/tikz/data visualization/text colored,
pin angle/.store in=\tikz@lib@dv@pin@dir,
pin length/.style={node style={pin distance={#1}}},
-}
+}%
\let\tikz@lib@dv@pin@sign\pgfutil@empty
@@ -1688,8 +1688,8 @@
#1/anchor/.initial=west,
#1/at/.initial=(data visualization bounding box.east),
#1/matrix node styling/.style={row sep=0pt,column sep=.8em},
- %
- %
+ %
+ %
%
#1/.code={
\let\tikz@temp\tikz@dv@legend%
@@ -1703,12 +1703,12 @@
new legend,
main legend={#1}
}
-}
+}%
\def\tikz@do@legend@options#1#2{
\pgfkeys{/tikz/data visualization/legend options/.cd,#2}
\def\tikz@dv@legend{#1}
-}
+}%
\let\tikz@dv@legend\pgfutil@empty
@@ -1731,9 +1731,9 @@
left then down/.style={\tikz@dv@legend/@strategy=left then down},
right then up/.style={\tikz@dv@legend/@strategy=right then up},
left then up/.style={\tikz@dv@legend/@strategy=left then up},
- %
- % Where to put the legend
- %
+ %
+ % Where to put the legend
+ %
anchor/.style={\tikz@dv@legend/anchor={#1}},
at/.style={\tikz@dv@legend/at={#1}},
% Outer placements
@@ -1789,9 +1789,9 @@
anchor=south,
},
every new legend/.style={east outside,label style=text right},
- %
+ %
% Inner placements
- %
+ %
% First, styling
every legend inside/.style={
opaque=white,
@@ -1905,19 +1905,19 @@
anchor=north east,
every legend inside
},
- %
%
- %
- % Label text styling
- %
+ %
+ %
+ % Label text styling
+ %
label style/.style={
matrix node style={/tikz/data visualization/every label in legend/.append style={#1}}
},
- %
- % Styling
+ %
+ % Styling
%
matrix node style/.style={\tikz@dv@legend/matrix node styling/.append style={#1}},
-}
+}%
\tikzdatavisualizationset{
@@ -1925,25 +1925,25 @@
\begingroup
\pgfkeys{/tikz/data visualization/legend entry options/.cd,#1}
\pgfkeysgetvalue{/tikz/data visualization/legend entry options/legend}\tikz@dv@temp@legend
- \global\let\tikz@dv@temp@legend\tikz@dv@temp@legend
+ \global\let\tikz@dv@temp@legend\tikz@dv@temp@legend
\endgroup
\tikzdatavisualizationset{new legend/.expanded=\tikz@dv@temp@legend}%
\expandafter\tikz@dv@add@legend@entry\expandafter{\tikz@dv@temp@legend}{#1}
}
-}
+}%
\def\tikz@dv@add@legend@entry#1#2{
\tikz@main@dv.at start survey({
\pgfkeysgetvalue{/tikz/data visualization/#1/obj}\pgf@temp
\pgf@temp.add entry(\tikz@dv@render@legend@entry{legend=#1,#2})
})
-}
+}%
\def\tikz@dv@render@legend@entry#1{
\pgfkeys{/tikz/data visualization/.cd,every data set label}
\pgfkeys{/tikz/data visualization/legend entry options/.cd,
/tikz/data visualization/every label in legend,#1}%
- \pgfkeysgetvalue{/tikz/data visualization/legend entry options/text}\tikz@dv@temp@lab
+ \pgfkeysgetvalue{/tikz/data visualization/legend entry options/text}\tikz@dv@temp@lab
\pgfkeysgetvalue{/tikz/data visualization/@node styling}\tikz@dv@temp@style
\pgfkeysgetvalue{/tikz/data visualization/legend entry options/setup}\tikz@dv@temp@setup
\pgfkeysgetvalue{/tikz/data visualization/legend entry options/visualizer in legend styling}\tikz@dv@temp@visual@styling
@@ -1959,18 +1959,18 @@
\fi
\endscope
\endscope
-}
+}%
-\def\tikz@dv@pre@height{\hbox{\vrule height .75em width0pt}}
-\def\tikz@dv@post@height{\hbox{\vrule depth .25em width0pt}}
+\def\tikz@dv@pre@height{\hbox{\vrule height .75em width0pt}}%
+\def\tikz@dv@post@height{\hbox{\vrule depth .25em width0pt}}%
\pgfkeys{
/tikz/data visualization/legend entry options/.cd,
- %
+ %
% General options
- %
+ %
text/.initial=,
node style/.style={/tikz/data visualization/node style={#1}},
legend/.initial=main legend,
@@ -1978,9 +1978,9 @@
visualizer in legend/.initial=,
visualizer in legend styling/.initial=,
visualizer in legend style/.style={visualizer in legend styling/.append={,#1}},
- %
+ %
% Legend visualizers for plots
- %
+ %
text right/.style={
node style={anchor=mid west,inner ysep=1pt,inner xsep=0pt,reset cm,xshift=.333em},
visualizer in legend style={reset cm},
@@ -1995,7 +1995,7 @@
/utils/exec=\tikz@lib@dv@text@onlytrue
},
text colored/.style=/tikz/data visualization/text colored,
-}
+}%
\let\tikz@lib@dv@pin@dir\pgfutil@empty
\newif\iftikz@lib@dv@text@only
@@ -2028,7 +2028,7 @@
style/.style={/tikz/data visualization/visualizers/\tikz@visualizer/styling/.append style={,#1}},
label in legend options/.style={/tikz/data visualization/visualizers/\tikz@visualizer/label in legend options/.append style={,#1}},
ignore style sheets/.style={/tikz/data visualization/visualizers/\tikz@visualizer/signal/.code=,/utils/exec=\advance\tikzdvvisualizercounter by -1\relax},
-}
+}%
\def\tikz@dv@new@label@in@legend@for@visualizer#1#2{
\tikzdatavisualizationset{
@@ -2043,7 +2043,7 @@
#2,
}
}
-}
+}%
\def\tikz@dv@legend@entry@as@example{
\pgfkeysgetvalue{/data point/set}{\tikz@visualizer}
@@ -2063,7 +2063,7 @@
{ \pgfplotstreampoint{\expandafter\tikz@scan@one@point\expandafter\pgfutil@firstofone\coordinate} }
\pgfplotstreamend
\pgfkeysvalueof{/data point/\tikz@visualizer/execute at end}
-}
+}%
\tikzdatavisualizationset{
@@ -2098,7 +2098,7 @@
([xshift=-1em]270:.9em and .35ex),%
([xshift=-1em]315:.9em and .35ex)},%
label in legend mark coordinates={([xshift=-1em]120:.9em and .35ex),([xshift=-1em]-60:.9em and .35ex)},
- },
+ },
gap circular label in legend line/.style={
label in legend line coordinates={%
([xshift=-1em,yshift=.2ex]90:1.4ex and 0.9ex),%
@@ -2112,15 +2112,15 @@
([xshift=-1em,yshift=.2ex]234:1.4ex and 0.9ex),%
([xshift=-1em,yshift=.2ex]306:1.4ex and 0.9ex),%
([xshift=-1em,yshift=.2ex]18:1.4ex and 0.9ex)}
- },
+ },
default label in legend path/.style={zig zag label in legend line},
default label in legend closed path/.style={circular label in legend line},
default label in legend mark/.style={label in legend one mark},
-}
+}%
\def\tikz@dv@legend@entry@visualizer@visualizer{
-}
+}%
@@ -2171,7 +2171,7 @@
#1={no lines}
},
visualize as scatter/.default=scatter
-}
+}%
\def\tikz@dv@plot@mark@maker{
\let\tikz@options=\pgfutil@empty%
@@ -2183,7 +2183,7 @@
\else
\pgfplothandlermark{\tikz@transform\pgfuseplotmark{\tikz@plot@mark}}
\fi
-}
+}%
@@ -2211,13 +2211,13 @@
#1={}
},
visualize as rectangles/.default=rectangles,
- %
- %
+ %
+ %
%
visualizer options/.cd,
attribute 1/.style={/data point/\tikz@visualizer/attribute 1=#1},
attribute 2/.style={/data point/\tikz@visualizer/attribute 2=#1},
-}
+}%
@@ -2231,14 +2231,14 @@
{ \pgfplotstreampoint{\expandafter\tikz@scan@one@point\expandafter\pgfutil@firstofone\coordinate} }
\pgfplotstreamend
\pgfkeysvalueof{/data point/\tikz@visualizer/execute at end}
-}
+}%
%
% Style sheets
-%
+%
% Style sheet handler
@@ -2248,20 +2248,20 @@
\noexpand \tikz@dv@temp.default connects()
}
\pgf@marshal
-}
+}%
\tikzset{
visualizer color/.code=\colorlet{visualizer color}{#1},
visualizer color=black
-}
+}%
% Default style sheets
\pgfdvdeclarestylesheet{vary thickness}
{
default style/.style={line width={0.3pt+#1*0.2pt}}
-}
-
+}%
+
\pgfdvdeclarestylesheet{vary dashing}
{
default style/.style=solid,
@@ -2274,7 +2274,7 @@
7/.style={dash pattern=on 8\pgflinewidth off 2\pgflinewidth on
1.5\pgflinewidth off 1.5\pgflinewidth on 1.5\pgflinewidth off
1.5\pgflinewidth on 1.5\pgflinewidth off 1.5\pgflinewidth}
-}
+}%
\pgfdvdeclarestylesheet{vary thickness and dashing}
{
@@ -2336,8 +2336,8 @@
1.5\pgflinewidth off 1.5\pgflinewidth on 1.5\pgflinewidth off
1.5\pgflinewidth on 1.5\pgflinewidth off 1.5\pgflinewidth,
thick
- }
-}
+ }
+}%
\pgfdvdeclarestylesheet{strong colors}
@@ -2349,7 +2349,7 @@
4/.style={visualizer color=green!60!black},
5/.style={visualizer color=orange!80!black},
6/.style={visualizer color=black!60}
-}
+}%
\pgfdvdeclarestylesheet{cross marks}
@@ -2361,56 +2361,56 @@
4/.style={mark=Mercedes star flipped,every mark/.append style=thin,mark size=2pt},
5/.style={mark=star,every mark/.append style=thin,mark size=2pt},
6/.style={mark=10-pointed star,every mark/.append style={line width=.3pt,mark size=1.8pt}}
-}
+}%
\pgfdvdeclarestylesheet{* mark}
{
default style/.style={mark=*,every mark/.append style=thin,mark size=1.4pt},
-}
+}%
\pgfdvdeclarestylesheet{dot mark}
{
default style/.style={mark=*,every mark/.append style=thin,mark size=0.6pt},
-}
+}%
\pgfdvdeclarestylesheet{o mark}
{
default style/.style={mark=o,every mark/.append style=thin,mark size=1.4pt},
-}
+}%
% Declare a color series style sheet
-%
+%
% #1 = name of the style sheet
% #2 = color model
% #3 = initial color
% #4 = step
-%
+%
% Description:
-%
+%
% This function declares a style sheet that changes colors according
% to the value of the attribute. No test is made that the attribute is
% a number.
-\def\tikzdvdeclarestylesheetcolorseries#1#2#3#4{
- \definecolorseries{tikzdvcolorseries#1}{#2}{step}[#2]{#3}{#4}
- \resetcolorseries{tikzdvcolorseries#1}
+\def\tikzdvdeclarestylesheetcolorseries#1#2#3#4{%
+ \definecolorseries{tikzdvcolorseries#1}{#2}{step}[#2]{#3}{#4}%
+ \resetcolorseries{tikzdvcolorseries#1}%
\pgfdvdeclarestylesheet{#1}
{
default style/.style={
/utils/exec=\colorlet{tikz@dv@temp}[rgb]{tikzdvcolorseries#1!![##1]},
visualizer color=tikz@dv@temp
}
- }
-}
+ }%
+}%
-\tikzdvdeclarestylesheetcolorseries{vary hue}{hsb}{.4,0.9,0.8}{.213,0,0}
-\tikzdvdeclarestylesheetcolorseries{shades of blue}{hsb}{.65,1.4,1}{0,-.4,-.0}
-\tikzdvdeclarestylesheetcolorseries{shades of red}{hsb}{0,1.4,1}{0,-.4,-.0}
-\tikzdvdeclarestylesheetcolorseries{gray scale}{hsb}{0,0,-.34}{0,0,.34}
+\tikzdvdeclarestylesheetcolorseries{vary hue}{hsb}{.4,0.9,0.8}{.213,0,0}%
+\tikzdvdeclarestylesheetcolorseries{shades of blue}{hsb}{.65,1.4,1}{0,-.4,-.0}%
+\tikzdvdeclarestylesheetcolorseries{shades of red}{hsb}{0,1.4,1}{0,-.4,-.0}%
+\tikzdvdeclarestylesheetcolorseries{gray scale}{hsb}{0,0,-.34}{0,0,.34}%
@@ -2442,7 +2442,7 @@
v axis={attribute=v,unit vector={(0cm,1pt)}}
},
uv axes/.style={u axis={#1},v axis={#1}},
-}
+}%
\tikzdatavisualizationset{
xyz Cartesian cabinet/.style={
@@ -2457,12 +2457,12 @@
w axis={attribute=w,unit vector={(-0.353553pt,-0.353553pt)}}
}
uvw axes/.style={u axis={#1},v axis={#1},w axis={#1}},
-}
+}%
-%
-% Create a new axis system
+%
+% Create a new axis system
%
\tikzdatavisualizationset{
@@ -2477,7 +2477,7 @@
#4,
}
}
-}
+}%
% The school book axes
@@ -2489,9 +2489,9 @@
% scaling is done by default, rather one unit equals one 1cm. This
% ensures that the even when multiple plots are created, the same
% scaling will be used each time.
-%
+%
% To change the scaling, say "all axes={unit length=1mm}" for
-% instance.
+% instance.
\tikzdatavisualizationset{
new axis system={school book axes}{%
@@ -2527,7 +2527,7 @@
},
school book axes/.cd,
% Possible axis positionings:
- %
+ %
% Place labels at the ends of the axes
%
standard labels/.style={
@@ -2546,11 +2546,11 @@
}
}
},
- %
- % Basic unit
- %
+ %
+ % Basic unit
+ %
unit/.initial=1,
-}
+}%
@@ -2559,7 +2559,7 @@
%
% The scientific axes is a 2d plot that has a predetermined width and
% height. The data is then scaled in such a way that it fits inside
-% this given rectangle.
+% this given rectangle.
\tikzdatavisualizationset{
new axis system={scientific axes}{%
@@ -2641,8 +2641,8 @@
}
},
% Possible axis positionings:
- %
- % Place axes labels below and left, where left label is rotated
+ %
+ % Place axes labels below and left, where left label is rotated
%
standard labels/.style={
/tikz/data visualization/@make labels/.style={
@@ -2668,7 +2668,7 @@
}
}
},
- %
+ %
% Place axes labels below and left, no rotation
%
upright labels/.style={
@@ -2693,9 +2693,9 @@
}
}
}
- }
+ }
},
- %
+ %
% Place axes at the ends of the axes
%
end labels/.style={
@@ -2722,9 +2722,8 @@
}
}
}
-}
+}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.formats.functions.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.formats.functions.code.tex
index 4a4d0896ec8..40632212a0d 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.formats.functions.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.formats.functions.code.tex
@@ -7,10 +7,10 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.formats.functions.code.tex,v 1.1 2008/12/09 00:12:10 tantau Exp $
+\ProvidesFileRCS{tikzlibrarydatavisualization.formats.functions.code.tex}
-\usetikzlibrary{datavisualization}
-\usepgflibrary{datavisualization.formats.functions}
+\usetikzlibrary{datavisualization}%
+\usepgflibrary{datavisualization.formats.functions}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.polar.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.polar.code.tex
index 1615f0d1bfc..137e9964cb7 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.polar.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.polar.code.tex
@@ -7,10 +7,10 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.polar.code.tex,v 1.8 2011/05/06 11:15:33 tantau Exp $
+\ProvidesFileRCS{tikzlibrarydatavisualization.polar.code.tex}
-\usetikzlibrary{datavisualization}
-\usepgflibrary{datavisualization.polar}
+\usetikzlibrary{datavisualization}%
+\usepgflibrary{datavisualization.polar}%
\tikzdatavisualizationset{%
@@ -32,13 +32,13 @@
/tikz/data visualization/#1/unit vector 90 degrees/.initial=\pgfqpoint{0pt}{1pt},
},
new polar axes/.default={angle axis}{radius axis}
-}
+}%
\def\tikz@lib@dv@polar@a#1{
\pgfkeyssetvalue{\tikz@dv@axis/unit vector 0 degrees}{#1}
-}
+}%
\def\tikz@lib@dv@polar@b#1{
\pgfkeyssetvalue{\tikz@dv@axis/unit vector 90 degrees}{#1}
-}
+}%
@@ -54,7 +54,7 @@
},
degrees/.style={\tikz@dv@axis/scaling=0 at 0 and 1 at 1},
radians/.style={\tikz@dv@axis/scaling=0 at 0 and 0.03141592653589793 at 1.8},
-}
+}%
@@ -150,27 +150,27 @@
},
major={
options at=6.2831985e0 as [{style={draw=none},no tick text}],
- options at=6.2831192e0 as [{style={draw=none},no tick text}],
- options at=6.2830794e0 as [{style={draw=none},no tick text}],
- options at=6.2828787e0 as [{style={draw=none},no tick text}],
- options at=6.2831598e0 as [{style={draw=none},no tick text}],
+ options at=6.2831192e0 as [{style={draw=none},no tick text}],
+ options at=6.2830794e0 as [{style={draw=none},no tick text}],
+ options at=6.2828787e0 as [{style={draw=none},no tick text}],
+ options at=6.2831598e0 as [{style={draw=none},no tick text}],
options at=-3.1415991e0 as [{style={draw=none},no tick text}],
options at=-3.1415802e0 as [{style={draw=none},no tick text}],
options at=-3.1415602e0 as [{style={draw=none},no tick text}],
options at=-3.14153961e0 as [{style={draw=none},no tick text}],
options at=-3.1414406e0 as [{style={draw=none},no tick text}],
- }
+ }
}
}
},
@make labels/.style={},
-}
+}%
\tikzdatavisualizationset{
scientific polar axes/.cd,
- %
- %
- %
+ %
+ %
+ %
outer ticks/.style={
/tikz/data visualization/@make axes/.style={
radius axis={
@@ -233,8 +233,8 @@
/tikz/data visualization/@visualize zero/.style={@clean visualize zero={##1}},
},
radius/.initial=3.25cm,
- %
- % First quadrant
+ %
+ % First quadrant
%
0 to pi half/.style={
@setup axes/.style={
@@ -282,8 +282,8 @@
}
}
},
- %
- % Fourth quadrant
+ %
+ % Fourth quadrant
%
-pi half to 0/.style={
@setup axes/.style={
@@ -331,8 +331,8 @@
}
}
},
- %
- % Upper half
+ %
+ % Upper half
%
0 to pi/.style={
@setup axes/.style={
@@ -388,8 +388,8 @@
}
}
},
- %
- % Lower half
+ %
+ % Lower half
%
lower half/.style={
@setup axes/.style={
@@ -417,7 +417,7 @@
}
}
},
- %
+ %
% Right half
%
-pi half to pi half/.style={
@@ -474,8 +474,8 @@
}
}
},
- %
- % Left half
+ %
+ % Left half
%
left half/.style={
@setup axes/.style={
@@ -503,9 +503,9 @@
}
}
},
- %
- % Full circle
- %
+ %
+ % Full circle
+ %
0 to 2pi/.style={
@setup axes/.style={
angle axis={min value=0, max value=6.283185307179586},
@@ -542,7 +542,7 @@
@clean radius axes at={{0}{low}{high}{}{}}
}
},
-}
+}%
@@ -557,7 +557,7 @@
full circle/.style={\tikz@dv@axis/scaling=min at 0 and max at 360},
half circle/.style={\tikz@dv@axis/scaling=min at 0 and max at 180},
quarter circle/.style={\tikz@dv@axis/scaling=min at 0 and max at 90}
-}
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.sparklines.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.sparklines.code.tex
index 69736423596..127b9805f23 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.sparklines.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.sparklines.code.tex
@@ -7,14 +7,14 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.sparklines.code.tex,v 1.1 2008/12/17 22:48:46 tantau Exp $
+\ProvidesFileRCS{tikzlibrarydatavisualization.sparklines.code.tex}
-\usetikzlibrary{datavisualization}
+\usetikzlibrary{datavisualization}%
-%
+%
% Sparklines (not yet usable...)
%
@@ -29,10 +29,9 @@
},
new line plot,
every spark line plot/.try
- }
-}
+ }
+}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex
index 3f17447fdda..27f0ed4aba5 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex
@@ -8,14 +8,14 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex,v 1.44 2015/06/05 12:41:59 tantau Exp $
+\ProvidesFileRCS{tikzlibrarygraphs.code.tex}
-%
-% Interface keys
+%
+% Interface keys
%
-\def\tikzgraphsset{\pgfqkeys{/tikz/graphs}}
+\def\tikzgraphsset{\pgfqkeys{/tikz/graphs}}%
\tikzgraphsset{
new ->/.code n args={4}{%
@@ -40,18 +40,18 @@
edge[#3] #4
(#2\tikzgraphrightanchor);
}
-}
+}%
\def\tikz@lib@graph@store@anchor#1#2{%
- \def\tikz@temp{#1}
+ \def\tikz@temp{#1}%
\ifx\tikz@temp\pgfutil@empty%
\let#2\tikz@temp%
\else%
- \def\tikz@temp{.#1}
+ \def\tikz@temp{.#1}%
\let#2\tikz@temp%
- \fi%
-}
+ \fi%
+}%
\tikzgraphsset{
default edge kind/.initial=--,
@@ -65,17 +65,17 @@
right anchor/.code=\tikz@lib@graph@store@anchor{#1}{\tikzgraphrightanchor},
left anchor=,
right anchor=
-}
+}%
%
% Keys for using nodes declared outside a graph inside a graph as if
% it were declared there
-%
+%
\tikzgraphsset{
use existing nodes/.is if=tikz@lib@graph@all
-}
+}%
\tikzset{
new set/.code={
@@ -88,13 +88,13 @@
\expandafter\expandafter\expandafter\pgfutil@g@addto@macro\expandafter\pgf@temp\expandafter{\expandafter\tikz@lg@do\expandafter{\tikz@fig@name}}%
}%
},%
-}
+}%
\newif\iftikz@lib@graph@all
-%
-% Simple versus multi graphs
+%
+% Simple versus multi graphs
%
\tikzgraphsset{
simple/.code={
@@ -108,7 +108,7 @@
multi/.code={
\tikz@lib@graph@simplefalse%
}
-}
+}%
\newif\iftikz@lib@graph@simple
@@ -118,17 +118,17 @@
% #3 = to
% #4 = options
% #5 = edge nodes
- %
+ %
% Ok, first, test, whether edge exists:
\ifcsname tikz@lg@e@#3@#2\endcsname%
\expandafter\global\expandafter\let\csname tikz@lg@e@#3@#2\endcsname\relax% reset
\fi%
\expandafter\gdef\csname tikz@lg@e@#2@#3\endcsname{\tikz@lib@graph@make@simple@edge{#1}{#2}{#3}{#4}{#5}}%
-}
+}%
\def\tikz@lib@graph@make@simple@edge#1#2#3#4#5{%
\pgfqkeys{/tikz/graphs}{new #1={#2}{#3}{#4}{#5}}%
-}
+}%
\def\tikz@lib@graph@simple@done{%
@@ -137,26 +137,26 @@
\let\tikz@lg@do\tikz@lib@graph@simple@node%
\tikz@lib@graph@node@list
}%
-}
+}%
\def\tikz@lib@graph@simple@node#1{%
{%
\def\tikz@lib@graph@simple@from@node{#1}%
\let\tikz@lg@do\tikz@lib@graph@simple@other@node%
\tikz@lib@graph@node@list%
- }%
-}
+ }%
+}%
\def\tikz@lib@graph@simple@other@node#1{%
\ifcsname tikz@lg@e@\tikz@lib@graph@simple@from@node @#1\endcsname%
\csname tikz@lg@e@\tikz@lib@graph@simple@from@node @#1\endcsname%
\expandafter\global\expandafter\let\csname tikz@lg@e@\tikz@lib@graph@simple@from@node @#1\endcsname\relax%
\fi%
-}
+}%
-%
-% Basic options
+%
+% Basic options
%
\tikzgraphsset{
@@ -172,7 +172,7 @@
@operators/.initial=,
operator/.style={/tikz/graphs/@operators/.append={#1}},
@extra group options/.style=,
-}
+}%
\def\tikzgraphinvokeoperator#1{%
@@ -184,16 +184,16 @@
}%
\tikz@lib@graph@temp%
\global\let\tikz@lib@graph@temp\relax%
-}
+}%
-%
-% The parser
+%
+% The parser
%
\def\tikz@lib@graph@parser{%
\pgfutil@ifnextchar[{\tikz@lib@graph@parser@}{\tikz@lib@graph@parser@[]}%]
-}
+}%
\def\tikz@lib@graph@parser@[#1]{%
\setbox\tikz@whichbox=\hbox\bgroup%
@@ -208,7 +208,7 @@
\else%
\expandafter\tikz@lib@graphs@normal@main%
\fi%
-}
+}%
\long\def\tikz@lib@graphs@normal@main#1{%
\pgfkeysgetvalue{/tikz/graphs/@operators}\tikz@lib@graph@outer@operators%
@@ -220,11 +220,11 @@
\tikz@lib@graph@start@hint@group%
\tikz@lib@graph@parse@group{#1}%
\tikz@lib@graph@end@hint@group
- \tikz@lib@graph@outer@operators%
+ \tikz@lib@graph@outer@operators%
\let\tikz@lg@do=\tikz@lib@graph@cleanup%
\tikz@lib@graph@node@list%
\tikz@lib@graph@main@done%
-}
+}%
\def\tikz@lib@graph@main@done{%
\endgroup%
@@ -234,7 +234,7 @@
\egroup%
\egroup%
\tikz@lib@graph@parser@done%
-}
+}%
@@ -245,13 +245,13 @@
\pgfkeyssetvalue{/tikz/graphs/placement/local width}{0}%
\pgfkeyssetvalue{/tikz/graphs/placement/chain count}{0}%
\pgfkeyssetvalue{/tikz/graphs/placement/element count}{0}%
-}
+}%
\def\tikz@lib@graph@end@hint@group{%
% Get local depth and width outside
\xdef\tikz@lib@graph@group@depth{\pgfkeysvalueof{/tikz/graphs/placement/local depth}}
\xdef\tikz@lib@graph@group@width{\pgfkeysvalueof{/tikz/graphs/placement/local width}}
-}
+}%
\def\tikz@lib@graph@hint@aftergroup{%
\pgfkeysgetvalue{/tikz/graphs/placement/width}\tikz@temp@h%
@@ -263,13 +263,13 @@
\pgfkeyslet{/tikz/graphs/placement/width}\tikz@temp@h%
\pgfkeyslet{/tikz/graphs/placement/local width}\tikz@temp@lh%
\pgfkeyslet{/tikz/graphs/placement/local depth}\tikz@temp@lw%
- %
+ %
\pgfkeysgetvalue{/tikz/graphs/placement/element count}\tikz@temp%
\c@pgf@counta=\tikz@temp\relax%
\advance\c@pgf@counta by1\relax%
\edef\tikz@temp{\the\c@pgf@counta}%
- \pgfkeyslet{/tikz/graphs/placement/element count}\tikz@temp%
-}
+ \pgfkeyslet{/tikz/graphs/placement/element count}\tikz@temp%
+}%
\def\tikz@lib@graph@placement@update{%
\pgfkeys{/tikz/graphs/placement/logical node depth/.expand once=\tikz@lib@graph@name}
@@ -286,13 +286,13 @@
\pgfkeyslet{/tikz/graphs/placement/width}\tikz@temp@h%
\pgfkeyslet{/tikz/graphs/placement/local width}\tikz@temp@lh%
\pgfkeyslet{/tikz/graphs/placement/local depth}\tikz@temp@lw%
- %
+ %
\pgfkeysgetvalue{/tikz/graphs/placement/element count}\tikz@temp%
\c@pgf@counta=\tikz@temp\relax%
\advance\c@pgf@counta by1\relax%
\edef\tikz@temp{\the\c@pgf@counta}%
- \pgfkeyslet{/tikz/graphs/placement/element count}\tikz@temp%
-}
+ \pgfkeyslet{/tikz/graphs/placement/element count}\tikz@temp%
+}%
\def\tikz@lib@graph@placement@after@chain@update{%
\pgfkeysgetvalue{/tikz/graphs/placement/depth}\tikz@temp@w%
@@ -304,18 +304,18 @@
\pgfkeyslet{/tikz/graphs/placement/depth}\tikz@temp@w%
\pgfkeyslet{/tikz/graphs/placement/local width}\tikz@temp@lh%
\pgfkeyslet{/tikz/graphs/placement/local depth}\tikz@temp@lw%
- %
+ %
\pgfkeysgetvalue{/tikz/graphs/placement/chain count}\tikz@temp%
\c@pgf@counta=\tikz@temp\relax%
\advance\c@pgf@counta by1\relax%
\edef\tikz@temp{\the\c@pgf@counta}%
- \pgfkeyslet{/tikz/graphs/placement/chain count}\tikz@temp%
-}
+ \pgfkeyslet{/tikz/graphs/placement/chain count}\tikz@temp%
+}%
%
% Parse a group
-%
+%
\long\def\tikz@lib@graph@parse@group#1{
\let\tikz@lib@graph@group@qa\pgfutil@empty%
@@ -324,16 +324,16 @@
\let\tikz@lib@graph@group@cont\pgfutil@empty%
\let\tikz@lib@graph@group@conta\pgfutil@empty%
\tikz@lib@graph@group@check#1\par\pgf@stop@eogroup%
-}
+}%
-%
-% Start of a group
+%
+% Start of a group
%
\def\tikz@lib@graph@group@check{%
\pgfutil@ifnextchar[\tikz@lib@graph@group@opt{\tikz@lib@graph@group@opt[]}%]
-}
+}%
\def\tikz@lib@graph@group@opt[#1]{%
\let\tikz@lib@graph@parse@extras\pgfutil@empty%
@@ -344,38 +344,38 @@
@extra group options/.style=,%
#1}%
\expandafter\tikz@lib@graph@par\tikz@lib@graph@parse@extras%
-}
+}%
\tikzgraphsset{
parse/.code={\expandafter\def\expandafter\tikz@lib@graph@parse@extras\expandafter{\tikz@lib@graph@parse@extras#1}},
-}
+}%
-%
-% Remove \par
+%
+% Remove \par
%
\def\tikz@lib@graph@par{%
\pgfutil@ifnextchar\bgroup{\tikz@lib@graph@par@@}{\tikz@lib@graph@par@}%
-}
+}%
\long\def\tikz@lib@graph@par@#1\par{%
\pgfutil@ifnextchar\pgf@stop@eogroup{%
\expandafter\tikz@lib@graph@quotes\tikz@lib@graph@group@c#1"}{%
\expandafter\def\expandafter\tikz@lib@graph@group@c\expandafter{\tikz@lib@graph@group@c#1}%
\tikz@lib@graph@par%
}%
-}
+}%
\long\def\tikz@lib@graph@par@@#1{%
\expandafter\def\expandafter\tikz@lib@graph@group@c\expandafter{\tikz@lib@graph@group@c{#1}}%
\tikz@lib@graph@par
-}
+}%
-%
+%
% Replace ..."..."... by ..."{...}"...
-%
+%
\def\tikz@lib@graph@quotes{%
\pgfutil@ifnextchar\bgroup{\tikz@lib@graph@quotes@@}{\tikz@lib@graph@quotes@}%
}%
@@ -386,30 +386,30 @@
\expandafter\def\expandafter\tikz@lib@graph@group@q\expandafter{\tikz@lib@graph@group@q#1"}%
\tikz@lib@graph@quotes@cont%
}%
-}
+}%
\def\tikz@lib@graph@quotes@cont#1"#2"{%
\pgfutil@ifnextchar\pgf@stop@eogroup{%
\tikz@lib@graph@passon{{#1}"#2}}{%
\expandafter\def\expandafter\tikz@lib@graph@group@q\expandafter{\tikz@lib@graph@group@q{#1}"#2"}%
\tikz@lib@graph@quotes@cont}%
-}
+}%
\def\tikz@lib@graph@quotes@@#1{%
\expandafter\def\expandafter\tikz@lib@graph@group@q\expandafter{\tikz@lib@graph@group@q{#1}}%
\tikz@lib@graph@quotes%
-}
+}%
-%
+%
% Replace ..."..."... by ..."{...}"... (active version)
%
-{
+{%
\catcode`\"=13\relax
\gdef\tikz@lib@graph@passon#1{\expandafter\tikz@lib@graph@quotesactive\tikz@lib@graph@group@q#1"}%
-
+
\gdef\tikz@lib@graph@quotesactive{%
\pgfutil@ifnextchar\bgroup{\tikz@lib@graph@quotesactive@@}{\tikz@lib@graph@quotesactive@}%
}%
@@ -420,27 +420,27 @@
\expandafter\def\expandafter\tikz@lib@graph@group@qa\expandafter{\tikz@lib@graph@group@qa#1"}%
\tikz@lib@graph@quotesactive@cont%
}%
- }
-
+ }%
+
\gdef\tikz@lib@graph@quotesactive@cont#1"#2"{%
\pgfutil@ifnextchar\pgf@stop@eogroup{%
\expandafter\tikz@lib@graph@encloser\tikz@lib@graph@group@qa{#1}"#2[}{%
\expandafter\def\expandafter\tikz@lib@graph@group@qa\expandafter{\tikz@lib@graph@group@qa{#1}"#2"}%
\tikz@lib@graph@quotesactive@cont}%
- }
-
+ }%
+
\gdef\tikz@lib@graph@quotesactive@@#1{%
\expandafter\def\expandafter\tikz@lib@graph@group@qa\expandafter{\tikz@lib@graph@group@qa{#1}}%
\tikz@lib@graph@quotesactive%
- }
-}
+ }%
+}%
-%
+%
% Replace ...[...]... by ...[{...}]...
-%
+%
\def\tikz@lib@graph@encloser{%
\pgfutil@ifnextchar\bgroup{\tikz@lib@graph@encloser@@}{\tikz@lib@graph@encloser@}%
}%
@@ -451,45 +451,45 @@
\expandafter\def\expandafter\tikz@lib@graph@group@cont\expandafter{\tikz@lib@graph@group@cont#1[}%]
\tikz@lib@graph@encloser@cont%
}%
-}
+}%
\def\tikz@lib@graph@encloser@cont#1]#2[{%
\pgfutil@ifnextchar\pgf@stop@eogroup{%
\expandafter\tikz@lib@graph@semi\tikz@lib@graph@group@cont{#1}]#2;}{%
\expandafter\def\expandafter\tikz@lib@graph@group@cont\expandafter{\tikz@lib@graph@group@cont{#1}]#2[}%
\tikz@lib@graph@encloser@cont}%
-}
+}%
\def\tikz@lib@graph@encloser@@#1{%
\expandafter\def\expandafter\tikz@lib@graph@group@cont\expandafter{\tikz@lib@graph@group@cont{#1}}%
\tikz@lib@graph@encloser%
-}
+}%
-%
-% Replace ; by ,
+%
+% Replace ; by ,
%
\def\tikz@lib@graph@semi{%
\pgfutil@ifnextchar\bgroup{\tikz@lib@graph@semi@@}{\tikz@lib@graph@semi@}%
-}
+}%
\def\tikz@lib@graph@semi@#1;{%
\pgfutil@ifnextchar\pgf@stop@eogroup{%
\expandafter\tikz@lib@graph@main@parser\tikz@lib@graph@group@conta#1,}{%
\expandafter\def\expandafter\tikz@lib@graph@group@conta\expandafter{\tikz@lib@graph@group@conta#1,}%
\tikz@lib@graph@semi%
}%
-}
+}%
\def\tikz@lib@graph@semi@@#1{%
\expandafter\def\expandafter\tikz@lib@graph@group@conta\expandafter{\tikz@lib@graph@group@conta{#1}}%
\tikz@lib@graph@semi%
-}
+}%
-%
-% Main parse
+%
+% Main parse
%
\def\tikz@lib@graph@main@parser{%
@@ -499,23 +499,23 @@
\let\tikz@lib@graph@stored@actions\pgfutil@empty%
\let\tikz@lib@graph@node@list\pgfutil@empty% reset
\tikz@lib@graph@main@parser@start%
-}
+}%
\def\tikz@lib@graph@main@parser@start{%
\pgfutil@ifnextchar\bgroup{\tikz@lib@graph@protect@group}{\tikz@lib@graph@main@parser@cont}%
-}
+}%
\def\tikz@lib@graph@protect@group#1{% skip space
\pgfutil@ifnextchar\relax{\tikz@lib@graph@main@parser@cont{{#1}}}{\tikz@lib@graph@main@parser@cont{{#1}}}%
-}
+}%
-\def\tikz@lib@graph@main@parser@cont{\tikz@lib@graph@check@quotes\tikz@lib@graph@main@parser@cont@normal}
+\def\tikz@lib@graph@main@parser@cont{\tikz@lib@graph@check@quotes\tikz@lib@graph@main@parser@cont@normal}%
\def\tikz@lib@graph@main@parser@cont@normal#1,{%
\tikz@lib@graph@parse@one#1-\pgf@stop@eodashes%
-}
+}%
\def\tikz@lib@graph@parse@one{%
\pgfutil@ifnextchar\bgroup\tikz@lib@graph@scope\tikz@lib@graph@node%
-}
+}%
@@ -524,50 +524,50 @@
\def\tikz@lib@graph@check@quotes#1{%
\let\tikz@lib@graph@cont@quote#1%
\pgfutil@ifnextchar"{\begingroup\pgfkeys@temptoks{}\pgfutil@empty\tikz@lib@graph@quote@parser}{\tikz@lib@graph@check@quotes@active}%
-}
-{
+}%
+{%
\catcode`\"=13\relax
\gdef\tikz@lib@graph@check@quotes@active{%
\pgfutil@ifnextchar"{\begingroup\pgfkeys@temptoks{}\pgfutil@empty\tikz@lib@graph@quote@parser@active}{\tikz@lib@graph@cont@quote}%
- }
+ }%
\gdef\tikz@lib@graph@quote@parser@active"#1"{%
\pgfkeys@temptoks\expandafter{\the\pgfkeys@temptoks #1}%
\pgfutil@ifnextchar"{\pgfkeys@temptoks\expandafter{\the\pgfkeys@temptoks "}\tikz@lib@graph@quote@parser@active}{\tikz@lib@graph@quote@parser@done}%
- }
-}
+ }%
+}%
\def\tikz@lib@graph@quote@parser"#1"{%
\pgfkeys@temptoks\expandafter{\the\pgfkeys@temptoks #1}%
\pgfutil@ifnextchar"{\pgfkeys@temptoks\expandafter{\the\pgfkeys@temptoks "}\tikz@lib@graph@quote@parser}{\tikz@lib@graph@quote@parser@done}%
-}
+}%
\def\tikz@lib@graph@quote@parser@done{%
{\expandafter\scantokens\expandafter{%
\expandafter\expandafter\expandafter\tikzlibgraphactivations\expandafter\expandafter\expandafter\tikzlibgraphdoedef\expandafter{\the\pgfkeys@temptoks}%
}}%
- {\expandafter\scantokens\expandafter{\expandafter\tikzlibgraphactivationsbrace\expandafter\xdef\expandafter\tikzlibgraphreplaced\expandafter<\tikzlibgraphreplaced>\catcode`\}=2\relax}}%
+ {\expandafter\scantokens\expandafter{\expandafter\tikzlibgraphactivationsbrace\expandafter\xdef\expandafter\tikzlibgraphreplaced\expandafter<\tikzlibgraphreplaced>\catcode`\}=2\relax}}%
\edef\tikzlibgraphreplaced{\expandafter\detokenize\expandafter{\tikzlibgraphreplaced}}
\pgfutil@ifnextchar/\tikz@lib@graph@quotes@slash\tikz@lib@graph@quotes@no@slash%
-}
+}%
\def\tikz@lib@graph@quotes@no@slash{%
\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter%
\tikz@smuggle\expandafter\expandafter\expandafter{\expandafter\tikzlibgraphreplaced\expandafter/\expandafter{\the\pgfkeys@temptoks}}%
\expandafter\endgroup\expandafter\tikz@lib@graph@cont@quote\tikz@smuggle%
-}
+}%
\def\tikz@lib@graph@quotes@slash/{%
\pgfutil@ifnextchar/% Ah, double slash...
{\tikz@lib@graph@quotes@no@slash/}{\expandafter\endgroup\expandafter\tikz@lib@graph@cont@quote\tikzlibgraphreplaced/}%
-}
-\def\tikzlibgraphdoedef{\xdef\tikzlibgraphreplaced}
+}%
+\def\tikzlibgraphdoedef{\xdef\tikzlibgraphreplaced}%
\def\tikz@lib@prepare@active#1#2#3{%
{%
\catcode`#1=13\relax%
\scantokens{\gdef\tikzlibgraphactivator{\def#2{@#3@}}}%
- }
- \pgfutil@g@addto@macro\tikzlibgraphactivations{\catcode`#1=13\relax}
- \expandafter\pgfutil@g@addto@macro\expandafter\tikzlibgraphactivations\expandafter{\tikzlibgraphactivator}
-}
+ }%
+ \pgfutil@g@addto@macro\tikzlibgraphactivations{\catcode`#1=13\relax}%
+ \expandafter\pgfutil@g@addto@macro\expandafter\tikzlibgraphactivations\expandafter{\tikzlibgraphactivator}%
+}%
\let\tikzlibgraphactivations\pgfutil@empty
@@ -575,7 +575,7 @@
% Remove \outer from \+ for plain TeX
%
-\outer\def\tikz@lib@outer@test{\tabalign}
+\outer\def\tikz@lib@outer@test{\tabalign}%
\ifx\+\tikz@lib@outer@test
\def\+{\tabalign}
\fi
@@ -612,69 +612,69 @@
\tikz@lib@prepare@active{\#}{#}{NUMBER SIGN}
}
-\pgfutil@g@addto@macro\tikzlibgraphactivations{\catcode`\\=13\relax}
-{
+\pgfutil@g@addto@macro\tikzlibgraphactivations{\catcode`\\=13\relax}%
+{%
\catcode`\|=0\relax
\catcode`\\=13\relax
- |pgfutil@g@addto@macro|tikzlibgraphactivations{|def\{@REVERSE SOLIDUS@}}
-}
-{
- \gdef\tikzlibgraphscommercialat{@COMMERCIAL AT@}
- \let\g=\pgfutil@g@addto@macro
+ |pgfutil@g@addto@macro|tikzlibgraphactivations{|def\{@REVERSE SOLIDUS@}}%
+}%
+{%
+ \gdef\tikzlibgraphscommercialat{@COMMERCIAL AT@}%
+ \let\g=\pgfutil@g@addto@macro
\catcode`\@=13\relax
- \g\tikzlibgraphactivations{\catcode`\@=13\relax\let@=\tikzlibgraphscommercialat}
-}
+ \g\tikzlibgraphactivations{\catcode`\@=13\relax\let@=\tikzlibgraphscommercialat}%
+}%
\def\tikzlibgraphactivationsbrace{%
\catcode`\{=13\relax%
\catcode`\}=13\relax%
\catcode`\<=1\relax%
\catcode`\>=2\relax%
-}
-{
+}%
+{%
\catcode`\{=13\relax%
\catcode`\}=13\relax%
\catcode`\<=1\relax%
\catcode`\>=2\relax%
\pgfutil@g@addto@macro\tikzlibgraphactivationsbrace<\def{<@LEFT CURLY BRACE@>> %}
\pgfutil@g@addto@macro\tikzlibgraphactivationsbrace<\def}<@RIGHT CURLY BRACE@>> %{
->
+>%
% A normal node
% First, check for special quote syntax:
-\def\tikz@lib@graph@node{\tikz@lib@graph@check@quotes\tikz@lib@graph@node@normal}
+\def\tikz@lib@graph@node{\tikz@lib@graph@check@quotes\tikz@lib@graph@node@normal}%
\def\tikz@lib@graph@node@normal#1-{%
% Detect trailing <
\tikz@lib@graph@@node#1<\pgf@stop%
-}
+}%
\def\tikz@lib@graph@@node#1<#2\pgf@stop%
{
- %
+ %
% #1 will be a node (not a group)
- %
+ %
% Syntax: node name [options]
- %
+ %
% Grab node name
\tikz@lib@graph@grab@name#1\pgf@stop%
\tikz@lib@graph@stored@actions%
\pgfutil@ifnextchar\pgf@stop@eodashes{%
\tikz@lib@graph@graph@done%
}{%
- %
- % Now, get arrow kind
- %
- \def\pgf@test{#2}%
+ %
+ % Now, get arrow kind
+ %
+ \def\pgf@test{#2}%
\ifx\pgf@test\pgfutil@empty%
\expandafter\tikz@lib@graph@no@back@arrow%
\else%
\expandafter\tikz@lib@graph@back@arrow%
\fi%
}%
-}
+}%
\def\tikz@lib@graph@no@back@arrow{%
\pgfutil@ifnextchar>\tikz@lib@graph@forward@arrow{%
@@ -685,52 +685,52 @@
}%
}%
}%
-}
+}%
\def\tikz@lib@graph@undirected@arrow-{%
\def\tikz@lib@graph@arrow@type{--}%
\tikz@lib@graph@after@arrow%
-}
+}%
\def\tikz@lib@graph@forward@arrow>{%
\def\tikz@lib@graph@arrow@type{->}%
\tikz@lib@graph@after@arrow%
-}
+}%
\def\tikz@lib@graph@bi@arrow>{%
\def\tikz@lib@graph@arrow@type{<->}%
\tikz@lib@graph@after@arrow%
-}
+}%
\def\tikz@lib@graph@no@arrow!-{%
\def\tikz@lib@graph@arrow@type{-!-}%
\tikz@lib@graph@after@arrow%
-}
+}%
\def\tikz@lib@graph@back@arrow{%
\pgfutil@ifnextchar>{\tikz@lib@graph@bi@arrow}{%
\def\tikz@lib@graph@arrow@type{<-}%
\tikz@lib@graph@after@arrow%
}%
-}
+}%
\def\tikz@lib@graph@after@arrow{%
\pgfutil@ifnextchar[{\tikz@lib@graph@after@arrow@opt}{\tikz@lib@graph@after@arrow@opt[]}%]
-}
+}%
\def\tikz@lib@graph@after@arrow@opt[#1]{%
- %
- % Ok, first recolor
+ %
+ % Ok, first recolor
%
\tikzgraphinvokeoperator{recolor source by=source''}
\tikzgraphinvokeoperator{recolor target by=target'}
% Save action for next node
\expandafter\def\expandafter\tikz@lib@graph@stored@actions\expandafter{%
\expandafter\tikz@lib@graph@joiner\expandafter{\tikz@lib@graph@arrow@type}{#1}}%
- %
+ %
\tikzgdeventgroupcallback{descendants}%
\tikz@lib@graph@parse@one%
-}
+}%
\def\tikz@lib@graph@joiner#1#2{%
\tikzgraphinvokeoperator{recolor source by=source'}
@@ -749,35 +749,35 @@
\pgf@temp%
}%
\tikzgraphinvokeoperator{not source',not target'}
-}
+}%
\def\tikz@lib@graph@unknown@edge@option#1{%
\def\tikz@temp{/tikz/graphs/@edges styling/.append=}
\expandafter\expandafter\expandafter\pgfkeys%
\expandafter\expandafter\expandafter{\expandafter\tikz@temp\expandafter{\expandafter,\pgfkeyscurrentname={#1}}}
-}
+}%
\def\tikz@lib@graph@graph@done\pgf@stop@eodashes{%
% Get local depth and width outside
\xdef\tikz@lib@graph@chain@depth{\pgfkeysvalueof{/tikz/graphs/placement/local depth}}
\xdef\tikz@lib@graph@chain@width{\pgfkeysvalueof{/tikz/graphs/placement/local width}}
% Get node list outside...
- \expandafter%
+ \expandafter%
\endgroup%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\tikz@lib@graph@node@list%
\expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list}%
% Compute new local depth and width of group...
\tikz@lib@graph@placement@after@chain@update
- %
+ %
\pgfutil@ifnextchar\pgf@stop@eogroup%
\tikz@lib@graph@graph@group@done%
\tikz@lib@graph@main@parser%
-}
+}%
\def\tikz@lib@graph@graph@group@done\pgf@stop@eogroup{%
\pgfkeysvalueof{/tikz/graphs/@operators}%
-}
+}%
@@ -786,14 +786,14 @@
%
\def\tikz@lib@graph@grab@name{%
\pgfutil@ifnextchar\foreach\tikz@lib@graph@do@foreach\tikz@lib@graph@parse@node@text%
-}
+}%
\def\tikz@lib@graph@do@foreach\foreach#1in{%
\pgfutil@ifnextchar\bgroup{\tikz@lib@graph@do@foreach@normal{#1}}{\def\tikz@temp{#1}\tikz@lib@graph@do@foreach@macro}%
-}
+}%
\def\tikz@lib@graph@do@foreach@macro#1{%
\expandafter\expandafter\expandafter\tikz@lib@graph@do@foreach@normal\expandafter\tikz@temp\expandafter{#1}%
-}
+}%
\def\tikz@lib@graph@do@foreach@normal#1#2#3\pgf@stop{%
% Ok, we do a parse on a foreach loop.
@@ -823,13 +823,13 @@
% TODO: Need to also save hints!
\global\let\tikz@lib@graph@node@list@saved\tikz@lib@graph@node@list%
}%
- \expandafter%
+ \expandafter%
\endgroup%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\tikz@lib@graph@node@list%
- \expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list@saved}%
+ \expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list@saved}%
\expandafter\tikz@lib@graph@setup@placement\tikz@lib@graph@saved@placement%
-}
+}%
\def\tikz@lib@graph@setup@placement#1#2#3#4#5#6{%
\pgfkeyssetvalue{/tikz/graphs/placement/local depth}{#1}%
@@ -838,15 +838,15 @@
\pgfkeyssetvalue{/tikz/graphs/placement/element count}{#4}%
\pgfkeyssetvalue{/tikz/graphs/placement/width}{#5}%
\pgfkeyssetvalue{/tikz/graphs/placement/depth}{#6}%
-}
+}%
\def\tikz@lib@graph@parse@node@text#1\pgf@stop{%
- %
- % Ok, first test whether #1 contains "//"
- %
+ %
+ % Ok, first test whether #1 contains "//"
+ %
\pgfutil@in@{//}{#1 }
\ifpgfutil@in@%
- % Ok, a layout node:
+ % Ok, a layout node:
\tikz@lib@parse@layout@node#1\pgf@stop%
\else%
\tikz@lib@graph@fake@nodefalse
@@ -854,7 +854,7 @@
\def\tikz@lib@graph@empty@node@parsed{\tikzgdeventcallback{node}{}}%
\tikz@lib@parse@normal@node#1[\pgf@stop%
\fi%
-}
+}%
\newif\iftikzgraphsautonumbernodes
\newcount\tikz@lib@auto@number
@@ -865,16 +865,16 @@
\edef\tikz@lib@graph@name@only{\tikz@lib@graph@name@only\tikz@lib@auto@sep\the\tikz@lib@auto@number}%
\global\advance\tikz@lib@auto@number by1\relax%
\fi%
-}
+}%
-%
-% Parse the normal part of a node (name and, possibly, text after slash)
-%
+%
+% Parse the normal part of a node (name and, possibly, text after slash)
+%
\def\tikz@lib@parse@normal@node#1[{
- %
- % Test whether #1 contains "/" or "__"
- %
+ %
+ % Test whether #1 contains "/" or "__"
+ %
\pgfutil@in@{/}{#1}%
\ifpgfutil@in@%
\tikz@lib@parse@node@with@slash#1\pgf@stop%
@@ -888,25 +888,25 @@
\edef\tikz@lib@graph@name{\tikz@lib@graph@path\tikz@lib@graph@name@only}%
\fi%
\fi%
- \tikz@lib@graph@handle@node@cont%
-}
+ \tikz@lib@graph@handle@node@cont%
+}%
\def\tikz@lib@parse@node@with@slash#1/{
\pgfkeys@spdef\tikz@lib@graph@name@only{#1}%
\ifx\tikz@lib@graph@name@only\pgfutil@empty%
\global\advance\tikz@fig@count by1\relax
\edef\tikz@lib@graph@name@only{tikz@f@\the\tikz@fig@count}%
- \fi%
+ \fi%
\edef\tikz@lib@graph@name{\tikz@lib@graph@path\tikz@lib@graph@name@only}%
\pgfutil@ifnextchar"\tikz@lg@slash@quote{\pgfutil@ifnextchar\tikz@active@quotes@token\tikz@lg@slash@quote@active\tikz@lg@slash@cont}
-}
+}%
\def\tikz@lg@slash@quote"#1"#2\pgf@stop{%
\iftikz@handle@active@nodes%
\def\tikz@lib@graph@node@text{\scantokens{#1}}%
\else
\def\tikz@lib@graph@node@text{#1}%
\fi%
-}
+}%
{\catcode`\"=13\relax
\gdef\tikz@lg@slash@quote@active"#1"#2\pgf@stop{%
\iftikz@handle@active@nodes%
@@ -914,27 +914,27 @@
\else
\def\tikz@lib@graph@node@text{#1}%
\fi%
- }
-}
+ }%
+}%
\def\tikz@lg@slash@cont#1\pgf@stop{%
\iftikz@handle@active@nodes%
\def\tikz@lib@graph@node@text{\scantokens{#1}}%
\else
\def\tikz@lib@graph@node@text{#1}%
\fi%
-}
+}%
-\def\tikz@lib@parse@node@with@doubleunder#1__{\tikz@lib@parse@node@with@slash{#1}/}
+\def\tikz@lib@parse@node@with@doubleunder#1__{\tikz@lib@parse@node@with@slash{#1}/}%
\def\tikz@lg@find@fresh@name{%
\edef\tikz@lib@graph@name@only{\tikz@lib@graph@name@only'}%
\edef\tikz@lib@graph@name{\tikz@lib@graph@path\tikz@lib@graph@name@only}%
\tikz@lg@if@local@node{\tikz@lib@graph@name}{\tikz@lg@find@fresh@name}{}%
-}
+}%
-%
-% We have now parsed everything up to the opening "[". We continue
+%
+% We have now parsed everything up to the opening "[". We continue
%
\def\tikz@lib@graph@handle@node@cont{%
@@ -952,22 +952,22 @@
\expandafter\tikz@lib@graph@node@opt\expandafter[\expandafter]\expandafter[%
\fi%
}{\tikz@lib@graph@node@opt[}%
-}
+}%
\def\tikzgraphnodeas@default{%
\tikz@lib@graph@typesetter%
-}
+}%
\let\tikz@lib@graph@empty@node@parsed\relax%
\def\tikz@lib@graph@node@opt[#1]#2[\pgf@stop{%
\tikz@lib@graph@node@parsed{#1}%
-}
+}%
-\def\tikz@lib@graph@node@empty@done\pgf@stop{\tikz@lib@graph@empty@node@parsed}
+\def\tikz@lib@graph@node@empty@done\pgf@stop{\tikz@lib@graph@empty@node@parsed}%
-%
-% Parse a layout node
+%
+% Parse a layout node
%
\def\tikz@lib@parse@layout@node#1//{%
@@ -975,33 +975,33 @@
\let\tikz@lib@graph@node@parsed\tikz@lib@layout@node@parsed%
\let\tikz@lib@graph@empty@node@parsed\tikz@lib@graph@empty@layout@node@parsed
\tikz@lib@parse@normal@node#1[\pgf@stop%
-}
+}%
\newif\ifpgf@lib@graph@empty@layout@node
\def\tikz@lib@layout@node@parsed{%
\tikz@lib@layout@parse@rest%
-}
+}%
\def\tikz@lib@graph@empty@layout@node@parsed{%
\pgf@lib@graph@empty@layout@nodetrue
\tikz@lib@layout@parse@rest{}%
-}
+}%
\def\tikz@lib@layout@parse@rest#1{%
\def\tikz@lib@layout@node@options{#1}%
\pgfutil@ifnextchar[{\tikz@lib@layout@node@opt}{\tikz@lib@layout@node@opt[]}%}
-}
+}%
\def\tikz@lib@layout@node@parsed#1{%
\def\tikz@lib@layout@node@options{#1}%
\pgfutil@ifnextchar[{\tikz@lib@layout@node@opt}{\tikz@lib@layout@node@opt[]}%}
-}
+}%
\def\tikz@lib@layout@node@opt[#1]{%
\def\tikz@lib@layout@options{#1}%
\pgfutil@ifnextchar\bgroup{\tikz@lib@layout@start}{\tikzerror{Opening brace at beginning of sublayout expected}}%
-}
+}%
%
@@ -1029,7 +1029,7 @@
\c@pgf@counta=\tikz@temp\relax%
\advance\c@pgf@counta by1\relax%
\edef\tikz@temp{\the\c@pgf@counta}%
- \pgfkeyslet{/tikz/graphs/placement/level}\tikz@temp%
+ \pgfkeyslet{/tikz/graphs/placement/level}\tikz@temp%
\tikzgraphsset{
level/.try=\pgfkeysvalueof{/tikz/graphs/placement/level},
level \pgfkeysvalueof{/tikz/graphs/placement/level}/.try
@@ -1059,7 +1059,7 @@
/tikz/graphs/@nodes styling,%
#1}%
\pgfkeysgetvalue{/tikz/graphs/@operators}\tikz@lib@graph@op@save%
- \global\let\tikz@lib@graph@op@save\tikz@lib@graph@op@save%
+ \global\let\tikz@lib@graph@op@save\tikz@lib@graph@op@save%
}%
\else%
\node [%
@@ -1089,30 +1089,30 @@
\iftikz@lib@graph@trie\tikzgraphsset{name=\tikz@lib@graph@name@only}\fi%
\else
% The name of the node is a graph name
- \tikz@lib@graph@handle@graph{#1}%
+ \tikz@lib@graph@handle@graph{#1}%
\fi
- \fi%
-}
+ \fi%
+}%
\newif\iftikz@lib@graph@fake@node
\newif\iftikz@lib@graph@use@list
\def\tikz@lib@graph@test@use@list{%
\pgfutil@ifnextchar({\tikz@lib@graph@use@list@grap}{\tikz@lib@graph@test@use@list@done}%)
-}
+}%
-\def\tikz@lib@graph@test@use@list@done#1\pgf@stop{\tikz@lib@graph@use@listfalse}
-\def\tikz@lib@graph@use@list@grap(#1)\pgf@stop{\def\tikz@lib@graph@use@list{#1}\tikz@lib@graph@use@listtrue}
+\def\tikz@lib@graph@test@use@list@done#1\pgf@stop{\tikz@lib@graph@use@listfalse}%
+\def\tikz@lib@graph@use@list@grap(#1)\pgf@stop{\def\tikz@lib@graph@use@list{#1}\tikz@lib@graph@use@listtrue}%
-%
-% Typeset a layout node
+%
+% Typeset a layout node
%
\def\tikz@lib@layout@start#1#2\pgf@stop{%
\tikz@lib@ensure@gd@loaded%
% Parameters are:
- %
+ %
% Node name is \tikz@lib@graph@name@only
% Node text is \tikz@lib@graph@node@text
% Node options are \tikz@lib@layout@node@options
@@ -1130,8 +1130,8 @@
\fi%
\fi%
\edef\tikz@lib@graph@name{\tikz@lib@graph@path\tikz@lib@graph@name@only}%
- %
- % Prepare tikz node options
+ %
+ % Prepare tikz node options
%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\tikz@lib@layout@node@options\expandafter\expandafter\expandafter{\expandafter\tikz@lib@layout@startup@node@options\tikz@lib@layout@node@options,}%
@@ -1147,8 +1147,8 @@
\expandafter\expandafter\expandafter{%
\expandafter\tikz@lib@graph@node@text\expandafter}\expandafter{\tikz@lib@layout@node@options}
\fi%
- %
- % Here comes the scope:
+ %
+ % Here comes the scope:
%
\expandafter\expandafter\expandafter\scope\expandafter\expandafter\expandafter[\expandafter\tikz@lib@layout@node@options@prefix\tikz@lib@layout@options]
\tikzgdeventgroupcallback{array}%
@@ -1162,33 +1162,33 @@
\tikz@lib@graph@node@list%
\def\tikz@lg@old@col{\tikz@lgc@target@true}%
\tikz@lib@graph@node@list%
- \expandafter%
+ \expandafter%
\endscope\expandafter%
\endgroup%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\tikz@lib@graph@node@list%
\expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list}%
\tikz@lib@graph@hint@aftergroup%
-}
+}%
\def\tikz@lib@make@subgraph@node#1#2#3{%
\pgfgdsubgraphnode{#1}{#3}{\pgfgdsubgraphnodecontents{#2}}%
-}
+}%
\def\tikz@lib@layout@startup@node@options{%
/utils/exec=\tikzlibignorecomparisonsINTERNAL,
/tikz/graphs/.cd,%
redirect unknown to tikz,%
anchor=base,%
/tikz/every subgraph node/.try,%
-}
+}%
\def\tikzlibignorecomparisonsINTERNAL{%
\pgfkeys{/handlers/first char syntax=true}
\pgfkeyssetvalue{/handlers/first char syntax/the character >}{\pgfutil@gobble}%
\pgfkeyssetvalue{/handlers/first char syntax/the character <}{\pgfutil@gobble}%
-}
-\def\tikz@lib@layout@node@options@prefix{graphs/.cd,}
+}%
+\def\tikz@lib@layout@node@options@prefix{graphs/.cd,}%
\ifx\tikz@lib@ensure@gd@loaded\pgfutil@undefined%
-\def\tikz@lib@ensure@gd@loaded{\tikzerror{You must say \string\usetikzlibrary{graphdrawing} to use the (sub)layout syntax}}
+\def\tikz@lib@ensure@gd@loaded{\tikzerror{You must say \string\usetikzlibrary{graphdrawing} to use the (sub)layout syntax}}%
\fi
\def\tikz@lg@local@node@handle#1{%
@@ -1198,46 +1198,46 @@
\tikzgdlatenodeoptionacallback{\tikz@lib@graph@name}%
\node also[graphs/redirect unknown to tikz,/tikz/graphs/.cd,#1](\tikz@lib@graph@name);%
\pgfkeysvalueof{/tikz/graphs/@operators}%
-}
+}%
\tikzgraphsset{redirect unknown to tikz/.style={
/tikz/graphs/.unknown/.code={%
- \let\tikz@key\pgfkeyscurrentname%
+ \let\tikz@key\pgfkeyscurrentname%
\pgfkeys{tikz/.cd,\tikz@key={##1},/tikz/graphs/.cd}%
}}
-}
+}%
\def\tikz@lib@activate@source@target@edge@syntax{%
\pgfkeys{/handlers/first char syntax=true}
\pgfkeyssetvalue{/handlers/first char syntax/the character >}{\tikz@lg@parse@more}%
\pgfkeyssetvalue{/handlers/first char syntax/the character <}{\tikz@lg@parse@less}%
-}
+}%
-\def\tikz@lg@parse@less#1{\tikz@lg@parse@less@#1\pgf@stop}
-\def\tikz@lg@parse@less@<{\pgfutil@ifnextchar"{\tikz@lg@parse@quote{source}}{\tikz@lg@parse@noquote{source}}}
-\def\tikz@lg@parse@more#1{\tikz@lg@parse@more@#1\pgf@stop}
-\def\tikz@lg@parse@more@>{\pgfutil@ifnextchar"{\tikz@lg@parse@quote{target}}{\tikz@lg@parse@noquote{target}}}
+\def\tikz@lg@parse@less#1{\tikz@lg@parse@less@#1\pgf@stop}%
+\def\tikz@lg@parse@less@<{\pgfutil@ifnextchar"{\tikz@lg@parse@quote{source}}{\tikz@lg@parse@noquote{source}}}%
+\def\tikz@lg@parse@more#1{\tikz@lg@parse@more@#1\pgf@stop}%
+\def\tikz@lg@parse@more@>{\pgfutil@ifnextchar"{\tikz@lg@parse@quote{target}}{\tikz@lg@parse@noquote{target}}}%
-\def\tikz@lg@parse@noquote#1#2\pgf@stop{{\tikzgraphsset{#1 edge style={#2}}}}
+\def\tikz@lg@parse@noquote#1#2\pgf@stop{{\tikzgraphsset{#1 edge style={#2}}}}%
\def\tikz@lg@parse@quote#1#2\pgf@stop{%
{\tikzgraphsset{/tikz/node quotes mean={#1 edge node={node [every edge quotes,##2]{##1}}},/utils/exec=\tikz@enable@node@quotes,#2}}%
-}
+}%
\tikzgraphsset{
clear >/.style=target edge clear,
clear </.style=source edge clear
-}
+}%
% Positioning
-\def\tikz@lib@graph@x{0}
-\def\tikz@lib@graph@y{0}
+\def\tikz@lib@graph@x{0}%
+\def\tikz@lib@graph@y{0}%
\tikzgraphsset{
x/.code=\def\tikz@lib@graph@x{#1}\tikz@lib@graphs@check@at,
y/.code=\def\tikz@lib@graph@y{#1}\tikz@lib@graphs@check@at
-}
+}%
\def\tikz@lib@graphs@check@at{%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\tikz@temp%
@@ -1246,7 +1246,7 @@
\expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@x\expandafter}%
\expandafter,\expandafter{\tikz@lib@graph@y})}%
\pgfqkeys{/tikz}{at/.expand once=\tikz@temp}%
-}
+}%
\newif\iftikz@lib@graph@trie
@@ -1259,24 +1259,24 @@
edge quotes/.style={/tikz/every edge quotes/.style={#1}},
edge quotes center/.style={edge quotes={anchor=center}},
edge quotes mid/.style={edge quotes={anchor=mid}}
-}
+}%
\def\tikz@lg@make@edge@node#1#2{%
\def\pgf@marshal{node[#2]}%
\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@marshal\expandafter\expandafter\expandafter{\expandafter\pgf@marshal\expandafter{\tikzgraphnodetext}}%
\pgfkeysalso{#1 edge node/.expand once=\pgf@marshal,as=}%
-}
+}%
\newif\iftikz@lib@graph@fresh@node
-\tikzgraphsset{fresh nodes/.is if=tikz@lib@graph@fresh@node}
+\tikzgraphsset{fresh nodes/.is if=tikz@lib@graph@fresh@node}%
\tikzgraphsset{number nodes/.code=%
\pgfmathsetcount\tikz@lib@auto@number{#1}%
\tikzgraphsautonumbernodestrue,%
number nodes/.default=1,%
number nodes sep/.code=\def\tikz@lib@auto@sep{#1}
-}
-\def\tikz@lib@auto@sep{\space}
+}%
+\def\tikz@lib@auto@sep{\space}%
\newif\iftikz@lib@graph@node@created
@@ -1284,26 +1284,26 @@
% Is #1 the name of a node set?
\expandafter\let\expandafter\pgf@temp\csname tikz@lg@node@set #1\endcsname
\ifx\pgf@temp\relax
- \pgfutil@g@addto@macro\tikz@lg@temp{\tikz@lg@do{#1}}
+ \pgfutil@g@addto@macro\tikz@lg@temp{\tikz@lg@do{#1}}
\else%
\expandafter\pgfutil@g@addto@macro\expandafter\tikz@lg@temp\expandafter{\pgf@temp}
- \fi
-}
+ \fi
+}%
\def\tikz@lib@graph@do@use#1{%
\tikz@lg@init@color{#1}{\tikz@lgc@all@true\tikz@lgc@source@true\tikz@lgc@target@true}%
-}
+}%
\tikzgraphsset{
typeset/.store in=\tikz@lib@graph@typesetter,
math nodes/.style={/tikz/graphs/typeset=$\tikzgraphnodetext$},
empty nodes/.style={/tikz/graphs/typeset=},
typeset=\tikzgraphnodetext
-}
+}%
-%
-% Handle scope
+%
+% Handle scope
%
\def\tikz@lib@graph@scope#1{
\begingroup%
@@ -1312,7 +1312,7 @@
\tikz@lib@graph@start@hint@group%
\tikz@lib@graph@parse@group{#1}%
\tikz@lib@graph@end@hint@group%
- \expandafter%
+ \expandafter%
\endgroup%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\tikz@lib@graph@node@list%
@@ -1324,7 +1324,7 @@
\tikzerror{One of the arrow types <-, --, ->, -!-, or <-> expected}%
}%
}%
-}
+}%
\def\tikz@lib@graph@scope@minus-{
\pgfutil@ifnextchar>\tikz@lib@graph@forward@arrow{%
@@ -1337,20 +1337,20 @@
}%
}%
}%
-}
+}%
\def\tikz@lib@graph@scope@less<-{\tikz@lib@graph@back@arrow}%
-%
-% Predefining graphs
-%
+%
+% Predefining graphs
+%
\tikzgraphsset{
declare/.code 2 args={\expandafter\def\csname tikz@lib@graph@def@#1\endcsname{\tikz@lib@graph@do@graph{#2}}}%
-}
+}%
\def\tikz@lib@graph@handle@graph#1{%
\begingroup%
@@ -1359,17 +1359,17 @@
\tikz@lib@graph@start@hint@group%
\csname tikz@lib@graph@def@\tikz@lib@graph@name@only\endcsname%
\tikz@lib@graph@end@hint@group%
- \expandafter%
+ \expandafter%
\endgroup%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\tikz@lib@graph@node@list%
- \expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list}%
+ \expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list}%
\tikz@lib@graph@hint@aftergroup%
-}
+}%
\def\tikz@lib@graph@do@graph#1{%
\tikz@lib@graph@parse@group{#1}%
-}
+}%
\let\tikz@lib@graph@path\pgfutil@empty
@@ -1379,13 +1379,13 @@
name/.code={%
\edef\tikz@lib@graph@path{\tikz@lib@graph@path#1\tikz@lib@graph@name@separator}%
}%
-}
+}%
%
% Colors
-%
-\def\tikz@lg@newif{\csname newif\endcsname}
+%
+\def\tikz@lg@newif{\csname newif\endcsname}%
\tikzgraphsset{
as/.code=\def\tikzgraphnodeas{#1},%
color class/.style={%
@@ -1415,17 +1415,17 @@
color class=target,
color class=target',
color class=all
-}
+}%
\def\tikz@lg@init@color#1#2{%
\expandafter\gdef\csname tikz@lgc@#1\endcsname{#2}%
-}
+}%
\def\tikz@lib@graph@cleanup#1{%
\expandafter\global\expandafter\let\csname tikz@lgc@#1\endcsname\relax%
\ifcsname tikz@lgca@@#1\endcsname\expandafter\global\expandafter\let\csname tikz@lgca@@#1\endcsname\relax\fi%
\ifcsname tikz@lgcb@@#1\endcsname\expandafter\global\expandafter\let\csname tikz@lgcb@@#1\endcsname\relax\fi%
-}
+}%
\def\tikz@lg@colorize#1{%
\expandafter\let\expandafter\pgf@temp\csname tikz@lgc@#1\endcsname%
@@ -1434,14 +1434,14 @@
\expandafter\expandafter\expandafter{%
\expandafter\tikz@lg@col\pgf@temp}%
\expandafter\global\expandafter\let\csname tikz@lgc@#1\endcsname\pgf@temp%
-}
+}%
\def\tikz@lg@change@color#1{%
\def\tikz@lg@temp@save{#1}%
\let\tikz@lg@collect\pgfutil@empty%
\expandafter\let\expandafter\pgf@temp\csname tikz@lgc@#1\endcsname%
\expandafter\tikz@lg@change@check\pgf@temp\pgf@stop%
-}
+}%
\def\tikz@lg@change@check#1{%
\ifx#1\pgf@stop%
\tikz@lg@change@write@back%
@@ -1454,14 +1454,14 @@
\fi%
\expandafter\tikz@lg@change@check
\fi%
-}
+}%
\def\tikz@lg@change@add#1{%
\expandafter\def\expandafter\tikz@lg@collect\expandafter{\tikz@lg@collect#1}%
-}
+}%
\def\tikz@lg@change@write@back{%
\expandafter\global\expandafter\let\csname tikz@lgc@\tikz@lg@temp@save\endcsname\tikz@lg@collect%
-}
+}%
@@ -1479,25 +1479,25 @@
\fi%
}%
\iftikz@color@test#3\else#4\fi%
-}
+}%
\newif\iftikz@color@test
-\def\tikz@lg@if@local@node#1#2#3{\expandafter\ifx\csname tikz@lgc@#1\endcsname\relax#3\else#2\fi}
+\def\tikz@lg@if@local@node#1#2#3{\expandafter\ifx\csname tikz@lgc@#1\endcsname\relax#3\else#2\fi}%
-\def\tikz@lib@reset@temp{\let\pgf@temp\iffalse}
+\def\tikz@lib@reset@temp{\let\pgf@temp\iffalse}%
-%
-% Handle connection annotations
+%
+% Handle connection annotations
%
\def\tikz@lib@annotate@#1#2#3#4{%
\expandafter\ifx\csname tikz@lgc#1@@#2\endcsname\relax%
\expandafter\gdef\csname tikz@lgc#1@@#2\endcsname{{#3}{#4}}%
- \else%
+ \else%
\expandafter\expandafter\expandafter\tikz@lib@annotate@read\csname tikz@lgc#1@@#2\endcsname{#3}{#4}%
\expandafter\global\expandafter\let\csname tikz@lgc#1@@#2\endcsname\pgf@temp%
\fi%
-}
-\def\tikz@lib@annotate@read#1#2#3#4{\def\pgf@temp{{#1,#3}{#2#4}}}
+}%
+\def\tikz@lib@annotate@read#1#2#3#4{\def\pgf@temp{{#1,#3}{#2#4}}}%
\tikzgraphsset{
source edge style/.code=\tikz@lib@annotate@{a}{\tikz@lib@graph@name}{#1}{},
@@ -1525,7 +1525,7 @@
\expandafter
}\expandafter%
\def\expandafter\tikz@lib@graph@node@list\expandafter{\tikz@lg@packed}%
-}
+}%
\def\tikz@lg@packer#1{%
\expandafter\ifx\csname tikz@lg@p@#1\endcsname\pgf@stop%
@@ -1533,7 +1533,7 @@
\expandafter\let\csname tikz@lg@p@#1\endcsname\pgf@stop%
\expandafter\def\expandafter\tikz@lg@packed\expandafter{\tikz@lg@packed\tikz@lg@do{#1}}
\fi
-}
+}%
%
% Color functions
@@ -1543,11 +1543,11 @@
%
% #1 = the color name
% #2 = a macro
-%
+%
% Description:
-%
+%
% For each node having color #1, the macro #2 will be called. This
-% macro should take a single parameter, which will be set
+% macro should take a single parameter, which will be set
% to the node's name.
\def\tikzgraphforeachcolorednode#1#2{%
@@ -1555,8 +1555,8 @@
\expandafter\def\expandafter\iftikz@lib@graph@color@picker\expandafter{\csname iftikz@lgc@#1@\endcsname}%
\let\tikz@lib@graph@action#2%
\let\tikz@lg@do\tikz@lg@pick%
- \tikz@lib@graph@node@list%
-}
+ \tikz@lib@graph@node@list%
+}%
\def\tikz@lg@pick#1{
{%
\csname tikz@lgc@#1\endcsname%
@@ -1567,18 +1567,18 @@
\fi%
}%
\iftikz@color@test\tikz@lib@graph@action{#1}\fi%
-}
+}%
-% Prepare a color
+% Prepare a color
%
% #1 is the color name
% #2 is a counter
% #3 is a prefix
-%
+%
% Description:
-%
+%
% You can call this function inside a connector. It will do the
% following: First, its counts how many nodes exist that have color
% #1. This number is stored in the counter passed as #2. Furthermore,
@@ -1587,7 +1587,7 @@
% and the third red node is called foo and if #3 is "bar", then a
% macro called "\bar3" is set to "foo" as if you had said
% "\expandafter\def\csname bar3\endcsname{foo}".
-%
+%
% The bottom line of all this is that after a preparation you can
% easily iterate over nodes having a certain color. If you wish to
% iterate over a single color, it will be quicker and easier to call
@@ -1599,18 +1599,18 @@
\tikz@lib@graph@count0\relax
\def\tikz@lib@graph@prefix{#3}%
\tikzgraphforeachcolorednode{#1}\tikz@lib@graph@prepare%
-}
+}%
\def\tikz@lib@graph@prepare#1{%
\advance\tikz@lib@graph@count by1\relax%
\expandafter\def\csname\tikz@lib@graph@prefix\the\tikz@lib@graph@count\endcsname{#1}%
-}
+}%
-%
-% The bipartite connector
+%
+% The bipartite connector
%
\tikzgraphsset{
@@ -1625,21 +1625,21 @@
complete bipartite={#1}{#2}
},
induced complete bipartite/.default={target'}{source'},
-}
+}%
\def\tikz@lib@graph@bipartite@outer#1{%
\def\tikz@lib@graph@from{#1}%
{%
\tikzgraphforeachcolorednode{\tikz@lg@shoreb}\tikz@lib@graph@bipartite@inner%
}%
-}
+}%
\def\tikz@lib@graph@bipartite@inner#1{%
\def\pgf@temp{#1}%
\ifx\pgf@temp\tikz@lib@graph@from\else%
\tikz@lib@graph@default@new@edge{\tikz@lib@graph@from}{#1}%
\fi%
-}
+}%
\def\tikz@lib@graph@default@new@edge#1#2{%
\pgfkeysgetvalue{/tikz/graphs/@edges styling}\pgf@temp
@@ -1652,7 +1652,7 @@
\expandafter\expandafter\expandafter{\expandafter\pgf@temp\tikz@lib@add@temp}%
\expandafter\expandafter\expandafter\tikz@lib@graph@default@new@edge@%
\expandafter\expandafter\expandafter{\expandafter\pgf@temp\expandafter}\expandafter{\pgf@temp@b}{#1}{#2}%
-}
+}%
\def\tikz@lib@graph@default@new@edge@#1#2#3#4{%
\iftikz@lib@graph@simple%
\edef\tikz@temp{{\pgfkeysvalueof{/tikz/graphs/default edge kind}}{#3}{#4}}
@@ -1660,24 +1660,24 @@
\else%
\pgfkeys{/tikz/graphs/.cd,new \pgfkeysvalueof{/tikz/graphs/default edge kind}={#3}{#4}{#1}{#2}}%
\fi%
-}
+}%
\def\tikz@lib@graph@add@edge@annotations#1#2{%
\ifcsname tikz@lgc#1@@#2\endcsname%
\expandafter\let\expandafter\tikz@lg@temp@\csname tikz@lgc#1@@#2\endcsname%
\ifx\tikz@lg@temp@\relax\else
\expandafter\tikz@lib@graph@add@edge@annotations@\tikz@lg@temp@%
- \let\tikz@lib@add@temp\tikz@lib@final@edge@style
+ \let\tikz@lib@add@temp\tikz@lib@final@edge@style
\fi%
\fi%
-}
+}%
\def\tikz@lib@graph@add@edge@annotations@#1#2{
\expandafter\def\expandafter\pgf@temp\expandafter{\pgf@temp,#1}%
\expandafter\def\expandafter\pgf@temp@b\expandafter{\pgf@temp@b#2}%
-}
-\def\tikz@lib@final@edge@style{,after source and target edge/.try}
+}%
+\def\tikz@lib@final@edge@style{,after source and target edge/.try}%
-%
-% The clique connector
+%
+% The clique connector
%
\tikzgraphsset{
@@ -1686,7 +1686,7 @@
\tikz@lg@clique@loop%
}},
clique/.default=all
-}
+}%
\def\tikz@lg@clique@loop{%
\ifnum\c@pgf@counta=0\relax%
@@ -1696,7 +1696,7 @@
\advance\c@pgf@counta by-1\relax%
\expandafter\tikz@lg@clique@loop%
\fi%
-}
+}%
\def\tikz@lg@clique@loop@inner{%
\advance\c@pgf@countb by-1\relax%
@@ -1704,11 +1704,11 @@
\tikz@lib@graph@default@new@edge{\csname tikz@lg\the\c@pgf@countb\endcsname}{\csname tikz@lg\the\c@pgf@counta\endcsname}%
\expandafter\tikz@lg@clique@loop@inner%
\fi%
-}
+}%
-%
-% The independent set connector
+%
+% The independent set connector
%
\tikzgraphsset{
@@ -1720,7 +1720,7 @@
\pgfkeyslet{/tikz/graphs/default edge kind}\tikz@lg@default%
}},
induced independent set/.default=all
-}
+}%
\def\tikz@lg@indep@loop{%
\ifnum\c@pgf@counta=0\relax%
@@ -1730,7 +1730,7 @@
\advance\c@pgf@counta by-1\relax%
\expandafter\tikz@lg@indep@loop%
\fi%
-}
+}%
\def\tikz@lg@indep@loop@inner{%
\advance\c@pgf@countb by-1\relax%
@@ -1738,22 +1738,22 @@
\tikz@lib@graph@default@new@edge{\csname tikz@lg\the\c@pgf@counta\endcsname}{\csname tikz@lg\the\c@pgf@countb\endcsname}%
\expandafter\tikz@lg@indep@loop@inner%
\fi%
-}
+}%
-%
-% The path connector
+%
+% The path connector
%
\tikzgraphsset{
path/.style={operator={%
\let\tikz@lg@prev\relax%
\tikzgraphforeachcolorednode{#1}\tikz@lib@graph@path@do%
- }},
+ }},
path/.default=all,
induced path/.style={induced independent set={#1},path={#1}},
induced path/.default=all,
-}
+}%
\def\tikz@lib@graph@path@do#1{%
\ifx\tikz@lg@prev\relax%
@@ -1761,11 +1761,11 @@
\tikz@lib@graph@default@new@edge{\tikz@lg@prev}{#1}%
\fi
\def\tikz@lg@prev{#1}%
-}
+}%
-%
-% The cycle connector
+%
+% The cycle connector
%
\tikzgraphsset{
@@ -1781,7 +1781,7 @@
cycle/.default=all,
induced cycle/.style={induced independent set={#1},cycle={#1}},
induced cycle/.default=all,
-}
+}%
\def\tikz@lib@graph@cycle@do#1{%
\ifx\tikz@lg@prev\relax%
@@ -1791,13 +1791,13 @@
\tikz@lib@graph@default@new@edge{\tikz@lg@prev}{#1}%
\def\tikz@lg@prev{#1}%
\fi%
-}
+}%
-%
-% The matching and star connector
+%
+% The matching and star connector
%
\tikzgraphsset{
@@ -1811,7 +1811,7 @@
}%
},
matching and star/.default={target'}{source'}
-}
+}%
\def\tikz@lib@graph@flow@do#1{%
\advance\c@pgf@countb by1\relax%
@@ -1822,7 +1822,7 @@
\tikz@lib@graph@default@new@edge{\csname tikz@lg\the\c@pgf@countb\endcsname}{#1}%
\fi%
\def\tikz@lg@prev{#1}%
-}
+}%
\def\tikz@lib@graph@flow@rest{%
\ifnum\c@pgf@countb<\c@pgf@counta\relax%
@@ -1832,12 +1832,12 @@
\expandafter\tikz@lib@graph@flow@rest%
\fi%
\fi%
-}
+}%
-%
-% The matching connector
+%
+% The matching connector
%
\tikzgraphsset{
@@ -1849,7 +1849,7 @@
}%
},
matching/.default={target'}{source'}
-}
+}%
\def\tikz@lib@graph@matching@do#1{%
\advance\c@pgf@countb by1\relax%
@@ -1857,14 +1857,14 @@
\else%
\tikz@lib@graph@default@new@edge{\csname tikz@lg\the\c@pgf@countb\endcsname}{#1}%
\fi%
-}
+}%
-%
-% The butterfly connector
+%
+% The butterfly connector
%
\tikzgraphsset{
@@ -1889,7 +1889,7 @@
butterfly/to/.initial=source',
butterfly'/.style={operator={}{\tikz@butterfly@primetrue\pgfkeysalso{butterfly={#1}}}},
butterfly'/.default=,
-}
+}%
\newif\iftikz@butterfly@prime
@@ -1924,15 +1924,15 @@
\c@pgf@countc=\c@pgf@counta\relax%
\fi%
\tikz@lib@graph@default@new@edge{\csname tikz@lg\the\c@pgf@countc\endcsname}{#1}%
-}
+}%
-%
-% The no edges connector
%
-\tikzgraphsset{no edges/.style={operator=\relax}}
+% The no edges connector
+%
+\tikzgraphsset{no edges/.style={operator=\relax}}%
@@ -1949,7 +1949,7 @@
}%
},
grid/.default=all
-}
+}%
\def\tikzgraphpreparewrapafter{%
\pgfkeysgetvalue{/tikz/graphs/wrap after}\tikz@temp%
@@ -1960,7 +1960,7 @@
\else%
\edef\tikzgraphwrapafter{\tikz@temp}
\fi%
-}
+}%
\def\tikz@lg@grid@loop{%
\ifnum\c@pgf@counta=0\relax%
@@ -1982,7 +1982,7 @@
\advance\c@pgf@counta by-1\relax%
\expandafter\tikz@lg@grid@loop%
\fi%
-}
+}%
@@ -1992,32 +1992,32 @@
% It is not the job of the graph library to compute good positions for
% nodes in a graph. However, some basic support is provided for simple
% cases.
-%
+%
% The idea is at follows: Graphs are specified hierarchically. For
% instance, consider the following graph specification:
-%
+%
% graph { a, b, c -> d -> {e -> f -> g, h} -> i, j -> k }
-%
+%
% Here, we have the *group* {e->f->g,h} inside the larger graph
% specification. Each group consists of sequence of *chains* like
% e->f->g or j->k.
-%
+%
% In order to facilitate the automatic positioning of nodes, the graph
% library will provide you with information about the position of
% nodes inside their groups and chains.
-%
+%
% As a chain is being parsed, a counter stored in
% /tikz/graphs/placement/element count is available that is advanced for
-% each element in the chain.
-%
+% each element in the chain.
+%
% Additionally, a counter stored in placement/width is
% available. This "logical" width is defined recursively as follows: The
% width of a single node is computed by calling the key
% placement/logical node width, which should return a real or logical
-% width of the node passed as a parameter in the macor \pgfmathresult. The
+% width of the node passed as a parameter in the macro \pgfmathresult. The
% width of a chain is the sum of the widths of its elements. The
% width of a group is the maximum of the widths of its elements.
-%
+%
%
% Symmetrically, as a group is being constructed, a counter stored in
% placement/chain count is available that is advanced for each chain
@@ -2025,21 +2025,21 @@
% recursively as follows: For a single node, the depth is
% computed by the key placement/logical node depth. The depth
% of a group is the sum of the depths of its elements. The depth of a
-% chain is the maximum of the depth of its elements.
+% chain is the maximum of the depth of its elements.
+%
%
-%
% The above keys get updated automatically. You should setup the key
% placement/compute position such that it uses the above keys to
% compute a good position for a new node based on the above
% keys. Typically, this key should execute node={shift=(...)} to setup
% the necessary shift for a new node.
-%
+%
% The key placement/compute position should not be called
% directly. Instead, the key placement/place should be used. This key
% has two effects: First, it calls placement/compute position. Second,
% it resets the length and normal counters. It will setup a completely
% new counting of lengths and counters inside the current scope.
-%
+%
% The placmenet/place key is executed automatically whenever a new
% node is automatically created. Furthermore, placement strategies
% will call this key.
@@ -2064,20 +2064,20 @@
level/.initial=0,
logical node depth/.code=\def\pgfmathresult{1},
logical node width/.code=\def\pgfmathresult{1},
-}
+}%
\def\tikz@lib@graph@reset@locals{%
\gdef\tikz@lib@graph@group@depth{0}%
\gdef\tikz@lib@graph@group@width{0}%
-}
+}%
-% Arrange nodes evenly
-%
+% Arrange nodes evenly
+%
% This strategy works as follows: You specify a "chain shift vector"
% and a "group shift vector". Then each new element on a chain is
% shifted by the chain shift vector relative to the previous element
-% on the chain. Similarly for each new element of a group.
+% on the chain. Similarly for each new element of a group.
\tikzgraphsset{
Cartesian placement/.style={
@@ -2142,9 +2142,9 @@
placement/logical node depth/.code=\def\pgfmathresult{1}
},
branch down/.default=1,
- %
- % Sep shifts
- %
+ %
+ % Sep shifts
+ %
grow right sep/.style={
Cartesian placement,
chain shift={(1pt,0)},
@@ -2217,26 +2217,26 @@
nodes={anchor=\csname tikz@lib@graph@auto@\tikz@lib@graph@auto@h @\tikz@lib@graph@auto@v\endcsname},
/utils/exec=\def\tikz@lib@graph@auto@v{#1}
},
- %
- %
+ %
+ %
no placement/.style={
placement/place,
placement/compute position/.code=%
}
-}
+}%
-\def\tikz@lib@graph@auto@h{center}
-\def\tikz@lib@graph@auto@v{center}
+\def\tikz@lib@graph@auto@h{center}%
+\def\tikz@lib@graph@auto@v{center}%
-\def\tikz@lib@graph@auto@center@center{center}
-\def\tikz@lib@graph@auto@west@center{west}
-\def\tikz@lib@graph@auto@east@center{east}
-\def\tikz@lib@graph@auto@center@north{north}
-\def\tikz@lib@graph@auto@west@north{north west}
-\def\tikz@lib@graph@auto@east@north{north east}
-\def\tikz@lib@graph@auto@center@south{south}
-\def\tikz@lib@graph@auto@west@south{south west}
-\def\tikz@lib@graph@auto@east@south{south east}
+\def\tikz@lib@graph@auto@center@center{center}%
+\def\tikz@lib@graph@auto@west@center{west}%
+\def\tikz@lib@graph@auto@east@center{east}%
+\def\tikz@lib@graph@auto@center@north{north}%
+\def\tikz@lib@graph@auto@west@north{north west}%
+\def\tikz@lib@graph@auto@east@north{north east}%
+\def\tikz@lib@graph@auto@center@south{south}%
+\def\tikz@lib@graph@auto@west@south{south west}%
+\def\tikz@lib@graph@auto@east@south{south east}%
\def\tikz@lib@graph@linear@pos{%
\pgfkeysgetvalue{/tikz/graphs/chain shift}\tikz@temp
@@ -2251,29 +2251,29 @@
\advance\pgf@ya by\pgf@y%
\edef\tikz@lib@graph@shift{(\the\pgf@xa,\the\pgf@ya)}
\pgfkeys{/tikz/graphs/nodes/.expanded={shift={\tikz@lib@graph@shift}}}
-}
+}%
\def\tikz@lib@graph@width@sep#1#2{%
\pgf@process{\pgfpointdiff{\pgfpointanchor{#1}{west}}{\pgfpointanchor{#1}{east}}}%
\pgfmathparse{#2+\the\pgf@x}%
-}
+}%
\def\tikz@lib@graph@depth@sep#1#2{%
\pgf@process{\pgfpointdiff{\pgfpointanchor{#1}{south}}{\pgfpointanchor{#1}{north}}}%
\pgfmathparse{#2+\the\pgf@y}%
-}
+}%
-% Circular arrangements
-%
+% Circular arrangements
+%
% This strategy works a bit like the arrange evenly strategy, but in
% polar coordinates. Both for the chains and the groups you specify a
% polar shift, which must be in the form "(delta degree:delta
% distance)". For each element in a chain, the delta degree is added
% to the chain degree, likewise for each element the delta distance is
% added. Similarly for groups.
-%
+%
% There is an initial degree and radius, stored in the key "phase" and
% "radius".
@@ -2298,7 +2298,7 @@
group polar shift/.initial={(60:0)},
radius/.initial=1cm,
phase/.initial=90,
-}
+}%
\def\tikz@lib@graph@circular@pos{%
\pgfkeysgetvalue{/tikz/graphs/chain polar shift}\tikz@temp
@@ -2316,13 +2316,13 @@
\pgfmathsetmacro\tikz@temp{\the\pgf@xa+\pgfkeysvalueof{/tikz/graphs/phase}}%
\edef\tikz@lib@graph@shift{(\tikz@temp:\the\pgf@ya)}
\pgfkeys{/tikz/graphs/nodes/.expanded={shift={\tikz@lib@graph@shift}}}
-}
+}%
\def\tikz@lib@graph@decompose@polar(#1:#2){%
\pgfmathsetlength\pgf@x{#1}%
\pgfmathsetlength\pgf@y{#2}%
-}
+}%
% Grid arrangements
@@ -2332,7 +2332,7 @@
placement/place,
placement/compute position/.code=\tikz@lib@graph@grid@pos,%
},
-}
+}%
\def\tikz@lib@graph@grid@pos{%
@@ -2355,33 +2355,33 @@
\pgfkeysgetvalue{/tikz/graphs/group shift}\tikz@temp%
\expandafter\tikz@scan@one@point\expandafter\tikz@lib@graph@grid@pos@a\tikz@temp%
\pgfkeysgetvalue{/tikz/graphs/chain shift}\tikz@temp%
- \expandafter\tikz@scan@one@point\expandafter\tikz@lib@graph@grid@pos@b\tikz@temp%
+ \expandafter\tikz@scan@one@point\expandafter\tikz@lib@graph@grid@pos@b\tikz@temp%
%
% apply the shift
%
\edef\tikz@lib@graph@shift{(\the\pgf@xa,\the\pgf@ya)}
\pgfkeys{/tikz/graphs/nodes/.expanded={shift={\tikz@lib@graph@shift}}}
-}
+}%
-\def\tikz@lib@graph@grid@pos@a#1{\pgf@process{\pgfpointscale{\tikz@temp@row}{#1}}\pgf@xa=\pgf@x\relax\pgf@ya=\pgf@y\relax}
+\def\tikz@lib@graph@grid@pos@a#1{\pgf@process{\pgfpointscale{\tikz@temp@row}{#1}}\pgf@xa=\pgf@x\relax\pgf@ya=\pgf@y\relax}%
\def\tikz@lib@graph@grid@pos@b#1{\pgf@process{\pgfpointscale{\tikz@temp@col}{#1}}%
\advance\pgf@xa by\pgf@x\relax
- \advance\pgf@ya by\pgf@y\relax}
+ \advance\pgf@ya by\pgf@y\relax}%
\tikzgraphsset{
% Grids:
wrap after/.initial=0,
% Node sets:
V/.code={%
- \def\tikzgraphV{#1}
- \c@pgf@counta=0\foreach \tikz@dummy in {#1} {\global\advance\c@pgf@counta by1\relax}
+ \def\tikzgraphV{#1}%
+ \c@pgf@counta=0\foreach \tikz@dummy in {#1} {\global\advance\c@pgf@counta by1\relax}%
\edef\tikzgraphVnum{\the\c@pgf@counta}
},
V={1},
n/.style={V={1,...,#1},name shore V/.style={name=V}},
W/.code={%
- \def\tikzgraphW{#1}
- \c@pgf@counta=0\foreach \tikz@dummy in {#1} {\global\advance\c@pgf@counta by1\relax}
+ \def\tikzgraphW{#1}%
+ \c@pgf@counta=0\foreach \tikz@dummy in {#1} {\global\advance\c@pgf@counta by1\relax}%
\edef\tikzgraphWnum{\the\c@pgf@counta}
},
W={1},
@@ -2389,7 +2389,7 @@
% Shores:
name shore V/.style=,
name shore W/.style=,
-}
+}%
@@ -2439,7 +2439,7 @@
%
%
% Things that are allowed in the normal syntax, but not in the quick
-% syntax, include:
+% syntax, include:
%
% - Connecting a node and a group as in a->{b,c}.
% - Node names without quotation marks.
@@ -2464,7 +2464,7 @@
%
%
-\tikzgraphsset{quick/.is if=tikz@graph@quick}
+\tikzgraphsset{quick/.is if=tikz@graph@quick}%
\newif\iftikz@graph@quick
\def\tikz@lib@graphs@parse@quick@graph{
@@ -2475,21 +2475,21 @@
\let\tikzgraphnodepath\pgfutil@empty%
\tikz@q@outertrue%
\afterassignment\tikz@lib@graphs@quick@main\let\pgf@temp=%
-}
+}%
\newcount\tikz@qnode@count
\newif\iftikz@q@outer
\def\tikz@lib@graphs@quick@main{%
\afterassignment\tikz@lib@graphs@quick@handle\let\pgf@let@token=%
-}
+}%
\def\tikz@lib@graphs@quick@handle{%
\ifx\pgf@let@token"%
\expandafter\tikz@lib@graphs@quick@first@node%
\else%
\expandafter\tikz@lib@graphs@quick@other%
\fi%
-}
+}%
\def\tikz@lib@graphs@quick@other{%
\let\tikz@next\tikz@lib@graphs@quick@error%
\ifx\pgf@let@token\egroup%
@@ -2502,22 +2502,22 @@
\let\tikz@next\tikz@lib@graphs@quick@main%
\fi%
\fi
- \fi%
+ \fi%
\tikz@next%
-}
+}%
-\def\tikz@lib@graphs@quick@error#1{\tikzerror{Unexpected token '\string#1' in quick graph syntax}\tikz@lib@graphs@quick@main}
+\def\tikz@lib@graphs@quick@error#1{\tikzerror{Unexpected token '\string#1' in quick graph syntax}\tikz@lib@graphs@quick@main}%
\def\tikz@lib@graphs@quick@start@group{%
\pgfutil@ifnextchar[\tikz@lib@graphs@quick@start@group@{\tikzerror{Group
in quick graph syntax must start with options.}}
-}
+}%
\def\tikz@lib@graphs@quick@start@group@[#1]{%
\begingroup%
\tikz@q@outerfalse%
\tikzgraphsset{#1}%
\tikz@lib@graphs@quick@main%
-}
+}%
\def\tikz@lib@graphs@quick@end@group{%
\iftikz@q@outer%
\endgroup%
@@ -2526,27 +2526,27 @@
\ifnum\tikz@qnode@count>0\relax%
\expandafter\global\expandafter\let\csname tikz@gr@q@@\csname tikz@gr@qn@@\the\tikz@qnode@count\endcsname\endcsname\relax%
\expandafter\global\expandafter\let\csname tikz@gr@qn@@\the\tikz@qnode@count\endcsname\relax%
- \global\advance\tikz@qnode@count by-1\relax%
+ \global\advance\tikz@qnode@count by-1\relax%
\pgfutil@repeat%
\expandafter\tikz@lib@graph@main@done%
\else%
\endgroup%
- \expandafter\tikz@lib@graphs@end@group@%
- \fi%
-}
+ \expandafter\tikz@lib@graphs@end@group@%
+ \fi%
+}%
\def\tikz@lib@graphs@end@group@{%
\pgfutil@ifnextchar;{\expandafter\tikz@lib@graphs@quick@main\pgfutil@gobble}{%
\pgfutil@ifnextchar,{\expandafter\tikz@lib@graphs@quick@main\pgfutil@gobble}{%
\tikzerror{Graph groups in quick syntax must be followed by a semicolon or a comma.}%
}%
}%
-}
+}%
\def\tikz@lib@graphs@quick@first@node{%
\let\tikz@quick@prev@node\relax%
\tikz@lib@graphs@quick@node%
-}
+}%
\def\tikz@lib@graphs@quick@node#1"{%
\def\tikzgraphnodename{#1}%
@@ -2556,14 +2556,14 @@
\global\advance\tikz@lib@auto@number by1\relax%
\fi
\pgfutil@ifnextchar/\tikz@lib@graphs@quick@text\tikz@lib@graphs@quick@opt%
-}
+}%
\def\tikz@lib@graphs@quick@text/"#1"{%
\def\tikzgraphnodetext{#1}%
\tikz@lib@graphs@quick@opt%
-}
+}%
\def\tikz@lib@graphs@quick@opt{%
\pgfutil@ifnextchar[\tikz@lib@graphs@quick@withopt{\tikz@lib@graphs@quick@withopt[]}%]
-}
+}%
\def\tikz@lib@graphs@quick@withopt[#1]{%
% Test, whether node already exists
\expandafter\ifx\csname tikz@gr@q@@\tikzgraphnodename\endcsname\relax%
@@ -2583,56 +2583,56 @@
\tikzgraphnodeas%
};%
\else%
- %
+ %
% Handle late options and operators
\tikzgdlatenodeoptionacallback{\tikzgraphnodename}%
\node also[graphs/redirect unknown to tikz,/tikz/graphs/.cd,#1](\tikzgraphnodename);%
\fi%
- % Connect, if necessary
+ % Connect, if necessary
\tikz@lig@graph@quikc@make@edge@if@necessary%
\tikz@lib@graphs@quick@scan@after@node%
-}
+}%
\def\tikz@lig@graph@quikc@make@edge@if@necessary{%
\ifx\tikz@quick@prev@node\relax%
\else%
\tikz@lib@graphs@quick@make@edge%
\fi%
-}
+}%
\def\tikz@lib@graphs@quick@scan@after@node{%
\pgfutil@ifnextchar,\tikz@lib@graphs@quick@comma{%
\pgfutil@ifnextchar;\tikz@lib@graphs@quick@semi{%
\pgfutil@ifnextchar\egroup{\tikz@lib@graphs@quick@semi;}{%
\pgfutil@ifnextchar\par{\expandafter\tikz@lib@graphs@quick@scan@after@node\tikz@lib@graphs@quick@gobble@par}%
- \tikz@lib@graphs@quick@connector}}}%
-}
+ \tikz@lib@graphs@quick@connector}}}%
+}%
\long\def\tikz@lib@graphs@quick@gobble@par#1{}%
-\def\tikz@lib@graphs@quick@comma,{\tikz@lib@graphs@quick@main}
-\def\tikz@lib@graphs@quick@semi;{\tikz@lib@graphs@quick@main}
+\def\tikz@lib@graphs@quick@comma,{\tikz@lib@graphs@quick@main}%
+\def\tikz@lib@graphs@quick@semi;{\tikz@lib@graphs@quick@main}%
\def\tikz@lib@graphs@quick@connector#1#2{%
\def\tikz@lib@graphs@quick@edge@kind{#1#2}%
\pgfutil@ifnextchar>\tikz@lib@graphs@back@edge{%
\pgfutil@ifnextchar[\tikz@lib@graphs@quick@connector@handle@opt{\tikz@lib@graphs@quick@connector@handle@opt[]}%]
}%
-}
+}%
\def\tikz@lib@graphs@back@edge#1{%
\expandafter\def\expandafter\tikz@lib@graphs@quick@edge@kind\expandafter{\tikz@lib@graphs@quick@edge@kind#1}%
\pgfutil@ifnextchar[\tikz@lib@graphs@quick@connector@handle@opt{\tikz@lib@graphs@quick@connector@handle@opt[]}%]
-}
+}%
\def\tikz@lib@graphs@quick@connector@handle@opt[#1]{%
\def\tikz@lib@graphs@quick@edge@options{#1}%
\let\tikz@quick@prev@node\tikzgraphnodename%
\tikz@lib@graphs@quick@scan@after@connector%
-}
+}%
\def\tikz@lib@graphs@quick@scan@after@connector{%
\pgfutil@ifnextchar\par{\expandafter\tikz@lib@graphs@quick@scan@after@connector\tikz@lib@graphs@quick@gobble@par}{%
\pgfutil@ifnextchar"{\expandafter\tikz@lib@graphs@quick@node\pgfutil@gobble}{%
\tikzerror{Quotation marks expected after edge connector}%
}%
}%
-}
+}%
\def\tikz@lib@graphs@quick@make@edge{%
{
@@ -2640,22 +2640,22 @@
\expandafter\expandafter\expandafter\tikz@lib@graphs@quick@make@edge@for%
\expandafter\expandafter\expandafter{\expandafter\tikz@quick@prev@node\expandafter}\expandafter{\tikzgraphnodename}%
}
-}
+}%
\def\tikz@lib@graphs@quick@make@edge@styling#1{%
\tikz@enable@edge@quotes%
\tikzgraphsset{.unknown/.code=\tikz@lib@graph@unknown@edge@option{##1},#1}%
-}
+}%
\def\tikz@lib@graphs@quick@make@edge@for#1#2{%
\pgfkeysgetvalue{/tikz/graphs/@edges styling}\pgf@tempa
\pgfkeysgetvalue{/tikz/graphs/@edges node}\pgf@temp@b
\expandafter\expandafter\expandafter\tikz@lib@graphs@quick@make@edge@for@with%
\expandafter\expandafter\expandafter{\expandafter\pgf@tempa\expandafter}\expandafter{\pgf@temp@b}{#1}{#2}%
-}
+}%
\def\tikz@lib@graphs@quick@make@edge@for@with#1#2#3#4{%
\tikzgraphsset{new \tikz@lib@graphs@quick@edge@kind={#3}{#4}{#1}{#2}}%
-}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.standard.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.standard.code.tex
index a56702bcf96..bfceb3769a5 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.standard.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.standard.code.tex
@@ -8,7 +8,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.standard.code.tex,v 1.9 2012/02/27 20:00:11 tantau Exp $
+\ProvidesFileRCS{tikzlibrarygraphs.standard.code.tex}
%
@@ -43,16 +43,16 @@
},
%
% A complete bipartite graph with shores V and W.
- %
+ %
declare={subgraph K_nm}%
{
- [color class=shore V,
+ [color class=shore V,
color class=shore W,
complete bipartite={shore V}{shore W}]
subgraph I_n [name shore V, shore V] -- [no edges]
subgraph I_n [name shore W, V/.expand once=\tikzgraphW, shore W]
},
- %
+ %
% A cycle with n nodes.
%
declare={subgraph C_n}%
@@ -60,9 +60,9 @@
[cycle]
subgraph I_n
},
- %
+ %
% A path with n nodes.
- %
+ %
declare={subgraph P_n}%
{
[path]
@@ -78,8 +78,8 @@
},
%
% A random graph according to the G_{n,p} model: For each pair of
- % vertices there is an edge between them with probability p.
- %
+ % vertices there is an edge between them with probability p.
+ %
p/.initial=0.5,
declare={subgraph G_np}%
{
@@ -105,8 +105,4 @@
[parse/.expand once=\tikz@lg@temp]
}
},
-}
-
-
-
-
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex
index 50829d90f46..645191dbabf 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex
@@ -37,6 +37,9 @@
\newif\iftikzexternal@export@enabled
\tikzexternal@export@enabledtrue
+% must be numeric!
+\gdef\c@tikzexternal@version{2}
+
% This 'if' can be used as part of the public user interface.
%
% It is set by the 'remake next' key.
@@ -138,7 +141,7 @@
mode/list only/.code = {\def\tikzexternal@opmode{3}\tikzexternal@genfigurelisttrue},
mode/convert with system call/.code={%
\def\tikzexternal@opmode{4}%
- \pgfkeysalso{/tikz/external/figure list=false,/pgf/images/aux in dpth=true}% ATTENTION: this *can't* work if \label{} contains pictures!
+ \pgfkeysalso{/tikz/external/figure list=false,/pgf/images/aux in dpth=true}%
},
mode/list and make/.code = {%
\def\tikzexternal@opmode{5}%
@@ -147,6 +150,9 @@
mode=convert with system call,
force remake/.is if=tikzexternal@force@remake,
force remake/.default=true,
+ %
+ % DEPRECATED: this here will work out-of-the box (provided that
+ % 'aux in dpth' is active):
failed ref warnings for/.initial={\ref,\cite,\pageref},
export next/.is if=tikzexternalexportnext,
export/.is if=tikzexternal@export@enabled,
@@ -268,6 +274,11 @@
up to date check=md5,
}
+\expandafter\def\csname tikzexternal@driver@pgfsys-luatex.def\endcsname{%
+ \pgfkeyssetvalue{/tikz/external/system call}{%
+ lualatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"%
+ }%
+}%
\expandafter\def\csname tikzexternal@driver@pgfsys-pdftex.def\endcsname{%
\pgfutil@IfUndefined{directlua}{%
\pgfkeyssetvalue{/tikz/external/system call}{%
@@ -444,8 +455,7 @@
\tikzexternalauxlock@getlockvalue
\if1\tikzexternallocked
\pgfexternalreadmainauxfalse
- % the main .aux file won't be read. Handle \ref commands:
- \tikzexternalauxlock@handleref
+ % the main .aux file won't be read right now.
\else
\pgfexternalreadmainauxtrue
\fi
@@ -484,79 +494,10 @@
}
-% Installs a special \ref{} command such that externalized pictures
-% can use \ref and the user gets a warning if something fails.
-%
-% The special \ref handling is installed for every reference command
-% in the list '/tikz/external/failed ref warnings for' which contains
-% '\ref,\pageref,\cite'.
-%
-% For use in the aux lock handling only.
-%
-% ATTENTION: this is used if and only if *all* references are broken
-% (because the .aux file is NOT read at all)!
-\def\tikzexternalauxlock@handleref{%
- \let\pgf@external@grab@refundefinedtrue=\pgf@external@grab@refundefinedtrue@orig
- %
- \pgfkeysgetvalue{/tikz/external/failed ref warnings for}\tikzexternal@temp
- \expandafter\tikzexternalauxlock@handleref@loop\tikzexternal@temp,\@EOI,%
-}
-\def\tikzexternalauxlock@handleref@loop#1,{%
- \def\tikzexternal@temp{#1}%
- \ifx\tikzexternal@temp\pgfutil@empty
- \expandafter\tikzexternalauxlock@handleref@loop
- \else
- \ifx#1\@EOI
- \else
- {%
- % strip the leading '\'
- % this allows proper \protect ion when you write
- % \caption{...\cite{..}} and #1=\cite
- \escapechar=-1
- \xdef\pgf@temp{\string#1}%
- }%
- \expandafter\let\csname tikzexternalauxlock@handleref@orig@\pgf@temp\endcsname=#1%
- \edef#1{\noexpand\pgf@texdist@protect\noexpand\tikzexternalauxlock@handleref@repl{\pgf@temp}}%
- \expandafter\expandafter\expandafter\tikzexternalauxlock@handleref@loop
- \fi
- \fi
-}%
-\def\tikzexternalauxlock@handleref@repl#1{%
- \pgfutil@ifnextchar[{\tikzexternalauxlock@handleref@gobble@opt{#1}}{\tikzexternalauxlock@handleref@repl@{#1}}%
-}%
-% silently discard the options. We merely need to generate a warning.
-\def\tikzexternalauxlock@handleref@gobble@opt#1[#2]{%
- % there may be more than one set of options (biblatex's \cite):
- \pgfutil@ifnextchar[{\tikzexternalauxlock@handleref@gobble@opt{#1}}{\tikzexternalauxlock@handleref@repl@{#1}}%
-}%
-\def\tikzexternalauxlock@handleref@repl@#1#2{%
- \tikzifexternalizingcurrent{%
- % note that '#1' is NO control sequence! it is a protected string
- \csname tikzexternalauxlock@handleref@orig@#1\endcsname{#2}%
- \begingroup
- \def\n{\pgfexternal@hat\pgfexternal@hat J}%
- \tikzexternal@assemble@systemcall{\pgfactualjobname}{\pgf@tempa}%
- \def\space{\noexpand\space}%
- \pgfexternalstorecommand{%
- \noexpand\begingroup
- \noexpand\toks0={\pgf@tempa}%
- \noexpand\immediate\noexpand\write16{\tikzexternalauxlock@handleref@warning{#2}{\noexpand\the\noexpand\toks0}}%
- \noexpand\G@refundefinedtrue
- \noexpand\endgroup
- }%
- \endgroup
- }{%
- % ok. We are not externalizing this part of the document.
- % Throw the citation away without further notice.
- }%
+% this is a hook into pgfcoreexternal.code.tex:
+\def\pgf@external@grab@refundefinedtrue@code{%
+ \gdef\noexpand\tikzexternal@systemcall@reschedule@to@end@document{1}%
}%
-\def\tikzexternalauxlock@handleref@warning#1#2{%
- \n
- LaTeX Warning: Reference `#1' in external picture `\pgfactualjobname' could not be resolved\noexpand\on@line.\n
- This is because the \tikzexternal@realjob.aux file is not accessable in this context, you will need to issue the externalize command\n
- \space\space\space#2\n
- manually.\n%
-}
% Expands to the default image extension (it is set by
% \tikzexternalize).
@@ -884,7 +825,7 @@
\fi
}{}%
\iftikzexternal@verboseio
- \immediate\write16{Writing '#1' to '\tikzexternal@realjob.figlist'.}%
+ \pgf@typeout{Writing '#1' to '\tikzexternal@realjob.figlist'.}%
\fi
\immediate\write\tikzexternal@outfile{#1}%
\if\tikzexternal@opmode5% mode='list and make'
@@ -901,7 +842,7 @@
\expandafter\tikzexternal@tempb\expandafter{\pgf@tempa}%
\let\pgf@tempa=\pgfretval
\iftikzexternal@verboseio
- \immediate\write16{Writing '#1' to '\tikzexternal@realjob.makefile'.}%
+ \pgf@typeout{Writing '#1' to '\tikzexternal@realjob.makefile'.}%
\fi
\global\tikzexternal@file@isuptodatetrue% only check for force remake:
\tikzexternal@checkforceremake%
@@ -912,7 +853,7 @@
\def\tikzexternal@list@and@make@prepare{%
\iftikzexternal@verboseio
- \immediate\write16{Opening '\tikzexternal@realjob.makefile' for writing.}%
+ \pgf@typeout{Opening '\tikzexternal@realjob.makefile' for writing.}%
\fi
\begingroup
% this makes \tikzexternal@outmakefile global:
@@ -937,7 +878,7 @@
\immediate\write\tikzexternal@outmakefile{}%
\tikzexternal@outmakefile@pendingcommands
\pgfutil@ifundefined{AtEndDocument}{}{%
- \AtEndDocument{\immediate\write16{===== mode=`list and make': Use 'make -f \tikzexternal@realjob.makefile' to generate all images. Then, re-run (pdf)latex \tikzexternal@realjob. =====}}%
+ \AtEndDocument{\pgf@typeout{===== mode=`list and make': Use 'make -f \tikzexternal@realjob.makefile' to generate all images. Then, re-run (pdf)latex \tikzexternal@realjob. =====}}%
}%
}%
\def\tikzexternaldepext{dep}
@@ -1173,7 +1114,7 @@
\begingroup
\toks0={#1[#2]#3}%
\iftikzexternal@verbose@optimize
- \immediate\write16{The command '\the\toks0' has been optimized away. Use '/tikz/external/optimize=false' to disable this.}%
+ \pgf@typeout{The command '\the\toks0' has been optimized away. Use '/tikz/external/optimize=false' to disable this.}%
\fi
\endgroup
\begingroup
@@ -1189,7 +1130,7 @@
}%
\long\def\tikzexternal@optimize@away@latex@env@close#1{%
\iftikzexternal@verbose@optimize
- \immediate\write16{The complete contents of \string\begin{tikzexternal@optimize@away@latex@env@} up to the next \end{tikzexternal@optimize@away@latex@env@} has been optimized away because it does not contribute to the exported PDF. Use '/tikz/external/optimize=false' to disable this.}%
+ \pgf@typeout{The complete contents of \string\begin{tikzexternal@optimize@away@latex@env@} up to the next \end{tikzexternal@optimize@away@latex@env@} has been optimized away because it does not contribute to the exported PDF. Use '/tikz/external/optimize=false' to disable this.}%
\fi
\endgroup
% we still need to invoke \end{<name>} in latex because \begin{<name>}
@@ -1226,7 +1167,7 @@
}
\long\def\tikzexternal@skipfigure@@#1{%
\iftikzexternal@verbose@optimize
- \immediate\write16{A tikzpicture has been optimized away. Use '/tikz/external/optimize=false' to disable this.}%
+ \pgf@typeout{A tikzpicture has been optimized away. Use '/tikz/external/optimize=false' to disable this.}%
\fi
\tikzexternal@closeenvironments
\pgfkeysvalueof{/tikz/external/optimize away text/.@cmd}tikzpicture\pgfeov%
@@ -1285,7 +1226,7 @@
}
\def\tikzexternal@forceremake@undefined@reference@handler{%
- \immediate\write16{===== 'mode=list and make': encountered undefined reference in current picture. Adding dependency to FORCEREMAKE. Rerun make to update the picture.' ========^^J}%
+ \pgf@typeout{===== 'mode=list and make': encountered undefined reference in current picture. Adding dependency to FORCEREMAKE. Rerun make to update the picture.' ========^^J}%
\tikzpicturedependsonfile{FORCEREMAKE}%
}%
@@ -1321,11 +1262,21 @@
\fi
}%
+\def\tikzexternal@externalizefig@before@grab{%
+ \pgfutil@IfUndefined{TP@holdbox}{%
+ }{%
+ % \usepackage[absolute]{textpos}
+ % populates this box -- and would inject unwanted material into our images. Reset it:
+ \global\setbox\TP@holdbox\vbox{}%
+ }%
+}%
+
\def\tikzexternal@externalizefig@GRAB{%
- \iftikzexternal@optimize
- \ifpgf@external@grabshipout
+ \ifpgf@external@grabshipout
+ \iftikzexternal@optimize
\tikzexternal@optimize@RESTORE
\fi
+ \tikzexternal@externalizefig@before@grab
\fi
\def\tikzpicture{%
\def\tikzpicture{% make sure that nested \tikzpicture are processed normally.
@@ -1438,59 +1389,83 @@
}%
\long\def\tikzexternal@externalizefig@systemcall@@#1{%
\tikzexternal@externalizefig@systemcall@uptodatecheck{#1}%
+ \tikzexternal@assemble@systemcall{\tikzexternal@curfilename}{\pgf@tempa}%
+ \global\let\tikzexternal@cursyscall=\pgf@tempa
+ \gdef\tikzexternal@typeset@picture@on@failure{1}%
\iftikzexternal@file@isuptodate
\iftikzexternal@verboseio
- \immediate\write16{===== Image '\tikzexternal@curfilename' is up-to-date. ======}%
+ \pgf@typeout{===== Image '\tikzexternal@curfilename' is up-to-date. ======}%
\fi
\let\pgf@filename=\tikzexternal@curfilename
\else
\begingroup
% no such image. Generate it!
- \tikzexternal@assemble@systemcall{\tikzexternal@curfilename}{\pgf@tempa}%
- \iftikzexternal@verboseio
- \immediate\write16{===== 'mode=convert with system call': Invoking '\pgf@tempa' ========}%
- \fi
%
\tikzexternalauxlock@setlock1%
- \immediate\write18{\pgf@tempa}%
+ \tikzexternal@externalizefig@systemcall@call{\tikzexternal@cursyscall}%
\tikzexternalauxlock@setlock0%
- \expandafter\tikzexternal@externalizefig@systemcall@assertsuccess\expandafter{\pgf@tempa}%
+ \expandafter\tikzexternal@externalizefig@systemcall@assertsuccess\expandafter{\tikzexternal@cursyscall}%
\pgfmath@smuggleone\pgf@filename
\endgroup
\fi
\ifx\pgf@filename\pgfutil@empty
- % error recovery: something did not work! Try to load it
- % anyway. Perhaps it was just that shell-escape wasn't
- % enabled.
- \begingroup
- \toks0={%
- \tikzexternaldisable
- \pgfutil@ifundefined{scantokens}{\long\def\scantokens##1{##1}}{}%
- }%
- % FIXME : THIS WILL FAIL IF THERE IS '##' INSIDE OF '#1'!
- % for example something like /.style={#1} in the picture environment *will* fail.
- \toks1={%
- \tikzpicture#1%
- }%
- \toks2={%
- \tikzexternal@TEXDIALECT@endpicture
- \tikzexternalenable
- }%
- \xdef\tikzexternal@externalizefig@systemcall@next{%
- \the\toks0
- % try reading them again as if they were in the input file.
- \noexpand\scantokens{\the\toks1 }%
- \the\toks2
- }%
- \endgroup
+ \if1\tikzexternal@typeset@picture@on@failure
+ % error recovery: something did not work! Try to load it
+ % anyway. Perhaps it was just that shell-escape wasn't
+ % enabled.
+ \begingroup
+ \toks0={%
+ \tikzexternaldisable
+ \pgfutil@ifundefined{scantokens}{\long\def\scantokens##1{##1}}{}%
+ }%
+ % FIXME : THIS WILL FAIL IF THERE IS '##' INSIDE OF '#1'!
+ % for example something like /.style={#1} in the picture environment *will* fail.
+ \toks1={%
+ \tikzpicture
+ #1%
+ }%
+ \toks2={%
+ \tikzexternal@TEXDIALECT@endpicture
+ \tikzexternalenable
+ }%
+ \xdef\tikzexternal@externalizefig@systemcall@next{%
+ \the\toks0
+ % try reading them again as if they were in the input file.
+ \noexpand\scantokens{\the\toks1 }%
+ \the\toks2
+ }%
+ \endgroup
+ \else
+ % Ah -- this picture failed, but the failure has already
+ % been handled somehow. Do not typeset it again!
+ %
+ % A use-case is that the picture has been rescheduled for
+ % \end{document}.
+ \gdef\tikzexternal@externalizefig@systemcall@next{\tikzexternal@closeenvironments}%
+ \fi
\else
% ok, take the image!
+ \gdef\tikzexternal@systemcall@reschedule@to@end@document{0}%
\expandafter\pgfincludeexternalgraphics\expandafter{\tikzexternal@curfilename}%
+ \if1\tikzexternal@systemcall@reschedule@to@end@document
+ \pgfutil@IfUndefined{AtVeryEndDocument}{%
+ }{%
+ \pgf@typeout{===== The previous system call resulted in undefined references inside of the output file. Rescheduling it for \string\end{document}. ========}%
+ \expandafter\tikzexternal@externalizefig@systemcall@reschedule\expandafter{\tikzexternal@cursyscall}%
+ }%
+ \fi
\gdef\tikzexternal@externalizefig@systemcall@next{\tikzexternal@closeenvironments}%
\fi
\tikzexternal@externalizefig@systemcall@next
}%
+\def\tikzexternal@externalizefig@systemcall@call#1{%
+ \iftikzexternal@verboseio
+ \pgf@typeout{===== 'mode=convert with system call': Invoking '#1' ========}%
+ \fi
+ \pgfutil@shellescape{#1}%
+}%
+
% Sets \iftikzexternal@file@isuptodate to false if one of the "force
% remake" things is active.
\def\tikzexternal@checkforceremake{%
@@ -1550,7 +1525,7 @@
\def\tikzexternal@check@uptodate@ext{.md5}
\def\tikzexternal@check@uptodate@mode@warn@fallback{%
- \message{! Package tikz Warning: The key 'up to date check=md5' is impossible, there is no macro to compute MD5. Falling back to 'up to date check=diff'.}%
+ \message{Package tikz Warning: The key 'up to date check=md5' is impossible, there is no macro to compute MD5. Falling back to 'up to date check=diff'.}%
%
% warn only once:
\global\let\tikzexternal@check@uptodate@mode@warn@fallback=\relax
@@ -1609,7 +1584,7 @@
\edef\tikzexternal@lastkey@normalized{\meaning\tikzexternal@lastkey}%
\edef\tikzexternal@lastkey@new@normalized{\meaning\tikzexternal@lastkey@new}%
\iftikzexternal@verboseuptodate
- \immediate\write16{Up-to-date check of \tikzexternal@curfilename: new \tikzexternal@lastkey@new@normalized; old \tikzexternal@lastkey@normalized.^^J}%
+ \pgf@typeout{Up-to-date check of \tikzexternal@curfilename: new \tikzexternal@lastkey@new@normalized; old \tikzexternal@lastkey@normalized.^^J}%
\fi
\ifx\tikzexternal@lastkey@normalized\tikzexternal@lastkey@new@normalized
\tikzexternal@file@isuptodatetrue
@@ -1631,11 +1606,9 @@
% It returns \iftikzexternal@file@isuptodate accordingly.
% #1: the picture-content
\long\def\tikzexternal@externalizefig@systemcall@uptodatecheck#1{%
+ \tikzexternal@check@uptodate@mode{#1}%
\tikzexternal@checkforceremake
\iftikzexternal@file@isuptodate
- \tikzexternal@check@uptodate@mode{#1}%
- \fi
- \iftikzexternal@file@isuptodate
% check if there is already a file.
% In that case, use it. If that is not the case, generate it and include it afterwards.
\gdef\pgf@filename{}%
@@ -1654,14 +1627,70 @@
\xdef\pgf@tempa{\noexpand\pgf@findfile\pgfsys@imagesuffixlist:+{\tikzexternal@curfilename}}%
\pgf@tempa
\ifx\pgf@filename\pgfutil@empty%
- \tikzerror{Sorry, the system call '#1' did NOT result in a usable output file '\tikzexternal@curfilename' (expected one of \pgfsys@imagesuffixlist). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in '\tikzexternal@curfilename.log'. If you continue now, I'll try to typeset the picture}{}%
+ \tikzexternal@externalizefig@systemcall@handleexception{#1}%
\fi
}%
+\def\tikzexternal@externalizefig@systemcall@handleexception@msg#1{%
+ \tikzerror{Sorry, the system call '#1' did NOT result in a usable output file '\tikzexternal@curfilename' (expected one of \pgfsys@imagesuffixlist). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in '\tikzexternal@curfilename.log'. If you continue now, I'll try to typeset the picture}{}%
+}
+\def\tikzexternal@externalizefig@systemcall@handleexception@retry@later#1{%
+ \gdef\tikzexternal@systemcall@reschedule@to@end@document{0}%
+ \expandafter\pgfexternalreaddpth\expandafter{\tikzexternal@curfilename}%
+ \if1\tikzexternal@systemcall@reschedule@to@end@document
+ \pgfutil@IfUndefined{AtVeryEndDocument}{%
+ \tikzexternal@externalizefig@systemcall@handleexception@msg{#1}%
+ }{%
+ \pgf@typeout{===== The last system call resulted in an EMPTY output file. Maybe it is part of \string\ref. Rescheduling it for \string\end{document}. ========}%
+ \gdef\tikzexternal@typeset@picture@on@failure{0}%
+ \tikzexternal@externalizefig@systemcall@reschedule{#1}%
+ }%
+ \else
+ \tikzexternal@externalizefig@systemcall@handleexception@msg{#1}%
+ \fi
+}
+
+% reschedules the externalization of the current file to
+% \AtVeryEndDocument.
+%
+% This hook allows to execute code AFTER the main .aux file is
+% finished; it will even re-read the main aux file.
+\def\tikzexternal@externalizefig@systemcall@reschedule#1{%
+ \t@tikzexternal@tmpb={%
+ \global\let\tikzexternal@externalizefig@systemcall@handleexception=\tikzexternal@externalizefig@systemcall@handleexception@msg%
+ % ... no auxlocks!
+ \tikzexternal@externalizefig@systemcall@call{#1}%
+ \tikzexternal@externalizefig@systemcall@assertsuccess{#1}%
+ }%
+ \xdef\pgfutil@tempa{%
+ \noexpand\def\noexpand\tikzexternal@curfilename{\tikzexternal@curfilename}%
+ \the\t@tikzexternal@tmpb
+ }%
+ \expandafter\AtVeryEndDocument\expandafter{\pgfutil@tempa}%
+ \gdef\tikzexternal@has@rescheduled@something{1}%
+}%
+\let\tikzexternal@externalizefig@systemcall@handleexception=\tikzexternal@externalizefig@systemcall@handleexception@retry@later%
+
+\def\tikzexternal@has@rescheduled@something{0}%
+\pgfutil@IfUndefined{AtVeryEndDocument}{}{%
+ \AtVeryEndDocument{%
+ \if1\tikzexternal@has@rescheduled@something
+ \pgf@typeout{===== tikzexternal: \string\end{document} reached. Working on rescheduled images to resolve references... ========}%
+ \fi
+ }%
+}
% Overwrite error message of pgf.
% This happens if the generated image was empty, i.e. if there was no \shipout.
\def\pgfexternal@error@no@shipout{%
\begingroup
+ \begingroup
+ % overwrite .dpth file in order to flag the file as "need to be scheduled
+ % for \AtVeryEndDocument" :
+ \immediate\openout\pgf@plotwrite=\pgfactualjobname.dpth
+ \let\w@pgfexternal@auxout=\pgf@plotwrite
+ \pgfexternalstorecommand@isexporting{\gdef\noexpand\tikzexternal@systemcall@reschedule@to@end@document{1}}%
+ \immediate\closeout\pgf@plotwrite
+ \endgroup
\tikzexternal@assemble@systemcall{\pgfactualjobname}{\pgf@tempa}%
\toks0=\expandafter{\pgf@tempa}%
\tikzerror{Sorry, image externalization failed: the resulting image was EMPTY. I tried to externalize '\pgfactualjobname', but it seems there is no such image in the document!?
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary3d.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary3d.code.tex
index c6c998e4b6a..aee687e274b 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary3d.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary3d.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary3d.code.tex,v 1.2 2013/07/17 10:36:34 tantau Exp $
+\ProvidesFileRCS{tikzlibrary3d.code.tex}
@@ -17,64 +17,67 @@
{%
\pgfset{/tikz/cs/.cd,angle=0,radius=0,z=0,#1}%
\pgfpointcylindrical{\tikz@cs@angle}{\tikz@cs@xradius}{\tikz@cs@z}%
-}
+}%
\tikzdeclarecoordinatesystem{xyz spherical}
{%
\pgfset{/tikz/cs/.cd,angle=0,radius=0,latitude=0,longitude=0,#1}%
\pgfpointspherical{\tikz@cs@angle}{\tikz@cs@latitude}{\tikz@cs@xradius}%
-}
+}%
-\pgfset{/tikz/cs/longitude/.store in=\tikz@cs@angle}
-\pgfset{/tikz/cs/latitude/.store in=\tikz@cs@latitude}
+\pgfset{/tikz/cs/longitude/.store in=\tikz@cs@angle}%
+\pgfset{/tikz/cs/latitude/.store in=\tikz@cs@latitude}%
% Options for transforming into a plane:
-\tikzoption{plane origin}{\def\tikz@plane@origin{\tikz@scan@one@point\pgfutil@firstofone#1}}
-\tikzoption{plane x}{\def\tikz@plane@x{\tikz@scan@one@point\pgfutil@firstofone#1}}
-\tikzoption{plane y}{\def\tikz@plane@y{\tikz@scan@one@point\pgfutil@firstofone#1}}
+\tikzoption{plane origin}{\def\tikz@plane@origin{\tikz@scan@one@point\pgfutil@firstofone#1}}%
+\tikzoption{plane x}{\def\tikz@plane@x{\tikz@scan@one@point\pgfutil@firstofone#1}}%
+\tikzoption{plane y}{\def\tikz@plane@y{\tikz@scan@one@point\pgfutil@firstofone#1}}%
\let\tikz@plane@origin=\pgfpointorigin
-\def\tikz@plain@x{\pgfpointxy{1}{0}}
-\def\tikz@plain@y{\pgfpointxy{0}{1}}
+\def\tikz@plane@x{\pgfpointxy{1}{0}}%
+\def\tikz@plane@y{\pgfpointxy{0}{1}}%
\tikzoption{canvas is plane}[]{
\tikz@canvas@is@plane
-}
-\tikzoption{canvas is xy plane at z}{%
- \tikz@addtransform{\pgftransformshift{\pgfpointxyz{0}{0}{#1}}}%
-}
+}%
+\tikzoption{canvas is xy plane at z}[]{%
+ \def\tikz@plane@origin{\pgfpointxyz{0}{0}{#1}}%
+ \def\tikz@plane@x{\pgfpointxyz{1}{0}{#1}}%
+ \def\tikz@plane@y{\pgfpointxyz{0}{1}{#1}}%
+ \tikz@canvas@is@plane
+}%
\tikzoption{canvas is yx plane at z}[]{%
\def\tikz@plane@origin{\pgfpointxyz{0}{0}{#1}}%
\def\tikz@plane@x{\pgfpointxyz{0}{1}{#1}}%
\def\tikz@plane@y{\pgfpointxyz{1}{0}{#1}}%
\tikz@canvas@is@plane
-}
+}%
\tikzoption{canvas is xz plane at y}[]{%
\def\tikz@plane@origin{\pgfpointxyz{0}{#1}{0}}%
\def\tikz@plane@x{\pgfpointxyz{1}{#1}{0}}%
\def\tikz@plane@y{\pgfpointxyz{0}{#1}{1}}%
\tikz@canvas@is@plane
-}
+}%
\tikzoption{canvas is zx plane at y}[]{%
\def\tikz@plane@origin{\pgfpointxyz{0}{#1}{0}}%
\def\tikz@plane@x{\pgfpointxyz{0}{#1}{1}}%
\def\tikz@plane@y{\pgfpointxyz{1}{#1}{0}}%
\tikz@canvas@is@plane
-}
+}%
\tikzoption{canvas is yz plane at x}[]{%
\def\tikz@plane@origin{\pgfpointxyz{#1}{0}{0}}%
\def\tikz@plane@x{\pgfpointxyz{#1}{1}{0}}%
\def\tikz@plane@y{\pgfpointxyz{#1}{0}{1}}%
\tikz@canvas@is@plane
-}
+}%
\tikzoption{canvas is zy plane at x}[]{%
\def\tikz@plane@origin{\pgfpointxyz{#1}{0}{0}}%
\def\tikz@plane@x{\pgfpointxyz{#1}{0}{1}}%
\def\tikz@plane@y{\pgfpointxyz{#1}{1}{0}}%
\tikz@canvas@is@plane
-}
+}%
@@ -99,7 +102,7 @@
\noexpand\pgfsetzvec{\noexpand\pgfpoint{0cm}{0cm}}%
}}%
\pgf@marshal%
-}
+}%
+
-
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryangles.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryangles.code.tex
index 2ac3ebc7b22..364468a2eb4 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryangles.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryangles.code.tex
@@ -1,4 +1,5 @@
% Copyright 2013 by Till Tantau
+% Copyright 2018 by Kroum Tzanev
%
% This file may be distributed and/or modified
%
@@ -7,26 +8,31 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryangles.code.tex,v 1.1 2013/08/28 15:24:27 tantau Exp $
+\ProvidesFileRCS{tikzlibraryangles.code.tex}
\tikzset{
pics/angle/.style = {
setup code = \tikz@lib@angle@parse#1\pgf@stop,
background code = \tikz@lib@angle@background#1\pgf@stop,
- foreground code = \tikz@lib@angle@foreground#1\pgf@stop,
+ foreground code = \tikz@lib@angle@foreground#1\pgf@stop,
+ },
+ pics/right angle/.style = {
+ setup code = \tikz@lib@angle@parse#1\pgf@stop,
+ background code = \tikz@lib@rightangle@background#1\pgf@stop,
+ foreground code = \tikz@lib@rightangle@foreground#1\pgf@stop,
},
pics/angle/.default=A--B--C,
angle eccentricity/.initial=.6,
- angle radius/.initial=5mm
-}
+ angle radius/.initial=5mm,
+}%
\def\tikz@lib@angle@background#1--#2--#3\pgf@stop{%
\path [name prefix ..] [pic actions, draw=none] (#2.center)
-- ++(\tikz@start@angle@temp:\tikz@lib@angle@rad pt)
arc [start angle=\tikz@start@angle@temp, end
angle=\tikz@end@angle@temp, radius=\tikz@lib@angle@rad pt] -- cycle;
-}
+}%
\def\tikz@lib@angle@foreground#1--#2--#3\pgf@stop{%
\path [name prefix ..] [pic actions, fill=none, shade=none]
@@ -39,8 +45,28 @@
eccentricity}*\tikz@lib@angle@rad pt)}]#2.center)}]}
\expandafter\pgf@temp\expandafter[\tikzpictextoptions]{\tikzpictext};%
\fi
-}
+}%
+
+\def\tikz@lib@rightangle@background#1--#2--#3\pgf@stop{%
+ \path [name prefix ..] [pic actions, draw=none] (#2.center)
+ -- ++(\tikz@start@angle@temp:\tikz@lib@angle@rad pt)
+ -- ++(\tikz@end@angle@temp:\tikz@lib@angle@rad pt)
+ -- ++(\tikz@start@angle@temp:-\tikz@lib@angle@rad pt)
+ -- cycle;
+}%
+\def\tikz@lib@rightangle@foreground#1--#2--#3\pgf@stop{%
+ \path [name prefix ..] [pic actions, fill=none, shade=none]
+ ([shift={(\tikz@start@angle@temp:\tikz@lib@angle@rad pt)}]#2.center)
+ -- ++(\tikz@end@angle@temp:\tikz@lib@angle@rad pt)
+ -- ++(\tikz@start@angle@temp:-\tikz@lib@angle@rad pt);
+ \ifx\tikzpictext\relax\else%
+ \def\pgf@temp{\node()[name prefix
+ ..,at={([shift={({.5*\tikz@start@angle@temp+.5*\tikz@end@angle@temp}:\pgfkeysvalueof{/tikz/angle
+ eccentricity}*sqrt(1/2)*\tikz@lib@angle@rad pt)}]#2.center)}]}
+ \expandafter\pgf@temp\expandafter[\tikzpictextoptions]{\tikzpictext};%
+ \fi
+}%
\def\tikz@lib@angle@parse#1--#2--#3\pgf@stop{%
% Compute radius:
@@ -64,8 +90,8 @@
\pgfmathsetmacro{\tikz@end@angle@temp}{atan2(\the\pgf@yc,\the\pgf@xc)}
\ifdim\tikz@end@angle@temp pt<\tikz@start@angle@temp pt%
\pgfmathsetmacro{\tikz@start@angle@temp}{\tikz@start@angle@temp-360}%
- \fi%
-}
+ \fi%
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex
new file mode 100644
index 00000000000..f4dd1716932
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryanimations.code.tex
@@ -0,0 +1,904 @@
+% Copyright 2016 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS{tikzlibraryanimations.code.tex}
+
+\usepgfmodule{animations}%
+
+
+
+% Scope syntax extension:
+
+\def\tikz@collect@scope@anims#1{%
+ \let\tikz@scope@anims\pgfutil@empty%
+ \let\tikz@collect@command#1%
+ \tikz@collect@scope@anims@parse%
+}%
+\def\tikz@collect@scope@anims@parse{%
+ \pgfutil@ifnextchar[{\tikz@collect@scope@anims@opt}{%
+ \pgfutil@ifnextchar:{\tikz@collect@scope@anims@go}{%
+ \tikz@collect@scope@anims@done}}%]
+}%
+\def\tikz@collect@scope@anims@done{%
+ \expandafter\tikz@collect@command\expandafter[\tikz@scope@anims]%
+}%
+\def\tikz@collect@scope@anims@opt[{%]
+ \expandafter\tikz@collect@command\expandafter[\tikz@scope@anims%]
+}%
+\def\tikz@collect@scope@anims@go:#1=#2{%
+ \expandafter\def\expandafter\tikz@scope@anims\expandafter{\tikz@scope@anims animate={myself:={:{#1}={#2}}},}%
+ \tikz@collect@scope@anims@parse%
+}%
+
+
+
+
+%
+% The main keys:
+%
+
+\def\tikzanimateset{\pgfqkeys{/tikz/animate}}%
+\tikzanimateset{
+ .code={
+ \pgfkeys{/handlers/first char syntax=true}
+ \pgfkeyssetvalue{/handlers/first char syntax/the character "}{\tikz@animation@value}%
+ \def\tikz@anim@t{0}%
+ \def\tikz@anim@t@base{0}%
+ \def\tikz@anim@t@current{0}%
+ \tikzanimateset{#1}
+ },
+ scope/.code=\tikz@anim@scope{#1}{}{},
+ sync/.code=\tikz@anim@sync@scope{#1}{}{},
+ entry/.code=\tikz@anim@make@entry,
+ object/.code=\tikz@anim@set@object{#1},
+ attribute/.code=\tikz@anim@set@attr{#1},
+ id/.code=\tikz@anim@set@id{#1},
+ time/.code=\tikz@anim@set@time{#1},
+ value/.code=\tikz@anim@add{\tikz@anim@value{#1}},%
+ remember/.code=\pgfmathadd@{\tikz@anim@t}{\tikz@anim@t@base}\global\let#1\pgfmathresult,
+ resume/.code=\tikz@anim@resume{#1},
+ fork/.code={\tikz@anim@parse@time{#1}\pgfmathadd@\tikz@anim@t\tikz@anim@t@base\let\tikz@anim@t@base\pgfmathresult\def\tikz@anim@t{0}},
+ fork/.default = 0later,
+ base/.style={scope={/utils/exec=\let\tikz@animation@time\tikz@anim@base@text,#1,entry}},
+}%
+
+\tikzset{
+ make snapshot of/.code=\edef\tikz@temp{#1}\ifx\tikz@temp\pgfutil@empty\else\pgfsnapshot{#1}\fi,
+ make snapshot after/.code=\edef\tikz@temp{#1}\ifx\tikz@temp\pgfutil@empty\else\pgfsnapshotafter{#1}\fi,
+ make snapshot if necessary/.code=\ifpgfsysanimationsupported\else\pgfsnapshot{#1}\fi,
+ make snapshot if necessary/.default=0s,
+}%
+
+\def\tikz@anim@scope#1#2#3{%
+ {#2\tikzanimateset{#1}#3}%
+}%
+\def\tikz@anim@sync@scope#1#2#3{%
+ {%
+ #2%
+ \tikzanimateset{#1}%
+ #3%
+ \pgfmathadd@{\tikz@anim@t}{\tikz@anim@t@base}%
+ \expandafter%
+ }\expandafter\pgfmathsubtract@\expandafter{\pgfmathresult}{\tikz@anim@t@base}%
+ \tikz@anim@set@time{\pgfmathresult}%
+}%
+
+\def\tikz@anim@set@time#1{%
+ \tikz@anim@parse@time{#1}%
+ \let\tikz@anim@t@current\tikz@anim@t%
+ \pgfmathadd@\tikz@anim@t\tikz@anim@t@base%
+ \let\tikz@animation@time\pgfmathresult%
+}%
+
+\def\tikz@anim@value#1{%
+ \def\tikz@anim@result{#1}
+ \ifx\tikz@anim@result\pgf@special@current@text%
+ \else%
+ \ifx\tikz@animation@parser\relax%
+ \else%
+ \tikz@animation@parser{#1}%
+ \fi%
+ \fi%
+}%
+
+
+\def\tikz@anim@resume#1{%
+ \pgfparsetime{#1}%
+ \pgfmathsubtract@{\pgftimeresult}{\tikz@anim@t@base}%
+ \tikz@anim@set@time{\pgfmathresult}%
+}%
+
+
+% The object--attribute entries are of the following forms:
+%
+% objects:attributes
+% objects:attributes_id
+%
+
+\def\tikz@animation@syntax@check#1#2{%
+ \def\tikz@animation@rest{#1}%
+ \expandafter\pgfutil@in@\expandafter:\expandafter{\tikz@key}%
+ \ifpgfutil@in@%
+ \expandafter\tikz@anim@parse@colon\tikz@key\pgf@stop%
+ \else%
+ #2%
+ \fi%
+}%
+
+\def\tikz@anim@parse@colon#1:#2\pgf@stop{%
+ \expandafter\tikz@anim@sync@scope\expandafter{\tikz@animation@rest}{%
+ \tikz@anim@set@object{#1}%
+ \pgfutil@in@_{#2}%
+ \ifpgfutil@in@%
+ \tikz@anim@parse@under#2\pgf@stop%
+ \else%
+ \tikz@anim@parse@under#2_\pgf@stop%
+ \fi%
+ }{\tikz@anim@make@entry}%
+}%
+
+\def\tikz@anim@parse@under#1_#2\pgf@stop{%
+ \tikz@anim@set@attr{#1}%
+ \tikz@anim@set@id{#2}%
+}%
+
+\def\tikz@anim@set@attr#1{%
+ \pgfkeys@spdef\tikz@anim@a{#1}%
+ \ifx\tikz@anim@a\pgfutil@empty%
+ \else%
+ \let\tikz@anim@tl@attributes\tikz@anim@a%
+ \fi%
+}%
+
+\def\tikz@anim@set@id#1{%
+ \pgfkeys@spdef\tikz@anim@a{#1}%
+ \ifx\tikz@anim@a\pgfutil@empty%
+ \else%
+ \let\tikz@anim@tl@id\tikz@anim@a%
+ \fi%
+}%
+
+\def\tikz@anim@set@object#1{%
+ \pgfkeys@spdef\tikz@anim@a{#1}%
+ \ifx\tikz@anim@a\pgfutil@empty%
+ \else%
+ \let\tikz@anim@tl@objects\tikz@anim@a%
+ \fi%
+}%
+
+
+%
+% Parsing of values
+%
+
+\def\tikz@animation@value#1{%
+ \tikz@animation@value@parser#1\pgf@stop%
+}%
+
+\def\tikz@animation@value@parser"#1"{%
+ \def\tikz@animation@value@head{#1}%
+ \pgfutil@ifnextchar\pgf@stop{\tikz@animation@value@rest=}{%
+ \pgfutil@ifnextchar b\tikz@animation@value@rest@base\tikz@animation@value@rest%
+ }%
+}%
+\def\tikz@animation@value@rest=#1\pgf@stop{%
+ \tikz@anim@sync@scope{#1}{\expandafter\tikz@anim@add\expandafter{\expandafter\tikz@anim@value\expandafter{\tikz@animation@value@head}}}{\tikz@anim@make@entry}%
+}%
+
+\def\tikz@animation@value@rest@base base{%
+ \tikz@anim@sync@scope{}{/utils/exec=\let\tikz@animation@time\tikz@anim@base@text\expandafter\tikz@anim@add\expandafter{\expandafter\tikz@anim@value\expandafter{\tikz@animation@value@head}}}{\tikz@anim@make@entry}%
+ \pgfutil@ifnextchar\pgf@stop{\tikz@animation@value@rest=}{\tikz@animation@value@rest}%
+}%
+
+
+
+
+%
+% The parsers
+%
+
+\def\tikz@anim@simple@parse#1{} % nothing to do, \def\tikz@anim@result{#1} is already done
+
+\def\tikz@anim@slant@parse#1{\pgfmathsetmacro\tikz@anim@result{atan(#1)}}%
+
+\def\tikz@anim@dashpattern@parse#1{%
+ \pgfmathsetmacro\tikz@anim@dash@phase{\tikz@dashphase}%
+ \def\tikz@dashpattern{}%
+ \expandafter\tikz@scandashon\pgfutil@gobble#1o\@nil%
+ \edef\tikz@anim@result{{\tikz@dashpattern}{\tikz@anim@dash@phase pt}}%
+}%
+\def\tikz@anim@dashoffset@parse#1{%
+ \pgfmathparse{#1}%
+ \edef\tikz@anim@result{{\tikz@dashpattern}{\pgfmathresult pt}}%
+}%
+\def\tikz@anim@dash@parse#1{%
+ \tikz@anim@dash@parse@#1\pgf@stop%
+}%
+\def\tikz@anim@dash@parse@#1phase#2\pgf@stop{%
+ \pgfmathsetmacro\tikz@anim@dash@phase{#2}%
+ \def\tikz@dashpattern{}%
+ \expandafter\tikz@scandashon\pgfutil@gobble#1o\@nil%
+ \edef\tikz@anim@result{{\tikz@dashpattern}{\tikz@anim@dash@phase pt}}%
+}%
+
+\def\tikz@anim@xshift@parse#1{\pgfmathparse{#1}\edef\tikz@anim@result{\noexpand\pgfqpoint{\pgfmathresult pt}{0pt}}}%
+\def\tikz@anim@yshift@parse#1{\pgfmathparse{#1}\edef\tikz@anim@result{\noexpand\pgfqpoint{0pt}{\pgfmathresult pt}}}%
+
+\def\tikz@anim@xscale@parse#1{\pgfmathparse{#1}\edef\tikz@anim@result{\pgfmathresult,1}}%
+\def\tikz@anim@yscale@parse#1{\pgfmathparse{#1}\edef\tikz@anim@result{1,\pgfmathresult}}%
+
+\def\tikz@anim@shift@parse#1{\tikz@scan@one@point\tikz@anim@do@shift#1}%
+\def\tikz@anim@do@shift#1{\def\tikz@anim@result{#1}}%
+
+\def\tikz@anim@position@parse#1{%
+ \begingroup%
+ \let\tikz@transform=\relax%
+ \pgf@xc-\pgf@pt@x%
+ \pgf@yc-\pgf@pt@y%
+ \pgfsettransform\tikz@anim@saved@transform%
+ \tikz@scan@one@point\tikz@anim@do@position#1}%
+\def\tikz@anim@do@position#1{%
+ \pgf@process{\pgfpointtransformed{#1}}%
+ \advance\pgf@x by\pgf@xc%
+ \advance\pgf@y by\pgf@yc%
+ \xdef\tikz@anim@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
+ \endgroup%
+ \let\tikz@anim@result\tikz@anim@temp%
+}%
+
+\def\tikz@anim@view@parse#1{\tikz@anim@view@parse@#1\pgf@stop}%
+\def\tikz@anim@view@parse@{%
+ \pgfutil@ifnextchar({\tikz@scan@one@point\tikz@anim@view@parse@a}{\tikz@anim@view@node}%
+}%
+\def\tikz@anim@view@parse@a#1{%
+ \def\tikz@anim@result{{#1}}%
+ \pgfutil@ifnextchar r{\tikz@anim@view@parsed@rec}{\tikz@scan@one@point\tikz@anim@view@parse@b}%
+}%
+\def\tikz@anim@view@parsed@rec rectangle{\tikz@scan@one@point\tikz@anim@view@parse@b}%
+\def\tikz@anim@view@parse@b#1{%
+ \expandafter\def\expandafter\tikz@anim@result\expandafter{\tikz@anim@result{#1}}%
+ \pgfutil@ifnextchar\pgf@stop\pgfutil@gobble{\tikzerror{Wrong view syntax}}%
+}%
+\def\tikz@anim@view@node#1\pgf@stop{%
+ \expandafter\ifx\csname pgf@sh@ns@#1\endcsname\relax%
+ \tikzerror{Undefined node '#1'}%
+ \else%
+ % Compute a bounding box for the node:
+ {%
+ \pgf@process{\pgfpointanchor{#1}{west}}%
+ \pgf@xa\pgf@x \pgf@ya\pgf@y
+ \pgf@xb\pgf@x \pgf@yb\pgf@y
+ \pgf@process{\pgfpointanchor{#1}{north}}%
+ \ifdim\pgf@x<\pgf@xa \pgf@xa=\pgf@x\fi%
+ \ifdim\pgf@x>\pgf@xb \pgf@xb=\pgf@x\fi%
+ \ifdim\pgf@y<\pgf@ya \pgf@ya=\pgf@y\fi%
+ \ifdim\pgf@y>\pgf@yb \pgf@yb=\pgf@y\fi%
+ \pgf@process{\pgfpointanchor{#1}{south}}%
+ \ifdim\pgf@x<\pgf@xa \pgf@xa=\pgf@x\fi%
+ \ifdim\pgf@x>\pgf@xb \pgf@xb=\pgf@x\fi%
+ \ifdim\pgf@y<\pgf@ya \pgf@ya=\pgf@y\fi%
+ \ifdim\pgf@y>\pgf@yb \pgf@yb=\pgf@y\fi%
+ \pgf@process{\pgfpointanchor{#1}{east}}%
+ \ifdim\pgf@x<\pgf@xa \pgf@xa=\pgf@x\fi%
+ \ifdim\pgf@x>\pgf@xb \pgf@xb=\pgf@x\fi%
+ \ifdim\pgf@y<\pgf@ya \pgf@ya=\pgf@y\fi%
+ \ifdim\pgf@y>\pgf@yb \pgf@yb=\pgf@y\fi%
+ \xdef\tikz@anim@result{{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}{\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}}
+ }%
+ \fi%
+}%
+
+\def\tikz@anim@path@parse#1{%
+ {%
+ \setbox0=\hbox{{% protext against side effects
+ \pgfinterruptpath%
+ \expandafter\tikz@scan@next@command#1\pgf@stop%
+ \pgfsyssoftpath@getcurrentpath\tikz@anim@result%
+ \pgfprocessround{\tikz@anim@result}{\tikz@anim@result}%
+ \global\let\tikz@anim@result\tikz@anim@result%
+ \endpgfinterruptpath%
+ }}%
+ }%
+}%
+
+% The special along parser
+
+
+\def\tikz@anim@along#1#2{%
+ % Parse the path...
+ {%
+ \setbox0=\hbox{{% protect against side effects
+ \pgfinterruptpath%
+ \pgf@relevantforpicturesizefalse%
+ \iftikz@anim@is@position%
+ \let\tikz@transform=\relax%
+ \pgf@x-\pgf@pt@x%
+ \pgf@y-\pgf@pt@y%
+ \edef\tikz@anim@along@shift{\pgf@xc\the\pgf@x\pgf@yc\the\pgf@y}%
+ \pgfsettransformentries#1%
+ \else%
+ \pgftransformreset%
+ \fi
+ \tikz@scan@next@command#2\pgf@stop%
+ \pgfsyssoftpath@getcurrentpath\tikz@anim@parsed@path%
+ \pgfprocessround{\tikz@anim@parsed@path}{\tikz@anim@parsed@path}%
+ \iftikz@anim@is@position%
+ \tikz@anim@shift@path%
+ \global\let\tikz@anim@parsed@path\tikz@anim@patched@path%
+ \else%
+ \global\let\tikz@anim@parsed@path\tikz@anim@parsed@path%
+ \fi%
+ \endpgfinterruptpath%
+ }}%
+ }%
+ \pgfanimationset{along softpath/.expand once=\tikz@anim@parsed@path}%
+}%
+
+\def\tikz@anim@shift@path{%
+ \let\tikz@anim@patched@path\pgfutil@empty%
+ \tikz@anim@along@shift%
+ \expandafter\tikz@anim@shift@path@\tikz@anim@parsed@path\pgf@stop%
+}%
+\def\tikz@anim@shift@path@{%
+ \pgfutil@ifnextchar\pgf@stop\pgfutil@gobble{%
+ \pgfutil@ifnextchar\bgroup\tikz@anim@shift@path@sub\tikz@anim@shift@path@copy}%
+}%
+\def\tikz@anim@shift@path@copy#1{%
+ \expandafter\def\expandafter\tikz@anim@patched@path\expandafter{\tikz@anim@patched@path#1}%
+ \tikz@anim@shift@path@%
+}%
+\def\tikz@anim@shift@path@sub#1#2{%
+ \pgf@x#1%
+ \pgf@y#2%
+ \advance\pgf@x by\pgf@xc%
+ \advance\pgf@y by\pgf@yc%
+ \edef\tikz@temp{{\the\pgf@x}{\the\pgf@y}}%
+ \expandafter\tikz@anim@shift@path@copy\expandafter{\tikz@temp}%
+}%
+
+
+
+\def\tikz@anim@parse@origin#1{%
+ \tikz@scan@one@point\tikz@anim@parse@origin@#1\relax%
+}%
+\def\tikz@anim@parse@origin@#1{\tikz@anim@add{\pgfanimationset{origin={#1}}}}%
+
+
+% Internals
+
+\def\tikz@anim@tl@objects{}%
+\def\tikz@anim@tl@attributes{}%
+\def\tikz@anim@tl@id{default}%
+
+\let\tikz@anim@tl@exec@options\pgfutil@empty
+\let\tikz@anim@tl@early@options\pgfutil@empty
+
+\def\tikz@anim@add@early#1{\expandafter\def\expandafter\tikz@anim@tl@early@options\expandafter{\tikz@anim@tl@early@options#1}}%
+\def\tikz@anim@add@once@early#1{%
+ \global\advance\tikz@anim@once@count by1\relax%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\tikz@anim@tl@early@options%
+ \expandafter\expandafter\expandafter{\expandafter\tikz@anim@tl@early@options\expandafter\tikz@anim@exec@once\expandafter{\the\tikz@anim@once@count}{#1}}%
+}%
+\def\tikz@anim@add#1{\expandafter\def\expandafter\tikz@anim@tl@exec@options\expandafter{\tikz@anim@tl@exec@options#1}}%
+\def\tikz@anim@add@once#1{%
+ \global\advance\tikz@anim@once@count by1\relax%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\tikz@anim@tl@exec@options%
+ \expandafter\expandafter\expandafter{\expandafter\tikz@anim@tl@exec@options\expandafter\tikz@anim@exec@once\expandafter{\the\tikz@anim@once@count}{#1}}%
+}%
+\newcount\tikz@anim@once@count%
+\def\tikz@anim@exec@once#1#2{%
+ \expandafter\ifx\csname tikz@anim@once@#1\endcsname\pgf@stop%
+ \else%
+ \expandafter\let\csname tikz@anim@once@#1\endcsname\pgf@stop%
+ #2%
+ \fi%
+}%
+
+\newif\iftikz@anim@do@entry
+
+\def\tikz@anim@make@entry{%
+ \tikz@anim@do@entrytrue%
+ \ifx\tikz@anim@tl@objects\pgfutil@empty\tikz@anim@do@entryfalse\fi%
+ \ifx\tikz@anim@tl@attributes\pgfutil@empty\tikz@anim@do@entryfalse\fi%
+ \ifx\tikz@anim@tl@exec@options\pgfutil@empty\ifx\tikz@anim@tl@early@options\pgfutil@empty\tikz@anim@do@entryfalse\fi\fi%
+ \iftikz@anim@do@entry%
+ \foreach\tikz@anim@tl@object in\tikz@anim@tl@objects{%
+ \expandafter\tikzanimationattributesset\expandafter{\tikz@anim@tl@attributes}%
+ }%
+ \fi%
+}%
+
+\def\tikzanimationattributesset#1{\pgfqkeys{/tikz/animate/attributes}{#1}}%
+
+\tikzanimationattributesset{
+ .unknown/.code={
+ \let\tikz@anim@attribute@name\pgfkeyscurrentname
+ \expandafter\let\expandafter\pgf@temp\csname tikz@anim@def@pgf@attr@\tikz@anim@attribute@name\endcsname%
+ \ifx\pgf@temp\relax%
+ \tikzerror{Unknown animation attribute '\tikz@anim@attribute@name'}%
+ \else%
+ \expandafter\tikz@timeline@config\expandafter\tikz@anim@tl@object\expandafter\tikz@anim@attribute@name\expandafter\tikz@anim@tl@id\expandafter{\tikz@anim@configs}%
+ \edef\pgf@marshal{\noexpand\tikz@timeline@entry{\tikz@anim@tl@object}{\tikz@anim@attribute@name}{\tikz@anim@tl@id}}%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@marshal\expandafter\expandafter\expandafter{\expandafter\pgf@marshal\expandafter{\tikz@anim@tl@early@options}}%
+ \expandafter\expandafter\expandafter\pgf@marshal\expandafter\expandafter\expandafter{\expandafter\expandafter\expandafter\tikz@anim@entry\expandafter\expandafter\expandafter{\expandafter\tikz@anim@tl@exec@options\expandafter\def\expandafter\tikz@animation@time\expandafter{\tikz@animation@time}}}%
+ \fi%
+ }
+}%
+\let\tikz@anim@configs\pgfutil@empty
+
+\def\tikz@anim@entry#1{%
+ % Reset splines and value:
+ \let\tikz@anim@result\pgfutil@empty%
+ \pgf@anim@reset@linear%
+ #1%
+ \ifx\tikz@anim@result\pgfutil@empty%
+ \else%
+ \ifx\tikz@animation@time\pgfutil@empty%
+ \else%
+ \ifx\tikz@animation@time\tikz@anim@base@text%
+ \expandafter\pgf@anim@base\expandafter{\tikz@anim@result}%
+ \else%
+ \expandafter\expandafter\expandafter\pgf@anim@entry%
+ \expandafter\expandafter\expandafter{\expandafter\tikz@animation@time\expandafter}\expandafter{\tikz@anim@result}%
+ \fi%
+ \fi%
+ \fi%
+}%
+\let\tikz@animation@time\pgfutil@empty%
+\def\tikz@anim@base@text{base}%
+
+\tikzanimateset{
+ .unknown/.code={%
+ \let\tikz@key\pgfkeyscurrentname%
+ \tikz@animation@syntax@check{#1}{\tikz@anim@options{#1}}%
+ }
+}%
+
+
+\def\tikz@anim@options#1{
+ \let\tikz@anim@key\pgfkeyscurrentname%
+ \pgfqkeys{/tikz/animate/options}{\tikz@anim@key/.try={#1}}%
+ \ifpgfkeyssuccess%
+ \else%
+ \def\tikz@anim@unparsed@value{#1}%
+ \expandafter\tikz@anim@time@test\tikz@anim@key\pgf@stop%
+ \fi%
+}%
+
+\tikzanimateset{
+ options/.cd,
+ name/.code=\tikz@anim@add{\pgfanimationset{name={#1}}},
+ forever/.code=\tikz@anim@add{\pgfanimationset{freeze at end}},
+ freeze/.code=\tikz@anim@add{\pgfanimationset{freeze at end}},
+ restart/.code=\tikz@anim@add{\pgfanimationset{restart={#1}}},
+ repeats/.code=\tikz@anim@add{\pgfanimationset{repeats={#1}}},
+ repeats/.default=,
+ repeat/.code=\tikz@anim@add{\pgfanimationset{repeats={#1}}},
+ repeat/.default=,
+ begin/.code=\tikz@anim@add@once{\pgfanimationset{begin={#1}}},
+ end/.code=\tikz@anim@add@once{\pgfanimationset{end={#1}}},
+ begin on/.code=\tikz@anim@event{begin}{#1},
+ end on/.code=\tikz@anim@event{begin}{#1},
+ begin snapshot/.code=\tikz@anim@add{\pgfanimationset{begin snapshot={#1}}},
+ origin/.code=\tikz@anim@parse@origin{#1},
+ transform/.code=\tikz@anim@add{\pgfanimationset{transform={\let\tikz@transform\relax\tikzset{#1}}}},
+ along/.code=\tikz@anim@handle@along#1\pgf@stop,
+ entry control/.code=\tikz@anim@add{\pgfanimationset{entry control=#1}},
+ exit control/.code=\tikz@anim@add{\pgfanimationset{exit control=#1}},
+ stay/.code=\tikz@anim@add{\pgfanimationset{stay}},
+ jump/.code=\tikz@anim@add{\pgfanimationset{jump}},
+ ease/.style={
+ entry control={1-(#1)}{1},
+ exit control={#1}{0}
+ },
+ ease/.default=0.5,
+ ease in/.style={
+ entry control={1-(#1)}{1},
+ },
+ ease in/.default=0.5,
+ ease out/.style={
+ exit control={#1}{0},
+ },
+ ease out/.default=0.5,
+ arrows/.code=\tikz@anim@add@early{\pgfanimationset{arrows={#1}}},
+ shorten >/.code=\tikz@anim@add@early{\pgfanimationset{shorten >={#1}}},
+ shorten </.code=\tikz@anim@add@early{\pgfanimationset{snorten <={#1}}},
+}%
+\newif\iftikz@anim@along
+
+\def\tikz@anim@t{0}%
+
+\def\tikz@anim@handle@along#1{%
+ \pgfutil@ifnextchar s{\tikz@anim@handle@sloped{#1}}{\tikz@anim@handle@upright{#1}}%
+}%
+\def\tikz@anim@handle@sloped#1sloped{%
+ \pgfgettransform\tikz@anim@trans@pre%
+ \expandafter\tikz@anim@add@once%
+ \expandafter{%
+ \expandafter\tikz@anim@along\expandafter{\tikz@anim@trans@pre}{#1}%
+ \pgfsysanimkeycanvastransform{%
+ \pgf@xc\pgf@pt@x%
+ \pgf@yc\pgf@pt@y%
+ \pgftransformreset%
+ \pgf@pt@x\pgf@xc%
+ \pgf@pt@y\pgf@yc%
+ {\pgflowlevelsynccm}%
+ }{\pgftransforminvert\pgflowlevelsynccm}%
+ \pgfanimationset{rotate along=true}%
+ }%
+ \def\tikz@anim@configs{\tikz@anim@alongtrue}%
+ \tikz@anim@handle@in%
+}%
+\def\tikz@anim@handle@upright#1upright{%
+ \pgfgettransform\tikz@anim@trans@pre%
+ \expandafter\tikz@anim@add@once%
+ \expandafter{%
+ \expandafter\tikz@anim@along\expandafter{\tikz@anim@trans@pre}{#1}%
+ \pgfsysanimkeycanvastransform{}{}%
+ }%
+ \def\tikz@anim@configs{\tikz@anim@alongtrue}%
+ \tikz@anim@handle@in%
+}%
+\def\tikz@anim@handle@in{%
+ \pgfutil@ifnextchar i{\tikz@anim@handle@in@yes}{\tikz@anim@handle@in@no}%
+}%
+\def\tikz@anim@handle@in@no\pgf@stop{}%
+\def\tikz@anim@handle@in@yes in#1\pgf@stop{%
+ \tikzanimateset{scope={time=0,value=0,entry,time=#1,value=1,entry}}%
+}%
+
+
+
+\def\tikz@anim@event#1#2{%
+ {%
+ % evaluate #2 once to determine the id now
+ \let\pgf@anim@id\pgfutil@empty%
+ \pgfqkeys{/pgf/animation/events}{#2}%
+ \expandafter}%
+ \expandafter\def\expandafter\tikz@anim@temp@id\expandafter{\pgf@anim@id}%
+ \ifx\tikz@anim@temp@id\pgfutil@empty%
+ \def\tikz@temp{#1 on={of id=\tikz@anim@current@id,#2}}%
+ \else
+ \expandafter\tikz@anim@event@setter\expandafter{\tikz@anim@temp@id}{#1}{#2}%
+ \fi%
+ \expandafter\tikz@anim@add@once\expandafter{\expandafter\pgfanimationset\expandafter{\tikz@temp}}%
+}%
+\def\tikz@anim@event@setter#1#2#3{%
+ \def\tikz@temp{#2 on={#3,of id=#1}}%
+}%
+
+\def\tikz@anim@time@test#1#2\pgf@stop{%
+ \edef\tikz@temp{\meaning#1}%
+ \expandafter\ifx\csname tikz@anim@test@\tikz@temp\endcsname\relax%
+ \tikzerror{I do not know the timing key '#1#2' to which you passed '\tikz@anim@unparsed@value'}%
+ \else%
+ \expandafter\tikz@anim@sync@scope\expandafter{\tikz@anim@unparsed@value}{\tikz@anim@set@time{#1#2}}{\tikz@anim@make@entry}%
+ \fi%
+}%
+
+\def\tikz@anim@parse@time#1{%
+ \pgfutil@in@{later\pgf@stop}{#1\pgf@stop}%
+ \ifpgfutil@in@%
+ \tikz@anim@parse@later#1\pgf@stop%
+ \else%
+ \pgfparsetime{#1}\let\tikz@anim@t\pgftimeresult%
+ \fi%
+}%
+\def\tikz@anim@parse@later#1later\pgf@stop{%
+ \pgfparsetime{#1+\tikz@anim@t@current}\let\tikz@anim@t\pgftimeresult%
+}%
+
+\expandafter\let\csname tikz@anim@test@the character 0\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character 1\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character 2\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character 3\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character 4\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character 5\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character 6\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character 7\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character 8\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character 9\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character -\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character +\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character .\endcsname\pgfutil@empty
+\expandafter\let\csname tikz@anim@test@the character (\endcsname\pgfutil@empty
+
+
+
+
+
+% Configure an animation attribute
+%
+% #1 = tikz attribute name
+% #2 = configuration
+%
+% Description:
+%
+% Sets up internals for the tikz attribute.
+
+\def\tikzanimationdefineattribute#1#2{%
+ \expandafter\def\csname tikz@anim@def@pgf@attr@#1\endcsname{#1}%
+ \expandafter\let\csname tikz@anim@def@no@node@#1\endcsname\pgfutil@empty
+ \expandafter\let\csname tikz@anim@def@is@node@#1\endcsname\pgfutil@empty
+ \expandafter\let\csname tikz@anim@def@code@#1\endcsname\pgfutil@empty
+ \expandafter\let\csname tikz@anim@def@parser@#1\endcsname\tikz@anim@simple@parse
+ \def\tikz@anim@attr{#1}%
+ \pgfkeys{/tikz/animate/@attrdef/.cd,#2}%
+}%
+
+\pgfkeys{/tikz/animate/@attrdef/.cd,
+ pgf attribute name/.code=\expandafter\def\csname tikz@anim@def@pgf@attr@\tikz@anim@attr\endcsname{#1},
+ pgf attribute name scope/.code=\expandafter\def\csname tikz@anim@def@pgf@attr@@scope@\tikz@anim@attr\endcsname{#1},
+ pgf attribute name node/.code=\expandafter\def\csname tikz@anim@def@pgf@attr@@node@\tikz@anim@attr\endcsname{#1},
+ scope type/.code=\expandafter\def\csname tikz@anim@def@no@node@\tikz@anim@attr\endcsname{#1},
+ node type/.code=\expandafter\def\csname tikz@anim@def@is@node@\tikz@anim@attr\endcsname{#1},
+ code/.code=\expandafter\def\csname tikz@anim@def@code@\tikz@anim@attr\endcsname{#1},
+ setup/.code=\expandafter\def\csname tikz@anim@def@setup@\tikz@anim@attr\endcsname{#1},
+ parser/.code=\expandafter\def\csname tikz@anim@def@parser@\tikz@anim@attr\endcsname{#1},
+}%
+
+
+% Configure an animation attribute list
+%
+% #1 = tikz attribute list name
+% #2 = list of tikz attributes
+%
+% Description:
+%
+% Sets up internals for the tikz attribute.
+
+\def\tikzanimationdefineattributelist#1#2{%
+ \tikzanimationattributesset{#1/.style={#2}}%
+}%
+
+
+
+
+% Definition of the tikz attributes
+
+
+\tikzanimationdefineattributelist{color}{@color,text}%
+\tikzanimationdefineattribute{@color}{pgf attribute name=color,node type=.background}%
+\tikzanimationdefineattribute{dash pattern}{pgf attribute name=dash,parser=dashpattern, node type=.background}%
+\tikzanimationdefineattribute{dash phase}{pgf attribute name=dash,parser=dashoffset, node type=.background}%
+\tikzanimationdefineattribute{dash}{parser=dash, node type=.background}%
+\tikzanimationdefineattribute{draw opacity}{pgf attribute name=stroke opacity}%
+\tikzanimationdefineattribute{draw}{pgf attribute name=stroke, node type=.background}%
+\tikzanimationdefineattribute{fill opacity}{}%
+\tikzanimationdefineattribute{fill}{node type=.background}%
+\tikzanimationdefineattribute{line width}{node type=.background}%
+\tikzanimationdefineattribute{path}{pgf attribute name=softpath, scope type=.path, node type=.background.path, parser=path}%
+\tikzanimationdefineattribute{opacity}{}%
+\tikzanimationdefineattribute{position}{%
+ pgf attribute name=\iftikz@anim@along motion\else translate\fi,
+ parser=\iftikz@anim@along simple\else position\fi,
+ setup=\tikz@anim@position@setup,
+}%
+\tikzanimationdefineattribute{rotate}{}%
+\tikzanimationdefineattribute{scale}{}%
+\tikzanimationdefineattribute{shift}{
+ pgf attribute name=\iftikz@anim@along motion\else translate\fi,
+ parser=\iftikz@anim@along simple\else shift\fi
+}%
+\tikzanimationdefineattribute{stage}{}%
+\tikzanimationdefineattribute{text opacity}{pgf attribute name=fill opacity, node type=.text, pgf attribute name scope=none}%
+\tikzanimationdefineattribute{text}{pgf attribute name=color, node type=.text, pgf attribute name scope=none}%
+\tikzanimationdefineattribute{view}{scope type=.view, parser=view}%
+\tikzanimationdefineattribute{visible}{}%
+\tikzanimationdefineattribute{xshift}{pgf attribute name=translate, parser=xshift}%
+\tikzanimationdefineattribute{xscale}{pgf attribute name=scale, parser=xscale}%
+\tikzanimationdefineattribute{xskew}{}%
+\tikzanimationdefineattribute{xslant}{pgf attribute name=xskew, parser=slant}%
+\tikzanimationdefineattribute{yshift}{pgf attribute name=translate, parser=yshift}%
+\tikzanimationdefineattribute{yskew}{}%
+\tikzanimationdefineattribute{yslant}{pgf attribute name=yskew, parser=slant}%
+\tikzanimationdefineattribute{yscale}{pgf attribute name=scale, parser=yscale}%
+
+
+\def\tikz@anim@position@setup{%
+ \pgfgettransform\tikz@anim@saved@transform%
+ \expandafter\def\expandafter\tikz@temp\expandafter{%
+ \expandafter\def\expandafter\tikz@anim@saved@transform\expandafter{\tikz@anim@saved@transform}%
+ \pgfsysanimkeycanvastransform{}{}%
+ \tikz@anim@is@positiontrue%
+ }%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\tikz@anim@initial@options%
+ \expandafter\expandafter\expandafter{\expandafter\tikz@temp\tikz@anim@initial@options}%
+}%
+\newif\iftikz@anim@is@position
+
+
+% The TikZ animation callbacks
+%
+% Description:
+%
+% The callbacks called by tikz.code.tex whenever an object is
+% created. These callbacks will add the accumulated animation code.
+
+\def\tikz@anim@id@hook{%
+ \expandafter\ifx\csname tikz@anim@att@\tikz@id@name\endcsname\relax%
+ % No named animation:
+ % Now, check for auto animation:
+ \expandafter\ifx\csname tikz@anim@att@\tikz@auto@id\endcsname\relax%
+ \else%
+ % Auto animation%
+ \ifx\tikz@id@name\pgfutil@empty% Id set?
+ % No, so set it
+ \def\tikz@id@name{@auto}%
+ \fi%
+ \pgfidrefnextuse\tikz@anim@current@id\tikz@id@name%
+ \csname tikz@anim@att@\tikz@auto@id\endcsname%
+ \expandafter\global\expandafter\let\csname tikz@anim@att@\tikz@auto@id\endcsname\relax%
+ \fi%
+ \else%
+ % Named animation:
+ \pgfidrefnextuse\tikz@anim@current@id\tikz@id@name%
+ \csname tikz@anim@att@\tikz@id@name\endcsname%
+ \csname tikz@anim@att@\tikz@auto@id\endcsname% and unnamed animation
+ \expandafter\global\expandafter\let\csname tikz@anim@att@\tikz@id@name\endcsname\relax%
+ \expandafter\global\expandafter\let\csname tikz@anim@att@\tikz@auto@id\endcsname\relax%
+ \fi%
+}%
+
+% Add hook:
+\expandafter\def\expandafter\tikz@id@hook\expandafter{\tikz@id@hook\tikz@anim@id@hook}%
+
+
+
+% Attaches an animation to a named object (named in tikz)
+%
+% #1 = name of the object. If equal to the special text "myself", the
+% next created object is meant.
+% #2 = Animation code. When this code is executed, the following
+% things will be setup:
+%
+% \iftikz@is@node will be set to true or false
+% depending on whether the name references a node.
+%
+% \tikz@id@name will be set to the name of the object,
+% typically #1, except when #1 was ".", in this case another
+% name may have been used by the user, which will be used
+% instead.
+%
+% Description:
+%
+% After the call, the next time an object named #1 is created in TikZ
+% (using name=#1), the code #2 will be executed inside a scope to
+% create an animation of the object.
+
+\def\tikzanimationattachto#1#2{%
+ {%
+ \def\tikz@anim@name{#1}%
+ \ifx\tikz@anim@name\pgfutil@empty%
+ \tikzerror{Trying to attach an animation to an unnamed object. This should not happen.}%
+ \else%
+ \expandafter\ifx\csname tikz@anim@att@\tikz@anim@name\endcsname\relax%
+ \expandafter\gdef\csname tikz@anim@att@\tikz@anim@name\endcsname{#2}%
+ \else%
+ \expandafter\let\expandafter\tikz@temp\csname tikz@anim@att@\tikz@anim@name\endcsname%
+ \expandafter\def\expandafter\tikz@temp\expandafter{\tikz@temp#2}%
+ \expandafter\global\expandafter\let\csname tikz@anim@att@\tikz@anim@name\endcsname\tikz@temp%
+ \fi%
+ \fi%
+ }%
+}%
+\def\tikz@auto@id{myself}%
+\expandafter\let\csname tikz@anim@att@\tikz@auto@id\endcsname\relax%
+
+
+% Add config code to a timeline
+%
+% #1 = The object (may be "myself")
+% #2 = The attribute (see pgfanimateattribute)
+% #3 = Timeline sequence identifier
+% #4 = code
+%
+% Description:
+%
+% This commands adds the code to the timeline configuration, which is
+% code that gets executed before the rest of entries of the timeline
+% are executed.
+
+\def\tikz@timeline@config#1#2#3#4{%
+ \expandafter\def\expandafter\tikz@temp\expandafter{\csname tikz@a@conf@#1@#2@#3\endcsname}%
+ \expandafter\ifx\tikz@temp\relax%
+ \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\gdef\expandafter\expandafter\expandafter\tikz@temp\expandafter\expandafter\expandafter{\expandafter\expandafter\expandafter\global\expandafter\let\tikz@temp\relax}%
+ \fi%
+ \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\gdef\expandafter\expandafter\expandafter\tikz@temp\expandafter\expandafter\expandafter{\tikz@temp#4}%
+}%
+
+
+
+% Add a timeline entry
+%
+% #1 = The object (may be "myself")
+% #2 = The attribute (see pgfanimateattribute)
+% #3 = Timeline sequence identifier
+% #4 = early code
+% #5 = later code
+%
+% Description:
+%
+% This command stores an option with a timeline of an object. For each
+% object--attribute--identifier tuple a timeline can be created, for
+% which the values of #4 and #5 are collected. Later on, \pgfanimateattribute
+% will be called for the pgf attribute associated with tikz attribute,
+% the type associated with it and initial code, followed by the
+% accumulated values of #4 and then the accumulated values of #5.
+
+\def\tikz@timeline@entry#1#2#3#4#5{%
+ % First, does the object have an animation already attached?
+ \expandafter\ifx\csname tikz@a@tlo@#1\endcsname\relax%
+ % No, first entry!
+ % Create call:
+ \edef\pgf@marshal{\noexpand\tikzanimationattachto{#1}{\expandafter\noexpand\csname tikz@a@tlo@#1\endcsname}}%
+ \pgf@marshal%
+ \expandafter\gdef\csname tikz@a@tlo@#1\endcsname{\tikz@anim@cleanup{#1}}%
+ \fi%
+ % Second, does the timeline exist?
+ \expandafter\ifx\csname tikz@a@tlc@#1@#2@#3\endcsname\relax%
+ % No, first entry!
+ \def\tikz@anim@initial@early@options{#4}%
+ \def\tikz@anim@initial@options{#5}%
+ \csname tikz@anim@def@setup@#2\endcsname%
+ % Create timeline...
+ \expandafter\global\expandafter\let\csname tikz@a@tlc@#1@#2@#3\endcsname\tikz@anim@initial@options%
+ \expandafter\global\expandafter\let\csname tikz@a@tld@#1@#2@#3\endcsname\tikz@anim@initial@early@options%
+ % ...and add to calls
+ \expandafter\let\expandafter\pgf@temp\csname tikz@a@tlo@#1\endcsname%
+ \expandafter\def\expandafter\pgf@temp@name\expandafter{\tikz@anim@create{#1}{#2}{#3}}%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@temp\expandafter\expandafter\expandafter{\expandafter\pgf@temp\pgf@temp@name}%
+ \expandafter\global\expandafter\let\csname tikz@a@tlo@#1\endcsname\pgf@temp%
+ \else%
+ % Add to timeline:
+ \expandafter\let\expandafter\pgf@temp\csname tikz@a@tld@#1@#2@#3\endcsname%
+ \expandafter\def\expandafter\pgf@temp\expandafter{\pgf@temp#4}%
+ \expandafter\global\expandafter\let\csname tikz@a@tld@#1@#2@#3\endcsname\pgf@temp%
+ \expandafter\let\expandafter\pgf@temp\csname tikz@a@tlc@#1@#2@#3\endcsname%
+ \expandafter\def\expandafter\pgf@temp\expandafter{\pgf@temp#5}%
+ \expandafter\global\expandafter\let\csname tikz@a@tlc@#1@#2@#3\endcsname\pgf@temp%
+ \fi%
+}%
+
+
+\def\tikz@anim@cleanup#1{%
+ \expandafter\global\expandafter\let\csname tikz@a@tlo@#1\endcsname\relax%
+}%
+
+\def\tikz@anim@create#1#2#3{%
+ \csname tikz@a@conf@#1@#2@#3\endcsname%
+ \iftikz@is@node%
+ \expandafter\let\expandafter\tikz@temp\csname tikz@anim@def@pgf@attr@@node@#2\endcsname%
+ \else%
+ \expandafter\let\expandafter\tikz@temp\csname tikz@anim@def@pgf@attr@@scope@#2\endcsname%
+ \fi%
+ \ifx\tikz@temp\relax%
+ \expandafter\let\expandafter\tikz@temp\csname tikz@anim@def@pgf@attr@#2\endcsname%
+ \fi%
+ \expandafter\pgfanimateattributecode\expandafter{\tikz@temp}{%
+ \iftikz@is@node%
+ \edef\tikz@anim@whom{\tikz@id@name\csname tikz@anim@def@is@node@#2\endcsname}%
+ \else%
+ \edef\tikz@anim@whom{\tikz@id@name\csname tikz@anim@def@no@node@#2\endcsname}%
+ \fi%
+ \pgfanimationset{whom=\tikz@anim@whom}%
+ \expandafter\let\expandafter\tikz@animation@parser\csname tikz@anim@\csname tikz@anim@def@parser@#2\endcsname @parse\endcsname%
+ \csname tikz@anim@def@code@#2\endcsname%
+ \csname tikz@a@tld@#1@#2@#3\endcsname%
+ \csname tikz@a@tlc@#1@#2@#3\endcsname%
+ }%
+ \expandafter\global\expandafter\let\csname tikz@a@tlc@#1@#2@#3\endcsname\relax%
+ \expandafter\global\expandafter\let\csname tikz@a@tld@#1@#2@#3\endcsname\relax%
+}%
+
+
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex
index 7926021f8e6..946f87455e7 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex
@@ -7,8 +7,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex,v 1.1 2008/01/09 17:57:15 tantau Exp $
+\ProvidesFileRCS{tikzlibraryarrows.code.tex}
-\usepgflibrary{arrows}
+\usepgflibrary{arrows}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryautomata.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryautomata.code.tex
index d2aa190d618..93dc77be779 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryautomata.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryautomata.code.tex
@@ -7,18 +7,18 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryautomata.code.tex,v 1.3 2008/07/14 10:30:36 tantau Exp $
+\ProvidesFileRCS{tikzlibraryautomata.code.tex}
-\usetikzlibrary{shapes.multipart}
+\usetikzlibrary{shapes.multipart}%
% Styles for states:
-\tikzstyle{every state}= []
+\tikzset{every state/.style= {}}%
-\tikzstyle{state without output}= [circle,draw,minimum size=2.5em,every state]
-\tikzstyle{state with output}= [circle split,draw,minimum size=2.5em,every state]
+\tikzset{state without output/.style= {circle,draw,minimum size=2.5em,every state}}%
+\tikzset{state with output/.style= {circle split,draw,minimum size=2.5em,every state}}%
-\tikzstyle{accepting by arrow}= [after node path=
+\tikzset{accepting by arrow/.style= {after node path=
{
{
[to path=
@@ -30,11 +30,11 @@
}]
edge ()
}
-}]
-\tikzstyle{every accepting by arrow}=[]
-\tikzstyle{accepting by double}= [double,outer sep=.5\pgflinewidth+.3pt] % .3pt is half double width distance
+}}}%
+\tikzset{every accepting by arrow/.style={}}%
+\tikzset{accepting by double/.style= {double,outer sep=.5\pgflinewidth+.3pt}} % .3pt is half double width distance
-\tikzstyle{initial by arrow}= [after node path=
+\tikzset{initial by arrow/.style= {after node path=
{
{
[to path=
@@ -45,60 +45,60 @@
-- (\tikztostart)}]
edge ()
}
-}]
-\tikzstyle{every initial by arrow}=[]
+}}}%
+\tikzset{every initial by arrow/.style={}}%
-\tikzstyle{initial by diamond}=[shape=diamond]
+\tikzset{initial by diamond/.style={shape=diamond}}%
-\tikzoption{initial text}{\tikzaddafternodepathoption{\def\tikz@initial@text{#1}}}
-\tikzoption{accepting text}{\tikzaddafternodepathoption{\def\tikz@accepting@text{#1}}}
+\tikzoption{initial text}{\tikzaddafternodepathoption{\def\tikz@initial@text{#1}}}%
+\tikzoption{accepting text}{\tikzaddafternodepathoption{\def\tikz@accepting@text{#1}}}%
-\tikzoption{initial where}{\tikzaddafternodepathoption{\csname tikz@initial@compute@#1\endcsname}}
-\tikzoption{accepting where}{\tikzaddafternodepathoption{\csname tikz@accepting@compute@#1\endcsname}}
+\tikzoption{initial where}{\tikzaddafternodepathoption{\csname tikz@initial@compute@#1\endcsname}}%
+\tikzoption{accepting where}{\tikzaddafternodepathoption{\csname tikz@accepting@compute@#1\endcsname}}%
-\tikzoption{initial distance}{\tikzaddafternodepathoption{\def\tikz@initial@distance{#1}}}
-\tikzoption{accepting distance}{\tikzaddafternodepathoption{\def\tikz@accepting@distance{#1}}}
+\tikzoption{initial distance}{\tikzaddafternodepathoption{\def\tikz@initial@distance{#1}}}%
+\tikzoption{accepting distance}{\tikzaddafternodepathoption{\def\tikz@accepting@distance{#1}}}%
-\def\tikz@initial@text{start}
-\def\tikz@accepting@text{}
+\def\tikz@initial@text{start}%
+\def\tikz@accepting@text{}%
-\def\tikz@initial@distance{3ex}
-\def\tikz@accepting@distance{3ex}
+\def\tikz@initial@distance{3ex}%
+\def\tikz@accepting@distance{3ex}%
-\def\tikz@initial@compute@above{\def\tikz@initial@angle{90}\def\tikz@initial@anchor{south}}
-\def\tikz@initial@compute@below{\def\tikz@initial@angle{270}\def\tikz@initial@anchor{north}}
-\def\tikz@initial@compute@left{\def\tikz@initial@angle{180}\def\tikz@initial@anchor{east}}
-\def\tikz@initial@compute@right{\def\tikz@initial@angle{0}\def\tikz@initial@anchor{west}}
+\def\tikz@initial@compute@above{\def\tikz@initial@angle{90}\def\tikz@initial@anchor{south}}%
+\def\tikz@initial@compute@below{\def\tikz@initial@angle{270}\def\tikz@initial@anchor{north}}%
+\def\tikz@initial@compute@left{\def\tikz@initial@angle{180}\def\tikz@initial@anchor{east}}%
+\def\tikz@initial@compute@right{\def\tikz@initial@angle{0}\def\tikz@initial@anchor{west}}%
-\def\tikz@initial@angle{180}
-\def\tikz@initial@anchor{east}
+\def\tikz@initial@angle{180}%
+\def\tikz@initial@anchor{east}%
-\def\tikz@accepting@compute@above{\def\tikz@accepting@angle{90}\def\tikz@accepting@anchor{south}}
-\def\tikz@accepting@compute@below{\def\tikz@accepting@angle{270}\def\tikz@accepting@anchor{north}}
-\def\tikz@accepting@compute@left{\def\tikz@accepting@angle{180}\def\tikz@accepting@anchor{east}}
-\def\tikz@accepting@compute@right{\def\tikz@accepting@angle{0}\def\tikz@accepting@anchor{west}}
+\def\tikz@accepting@compute@above{\def\tikz@accepting@angle{90}\def\tikz@accepting@anchor{south}}%
+\def\tikz@accepting@compute@below{\def\tikz@accepting@angle{270}\def\tikz@accepting@anchor{north}}%
+\def\tikz@accepting@compute@left{\def\tikz@accepting@angle{180}\def\tikz@accepting@anchor{east}}%
+\def\tikz@accepting@compute@right{\def\tikz@accepting@angle{0}\def\tikz@accepting@anchor{west}}%
-\def\tikz@accepting@angle{0}
-\def\tikz@accepting@anchor{west}
+\def\tikz@accepting@angle{0}%
+\def\tikz@accepting@anchor{west}%
-\tikzstyle{initial above}= [initial by arrow,initial where=above]
-\tikzstyle{initial below}= [initial by arrow,initial where=below]
-\tikzstyle{initial left}= [initial by arrow,initial where=left]
-\tikzstyle{initial right}= [initial by arrow,initial where=right]
+\tikzset{initial above/.style= {initial by arrow,initial where=above}}%
+\tikzset{initial below/.style= {initial by arrow,initial where=below}}%
+\tikzset{initial left/.style= {initial by arrow,initial where=left}}%
+\tikzset{initial right/.style= {initial by arrow,initial where=right}}%
-\tikzstyle{accepting above}= [accepting by arrow,accepting where=above]
-\tikzstyle{accepting below}= [accepting by arrow,accepting where=below]
-\tikzstyle{accepting left}= [accepting by arrow,accepting where=left]
-\tikzstyle{accepting right}= [accepting by arrow,accepting where=right]
+\tikzset{accepting above/.style= {accepting by arrow,accepting where=above}}%
+\tikzset{accepting below/.style= {accepting by arrow,accepting where=below}}%
+\tikzset{accepting left/.style= {accepting by arrow,accepting where=left}}%
+\tikzset{accepting right/.style= {accepting by arrow,accepting where=right}}%
% Defaults:
-\tikzstyle{state}= [state without output]
-\tikzstyle{accepting}= [accepting by double]
-\tikzstyle{initial}= [initial by arrow]
+\tikzset{state/.style= {state without output}}%
+\tikzset{accepting/.style= {accepting by double}}%
+\tikzset{initial/.style= {initial by arrow}}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybabel.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybabel.code.tex
index 37b5ae20231..cf307cf6a8c 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybabel.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybabel.code.tex
@@ -7,11 +7,11 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybabel.code.tex,v 1.1 2013/06/24 11:49:06 tantau Exp $
+\ProvidesFileRCS{tikzlibrarybabel.code.tex}
\tikzset{
handle active characters in code,
- handle active characters in nodes
-}
+ handle active characters in nodes,
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybackgrounds.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybackgrounds.code.tex
index 6302b629ae4..690953b8054 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybackgrounds.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybackgrounds.code.tex
@@ -7,13 +7,13 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybackgrounds.code.tex,v 1.3 2013/07/18 17:07:38 tantau Exp $
+\ProvidesFileRCS{tikzlibrarybackgrounds.code.tex}
% Layers
-\pgfdeclarelayer{background}
-\pgfsetlayers{background,main}
+\pgfdeclarelayer{background}%
+\pgfsetlayers{background,main}%
% Switch command
@@ -25,49 +25,49 @@
\tikz@options},
execute at end scope={\endpgfonlayer}
}
-}
+}%
% Main style
-\tikzstyle{background rectangle}= [draw]
-\tikzstyle{background top}= [draw]
-\tikzstyle{background bottom}= [draw]
-\tikzstyle{background left}= [draw]
-\tikzstyle{background right}= [draw]
-\tikzstyle{background grid}= [help lines,draw]
+\tikzset{background rectangle/.style= {draw}}%
+\tikzset{background top/.style= {draw}}%
+\tikzset{background bottom/.style= {draw}}%
+\tikzset{background left/.style= {draw}}%
+\tikzset{background right/.style= {draw}}%
+\tikzset{background grid/.style= {help lines,draw}}%
-\tikzoption{inner frame sep}{\def\tikz@framexsep{#1}\def\tikz@frameysep{#1}}
-\tikzoption{inner frame xsep}{\def\tikz@framexsep{#1}}
-\tikzoption{inner frame ysep}{\def\tikz@frameysep{#1}}
-\def\tikz@framexsep{1ex}
-\def\tikz@frameysep{1ex}
+\tikzoption{inner frame sep}{\def\tikz@framexsep{#1}\def\tikz@frameysep{#1}}%
+\tikzoption{inner frame xsep}{\def\tikz@framexsep{#1}}%
+\tikzoption{inner frame ysep}{\def\tikz@frameysep{#1}}%
+\def\tikz@framexsep{1ex}%
+\def\tikz@frameysep{1ex}%
-\tikzoption{outer frame sep}{\def\tikz@outerframexsep{#1}\def\tikz@outerframeysep{#1}}
-\tikzoption{outer frame xsep}{\def\tikz@outerframexsep{#1}}
-\tikzoption{outer frame ysep}{\def\tikz@outerframeysep{#1}}
-\def\tikz@outerframexsep{0ex}
-\def\tikz@outerframeysep{0ex}
+\tikzoption{outer frame sep}{\def\tikz@outerframexsep{#1}\def\tikz@outerframeysep{#1}}%
+\tikzoption{outer frame xsep}{\def\tikz@outerframexsep{#1}}%
+\tikzoption{outer frame ysep}{\def\tikz@outerframeysep{#1}}%
+\def\tikz@outerframexsep{0ex}%
+\def\tikz@outerframeysep{0ex}%
% Looseness
-\tikzstyle{loose background}= [inner frame sep=2ex]
-\tikzstyle{tight background}= [inner frame sep=0ex]
+\tikzset{loose background/.style= {inner frame sep=2ex}}%
+\tikzset{tight background/.style= {inner frame sep=0ex}}%
% Showing background styles
-\tikzstyle{framed}= [style=show background rectangle]
-\tikzstyle{gridded}= [style=show background grid]
+\tikzset{framed/.style= {style=show background rectangle}}%
+\tikzset{gridded/.style= {style=show background grid}}%
-\tikzstyle{show background rectangle}=[execute at end picture=\tikz@background@framed]
-\tikzstyle{show background top}= [execute at end picture=\tikz@background@top]
-\tikzstyle{show background bottom}= [execute at end picture=\tikz@background@bottom]
-\tikzstyle{show background left}= [execute at end picture=\tikz@background@left]
-\tikzstyle{show background right}= [execute at end picture=\tikz@background@right]
-\tikzstyle{show background grid}= [execute at end picture=\tikz@background@grid]
+\tikzset{show background rectangle/.style={execute at end picture=\tikz@background@framed}}%
+\tikzset{show background top/.style= {execute at end picture=\tikz@background@top}}%
+\tikzset{show background bottom/.style= {execute at end picture=\tikz@background@bottom}}%
+\tikzset{show background left/.style= {execute at end picture=\tikz@background@left}}%
+\tikzset{show background right/.style= {execute at end picture=\tikz@background@right}}%
+\tikzset{show background grid/.style= {execute at end picture=\tikz@background@grid}}%
% Implementation
@@ -100,49 +100,49 @@
\edef\tikz@bg@outermaxx{\the\pgf@xc}%
\edef\tikz@bg@outermaxy{\the\pgf@yc}%
\fi%
-}
+}%
\def\tikz@background@framed{%
\tikz@background@save%
\pgfonlayer{background}
\path[style=background rectangle] (\tikz@bg@minx,\tikz@bg@miny) rectangle (\tikz@bg@maxx,\tikz@bg@maxy);
\endpgfonlayer
-}
+}%
\def\tikz@background@top{%
\tikz@background@save%
\pgfonlayer{background}
\path[style=background top] (\tikz@bg@outerminx,\tikz@bg@maxy) -- (\tikz@bg@outermaxx,\tikz@bg@maxy);
\endpgfonlayer
-}
+}%
\def\tikz@background@bottom{%
\tikz@background@save%
\pgfonlayer{background}
\path[style=background bottom] (\tikz@bg@outerminx,\tikz@bg@miny) -- (\tikz@bg@outermaxx,\tikz@bg@miny);
\endpgfonlayer
-}
+}%
\def\tikz@background@left{%
\tikz@background@save%
\pgfonlayer{background}
\path[style=background left] (\tikz@bg@minx,\tikz@bg@outerminy) -- (\tikz@bg@minx,\tikz@bg@outermaxy);
\endpgfonlayer
-}
+}%
\def\tikz@background@right{%
\tikz@background@save%
\pgfonlayer{background}
\path[style=background right] (\tikz@bg@maxx,\tikz@bg@outerminy) -- (\tikz@bg@maxx,\tikz@bg@outermaxy);
\endpgfonlayer
-}
+}%
\def\tikz@background@grid{%
\tikz@background@save%
\pgfonlayer{background}
\path[style=background grid] (\tikz@bg@minx,\tikz@bg@miny) grid (\tikz@bg@maxx,\tikz@bg@maxy);
\endpgfonlayer
-}
+}%
+
-
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybending.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybending.code.tex
index 42a410ce4f5..be9c8bb707a 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybending.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybending.code.tex
@@ -7,9 +7,9 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarybending.code.tex,v 1.2 2013/09/17 22:00:21 tantau Exp $
+\ProvidesFileRCS{tikzlibrarybending.code.tex}
-\usepgfmodule{bending}
-\tikzset{arrows=[flex]}
+\usepgfmodule{bending}%
+\tikzset{arrows=[flex]}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex
index 703494d2a64..561a725307f 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex
@@ -7,12 +7,12 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex,v 1.9 2013/07/15 12:05:31 tantau Exp $
+\ProvidesFileRCS{tikzlibrarycalc.code.tex}
%
%
% Part I: The let path command
-%
+%
%
@@ -21,11 +21,11 @@
%
% Currently (this may get more fancy in the future), the (coord)s are
% evaluated one by one. If the first evaluates to, say, (10pt,20pt),
-% the macro \p{name1} is set to "10pt,20pt" (without parantheses), the
+% the macro \p{name1} is set to "10pt,20pt" (without parentheses), the
% macro \x{name1} is set to "10pt" and the macro \y{name1} is set to
-% "20pt".
+% "20pt".
%
-% If you use a number for {name}, you need no parantheses, so you
+% If you use a number for {name}, you need no parentheses, so you
% could write:
%
% \draw let
@@ -40,7 +40,7 @@
\let\y=\tikz@cc@doy%
\let\n=\tikz@cc@don%
\pgfutil@ifnextchar i{\tikz@cc@stop@let}{\tikz@cc@handle@line}%
-}
+}%
\def\tikz@cc@handle@line{%
\pgfutil@ifnextchar\p{%
\tikz@cc@handle@coor%
@@ -51,34 +51,34 @@
\tikzerror{``\string\p'' or ``\string\n'' expected}%
}%
}%
-}
+}%
\def\tikz@cc@handle@num\n#1#2=#3{%
\pgfmathparse{#3}%
\expandafter\edef\csname tikz@cc@n@#1\endcsname{\pgfmathresult\ifpgfmathunitsdeclared pt\fi}
\pgfutil@ifnextchar,{\tikz@cc@handle@nextline}{\tikz@cc@stop@let}%
-}
+}%
\def\tikz@cc@handle@coor\p#1#2={%
\def\tikz@cc@coord@name{#1}%
\tikz@scan@one@point\tikz@cc@dolet%
-}
+}%
\def\tikz@cc@dolet#1{%
\pgf@process{#1}%
\expandafter\edef\csname tikz@cc@p@\tikz@cc@coord@name\endcsname{\the\pgf@x,\the\pgf@y}%
\expandafter\edef\csname tikz@cc@x@\tikz@cc@coord@name\endcsname{\the\pgf@x}%
\expandafter\edef\csname tikz@cc@y@\tikz@cc@coord@name\endcsname{\the\pgf@y}%
\pgfutil@ifnextchar,{\tikz@cc@handle@nextline}{\tikz@cc@stop@let}%
-}
+}%
\def\tikz@cc@handle@nextline,{%
\tikz@cc@handle@line%
-}
+}%
\def\tikz@cc@stop@let in{%
\tikz@scan@next@command%
}%
-\def\tikz@cc@dop#1{\csname tikz@cc@p@#1\endcsname}
-\def\tikz@cc@dox#1{\csname tikz@cc@x@#1\endcsname}
-\def\tikz@cc@doy#1{\csname tikz@cc@y@#1\endcsname}
-\def\tikz@cc@don#1{\csname tikz@cc@n@#1\endcsname}
+\def\tikz@cc@dop#1{\csname tikz@cc@p@#1\endcsname}%
+\def\tikz@cc@dox#1{\csname tikz@cc@x@#1\endcsname}%
+\def\tikz@cc@doy#1{\csname tikz@cc@y@#1\endcsname}%
+\def\tikz@cc@don#1{\csname tikz@cc@n@#1\endcsname}%
@@ -93,12 +93,12 @@
\begingroup%
%
% Parse main computation. It's a series of optional factors in front
- % of coordiantes.
- %
+ % of coordinates.
+ %
\pgf@xa=0pt% We accumulate the result in here.
\pgf@ya=0pt%
- \tikz@cc@parse+%
-}
+ \tikz@cc@parse+%
+}%
\def\tikz@cc@parse{%
\pgfutil@ifnextchar${%$
@@ -117,7 +117,7 @@
}%
}%
}%
-}
+}%
%
% The end is reached with $
@@ -126,7 +126,7 @@
\xdef\tikz@marshal{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
\endgroup%
\expandafter\tikz@cc@command\expandafter{\tikz@marshal}%
-}
+}%
%
@@ -135,15 +135,15 @@
\def\tikz@cc@add+{%
\def\tikz@cc@factor{1}%
\tikz@cc@factororcoordinate%
-}
+}%
\def\tikz@cc@sub-{%
\def\tikz@cc@factor{-1}%
\tikz@cc@factororcoordinate%
-}
+}%
%
% Check for a factor: If we see a (, its a coordinate...
-%
+%
\def\tikz@cc@factororcoordinate{%
\pgfutil@ifnextchar({%)
% Ok, found coordinate
@@ -151,7 +151,7 @@
}{%
\tikz@cc@parse@factor%
}%
-}
+}%
%
% ... otherwise it's a factor. It ends at ...*(
@@ -160,17 +160,17 @@
\pgfmathparse{#1*\tikz@cc@factor}%
\let\tikz@cc@factor=\pgfmathresult%
\tikz@cc@coordinate(%)
-}
+}%
\def\tikz@cc@coordinate{%
\tikz@scan@absolute\tikz@cc@after@coordinate%
-}
+}%
\def\tikz@cc@after@coordinate#1{%
\pgf@process{#1}%
\pgf@xb=\pgf@x%
\pgf@yb=\pgf@y%
\tikz@cc@mid@checks%
-}
+}%
%
@@ -182,7 +182,8 @@
\expandafter\tikz@cc@mid@checks@active
\else
\expandafter\tikz@cc@mid@checks@nonactive
- \fi}
+ \fi
+}%
\def\tikz@cc@mid@checks@nonactive{%
\pgfutil@ifnextchar!{%
@@ -192,7 +193,7 @@
\advance\pgf@ya by\tikz@cc@factor\pgf@yb
\tikz@cc@parse%
}%
-}
+}%
\def\tikz@cc@mid@nonactive!{%
\pgfutil@ifnextchar({%
@@ -200,7 +201,7 @@
}{%
\tikz@cc@mid@num@nonactive%
}%
-}
+}%
\begingroup
\catcode`\!=\active
@@ -212,7 +213,7 @@
\advance\pgf@ya by\tikz@cc@factor\pgf@yb
\tikz@cc@parse%
}%
- }
+ }%
\gdef\tikz@cc@mid@active!{%
\pgfutil@ifnextchar({%
@@ -220,7 +221,7 @@
}{%
\tikz@cc@mid@num@active%
}%
- }
+ }%
\endgroup
%
@@ -231,11 +232,11 @@
% is (b)
%
-\def\tikz@cc@mid@num@nonactive#1!{\tikz@cc@mid@num{#1}}
+\def\tikz@cc@mid@num@nonactive#1!{\tikz@cc@mid@num{#1}}%
\begingroup
\catcode`\!=\active
- \gdef\tikz@cc@mid@num@active#1!{\tikz@cc@mid@num{#1}}
+ \gdef\tikz@cc@mid@num@active#1!{\tikz@cc@mid@num{#1}}%
\endgroup
\def\tikz@cc@mid@num#1{%
@@ -249,7 +250,7 @@
\let\tikz@cc@mid@factor@one=\pgfmathresult%
\expandafter\tikz@cc@scan@rot\expandafter\tikz@cc@after@num%
\fi%
-}
+}%
\def\tikz@cc@after@num#1{%
\pgf@process{#1}%
@@ -258,7 +259,7 @@
\advance\pgf@xb by\tikz@cc@mid@factor\pgf@x%
\advance\pgf@yb by\tikz@cc@mid@factor\pgf@y%
\tikz@cc@mid@checks%
-}
+}%
@@ -277,7 +278,7 @@
\advance\pgf@xb by\tikz@cc@mid@unit\pgf@x%
\advance\pgf@yb by\tikz@cc@mid@unit\pgf@y%
\tikz@cc@mid@checks%
-}
+}%
%
% Projection case: (a)!(p)!(b)
@@ -302,13 +303,13 @@
\tikz@cc@scan@ex@nonactive}%
\fi
\tikz@next%
-}
+}%
-\def\tikz@cc@scan@ex@nonactive!{}
+\def\tikz@cc@scan@ex@nonactive!{}%
\begingroup
\catcode`\!=\active
- \gdef\tikz@cc@scan@ex@active!{}
+ \gdef\tikz@cc@scan@ex@active!{}%
\endgroup
\def\tikz@cc@after@project#1{%
@@ -326,7 +327,7 @@
\advance\pgf@xb by\pgf@sys@tonumber{\pgf@xc}\pgf@x%
\advance\pgf@yb by\pgf@sys@tonumber{\pgf@xc}\pgf@y%
\tikz@cc@mid@checks%
-}
+}%
%
% Rotational scanner: radius:(x)
@@ -336,7 +337,7 @@
\pgfutil@ifnextchar({%)
\tikz@scan@one@point#1% normal
}%
- {
+ {%
\def\tikz@cc@scan@rot@cmd{#1}%
\ifnum\the\catcode`\:=\active\relax
\expandafter\tikz@cc@scan@one@rot@active%
@@ -344,19 +345,19 @@
\expandafter\tikz@cc@scan@one@rot@nonactive%
\fi
}%
-}
+}%
\def\tikz@cc@scan@one@rot@nonactive#1:{%
\def\tikz@cc@scan@rot@angle{#1}%
\tikz@scan@one@point\tikz@cc@handle@rot%
-}
+}%
\begingroup
\catcode`\:=\active
\gdef\tikz@cc@scan@one@rot@active#1:{%
\def\tikz@cc@scan@rot@angle{#1}%
\tikz@scan@one@point\tikz@cc@handle@rot%
- }
+ }%
\endgroup
\def\tikz@cc@handle@rot#1{%
@@ -375,7 +376,7 @@
}%
\edef\tikz@marshal{\noexpand\tikz@cc@scan@rot@cmd{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
\tikz@marshal%
-}
+}%
@@ -383,32 +384,32 @@
%
%
% Part III: Calculation coordinate systems
-%
+%
%
% Tangent cs: Keys are a node and a point. Depending on the type of
-% node, the appropriate tanent computation should be done.
+% node, the appropriate tangent computation should be done.
\tikzdeclarecoordinatesystem{tangent}
{%
\tikzset{cs/.cd,#1}%
\expandafter\ifx\csname tikz@tangent@\tikz@cs@type\endcsname\relax%
- \tikzerror{I do not know how to compute the tangent to
+ \tikzerror{I do not know how to compute the tangent to
a \tikz@cs@type}%
\pgfpointorigin%
\else%
- \expandafter\tikz@scan@one@point\expandafter\tikz@lib@do@tangent\tikz@cs@point%
+ \expandafter\tikz@scan@one@point\expandafter\tikz@lib@do@tangent\tikz@cs@point%
\fi%
-}
+}%
-\tikzset{cs/node/.code=\tikz@cs@unpack{\tikz@cs@node}{\tikz@cs@type}{#1}}
-\tikzset{cs/point/.store in=\tikz@cs@point}
+\tikzset{cs/node/.code=\tikz@cs@unpack{\tikz@cs@node}{\tikz@cs@type}{#1}}%
+\tikzset{cs/point/.store in=\tikz@cs@point}%
-\def\tikz@lib@do@tangent{\csname tikz@tangent@\tikz@cs@type\endcsname}
+\def\tikz@lib@do@tangent{\csname tikz@tangent@\tikz@cs@type\endcsname}%
\def\tikz@tangent@coordinate#1{%
\pgfpointanchor{\tikz@cs@node}{center}%
-}
+}%
\def\tikz@tangent@circle#1{%
{%
@@ -464,7 +465,7 @@
\pgftransforminvert%
\pgf@process{\pgfpointtransformed{}}%
}%
-}
+}%
% Implementation of intersections
@@ -502,7 +503,7 @@
\pgftransforminvert%
\pgf@process{\pgfpointtransformed{}}%
}%
-}
+}%
\def\tikz@intersect@line@and@circle{%
@@ -553,10 +554,10 @@
% and add
\advance\pgf@xa by\pgf@sys@tonumber{\pgf@xc}\pgf@x%
\advance\pgf@ya by\pgf@sys@tonumber{\pgf@xc}\pgf@y%
- %
+ %
% Now, we have a triangle with a right angle at (xa,ya). The
% second point of the triangle is the origin. The third point is
- % sought.
+ % sought.
% Save x/y
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
@@ -601,7 +602,7 @@
\pgftransforminvert%
\pgf@process{\pgfpointtransformed{}}%
}%
-}
+}%
\def\tikz@intersect@circle@and@line{%
% Swap
@@ -610,5 +611,4 @@
\let\tikz@cs@line@a=\tikz@cs@line@b%
\tikz@intersect@line@and@circle%
}%
-}
-
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex
index 02b4f00bb6f..f3e8439491f 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex,v 1.3 2013/07/15 12:05:31 tantau Exp $
+\ProvidesFileRCS{tikzlibrarycalendar.code.tex}
\pgfutil@usemodule{pgfcalendar}
@@ -40,7 +40,7 @@
-%
+%
% Options affecting some calendars:
%
@@ -48,7 +48,7 @@
% Shifts and skips
%
-% Shift between days
+% Shift between days
\tikzoption{day xshift}{\def\tikz@lib@cal@xshift{#1}}
\tikzoption{day yshift}{\def\tikz@lib@cal@yshift{#1}}
@@ -72,16 +72,16 @@
\tikzoption{day code}{\def\tikzdaycode{#1}}
\tikzoption{day text}{\def\tikzdaytext{#1}}
-\tikzoption{days}{\tikzstyle{every day}+=[#1]}
-\tikzstyle{every day}=[anchor=base east]
+\tikzoption{days}{\tikzset{every day/.append style={#1}}}
+\tikzset{every day/.style={anchor=base east}}
\tikzoption{month code}{\def\tikzmonthcode{#1}}
\tikzoption{month text}{\def\tikzmonthtext{#1}}
-\tikzstyle{every month}=[]
+\tikzset{every month/.style={}}
\tikzoption{year code}{\def\tikzyearcode{#1}}
\tikzoption{year text}{\def\tikzyeartext{#1}}
-\tikzstyle{every year}=[]
+\tikzset{every year/.style={}}
\def\tikzdaycode{\node[name=\pgfcalendarsuggestedname,every day]{\tikzdaytext};}
\def\tikzmonthcode{\node[every month]{\tikzmonthtext};}
@@ -93,7 +93,7 @@
% Internal option for storing the "width" of a calendar as a number of
-% days
+% days
\tikzoption{tikz@lib@cal@width}{\def\tikz@lib@cal@width{#1}}
@@ -103,7 +103,7 @@
% Days on a line
%
-\tikzstyle{day list downward}=[%
+\tikzset{day list downward/.style={%
execute before day scope={
\ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{}
{%
@@ -112,11 +112,11 @@
\pgftransformyshift{-\pgf@y}
}%
}{}%
- },
+ },
execute after day scope={\pgfmathsetlength{\pgf@y}{\tikz@lib@cal@yshift}\pgftransformyshift{-\pgf@y}},
tikz@lib@cal@width=1
-]
-\tikzstyle{day list upward}=[%
+}}
+\tikzset{day list upward/.style={%
execute before day scope={
\ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{}
{%
@@ -124,11 +124,11 @@
\pgftransformyshift{\tikz@lib@cal@month@yshift}%
}%
}{}%
- },
+ },
execute after day scope={\pgftransformyshift\tikz@lib@cal@yshift},
tikz@lib@cal@width=1
-]
-\tikzstyle{day list right}=[%
+}}
+\tikzset{day list right/.style={%
execute before day scope={
\ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{}
{%
@@ -136,12 +136,12 @@
\pgftransformxshift{\tikz@lib@cal@month@xshift}%
}%
}{}%
- },
+ },
execute after day scope={\pgftransformxshift\tikz@lib@cal@xshift},
tikz@lib@cal@width=30% not quite right, but close enough in most cases...
-]
+}}
-\tikzstyle{day list left}=[%
+\tikzset{day list left/.style={%
execute before day scope={
\ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{}
{%
@@ -150,13 +150,13 @@
\pgftransformxshift{-\pgf@x}%
}%
}{}%
- },
+ },
execute after day scope={
\pgfmathsetlength{\pgf@x}{\tikz@lib@cal@xshift}
\pgftransformxshift{-\pgf@x}%
},
tikz@lib@cal@width=30% not quite right, but close enough in most cases...
-]
+}}
@@ -164,7 +164,7 @@
% Week list
%
-\tikzstyle{week list}=[%
+\tikzset{week list/.style={%
execute before day scope={%
\ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{}
{%
@@ -173,7 +173,7 @@
\pgftransformyshift{-\pgf@y}
}%
}{}%
- },
+ },
execute at begin day scope={%
\pgfmathsetlength\pgf@x{\tikz@lib@cal@xshift}%
\pgf@x=\pgfcalendarcurrentweekday\pgf@x%
@@ -186,7 +186,7 @@
}{}%
},
tikz@lib@cal@width=7
-]
+}}
@@ -194,7 +194,7 @@
% Month list
%
-\tikzstyle{month list}=[%
+\tikzset{month list/.style={%
execute before day scope={%
\ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{}
{%
@@ -219,7 +219,7 @@
}%
\let\tikz@lib@cal@month@list@start=\pgf@temp%
}{}%
- },
+ },
execute at begin day scope={%
\pgfmathsetlength\pgf@xa{\tikz@lib@cal@xshift}%
\pgf@xb=\pgfcalendarcurrentday\pgf@xa%
@@ -228,7 +228,7 @@
\pgftransformxshift{\pgf@xb}%
},
tikz@lib@cal@width=37
-]
+}}
@@ -237,17 +237,17 @@
% Month labels
%
-\tikzstyle{month label left}=[%
+\tikzset{month label left/.style={%
execute before day scope={\ifdate{day of month=1}{\tikzmonthcode}{}},
every month/.append style={anchor=base east,xshift=-3.5ex}
-]
+}}
-\tikzstyle{month label left vertical}=[%
+\tikzset{month label left vertical/.style={%
execute before day scope={\ifdate{day of month=1}{\tikzmonthcode}{}},
every month/.append style={anchor=base east,xshift=-4.5ex,yshift=2.25ex,rotate=90}
-]
-
-\tikzstyle{month label right}=[%
+}}
+
+\tikzset{month label right/.style={%
execute before day scope={\ifdate{day of month=1}{%
{%
\pgfmathsetlength{\pgf@xa}{\tikz@lib@cal@xshift}%
@@ -256,9 +256,9 @@ execute before day scope={\ifdate{day of month=1}{%
\tikzmonthcode%
}}{}},
every month/.append style={anchor=base west,xshift=1ex}
-]
+}}
-\tikzstyle{month label right vertical}=[%
+\tikzset{month label right vertical/.style={%
execute before day scope={\ifdate{day of month=1}{%
{%
\pgfmathsetlength{\pgf@xa}{\tikz@lib@cal@xshift}%
@@ -267,9 +267,9 @@ execute before day scope={\ifdate{day of month=1}{%
\tikzmonthcode%
}}{}},
every month/.append style={anchor=base west,xshift=2ex,yshift=2.25ex,rotate=-90}
-]
+}}
-\tikzstyle{month label above centered}=[%
+\tikzset{month label above centered/.style={%
execute before day scope={%
\ifdate{day of month=1}{%
{
@@ -285,9 +285,9 @@ execute before day scope={\ifdate{day of month=1}{%
}
}{}},
every month/.append style={anchor=base}
-]
-
-\tikzstyle{month label above left}=[%
+}}
+
+\tikzset{month label above left/.style={%
execute before day scope={%
\ifdate{day of month=1}{%
{
@@ -298,11 +298,11 @@ execute before day scope={\ifdate{day of month=1}{%
}
}{}},
every month/.append style={anchor=base west}
-]
+}}
-\tikzstyle{month label above right}=[%
+\tikzset{month label above right/.style={%
execute before day scope={%
\ifdate{day of month=1}{%
{
@@ -316,9 +316,9 @@ execute before day scope={\ifdate{day of month=1}{%
}
}{}},
every month/.append style={anchor=base east}
-]
-
-\tikzstyle{month label below centered}=[%
+}}
+
+\tikzset{month label below centered/.style={%
execute before day scope={%
\ifdate{day of month=1}{%
{
@@ -334,9 +334,9 @@ execute before day scope={\ifdate{day of month=1}{%
}
}{}},
every month/.append style={anchor=base}
-]
-
-\tikzstyle{month label below left}=[%
+}}
+
+\tikzset{month label below left/.style={%
execute before day scope={%
\ifdate{day of month=1}{%
{
@@ -347,7 +347,7 @@ execute before day scope={\ifdate{day of month=1}{%
}
}{}},
every month/.append style={anchor=base west}
-]
+}}
@@ -370,37 +370,37 @@ execute before day scope={\ifdate{day of month=1}{%
}
\def\tikz@lib@cal@handle{%
- \let\@next=\tikz@lib@cal@expand%
+ \let\pgfutil@next=\tikz@lib@cal@expand%
\ifx\pgf@let@token;%
- \let\@next=\tikz@lib@cal@stop%
+ \let\pgfutil@next=\tikz@lib@cal@stop%
\else%
\ifx\pgf@let@token(%)
- \let\@next=\tikz@lib@cal@name%
+ \let\pgfutil@next=\tikz@lib@cal@name%
\else%
\ifx\pgf@let@token a%
- \let\@next=\tikz@lib@cal@at%
+ \let\pgfutil@next=\tikz@lib@cal@at%
\else%
\ifx\pgf@let@token[%
- \let\@next=\tikz@lib@cal@option%
+ \let\pgfutil@next=\tikz@lib@cal@option%
\else%
\ifx\pgf@let@token i%
- \let\@next=\tikz@lib@cal@if%
+ \let\pgfutil@next=\tikz@lib@cal@if%
\fi%
\fi%
\fi%
\fi%
\fi%
- \@next%
+ \pgfutil@next%
}
\def\tikz@lib@cal@expand{%
\advance\tikz@expandcount by -1%
\ifnum\tikz@expandcount<0\relax%
\tikzerror{Giving up on this calendar}%
- \let\@next=\tikz@lib@cal@end%
+ \let\pgfutil@next=\tikz@lib@cal@end%
\else%
- \let\@next=\tikz@lib@cal@@expand
+ \let\pgfutil@next=\tikz@lib@cal@@expand
\fi%
- \@next}
+ \pgfutil@next}
\def\tikz@lib@cal@@expand{\expandafter\tikz@lib@cal@scanner\pgf@let@token}
@@ -435,14 +435,14 @@ execute before day scope={\ifdate{day of month=1}{%
\pgftransformshift{\tikz@node@at}%
\expandafter\pgfcalendar\expandafter{\tikz@fig@name}{\tikz@lib@cal@start}{\tikz@lib@cal@end}%
{%
- \tikz@before@day%
+ \tikz@before@day%
\scope%
\tikz@atbegin@day%
\tikz@lib@cal@ifs%
\tikzdaycode%
\tikz@atend@day%
\endscope%
- \tikz@after@day%
+ \tikz@after@day%
}%
\endgroup%
}
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarychains.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarychains.code.tex
index e2d12a0931a..c02f5207044 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarychains.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarychains.code.tex
@@ -7,9 +7,9 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarychains.code.tex,v 1.6 2013/07/15 12:05:31 tantau Exp $
+\ProvidesFileRCS{tikzlibrarychains.code.tex}
-\usetikzlibrary{positioning}
+\usetikzlibrary{positioning}%
\tikzset{start chain/.default=,
start chain/.code={%
@@ -52,8 +52,8 @@
\fi%
},
join/.code=\tikz@lib@parse@join{#1},
- join/.default={}%
-}
+ join/.default={}%
+}%
\def\tikz@lib@chain@parse#1{%
\pgfutil@in@{going }{#1}%
@@ -68,7 +68,7 @@
\let\tikz@lib@chain@direction\relax%
\fi%
\fi%
-}
+}%
\def\tikz@lib@chain@going#1going #2\pgf@stop{%
\def\tikz@lib@chain@name{#1}%
@@ -82,8 +82,8 @@
\else%
\tikz@lib@chain@place{#2}%
\fi%
- }%
-}
+ }%
+}%
\def\tikz@lib@chain@positioning#1placed #2\pgf@stop{%
\def\tikz@lib@chain@name{#1}%
@@ -93,7 +93,7 @@
\fi%
\tikz@lib@chain@is@goingfalse%
\def\tikz@lib@chain@direction{\tikz@lib@chain@place{#2}}%
-}
+}%
\newif\iftikz@lib@chain@is@going
@@ -103,18 +103,18 @@
\let\tikz@lib@chain@default@direction=\tikz@lib@chain@direction%
},%
/tikz/chain default direction=going right
-}
+}%
-\def\tikz@lib@current@chain{chain}
+\def\tikz@lib@current@chain{chain}%
-\pgfutil@g@addto@macro\tikz@node@reset@hook{\let\tikz@lib@chain@caller=\relax}
-\pgfutil@g@addto@macro\tikz@node@begin@hook{\tikz@lib@chain@caller}
+\pgfutil@g@addto@macro\tikz@node@reset@hook{\let\tikz@lib@chain@caller=\relax}%
+\pgfutil@g@addto@macro\tikz@node@begin@hook{\tikz@lib@chain@caller}%
\tikzset{
on chain/.default=,
on chain/.code=\tikz@lib@on@chain{#1}%
-}
-\def\tikz@lib@on@chain#1{%
+}%
+\def\tikz@lib@on@chain#1{%
\tikz@lib@chain@parse{#1}%
\ifx\tikz@lib@chain@name\pgfutil@empty%
\let\tikz@lib@chain@name\tikz@lib@current@chain%
@@ -137,7 +137,7 @@
\fi%
\edef\tikz@lib@chain@caller{\noexpand\tikz@lib@chain@last@found{\tikz@lib@chain@name}}%
\fi%
-}
+}%
\def\tikz@lib@chain@last@found#1{%
% Increase the count and set name, if necessary.
\c@pgf@counta\csname tikz@lib@chain@count@#1\endcsname\relax%
@@ -146,12 +146,12 @@
\expandafter\xdef\csname tikz@lib@chain@count@#1\endcsname{\the\c@pgf@counta}%
\ifnum\c@pgf@counta=1\relax%
\tikzset{alias/.expanded=#1-begin} % Define pseudostart
- \fi%
+ \fi%
\tikzset{alias/.expanded=#1-end} % Define pseudostart
\tikzset{alias/.expanded=#1-\the\c@pgf@counta} % Define pseudostart
\tikz@lib@chain@direction%
\tikzset{every on chain/.try}%
-}
+}%
\def\tikz@lib@chain@place#1{%
@@ -161,11 +161,11 @@
\else%
\tikzset{#1=of \tikzchainprevious}%
\fi%
-}
+}%
\def\tikz@lib@chain@strip#1 \pgf@stop{%
\def\tikz@lib@chain@name{#1}%
-}
+}%
\def\tikz@lib@parse@join#1{%
\def\tikz@temp{#1}%
@@ -184,18 +184,18 @@
\tikz@lib@parse@join@by#1\pgf@stop%
\fi%
\fi%
-}
+}%
\def\tikz@lib@parse@join@with@by with #1 by #2\pgf@stop{%
\tikzset{after node path={(#1)edge[every join,#2](\tikzchaincurrent)}}%
-}
+}%
\def\tikz@lib@parse@join@by by #1\pgf@stop{%
\tikzset{after node path={\ifx\tikzchainprevious\pgfutil@empty\else (\tikzchainprevious)edge[every join,#1](\tikzchaincurrent)\fi}}%
-}
-\tikzset{every join/.style=}
+}%
+\tikzset{every join/.style=}%
-\def\tikz@lib@chainin#1(#2){\pgfutil@ifnextchar[{\tikz@lib@chainin@{#2}}{\tikz@lib@chainin@{#2}[]}}%]
-\def\tikz@lib@chainin@#1[#2]{\path[late options={name=#1,on chain,every chain in/.try,#2}]}
+\def\tikz@lib@chainin#1(#2){\pgfutil@ifnextchar[{\tikz@lib@chainin@{#2}}{\tikz@lib@chainin@{#2}[]}}%]%
+\def\tikz@lib@chainin@#1[#2]{\path[late options={name=#1,on chain,every chain in/.try,#2}]}%
%
@@ -208,7 +208,7 @@
\pgfkeysalso{/tikz/start chain/.expand once=\tikz@lib@current@chain/#1}%
\path[late options={name=\tikz@lib@save@current-end,on chain}];%
}%
-}
-\tikzset{continue branch/.style={continue chain/.expand once=\tikz@lib@current@chain/#1}}
+}%
+\tikzset{continue branch/.style={continue chain/.expand once=\tikz@lib@current@chain/#1}}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.code.tex
index b27783b0009..4e61360ee3b 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
% Define the basic decoration stuff for tikz. Load more libraries to
% "actually use" decorations
@@ -26,9 +26,9 @@
\else%
\let\tikz@dec@mirror=\relax%
\fi%
- \tikz@dec@trans%
+ \tikz@dec@trans%
},
- /pgf/decoration/mirror/.default=true,
+ /pgf/decoration/mirror/.default=true,
/pgf/decoration/transform/.code={%
{%
\pgftransformreset%
@@ -43,37 +43,37 @@
/pgf/decoration/post/.initial=lineto,
/pgf/decoration/pre length/.initial=0pt,
/pgf/decoration/post length/.initial=0pt,
-}
+}%
\let\tikz@decoration@name=\tikz@nonetext
-\def\tikz@dec@trans{\pgfsetdecorationsegmenttransformation{\tikz@dec@user@transform\tikz@dec@mirror\tikz@dec@shift}}
+\def\tikz@dec@trans{\pgfsetdecorationsegmenttransformation{\tikz@dec@user@transform\tikz@dec@mirror\tikz@dec@shift}}%
\let\tikz@dec@user@transform=\relax
\let\tikz@dec@shift=\relax
\let\tikz@dec@mirror=\relax
-\pgfdeclaremetadecoration{tikz@internal}{pre}{
+\pgfdeclaremetadecoration{tikz@internal}{pre}{%
\state{pre}[width=\pgfkeysvalueof{/pgf/decoration/pre length}, next state=main]
{
\tikz@dec@trans
\decoration{\pgfkeysvalueof{/pgf/decoration/pre}}
- }
+ }%
\state{main}[width=\pgfmetadecoratedremainingdistance-\pgfkeysvalueof{/pgf/decoration/post length}, next state=final]
{
\tikz@dec@trans
\decoration{\tikz@decoration@name}
- }
+ }%
\state{final}
{
\tikz@dec@trans
\decoration{\pgfkeysvalueof{/pgf/decoration/post}}
- }
-}
+ }%
+}%
\newif\iftikz@metadecoration
-\def\tikz@lib@dec@addtomacro#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
+\def\tikz@lib@dec@addtomacro#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}%
\def\tikz@lib@decoration[#1]{%
\begingroup%
@@ -99,7 +99,7 @@
\tikzerror{A decoration must begin with a brace}%
\tikz@enddecoration%
}%
-}
+}%
\def\tikz@lib@do@dec{%
% Ok, now what?
\pgfifmetadecoration{\tikz@decoration@name}%
@@ -113,7 +113,7 @@
\ifx\pgfdecorateexistingpath\pgfutil@empty%
\pgfpathmoveto{\pgfqpoint{\the\tikz@lastxsaved}{\the\tikz@lastysaved}}%
\fi%
-}
+}%
\newbox\tikz@lib@dec@box
\def\tikz@enddecoration{%
\global\setbox\tikz@lib@dec@box=\box\tikz@tempbox%
@@ -129,7 +129,7 @@
\fi
\endgroup%
\setbox\tikz@tempbox=\box\tikz@lib@dec@box%
-}
+}%
\def\tikz@lib@dec@decorate@path{%
@@ -138,7 +138,7 @@
\pgfgetpath\tikz@lib@dec@currentpath%
\pgfsetpath\pgfutil@empty%
\pgfifmetadecoration{\tikz@decoration@name}
- {
+ {
\expandafter\pgfmetadecoration\expandafter{\tikz@decoration@name}%
\pgfsetpath\tikz@lib@dec@currentpath%
\endpgfmetadecoration%
@@ -156,9 +156,9 @@
}
}
\fi%
-}
+}%
-\def\tikz@lib@dec@zpttext{0pt}
+\def\tikz@lib@dec@zpttext{0pt}%
\newif\iftikz@lib@dec@temp
\def\tikz@lib@dec@startdecoration{%
@@ -178,7 +178,7 @@
\else%
\expandafter\pgfdecoration\expandafter{\expandafter{\tikz@decoration@name}{\pgfdecoratedpathlength}{}{}}%
\fi%
-}
+}%
\def\tikz@lib@dec@stopdecoration{%
\iftikz@lib@dec@temp%
@@ -186,7 +186,7 @@
\else%
\endpgfdecoration%
\fi%
-}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.footprints.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.footprints.code.tex
index e4295c10ea7..fe42e8b09be 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.footprints.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.footprints.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{decorations}
-\usepgflibrary{decorations.footprints}
+\usetikzlibrary{decorations}%
+\usepgflibrary{decorations.footprints}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.fractals.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.fractals.code.tex
index dd247ac7e3f..9bd837911bc 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.fractals.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.fractals.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{decorations}
-\usepgflibrary{decorations.fractals}
+\usetikzlibrary{decorations}%
+\usepgflibrary{decorations.fractals}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.markings.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.markings.code.tex
index eecdfb6ad3f..23dcf61da73 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.markings.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.markings.code.tex
@@ -7,25 +7,25 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{decorations}
-\usepgflibrary{decorations.markings}
+\usetikzlibrary{decorations}%
+\usepgflibrary{decorations.markings}%
% Upgrade \arrow command
\def\pgf@lib@dec@doarrowhead{%
\pgfutil@ifnextchar[{\tikz@lib@dec@doarrowhead}{\tikz@lib@dec@doarrowhead[]}%]
-}
+}%
\def\tikz@lib@dec@doarrowhead[#1]#2{%
\scope[#1]
\pgf@lib@dec@arrowhead{1}{#2}%
\endscope
-}
+}%
\def\pgf@lib@dec@doarrowheadrev{%
\pgfutil@ifnextchar[{\tikz@lib@dec@doarrowheadrev}{\tikz@lib@dec@doarrowheadrev[]}%]
-}
+}%
\def\tikz@lib@dec@doarrowheadrev[#1]#2{%
\scope[#1]
\pgf@lib@dec@arrowhead{-1}{#2}%
\endscope
-}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathmorphing.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathmorphing.code.tex
index 388f6395f8b..4d0eb26dd7a 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathmorphing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathmorphing.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{decorations}
-\usepgflibrary{decorations.pathmorphing}
+\usetikzlibrary{decorations}%
+\usepgflibrary{decorations.pathmorphing}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathreplacing.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathreplacing.code.tex
index ec4c6001f55..cef15dcc5ec 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathreplacing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.pathreplacing.code.tex
@@ -7,30 +7,30 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{decorations}
-\usepgflibrary{decorations.pathreplacing}
+\usetikzlibrary{decorations}%
+\usepgflibrary{decorations.pathreplacing}%
\def\tikz@lib@dec@installinputsegmentpoints{%
- \pgf@process{\pgf@decorate@inputsegment@first}%
- \edef\tikzinputsegmentfirst{\the\pgf@x,\the\pgf@y}%
- %
- \pgf@process{\pgf@decorate@inputsegment@last}%
- \edef\tikzinputsegmentlast{\the\pgf@x,\the\pgf@y}%
- %
- \pgf@process{\pgf@decorate@inputsegment@supporta}%
- \edef\tikzinputsegmentsupporta{\the\pgf@x,\the\pgf@y}%
- %
- \pgf@process{\pgf@decorate@inputsegment@supportb}%
- \edef\tikzinputsegmentsupportb{\the\pgf@x,\the\pgf@y}%
-}
+ \pgf@process{\pgf@decorate@inputsegment@first}%
+ \edef\tikzinputsegmentfirst{\the\pgf@x,\the\pgf@y}%
+ %
+ \pgf@process{\pgf@decorate@inputsegment@last}%
+ \edef\tikzinputsegmentlast{\the\pgf@x,\the\pgf@y}%
+ %
+ \pgf@process{\pgf@decorate@inputsegment@supporta}%
+ \edef\tikzinputsegmentsupporta{\the\pgf@x,\the\pgf@y}%
+ %
+ \pgf@process{\pgf@decorate@inputsegment@supportb}%
+ \edef\tikzinputsegmentsupportb{\the\pgf@x,\the\pgf@y}%
+}%
\pgfkeys{
- /pgf/decoration/.cd,
- moveto code/.code=\def\pgfdecoratedinputsegmentmovetocode{\tikz@lib@dec@installinputsegmentpoints#1},
- lineto code/.code=\def\pgfdecoratedinputsegmentlinetocode{\tikz@lib@dec@installinputsegmentpoints#1},
- curveto code/.code=\def\pgfdecoratedinputsegmentcurvetocode{\tikz@lib@dec@installinputsegmentpoints#1},
- closepath code/.code=\def\pgfdecoratedinputsegmentclosepathcode{\tikz@lib@dec@installinputsegmentpoints#1}
-}
+ /pgf/decoration/.cd,
+ moveto code/.code=\def\pgfdecoratedinputsegmentmovetocode{\tikz@lib@dec@installinputsegmentpoints#1},
+ lineto code/.code=\def\pgfdecoratedinputsegmentlinetocode{\tikz@lib@dec@installinputsegmentpoints#1},
+ curveto code/.code=\def\pgfdecoratedinputsegmentcurvetocode{\tikz@lib@dec@installinputsegmentpoints#1},
+ closepath code/.code=\def\pgfdecoratedinputsegmentclosepathcode{\tikz@lib@dec@installinputsegmentpoints#1}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.shapes.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.shapes.code.tex
index d9306058442..e1ad8a5e12b 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.shapes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.shapes.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{decorations}
-\usepgflibrary{decorations.shapes}
+\usetikzlibrary{decorations}%
+\usepgflibrary{decorations.shapes}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.text.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.text.code.tex
index b75fcc6a562..50b9ebcba67 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.text.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarydecorations.text.code.tex
@@ -7,67 +7,67 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usetikzlibrary{decorations}
-\usepgflibrary{decorations.text}
+\usetikzlibrary{decorations}%
+\usepgflibrary{decorations.text}%
% Code for the `text effects along path' decoration
% Some text constants
% To do: merge these with existing text constants
-\def\tikz@lib@dec@te@space@text{space}
-\def\tikz@lib@dec@align@left@text{left}
-\def\tikz@lib@dec@align@right@text{right}
-\def\tikz@lib@dec@align@center@text{center}
-\def\tikz@lib@dec@te@none@text{none}
+\def\tikz@lib@dec@te@space@text{space}%
+\def\tikz@lib@dec@align@left@text{left}%
+\def\tikz@lib@dec@align@right@text{right}%
+\def\tikz@lib@dec@align@center@text{center}%
+\def\tikz@lib@dec@te@none@text{none}%
% Some ifs
-\newif\iftikz@lib@dec@te@pathfromtext
-\newif\iftikz@lib@dec@te@segmentfromwidth
-\newif\iftikz@lib@dec@te@scaletexttopath
-\newif\iftikz@lib@dec@te@fittexttopath
-\newif\iftikz@lib@dec@te@wordsep
-\newif\iftikz@lib@dec@te@finalletter
+\newif\iftikz@lib@dec@te@pathfromtext%
+\newif\iftikz@lib@dec@te@segmentfromwidth%
+\newif\iftikz@lib@dec@te@scaletexttopath%
+\newif\iftikz@lib@dec@te@fittexttopath%
+\newif\iftikz@lib@dec@te@wordsep%
+\newif\iftikz@lib@dec@te@finalletter%
% Utility macros
-% To do: integrate with exisiting pgf macros
+% To do: integrate with existing pgf macros
\def\tikz@lib@dec@te@addto@macro#1#2{%
\expandafter\def\expandafter#1\expandafter{#1#2}%
-}
+}%
\def\tikz@lib@dec@te@namelet#1#2{%
\expandafter\expandafter\expandafter\let\expandafter\expandafter\csname\expandafter#1\expandafter\endcsname\expandafter=\csname#2\endcsname%
-}
+}%
\def\tikz@lib@dec@te@advancecountmacro#1#2{%
\pgfutil@tempcnta=#1\relax%
\advance\pgfutil@tempcnta by#2\relax%
\edef#1{\the\pgfutil@tempcnta}%
-}
+}%
\def\tikz@lib@dec@te@advancedimenmacro#1#2{%
\pgf@x=#1\relax%
\advance\pgf@x by#2\relax%
\edef#1{\the\pgf@x}%
-}
+}%
% Macros for defining and updating text parameters
\def\tikz@lib@dec@te@start@parameters#1{%
\expandafter\let\csname tikz@lib@dec@te@character@#1\endcsname=\pgfutil@empty%
-}
+}%
\def\tikz@lib@dec@te@addto@parameters#1#2{%
\expandafter\tikz@lib@dec@te@addto@macro\expandafter%
{\csname tikz@lib@dec@te@character@#1\endcsname}{#2}%
-}
+}%
\def\tikz@lib@dec@te@addmacroto@parameters#1#2{%
\def\tikz@lib@dec@te@marshal{\expandafter\tikz@lib@dec@te@addto@macro\expandafter%
{\csname tikz@lib@dec@te@character@#1\endcsname}}%
\expandafter\tikz@lib@dec@te@marshal\expandafter{\expandafter\def\expandafter#2\expandafter{#2}}%
-}
+}%
-\def\tikz@lib@dec@te@getparameters#1{\csname tikz@lib@dec@te@character@#1\endcsname}
+\def\tikz@lib@dec@te@getparameters#1{\csname tikz@lib@dec@te@character@#1\endcsname}%
@@ -124,12 +124,12 @@
\fi},
word separator=space,
character command/.code={%
- \def\tikz@lib@dec@te@tmp{#1}%
- \ifx\tikz@lib@dec@te@tmp\pgfutil@empty%
- \def\tikz@lib@dec@te@charactercommand{\tikz@lib@dec@te@charactertypesetonly}%
- \else%
- \def\tikz@lib@dec@te@charactercommand{#1}%
- \fi%
+ \def\tikz@lib@dec@te@tmp{#1}%
+ \ifx\tikz@lib@dec@te@tmp\pgfutil@empty%
+ \def\tikz@lib@dec@te@charactercommand{\tikz@lib@dec@te@charactertypesetonly}%
+ \else%
+ \def\tikz@lib@dec@te@charactercommand{#1}%
+ \fi%
},
character command=,
every character width/.style={/pgf/decoration/text effects/every character/.try},
@@ -146,14 +146,14 @@
repeat text/.store in=\tikz@lib@dec@te@repeattext,
repeat text/.default=-1,
repeat text=0,
-}
+}%
-\def\tikz@lib@dec@te@charactertypesetonly#1{#1}
+\def\tikz@lib@dec@te@charactertypesetonly#1{#1}%
\tikzset{%
text effects/.code={\pgfkeysalso{/pgf/decoration/text effects/.cd,#1}},
-}
+}%
@@ -163,7 +163,7 @@
% Prepare the decoration text
%
% This sets up all the character/letter/word, counts/totals
-% and caluclates the default width of the characters/text
+% and calculates the default width of the characters/text
% (which may be modified later).
%
\def\tikz@lib@dec@te@preparetext{%
@@ -201,13 +201,13 @@
\tikz@lib@dec@te@addto@parameters{\tikz@lib@dec@te@lastcharactercount}{\tikz@lib@dec@te@finallettertrue}%
\fi
\def\tikz@lib@dec@te@lettercount{0}%
- \tikz@lib@dec@te@addto@parameters{\tikz@lib@dec@te@charactercount}{\tikz@lib@dec@te@wordseptrue}%
+ \tikz@lib@dec@te@addto@parameters{\tikz@lib@dec@te@charactercount}{\tikz@lib@dec@te@wordseptrue}%
\else
\ifnum\tikz@lib@dec@te@lettercount=0\relax%
\tikz@lib@dec@te@advancecountmacro\tikz@lib@dec@te@wordcount{1}%
\fi%
\tikz@lib@dec@te@addto@parameters{\tikz@lib@dec@te@charactercount}{\tikz@lib@dec@te@finalletterfalse}%
- \tikz@lib@dec@te@advancecountmacro{\tikz@lib@dec@te@lettercount}{1}%
+ \tikz@lib@dec@te@advancecountmacro{\tikz@lib@dec@te@lettercount}{1}%
\tikz@lib@dec@te@addto@parameters{\tikz@lib@dec@te@charactercount}{\tikz@lib@dec@te@wordsepfalse}%
\expandafter\let\csname tikz@lib@dec@te@word \tikz@lib@dec@te@wordcount @lettercount\endcsname=\tikz@lib@dec@te@lettercount%
\fi%
@@ -241,10 +241,10 @@
\expandafter\edef\csname tikz@lib@dec@te@character@\pgfmathcounter @postwidth\endcsname{\the\pgf@x}%
\tikz@lib@dec@te@advancedimenmacro{\tikz@lib@dec@te@textwidth}{\tikz@lib@dec@te@characterwidth}%
\repeatpgfmathloop%
-}
+}%
% Does the category code of the space matter?
-\def\tikz@lib@dec@te@spacetoken{ }
+\def\tikz@lib@dec@te@spacetoken{ }%
\let\tikz@lib@dec@te@wordsep=\tikz@lib@dec@te@spacetoken
@@ -254,7 +254,7 @@
% Create macros \tikz@lib@dec@te@character@<n>@token containing
% the nth character.
%
-% Total number of characters is store in
+% Total number of characters is store in
% \tikz@lib@dec@te@chractertotal@count
%
\def\tikz@lib@dec@te@scancharacters#1{%
@@ -263,7 +263,7 @@
\expandafter\tikz@lib@dec@te@@scancharacters\tikz@lib@dec@te@text\tikz@lib@dec@te@scancharacters}%
\def\tikz@lib@dec@te@@scancharacters{%
- \futurelet\tikz@lib@dec@te@token\tikz@lib@dec@te@@@scancharacters}
+ \futurelet\tikz@lib@dec@te@token\tikz@lib@dec@te@@@scancharacters}%
\def\tikz@lib@dec@te@@@scancharacters{%
\ifx\tikz@lib@dec@te@token\tikz@lib@dec@te@scancharacters%
@@ -281,31 +281,31 @@
\fi%
\fi%
\tikz@lib@dec@te@next%
-}
+}%
\def\tikz@lib@dec@te@@@scancharacters@space{%
\let\tikz@lib@dec@te@character=\tikz@lib@dec@te@spacetoken%
\tikz@lib@dec@te@@@scancharacters@process%
\pgfutil@ifnextchar x\tikz@lib@dec@te@@scancharacters\tikz@lib@dec@te@@scancharacters%
-}
+}%
\def\tikz@lib@dec@te@@@scancharacters@bgroup#1{%
\def\tikz@lib@dec@te@character{{#1}}%
\tikz@lib@dec@te@@@scancharacters@process%
\tikz@lib@dec@te@@scancharacters%
-}
+}%
\def\tikz@lib@dec@te@@@scancharacters@normal#1{%
\def\tikz@lib@dec@te@character{#1}%
\tikz@lib@dec@te@@@scancharacters@process%
\tikz@lib@dec@te@@scancharacters%
-}
+}%
-\def\tikz@lib@dec@te@@@@scancharacters#1\tikz@lib@dec@te@scancharacters{}
+\def\tikz@lib@dec@te@@@@scancharacters#1\tikz@lib@dec@te@scancharacters{}%
-% Reverse the order of the scanned chracters in the text
+% Reverse the order of the scanned characters in the text
% (Actually reverse the ordering of the macros containing the characters)
\def\tikz@lib@dec@te@reversetext{%
\c@pgf@counta=\tikz@lib@dec@te@charactertotalcount%
@@ -317,7 +317,7 @@
\tikz@lib@dec@te@namelet{tikz@lib@dec@te@character@\the\c@pgf@counta @token}{tikz@lib@dec@te@tmp}%
\advance\c@pgf@counta by-1\relax%
\repeatpgfmathloop%
-}
+}%
% Group letters (i.e., anything that isn't the word separator)
% as single characters (words).
@@ -345,7 +345,7 @@
\fi%
\repeatpgfmathloop%
\edef\tikz@lib@dec@te@charactertotalcount{\the\c@pgf@counta}%
-}
+}%
% Get width of node containing only the current character.
@@ -362,7 +362,7 @@
\tikz@lib@dec@te@getcharacter@replacementwidth{\tikz@lib@dec@te@character}%
\let\tikz@lib@dec@te@characterwidth=\tikz@lib@dec@te@character@replacementwidth%
}%
-}
+}%
% Update the character parameters with the widths.
\def\tikz@lib@dec@te@addwidthstoparameters{%
@@ -376,13 +376,13 @@
\tikz@lib@dec@te@addmacroto@parameters{\pgfmathcounter}{\tikz@lib@dec@te@characterprewidth}%
\tikz@lib@dec@te@addmacroto@parameters{\pgfmathcounter}{\tikz@lib@dec@te@characterpostwidth}%
\repeatpgfmathloop%
-}
+}%
% Get the options to applied to a character node.
\def\tikz@lib@dec@te@addoptions#1{%
\expandafter\def\expandafter\tikz@lib@dec@te@options\expandafter{\tikz@lib@dec@te@options,#1}%
-}
+}%
\def\tikz@lib@dec@te@getoptions#1{%
\let\tikz@lib@dec@te@lastcharactercommand=\tikz@lib@dec@te@charactercommand%
@@ -433,23 +433,23 @@
\ifx\tikz@lib@dec@te@character\tikz@lib@dec@te@wordsep%
\tikz@lib@dec@te@addoptions{/pgf/decoration/text effects/every word separator/.try}%
\else%
- \ifnum\tikz@lib@dec@te@wordcount>0\relax%
- \edef\tikz@lib@dec@te@tmp{every word/.try, word \tikz@lib@dec@te@wordcount/.try}%
- \expandafter\tikz@lib@dec@te@addoptions\expandafter{\tikz@lib@dec@te@tmp}%
- \ifnum\tikz@lib@dec@te@lettercount>0\relax%
- \edef\tikz@lib@dec@te@tmp{every letter/.try,every \tikz@lib@dec@te@lettercount\space letter/.try}%
- \expandafter\tikz@lib@dec@te@addoptions\expandafter{\tikz@lib@dec@te@tmp}%
- \ifnum\tikz@lib@dec@te@lettercount=1\relax%
- \edef\tikz@lib@dec@te@tmp{every first letter/.try}%
- \expandafter\tikz@lib@dec@te@addoptions\expandafter{\tikz@lib@dec@te@tmp}%
- \fi%
- \iftikz@lib@dec@te@finalletter%
- \tikz@lib@dec@te@addoptions{every final letter/.try}%
- \fi%
- \fi%
- \fi%
+ \ifnum\tikz@lib@dec@te@wordcount>0\relax%
+ \edef\tikz@lib@dec@te@tmp{every word/.try, word \tikz@lib@dec@te@wordcount/.try}%
+ \expandafter\tikz@lib@dec@te@addoptions\expandafter{\tikz@lib@dec@te@tmp}%
+ \ifnum\tikz@lib@dec@te@lettercount>0\relax%
+ \edef\tikz@lib@dec@te@tmp{every letter/.try,every \tikz@lib@dec@te@lettercount\space letter/.try}%
+ \expandafter\tikz@lib@dec@te@addoptions\expandafter{\tikz@lib@dec@te@tmp}%
+ \ifnum\tikz@lib@dec@te@lettercount=1\relax%
+ \edef\tikz@lib@dec@te@tmp{every first letter/.try}%
+ \expandafter\tikz@lib@dec@te@addoptions\expandafter{\tikz@lib@dec@te@tmp}%
+ \fi%
+ \iftikz@lib@dec@te@finalletter%
+ \tikz@lib@dec@te@addoptions{every final letter/.try}%
+ \fi%
+ \fi%
+ \fi%
\fi%
-}
+}%
% Called by `late positioning' of the node
% to get the width of the bounding box
@@ -463,7 +463,7 @@
\advance\pgf@x by-\pgfpositionnodelaterminy\relax%
\fi%
\xdef\tikz@lib@dec@te@characterwidth@tmp{\the\pgf@x}%
-}
+}%
\def\tikz@lib@dec@te@drawcharacter{%
@@ -473,7 +473,7 @@
\pgfutil@ifundefined{tikz@lib@dec@te@character@replacements@\meaning\tikz@lib@dec@te@character @code}{%
\expandafter\node\expandafter[\tikz@lib@dec@te@options, scale=\tikz@lib@dec@scaledcharacterwidthfactor]{\hbox{\tikz@lib@dec@te@charactercommand{\tikz@lib@dec@te@character}}};%
}{\tikz@lib@dec@te@drawcharacter@replacement{\tikz@lib@dec@te@character}}%
-}
+}%
% Replace the character #1 with a character@replacement
%
@@ -482,7 +482,7 @@
\expandafter\tikzset\expandafter{\tikz@lib@dec@te@options}%
\csname tikz@lib@dec@te@character@replacements@\meaning#1@code\endcsname%
\endpgfscope%
-}
+}%
% Get the width of the character@replacement associated with
% the character #1
@@ -497,7 +497,7 @@
\endpgfpicture}%
\xdef\tikz@lib@dec@te@character@replacementwidth{\the\wd\tikz@lib@dec@te@box}%
\endpgfinterruptpicture%
-}
+}%
\def\tikz@lib@dec@scaledcharacterwidthfactor{1}%
@@ -508,26 +508,26 @@
% The width of the text and characters has already been calculated.
\else%
\let\tikz@lib@dec@te@text=\pgfdecorationtext%
- % Get the chracter tokens and the total number of characters.
+ % Get the character tokens and the total number of characters.
\tikz@lib@dec@te@preparetext%
\iftikz@lib@dec@te@scaletexttopath%
% OK, *scaling* text to path is easy.
% Simply divide the path length by the text width to
- % obtain the scaling factor which will be applied
+ % obtain the scaling factor which will be applied
% "at the last minute"...
\pgfmathdivide{\pgfdecoratedpathlength}{\tikz@lib@dec@te@textwidth}%
\let\tikz@lib@dec@scaledcharacterwidthfactor=\pgfmathresult%
\expandafter\pgfkeys\expandafter{\tikz@lib@dec@te@tmp}%
- % ... and recalulate the (pre and post) widths.
+ % ... and recalculate the (pre and post) widths.
\pgfmathloop
\ifnum\pgfmathcounter>\tikz@lib@dec@te@charactertotalcount%
\else%
\pgf@x=\csname tikz@lib@dec@te@character@\pgfmathcounter @prewidth\endcsname\relax%
- \pgf@x=\tikz@lib@dec@scaledcharacterwidthfactor\pgf@x%
+ \pgf@x=\tikz@lib@dec@scaledcharacterwidthfactor\pgf@x%
\expandafter\edef\csname tikz@lib@dec@te@character@\pgfmathcounter @prewidth\endcsname{\the\pgf@x}%
%
\pgf@x=\csname tikz@lib@dec@te@character@\pgfmathcounter @postwidth\endcsname\relax%
- \pgf@x=\tikz@lib@dec@scaledcharacterwidthfactor\pgf@x%
+ \pgf@x=\tikz@lib@dec@scaledcharacterwidthfactor\pgf@x%
\expandafter\edef\csname tikz@lib@dec@te@character@\pgfmathcounter @postwidth\endcsname{\the\pgf@x}%
\repeatpgfmathloop%
% Update parameters with thewidths.
@@ -536,7 +536,7 @@
\else%
\iftikz@lib@dec@te@fittexttopath%
% *Fitting* text is less easy.
- % The pre and post width of all except the first and last characters
+ % The pre and post width of all except the first and last characters
% must be recalculated.
% Only the post width of the first character and the pre width
% of the final character are scaled as these characters should be
@@ -554,18 +554,18 @@
\advance\pgf@y by-\pgf@xb%
%
\pgfmathdivide{\the\pgf@x}{\the\pgf@y}%
- \let\tikz@lib@dec@characterwidthscale=\pgfmathresult%
+ \let\tikz@lib@dec@characterwidthscale=\pgfmathresult%
\pgfmathloop
\ifnum\pgfmathcounter>\tikz@lib@dec@te@charactertotalcount\relax%
\else%
\ifnum\pgfmathcounter>1\relax%
\pgf@x=\csname tikz@lib@dec@te@character@\pgfmathcounter @prewidth\endcsname\relax%
- \pgf@x=\tikz@lib@dec@characterwidthscale\pgf@x%
+ \pgf@x=\tikz@lib@dec@characterwidthscale\pgf@x%
\expandafter\edef\csname tikz@lib@dec@te@character@\pgfmathcounter @prewidth\endcsname{\the\pgf@x}%
\fi%
\ifnum\pgfmathcounter<\tikz@lib@dec@te@charactertotalcount\relax%
\pgf@x=\csname tikz@lib@dec@te@character@\pgfmathcounter @postwidth\endcsname\relax%
- \pgf@x=\tikz@lib@dec@characterwidthscale\pgf@x%
+ \pgf@x=\tikz@lib@dec@characterwidthscale\pgf@x%
\expandafter\edef\csname tikz@lib@dec@te@character@\pgfmathcounter @postwidth\endcsname{\the\pgf@x}%
\fi%
\repeatpgfmathloop%
@@ -607,17 +607,17 @@
\fi%
\fi%
\fi%
-}
+}%
% Evil hack into the decoration code.
%
% If the path contains single move to and the `path from text'
-% key is set to true. The width of the text is calcuated here
+% key is set to true. The width of the text is calculated here
% and the (straight line) path automatically calculated.
%
\def\pgf@decorate@path@check@moveto#1{%
- \expandafter\pgf@decorate@path@@check@moveto#1\pgf@decorate@stop\pgf@decorate@@stop}
+ \expandafter\pgf@decorate@path@@check@moveto#1\pgf@decorate@stop\pgf@decorate@@stop}%
\def\pgf@decorate@token@stop{\pgf@decorate@stop}%
\def\pgf@decorate@path@@check@moveto#1#2#3#4\pgf@decorate@@stop#5#6{%
@@ -644,19 +644,19 @@
\tikz@lib@dec@te@pathfromtextfalse%
#6%
\fi%
-}
+}%
-\pgfdeclaredecoration{text effects along path}{setup}{
+\pgfdeclaredecoration{text effects along path}{setup}{%
\state{setup}[width=+0pt, next state=scan, persistent precomputation={%
\tikz@lib@dec@te@state@setup@precomputation%
- \def\tikz@lib@dec@te@charactercount{0}%
- }]{}
+ \def\tikz@lib@dec@te@charactercount{0}%
+ }]{}%
%
\state{scan}[width=+0pt, next state=pre token, persistent precomputation={%
\tikz@lib@dec@te@advancecountmacro\tikz@lib@dec@te@charactercount{1}%
% Usual switch to final state is based on distance.
- % Here we also need it to be on the number of the
+ % Here we also need it to be on the number of the
% current character.
\ifnum\tikz@lib@dec@te@charactercount>\tikz@lib@dec@te@charactertotalcount\relax%
\ifnum\tikz@lib@dec@te@repeattext=0\relax%
@@ -668,15 +668,15 @@
\fi%
% Install parameters for this character.
\csname tikz@lib@dec@te@character@\tikz@lib@dec@te@charactercount\endcsname%
-}]{}
+}]{}%
%
-\state{pre token}[width=+\tikz@lib@dec@te@characterprewidth, next state=token]{}
+\state{pre token}[width=+\tikz@lib@dec@te@characterprewidth, next state=token]{}%
\state{token}[width=+0pt, next state=post token]
{%
\tikz@lib@dec@te@drawcharacter%
-}
-\state{post token}[width=+\tikz@lib@dec@te@characterpostwidth, next state=scan]{}
-}
+}%
+\state{post token}[width=+\tikz@lib@dec@te@characterpostwidth, next state=scan]{}%
+}%
% Parse styles for individual characters
@@ -688,9 +688,9 @@
\tikz@lib@dec@te@scancharacters{%
\pgfkeysalso{/pgf/decoration/text effects/character {\meaning\tikz@lib@dec@te@character}/.style={#2}}%
}%
-}
+}%
-% Parse replacment code for for individual characters
+% Parse replacement code for for individual characters
% #1 a string of characters (e.g., aieou{\"U}{\"a"})
% #2 the code to execute to each character.
%
@@ -699,6 +699,6 @@
\tikz@lib@dec@te@scancharacters{%
\expandafter\def\csname tikz@lib@dec@te@character@replacements@\meaning\tikz@lib@dec@te@character @code\endcsname{#2}%
}%
-}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryer.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryer.code.tex
index fcacb5d4399..a2a80a5f49f 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryer.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryer.code.tex
@@ -7,32 +7,32 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryer.code.tex,v 1.2 2008/02/20 11:00:42 tantau Exp $
+\ProvidesFileRCS{tikzlibraryer.code.tex}
-\usetikzlibrary{shapes.geometric}
+\usetikzlibrary{shapes.geometric}%
% Styles for entity types:
-\tikzstyle{every entity}= []
-\tikzstyle{entity}= [rectangle,draw,
+\tikzset{every entity/.style= {}}%
+\tikzset{entity/.style= {rectangle,draw,
minimum height=2\baselineskip,
- minimum width=4\baselineskip,every entity]
+ minimum width=4\baselineskip,every entity}}%
% Styles for relationship types:
-\tikzstyle{every relationship}= []
-\tikzstyle{relationship}= [diamond,draw,
+\tikzset{every relationship/.style= {}}%
+\tikzset{relationship/.style= {diamond,draw,
minimum size=1.5\baselineskip,
inner sep=1pt,
- every relationship]
+ every relationship}}%
% Styles for relationship types:
-\tikzstyle{every attribute}= []
-\tikzstyle{attribute}= [minimum size=1.5\baselineskip,ellipse,draw,every attribute]
-\tikzstyle{key attribute}= [font=\itshape,attribute]
+\tikzset{every attribute/.style= {}}%
+\tikzset{attribute/.style= {minimum size=1.5\baselineskip,ellipse,draw,every attribute}}%
+\tikzset{key attribute/.style= {font=\itshape,attribute}}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfadings.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfadings.code.tex
index 589c3356f65..bec6487b98a 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfadings.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfadings.code.tex
@@ -7,9 +7,9 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfadings.code.tex,v 1.2 2009/11/15 18:53:00 ludewich Exp $
+\ProvidesFileRCS{tikzlibraryfadings.code.tex}
-\usepgflibrary{fadings}
+\usepgflibrary{fadings}%
%
% Environments for creating fadings
@@ -19,18 +19,18 @@
\begingroup%
\setbox\pgfpic=\hbox\bgroup%
\tikzpicture%
-}
+}%
\def\endtikzfadingfrompicture{%
\global\let\tikz@smuggle=\tikz@fig@name%
\endtikzpicture
\egroup%
\pgfdeclarefading{\tikz@smuggle}{\box\pgfpic}%
\endgroup%
-}
+}%
% This makes it easier to maintain compatibility with the external lib:
-\def\starttikzfadingfrompicture{\tikzfadingfrompicture}
-\def\stopttikzfadingfrompicture{\endtikzfadingfrompicture}
+\def\starttikzfadingfrompicture{\tikzfadingfrompicture}%
+\def\stopttikzfadingfrompicture{\endtikzfadingfrompicture}%
\def\tikzfading[#1]{%
{%
@@ -43,6 +43,6 @@
{\pgfuseshading{\tikz@shading}};
}%
}%
- \pgfdeclarefading{\tikz@smuggle}{\box\pgfpic}%
+ \pgfdeclarefading{\tikz@smuggle}{\box\pgfpic}%
}%
-}
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfit.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfit.code.tex
index ef6a88dc1a9..4f3dc6be3de 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfit.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfit.code.tex
@@ -7,13 +7,13 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfit.code.tex,v 1.5 2013/07/12 17:33:49 tantau Exp $
+\ProvidesFileRCS{tikzlibraryfit.code.tex}
\pgfkeys{/tikz/fit/.code=\tikz@lib@fit{#1},
/tikz/rotate fit/.code=\def\tikz@lib@fit@rotate{#1}\pgfkeysalso{/tikz/rotate=#1}
-}
+}%
-\def\tikz@lib@fit@rotate{0}
+\def\tikz@lib@fit@rotate{0}%
\def\tikz@lib@fit#1{%
\pgf@xb=-16000pt\relax%
@@ -25,7 +25,7 @@
%
% Now iterate over the coordinates
\tikz@lib@fit@scan#1\pgf@stop%
- % Now, let's see what has happend
+ % Now, let's see what has happened
\ifdim\pgf@xa>\pgf@xa%
% Nothing... Ok, let's just ignore this.
\else%
@@ -39,7 +39,7 @@
\ifdim\tikz@lib@fit@rotate pt=0pt\relax%
{%
\pgftransforminvert%
- \pgf@pos@transform{\pgf@xa}{\pgf@ya}%
+ \pgf@pos@transform{\pgf@xa}{\pgf@ya}%
\global\pgf@xa\pgf@xa
\global\pgf@ya\pgf@ya
}
@@ -68,15 +68,16 @@
\pgf@x=\pgf@y%
\pgf@y=.5\pgf@y%
\pgfkeysalso{
+ /tikz/transform shape=false,
/tikz/text height/.expanded=\the\pgf@y-.5\dp\pgfnodeparttextbox,
/tikz/text depth/.expanded=\the\pgf@x-\noexpand\the\ht\pgfnodeparttextbox}%
\pgfkeysalso{every fit/.try}%
\fi%
-}
+}%
\def\tikz@lib@fit@scan{%
\pgfutil@ifnextchar\pgf@stop{\pgfutil@gobble}
- {\tikz@scan@one@point\tikz@lib@fit@scan@handle}}
+ {\tikz@scan@one@point\tikz@lib@fit@scan@handle}}%
\def\tikz@lib@fit@scan@handle#1{%
\iftikz@shapeborder%
@@ -89,7 +90,7 @@
\tikz@lib@fit@adjust{#1}%
\fi%
\tikz@lib@fit@scan%
-}
+}%
\def\tikz@lib@fit@adjust#1{%
\ifdim\tikz@lib@fit@rotate pt=0pt\relax%
@@ -108,7 +109,7 @@
\pgfsettransform\tikz@lib@fit@transform%
\pgf@pos@transform{\pgf@xc}{\pgf@yc}%
\global\pgf@x=\pgf@xc%
- \global\pgf@y=\pgf@yc%
+ \global\pgf@y=\pgf@yc%
}%
\fi%
\ifdim\pgf@x<\pgf@xa%
@@ -123,7 +124,7 @@
\ifdim\pgf@y>\pgf@yb%
\pgf@yb=\pgf@y%
\fi%
-}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfixedpointarithmetic.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfixedpointarithmetic.code.tex
index 56d35c5008b..8560ecfb59b 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfixedpointarithmetic.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfixedpointarithmetic.code.tex
@@ -7,4 +7,4 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgflibrary{fixedpointarithmetic}
+\usepgflibrary{fixedpointarithmetic}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex
index 8cd08fc5cd0..143acd9e9e8 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex
@@ -8,17 +8,18 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfolding.code.tex,v 1.5 2015/08/03 08:39:35 cfeuersaenger Exp $
+\ProvidesFileRCS{tikzlibraryfolding.code.tex}
%
% Length of a standard line in a folding
-%
+%
-\tikzoption{folding line length}{\pgfmathsetlength\tikz@lib@fold@length{#1}}
+\tikzoption{folding line length}{\pgfmathsetlength\tikz@lib@fold@length{#1}}%
\newdimen\tikz@lib@fold@length
\tikz@lib@fold@length=2cm
+
% Faces
% -----
@@ -35,7 +36,7 @@
\scope[rotate=60]
#4
\endscope
-}
+}%
\def\tikz@lib@fold@square#1#2#3#4#5{%
\scope[xshift=.5\tikz@lib@fold@length,yshift=.5\tikz@lib@fold@length]
@@ -53,7 +54,7 @@
\scope[rotate=90]
#5
\endscope
-}
+}%
\def\tikz@lib@fold@pentagon#1#2#3#4#5#6{%
\scope[xshift=.5\tikz@lib@fold@length,yshift=0.68819\tikz@lib@fold@length]
@@ -74,7 +75,7 @@
\scope[shift={(108:\tikz@lib@fold@length)},rotate=36]
#6
\endscope
-}
+}%
\def\tikz@lib@fold@hexagon#1#2#3#4#5#6#7{%
\scope
@@ -113,7 +114,7 @@
rotate=60]
#7
\endscope
-}
+}%
\def\tikz@lib@fold@octagon#1#2#3#4#5#6#7#8#9{%
\scope[xshift=.5\tikz@lib@fold@length,yshift=1.20711\tikz@lib@fold@length]
@@ -143,7 +144,7 @@
\scope[xshift=-.70711\tikz@lib@fold@length,yshift=1.70711\tikz@lib@fold@length,rotate=45]
#9
\endscope
-}
+}%
\def\tikz@lib@fold@decagon#1#2#3#4#5#6#7{%
\scope[shift={(72:1.61803\tikz@lib@fold@length)}] %decagon inside a circle with radius the golden ratio has side length 1
@@ -192,7 +193,7 @@
#7
\endscope
\tikz@lib@fold@decagonbis
-}
+}%
\def\tikz@lib@fold@decagonbis#1#2#3#4{%
\scope
@@ -217,119 +218,119 @@
rotate=36]
#4
\endscope
-}
+}%
-\def\tikz@lib@fold@path{\draw[every fold](0,0) -- (\tikz@lib@fold@length,0pt);}
-\def\tikz@lib@fold@cut@path{\draw[every cut](0,0) -- (\tikz@lib@fold@length,0pt);}
+\def\tikz@lib@fold@path{\draw[every fold](0,0) -- (\tikz@lib@fold@length,0pt);}%
+\def\tikz@lib@fold@cut@path{\draw[every cut](0,0) -- (\tikz@lib@fold@length,0pt);}%
\def\tikz@lib@fold@ear@path{
\path[every ear] (0,0) -- (.5\tikz@lib@fold@length,.2\tikz@lib@fold@length) --(\tikz@lib@fold@length,0pt) --(0,0) -- cycle;
\draw[every fold](0,0) -- (\tikz@lib@fold@length,0pt);
- \draw[every cut] (0,0) -- (.5\tikz@lib@fold@length,.2\tikz@lib@fold@length) --(\tikz@lib@fold@length,0pt);}
+ \draw[every cut] (0,0) -- (.5\tikz@lib@fold@length,.2\tikz@lib@fold@length) --(\tikz@lib@fold@length,0pt);}%
\def\tikz@lib@fold@ear@custom@left@path#1{
\path[every ear] (0,0) -- (#1:.66\tikz@lib@fold@length) -- (\tikz@lib@fold@length,0pt) --(0,0) -- cycle;
\draw[every fold](0,0) -- (\tikz@lib@fold@length,0pt);
- \draw[every cut] (0,0) -- (#1:.66\tikz@lib@fold@length) -- (\tikz@lib@fold@length,0pt);}
+ \draw[every cut] (0,0) -- (#1:.66\tikz@lib@fold@length) -- (\tikz@lib@fold@length,0pt);}%
\def\tikz@lib@fold@ear@custom@right@path#1{
\path[every ear] (0,0) -- (\tikz@lib@fold@length,0pt) -- ++(-#1:-.66\tikz@lib@fold@length) --(0,0) -- cycle;
\draw[every fold](0,0) -- (\tikz@lib@fold@length,0pt);
- \draw[every cut] (\tikz@lib@fold@length,0pt) -- ++(-#1:-.66\tikz@lib@fold@length) -- (0,0);}
+ \draw[every cut] (\tikz@lib@fold@length,0pt) -- ++(-#1:-.66\tikz@lib@fold@length) -- (0,0);}%
-\tikzstyle{every ear}=[]
-\tikzstyle{every cut}=[]
-\tikzstyle{every fold}=[help lines]
+\tikzset{every ear/.style={}}%
+\tikzset{every cut/.style={}}%
+\tikzset{every fold/.style={help lines}}%
-\tikzoption{face 1}{\def\tikz@lib@fold@face@A{#1}}
-\tikzoption{face 2}{\def\tikz@lib@fold@face@B{#1}}
-\tikzoption{face 3}{\def\tikz@lib@fold@face@C{#1}}
-\tikzoption{face 4}{\def\tikz@lib@fold@face@D{#1}}
-\tikzoption{face 5}{\def\tikz@lib@fold@face@E{#1}}
-\tikzoption{face 6}{\def\tikz@lib@fold@face@F{#1}}
-\tikzoption{face 7}{\def\tikz@lib@fold@face@G{#1}}
-\tikzoption{face 8}{\def\tikz@lib@fold@face@H{#1}}
-\tikzoption{face 9}{\def\tikz@lib@fold@face@I{#1}}
-\tikzoption{face 10}{\def\tikz@lib@fold@face@J{#1}}
-\tikzoption{face 11}{\def\tikz@lib@fold@face@K{#1}}
-\tikzoption{face 12}{\def\tikz@lib@fold@face@L{#1}}
-\tikzoption{face 13}{\def\tikz@lib@fold@face@M{#1}}
-\tikzoption{face 14}{\def\tikz@lib@fold@face@N{#1}}
-\tikzoption{face 15}{\def\tikz@lib@fold@face@O{#1}}
-\tikzoption{face 16}{\def\tikz@lib@fold@face@P{#1}}
-\tikzoption{face 17}{\def\tikz@lib@fold@face@Q{#1}}
-\tikzoption{face 18}{\def\tikz@lib@fold@face@R{#1}}
-\tikzoption{face 19}{\def\tikz@lib@fold@face@S{#1}}
-\tikzoption{face 20}{\def\tikz@lib@fold@face@T{#1}}
-\tikzoption{face 21}{\def\tikz@lib@fold@face@U{#1}}
-\tikzoption{face 22}{\def\tikz@lib@fold@face@V{#1}}
-\tikzoption{face 23}{\def\tikz@lib@fold@face@W{#1}}
-\tikzoption{face 24}{\def\tikz@lib@fold@face@X{#1}}
-\tikzoption{face 25}{\def\tikz@lib@fold@face@Y{#1}}
-\tikzoption{face 26}{\def\tikz@lib@fold@face@Z{#1}}
-\tikzoption{face 27}{\def\tikz@lib@fold@face@AA{#1}}
-\tikzoption{face 28}{\def\tikz@lib@fold@face@AB{#1}}
-\tikzoption{face 29}{\def\tikz@lib@fold@face@AC{#1}}
-\tikzoption{face 30}{\def\tikz@lib@fold@face@AD{#1}}
-\tikzoption{face 31}{\def\tikz@lib@fold@face@AE{#1}}
-\tikzoption{face 32}{\def\tikz@lib@fold@face@AF{#1}}
-\tikzoption{face 33}{\def\tikz@lib@fold@face@AG{#1}}
-\tikzoption{face 34}{\def\tikz@lib@fold@face@AH{#1}}
-\tikzoption{face 35}{\def\tikz@lib@fold@face@AI{#1}}
-\tikzoption{face 36}{\def\tikz@lib@fold@face@AJ{#1}}
-\tikzoption{face 37}{\def\tikz@lib@fold@face@AK{#1}}
-\tikzoption{face 38}{\def\tikz@lib@fold@face@AL{#1}}
-\tikzoption{face 39}{\def\tikz@lib@fold@face@AM{#1}}
-\tikzoption{face 40}{\def\tikz@lib@fold@face@AN{#1}}
-\tikzoption{face 41}{\def\tikz@lib@fold@face@AO{#1}}
-\tikzoption{face 42}{\def\tikz@lib@fold@face@AP{#1}}
-\tikzoption{face 43}{\def\tikz@lib@fold@face@AQ{#1}}
-\tikzoption{face 44}{\def\tikz@lib@fold@face@AR{#1}}
-\tikzoption{face 45}{\def\tikz@lib@fold@face@AS{#1}}
-\tikzoption{face 46}{\def\tikz@lib@fold@face@AT{#1}}
-\tikzoption{face 47}{\def\tikz@lib@fold@face@AU{#1}}
-\tikzoption{face 48}{\def\tikz@lib@fold@face@AV{#1}}
-\tikzoption{face 49}{\def\tikz@lib@fold@face@AW{#1}}
-\tikzoption{face 50}{\def\tikz@lib@fold@face@AX{#1}}
-\tikzoption{face 51}{\def\tikz@lib@fold@face@AY{#1}}
-\tikzoption{face 52}{\def\tikz@lib@fold@face@AZ{#1}}
-\tikzoption{face 53}{\def\tikz@lib@fold@face@BA{#1}}
-\tikzoption{face 54}{\def\tikz@lib@fold@face@BB{#1}}
-\tikzoption{face 55}{\def\tikz@lib@fold@face@BC{#1}}
-\tikzoption{face 56}{\def\tikz@lib@fold@face@BD{#1}}
-\tikzoption{face 57}{\def\tikz@lib@fold@face@BE{#1}}
-\tikzoption{face 58}{\def\tikz@lib@fold@face@BF{#1}}
-\tikzoption{face 59}{\def\tikz@lib@fold@face@BG{#1}}
-\tikzoption{face 60}{\def\tikz@lib@fold@face@BH{#1}}
-\tikzoption{face 61}{\def\tikz@lib@fold@face@BI{#1}}
-\tikzoption{face 62}{\def\tikz@lib@fold@face@BJ{#1}}
-\tikzoption{face 63}{\def\tikz@lib@fold@face@BK{#1}}
-\tikzoption{face 64}{\def\tikz@lib@fold@face@BL{#1}}
-\tikzoption{face 65}{\def\tikz@lib@fold@face@BM{#1}}
-\tikzoption{face 66}{\def\tikz@lib@fold@face@BN{#1}}
-\tikzoption{face 67}{\def\tikz@lib@fold@face@BO{#1}}
-\tikzoption{face 68}{\def\tikz@lib@fold@face@BP{#1}}
-\tikzoption{face 69}{\def\tikz@lib@fold@face@BQ{#1}}
-\tikzoption{face 70}{\def\tikz@lib@fold@face@BR{#1}}
-\tikzoption{face 71}{\def\tikz@lib@fold@face@BS{#1}}
-\tikzoption{face 72}{\def\tikz@lib@fold@face@BT{#1}}
-\tikzoption{face 73}{\def\tikz@lib@fold@face@BU{#1}}
-\tikzoption{face 74}{\def\tikz@lib@fold@face@BV{#1}}
-\tikzoption{face 75}{\def\tikz@lib@fold@face@BW{#1}}
-\tikzoption{face 76}{\def\tikz@lib@fold@face@BX{#1}}
-\tikzoption{face 77}{\def\tikz@lib@fold@face@BY{#1}}
-\tikzoption{face 78}{\def\tikz@lib@fold@face@BZ{#1}}
-\tikzoption{face 79}{\def\tikz@lib@fold@face@CA{#1}}
-\tikzoption{face 80}{\def\tikz@lib@fold@face@CB{#1}}
-\tikzoption{face 81}{\def\tikz@lib@fold@face@CC{#1}}
-\tikzoption{face 82}{\def\tikz@lib@fold@face@CD{#1}}
-\tikzoption{face 83}{\def\tikz@lib@fold@face@CE{#1}}
-\tikzoption{face 84}{\def\tikz@lib@fold@face@CF{#1}}
-\tikzoption{face 85}{\def\tikz@lib@fold@face@CG{#1}}
-\tikzoption{face 86}{\def\tikz@lib@fold@face@CH{#1}}
-\tikzoption{face 87}{\def\tikz@lib@fold@face@CI{#1}}
-\tikzoption{face 88}{\def\tikz@lib@fold@face@CJ{#1}}
-\tikzoption{face 89}{\def\tikz@lib@fold@face@CK{#1}}
-\tikzoption{face 90}{\def\tikz@lib@fold@face@CL{#1}}
-\tikzoption{face 91}{\def\tikz@lib@fold@face@CM{#1}}
-\tikzoption{face 92}{\def\tikz@lib@fold@face@CN{#1}}
+\tikzoption{face 1}{\def\tikz@lib@fold@face@A{#1}}%
+\tikzoption{face 2}{\def\tikz@lib@fold@face@B{#1}}%
+\tikzoption{face 3}{\def\tikz@lib@fold@face@C{#1}}%
+\tikzoption{face 4}{\def\tikz@lib@fold@face@D{#1}}%
+\tikzoption{face 5}{\def\tikz@lib@fold@face@E{#1}}%
+\tikzoption{face 6}{\def\tikz@lib@fold@face@F{#1}}%
+\tikzoption{face 7}{\def\tikz@lib@fold@face@G{#1}}%
+\tikzoption{face 8}{\def\tikz@lib@fold@face@H{#1}}%
+\tikzoption{face 9}{\def\tikz@lib@fold@face@I{#1}}%
+\tikzoption{face 10}{\def\tikz@lib@fold@face@J{#1}}%
+\tikzoption{face 11}{\def\tikz@lib@fold@face@K{#1}}%
+\tikzoption{face 12}{\def\tikz@lib@fold@face@L{#1}}%
+\tikzoption{face 13}{\def\tikz@lib@fold@face@M{#1}}%
+\tikzoption{face 14}{\def\tikz@lib@fold@face@N{#1}}%
+\tikzoption{face 15}{\def\tikz@lib@fold@face@O{#1}}%
+\tikzoption{face 16}{\def\tikz@lib@fold@face@P{#1}}%
+\tikzoption{face 17}{\def\tikz@lib@fold@face@Q{#1}}%
+\tikzoption{face 18}{\def\tikz@lib@fold@face@R{#1}}%
+\tikzoption{face 19}{\def\tikz@lib@fold@face@S{#1}}%
+\tikzoption{face 20}{\def\tikz@lib@fold@face@T{#1}}%
+\tikzoption{face 21}{\def\tikz@lib@fold@face@U{#1}}%
+\tikzoption{face 22}{\def\tikz@lib@fold@face@V{#1}}%
+\tikzoption{face 23}{\def\tikz@lib@fold@face@W{#1}}%
+\tikzoption{face 24}{\def\tikz@lib@fold@face@X{#1}}%
+\tikzoption{face 25}{\def\tikz@lib@fold@face@Y{#1}}%
+\tikzoption{face 26}{\def\tikz@lib@fold@face@Z{#1}}%
+\tikzoption{face 27}{\def\tikz@lib@fold@face@AA{#1}}%
+\tikzoption{face 28}{\def\tikz@lib@fold@face@AB{#1}}%
+\tikzoption{face 29}{\def\tikz@lib@fold@face@AC{#1}}%
+\tikzoption{face 30}{\def\tikz@lib@fold@face@AD{#1}}%
+\tikzoption{face 31}{\def\tikz@lib@fold@face@AE{#1}}%
+\tikzoption{face 32}{\def\tikz@lib@fold@face@AF{#1}}%
+\tikzoption{face 33}{\def\tikz@lib@fold@face@AG{#1}}%
+\tikzoption{face 34}{\def\tikz@lib@fold@face@AH{#1}}%
+\tikzoption{face 35}{\def\tikz@lib@fold@face@AI{#1}}%
+\tikzoption{face 36}{\def\tikz@lib@fold@face@AJ{#1}}%
+\tikzoption{face 37}{\def\tikz@lib@fold@face@AK{#1}}%
+\tikzoption{face 38}{\def\tikz@lib@fold@face@AL{#1}}%
+\tikzoption{face 39}{\def\tikz@lib@fold@face@AM{#1}}%
+\tikzoption{face 40}{\def\tikz@lib@fold@face@AN{#1}}%
+\tikzoption{face 41}{\def\tikz@lib@fold@face@AO{#1}}%
+\tikzoption{face 42}{\def\tikz@lib@fold@face@AP{#1}}%
+\tikzoption{face 43}{\def\tikz@lib@fold@face@AQ{#1}}%
+\tikzoption{face 44}{\def\tikz@lib@fold@face@AR{#1}}%
+\tikzoption{face 45}{\def\tikz@lib@fold@face@AS{#1}}%
+\tikzoption{face 46}{\def\tikz@lib@fold@face@AT{#1}}%
+\tikzoption{face 47}{\def\tikz@lib@fold@face@AU{#1}}%
+\tikzoption{face 48}{\def\tikz@lib@fold@face@AV{#1}}%
+\tikzoption{face 49}{\def\tikz@lib@fold@face@AW{#1}}%
+\tikzoption{face 50}{\def\tikz@lib@fold@face@AX{#1}}%
+\tikzoption{face 51}{\def\tikz@lib@fold@face@AY{#1}}%
+\tikzoption{face 52}{\def\tikz@lib@fold@face@AZ{#1}}%
+\tikzoption{face 53}{\def\tikz@lib@fold@face@BA{#1}}%
+\tikzoption{face 54}{\def\tikz@lib@fold@face@BB{#1}}%
+\tikzoption{face 55}{\def\tikz@lib@fold@face@BC{#1}}%
+\tikzoption{face 56}{\def\tikz@lib@fold@face@BD{#1}}%
+\tikzoption{face 57}{\def\tikz@lib@fold@face@BE{#1}}%
+\tikzoption{face 58}{\def\tikz@lib@fold@face@BF{#1}}%
+\tikzoption{face 59}{\def\tikz@lib@fold@face@BG{#1}}%
+\tikzoption{face 60}{\def\tikz@lib@fold@face@BH{#1}}%
+\tikzoption{face 61}{\def\tikz@lib@fold@face@BI{#1}}%
+\tikzoption{face 62}{\def\tikz@lib@fold@face@BJ{#1}}%
+\tikzoption{face 63}{\def\tikz@lib@fold@face@BK{#1}}%
+\tikzoption{face 64}{\def\tikz@lib@fold@face@BL{#1}}%
+\tikzoption{face 65}{\def\tikz@lib@fold@face@BM{#1}}%
+\tikzoption{face 66}{\def\tikz@lib@fold@face@BN{#1}}%
+\tikzoption{face 67}{\def\tikz@lib@fold@face@BO{#1}}%
+\tikzoption{face 68}{\def\tikz@lib@fold@face@BP{#1}}%
+\tikzoption{face 69}{\def\tikz@lib@fold@face@BQ{#1}}%
+\tikzoption{face 70}{\def\tikz@lib@fold@face@BR{#1}}%
+\tikzoption{face 71}{\def\tikz@lib@fold@face@BS{#1}}%
+\tikzoption{face 72}{\def\tikz@lib@fold@face@BT{#1}}%
+\tikzoption{face 73}{\def\tikz@lib@fold@face@BU{#1}}%
+\tikzoption{face 74}{\def\tikz@lib@fold@face@BV{#1}}%
+\tikzoption{face 75}{\def\tikz@lib@fold@face@BW{#1}}%
+\tikzoption{face 76}{\def\tikz@lib@fold@face@BX{#1}}%
+\tikzoption{face 77}{\def\tikz@lib@fold@face@BY{#1}}%
+\tikzoption{face 78}{\def\tikz@lib@fold@face@BZ{#1}}%
+\tikzoption{face 79}{\def\tikz@lib@fold@face@CA{#1}}%
+\tikzoption{face 80}{\def\tikz@lib@fold@face@CB{#1}}%
+\tikzoption{face 81}{\def\tikz@lib@fold@face@CC{#1}}%
+\tikzoption{face 82}{\def\tikz@lib@fold@face@CD{#1}}%
+\tikzoption{face 83}{\def\tikz@lib@fold@face@CE{#1}}%
+\tikzoption{face 84}{\def\tikz@lib@fold@face@CF{#1}}%
+\tikzoption{face 85}{\def\tikz@lib@fold@face@CG{#1}}%
+\tikzoption{face 86}{\def\tikz@lib@fold@face@CH{#1}}%
+\tikzoption{face 87}{\def\tikz@lib@fold@face@CI{#1}}%
+\tikzoption{face 88}{\def\tikz@lib@fold@face@CJ{#1}}%
+\tikzoption{face 89}{\def\tikz@lib@fold@face@CK{#1}}%
+\tikzoption{face 90}{\def\tikz@lib@fold@face@CL{#1}}%
+\tikzoption{face 91}{\def\tikz@lib@fold@face@CM{#1}}%
+\tikzoption{face 92}{\def\tikz@lib@fold@face@CN{#1}}%
\let\tikz@lib@fold@face@A=\pgfutil@empty
@@ -426,102 +427,102 @@
\let\tikz@lib@fold@face@CN=\pgfutil@empty
-\tikzstyle{numbered faces}=[%
- face 1={\node{1};},
- face 2={\node{2};},
- face 3={\node{3};},
- face 4={\node{4};},
- face 5={\node{5};},
- face 6={\node{6};},
- face 7={\node{7};},
- face 8={\node{8};},
- face 9={\node{9};},
- face 10={\node{10};},
- face 11={\node{11};},
- face 12={\node{12};},
- face 13={\node{13};},
- face 14={\node{14};},
- face 15={\node{15};},
- face 16={\node{16};},
- face 17={\node{17};},
- face 18={\node{18};},
- face 19={\node{19};},
- face 20={\node{20};},
- face 21={\node{21};},
- face 22={\node{22};},
- face 23={\node{23};},
- face 24={\node{24};},
- face 25={\node{25};},
- face 26={\node{26};},
- face 27={\node{27};},
- face 28={\node{28};},
- face 29={\node{29};},
- face 30={\node{30};},
- face 31={\node{31};},
- face 32={\node{32};},
- face 33={\node{33};},
- face 34={\node{34};},
- face 35={\node{35};},
- face 36={\node{36};},
- face 37={\node{37};},
- face 38={\node{38};},
- face 39={\node{39};},
- face 40={\node{40};},
- face 41={\node{41};},
- face 42={\node{42};},
- face 43={\node{43};},
- face 44={\node{44};},
- face 45={\node{45};},
- face 46={\node{46};},
- face 47={\node{47};},
- face 48={\node{48};},
- face 49={\node{49};},
- face 50={\node{50};},
- face 51={\node{51};},
- face 52={\node{52};},
- face 53={\node{53};},
- face 54={\node{54};},
- face 55={\node{55};},
- face 56={\node{56};},
- face 57={\node{57};},
- face 58={\node{58};},
- face 59={\node{59};},
- face 60={\node{60};},
- face 61={\node{61};},
- face 62={\node{62};},
- face 63={\node{63};},
- face 64={\node{64};},
- face 65={\node{65};},
- face 66={\node{66};},
- face 67={\node{67};},
- face 68={\node{68};},
- face 69={\node{69};},
- face 70={\node{70};},
- face 71={\node{71};},
- face 72={\node{72};},
- face 73={\node{73};},
- face 74={\node{74};},
- face 75={\node{75};},
- face 76={\node{76};},
- face 77={\node{77};},
- face 78={\node{78};},
- face 79={\node{79};},
- face 80={\node{80};},
- face 81={\node{81};},
- face 82={\node{82};},
- face 83={\node{83};},
- face 84={\node{84};},
- face 85={\node{85};},
- face 86={\node{86};},
- face 87={\node{87};},
- face 88={\node{88};},
- face 89={\node{89};},
- face 90={\node{90};},
- face 91={\node{91};},
- face 92={\node{92};}]
-
+\tikzset{numbered faces/.style={%
+ face 1={\node{1};},
+ face 2={\node{2};},
+ face 3={\node{3};},
+ face 4={\node{4};},
+ face 5={\node{5};},
+ face 6={\node{6};},
+ face 7={\node{7};},
+ face 8={\node{8};},
+ face 9={\node{9};},
+ face 10={\node{10};},
+ face 11={\node{11};},
+ face 12={\node{12};},
+ face 13={\node{13};},
+ face 14={\node{14};},
+ face 15={\node{15};},
+ face 16={\node{16};},
+ face 17={\node{17};},
+ face 18={\node{18};},
+ face 19={\node{19};},
+ face 20={\node{20};},
+ face 21={\node{21};},
+ face 22={\node{22};},
+ face 23={\node{23};},
+ face 24={\node{24};},
+ face 25={\node{25};},
+ face 26={\node{26};},
+ face 27={\node{27};},
+ face 28={\node{28};},
+ face 29={\node{29};},
+ face 30={\node{30};},
+ face 31={\node{31};},
+ face 32={\node{32};},
+ face 33={\node{33};},
+ face 34={\node{34};},
+ face 35={\node{35};},
+ face 36={\node{36};},
+ face 37={\node{37};},
+ face 38={\node{38};},
+ face 39={\node{39};},
+ face 40={\node{40};},
+ face 41={\node{41};},
+ face 42={\node{42};},
+ face 43={\node{43};},
+ face 44={\node{44};},
+ face 45={\node{45};},
+ face 46={\node{46};},
+ face 47={\node{47};},
+ face 48={\node{48};},
+ face 49={\node{49};},
+ face 50={\node{50};},
+ face 51={\node{51};},
+ face 52={\node{52};},
+ face 53={\node{53};},
+ face 54={\node{54};},
+ face 55={\node{55};},
+ face 56={\node{56};},
+ face 57={\node{57};},
+ face 58={\node{58};},
+ face 59={\node{59};},
+ face 60={\node{60};},
+ face 61={\node{61};},
+ face 62={\node{62};},
+ face 63={\node{63};},
+ face 64={\node{64};},
+ face 65={\node{65};},
+ face 66={\node{66};},
+ face 67={\node{67};},
+ face 68={\node{68};},
+ face 69={\node{69};},
+ face 70={\node{70};},
+ face 71={\node{71};},
+ face 72={\node{72};},
+ face 73={\node{73};},
+ face 74={\node{74};},
+ face 75={\node{75};},
+ face 76={\node{76};},
+ face 77={\node{77};},
+ face 78={\node{78};},
+ face 79={\node{79};},
+ face 80={\node{80};},
+ face 81={\node{81};},
+ face 82={\node{82};},
+ face 83={\node{83};},
+ face 84={\node{84};},
+ face 85={\node{85};},
+ face 86={\node{86};},
+ face 87={\node{87};},
+ face 88={\node{88};},
+ face 89={\node{89};},
+ face 90={\node{90};},
+ face 91={\node{91};},
+ face 92={\node{92};}}}%
+
% The foldings defined here:
-
+
\tikzset{
pics/dodecahedron folding/.style = {code=\tikzfoldingdodecahedron[];},
pics/tetrahedron folding/.style = {code=\tikzfoldingtetrahedron[];},
@@ -538,13 +539,13 @@
pics/rhombicuboctahedron folding/.style = {code=\tikzfoldingrhombicuboctahedron[];},
pics/snub cube folding/.style = {code=\tikzfoldingsnubcube[];},
pics/icosidodecahedron folding/.style = {code=\tikzfoldingicosidodecahedron[];}
-}
+}%
+
-
% Platonic solids
% ---------------
-
+
\def\tikzfoldingdodecahedron#1[#2]#3;{%
\begingroup%
\tikzset{#2}%
@@ -633,9 +634,9 @@
{\tikz@lib@fold@cut@path}
}
\endgroup
-}
+}%
-%alternative dodecahedron: larger format possible
+%alternative dodecahedron: larger format possible
\def\tikzfoldingalternatedodecahedron#1[#2]#3;{%
\begingroup%
@@ -645,90 +646,90 @@
{\tikz@lib@fold@pentagon
{\tikz@lib@fold@face@B}
{\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@pentagon
- {\tikz@lib@fold@face@C}
- {\tikz@lib@fold@pentagon
- {\tikz@lib@fold@face@D}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@pentagon
- {\tikz@lib@fold@face@E}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@pentagon
+ {\tikz@lib@fold@face@C}
+ {\tikz@lib@fold@pentagon
+ {\tikz@lib@fold@face@D}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@pentagon
+ {\tikz@lib@fold@face@E}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@pentagon
+ {\tikz@lib@fold@face@F}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
{\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@pentagon
+ {\tikz@lib@fold@face@G}
{\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@pentagon
- {\tikz@lib@fold@face@F}
- {\tikz@lib@fold@ear@path}
{\tikz@lib@fold@ear@path}
{\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
{\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@pentagon
- {\tikz@lib@fold@face@G}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@ear@path}
- }
- }
+ }
+ }
}
{\tikz@lib@fold@ear@path}
{\tikz@lib@fold@pentagon
{\tikz@lib@fold@face@H}
- {\tikz@lib@fold@pentagon
- {\tikz@lib@fold@face@I}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@pentagon
- {\tikz@lib@fold@face@J}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@pentagon
- {\tikz@lib@fold@face@K}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@pentagon
- {\tikz@lib@fold@face@L}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- }
+ {\tikz@lib@fold@pentagon
+ {\tikz@lib@fold@face@I}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@pentagon
+ {\tikz@lib@fold@face@J}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@pentagon
+ {\tikz@lib@fold@face@K}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@pentagon
+ {\tikz@lib@fold@face@L}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ }
}
{\tikz@lib@fold@ear@path}
{\tikz@lib@fold@ear@path}
\endgroup
-}
+}%
-%tetrahedron
+%tetrahedron
\def\tikzfoldingtetrahedron#1[#2]#3;{%
\begingroup%
@@ -737,15 +738,15 @@
{\tikz@lib@fold@face@A}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@B}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@C}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@D}
@@ -754,53 +755,53 @@
{\tikz@lib@fold@cut@path}
}
\endgroup
-}
+}%
-%cube
+%cube
\def\tikzfoldingcube#1[#2]#3;{%
\begingroup%
\tikzset{#2}%
\tikz@lib@fold@square{\tikz@lib@fold@face@A}
{
- \tikz@lib@fold@square{\tikz@lib@fold@face@B}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ \tikz@lib@fold@square{\tikz@lib@fold@face@B}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
{
- \tikz@lib@fold@square{\tikz@lib@fold@face@C}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ \tikz@lib@fold@square{\tikz@lib@fold@face@C}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{
- \tikz@lib@fold@square{\tikz@lib@fold@face@D}
- {
- \tikz@lib@fold@square{\tikz@lib@fold@face@E}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ \tikz@lib@fold@square{\tikz@lib@fold@face@D}
+ {
+ \tikz@lib@fold@square{\tikz@lib@fold@face@E}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
{
- \tikz@lib@fold@square{\tikz@lib@fold@face@F}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ \tikz@lib@fold@square{\tikz@lib@fold@face@F}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
\endgroup
-}
+}%
-%octahedron
+%octahedron
\def\tikzfoldingoctahedron#1[#2]#3;{%
\begingroup%
@@ -809,47 +810,47 @@
{\tikz@lib@fold@face@A}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@B}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@C}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@D}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@C}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@D}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
{\tikz@lib@fold@face@E}
{\tikz@lib@fold@ear@path}
{\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
+ {\tikz@lib@fold@ear@path}
+ }
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@F}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@G}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@H}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@H}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
}
\endgroup
-}
+}%
-%icosahedron
+%icosahedron
\def\tikzfoldingicosahedron#1[#2]#3;{%
\begingroup%
@@ -858,109 +859,109 @@
{\tikz@lib@fold@face@A}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@B}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@C}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@D}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@E}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@F}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@G}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- }
- }
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@C}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@D}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@E}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@F}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@G}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ }
+ }
{\tikz@lib@fold@path}
{\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@H}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@I}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@J}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@K}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@L}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@M}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@N}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- }
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@I}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@J}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@K}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@L}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@M}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@N}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ }
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@O}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@P}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@Q}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@R}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@S}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@P}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@Q}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@R}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@S}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
{\tikz@lib@fold@face@T}
{\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- }
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ }
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
\endgroup
-}
+}%
% Archimedean solids
% ------------------
-%truncated tetrahedron
+%truncated tetrahedron
\def\tikzfoldingtruncatedtetrahedron#1[#2]#3;{%
\begingroup%
@@ -969,58 +970,58 @@
{\tikz@lib@fold@face@A}
{\tikz@lib@fold@hexagon
{\tikz@lib@fold@face@B}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@C}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@hexagon
{\tikz@lib@fold@face@D}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@E}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@hexagon
{\tikz@lib@fold@face@F}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@G}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@G}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@H}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
\endgroup
-}
+}%
-%cuboctahedron
+%cuboctahedron
\def\tikzfoldingcuboctahedron#1[#2]#3;{%
\begingroup%
@@ -1029,80 +1030,80 @@
{\tikz@lib@fold@face@A}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@B}
- {\tikz@lib@fold@square
- {\tikz@lib@fold@face@C}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@D}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@square
- {\tikz@lib@fold@face@E}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@square
+ {\tikz@lib@fold@face@C}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@D}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@square
+ {\tikz@lib@fold@face@E}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
- }
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@F}
- {\tikz@lib@fold@square
- {\tikz@lib@fold@face@G}
+ {\tikz@lib@fold@square
+ {\tikz@lib@fold@face@G}
{\tikz@lib@fold@ear@path}
{\tikz@lib@fold@ear@path}
{\tikz@lib@fold@path}
{\tikz@lib@fold@ear@path}
}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@H}
- {\tikz@lib@fold@square
- {\tikz@lib@fold@face@I}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@J}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@square
+ {\tikz@lib@fold@face@I}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@J}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@triangle
{\tikz@lib@fold@face@K}
- {\tikz@lib@fold@square
- {\tikz@lib@fold@face@L}
- {\tikz@lib@fold@triangle
- {\tikz@lib@fold@face@M}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@square
+ {\tikz@lib@fold@face@L}
+ {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@face@M}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
{\tikz@lib@fold@face@N}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
\endgroup
-}
+}%
%truncated cube
@@ -1113,104 +1114,104 @@
{\tikz@lib@fold@face@A}
{\tikz@lib@fold@octagon
{\tikz@lib@fold@face@B}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@triangle
{\tikz@lib@fold@face@C}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@triangle
{\tikz@lib@fold@face@D}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
{\tikz@lib@fold@face@E}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@triangle
{\tikz@lib@fold@face@F}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
}
{\tikz@lib@fold@cut@path}
{\tikz@lib@fold@octagon
{\tikz@lib@fold@face@G}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@triangle
{\tikz@lib@fold@face@H}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@cut@path}
{\tikz@lib@fold@octagon
{\tikz@lib@fold@face@I}
- {\tikz@lib@fold@octagon
+ {\tikz@lib@fold@octagon
{\tikz@lib@fold@face@J}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@triangle
{\tikz@lib@fold@face@K}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
{\tikz@lib@fold@face@L}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@cut@path}
{\tikz@lib@fold@octagon
{\tikz@lib@fold@face@M}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@triangle
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@triangle
{\tikz@lib@fold@face@N}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@cut@path}
\endgroup
-}
+}%
%truncated octahedron
@@ -1319,7 +1320,7 @@
{\tikz@lib@fold@ear@path}
{\tikz@lib@fold@cut@path}
\endgroup
-}
+}%
%rhombicuboctahedron
@@ -1476,7 +1477,7 @@
{\tikz@lib@fold@ear@path}
}
\endgroup
-}
+}%
%truncated cuboctahedron
@@ -1489,88 +1490,88 @@
{\tikz@lib@fold@face@B}
{\tikz@lib@fold@square
{\tikz@lib@fold@face@C}
- {\tikz@lib@fold@octagon
- {\tikz@lib@fold@face@D}
- {\tikz@lib@fold@square
- {\tikz@lib@fold@face@E}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@hexagon
- {\tikz@lib@fold@face@F}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@custom@right@path{15}}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@hexagon
- {\tikz@lib@fold@face@G}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@custom@left@path{15}}
- {\tikz@lib@fold@ear@path}
- }
- }
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@square
- {\tikz@lib@fold@face@H}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@square
- {\tikz@lib@fold@face@I}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@hexagon
- {\tikz@lib@fold@face@J}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@custom@right@path{15}}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@custom@left@path{15}}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@hexagon
- {\tikz@lib@fold@face@K}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@custom@right@path{15}}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@custom@left@path{15}}
- {\tikz@lib@fold@ear@path}
- }
+ {\tikz@lib@fold@octagon
+ {\tikz@lib@fold@face@D}
+ {\tikz@lib@fold@square
+ {\tikz@lib@fold@face@E}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@hexagon
+ {\tikz@lib@fold@face@F}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@custom@right@path{15}}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@hexagon
+ {\tikz@lib@fold@face@G}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@custom@left@path{15}}
+ {\tikz@lib@fold@ear@path}
+ }
+ }
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@square
+ {\tikz@lib@fold@face@H}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@square
+ {\tikz@lib@fold@face@I}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@hexagon
+ {\tikz@lib@fold@face@J}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@custom@right@path{15}}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@custom@left@path{15}}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@hexagon
+ {\tikz@lib@fold@face@K}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@custom@right@path{15}}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@custom@left@path{15}}
+ {\tikz@lib@fold@ear@path}
+ }
}
{\tikz@lib@fold@cut@path}
{\tikz@lib@fold@square
{\tikz@lib@fold@face@L}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@cut@path}
{\tikz@lib@fold@path}
{\tikz@lib@fold@cut@path}
{\tikz@lib@fold@square
{\tikz@lib@fold@face@M}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@cut@path}
}
@@ -1587,86 +1588,86 @@
{\tikz@lib@fold@face@O}
{\tikz@lib@fold@square
{\tikz@lib@fold@face@P}
- {\tikz@lib@fold@octagon
- {\tikz@lib@fold@face@Q}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@square
- {\tikz@lib@fold@face@R}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@square
- {\tikz@lib@fold@face@S}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@hexagon
- {\tikz@lib@fold@face@T}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@custom@right@path{15}}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@custom@left@path{15}}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@hexagon
- {\tikz@lib@fold@face@U}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@ear@custom@right@path{15}}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@custom@left@path{15}}
- {\tikz@lib@fold@ear@path}
- }
+ {\tikz@lib@fold@octagon
+ {\tikz@lib@fold@face@Q}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@square
+ {\tikz@lib@fold@face@R}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@square
+ {\tikz@lib@fold@face@S}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@hexagon
+ {\tikz@lib@fold@face@T}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@custom@right@path{15}}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@custom@left@path{15}}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@hexagon
+ {\tikz@lib@fold@face@U}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@ear@custom@right@path{15}}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@custom@left@path{15}}
+ {\tikz@lib@fold@ear@path}
+ }
}
{\tikz@lib@fold@cut@path}
{\tikz@lib@fold@square
{\tikz@lib@fold@face@V}
- {\tikz@lib@fold@octagon
- {\tikz@lib@fold@face@W}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@octagon
+ {\tikz@lib@fold@face@W}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@cut@path}
{\tikz@lib@fold@path}
{\tikz@lib@fold@cut@path}
{\tikz@lib@fold@square
{\tikz@lib@fold@face@X}
- {\tikz@lib@fold@octagon
- {\tikz@lib@fold@face@Y}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@octagon
+ {\tikz@lib@fold@face@Y}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{\tikz@lib@fold@cut@path}
}
@@ -1680,9 +1681,9 @@
{\tikz@lib@fold@ear@path}
}
\endgroup
-}
+}%
-%snub cube
+%snub cube
\def\tikzfoldingsnubcube#1[#2]#3;{%
\begingroup%
@@ -1690,200 +1691,200 @@
\tikz@lib@fold@square{\tikz@lib@fold@face@A}
{
\tikz@lib@fold@triangle{\tikz@lib@fold@face@B}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@C}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@D}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@square{\tikz@lib@fold@face@E}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@F}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@G}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@H}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@I}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@J}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@C}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@D}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@square{\tikz@lib@fold@face@E}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@F}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@G}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@H}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@I}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@J}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{
\tikz@lib@fold@triangle{\tikz@lib@fold@face@K}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@L}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@M}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@square{\tikz@lib@fold@face@N}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@O}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@P}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@Q}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@R}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@S}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@L}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@M}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@square{\tikz@lib@fold@face@N}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@O}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@P}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@Q}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@R}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@S}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{
\tikz@lib@fold@triangle{\tikz@lib@fold@face@T}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@U}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@V}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@square{\tikz@lib@fold@face@W}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@X}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@Y}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@Z}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@AA}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@AB}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@U}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@V}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@square{\tikz@lib@fold@face@W}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@X}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@Y}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@Z}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@AA}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@AB}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
{
\tikz@lib@fold@triangle{\tikz@lib@fold@face@AC}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@AD}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@AE}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@square{\tikz@lib@fold@face@AF}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@AG}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@AH}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@AI}
- {
- \tikz@lib@fold@square{\tikz@lib@fold@face@AJ}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@AK}
- {\tikz@lib@fold@ear@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@ear@path}
- }
- {\tikz@lib@fold@path}
- {
- \tikz@lib@fold@triangle{\tikz@lib@fold@face@AL}
- {\tikz@lib@fold@cut@path}
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- }
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
- }
- {\tikz@lib@fold@path}
- {\tikz@lib@fold@cut@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@AD}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@AE}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@square{\tikz@lib@fold@face@AF}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@AG}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@AH}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@AI}
+ {
+ \tikz@lib@fold@square{\tikz@lib@fold@face@AJ}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@AK}
+ {\tikz@lib@fold@ear@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@ear@path}
+ }
+ {\tikz@lib@fold@path}
+ {
+ \tikz@lib@fold@triangle{\tikz@lib@fold@face@AL}
+ {\tikz@lib@fold@cut@path}
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ }
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
+ }
+ {\tikz@lib@fold@path}
+ {\tikz@lib@fold@cut@path}
}
\endgroup
-}
+}%
% icosidodecahedron
@@ -2074,4 +2075,4 @@
{\tikz@lib@fold@cut@path}
}
\endgroup
-}
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfpu.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfpu.code.tex
index eda3ce51996..ad8d2671ee8 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfpu.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryfpu.code.tex
@@ -7,4 +7,4 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgflibrary{fpu}
+\usepgflibrary{fpu}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex
index 361d961339b..f3e4f94144b 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryintersections.code.tex
@@ -7,28 +7,28 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgflibrary{intersections}
+\usepgflibrary{intersections}%
% FIXME : the 'name path global' is not reset properly - and some
% following 'name path' will append to it rather that reset it.
\pgfkeys{%
/tikz/name path global/.code={%
- % reset any "old" variables inheritted from some other path
- % - we do not accidentally want to append to an old path with the
- % same name (or if someone provided the option twice)...
- \expandafter\global\expandafter\let\csname tikz@intersect@path@name@#1\endcsname=\relax
- \tikz@key@name@path{#1}{\gdef}%
+ % reset any "old" variables inherited from some other path
+ % - we do not accidentally want to append to an old path with the
+ % same name (or if someone provided the option twice)...
+ \expandafter\global\expandafter\let\csname tikz@intersect@path@name@#1\endcsname=\relax
+ \tikz@key@name@path{#1}{\gdef}%
},
/tikz/name path local/.code={%
\pgfkeys{/tikz/name path={#1}}%
},
/tikz/name path/.code={%
- % hm. Do we need this "reset old option" as in 'name path global'
- % for this case as well?
- \tikz@key@name@path{#1}{\def}%
+ % hm. Do we need this "reset old option" as in 'name path global'
+ % for this case as well?
+ \tikz@key@name@path{#1}{\def}%
},
-}
+}%
% #1: the name to assign.
% #2: one of '\def' or '\gdef'.
@@ -51,27 +51,27 @@
\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\tikz@marshal%
\expandafter\expandafter\expandafter{\expandafter\tikz@marshal\expandafter{\tikz@intersect@temppath}}%
\expandafter\pgfutil@g@addto@macro\expandafter\tikz@intersect@namedpaths\expandafter{\tikz@marshal}%
-}
+}%
\let\tikz@finish@orig=\tikz@finish
\def\tikz@finish{%
\tikz@finish@orig%
\tikz@intersect@finish%
-}
+}%
-\def\tikz@intersect@finish{%
+\def\tikz@intersect@finish{%
\ifx\tikz@intersect@namedpaths\pgfutil@empty%
\else%
\tikz@intersect@namedpaths%
- % FIXME : it is reasonable to reset this globally as it is global
- % in its nature. But the reset instruction should be moved to
- % \endscope or something related. Resetting it here breaks the
- % manual
+ % FIXME : it is reasonable to reset this globally as it is global
+ % in its nature. But the reset instruction should be moved to
+ % \endscope or something related. Resetting it here breaks the
+ % manual
\let\tikz@intersect@namedpaths=\pgfutil@empty%
\fi%
-}
-
+}%
+
\let\tikz@intersect@namedpaths=\pgfutil@empty
\let\tikz@intersect@path@a=\pgfutil@empty
\let\tikz@intersect@path@b=\pgfutil@empty
@@ -124,24 +124,24 @@
total/.store in=\tikz@intersect@total,
by/.store in=\tikz@intersect@by,
sort by/.code=\edef\tikz@intersect@sort@by{#1}\tikz@intersect@check@sort@by%
-}
+}%
\def\tikz@intersect@check@sort@by{%
- \ifx\tikz@intersect@sort@by\tikz@intersect@path@a%
- \pgfintersectionsortbyfirstpath%
- \else%
- \ifx\tikz@intersect@sort@by\tikz@intersect@path@b%
- \pgfintersectionsortbysecondpath%
- \else%
- \pgf@intersect@sortfalse%
- \fi%
- \fi%
-}
+ \ifx\tikz@intersect@sort@by\tikz@intersect@path@a%
+ \pgfintersectionsortbyfirstpath%
+ \else%
+ \ifx\tikz@intersect@sort@by\tikz@intersect@path@b%
+ \pgfintersectionsortbysecondpath%
+ \else%
+ \pgf@intersect@sortfalse%
+ \fi%
+ \fi%
+}%
\def\tikz@intersect@path@names@parse#1 and #2\tikz@stop{%
\def\tikz@intersect@path@a{#1}%
\def\tikz@intersect@path@b{#2}%
-}
+}%
\def\tikz@intersect@name@parse{\pgfutil@ifnextchar[\tikz@intersect@name@parse@opt{\tikz@intersect@name@parse@opt[]}}%}
\def\tikz@intersect@name@parse@opt[#1]#2\pgf@stop{%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarylindenmayersystems.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarylindenmayersystems.code.tex
index 4095f3a376c..89807c8e04d 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarylindenmayersystems.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarylindenmayersystems.code.tex
@@ -7,75 +7,75 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgflibrary{lindenmayersystems}
+\usepgflibrary{lindenmayersystems}%
\def\tikz@@lsystem-system{%
- \pgfutil@ifnextchar[{\tikz@lsystem@options}{\tikz@lsystem@options[]}}
+ \pgfutil@ifnextchar[{\tikz@lsystem@options}{\tikz@lsystem@options[]}}%
\def\tikz@lsystem indenmayer system{%
- \pgfutil@ifnextchar[{\tikz@lsystem@options}{\tikz@lsystem@options[]}}
+ \pgfutil@ifnextchar[{\tikz@lsystem@options}{\tikz@lsystem@options[]}}%
\def\tikz@lsystem@options[#1]{%
- \tikzset{#1}%
- \ifx\tikz@lsystem@rules\pgfutil@empty%
- \else%
- \tikz@lsystem@declare%
- \def\tikz@lsystem@name{tikz@temp}%
- \fi%
- \ifx\tikz@lsystem@anchor\pgfutil@empty%
- \pgfpathmoveto{\pgfqpoint{\tikz@lastxsaved}{\tikz@lastysaved}}%
- \pgflindenmayersystem{\tikz@lsystem@name}{\tikz@lsystem@axiom}{\tikz@lsystem@order}%
- \else%
- \pgfextract@process\tikz@lsystem@pos{\pgfqpoint{\tikz@lastxsaved}{\tikz@lastysaved}}%
- \setbox\pgfnodeparttextbox=\hbox{%
- \pgfinterruptpicture%
- \pgfpicture%
- \pgfpathmoveto{\pgfpointorigin}%
- \pgflindenmayersystem{\tikz@lsystem@name}{\tikz@lsystem@axiom}{\tikz@lsystem@order}%
- \begingroup%
- \tikz@finish%
- \endpgfpicture%
- \endpgfinterruptpicture%
- }%
- {%
- \pgftransformshift{\tikz@lsystem@pos}%
- \tikzset{inner sep=0pt, outer sep=0pt, minimum size=0pt}%
- \pgfmultipartnode{rectangle}{\tikz@lsystem@anchor}{lindenmayer system}{\pgfusepath{discard}}%
- }%
- \fi%
- \tikz@scan@next@command}
+ \tikzset{#1}%
+ \ifx\tikz@lsystem@rules\pgfutil@empty%
+ \else%
+ \tikz@lsystem@declare%
+ \def\tikz@lsystem@name{tikz@temp}%
+ \fi%
+ \ifx\tikz@lsystem@anchor\pgfutil@empty%
+ \pgfpathmoveto{\pgfqpoint{\tikz@lastxsaved}{\tikz@lastysaved}}%
+ \pgflindenmayersystem{\tikz@lsystem@name}{\tikz@lsystem@axiom}{\tikz@lsystem@order}%
+ \else%
+ \pgfextract@process\tikz@lsystem@pos{\pgfqpoint{\tikz@lastxsaved}{\tikz@lastysaved}}%
+ \setbox\pgfnodeparttextbox=\hbox{%
+ \pgfinterruptpicture%
+ \pgfpicture%
+ \pgfpathmoveto{\pgfpointorigin}%
+ \pgflindenmayersystem{\tikz@lsystem@name}{\tikz@lsystem@axiom}{\tikz@lsystem@order}%
+ \begingroup%
+ \tikz@finish%
+ \endpgfpicture%
+ \endpgfinterruptpicture%
+ }%
+ {%
+ \pgftransformshift{\tikz@lsystem@pos}%
+ \tikzset{inner sep=0pt, outer sep=0pt, minimum size=0pt}%
+ \pgfmultipartnode{rectangle}{\tikz@lsystem@anchor}{lindenmayer system}{\pgfusepath{discard}}%
+ }%
+ \fi%
+ \tikz@scan@next@command}%
\tikzset{%
- lindenmayer system/.style={/pgf/lindenmayer system/.cd, #1,/tikz/.cd},
- l-system/.style={lindenmayer system={#1}},
-}
+ lindenmayer system/.style={/pgf/lindenmayer system/.cd, #1,/tikz/.cd},
+ l-system/.style={lindenmayer system={#1}},
+}%
\pgfkeys{/pgf/lindenmayer system/.cd,
- name/.code=\edef\tikz@lsystem@name{#1}\let\tikz@lsystem@rules=\pgfutil@empty,%
- axiom/.store in=\tikz@lsystem@axiom,%
- order/.store in=\tikz@lsystem@order,
- .unknown/.code={%
- \pgfutil@ifundefined{pgf@lsystem@\pgfkeyscurrentname}{%
- \pgfkeys{/errors/unknown key={/pgf/lindenmayer system/\pgfkeyscurrentname}{#1}}%
- \let\tikz@lsystem@name=\pgfutil@empty%
- }%
- {\edef\tikz@lsystem@name{\pgfkeyscurrentname}}
- },%
- anchor/.store in=\tikz@lsystem@anchor,%
- rule set/.store in=\tikz@lsystem@rules
-}
+ name/.code=\edef\tikz@lsystem@name{#1}\let\tikz@lsystem@rules=\pgfutil@empty,%
+ axiom/.store in=\tikz@lsystem@axiom,%
+ order/.store in=\tikz@lsystem@order,
+ .unknown/.code={%
+ \pgfutil@ifundefined{pgf@lsystem@\pgfkeyscurrentname}{%
+ \pgfkeys{/errors/unknown key={/pgf/lindenmayer system/\pgfkeyscurrentname}{#1}}%
+ \let\tikz@lsystem@name=\pgfutil@empty%
+ }%
+ {\edef\tikz@lsystem@name{\pgfkeyscurrentname}}
+ },%
+ anchor/.store in=\tikz@lsystem@anchor,%
+ rule set/.store in=\tikz@lsystem@rules
+}%
\let\tikz@lsystem@anchor=\pgfutil@empty%
\let\tikz@lsystem@rules=\pgfutil@empty%
\def\tikz@lsystem@declare{%
- \expandafter\let\csname pgf@lsystem@tikz@temp\endcsname=\relax%
- \pgfdeclarelindenmayersystem{tikz@temp}{%
- \expandafter\tikz@lsystem@parse@rules\tikz@lsystem@rules,\tikz@stop,%
- }%
-}
+ \expandafter\let\csname pgf@lsystem@tikz@temp\endcsname=\relax%
+ \pgfdeclarelindenmayersystem{tikz@temp}{%
+ \expandafter\tikz@lsystem@parse@rules\tikz@lsystem@rules,\tikz@stop,%
+ }%
+}%
\def\tikz@lsystem@parse@rules#1,{%
- \ifx#1\tikz@stop%
- \else%
- \rule{#1}%
- \expandafter\tikz@lsystem@parse@rules%
- \fi%
-}
+ \ifx#1\tikz@stop%
+ \else%
+ \rule{#1}%
+ \expandafter\tikz@lsystem@parse@rules%
+ \fi%
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex
index 8ccdc64493a..bf95161576d 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex
@@ -9,625 +9,631 @@
-\edef\tikz@math@at@catcode{\the\catcode`\@}
+\edef\tikz@math@at@catcode{\the\catcode`\@}%
\catcode`\@=11
-\def\tikz@math@gobblespaces#1{\pgfutil@ifnextchar x{#1}{#1}}
+\def\tikz@math@gobblespaces#1{\pgfutil@ifnextchar x{#1}{#1}}%
-\def\tikz@math@meaning@macro{macro}
-\def\tikz@math@meaning@dimen{dimen}
-\def\tikz@math@meaning@count{count}
-\def\tikz@math@meaning@null{null}
+\def\tikz@math@meaning@macro{macro}%
+\def\tikz@math@meaning@dimen{dimen}%
+\def\tikz@math@meaning@count{count}%
+\def\tikz@math@meaning@null{null}%
-\def\tikz@math@getmeaning#1{\expandafter\tikz@math@@getmeaning\meaning#1\tikz@math@getmeaning@stop}
+\def\tikz@math@getmeaning#1{\expandafter\tikz@math@@getmeaning\meaning#1\tikz@math@getmeaning@stop}%
\def\tikz@math@@getmeaning#1#2#3#4#5\tikz@math@getmeaning@stop{%
- \if#1u% undefined
- \let\tikz@math@meaning=\tikz@math@meaning@macro%
- \else%
- \if#1m%
- \let\tikz@math@meaning=\tikz@math@meaning@macro%
- \else%
- \if#2d%
- \let\tikz@math@meaning=\tikz@math@meaning@dimen%
- \else%
- \if#2c%
- \let\tikz@math@meaning=\tikz@math@meaning@count%
- \else%
- \if#3k% A skip. Treat like a dimen.
- \let\tikz@math@meaning=\tikz@math@meaning@dimen%
- \else%
- \let\tikz@math@meaning=\tikz@math@meaning@null%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
-}
-
-\def\tikz@math@firstoftwo#1#2{#1}
-\def\tikz@math@secondoftwo#1#2{#2}
+ \if#1u% undefined
+ \let\tikz@math@meaning=\tikz@math@meaning@macro%
+ \else%
+ \if#1m%
+ \let\tikz@math@meaning=\tikz@math@meaning@macro%
+ \else%
+ \if#2d%
+ \let\tikz@math@meaning=\tikz@math@meaning@dimen%
+ \else%
+ \if#2c%
+ \let\tikz@math@meaning=\tikz@math@meaning@count%
+ \else%
+ \if#3k% A skip. Treat like a dimen.
+ \let\tikz@math@meaning=\tikz@math@meaning@dimen%
+ \else%
+ \let\tikz@math@meaning=\tikz@math@meaning@null%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+}%
+
+\def\tikz@math@firstoftwo#1#2{#1}%
+\def\tikz@math@secondoftwo#1#2{#2}%
\def\tikz@math@getvarstring#1{%
- \begingroup%
- \escapechar=-1\relax%
- \expandafter\tikz@math@@getvarstring\string#1\tikz@math}
+ \begingroup%
+ \escapechar=-1\relax%
+ \expandafter\tikz@math@@getvarstring\string#1\tikz@math}%
\def\tikz@math@@getvarstring#1\tikz@math#2{%
- \endgroup%
- \def#2{#1}%
-}
+ \endgroup%
+ \def#2{#1}%
+}%
\long\def\tikz@math@collecttosemicolon@other#1#2;{%
- \def\tikz@math@collected{#2}#1}
+ \def\tikz@math@collected{#2}#1}%
\def\tikz@math@semicolon@other{;}%
{\catcode`\;=13
\long\gdef\tikz@math@collecttosemicolon@active#1#2;{%
- \def\tikz@math@collected{#2}#1}
+ \def\tikz@math@collected{#2}#1}%
\gdef\tikz@math@semicolon@active{;}%
-}
+}%
\def\tikz@math@setvartype#1#2{%
- \expandafter\let\csname tikz@math@var@vartype@\string#1\endcsname=#2%
-}
+ \expandafter\let\csname tikz@math@var@vartype@\string#1\endcsname=#2%
+}%
\def\tikz@math@getvartype#1#2{%
- \def\tikz@math@marshal{\let#1=}%
- \expandafter\tikz@math@marshal\csname
- tikz@math@var@vartype@\string#2\endcsname%
-}
+ \def\tikz@math@marshal{\let#1=}%
+ \expandafter\tikz@math@marshal\csname
+ tikz@math@var@vartype@\string#2\endcsname%
+}%
\def\tikz@math@ifvarcoordinate#1{%
- \expandafter\ifx\csname
- tikz@math@var@vartype@\string#1\endcsname\tikz@math@keyword@coordinate%
- \let\tikz@math@next=\tikz@math@firstoftwo%
- \else%
- \let\tikz@math@next=\tikz@math@secondoftwo%
- \fi%
- \tikz@math@next%
-}
+ \expandafter\ifx\csname
+ tikz@math@var@vartype@\string#1\endcsname\tikz@math@keyword@coordinate%
+ \let\tikz@math@next=\tikz@math@firstoftwo%
+ \else%
+ \let\tikz@math@next=\tikz@math@secondoftwo%
+ \fi%
+ \tikz@math@next%
+}%
\def\tikz@math@ifvarinteger#1{%
- \expandafter\ifx\csname
- tikz@math@var@vartype@\string#1\endcsname\tikz@math@keyword@integer%
- \let\tikz@math@next=\tikz@math@firstoftwo%
- \else%
- \let\tikz@math@next=\tikz@math@secondoftwo%
- \fi%
- \tikz@math@next%
-}
+ \expandafter\ifx\csname
+ tikz@math@var@vartype@\string#1\endcsname\tikz@math@keyword@integer%
+ \let\tikz@math@next=\tikz@math@firstoftwo%
+ \else%
+ \let\tikz@math@next=\tikz@math@secondoftwo%
+ \fi%
+ \tikz@math@next%
+}%
\def\tikz@math@setvarindexed#1{%
- \expandafter\let\csname
- tikz@math@var@subtype@\string#1\endcsname=\tikz@math@subtype@indexed%
-}
+ \expandafter\let\csname
+ tikz@math@var@subtype@\string#1\endcsname=\tikz@math@subtype@indexed%
+}%
\def\tikz@math@clearvarindexed#1{%
- \expandafter\let\csname tikz@math@var@subtype@\string#1\endcsname=\relax%
-}
+ \expandafter\let\csname tikz@math@var@subtype@\string#1\endcsname=\relax%
+}%
\def\tikz@math@ifvarindexed#1{%
- \expandafter\ifx\csname tikz@math@var@subtype@\string#1\endcsname\relax%
- \let\tikz@math@next=\tikz@math@secondoftwo%
- \else%
- \let\tikz@math@next=\tikz@math@firstoftwo%
- \fi%
- \tikz@math@next%
-}
+ \expandafter\ifx\csname tikz@math@var@subtype@\string#1\endcsname\relax%
+ \let\tikz@math@next=\tikz@math@secondoftwo%
+ \else%
+ \let\tikz@math@next=\tikz@math@firstoftwo%
+ \fi%
+ \tikz@math@next%
+}%
-\def\tikz@math@stop{@}
+\def\tikz@math@stop{@}%
\let\tikz@math@parse@hook@before=\pgfutil@empty
\let\tikz@math@parse@hook@after=\pgfutil@empty
\def\tikz@math{%
- \ifnum\catcode`\;=13\relax%
- \let\tikz@math@semicolon=\tikz@math@semicolon@active%
- \let\tikz@math@collecttosemicolon=\tikz@math@collecttosemicolon@active%
- \else%
- \let\tikz@math@semicolon=\tikz@math@semicolon@other%
- \let\tikz@math@collecttosemicolon=\tikz@math@collecttosemicolon@other%
- \fi%
- \tikz@math@parse@hook@before%
- \tikz@@math}
+ \ifnum\catcode`\;=13\relax%
+ \let\tikz@math@semicolon=\tikz@math@semicolon@active%
+ \let\tikz@math@collecttosemicolon=\tikz@math@collecttosemicolon@active%
+ \else%
+ \let\tikz@math@semicolon=\tikz@math@semicolon@other%
+ \let\tikz@math@collecttosemicolon=\tikz@math@collecttosemicolon@other%
+ \fi%
+ \tikz@math@parse@hook@before%
+ \tikz@@math}%
\long\def\tikz@@math#1{%
- \def\tikz@math@marshal{\tikz@math@parse#1}%
- \expandafter\expandafter\expandafter\tikz@math@marshal\expandafter\tikz@math@stop\tikz@math@semicolon}
-
-\def\tikz@math@parse{\pgfutil@ifnextchar\bgroup\tikz@math@@parse@bgroup\tikz@math@@parse@nobgroup}
+ \def\tikz@math@marshal{\tikz@math@parse#1}%
+ \expandafter\expandafter\expandafter\tikz@math@marshal\expandafter\tikz@math@stop\tikz@math@semicolon}%
+
+\def\tikz@math@parse{\pgfutil@ifnextchar\bgroup\tikz@math@@parse@bgroup\tikz@math@@parse@nobgroup}%
\def\tikz@math@@parse@bgroup{%
- \tikz@math@collecttosemicolon{%
- % MW: Don't know how reliable this test is.
- \ifx\pgf@selectfontorig\tikz@math@undefined%
- \begingroup\tikz@math@collected\endgroup%
- \else%
- \begingroup\csname nullfont\endcsname\tikz@math@collected\endgroup%
- \fi\tikz@math@parse}}
-
+ \tikz@math@collecttosemicolon{%
+ % MW: Don't know how reliable this test is.
+ \ifx\pgf@selectfontorig\tikz@math@undefined%
+ \begingroup\tikz@math@collected\endgroup%
+ \else%
+ \begingroup\csname nullfont\endcsname\tikz@math@collected\endgroup%
+ \fi\tikz@math@parse}}%
+
-\def\tikz@math@@parse@nobgroup{\tikz@math@collecttosemicolon{\tikz@math@@parse@@nobgroup}}
+\def\tikz@math@@parse@nobgroup{\tikz@math@collecttosemicolon{\tikz@math@@parse@@nobgroup}}%
\def\tikz@math@@parse@@nobgroup{%
- \let\tikz@math@tmp=\tikz@math@collected%
- \ifx\tikz@math@tmp\tikz@math@stop%
- \def\tikz@math@next{\expandafter\tikz@math@parse@finish\tikz@math@semicolon}%
- \else%
- \def\tikz@math@next{\expandafter\expandafter\expandafter\tikz@math@parse@keyword@check\expandafter\tikz@math@tmp\tikz@math@semicolon}%
- \fi%
- \tikz@math@next%
-}
+ \let\tikz@math@tmp=\tikz@math@collected%
+ \ifx\tikz@math@tmp\tikz@math@stop%
+ \def\tikz@math@next{\expandafter\tikz@math@parse@finish\tikz@math@semicolon}%
+ \else%
+ \def\tikz@math@next{\expandafter\expandafter\expandafter\tikz@math@parse@keyword@check\expandafter\tikz@math@tmp\tikz@math@semicolon}%
+ \fi%
+ \tikz@math@next%
+}%
\def\tikz@math@parse@finish{%
- \tikz@math@collecttosemicolon{\tikz@math@parse@hook@after}%
-}
+ \tikz@math@collecttosemicolon{\tikz@math@parse@hook@after}%
+}%
\newif\iftikz@math@let
\def\tikz@math@parse@keyword@check#1{%
- \tikz@math@letfalse%
- \tikz@math@getmeaning{#1}%
- \ifx\tikz@math@meaning\tikz@math@meaning@null%
- \let\tikz@math@next=\tikz@math@parse@keyword%
- \else%
- \let\tikz@math@next=\tikz@math@parse@nokeyword%
- \fi%
- \tikz@math@next#1}
+ \tikz@math@letfalse%
+ \tikz@math@getmeaning{#1}%
+ \ifx\tikz@math@meaning\tikz@math@meaning@null%
+ \let\tikz@math@next=\tikz@math@parse@keyword%
+ \else%
+ \let\tikz@math@next=\tikz@math@parse@nokeyword%
+ \fi%
+ \tikz@math@next#1}%
\def\tikz@math@parse@keyword{%
- \let\tikz@math@parsed@keyword=\pgfutil@empty%
- \futurelet\tikz@math@parse@token\tikz@math@@parse@keyword}
+ \let\tikz@math@parsed@keyword=\pgfutil@empty%
+ \futurelet\tikz@math@parse@token\tikz@math@@parse@keyword}%
\def\tikz@math@@parse@keyword{%
- \ifx\tikz@math@parse@token\pgfutil@sptoken%
- \let\tikz@math@next=\tikz@math@@@parse@keyword%
- \else%
- \ifx\tikz@math@parse@token(%
- \let\tikz@math@next=\tikz@math@@@parse@keyword%
- \else%
- \ifx\tikz@math@parse@token\bgroup%
- \let\tikz@math@next=\tikz@math@@@parse@keyword%
- \else%
- \let\tikz@math@next=\tikz@math@@@@parse@keyword%
- \fi%
- \fi%
- \fi%
- \tikz@math@next}
-
-\def\tikz@math@error#1{\pgfutil@packageerror{tikz}{tikz math library: #1}{}}
+ \ifx\tikz@math@parse@token\pgfutil@sptoken%
+ \let\tikz@math@next=\tikz@math@@@parse@keyword%
+ \else%
+ \ifx\tikz@math@parse@token(%
+ \let\tikz@math@next=\tikz@math@@@parse@keyword%
+ \else%
+ \ifx\tikz@math@parse@token\bgroup%
+ \let\tikz@math@next=\tikz@math@@@parse@keyword%
+ \else%
+ \let\tikz@math@next=\tikz@math@@@@parse@keyword%
+ \fi%
+ \fi%
+ \fi%
+ \tikz@math@next}%
+
+\def\tikz@math@error#1{\pgfutil@packageerror{tikz}{tikz math library: #1}{}}%
\def\tikz@math@@@parse@keyword{%
- \expandafter\ifx\csname tikz@math@process@keyword@\tikz@math@parsed@keyword\endcsname\relax%
- \expandafter\ifx\csname pgfmath\tikz@math@parsed@keyword\endcsname\relax%
- \tikz@math@error{Unknown function or keyword '\tikz@math@parsed@keyword'}%
- \else%
- \def\tikz@math@next{\tikz@math@collecttosemicolon{\tikz@math@function@noassign}}%
- \fi%
- \else%
- \expandafter\def\expandafter\tikz@math@next\expandafter{\csname tikz@math@process@keyword@\tikz@math@parsed@keyword\endcsname}%
- \fi%
- \tikz@math@next}
-
+ \expandafter\ifx\csname tikz@math@process@keyword@\tikz@math@parsed@keyword\endcsname\relax%
+ \expandafter\ifx\csname pgfmath\tikz@math@parsed@keyword\endcsname\relax%
+ \tikz@math@error{Unknown function or keyword '\tikz@math@parsed@keyword'}%
+ \else%
+ \def\tikz@math@next{\tikz@math@collecttosemicolon{\tikz@math@function@noassign}}%
+ \fi%
+ \else%
+ \expandafter\def\expandafter\tikz@math@next\expandafter{\csname tikz@math@process@keyword@\tikz@math@parsed@keyword\endcsname}%
+ \fi%
+ \tikz@math@next}%
+
\def\tikz@math@@@@parse@keyword#1{%
- \edef\tikz@math@parsed@keyword{\tikz@math@parsed@keyword#1}%
- \futurelet\tikz@math@parse@token\tikz@math@@parse@keyword%
-}
+ \edef\tikz@math@parsed@keyword{\tikz@math@parsed@keyword#1}%
+ \futurelet\tikz@math@parse@token\tikz@math@@parse@keyword%
+}%
\def\tikz@math@function@noassign{%
- \pgfmathparse{\tikz@math@parsed@keyword\tikz@math@collected}%
- \tikz@math@parse%
-}
-
-
-
-
-\def\tikz@math@process@keyword@count{\tikz@math@collecttosemicolon{\tikz@math@process@keyword@@count}}
+ \pgfmathparse{\tikz@math@parsed@keyword\tikz@math@collected}%
+ \tikz@math@parse%
+}%
+
+
+
+
+\def\tikz@math@process@keyword@count{\tikz@math@collecttosemicolon{\tikz@math@process@keyword@@count}}%
\def\tikz@math@process@keyword@@count{%
\def\tikz@math@assign@register{\csname newcount\endcsname}%
-\expandafter\tikz@math@gobblespaces\expandafter\tikz@math@process@registers\tikz@math@collected,@,}
+\expandafter\tikz@math@gobblespaces\expandafter\tikz@math@process@registers\tikz@math@collected,@,}%
-\def\tikz@math@process@keyword@length{\tikz@math@collecttosemicolon{\tikz@math@process@keyword@@length}}
+\def\tikz@math@process@keyword@length{\tikz@math@collecttosemicolon{\tikz@math@process@keyword@@length}}%
\def\tikz@math@process@keyword@@length{%
\def\tikz@math@assign@register{\csname newdimen\endcsname}%
\show\tikz@math@collected
-\expandafter\tikz@math@gobblespaces\expandafter\tikz@math@process@registers\tikz@math@collected,@,}
+\expandafter\tikz@math@gobblespaces\expandafter\tikz@math@process@registers\tikz@math@collected,@,}%
\def\tikz@math@process@registers#1#2,{%
- \def\tikz@math@var{#1}%
- \ifx\tikz@math@var\tikz@math@stop%
- \let\tikz@math@next=\tikz@math@parse%
- \else%
- \tikz@math@assign@register#1\relax%
- \let\tikz@math@next=\tikz@math@process@registers%
- \fi%
- \tikz@math@gobblespaces\tikz@math@next%
-}
+ \def\tikz@math@var{#1}%
+ \ifx\tikz@math@var\tikz@math@stop%
+ \let\tikz@math@next=\tikz@math@parse%
+ \else%
+ \tikz@math@assign@register#1\relax%
+ \let\tikz@math@next=\tikz@math@process@registers%
+ \fi%
+ \tikz@math@gobblespaces\tikz@math@next%
+}%
\def\tikz@math@process@keyword@if#1then{%
- \def\tikz@math@if@condition{#1}%
- \tikz@math@gobblespaces\tikz@math@parse@if@iftrue%
-}
+ \def\tikz@math@if@condition{#1}%
+ \tikz@math@gobblespaces\tikz@math@parse@if@iftrue%
+}%
\def\tikz@math@parse@if@iftrue#1{%
- \def\tikz@math@if@trueaction{#1}%
- \pgfutil@ifnextchar e{\tikz@math@parse@else}{\tikz@math@if@doif}}
+ \def\tikz@math@if@trueaction{#1}%
+ \pgfutil@ifnextchar e{\tikz@math@parse@else}{\tikz@math@if@doif}}%
-\def\tikz@math@parse@else else{\tikz@math@gobblespaces\tikz@math@if@doifelse}
+\def\tikz@math@parse@else else{\tikz@math@gobblespaces\tikz@math@if@doifelse}%
-\def\tikz@math@if@doif{\tikz@math@collecttosemicolon{\tikz@math@if@@doif}}
+\def\tikz@math@if@doif{\tikz@math@collecttosemicolon{\tikz@math@if@@doif}}%
\def\tikz@math@if@@doif{%
- \pgfmathparse{\tikz@math@if@condition}%
- \ifdim\pgfmathresult pt=0pt\relax%
- \else%
- \expandafter\tikz@math\expandafter{\tikz@math@if@trueaction}%
- \fi%
- \tikz@math@parse%
-}
-\def\tikz@math@if@doifelse{\tikz@math@collecttosemicolon{\tikz@math@if@@doifelse}}
+ \pgfmathparse{\tikz@math@if@condition}%
+ \ifpgfmathfloatparseactive%
+ \pgfmathfloattofixed{\pgfmathresult}%
+ \fi%
+ \ifdim\pgfmathresult pt=0pt\relax%
+ \else%
+ \expandafter\tikz@math\expandafter{\tikz@math@if@trueaction}%
+ \fi%
+ \tikz@math@parse%
+}%
+\def\tikz@math@if@doifelse{\tikz@math@collecttosemicolon{\tikz@math@if@@doifelse}}%
\def\tikz@math@if@@doifelse{%
- \pgfmathparse{\tikz@math@if@condition}%
- \let\tikz@math@if@falseaction=\tikz@math@collected%
- \ifdim\pgfmathresult pt=0pt\relax%
- \expandafter\tikz@math\expandafter{\tikz@math@if@falseaction}%
- \else%
- \expandafter\tikz@math\expandafter{\tikz@math@if@trueaction}%
- \fi%
- \tikz@math@parse%
-}
+ \pgfmathparse{\tikz@math@if@condition}%
+ \ifpgfmathfloatparseactive%
+ \pgfmathfloattofixed{\pgfmathresult}%
+ \fi%
+ \let\tikz@math@if@falseaction=\tikz@math@collected%
+ \ifdim\pgfmathresult pt=0pt\relax%
+ \expandafter\tikz@math\expandafter{\tikz@math@if@falseaction}%
+ \else%
+ \expandafter\tikz@math\expandafter{\tikz@math@if@trueaction}%
+ \fi%
+ \tikz@math@parse%
+}%
\def\tikz@math@process@keyword@let{%
- \tikz@math@lettrue%
- \tikz@math@gobblespaces\tikz@math@parse@nokeyword%
-}
+ \tikz@math@lettrue%
+ \tikz@math@gobblespaces\tikz@math@parse@nokeyword%
+}%
\def\tikz@math@parse@nokeyword#1{%
- \def\tikz@math@var{#1}%
- \tikz@math@getvarstring{#1}\tikz@math@varstring%
- \let\tikz@math@vartype=\pgfutil@empty%
- \ifx\tikz@math@var\tikz@math@stop%
- \let\tikz@math@next=\tikz@math@parse@finish%
- \else%
+ \def\tikz@math@var{#1}%
+ \tikz@math@getvarstring{#1}\tikz@math@varstring%
+ \let\tikz@math@vartype=\pgfutil@empty%
+ \ifx\tikz@math@var\tikz@math@stop%
+ \let\tikz@math@next=\tikz@math@parse@finish%
+ \else%
\ifx\tikz@math@semicolon\tikz@math@var%
- \let\tikz@math@next=\tikz@math@parse%
- \else%
- \let\tikz@math@next=\tikz@math@parse@index@check%
- \fi%
- \fi%
- \tikz@math@next}
+ \let\tikz@math@next=\tikz@math@parse%
+ \else%
+ \let\tikz@math@next=\tikz@math@parse@index@check%
+ \fi%
+ \fi%
+ \tikz@math@next}%
\def\tikz@math@parse@index@check{%
- \pgfutil@ifnextchar={\tikz@math@parse@noindex}{\tikz@math@parse@index}}
-
+ \pgfutil@ifnextchar={\tikz@math@parse@noindex}{\tikz@math@parse@index}}%
+
\def\tikz@math@parse@noindex{%
- \expandafter\tikz@math@clearvarindexed\tikz@math@var%
- \let\tikz@math@current@index=\pgfutil@empty%
- \tikz@math@parse@afterindex%
-}
+ \expandafter\tikz@math@clearvarindexed\tikz@math@var%
+ \let\tikz@math@current@index=\pgfutil@empty%
+ \tikz@math@parse@afterindex%
+}%
\def\tikz@math@parse@index#1{%
- \def\tikz@math@tmp{#1}%
- \expandafter\tikz@math@setvarindexed\tikz@math@var% {}
- \edef\tikz@math@current@index{#1}%
- \tikz@math@parse@afterindex%
-}
+ \def\tikz@math@tmp{#1}%
+ \expandafter\tikz@math@setvarindexed\tikz@math@var% {}
+ \edef\tikz@math@current@index{#1}%
+ \tikz@math@parse@afterindex%
+}%
\def\tikz@math@parse@afterindex#1={\tikz@math@gobblespaces\tikz@math@parse@assignment}%
-\def\tikz@math@parse@assignment{\tikz@math@collecttosemicolon{\tikz@math@parse@@assignment}}
+\def\tikz@math@parse@assignment{\tikz@math@collecttosemicolon{\tikz@math@parse@@assignment}}%
\def\tikz@math@parse@@assignment{%
- \expandafter\expandafter\expandafter\tikz@math@doassignment\expandafter\expandafter\expandafter%
- {\expandafter\tikz@math@var\expandafter}\expandafter{\tikz@math@collected}%
- \tikz@math@parse%
-}
+ \expandafter\expandafter\expandafter\tikz@math@doassignment\expandafter\expandafter\expandafter%
+ {\expandafter\tikz@math@var\expandafter}\expandafter{\tikz@math@collected}%
+ \tikz@math@parse%
+}%
-\def\tikz@math@dollar@char{$}
+\def\tikz@math@dollar@char{$}%
\def\tikz@math@dollar@char{$}% For annoying syntax highlighters
\def\tikz@math@doassignment#1#2{%
- \tikz@math@ifvarcoordinate{#1}{%
- \def\tikz@math@var{#1}% Unfortunately, we must do this again.
- \tikz@math@getvarstring{#1}\tikz@math@varstring% And this
- \expandafter\pgfutil@in@\tikz@math@dollar@char{#2}%
- \edef\tikz@math@expression{#2}%
- \ifpgfutil@in@%
- \expandafter\tikz@scan@one@point\expandafter\tikz@math@assign@coordinate\tikz@math@expression%
- \else%
- \expandafter\ifx\csname tikz@library@calc@loaded\endcsname\relax%
- \expandafter\tikz@scan@one@point\expandafter\tikz@math@assign@coordinate\tikz@math@expression%
- \else%
- \expandafter\tikz@scan@one@point\expandafter\tikz@math@assign@coordinate\expandafter%
- (\expandafter$\tikz@math@expression$)%
- \fi%
- \fi%
- }{%
- \iftikz@math@let% Not really a let
- \ifx\tikz@math@current@index\pgfutil@empty%
- \edef#1{#2}%
- \else%
- \edef\tikz@math@tmp{#2}%
- \expandafter\expandafter\expandafter\tikz@math@assign@index\expandafter\expandafter\expandafter%
- {\expandafter\tikz@math@varstring\expandafter}\expandafter{\tikz@math@tmp}%
- \fi%
- \tikz@math@letfalse%
- \else%
- \ifx\tikz@math@current@index\pgfutil@empty%
- \tikz@math@getmeaning{#1}%
- \ifx\tikz@math@meaning\tikz@math@meaning@dimen%
- \pgfmathsetlength{#1}{#2}%
- \let\tikz@math@last@assigned@value=\pgfmathresult%
- \else%
- \ifx\tikz@math@meaning\tikz@math@meaning@count%
- \pgfmathsetcount{#1}{#2}%
- \let\tikz@math@last@assigned@value=\pgfmathresult%
- \else%
- \tikz@math@ifvarinteger{#1}{\pgfmathparse{int(#2)}}{\pgfmathparse{#2}}%
- \let\tikz@math@last@assigned@value=\pgfmathresult%
- \let#1=\pgfmathresult%
- \fi%
- \fi%
- \else%
- \tikz@math@ifvarinteger{#1}{\pgfmathparse{int(#2)}}{\pgfmathparse{#2}}%
- \expandafter\tikz@math@assign@index\expandafter{\tikz@math@varstring}\pgfmathresult%
- \let\tikz@math@last@assigned@value=\pgfmathresult%
- \fi%
- \fi%
- }%
-}
+ \tikz@math@ifvarcoordinate{#1}{%
+ \def\tikz@math@var{#1}% Unfortunately, we must do this again.
+ \tikz@math@getvarstring{#1}\tikz@math@varstring% And this
+ \expandafter\pgfutil@in@\tikz@math@dollar@char{#2}%
+ \edef\tikz@math@expression{#2}%
+ \ifpgfutil@in@%
+ \expandafter\tikz@scan@one@point\expandafter\tikz@math@assign@coordinate\tikz@math@expression%
+ \else%
+ \expandafter\ifx\csname tikz@library@calc@loaded\endcsname\relax%
+ \expandafter\tikz@scan@one@point\expandafter\tikz@math@assign@coordinate\tikz@math@expression%
+ \else%
+ \expandafter\tikz@scan@one@point\expandafter\tikz@math@assign@coordinate\expandafter%
+ (\expandafter$\tikz@math@expression$)%
+ \fi%
+ \fi%
+ }{%
+ \iftikz@math@let% Not really a let
+ \ifx\tikz@math@current@index\pgfutil@empty%
+ \edef#1{#2}%
+ \else%
+ \edef\tikz@math@tmp{#2}%
+ \expandafter\expandafter\expandafter\tikz@math@assign@index\expandafter\expandafter\expandafter%
+ {\expandafter\tikz@math@varstring\expandafter}\expandafter{\tikz@math@tmp}%
+ \fi%
+ \tikz@math@letfalse%
+ \else%
+ \ifx\tikz@math@current@index\pgfutil@empty%
+ \tikz@math@getmeaning{#1}%
+ \ifx\tikz@math@meaning\tikz@math@meaning@dimen%
+ \pgfmathsetlength{#1}{#2}%
+ \let\tikz@math@last@assigned@value=\pgfmathresult%
+ \else%
+ \ifx\tikz@math@meaning\tikz@math@meaning@count%
+ \pgfmathsetcount{#1}{#2}%
+ \let\tikz@math@last@assigned@value=\pgfmathresult%
+ \else%
+ \tikz@math@ifvarinteger{#1}{\pgfmathparse{int(#2)}}{\pgfmathparse{#2}}%
+ \let\tikz@math@last@assigned@value=\pgfmathresult%
+ \let#1=\pgfmathresult%
+ \fi%
+ \fi%
+ \else%
+ \tikz@math@ifvarinteger{#1}{\pgfmathparse{int(#2)}}{\pgfmathparse{#2}}%
+ \expandafter\tikz@math@assign@index\expandafter{\tikz@math@varstring}\pgfmathresult%
+ \let\tikz@math@last@assigned@value=\pgfmathresult%
+ \fi%
+ \fi%
+ }%
+}%
\def\tikz@math@assign@index#1#2{%
- \expandafter\def\csname#1\endcsname##1{\csname
- tikz@math@var@indexed@#1@##1\endcsname}%
- \expandafter\edef\csname
- tikz@math@var@indexed@#1@\tikz@math@current@index\endcsname{#2}\relax%
-}
+ \expandafter\def\csname#1\endcsname##1{\csname
+ tikz@math@var@indexed@#1@##1\endcsname}%
+ \expandafter\edef\csname
+ tikz@math@var@indexed@#1@\tikz@math@current@index\endcsname{#2}\relax%
+}%
\def\tikz@math@assign@coordinate#1{%
- \pgf@process{#1}%
- \ifx\tikz@math@current@index\pgfutil@empty%
- \expandafter\edef\csname\tikz@math@varstring\endcsname{\the\pgf@x,\the\pgf@y}%
- \expandafter\edef\csname\tikz@math@varstring x\endcsname{\the\pgf@x}%
- \expandafter\edef\csname\tikz@math@varstring y\endcsname{\the\pgf@y}%
- \else%
- \expandafter\tikz@math@assign@index\expandafter{\tikz@math@varstring}{\the\pgf@x,\the\pgf@y}%
- \expandafter\tikz@math@assign@index\expandafter{\tikz@math@varstring x}{\the\pgf@x}%
- \expandafter\tikz@math@assign@index\expandafter{\tikz@math@varstring y}{\the\pgf@y}%
- \fi%
-}
+ \pgf@process{#1}%
+ \ifx\tikz@math@current@index\pgfutil@empty%
+ \expandafter\edef\csname\tikz@math@varstring\endcsname{\the\pgf@x,\the\pgf@y}%
+ \expandafter\edef\csname\tikz@math@varstring x\endcsname{\the\pgf@x}%
+ \expandafter\edef\csname\tikz@math@varstring y\endcsname{\the\pgf@y}%
+ \else%
+ \expandafter\tikz@math@assign@index\expandafter{\tikz@math@varstring}{\the\pgf@x,\the\pgf@y}%
+ \expandafter\tikz@math@assign@index\expandafter{\tikz@math@varstring x}{\the\pgf@x}%
+ \expandafter\tikz@math@assign@index\expandafter{\tikz@math@varstring y}{\the\pgf@y}%
+ \fi%
+}%
-\def\tikz@math@keyword@coordinate{coordinate}
+\def\tikz@math@keyword@coordinate{coordinate}%
\def\tikz@math@process@keyword@coordinate{%
- \let\tikz@math@vartype=\tikz@math@keyword@coordinate%
- \tikz@math@gobblespaces\tikz@math@process@vartypes%
-}
+ \let\tikz@math@vartype=\tikz@math@keyword@coordinate%
+ \tikz@math@gobblespaces\tikz@math@process@vartypes%
+}%
-\def\tikz@math@keyword@integer{integer}
+\def\tikz@math@keyword@integer{integer}%
\def\tikz@math@process@keyword@integer{%
- \let\tikz@math@vartype=\tikz@math@keyword@integer%
- \tikz@math@gobblespaces\tikz@math@process@vartypes%
-}
+ \let\tikz@math@vartype=\tikz@math@keyword@integer%
+ \tikz@math@gobblespaces\tikz@math@process@vartypes%
+}%
\def\tikz@math@process@keyword@int{%
- \tikz@math@process@keyword@integer%
-}
+ \tikz@math@process@keyword@integer%
+}%
-\def\tikz@math@keyword@real{real}
+\def\tikz@math@keyword@real{real}%
\def\tikz@math@process@keyword@real{%
- \let\tikz@math@vartype=\tikz@math@keyword@real%
- \tikz@math@gobblespaces\tikz@math@process@vartypes%
-}
+ \let\tikz@math@vartype=\tikz@math@keyword@real%
+ \tikz@math@gobblespaces\tikz@math@process@vartypes%
+}%
-\def\tikz@math@process@keyword@point{\tikz@math@process@keyword@coordinate}
+\def\tikz@math@process@keyword@point{\tikz@math@process@keyword@coordinate}%
-\def\tikz@math@process@vartypes{\tikz@math@collecttosemicolon{\tikz@math@process@@vartypes}}
+\def\tikz@math@process@vartypes{\tikz@math@collecttosemicolon{\tikz@math@process@@vartypes}}%
\def\tikz@math@process@@vartypes{%
- \expandafter\tikz@math@@process@vartypes\tikz@math@collected,@,\tikz@math%
-}
+ \expandafter\tikz@math@@process@vartypes\tikz@math@collected,@,\tikz@math%
+}%
\def\tikz@math@@process@vartypes#1#2,{%
- \def\tikz@math@var{#1}%
- \tikz@math@getvarstring{#1}\tikz@math@varstring%
- \ifx\tikz@math@var\tikz@math@stop%
- \let\tikz@math@next=\tikz@math@@@process@vartypes%
- \else%
- \expandafter\tikz@math@setvartype\tikz@math@var\tikz@math@vartype%
- \def\tikz@math@next{\tikz@math@gobblespaces\tikz@math@@process@vartypes}%
- \fi%
- \tikz@math@next%
-}
-
-\def\tikz@math@process@keyword@print{\tikz@math@collecttosemicolon{\tikz@math@process@keyword@@print}}
+ \def\tikz@math@var{#1}%
+ \tikz@math@getvarstring{#1}\tikz@math@varstring%
+ \ifx\tikz@math@var\tikz@math@stop%
+ \let\tikz@math@next=\tikz@math@@@process@vartypes%
+ \else%
+ \expandafter\tikz@math@setvartype\tikz@math@var\tikz@math@vartype%
+ \def\tikz@math@next{\tikz@math@gobblespaces\tikz@math@@process@vartypes}%
+ \fi%
+ \tikz@math@next%
+}%
+
+\def\tikz@math@process@keyword@print{\tikz@math@collecttosemicolon{\tikz@math@process@keyword@@print}}%
\def\tikz@math@process@keyword@@print{%
- \begingroup\tikz@math@collected\endgroup\tikz@math@parse%
-}
+ \begingroup\tikz@math@collected\endgroup\tikz@math@parse%
+}%
\def\tikz@math@@@process@vartypes#1\tikz@math{%
- \tikz@math@parse%
-}
+ \tikz@math@parse%
+}%
\newcount\tikz@math@for@depth
-\def\tikz@math@for@namedef#1{\expandafter\def\csname tikz@math@for@def@#1@\the\tikz@math@for@depth\endcsname}
-\def\tikz@math@for@nameedef#1{\expandafter\edef\csname tikz@math@for@def@#1@\the\tikz@math@for@depth\endcsname}
-\def\tikz@math@for@namelet#1{\expandafter\let\csname tikz@math@for@def@#1@\the\tikz@math@for@depth\endcsname}
+\def\tikz@math@for@namedef#1{\expandafter\def\csname tikz@math@for@def@#1@\the\tikz@math@for@depth\endcsname}%
+\def\tikz@math@for@nameedef#1{\expandafter\edef\csname tikz@math@for@def@#1@\the\tikz@math@for@depth\endcsname}%
+\def\tikz@math@for@namelet#1{\expandafter\let\csname tikz@math@for@def@#1@\the\tikz@math@for@depth\endcsname}%
\def\tikz@math@for@namegetvalue#1#2{%
- \def\tikz@math@marshal{\let#2=}%
- \expandafter\tikz@math@marshal\csname tikz@math@for@def@#1@\the\tikz@math@for@depth\endcsname}
+ \def\tikz@math@marshal{\let#2=}%
+ \expandafter\tikz@math@marshal\csname tikz@math@for@def@#1@\the\tikz@math@for@depth\endcsname}%
\def\tikz@math@process@keyword@for{%
- \tikz@math@for%
-}
+ \tikz@math@for%
+}%
\def\tikz@math@for@external{%
- \ifnum\catcode`\;=13\relax%
- \let\tikz@math@semicolon=\tikz@math@semicolon@active%
- \let\tikz@math@collecttosemicolon=\tikz@math@collecttosemicolon@active%
- \else%
- \let\tikz@math@semicolon=\tikz@math@semicolon@other%
- \let\tikz@math@collecttosemicolon=\tikz@math@collecttosemicolon@other%
- \fi
- \advance\tikz@math@for@depth by1\relax%
- \tikz@math@for@namedef{execute}{\tikz@math@for@external@execute}%
- \tikz@math@for@namedef{finished}{\relax}%
- \tikz@math@gobblespaces\tikz@math@for@parsevar}
-
-\def\tikz@math@for@external@execute#1{#1}
+ \ifnum\catcode`\;=13\relax%
+ \let\tikz@math@semicolon=\tikz@math@semicolon@active%
+ \let\tikz@math@collecttosemicolon=\tikz@math@collecttosemicolon@active%
+ \else%
+ \let\tikz@math@semicolon=\tikz@math@semicolon@other%
+ \let\tikz@math@collecttosemicolon=\tikz@math@collecttosemicolon@other%
+ \fi
+ \advance\tikz@math@for@depth by1\relax%
+ \tikz@math@for@namedef{execute}{\tikz@math@for@external@execute}%
+ \tikz@math@for@namedef{finished}{\relax}%
+ \tikz@math@gobblespaces\tikz@math@for@parsevar}%
+
+\def\tikz@math@for@external@execute#1{#1}%
\def\tikz@math@for{%
- \advance\tikz@math@for@depth by1\relax%
- \tikz@math@for@namedef{execute}{\tikz@math}%
- \tikz@math@for@namedef{finished}{\tikz@math@parse}%
- \tikz@math@gobblespaces\tikz@math@for@parsevar}
+ \advance\tikz@math@for@depth by1\relax%
+ \tikz@math@for@namedef{execute}{\tikz@math}%
+ \tikz@math@for@namedef{finished}{\tikz@math@parse}%
+ \tikz@math@gobblespaces\tikz@math@for@parsevar}%
\def\tikz@math@for@parsevar#1{%
- \tikz@math@for@namedef{var}{#1}%
- \tikz@math@for@parsein}
+ \tikz@math@for@namedef{var}{#1}%
+ \tikz@math@for@parsein}%
\def\tikz@math@getindex#1{%
- \tikz@math@@getindex#1\tikz@math@getindex\tikz@math@@getindex%
-}
+ \tikz@math@@getindex#1\tikz@math@getindex\tikz@math@@getindex%
+}%
-\def\tikz@math@@getindex#1#2\tikz@math@@getindex{#1}
+\def\tikz@math@@getindex#1#2\tikz@math@@getindex{#1}%
\def\tikz@math@for@parsein#1in{%
- \def\tikz@math@tmp{#1}%
- \ifx\tikz@math@tmp\pgfutil@empty%
- \tikz@math@for@namedef{index}{}%
- \else%
- \tikz@math@for@nameedef{index}{\tikz@math@getindex{#1}}%
- \fi%
- \tikz@math@gobblespaces\tikz@math@for@parselist%
-}
+ \def\tikz@math@tmp{#1}%
+ \ifx\tikz@math@tmp\pgfutil@empty%
+ \tikz@math@for@namedef{index}{}%
+ \else%
+ \tikz@math@for@nameedef{index}{\tikz@math@getindex{#1}}%
+ \fi%
+ \tikz@math@gobblespaces\tikz@math@for@parselist%
+}%
\long\def\tikz@math@for@parselist#1{%
- \edef\tikz@math@for@list{#1}%
- \tikz@math@collecttosemicolon{\tikz@math@for@parseaction}}
+ \edef\tikz@math@for@list{#1}%
+ \tikz@math@collecttosemicolon{\tikz@math@for@parseaction}}%
\def\tikz@math@for@parseaction{%
- \tikz@math@for@namedef{prevvalue}{}%
- \tikz@math@for@namedef{prevprevvalue}{}%
- \tikz@math@for@namelet{action}=\tikz@math@collected%
- \expandafter\tikz@math@for@scan\tikz@math@for@list,\tikz@math,\tikz@@math%
-}
+ \tikz@math@for@namedef{prevvalue}{}%
+ \tikz@math@for@namedef{prevprevvalue}{}%
+ \tikz@math@for@namelet{action}=\tikz@math@collected%
+ \expandafter\tikz@math@for@scan\tikz@math@for@list,\tikz@math,\tikz@@math%
+}%
-\def\tikz@math@token{\tikz@math}
+\def\tikz@math@token{\tikz@math}%
\def\tikz@math@for@scan#1,{%
- \def\tikz@math@for@value{#1}%
- \ifx\tikz@math@for@value\tikz@math@token%
- \let\tikz@math@next=\tikz@math@for@scan@end%
- \else%
- \ifx\tikz@math@for@value\pgfutil@empty%
- \let\tikz@math@next=\tikz@math@for@scan@end%
- \else%
- \pgfutil@in@{...}{#1}%
- \ifpgfutil@in@%
- \let\tikz@math@next=\tikz@math@for@scan@dots%
- \else%
- \tikz@math@for@namegetvalue{var}{\tikz@math@var}%
- \tikz@math@for@namegetvalue{index}{\tikz@math@current@index}%
- \tikz@math@for@namegetvalue{action}{\tikz@math@action}%
- \expandafter\tikz@math@getvarstring\expandafter{\tikz@math@var}\tikz@math@varstring%
- \expandafter\tikz@math@doassignment\expandafter{\tikz@math@var}{#1}%
- \tikz@math@for@namelet{value}=\tikz@math@last@assigned@value%
- \tikz@math@for@namegetvalue{execute}{\tikz@math@execute}%
- \expandafter\tikz@math@execute\expandafter{\tikz@math@action}%
- \tikz@math@for@namegetvalue{prevvalue}{\tikz@math@prevvalue}%
- \tikz@math@for@namelet{prevprevvalue}=\tikz@math@prevvalue%
- \tikz@math@for@namegetvalue{value}{\tikz@math@value}%
- \tikz@math@for@namelet{prevvalue}=\tikz@math@value%
- \let\tikz@math@next=\tikz@math@for@scan%
- \fi%
- \fi%
- \fi%
- \tikz@math@next%
-}
+ \def\tikz@math@for@value{#1}%
+ \ifx\tikz@math@for@value\tikz@math@token%
+ \let\tikz@math@next=\tikz@math@for@scan@end%
+ \else%
+ \ifx\tikz@math@for@value\pgfutil@empty%
+ \let\tikz@math@next=\tikz@math@for@scan@end%
+ \else%
+ \pgfutil@in@{...}{#1}%
+ \ifpgfutil@in@%
+ \let\tikz@math@next=\tikz@math@for@scan@dots%
+ \else%
+ \tikz@math@for@namegetvalue{var}{\tikz@math@var}%
+ \tikz@math@for@namegetvalue{index}{\tikz@math@current@index}%
+ \tikz@math@for@namegetvalue{action}{\tikz@math@action}%
+ \expandafter\tikz@math@getvarstring\expandafter{\tikz@math@var}\tikz@math@varstring%
+ \expandafter\tikz@math@doassignment\expandafter{\tikz@math@var}{#1}%
+ \tikz@math@for@namelet{value}=\tikz@math@last@assigned@value%
+ \tikz@math@for@namegetvalue{execute}{\tikz@math@execute}%
+ \expandafter\tikz@math@execute\expandafter{\tikz@math@action}%
+ \tikz@math@for@namegetvalue{prevvalue}{\tikz@math@prevvalue}%
+ \tikz@math@for@namelet{prevprevvalue}=\tikz@math@prevvalue%
+ \tikz@math@for@namegetvalue{value}{\tikz@math@value}%
+ \tikz@math@for@namelet{prevvalue}=\tikz@math@value%
+ \let\tikz@math@next=\tikz@math@for@scan%
+ \fi%
+ \fi%
+ \fi%
+ \tikz@math@next%
+}%
\newdimen\tikz@math@dimen
\def\tikz@math@for@scan@dots#1,{%
- \pgfmathparse{#1}\let\tikz@math@value=\pgfmathresult%
- \tikz@math@for@nameedef{endvalue}{\tikz@math@value}%
- \tikz@math@for@namegetvalue{prevvalue}{\tikz@math@prevvalue}%
- \tikz@math@for@namegetvalue{prevprevvalue}{\tikz@math@prevprevvalue}%
- \tikz@math@dimen=\tikz@math@prevvalue pt\relax%
- \ifx\tikz@math@prevprevvalue\pgfutil@empty%
- \ifdim\tikz@math@prevvalue pt<\tikz@math@value pt\relax%%
- \def\tikz@math@step{1pt}%
- \else%
- \def\tikz@math@step{-1pt}%
- \fi%
- \else%
- \tikz@math@dimen=\tikz@math@prevvalue pt\relax%
- \advance\tikz@math@dimen by-\tikz@math@prevprevvalue pt\relax%
- \edef\tikz@math@step{\the\tikz@math@dimen}%
- \fi%
- \ifdim\tikz@math@step<0pt\relax%
- \tikz@math@for@namedef{comparitor}{<}%
- \else%
- \tikz@math@for@namedef{comparitor}{>}%
- \fi%
- \tikz@math@for@nameedef{step}{\tikz@math@step}%
- \tikz@math@for@doloop%
-}
+ \pgfmathparse{#1}\let\tikz@math@value=\pgfmathresult%
+ \tikz@math@for@nameedef{endvalue}{\tikz@math@value}%
+ \tikz@math@for@namegetvalue{prevvalue}{\tikz@math@prevvalue}%
+ \tikz@math@for@namegetvalue{prevprevvalue}{\tikz@math@prevprevvalue}%
+ \tikz@math@dimen=\tikz@math@prevvalue pt\relax%
+ \ifx\tikz@math@prevprevvalue\pgfutil@empty%
+ \ifdim\tikz@math@prevvalue pt<\tikz@math@value pt\relax%%
+ \def\tikz@math@step{1pt}%
+ \else%
+ \def\tikz@math@step{-1pt}%
+ \fi%
+ \else%
+ \tikz@math@dimen=\tikz@math@prevvalue pt\relax%
+ \advance\tikz@math@dimen by-\tikz@math@prevprevvalue pt\relax%
+ \edef\tikz@math@step{\the\tikz@math@dimen}%
+ \fi%
+ \ifdim\tikz@math@step<0pt\relax%
+ \tikz@math@for@namedef{comparitor}{<}%
+ \else%
+ \tikz@math@for@namedef{comparitor}{>}%
+ \fi%
+ \tikz@math@for@nameedef{step}{\tikz@math@step}%
+ \tikz@math@for@doloop%
+}%
\def\tikz@math@for@doloop{%
- \tikz@math@for@namegetvalue{prevvalue}{\tikz@math@prevvalue}%
- \tikz@math@for@namegetvalue{step}{\tikz@math@step}%
- \tikz@math@for@namegetvalue{comparitor}{\tikz@math@comparitor}%
- \tikz@math@for@namegetvalue{endvalue}{\tikz@math@endvalue}%
- \tikz@math@dimen=\tikz@math@prevvalue pt\relax%
- \advance\tikz@math@dimen by\tikz@math@step\relax%
- \ifdim\tikz@math@dimen\tikz@math@comparitor\tikz@math@endvalue pt\relax%
- \let\tikz@math@next=\tikz@math@for@endloop%
- \else%
- \tikz@math@for@nameedef{value}{\pgfmath@tonumber{\tikz@math@dimen}}%
- \tikz@math@for@namegetvalue{var}{\tikz@math@var}%
- \expandafter\tikz@math@getvarstring\expandafter{\tikz@math@var}\tikz@math@varstring%
- \tikz@math@for@namegetvalue{index}{\tikz@math@current@index}%
- \tikz@math@for@namegetvalue{action}{\tikz@math@action}%
- \tikz@math@for@namegetvalue{value}{\tikz@math@value}%
- \expandafter\expandafter\expandafter\tikz@math@doassignment\expandafter\expandafter\expandafter%
- {\expandafter\tikz@math@var\expandafter}\expandafter{\tikz@math@value}%
- \tikz@math@for@namegetvalue{execute}{\tikz@math@execute}%
- \expandafter\tikz@math@execute\expandafter{\tikz@math@action}%
- \tikz@math@for@namegetvalue{prevvalue}{\tikz@math@prevvalue}%
- \tikz@math@for@namelet{prevprevvalue}=\tikz@math@prevvalue%
- \tikz@math@for@namegetvalue{value}{\tikz@math@value}%
- \tikz@math@for@namelet{prevvalue}=\tikz@math@value%
- \let\tikz@math@next=\tikz@math@for@doloop%
- \fi%
- \tikz@math@next%
-}
+ \tikz@math@for@namegetvalue{prevvalue}{\tikz@math@prevvalue}%
+ \tikz@math@for@namegetvalue{step}{\tikz@math@step}%
+ \tikz@math@for@namegetvalue{comparitor}{\tikz@math@comparitor}%
+ \tikz@math@for@namegetvalue{endvalue}{\tikz@math@endvalue}%
+ \tikz@math@dimen=\tikz@math@prevvalue pt\relax%
+ \advance\tikz@math@dimen by\tikz@math@step\relax%
+ \ifdim\tikz@math@dimen\tikz@math@comparitor\tikz@math@endvalue pt\relax%
+ \let\tikz@math@next=\tikz@math@for@endloop%
+ \else%
+ \tikz@math@for@nameedef{value}{\pgfmath@tonumber{\tikz@math@dimen}}%
+ \tikz@math@for@namegetvalue{var}{\tikz@math@var}%
+ \expandafter\tikz@math@getvarstring\expandafter{\tikz@math@var}\tikz@math@varstring%
+ \tikz@math@for@namegetvalue{index}{\tikz@math@current@index}%
+ \tikz@math@for@namegetvalue{action}{\tikz@math@action}%
+ \tikz@math@for@namegetvalue{value}{\tikz@math@value}%
+ \expandafter\expandafter\expandafter\tikz@math@doassignment\expandafter\expandafter\expandafter%
+ {\expandafter\tikz@math@var\expandafter}\expandafter{\tikz@math@value}%
+ \tikz@math@for@namegetvalue{execute}{\tikz@math@execute}%
+ \expandafter\tikz@math@execute\expandafter{\tikz@math@action}%
+ \tikz@math@for@namegetvalue{prevvalue}{\tikz@math@prevvalue}%
+ \tikz@math@for@namelet{prevprevvalue}=\tikz@math@prevvalue%
+ \tikz@math@for@namegetvalue{value}{\tikz@math@value}%
+ \tikz@math@for@namelet{prevvalue}=\tikz@math@value%
+ \let\tikz@math@next=\tikz@math@for@doloop%
+ \fi%
+ \tikz@math@next%
+}%
\def\tikz@math@for@endloop{%
-\tikz@math@for@scan}
+\tikz@math@for@scan}%
@@ -635,90 +641,90 @@
\def\tikz@math@for@scan@end#1\tikz@@math{%
\tikz@math@for@namegetvalue{finished}{\tikz@math@next}%
\advance\tikz@math@for@depth by-1\relax%
-\tikz@math@next}
+\tikz@math@next}%
\def\tikz@math@process@keyword@return{%
- \tikz@math@collecttosemicolon{\pgfmathparse{\tikz@math@collected}\tikz@math@parse}}
+ \tikz@math@collecttosemicolon{\pgfmathparse{\tikz@math@collected}\tikz@math@parse}}%
-\def\tikz@math@process@keyword@function{\tikz@math@collecttosemicolon{\tikz@math@process@keyword@@function}}
+\def\tikz@math@process@keyword@function{\tikz@math@collecttosemicolon{\tikz@math@process@keyword@@function}}%
\def\tikz@math@process@keyword@@function{%
- \let\tikz@math@function@name=\pgfutil@empty%
- \let\tikz@math@function@arguments=\pgfutil@empty%
- \let\tikz@math@function@body=\pgfutil@empty%
- \expandafter\expandafter\expandafter\tikz@math@@declarefunction\expandafter\tikz@math@collected\tikz@math@semicolon%
-}
+ \let\tikz@math@function@name=\pgfutil@empty%
+ \let\tikz@math@function@arguments=\pgfutil@empty%
+ \let\tikz@math@function@body=\pgfutil@empty%
+ \expandafter\expandafter\expandafter\tikz@math@@declarefunction\expandafter\tikz@math@collected\tikz@math@semicolon%
+}%
\def\tikz@math@@declarefunction{%
- \pgfutil@ifnextchar\bgroup\tikz@math@@@collectbody\tikz@math@@@declarefunction}
+ \pgfutil@ifnextchar\bgroup\tikz@math@@@collectbody\tikz@math@@@declarefunction}%
\def\tikz@math@@@declarefunction#1{%
- \if#1(%)
- \let\tikz@math@next=\tikz@math@@@collectarguments%
- \else%
- \expandafter\def\expandafter\tikz@math@function@name\expandafter{\tikz@math@function@name#1}%
- \let\tikz@math@next=\tikz@math@@declarefunction%
- \fi%
- \tikz@math@next%
-}
+ \if#1(%)
+ \let\tikz@math@next=\tikz@math@@@collectarguments%
+ \else%
+ \expandafter\def\expandafter\tikz@math@function@name\expandafter{\tikz@math@function@name#1}%
+ \let\tikz@math@next=\tikz@math@@declarefunction%
+ \fi%
+ \tikz@math@next%
+}%
\def\tikz@math@@@collectarguments#1){%
- \def\tikz@math@function@arguments{#1}%
- \tikz@math@@declarefunction%
-}
+ \def\tikz@math@function@arguments{#1}%
+ \tikz@math@@declarefunction%
+}%
\newtoks\tikz@math@toks
-\tikz@math@toks={#}
-\edef\tikz@math@char@hash{\the\tikz@math@toks}
-\tikz@math@toks={}
+\tikz@math@toks={#}%
+\edef\tikz@math@char@hash{\the\tikz@math@toks}%
+\tikz@math@toks={}%
-\def\tikz@math@@@collectbody{\tikz@math@collecttosemicolon{\tikz@math@@@@collectbody}}
+\def\tikz@math@@@collectbody{\tikz@math@collecttosemicolon{\tikz@math@@@@collectbody}}%
\def\tikz@math@@@@collectbody{%
- \tikz@math@toks={}%
- \c@pgf@counta=0\relax%
- \ifx\tikz@math@function@arguments\pgfutil@empty%
- \else%
- \expandafter\tikz@math@createargumentlist\tikz@math@function@arguments,,%
- \expandafter\tikz@math@addto@toks\expandafter{\tikz@math@collected}%
- \fi%
- \edef\tikz@math@local@temp{%
- \noexpand\pgfmathdeclarefunction{\tikz@math@function@name}{\the\c@pgf@counta}%
- {\noexpand\def\noexpand\return{0}\noexpand\tikz@math{\the\tikz@math@toks}}%
- }%
- \tikz@math@local@temp
- \tikz@math@parse%
-}
+ \tikz@math@toks={}%
+ \c@pgf@counta=0\relax%
+ \ifx\tikz@math@function@arguments\pgfutil@empty%
+ \else%
+ \expandafter\tikz@math@createargumentlist\tikz@math@function@arguments,,%
+ \expandafter\tikz@math@addto@toks\expandafter{\tikz@math@collected}%
+ \fi%
+ \edef\tikz@math@local@temp{%
+ \noexpand\pgfmathdeclarefunction{\tikz@math@function@name}{\the\c@pgf@counta}%
+ {\noexpand\def\noexpand\return{0}\noexpand\tikz@math{\the\tikz@math@toks}}%
+ }%
+ \tikz@math@local@temp
+ \tikz@math@parse%
+}%
\def\tikz@math@addto@toks#1{%
- \expandafter\tikz@math@toks\expandafter{\the\tikz@math@toks#1}}
+ \expandafter\tikz@math@toks\expandafter{\the\tikz@math@toks#1}}%
\def\tikz@math@createargumentlist{%
- \pgfutil@ifnextchar
- x\tikz@math@@createargumentlist\tikz@math@@createargumentlist}
+ \pgfutil@ifnextchar
+ x\tikz@math@@createargumentlist\tikz@math@@createargumentlist}%
-\def\tikz@math@comma{,}
+\def\tikz@math@comma{,}%
\def\tikz@math@@createargumentlist#1,{%
- \def\tikz@math@tmp{#1}%
- \ifx\tikz@math@tmp\pgfutil@empty%
- \let\tikz@math@next=\relax%
- \else%
- \advance\c@pgf@counta by1\relax%
- \tikz@math@addto@toks{#1=}%
- \expandafter\expandafter\expandafter\tikz@math@addto@toks\expandafter\expandafter\expandafter%
- {\expandafter\tikz@math@char@hash\the\c@pgf@counta;}%
- \let\tikz@math@next=\tikz@math@createargumentlist%
- \fi%
- \tikz@math@next%
-}
+ \def\tikz@math@tmp{#1}%
+ \ifx\tikz@math@tmp\pgfutil@empty%
+ \let\tikz@math@next=\relax%
+ \else%
+ \advance\c@pgf@counta by1\relax%
+ \tikz@math@addto@toks{#1=}%
+ \expandafter\expandafter\expandafter\tikz@math@addto@toks\expandafter\expandafter\expandafter%
+ {\expandafter\tikz@math@char@hash\the\c@pgf@counta;}%
+ \let\tikz@math@next=\tikz@math@createargumentlist%
+ \fi%
+ \tikz@math@next%
+}%
\let\tikzmath=\tikz@math
-\tikzset{evaluate/.code={\tikz@math{#1}}}
+\tikzset{evaluate/.code={\tikz@math{#1}}}%
\let\tikzmathfor=\tikz@math@for@external
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex
index eb2d65a33fc..90894ff206d 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex
@@ -7,29 +7,29 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex,v 1.4 2013/07/12 22:01:58 tantau Exp $
+\ProvidesFileRCS{tikzlibrarymatrix.code.tex}
% A matrix of nodes contains a node in each cell.
-\tikzstyle{matrix of nodes}=[%
+\tikzset{matrix of nodes/.style={%
matrix,%
cells={anchor=base},%
execute at begin cell=\tikz@lib@matrix@start@cell,%
execute at end cell=\tikz@lib@matrix@end@cell,%
execute at empty cell=\tikz@lib@matrix@empty@cell,
execute at begin matrix=\iftikz@handle@active@code\tikz@orig@shorthands\fi,%
-]
+}}%
-\def\tikz@lib@matrix@empty@cell{\iftikz@lib@matrix@empty\node[name=\tikzmatrixname-\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn]{};\fi}
+\def\tikz@lib@matrix@empty@cell{\iftikz@lib@matrix@empty\node[name=\tikzmatrixname-\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn]{};\fi}%
\newif\iftikz@lib@matrix@plain
\def\tikz@lib@matrix@start@cell{%
- \pgfutil@ifnextchar|{\tikz@lib@matrix@with@options}{\tikz@lib@matrix@normal@start@cell}}
+ \pgfutil@ifnextchar|{\tikz@lib@matrix@with@options}{\tikz@lib@matrix@normal@start@cell}}%
\def\tikz@lib@matrix@with@options|#1|{\tikz@lib@matrix@plainfalse\node%
- [name=\tikzmatrixname-\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn]#1\bgroup\tikz@lib@matrix@startup}
+ [name=\tikzmatrixname-\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn]#1\bgroup\tikz@lib@matrix@startup}%
\def\tikz@lib@matrix@normal@start@cell{\pgfutil@ifnextchar\let{\tikz@lib@matrix@check}{\tikz@lib@matrix@plainfalse\node
@@ -38,14 +38,14 @@
\def\tikz@lib@matrix@check#1{% evil hackery to find out about start of path
\pgfutil@ifnextchar\tikz@signal@path{\tikz@lib@matrix@plaintrue\let}{\tikz@lib@matrix@plainfalse\node
[name=\tikzmatrixname-\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn]\bgroup\tikz@lib@matrix@startup\let}%
-}
-
+}%
+
\def\tikz@lib@matrix@end@cell{%
\iftikz@lib@matrix@plain%
\else%
\expandafter\egroup\expandafter;%
- \fi%
-}
+ \fi%
+}%
\def\tikz@lib@matrix@startup{%
\pgfutil@ifnextchar\bgroup{%
@@ -56,28 +56,28 @@
\afterassignment\tikz@lib@matrix@smuggle%
\let\tikz@next}
{\let\\=\pgfmatrixendrow}%
-}
+}%
\def\tikz@lib@matrix@smuggle{%
\bgroup%
\let\\=\tikz@lib@matrix@saved@eol%
-}
+}%
% Fill empty nodes in a matrix of nodes
\newif\iftikz@lib@matrix@empty
-\tikzoption{nodes in empty cells}[true]{\csname tikz@lib@matrix@empty#1\endcsname}
+\tikzoption{nodes in empty cells}[true]{\csname tikz@lib@matrix@empty#1\endcsname}%
% Same as a matrix of nodes, but switch on math mode in each cell
-\tikzstyle{matrix of math nodes}=[%
+\tikzset{matrix of math nodes/.style={%
matrix of nodes,
nodes={%
execute at begin node=$,%
execute at end node=$%
}%
-]
+}}%
@@ -91,7 +91,7 @@
{north}%
{#1}%
{.}%
- {\pgf@y}}}}
+ {\pgf@y}}}}%
\tikzoption{right delimiter}{\tikzset{append after command={\tikz@delimiter%
{south west}%
@@ -101,7 +101,7 @@
{north}%
{.}%
{#1}%
- {\pgf@y}}}}
+ {\pgf@y}}}}%
\tikzoption{above delimiter}{\tikzset{append after command={\tikz@delimiter%
{south east}%
@@ -111,7 +111,7 @@
{east}%
{#1}%
{.}%
- {\pgf@x}}}}
+ {\pgf@x}}}}%
\tikzoption{below delimiter}{\tikzset{append after command={\tikz@delimiter%
{south west}%
@@ -121,7 +121,7 @@
{east}%
{.}%
{#1}%
- {\pgf@x}}}}
+ {\pgf@x}}}}%
\def\tikz@delimiter#1#2#3#4#5#6#7#8{%
\bgroup
@@ -133,12 +133,12 @@
}
\pgfextra{\global\let\tikz@last@fig@name=\tikz@save@last@fig@name}%
\egroup%
-}
+}%
-\tikzstyle{every delimiter}=[]
-\tikzstyle{every left delimiter}=[]
-\tikzstyle{every right delimiter}=[]
-\tikzstyle{every above delimiter}=[]
-\tikzstyle{every below delimiter}=[]
+\tikzset{every delimiter/.style={}}%
+\tikzset{every left delimiter/.style={}}%
+\tikzset{every right delimiter/.style={}}%
+\tikzset{every above delimiter/.style={}}%
+\tikzset{every below delimiter/.style={}}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex
index 4b6a952ac13..4dc97d1aacf 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex
@@ -7,10 +7,10 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymindmap.code.tex,v 1.10 2013/07/16 12:43:14 tantau Exp $
+\ProvidesFileRCS{tikzlibrarymindmap.code.tex}
-\usetikzlibrary{trees,decorations}
+\usetikzlibrary{trees,decorations}%
% A decoration for connecting circle nodes
@@ -18,7 +18,7 @@
% Parameters: start radius, end radius, amplitude, angle
\pgfdeclaredecoration{circle connection bar}{initial}
-{
+{%
\state{initial}[width=0pt,next state=bar]
{
{
@@ -46,7 +46,7 @@
{\pgfpointpolar{\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}}
\pgfpathclose
}
- }
+ }%
\state{bar}[width=0pt,next state=end]
{
\pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/decoration/start radius}}%
@@ -55,7 +55,7 @@
\pgfpathrectangle
{\pgfqpoint{.5\pgfutil@tempdima}{-.5\pgf@xc}}
{\pgfpoint{\pgfdecoratedremainingdistance+-.5\pgfutil@tempdimb+-.5\pgfutil@tempdima}{\pgf@xc}}
- }
+ }%
\state{end}[width=0pt,next state=final]
{
{
@@ -85,19 +85,19 @@
{\pgfpointpolar{\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/end radius}}}
\pgfpathclose
}
- }
+ }%
\state{final}
- {}
-}
+ {}%
+}%
-\pgfkeys{/pgf/decoration/angle=20}
+\pgfkeys{/pgf/decoration/angle=20}%
% To paths for connecting circle nodes
-\tikzstyle{circle connection bar}=
-[to path={
+\tikzset{circle connection bar/.style=
+{to path={
\pgfextra{%
\tikz@lib@mindmap@check{\tikztostart}%
\tikz@compute@circle@radii\tikz@compute@segmentamplitude%
@@ -107,8 +107,8 @@
{ -- (\tikztotarget) \tikztonodes}
},
append after command={[fill=\tikz@concept@color,draw=none]}
-]
-\tikzstyle{every circle connection bar}=[]
+}}%
+\tikzset{every circle connection bar/.style={}}%
\def\tikz@compute@circle@radii{%
\pgf@process{\pgfpointtransformed{\pgfpointanchor{\tikztostart}{center}}}%
@@ -121,7 +121,7 @@ append after command={[fill=\tikz@concept@color,draw=none]}
\pgf@process{\pgfpointtransformed{\pgfpointanchor{\tikztotarget}{west}}}%
\advance\pgf@xa by-\pgf@x%
\pgfkeys{/pgf/decoration/end radius/.expanded=\the\pgf@xa}%
-}
+}%
\def\tikz@compute@segmentamplitude{%
\pgf@x=\pgfkeysvalueof{/pgf/decoration/start radius}\relax%
\ifdim\pgf@x>\pgfkeysvalueof{/pgf/decoration/end radius}\relax%
@@ -129,7 +129,7 @@ append after command={[fill=\tikz@concept@color,draw=none]}
\fi%
\pgf@x=.175\pgf@x\relax%
\edef\pgfdecorationsegmentamplitude{\the\pgf@x}%
-}
+}%
@@ -137,7 +137,7 @@ append after command={[fill=\tikz@concept@color,draw=none]}
\def\tikz@lib@mindmap@check#1{%
\pgfutil@ifundefined{pgf@sh@ns@#1}%
- {\tikzerror{You are attempting to connect two things by a circle
+ {\tikzerror{You are attempting to connect two things by a circle
connection bar where one is not a node}}{%
\expandafter\ifx\csname pgf@sh@ns@#1\endcsname\tikz@lib@coordinate@text%
\tikzerror{You are attempting to connect node of shape
@@ -145,14 +145,14 @@ append after command={[fill=\tikz@concept@color,draw=none]}
'circle' or something similar, instead.}
\fi%
}
-}
+}%
-\def\tikz@lib@coordinate@text{coordinate}
+\def\tikz@lib@coordinate@text{coordinate}%
% Switch color in a mindmap
-\tikzoption{circle connection bar switch color}{\tikz@parse@switch#1\pgf@unique}
+\tikzoption{circle connection bar switch color}{\tikz@parse@switch#1\pgf@unique}%
\def\tikz@parse@switch from (#1) to (#2)\pgf@unique{%
\tikzset{to path={%
\pgfextra{%
@@ -167,7 +167,7 @@ append after command={[fill=\tikz@concept@color,draw=none]}
}%
[every circle connection bar]
decorate [decoration=circle connection bar]
- { -- (\tikztotarget) \tikztonodes}
+ { -- (\tikztotarget) \tikztonodes}
},
append after command={
[fill=none,draw=none,path picture=\tikz@lib@shade@pic]
@@ -176,7 +176,7 @@ append after command={[fill=\tikz@concept@color,draw=none]}
\pgfutil@colorlet{tikz@switch@to}{#2}%
}}
}
-}
+}%
\def\tikz@lib@shade@pic{%
% We have to draw the shading...
@@ -234,7 +234,7 @@ append after command={[fill=\tikz@concept@color,draw=none]}
\pgftransformxshift{50bp}
\pgflowlevelsynccm%
\pgfuseshading{tikz@shade@bar}
-}
+}%
\tikzoption{concept color}{%
\let\tikz@old@concept@color=\tikz@concept@color%
@@ -243,73 +243,73 @@ append after command={[fill=\tikz@concept@color,draw=none]}
to[circle connection bar switch color=from (\tikz@old@concept@color) to (#1)]
(\tikzchildnode)}
\def\tikz@concept@color{#1}%
-}
+}%
\pgfdeclarehorizontalshading[tikz@switch@from,tikz@switch@to]{tikz@shade@bar}{100bp}{%
color(0pt)=(tikz@switch@from);
- color(100bp)=(tikz@switch@to)}
+ color(100bp)=(tikz@switch@to)}%
% A concept node
-\tikzstyle{concept}= [circle,fill=\tikz@concept@color,draw=\tikz@concept@color,every concept]
-\tikzstyle{every concept}= []
+\tikzset{concept/.style= {circle,fill=\tikz@concept@color,draw=\tikz@concept@color,every concept}}%
+\tikzset{every concept/.style= {}}%
-\def\tikz@concept@color{black}
+\def\tikz@concept@color{black}%
-\tikzstyle{tikz@concept@setting}=[edge from parent path={(\tikzparentnode) to [circle connection bar] (\tikzchildnode)}]
-\tikzstyle{tikz@concept@color@set}=[]
+\tikzset{tikz@concept@setting/.style={edge from parent path={(\tikzparentnode) to [circle connection bar] (\tikzchildnode)}}}%
+\tikzset{tikz@concept@color@set/.style={}}%
-\tikzstyle{extra concept}= [concept color=black!50,level 2 concept,concept,every extra concept]
-\tikzstyle{every extra concept}=[]
+\tikzset{extra concept/.style= {concept color=black!50,level 2 concept,concept,every extra concept}}%
+\tikzset{every extra concept/.style={}}%
-\tikzstyle{concept connection}=[line width=1mm,shorten <=2mm,shorten >=2mm,cap=round,draw=black!50]
+\tikzset{concept connection/.style={line width=1mm,shorten <=2mm,shorten >=2mm,cap=round,draw=black!50}}%
% A mindmap
-\tikzstyle{mindmap}=
- [fill,draw,very thick,outer sep=0pt,inner sep=1pt,%
+\tikzset{mindmap/.style=
+ {fill,draw,very thick,outer sep=0pt,inner sep=1pt,%
every child/.append style={style=tikz@concept@setting,style=tikz@concept@color@set},%
root concept,
level 1/.append style={level 1 concept},
level 2/.append style={level 2 concept},
level 3/.append style={level 3 concept},
level 4/.append style={level 4 concept},
- text centered,%
+ text centered,%
segment angle=20,
style=every mindmap,
- ]
-\tikzstyle{every mindmap}=[]
-
-
-\tikzstyle{root concept}= [minimum size=4cm,text width=3.5cm,font=\pgfutil@font@large]
-\tikzstyle{level 1 concept}=[minimum size=2.25cm,
- level distance=5cm,
- text width=2cm,
- sibling angle=60,
- font=\pgfutil@font@small]
-\tikzstyle{level 2 concept}=[minimum size=1.75cm,%
- level distance=2.9cm,%
- text width=1.5cm,%
- sibling angle=60,%
- font=\pgfutil@font@footnotesize]
-\tikzstyle{level 3 concept}=[minimum size=1.15cm,%
- text width=1cm,%
- level distance=2.4cm,%
- sibling angle=30,%
- font=\pgfutil@font@tiny]
-\tikzstyle{level 4 concept}=[minimum size=0.9cm,%
- text width=0.7cm,
- level distance=1.85cm,%
- sibling angle=30,%
- font=\pgfutil@font@tiny]
-
-\tikzstyle{small mindmap}=
- [%
+ }}%
+\tikzset{every mindmap/.style={}}%
+
+
+\tikzset{root concept/.style= {minimum size=4cm,text width=3.5cm,font=\pgfutil@font@large}}%
+\tikzset{level 1 concept/.style={minimum size=2.25cm,
+ level distance=5cm,
+ text width=2cm,
+ sibling angle=60,
+ font=\pgfutil@font@small}}%
+\tikzset{level 2 concept/.style={minimum size=1.75cm,%
+ level distance=2.9cm,%
+ text width=1.5cm,%
+ sibling angle=60,%
+ font=\pgfutil@font@footnotesize}}%
+\tikzset{level 3 concept/.style={minimum size=1.15cm,%
+ text width=1cm,%
+ level distance=2.4cm,%
+ sibling angle=30,%
+ font=\pgfutil@font@tiny}}%
+\tikzset{level 4 concept/.style={minimum size=0.9cm,%
+ text width=0.7cm,
+ level distance=1.85cm,%
+ sibling angle=30,%
+ font=\pgfutil@font@tiny}}%
+
+\tikzset{small mindmap/.style=
+ {%
root concept/.style={minimum size=2.3cm,text width=2.1cm,font=\pgfutil@font@footnotesize},
level 1 concept/.style={%
minimum size=1.5cm,
@@ -324,18 +324,18 @@ append after command={[fill=\tikz@concept@color,draw=none]}
sibling angle=60,%
font=\pgfutil@font@tiny},%
level 3 concept/.style={%
- level 2 concept,
+ level 2 concept,
sibling angle=30,%
font=\pgfutil@font@tiny},%
level 4 concept/.style={%
- level 3 concept,
+ level 3 concept,
},
mindmap,%
- line width=2pt
- ]
-
-\tikzstyle{large mindmap}=
- [%
+ line width=2pt,
+ }}%
+
+\tikzset{large mindmap/.style=
+ {%
root concept/.style={minimum size=5.6cm,text width=4.5cm,font=\pgfutil@font@Large},
level 1 concept/.style={%
minimum size=3.2cm,
@@ -363,11 +363,11 @@ append after command={[fill=\tikz@concept@color,draw=none]}
sibling angle=30,%
font=\pgfutil@font@tiny},%
mindmap,%
- line width=2pt
- ]
-
-\tikzstyle{huge mindmap}=
- [%
+ line width=2pt,
+ }}%
+
+\tikzset{huge mindmap/.style=
+ {%
root concept/.style={minimum size=8cm,text width=7cm,font=\pgfutil@font@huge},
level 1 concept/.style={%
minimum size=4.5cm,
@@ -395,24 +395,23 @@ append after command={[fill=\tikz@concept@color,draw=none]}
sibling angle=30,%
font=\pgfutil@font@scriptsize},%
mindmap,%
- line width=3pt
- ]
-
+ line width=3pt,
+ }}%
+
% Annotations
-\tikzstyle{annotation}=[shape=rectangle,
- minimum size=0pt,
- text width=3.5cm,
- outer sep=1.5mm,
- inner sep=1mm,
- text badly ragged,
- rounded corners,
- font=\pgfutil@font@tiny,
- every annotation]
-\tikzstyle{every annotation}=[]
+\tikzset{annotation/.style={shape=rectangle,
+ minimum size=0pt,
+ text width=3.5cm,
+ outer sep=1.5mm,
+ inner sep=1mm,
+ text badly ragged,
+ rounded corners,
+ font=\pgfutil@font@tiny,
+ every annotation}}%
+\tikzset{every annotation/.style={}}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.code.tex
index b6a0d3c9931..22ce51d8cbd 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.code.tex
@@ -7,11 +7,11 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.code.tex,v 1.2 2008/01/15 10:27:34 tantau Exp $
+\ProvidesFileRCS{tikzlibrarypatterns.code.tex}
-\usepgflibrary{patterns}
+\usepgflibrary{patterns}%
-\tikzoption{pattern color}{\edef\tikz@pattern@color{#1}}
+\tikzoption{pattern color}{\edef\tikz@pattern@color{#1}}%
\tikzoption{pattern}[]{%
\edef\tikz@temp{#1}%
\ifx\tikz@temp\tikz@nonetext%
@@ -24,8 +24,8 @@
\fi%
\tikz@addmode{\tikz@mode@filltrue}%
\fi%
-}
-\def\tikz@pattern@color{black}
-\def\tikz@pattern{dots}
+}%
+\def\tikz@pattern@color{black}%
+\def\tikz@pattern{dots}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.meta.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.meta.code.tex
index 6f8ec32f888..3b52136f708 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.meta.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypatterns.meta.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgflibrary{patterns.meta}
+\usepgflibrary{patterns.meta}%
\tikzset{%
pattern color/.code=\edef\tikz@pattern@color{#1},
@@ -15,7 +15,7 @@
\edef\tikz@temp{#1}%
\ifx\tikz@temp\tikz@nonetext%
\tikz@addmode{\tikz@mode@fillfalse}%
- \else%
+ \else%
\ifx\tikz@temp\pgfutil@empty%
\else%
\tikz@addoption{\pgfsetfillpattern{#1}{\tikz@pattern@color}}%
@@ -24,14 +24,14 @@
\tikz@addmode{\tikz@mode@filltrue}%
\fi%
}
-}
+}%
-\def\tikz@pattern@color{black}
-\def\tikz@pattern{}
+\def\tikz@pattern@color{black}%
+\def\tikz@pattern{}%
\tikzset{patterns/.cd,
.unknown/.code={%
- \let\tikz@pat@key=\pgfkeyscurrentname%
+ \let\tikz@pat@key=\pgfkeyscurrentname%
\pgfkeys{/pgf/patterns/\tikz@pat@key/.try={#1}}%
},
bottom left/.style={/pgf/patterns/bottom left={\tikz@scan@one@point\pgf@pat@process#1}},
@@ -52,13 +52,13 @@
(\the\pgf@picmaxx+#1,\the\pgf@picmaxy+#1)
},
/tikz/patterns/tile size={%
- (\the\pgf@picmaxx-\the\pgf@picminx,
+ (\the\pgf@picmaxx-\the\pgf@picminx,
\the\pgf@picmaxy-\the\pgf@picminy)}}}%
}%
\let\pgf@pat@declarepost=\tikz@pat@installbb%
},
infer tile bounding box/.default=0pt,
-}
+}%
\def\tikzdeclarepattern#1{%
\begingroup%
@@ -78,18 +78,18 @@
}%
\pgfdeclarepattern{/tikz/patterns/.cd, #1}%
\endgroup%
- }
-
+ }%
+
\def\tikz@declarepattern@install{%
\let\tikz@compat@color@set=\tikz@compat@color@set@insidepatttern%
\tikz@installcommands%
-}
+}%
\let\tikz@compat@color@set@orig=\tikz@compat@color@set
\def\tikz@compat@color@set@insidepatttern#1{%
\tikz@compat@color@set@orig{#1}%
\pgfsetfillcolor{#1}\pgfsetstrokecolor{#1}%
-}
+}%
%%% Local Variables:
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypetri.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypetri.code.tex
index e67027eadfb..7241394d804 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypetri.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypetri.code.tex
@@ -7,60 +7,60 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypetri.code.tex,v 1.3 2013/07/17 08:56:23 tantau Exp $
+\ProvidesFileRCS{tikzlibrarypetri.code.tex}
% Styles for places:
-\tikzstyle{every place}= []
-\tikzstyle{place}= [circle,draw,inner sep=0pt,
- minimum size=5ex,
- every place]
+\tikzset{every place/.style= {}}%
+\tikzset{place/.style= {circle,draw,inner sep=0pt,
+ minimum size=5ex,
+ every place}}%
% Styles for transition:
-\tikzstyle{every transition}= []
-\tikzstyle{transition}= [rectangle,draw,inner sep=0pt,
- minimum size=4mm,
- every transition]
+\tikzset{every transition/.style= {}}%
+\tikzset{transition/.style= {rectangle,draw,inner sep=0pt,
+ minimum size=4mm,
+ every transition}}%
% Styles for relationship types:
-\tikzstyle{pre}= [<-,shorten <=1pt]
-\tikzstyle{post}= [->,shorten >=1pt]
-\tikzstyle{pre and post}= [<->,shorten >=1pt,shorten <=1pt]
+\tikzset{pre/.style= {<-,shorten <=1pt}}%
+\tikzset{post/.style= {->,shorten >=1pt}}%
+\tikzset{pre and post/.style= {<->,shorten >=1pt,shorten <=1pt}}%
% Styles for marks:
-\tikzstyle{every token}= []
-\tikzstyle{token}= [fill=black,draw=none,circle,
- inner sep=0.5pt,minimum size=1ex,
- text=white,font=\pgfutil@font@tiny,every token]
+\tikzset{every token/.style= {}}%
+\tikzset{token/.style= {fill=black,draw=none,circle,
+ inner sep=0.5pt,minimum size=1ex,
+ text=white,font=\pgfutil@font@tiny,every token}}%
-\tikzoption{token distance}{\def\tikz@token@distance{#1}}
-\def\tikz@token@distance{1.5ex}
+\tikzoption{token distance}{\def\tikz@token@distance{#1}}%
+\def\tikz@token@distance{1.5ex}%
-\tikzstyle{children are tokens}= [growth function=\tikz@grow@tokens,edge from parent path=]
+\tikzset{children are tokens/.style= {growth function=\tikz@grow@tokens,edge from parent path=}}%
\tikzoption{tokens}{%
\ifnum#1>0\relax%
\tikzset{append after command={}
{[children are tokens]child foreach \tikz@dummy in {1,...,#1} {node[token]{}}}}%
- \fi}
+ \fi}%
\tikzoption{colored tokens}{%
\tikzset{append after command={}%
{[children are tokens]child foreach \tikz@child@color in {#1} {node[token,\tikz@child@color]{}}}}%
- }
+ }%
\tikzoption{structured tokens}{%
\tikzset{append after command={}%
{[children are tokens]child foreach \tikzpetrichildname in {#1} {node[token]{\tikzpetrichildname}}}}%
- }
+ }%
\def\tikz@grow@tokens{%
@@ -70,77 +70,77 @@
\pgf@yc=0pt%
\csname tikz@grow@tokens@placer@\the\tikznumberofchildren @\the\tikznumberofcurrentchild\endcsname%
\pgftransformshift{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
-}
+}%
\def\tikz@def@grow@tokens#1#2#3#4{%
\expandafter\def\csname tikz@grow@tokens@placer@#1@#2\endcsname{%
\pgf@xc=#3\pgf@xa%
\pgf@yc=#4\pgf@ya}%
-}
+}%
% Single token
-\tikz@def@grow@tokens{1}{1}{0}{0}
+\tikz@def@grow@tokens{1}{1}{0}{0}%
% Two tokens
-\tikz@def@grow@tokens{2}{1}{-.5}{0}
-\tikz@def@grow@tokens{2}{2}{.5}{0}
+\tikz@def@grow@tokens{2}{1}{-.5}{0}%
+\tikz@def@grow@tokens{2}{2}{.5}{0}%
% Three tokens
-\tikz@def@grow@tokens{3}{1}{0} {0.57}
-\tikz@def@grow@tokens{3}{2}{-.5}{-.306025}
-\tikz@def@grow@tokens{3}{3}{.5} {-.306025}
+\tikz@def@grow@tokens{3}{1}{0} {0.57}%
+\tikz@def@grow@tokens{3}{2}{-.5}{-.306025}%
+\tikz@def@grow@tokens{3}{3}{.5} {-.306025}%
% Four tokens
-\tikz@def@grow@tokens{4}{1}{-.5}{.5}
-\tikz@def@grow@tokens{4}{2}{.5}{.5}
-\tikz@def@grow@tokens{4}{3}{-.5}{-.5}
-\tikz@def@grow@tokens{4}{4}{.5}{-.5}
+\tikz@def@grow@tokens{4}{1}{-.5}{.5}%
+\tikz@def@grow@tokens{4}{2}{.5}{.5}%
+\tikz@def@grow@tokens{4}{3}{-.5}{-.5}%
+\tikz@def@grow@tokens{4}{4}{.5}{-.5}%
% Five tokens
-\tikz@def@grow@tokens{5}{1}{0}{.85}
-\tikz@def@grow@tokens{5}{2}{-0.808398}{0.26266}
-\tikz@def@grow@tokens{5}{3}{0.808398}{0.26266}
-\tikz@def@grow@tokens{5}{4}{-0.499617}{-0.687664}
-\tikz@def@grow@tokens{5}{5}{0.499617}{-0.687664}
+\tikz@def@grow@tokens{5}{1}{0}{.85}%
+\tikz@def@grow@tokens{5}{2}{-0.808398}{0.26266}%
+\tikz@def@grow@tokens{5}{3}{0.808398}{0.26266}%
+\tikz@def@grow@tokens{5}{4}{-0.499617}{-0.687664}%
+\tikz@def@grow@tokens{5}{5}{0.499617}{-0.687664}%
% Six tokens
-\tikz@def@grow@tokens{6}{1}{-1}{.5}
-\tikz@def@grow@tokens{6}{2}{0}{.5}
-\tikz@def@grow@tokens{6}{3}{1}{.5}
-\tikz@def@grow@tokens{6}{4}{-1}{-.5}
-\tikz@def@grow@tokens{6}{5}{0}{-.5}
-\tikz@def@grow@tokens{6}{6}{1}{-.5}
+\tikz@def@grow@tokens{6}{1}{-1}{.5}%
+\tikz@def@grow@tokens{6}{2}{0}{.5}%
+\tikz@def@grow@tokens{6}{3}{1}{.5}%
+\tikz@def@grow@tokens{6}{4}{-1}{-.5}%
+\tikz@def@grow@tokens{6}{5}{0}{-.5}%
+\tikz@def@grow@tokens{6}{6}{1}{-.5}%
% Seven tokens
-\tikz@def@grow@tokens{7}{1}{0}{1}
-\tikz@def@grow@tokens{7}{2}{-1}{.5}
-\tikz@def@grow@tokens{7}{3}{0}{0}
-\tikz@def@grow@tokens{7}{4}{1}{.5}
-\tikz@def@grow@tokens{7}{5}{-1}{-.5}
-\tikz@def@grow@tokens{7}{6}{0}{-1}
-\tikz@def@grow@tokens{7}{7}{1}{-.5}
+\tikz@def@grow@tokens{7}{1}{0}{1}%
+\tikz@def@grow@tokens{7}{2}{-1}{.5}%
+\tikz@def@grow@tokens{7}{3}{0}{0}%
+\tikz@def@grow@tokens{7}{4}{1}{.5}%
+\tikz@def@grow@tokens{7}{5}{-1}{-.5}%
+\tikz@def@grow@tokens{7}{6}{0}{-1}%
+\tikz@def@grow@tokens{7}{7}{1}{-.5}%
% Eight tokens
-\tikz@def@grow@tokens{8}{1}{-.5}{1}
-\tikz@def@grow@tokens{8}{2}{.5}{1}
-\tikz@def@grow@tokens{8}{3}{-1}{0}
-\tikz@def@grow@tokens{8}{4}{0}{0}
-\tikz@def@grow@tokens{8}{5}{1}{0}
-\tikz@def@grow@tokens{8}{6}{-1}{-1}
-\tikz@def@grow@tokens{8}{7}{0}{-1}
-\tikz@def@grow@tokens{8}{8}{1}{-1}
+\tikz@def@grow@tokens{8}{1}{-.5}{1}%
+\tikz@def@grow@tokens{8}{2}{.5}{1}%
+\tikz@def@grow@tokens{8}{3}{-1}{0}%
+\tikz@def@grow@tokens{8}{4}{0}{0}%
+\tikz@def@grow@tokens{8}{5}{1}{0}%
+\tikz@def@grow@tokens{8}{6}{-1}{-1}%
+\tikz@def@grow@tokens{8}{7}{0}{-1}%
+\tikz@def@grow@tokens{8}{8}{1}{-1}%
% Eight tokens
-\tikz@def@grow@tokens{9}{1}{-1}{1}
-\tikz@def@grow@tokens{9}{2}{0}{1}
-\tikz@def@grow@tokens{9}{3}{1}{1}
-\tikz@def@grow@tokens{9}{4}{-1}{0}
-\tikz@def@grow@tokens{9}{5}{0}{0}
-\tikz@def@grow@tokens{9}{6}{1}{0}
-\tikz@def@grow@tokens{9}{7}{-1}{-1}
-\tikz@def@grow@tokens{9}{8}{0}{-1}
-\tikz@def@grow@tokens{9}{9}{1}{-1}
+\tikz@def@grow@tokens{9}{1}{-1}{1}%
+\tikz@def@grow@tokens{9}{2}{0}{1}%
+\tikz@def@grow@tokens{9}{3}{1}{1}%
+\tikz@def@grow@tokens{9}{4}{-1}{0}%
+\tikz@def@grow@tokens{9}{5}{0}{0}%
+\tikz@def@grow@tokens{9}{6}{1}{0}%
+\tikz@def@grow@tokens{9}{7}{-1}{-1}%
+\tikz@def@grow@tokens{9}{8}{0}{-1}%
+\tikz@def@grow@tokens{9}{9}{1}{-1}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplothandlers.code.tex
index f38560bc6a0..6e1b497b65b 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplothandlers.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplothandlers.code.tex
@@ -7,8 +7,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplothandlers.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
+\ProvidesFileRCS{tikzlibraryplothandlers.code.tex}
-\usepgflibrary{plothandlers}
+\usepgflibrary{plothandlers}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex
index 344db60fff0..3b2caac869a 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex
@@ -7,8 +7,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
+\ProvidesFileRCS{tikzlibraryplotmarks.code.tex}
-\usepgflibrary{plotmarks}
+\usepgflibrary{plotmarks}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypositioning.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypositioning.code.tex
index 7a9066e691e..830212928d5 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypositioning.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypositioning.code.tex
@@ -7,30 +7,30 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarypositioning.code.tex,v 1.7 2008/10/06 09:35:29 tantau Exp $
+\ProvidesFileRCS{tikzlibrarypositioning.code.tex}
-\tikzset{above/.code=\tikz@lib@place@handle@{#1}{south}{0}{1}{north}{1}}
-\tikzset{above left/.code=\tikz@lib@place@handle@{#1}{south east}{-1}{1}{north west}{0.707106781}}
-\tikzset{above right/.code=\tikz@lib@place@handle@{#1}{south west}{1}{1}{north east}{0.707106781}}
-\tikzset{base left/.code =\tikz@lib@place@handle@{#1}{base east}{-1}{0}{base west}{1}}
-\tikzset{base right/.code=\tikz@lib@place@handle@{#1}{base west}{1}{0}{base east}{1}}
-\tikzset{below/.code=\tikz@lib@place@handle@{#1}{north}{0}{-1}{south}{1}}
-\tikzset{below left/.code=\tikz@lib@place@handle@{#1}{north east}{-1}{-1}{south west}{0.707106781}}
-\tikzset{below right/.code=\tikz@lib@place@handle@{#1}{north west}{1}{-1}{south east}{0.707106781}}
-\tikzset{left/.code =\tikz@lib@place@handle@{#1}{east}{-1}{0}{west}{1}}
-\tikzset{mid left/.code =\tikz@lib@place@handle@{#1}{mid east}{-1}{0}{mid west}{1}}
-\tikzset{mid right/.code=\tikz@lib@place@handle@{#1}{mid west}{1}{0}{mid east}{1}}
-\tikzset{right/.code=\tikz@lib@place@handle@{#1}{west}{1}{0}{east}{1}}
+\tikzset{above/.code=\tikz@lib@place@handle@{#1}{south}{0}{1}{north}{1}}%
+\tikzset{above left/.code=\tikz@lib@place@handle@{#1}{south east}{-1}{1}{north west}{0.707106781}}%
+\tikzset{above right/.code=\tikz@lib@place@handle@{#1}{south west}{1}{1}{north east}{0.707106781}}%
+\tikzset{base left/.code =\tikz@lib@place@handle@{#1}{base east}{-1}{0}{base west}{1}}%
+\tikzset{base right/.code=\tikz@lib@place@handle@{#1}{base west}{1}{0}{base east}{1}}%
+\tikzset{below/.code=\tikz@lib@place@handle@{#1}{north}{0}{-1}{south}{1}}%
+\tikzset{below left/.code=\tikz@lib@place@handle@{#1}{north east}{-1}{-1}{south west}{0.707106781}}%
+\tikzset{below right/.code=\tikz@lib@place@handle@{#1}{north west}{1}{-1}{south east}{0.707106781}}%
+\tikzset{left/.code =\tikz@lib@place@handle@{#1}{east}{-1}{0}{west}{1}}%
+\tikzset{mid left/.code =\tikz@lib@place@handle@{#1}{mid east}{-1}{0}{mid west}{1}}%
+\tikzset{mid right/.code=\tikz@lib@place@handle@{#1}{mid west}{1}{0}{mid east}{1}}%
+\tikzset{right/.code=\tikz@lib@place@handle@{#1}{west}{1}{0}{east}{1}}%
\newif\iftikz@lib@ignore@size
% Hook into resets:
-\pgfutil@g@addto@macro\tikz@node@reset@hook{\tikz@addtransform{\tikz@lib@pos@call}\let\tikz@lib@pos@call=\relax}
+\pgfutil@g@addto@macro\tikz@node@reset@hook{\tikz@addtransform{\tikz@lib@pos@call}\let\tikz@lib@pos@call=\relax}%
-\tikzset{on grid/.is if=tikz@lib@ignore@size}
+\tikzset{on grid/.is if=tikz@lib@ignore@size}%
-\tikzset{node distance=1cm and 1cm}
+\tikzset{node distance=1cm and 1cm}%
\def\tikz@lib@place@handle@#1#2#3#4#5#6{%
\def\tikz@anchor{#2}%
@@ -38,7 +38,7 @@
\edef\tikz@temp{#1}%
\def\tikz@lib@place@single@factor{#6}%
\expandafter\tikz@lib@place@handle@@\expandafter{\tikz@temp}{#3}{#4}{#5}%
-}
+}%
\def\tikz@lib@place@handle@@#1#2#3#4{%
\pgfutil@in@{of }{#1}%
\ifpgfutil@in@%
@@ -54,7 +54,7 @@
\pgf@y=#3\pgf@y%
\edef\tikz@lib@pos@call{\noexpand\pgftransformshift{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
\fi%
-}
+}%
\def\tikz@lib@place@parse@nums#1{%
\pgfutil@in@{and}{#1}%
@@ -65,7 +65,7 @@
\pgf@x=\tikz@lib@place@single@factor\pgf@x%
\pgf@y=\tikz@lib@place@single@factor\pgf@y%
\fi
-}
+}%
\def\tikz@lib@place@parse@nums@#1and#2\tikz@stop{%
\pgfmathparse{#2}%
\ifpgfmathunitsdeclared%
@@ -88,7 +88,7 @@
\fi%
\pgf@x=\pgf@xa%
\pgf@y=\pgf@ya%
-}
+}%
\def\tikz@lib@place@of#1of #2\tikz@stop#3{%
\def\tikz@temp{#1}%
@@ -97,7 +97,7 @@
\else%
\tikz@lib@place@of@{#1}{#2}{#3}%
\fi%
-}
+}%
\def\tikz@lib@place@of@#1#2#3{%
\tikz@scan@one@point\tikz@lib@place@remember(#2)%
\iftikz@shapeborder%
@@ -110,8 +110,8 @@
\fi%
\fi%
\edef\tikz@lib@place@nums{#1}%
-}
-\def\tikz@lib@place@remember#1{\def\tikz@node@at{#1}}
+}%
+\def\tikz@lib@place@remember#1{\def\tikz@node@at{#1}}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex
index cab6be1f07b..99efbfeecae 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex
@@ -7,48 +7,48 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex,v 1.4 2014/03/21 19:52:38 tantau Exp $
+\ProvidesFileRCS{tikzlibraryquotes.code.tex}
-\def\tikz@quote@parser#1{\tikz@quote@@parser#1\pgf@stop}
+\def\tikz@quote@parser#1{\tikz@quote@@parser#1\pgf@stop}%
\def\tikz@quote@@parser"#1"{%
\pgfutil@ifnextchar\bgroup{%
\tikz@quote@@parser@group{#1}}{%
\pgfutil@ifnextchar'{%
\tikz@quote@@parser@apo{#1}}{%
- \tikz@quote@@parser@normal{#1}}}}
+ \tikz@quote@@parser@normal{#1}}}}%
\def\tikz@quote@@parser@apo#1'{%
- \pgfutil@ifnextchar\bgroup{\tikz@quote@@parser@apo@group{#1}}{\tikz@quote@@parser@apo@normal{#1}}}
+ \pgfutil@ifnextchar\bgroup{\tikz@quote@@parser@apo@group{#1}}{\tikz@quote@@parser@apo@normal{#1}}}%
\def\tikz@quote@@parser@group#1#2#3\pgf@stop{%
\expandafter\def\expandafter\tikz@temp\expandafter{\tikz@quotes@as{#1}{#2}}%
\expandafter\pgfkeysalso\expandafter{\tikz@temp}%
-}
+}%
\def\tikz@quote@@parser@normal#1#2\pgf@stop{%
\expandafter\def\expandafter\tikz@temp\expandafter{\tikz@quotes@as{#1}{#2}}%
\expandafter\pgfkeysalso\expandafter{\tikz@temp}%
-}
+}%
\def\tikz@quote@@parser@apo@group#1#2#3\pgf@stop{%
\expandafter\def\expandafter\tikz@temp\expandafter{\tikz@quotes@as{#1}{',#2}}%
\expandafter\pgfkeysalso\expandafter{\tikz@temp}%
-}
+}%
\def\tikz@quote@@parser@apo@normal#1#2\pgf@stop{%
\expandafter\def\expandafter\tikz@temp\expandafter{\tikz@quotes@as{#1}{',#2}}%
\expandafter\pgfkeysalso\expandafter{\tikz@temp}%
-}
+}%
-\pgfkeys{/handlers/first char syntax=true}
+\pgfkeys{/handlers/first char syntax=true}%
\def\tikz@enable@node@quotes{%
\pgfkeyssetvalue{/handlers/first char syntax/the character "}{\tikz@quote@parser}%
\let\tikz@quotes@as\tikz@node@quotes@as%
-}
+}%
\def\tikz@enable@edge@quotes{%
\pgfkeyssetvalue{/handlers/first char syntax/the character "}{\tikz@quote@parser}%
\let\tikz@quotes@as\tikz@edge@quotes@as%
-}
+}%
\def\tikz@enable@pic@quotes{%
\pgfkeyssetvalue{/handlers/first char syntax/the character "}{\tikz@quote@parser}%
\let\tikz@quotes@as\tikz@pic@quotes@as%
-}
+}%
\tikzset{
node quotes mean/.code={\def\tikz@node@quotes@as##1##2{#1}},
@@ -73,17 +73,17 @@
\pgfkeyslet{/tikz/below left/.@cmd}\tikz@label@@below@left
\pgfkeyslet{/tikz/below right/.@cmd}\tikz@label@@below@right
}
-}
+}%
-\def\tikz@label@@centered#1\pgfeov{\pgfkeysalso{label position=center,pin position=center}}
-\def\tikz@label@@above#1\pgfeov{\pgfkeysalso{label position=90,pin position=90}}
-\def\tikz@label@@below#1\pgfeov{\pgfkeysalso{label position=-90,pin position=-90}}
-\def\tikz@label@@left#1\pgfeov{\pgfkeysalso{label position=180,pin position=180}}
-\def\tikz@label@@right#1\pgfeov{\pgfkeysalso{label position=0,pin position=0}}
-\def\tikz@label@@above@left#1\pgfeov{\pgfkeysalso{label position=135,pin position=135}}
-\def\tikz@label@@below@left#1\pgfeov{\pgfkeysalso{label position=-135,pin position=-135}}
-\def\tikz@label@@above@right#1\pgfeov{\pgfkeysalso{label position=45,pin position=45}}
-\def\tikz@label@@below@right#1\pgfeov{\pgfkeysalso{label position=-45,pin position=-45}}
+\def\tikz@label@@centered#1\pgfeov{\pgfkeysalso{label position=center,pin position=center}}%
+\def\tikz@label@@above#1\pgfeov{\pgfkeysalso{label position=90,pin position=90}}%
+\def\tikz@label@@below#1\pgfeov{\pgfkeysalso{label position=-90,pin position=-90}}%
+\def\tikz@label@@left#1\pgfeov{\pgfkeysalso{label position=180,pin position=180}}%
+\def\tikz@label@@right#1\pgfeov{\pgfkeysalso{label position=0,pin position=0}}%
+\def\tikz@label@@above@left#1\pgfeov{\pgfkeysalso{label position=135,pin position=135}}%
+\def\tikz@label@@below@left#1\pgfeov{\pgfkeysalso{label position=-135,pin position=-135}}%
+\def\tikz@label@@above@right#1\pgfeov{\pgfkeysalso{label position=45,pin position=45}}%
+\def\tikz@label@@below@right#1\pgfeov{\pgfkeysalso{label position=-45,pin position=-45}}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryrdf.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryrdf.code.tex
new file mode 100644
index 00000000000..60c87f0dff9
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryrdf.code.tex
@@ -0,0 +1,291 @@
+% Copyright 2016 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS{tikzlibraryrdf.code.tex}
+
+
+
+\def\tikz@add@rdf@pre@option#1{\expandafter\def\expandafter\tikz@rdf@pre@options\expandafter{\tikz@rdf@pre@options#1}}%
+\def\tikz@add@rdf@post@option#1{\expandafter\def\expandafter\tikz@rdf@post@options\expandafter{\tikz@rdf@post@options#1}}%
+
+\let\tikz@rdf@pre@options\pgfutil@empty
+\let\tikz@rdf@post@options\pgfutil@empty
+
+\tikzset{
+ %
+ % Switching on the engine
+ %
+ rdf engine on/.code={%
+ \def\tikz@clear@rdf@options{\let\tikz@rdf@pre@options\pgfutil@empty\let\tikz@rdf@post@options\pgfutil@empty}%
+ \def\tikz@do@rdf@pre@options{\tikz@rdf@pre@options\let\tikz@rdf@pre@options\pgfutil@empty}%
+ \def\tikz@do@rdf@post@options{\tikz@rdf@post@options\let\tikz@rdf@post@options\pgfutil@empty}%
+ \pgfkeys{/tikz/rdf engine/.code=\tikz@add@rdf@pre@option{\pgfqkeys{/tikz/rdf engine}{##1}}}%
+ },
+ rdf engine/.cd,
+ %
+ every statement/.style=,
+ %
+ % Namespaces
+ %
+ prefix/.code=\pgfrdfprefix{#1},
+ %
+ % Core commands
+ %
+ statement/.code={%
+ {%
+ \pgfkeys{/tikz/rdf engine/every statement}%
+ \pgfqkeys{/tikz/rdf engine/statements}{#1}%
+ \iftikz@rdf@is@a@container\tikz@rdf@init@container\fi%
+ \iftikz@rdf@is@a@member\tikz@rdf@make@member\fi%
+ \tikz@rdf@make@triple%
+ \expandafter}\tikz@rdf@action%
+ },
+ get scope curie/.code={%
+ \ifx\tikz@id@name\pgfutil@empty%
+ \def\tikz@id@name{@rdf}%
+ \fi%
+ \pgfidrefnextuse\tikz@temp{\tikz@id@name}%
+ \edef#1{\tikzrdfhashmark\tikz@temp}%
+ },
+ get new resource curie/.code={%
+ \pgfsys@new@id\tikz@temp%
+ \edef#1{\tikzrdfhashmark\tikz@temp}%
+ },
+ scope is new context/.style={get scope curie=\tikzrdfcontext}
+}%
+
+\def\tikzrdfcontext{\tikzrdfhashmark}%empty by default
+
+\tikzset{
+ rdf engine/statements/.cd,
+ %
+ % Core properties of statements
+ %
+ subject/.code={%
+ \def\tikz@rdf@target{\tikz@rdf@subject}%
+ \tikz@rdf@parse{#1}%
+ },
+ predicate/.code={%
+ \def\tikz@rdf@target{\tikz@rdf@predicate}%
+ \tikz@rdf@parse{#1}%
+ },
+ object/.code={%
+ \let\tikz@rdf@object@literal\relax%
+ \let\tikz@rdf@object\relax%
+ \def\tikz@temp{#1}%
+ \ifx\tikz@temp\tikz@rdf@current@scope@text%
+ \tikz@rdf@object@scope@contenttrue%
+ \else%
+ \tikz@rdf@object@scope@contentfalse%
+ \def\tikz@rdf@target{\tikz@rdf@object}%
+ \tikz@rdf@parse{#1}%
+ \fi%
+ },
+ %
+ % Shorthands
+ %
+ has type/.style={predicate=rdf:type,object={#1}},
+ %
+ % Containers
+ %
+ is a bag/.style={has type=rdf:Bag, is a container},
+ is a sequence/.style={has type=rdf:Seq, is a container},
+ is an alternative/.style={has type=rdf:Alt, is a container},
+ %
+ is a container/.code={\tikz@rdf@is@a@containertrue},
+ %
+ has as member/.code={\tikz@rdf@is@a@membertrue},%
+}%
+
+\def\tikz@rdf@current@scope@text{scope content}%
+
+\let\tikz@rdf@subject\relax
+\let\tikz@rdf@predicate\pgfutil@empty
+\let\tikz@rdf@object\relax
+\let\tikz@rdf@object@literal\relax
+\let\tikz@rdf@container\relax
+
+\newif\iftikz@rdf@object@scope@content
+\newif\iftikz@rdf@is@a@container
+\newif\iftikz@rdf@is@a@member
+
+
+\def\tikz@rdf@parse#1{%
+ \edef\tikz@temp{#1}%
+ \expandafter\tikz@rdf@parse@#1\relax%
+}%
+
+\def\tikz@rdf@parse@{%
+ \pgfutil@ifnextchar({\tikz@rdf@parse@name}{%)
+ \pgfutil@ifnextchar"{\tikz@rdf@parse@literals}{%
+ \tikz@rdf@parse@curie%
+ }%
+ }%
+}%
+
+\def\tikz@rdf@parse@name(#1)\relax{%
+ \pgfidrefprevuse\tikz@rdf@the@id{#1}\expandafter\edef\tikz@rdf@target{\tikzrdfhashmark\tikz@rdf@the@id}%
+}%
+\def\tikz@rdf@parse@literals"#1"{%
+ \ifx\tikz@rdf@target\tikz@rdf@object@name%
+ \def\tikz@rdf@object@literal{#1}%
+ \else%
+ \tikzerror{Only RDF objects can be literals}%
+ \fi%
+ \pgfutil@ifnextchar\relax\pgfutil@gobble\tikz@rdf@parse@literals@rest%
+}%
+\def\tikz@rdf@parse@literals@rest and scope content\relax{%
+ \tikz@rdf@object@scope@contenttrue%
+}%
+
+\def\tikz@rdf@object@name{\tikz@rdf@object}%
+\def\tikz@rdf@parse@curie#1\relax{%
+ \expandafter\def\tikz@rdf@target{#1}%
+}%
+
+{%
+ \catcode`\#=11
+ \gdef\tikzrdfhashmark{#}%
+}%
+
+
+\def\tikz@rdf@make@triple{%
+ % First, ensure that subject, predicate and object are set:
+ \ifx\tikz@rdf@subject\relax%
+ \tikzerror{RDF statement misses subject}%
+ \else%
+ \ifx\tikz@rdf@predicate\relax%
+ \tikzerror{RDF statement misses predicate}%
+ \else%
+ \iftikz@rdf@object@scope@content%
+ \edef\tikz@marshal{\noexpand\tikz@rdf@make@content@triple{\tikz@rdf@subject}{\tikz@rdf@predicate}{\tikz@rdf@object@literal}}%
+ \tikz@marshal%
+ \else%
+ \ifx\tikz@rdf@object\relax%
+ \ifx\tikz@rdf@object@literal\relax%
+ \tikzerror{RDF statement misses object}%
+ \else%
+ \edef\tikz@marshal{\noexpand\tikz@rdf@make@literal@triple{\tikz@rdf@subject}{\tikz@rdf@predicate}{\tikz@rdf@object@literal}}%
+ \tikz@marshal%
+ \fi%
+ \else%
+ \edef\tikz@marshal{\noexpand\tikz@rdf@make@normal@triple{\tikz@rdf@subject}{\tikz@rdf@predicate}{\tikz@rdf@object}}%
+ \tikz@marshal%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+}%
+
+\def\tikz@rdf@make@content@triple#1#2#3{%
+ \def\tikz@rdf@action{%
+ \def\tikz@rdf@invoke@code{%
+ \def\tikz@temp{#3}%
+ \ifx\tikz@temp\tikz@rdf@object@literal@text\else%
+ \pgfrdfcontent{#3}%
+ \fi%
+ \pgfrdfabout{#1}%
+ \pgfrdfdatatype{rdf:XMLLiteral}%
+ \foreach \tikz@rdf@pred in {#2}{%
+ \ifx\tikz@rdf@pred\pgfutil@empty\else%
+ \expandafter\pgfrdfproperty\expandafter{\tikz@rdf@pred}%
+ \fi%
+ }%
+ }%
+ }%
+}%
+
+\def\tikz@rdf@make@literal@triple#1#2#3{%
+ \def\tikz@rdf@action{%
+ \tikz@add@rdf@post@option{%
+ {%
+ \pgfrdfabout{#1}%
+ \foreach \tikz@rdf@pred in {#2}{%
+ \ifx\tikz@rdf@pred\pgfutil@empty\else%
+ \expandafter\pgfrdfproperty\expandafter{\tikz@rdf@pred}%
+ \fi%
+ }%
+ \pgfrdfcontent{#3}%
+ \pgfidscope%
+ \endpgfidscope%
+ }%
+ }%
+ }%
+}%
+
+\def\tikz@rdf@make@normal@triple#1#2#3{%
+ \def\tikz@rdf@action{%
+ \tikz@add@rdf@post@option{%
+ {%
+ \pgfrdfabout{#1}%
+ \foreach \tikz@rdf@pred in {#2}{%
+ \ifx\tikz@rdf@pred\pgfutil@empty\else%
+ \expandafter\pgfrdfproperty\expandafter{\tikz@rdf@pred}%
+ \fi%
+ }%
+ \pgfrdfresource{#3}%
+ \pgfidscope%
+ \endpgfidscope%
+ }%
+ }%
+ }%
+}%
+
+\def\tikz@rdf@object@literal@text{\tikz@rdf@object@literal}%
+
+
+
+
+% Containers
+
+\def\tikz@rdf@init@container{%
+ \ifx\tikz@rdf@subject\relax%
+ \tikzerror{RDF statement misses subject}%
+ \else%
+ \expandafter\gdef\csname tikz@rdf@c@\tikz@rdf@subject\endcsname{0}%
+ \fi%
+}%
+
+
+\def\tikz@rdf@make@member{%
+ \ifx\tikz@rdf@subject\relax%
+ \tikzerror{RDF statement misses subject}%
+ \else%
+ % Get number:
+ \expandafter\let\expandafter\tikz@temp\csname tikz@rdf@c@\tikz@rdf@subject\endcsname%
+ \ifx\tikz@temp\relax%
+ \tikzerror{RDF subject is not a container}%
+ \else%
+ \c@pgf@counta\tikz@temp%
+ \advance\c@pgf@counta by1\relax%
+ \expandafter\xdef\csname tikz@rdf@c@\tikz@rdf@subject\endcsname{\the\c@pgf@counta}%
+ \edef\tikz@rdf@predicate{rdf:_\the\c@pgf@counta}%
+ \fi%
+ \fi%
+}%
+
+
+
+
+
+% Hooks:
+
+\let\tikz@rdf@invoke@code\relax
+
+\def\tikz@rdf@id@hook{%
+ \tikz@rdf@invoke@code%
+ \let\tikz@rdf@invoke@code\relax%
+}%
+
+% Add hook:
+\expandafter\def\expandafter\tikz@id@hook\expandafter{\tikz@id@hook\tikz@rdf@id@hook}%
+
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryscopes.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryscopes.code.tex
index 808e34578d6..6245bf8ec1f 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryscopes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryscopes.code.tex
@@ -7,24 +7,24 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryscopes.code.tex,v 1.2 2008/06/27 17:00:24 vibrovski Exp $
+\ProvidesFileRCS{tikzlibraryscopes.code.tex}
% Redefine the after command hook...
\def\tikz@lib@scope@check{%
- \pgfutil@ifnextchar\tikz@intersect@finish{%
- \tikz@intersect@finish\afterassignment\tikz@lib@scope@check\let\tikz@next%
- }{%
- \pgfutil@ifnextchar\par{%
- \afterassignment\tikz@lib@scope@check\let\tikz@next%
- }%
- {\pgfutil@ifnextchar\bgroup{%gotcha
- \afterassignment\tikz@lib@scope@gotcha\let\tikz@next%
- }%
- {}%
- }%
- }%
-}
+ \pgfutil@ifnextchar\tikz@intersect@finish{%
+ \tikz@intersect@finish\afterassignment\tikz@lib@scope@check\let\tikz@next%
+ }{%
+ \pgfutil@ifnextchar\par{%
+ \afterassignment\tikz@lib@scope@check\let\tikz@next%
+ }%
+ {\pgfutil@ifnextchar\bgroup{%gotcha
+ \afterassignment\tikz@lib@scope@gotcha\let\tikz@next%
+ }%
+ {}%
+ }%
+ }%
+}%
\def\tikz@lib@scope@gotcha{%
\pgfutil@ifnextchar[{%]
@@ -32,11 +32,11 @@
}{%
% false alarm
\bgroup%
- }%
-}
+ }%
+}%
\def\tikz@lib@scope@action[#1]{%
\scope[#1]\bgroup\aftergroup\endscope%
\tikz@lib@scope@check%
-}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadings.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadings.code.tex
index 962d9956af9..c84fb467699 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadings.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadings.code.tex
@@ -7,15 +7,15 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadings.code.tex,v 1.1 2008/10/29 21:58:38 tantau Exp $
+\ProvidesFileRCS{tikzlibraryshadings.code.tex}
-\usepgflibrary{shadings}
+\usepgflibrary{shadings}%
\tikzset{
lower left/.style={shading=bilinear interpolation,/utils/exec=\colorlet{lower left}{#1}},
upper left/.style={shading=bilinear interpolation,/utils/exec=\colorlet{upper left}{#1}},
lower right/.style={shading=bilinear interpolation,/utils/exec=\colorlet{lower right}{#1}},
upper right/.style={shading=bilinear interpolation,/utils/exec=\colorlet{upper right}{#1}}
-}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadows.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadows.code.tex
index 424e19b8502..ebb2abf74c6 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadows.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadows.code.tex
@@ -7,9 +7,9 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshadows.code.tex,v 1.3 2008/01/13 15:30:04 tantau Exp $
+\ProvidesFileRCS{tikzlibraryshadows.code.tex}
-\usetikzlibrary{fadings}
+\usetikzlibrary{fadings}%
% General options
@@ -17,7 +17,7 @@
/tikz/shadow scale/.initial=1,
/tikz/shadow xshift/.initial=0pt,
/tikz/shadow yshift/.initial=0pt,
-}
+}%
% Basic shadow style
\tikzset{
@@ -31,7 +31,7 @@
}
},
every shadow/.style={}
-}
+}%
@@ -51,7 +51,7 @@
#1
}
}
-}
+}%
%
@@ -70,7 +70,7 @@
#1
}
}
-}
+}%
@@ -90,7 +90,7 @@
#1,
}
}
-}
+}%
@@ -113,7 +113,7 @@
#1
}
}
-}
+}%
%
@@ -143,5 +143,4 @@
#1,
},
}
-}
-
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.arrows.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.arrows.code.tex
index f8d0604c965..20e2022c115 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.arrows.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.arrows.code.tex
@@ -7,10 +7,10 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.arrows.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
+\ProvidesFileRCS{tikzlibraryshapes.arrows.code.tex}
-\usepgflibrary{shapes.arrows}
+\usepgflibrary{shapes.arrows}%
-\pgfkeys{/tikz/arrow box arrows/.code={\pgf@lib@arrowbox@parsearrows{#1}}}
+\pgfkeys{/tikz/arrow box arrows/.code={\pgf@lib@arrowbox@parsearrows{#1}}}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.callouts.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.callouts.code.tex
index 9bb2d738770..12b4953349f 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.callouts.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.callouts.code.tex
@@ -7,29 +7,29 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgflibrary{shapes.callouts}
+\usepgflibrary{shapes.callouts}%
\pgfkeys{/tikz/callout absolute pointer/.code={%
- \tikz@scan@one@point\tikz@lib@callout@checkforplus#1\relax%
- }%
-}
+ \tikz@scan@one@point\tikz@lib@callout@checkforplus#1\relax%
+ }%
+}%
\def\tikz@lib@callout@checkforplus#1{%
- \pgfutil@ifnextchar+{\def\tikz@lib@callout@originalpoint{#1}\tikz@lib@callout@scan@relative}%
- {\pgf@lib@callout@makeabsolutepointer{#1}}}%
+ \pgfutil@ifnextchar+{\def\tikz@lib@callout@originalpoint{#1}\tikz@lib@callout@scan@relative}%
+ {\pgf@lib@callout@makeabsolutepointer{#1}}}%
\def\tikz@lib@callout@scan@relative+{%
- \pgfutil@ifnextchar+{\tikz@lib@callout@scan@plusplus}{\tikz@lib@callout@scan@plus}}
-\def\tikz@lib@callout@scan@plusplus+{\tikz@scan@one@point\tikz@lib@callout@add}
-\def\tikz@lib@callout@scan@plus{\tikz@scan@one@point\tikz@lib@callout@add}
+ \pgfutil@ifnextchar+{\tikz@lib@callout@scan@plusplus}{\tikz@lib@callout@scan@plus}}%
+\def\tikz@lib@callout@scan@plusplus+{\tikz@scan@one@point\tikz@lib@callout@add}%
+\def\tikz@lib@callout@scan@plus{\tikz@scan@one@point\tikz@lib@callout@add}%
\def\tikz@lib@callout@add#1{%
- \expandafter\pgf@lib@callout@makeabsolutepointer\expandafter{%
- \expandafter\pgfpointadd\expandafter{\tikz@lib@callout@originalpoint}{#1}}%
+ \expandafter\pgf@lib@callout@makeabsolutepointer\expandafter{%
+ \expandafter\pgfpointadd\expandafter{\tikz@lib@callout@originalpoint}{#1}}%
}%
\pgfkeys{/tikz/callout relative pointer/.code={%
- \tikz@scan@one@point\pgf@lib@callout@makerelativepointer#1\relax%
- }%
-}
+ \tikz@scan@one@point\pgf@lib@callout@makerelativepointer#1\relax%
+ }%
+}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.code.tex
index 83c808071bf..0e1c84a287a 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.code.tex
@@ -7,13 +7,13 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
+\ProvidesFileRCS{tikzlibraryshapes.code.tex}
-\usetikzlibrary{shapes.geometric}
-\usetikzlibrary{shapes.misc}
-\usetikzlibrary{shapes.symbols}
-\usetikzlibrary{shapes.arrows}
-\usetikzlibrary{shapes.callouts}
-\usetikzlibrary{shapes.multipart}
+\usetikzlibrary{shapes.geometric}%
+\usetikzlibrary{shapes.misc}%
+\usetikzlibrary{shapes.symbols}%
+\usetikzlibrary{shapes.arrows}%
+\usetikzlibrary{shapes.callouts}%
+\usetikzlibrary{shapes.multipart}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.IEC.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.IEC.code.tex
index ae11747144e..e41ddf83a00 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.IEC.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.IEC.code.tex
@@ -7,34 +7,32 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.IEC.code.tex,v 1.3 2008/01/27 11:39:49 vibrovski Exp $
+\ProvidesFileRCS{tikzlibraryshapes.gates.logic.IEC.code.tex}
-\usepgflibrary{shapes.gates.logic.IEC}
+\usepgflibrary{shapes.gates.logic.IEC}%
\tikzset{%
use IEC style logic gates/.code={%
- \tikzset{%
- and gate/.style={shape=and gate IEC},
- nand gate/.style={shape=nand gate IEC},
- or gate/.style={shape=or gate IEC},
- nor gate/.style={shape=nor gate IEC},
- xor gate/.style={shape=xor gate IEC},
- xnor gate/.style={shape=xnor gate IEC},
- not gate/.style={shape=not gate IEC},
- buffer gate/.style={shape=buffer gate IEC},
- and gate symbol/.style={and gate IEC symbol={##1}},
- nand gate symbol/.style={nand gate IEC symbol={##1}},
- or gate symbol/.style={or gate IEC symbol={##1}},
- nor gate symbol/.style={nor gate IEC symbol={##1}},
- xor gate symbol/.style={xor gate IEC symbol={##1}},
- xnor gate symbol/.style={xnor gate IEC symbol={##1}},
- not gate symbol/.style={not gate IEC symbol={##1}},
- buffer gate symbol/.style={buffer gate IEC symbol={##1}},
- logic gate symbol align/.style={/pgf/logic gate IEC symbol align={##1}},
- logic gate symbol color/.style={/pgf/logic gate IEC symbol color={##1}}
- }%
- }%
-}
+ \tikzset{%
+ and gate/.style={shape=and gate IEC},
+ nand gate/.style={shape=nand gate IEC},
+ or gate/.style={shape=or gate IEC},
+ nor gate/.style={shape=nor gate IEC},
+ xor gate/.style={shape=xor gate IEC},
+ xnor gate/.style={shape=xnor gate IEC},
+ not gate/.style={shape=not gate IEC},
+ buffer gate/.style={shape=buffer gate IEC},
+ and gate symbol/.style={and gate IEC symbol={##1}},
+ nand gate symbol/.style={nand gate IEC symbol={##1}},
+ or gate symbol/.style={or gate IEC symbol={##1}},
+ nor gate symbol/.style={nor gate IEC symbol={##1}},
+ xor gate symbol/.style={xor gate IEC symbol={##1}},
+ xnor gate symbol/.style={xnor gate IEC symbol={##1}},
+ not gate symbol/.style={not gate IEC symbol={##1}},
+ buffer gate symbol/.style={buffer gate IEC symbol={##1}},
+ logic gate symbol align/.style={/pgf/logic gate IEC symbol align={##1}},
+ logic gate symbol color/.style={/pgf/logic gate IEC symbol color={##1}}
+ }%
+ }%
+}%
\endinput
-
-
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.US.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.US.code.tex
index 0b8a744126b..99411f2b12f 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.US.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.US.code.tex
@@ -7,34 +7,34 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.gates.logic.US.code.tex,v 1.1 2008/01/25 08:26:00 vibrovski Exp $
+\ProvidesFileRCS{tikzlibraryshapes.gates.logic.US.code.tex}
-\usepgflibrary{shapes.gates.logic.US}
+\usepgflibrary{shapes.gates.logic.US}%
\tikzset{%
use US style logic gates/.code={%
- \tikzset{%
- and gate/.style={shape=and gate US},
- nand gate/.style={shape=nand gate US},
- or gate/.style={shape=or gate US},
- nor gate/.style={shape=nor gate US},
- xor gate/.style={shape=xor gate US},
- xnor gate/.style={shape=xnor gate US},
- not gate/.style={shape=not gate US},
- buffer gate/.style={shape=buffer gate US}
- }%
- },
- use CDH style logic gates/.code={%
- \tikzset{%
- and gate/.style={shape=and gate CDH},
- nand gate/.style={shape=nand gate CDH},
- or gate/.style={shape=or gate US},
- nor gate/.style={shape=nor gate US},
- xor gate/.style={shape=xor gate US},
- xnor gate/.style={shape=xnor gate US},
- not gate/.style={shape=not gate US},
- buffer gate/.style={shape=buffer gate US}
- }
- }
-}
+ \tikzset{%
+ and gate/.style={shape=and gate US},
+ nand gate/.style={shape=nand gate US},
+ or gate/.style={shape=or gate US},
+ nor gate/.style={shape=nor gate US},
+ xor gate/.style={shape=xor gate US},
+ xnor gate/.style={shape=xnor gate US},
+ not gate/.style={shape=not gate US},
+ buffer gate/.style={shape=buffer gate US}
+ }%
+ },
+ use CDH style logic gates/.code={%
+ \tikzset{%
+ and gate/.style={shape=and gate CDH},
+ nand gate/.style={shape=nand gate CDH},
+ or gate/.style={shape=or gate US},
+ nor gate/.style={shape=nor gate US},
+ xor gate/.style={shape=xor gate US},
+ xnor gate/.style={shape=xnor gate US},
+ not gate/.style={shape=not gate US},
+ buffer gate/.style={shape=buffer gate US}
+ }
+ }
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.geometric.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.geometric.code.tex
index dc5aad85554..ae3d6c7feb5 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.geometric.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.geometric.code.tex
@@ -7,8 +7,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.geometric.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
+\ProvidesFileRCS{tikzlibraryshapes.geometric.code.tex}
-\usepgflibrary{shapes.geometric}
+\usepgflibrary{shapes.geometric}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.misc.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.misc.code.tex
index 10794a092d2..9a8c13f6221 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.misc.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.misc.code.tex
@@ -7,8 +7,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.misc.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
+\ProvidesFileRCS{tikzlibraryshapes.misc.code.tex}
-\usepgflibrary{shapes.misc}
+\usepgflibrary{shapes.misc}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.multipart.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.multipart.code.tex
index 564c77f8a80..797a0e25523 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.multipart.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.multipart.code.tex
@@ -7,30 +7,30 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.multipart.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
+\ProvidesFileRCS{tikzlibraryshapes.multipart.code.tex}
-\usepgflibrary{shapes.multipart}
+\usepgflibrary{shapes.multipart}%
\pgfkeys{/tikz/rectangle split/parts/.code={%
- \pgfkeys{/pgf/rectangle split parts=#1}%
- }%
-}
+ \pgfkeys{/pgf/rectangle split parts=#1}%
+ }%
+}%
\pgfkeys{/tikz/rectangle split use custom fill/.code={%
- \pgfkeys{/pgf/rectangle split use custom fill=#1}%
- \pgfkeys{/tikz/fill=none}}%
-}
+ \pgfkeys{/pgf/rectangle split use custom fill=#1}%
+ \pgfkeys{/tikz/fill=none}}%
+}%
-\pgfkeys{/tikz/rectangle split draw splits/.is if=pgfrectanglesplitdrawsplits}
+\pgfkeys{/tikz/rectangle split draw splits/.is if=pgfrectanglesplitdrawsplits}%
\pgfkeys{/tikz/rectangle split part align/.code={%
- \pgfkeys{/pgf/rectangle split part align={#1}}%
- }%
+ \pgfkeys{/pgf/rectangle split part align={#1}}%
+ }%
}%
\pgfkeys{/tikz/rectangle split part fill/.code={%
- \pgfkeys{/pgf/rectangle split part fill={#1}}%
- }%
+ \pgfkeys{/pgf/rectangle split part fill={#1}}%
+ }%
}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.symbols.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.symbols.code.tex
index f3b935dc0bc..6927d8dea40 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.symbols.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.symbols.code.tex
@@ -7,11 +7,11 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryshapes.symbols.code.tex,v 1.1 2008/01/09 17:57:16 tantau Exp $
+\ProvidesFileRCS{tikzlibraryshapes.symbols.code.tex}
\pgfkeysifdefined{/tikz/shape border uses incircle}{}{%
- \pgfkeys{/tikz/shape border uses incircle/.is if=pgfshapeborderusesincircle}}
-
-\usepgflibrary{shapes.symbols}
+ \pgfkeys{/tikz/shape border uses incircle/.is if=pgfshapeborderusesincircle}}%
+
+\usepgflibrary{shapes.symbols}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysnakes.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysnakes.code.tex
index 3fa9d3f8f46..64d6fc44f88 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysnakes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysnakes.code.tex
@@ -7,13 +7,13 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysnakes.code.tex,v 1.7 2013/07/15 12:05:31 tantau Exp $
+\ProvidesFileRCS{tikzlibrarysnakes.code.tex}
\pgfwarning{Snakes have been superseded by
decorations. Please use the decoration libraries instead of the snakes
-library}
+library}%
-\usetikzlibrary{decorations.pathmorphing,decorations.pathreplacing,decorations.shapes}
+\usetikzlibrary{decorations.pathmorphing,decorations.pathreplacing,decorations.shapes}%
% Old snakes stuff:
@@ -29,48 +29,48 @@ library}
\tikz@snakedtrue%
\let\tikz@snake=\tikz@@snake%
\fi%
- \fi}
+ \fi}%
-\tikzoption{raise snake}{\def\pgf@snake@raise{\pgftransformyshift{#1}}}
+\tikzoption{raise snake}{\def\pgf@snake@raise{\pgftransformyshift{#1}}}%
\tikzoption{mirror snake}[true]{%
\csname if#1\endcsname
\def\pgf@snake@mirror{\pgftransformyscale{-1}}%
\else%
\let\pgf@snake@mirror=\pgfutil@empty%
\fi
-}
+}%
-\tikzoption{gap before snake}{\def\tikz@presnake{{moveto}{#1}{\noexpand\tikz@snake@install@trans}{}}}
-\tikzoption{line before snake}{\def\tikz@presnake{{lineto}{#1}{\noexpand\tikz@snake@install@trans}{}}}
+\tikzoption{gap before snake}{\def\tikz@presnake{{moveto}{#1}{\noexpand\tikz@snake@install@trans}{}}}%
+\tikzoption{line before snake}{\def\tikz@presnake{{lineto}{#1}{\noexpand\tikz@snake@install@trans}{}}}%
-\tikzoption{gap after snake}{\def\tikz@postsnake{{moveto}{#1}{\noexpand\tikz@snake@install@trans}{}}\def\tikz@mainsnakelength{\pgfsnakeremainingdistance-#1}}
-\tikzoption{line after snake}{\def\tikz@postsnake{{lineto}{#1}{\noexpand\tikz@snake@install@trans}{}}\def\tikz@mainsnakelength{\pgfsnakeremainingdistance-#1}}
+\tikzoption{gap after snake}{\def\tikz@postsnake{{moveto}{#1}{\noexpand\tikz@snake@install@trans}{}}\def\tikz@mainsnakelength{\pgfsnakeremainingdistance-#1}}%
+\tikzoption{line after snake}{\def\tikz@postsnake{{lineto}{#1}{\noexpand\tikz@snake@install@trans}{}}\def\tikz@mainsnakelength{\pgfsnakeremainingdistance-#1}}%
\tikzoption{gap around snake}{%
\def\tikz@presnake{{moveto}{#1}{\noexpand\tikz@snake@install@trans}{}}%
\def\tikz@postsnake{{moveto}{#1}{\noexpand\tikz@snake@install@trans}{}}%
\def\tikz@mainsnakelength{\pgfsnakeremainingdistance-#1}%
-}
+}%
\tikzoption{line around snake}{%
\def\tikz@presnake{{lineto}{#1}{\noexpand\tikz@snake@install@trans}{}}%
\def\tikz@postsnake{{lineto}{#1}{\noexpand\tikz@snake@install@trans}{}}%
\def\tikz@mainsnakelength{\pgfsnakeremainingdistance-#1}%
-}
+}%
\let\pgf@snake@mirror=\pgfutil@empty
\let\pgf@snake@raise=\pgfutil@empty
-\def\tikz@snake@install@trans{\pgfsetsnakesegmenttransformation{\pgf@snake@mirror\pgf@snake@raise}}
+\def\tikz@snake@install@trans{\pgfsetsnakesegmenttransformation{\pgf@snake@mirror\pgf@snake@raise}}%
-\def\tikz@snake{zigzag}
+\def\tikz@snake{zigzag}%
\let\tikz@presnake=\pgfutil@empty
\let\tikz@postsnake=\pgfutil@empty
-\def\tikz@mainsnakelength{\pgfsnakeremainingdistance}
+\def\tikz@mainsnakelength{\pgfsnakeremainingdistance}%
-\tikzstyle{snake triangles 45}= [snake=triangles,segment object length=2.41421356\pgfsnakesegmentamplitude]
-\tikzstyle{snake triangles 60}= [snake=triangles,segment object length=1.73205081\pgfsnakesegmentamplitude]
-\tikzstyle{snake triangles 90}= [snake=triangles,segment object length=\pgfsnakesegmentamplitude]
+\tikzset{snake triangles 45/.style= {snake=triangles,segment object length=2.41421356\pgfsnakesegmentamplitude}}%
+\tikzset{snake triangles 60/.style= {snake=triangles,segment object length=1.73205081\pgfsnakesegmentamplitude}}%
+\tikzset{snake triangles 90/.style= {snake=triangles,segment object length=\pgfsnakesegmentamplitude}}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex
index 099448c5165..b23cf08caf2 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex,v 1.4 2011/05/19 08:56:54 tantau Exp $
+\ProvidesFileRCS{tikzlibraryspy.code.tex}
@@ -31,7 +31,7 @@
connect spies/.style={
spy connection path={\draw[thin] (tikzspyonnode) -- (tikzspyinnode);}
}
-}
+}%
\newbox\tikz@lib@spybox
@@ -61,21 +61,21 @@
magnification/.style={lens={scale=#1}},
spy connection path/.store in=\tikz@lib@spy@path,
spy connection path=
-}
+}%
\tikzset{
tikz@lib@reset@gs/.style={black,thin,solid,opaque,line cap=butt,line join=miter}
-}
+}%
\def\tikz@lib@spy@parse{%
\pgfutil@ifnextchar[{\tikz@lib@spy@parse@opt}{\tikz@lib@spy@parse@opt[]}%]
-}
+}%
\def\tikz@lib@spy@parse@opt[#1]{
\pgfutil@ifnextchar x{\tikz@lib@spy@parse@opta[#1]}{\tikz@lib@spy@parse@opta[#1]}%]
-}
+}%
\def\tikz@lib@spy@parse@opta[#1]on#2in node#3;{%
\pgfutil@g@addto@macro\tikz@lib@spy@collection{\tikz@lib@spy@do{#1}{#2}{#3}}%
-}
+}%
\def\tikz@lib@spy@do#1#2#3{%
\scope[tikz@lib@spy@style,#1]
@@ -110,14 +110,14 @@
\endpgfpicture};}]#3{};
\tikz@lib@spy@path
\endscope
-}
+}%
\def\tikz@lib@spy@shift#1{%
\pgf@process{#1}%
\pgf@x=-\pgf@x%
\pgf@y=-\pgf@y%
\pgftransformshift{}%
-}
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysvg.path.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysvg.path.code.tex
index f0eae010424..8b64ccc3ce7 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysvg.path.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysvg.path.code.tex
@@ -7,14 +7,14 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarysvg.path.code.tex,v 1.2 2013/09/23 18:04:35 tantau Exp $
+\ProvidesFileRCS{tikzlibrarysvg.path.code.tex}
-\usepgflibrary{svg.path}
+\usepgflibrary{svg.path}%
-\def\tikz@svg@path vg{\pgfutil@ifnextchar[\tikz@svg@@path{\tikz@svg@@path[]}}%}
+\def\tikz@svg@path vg{\pgfutil@ifnextchar[\tikz@svg@@path{\tikz@svg@@path[]}}%}%
-\def\tikz@svg@@path[#1]{\pgfutil@ifnextchar"{\tikz@svg@@path@old{#1}}{\tikz@svg@@path@new{#1}}}
-\def\tikz@svg@@path@new#1#2{\tikz@svg@@path@old{#1}"#2"}
+\def\tikz@svg@@path[#1]{\pgfutil@ifnextchar"{\tikz@svg@@path@old{#1}}{\tikz@svg@@path@new{#1}}}%
+\def\tikz@svg@@path@new#1#2{\tikz@svg@@path@old{#1}"#2"}%
\def\tikz@svg@@path@old#1"#2"{
{%
\tikzset{#1}%
@@ -30,4 +30,4 @@
\tikz@lastysaved=\tikz@lasty%
\tikz@updatecurrenttrue%
\tikz@scan@next@command
-} \ No newline at end of file
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarythrough.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarythrough.code.tex
index f369a23b830..cb634245327 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarythrough.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarythrough.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarythrough.code.tex,v 1.1 2008/02/03 19:37:27 tantau Exp $
+\ProvidesFileRCS{tikzlibrarythrough.code.tex}
@@ -16,7 +16,7 @@
% Save transformations (correct?)
\pgfgettransform{\tikz@lib@saved@transform}%
\tikz@scan@one@point\tikz@lib@circle@through#1%
- }}
+ }}%
\def\tikz@lib@circle@through#1{%
\tikz@addoption{%
@@ -33,4 +33,4 @@
}%
\pgfset{/pgf/minimum size/.expanded=\tikz@lib@circle@size}%
}%
-} \ No newline at end of file
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex
index ea87a5bd394..b719271d57e 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex
@@ -7,31 +7,31 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex,v 1.2 2008/06/17 21:23:44 tantau Exp $
+\ProvidesFileRCS{tikzlibrarytopaths.code.tex}
% Move to
-\tikzstyle{move to}= [to path={(\tikztotarget) \tikztonodes}]
+\tikzset{move to/.style= {to path={(\tikztotarget) \tikztonodes}}}
% Straight to
-\tikzstyle{line to}= [to path={-- (\tikztotarget) \tikztonodes}]
+\tikzset{line to/.style= {to path={-- (\tikztotarget) \tikztonodes}}}
% Curved to
-\tikzstyle{every curve to}= []
-\tikzstyle{curve to}= [to path=\tikz@to@curve@path]
+\tikzset{every curve to/.style= {}}
+\tikzset{curve to/.style= {to path=\tikz@to@curve@path}}
-\tikzoption{bend angle}{\def\tikz@to@bend{#1}}
+\tikzoption{bend angle}{\pgfmathsetmacro\tikz@to@bend{#1}}
\tikzoption{bend left}[]{%
\def\pgf@temp{#1}%
\ifx\pgf@temp\pgfutil@empty%
\else%
- \def\tikz@to@bend{#1}%
+ \pgfmathsetmacro\tikz@to@bend{#1}%
\fi%
\let\tikz@to@out=\tikz@to@bend%
\c@pgf@counta=180\relax%
@@ -45,9 +45,10 @@
\def\pgf@temp{#1}%
\ifx\pgf@temp\pgfutil@empty%
\else%
- \def\tikz@to@bend{#1}%
+ \pgfmathsetmacro\tikz@to@bend{#1}%
\fi%
% Now, negate
+ \pgfmathsetmacro\tikz@to@out{\tikz@to@bend}
\c@pgf@counta=\tikz@to@bend\relax%
\c@pgf@counta=-\c@pgf@counta\relax%
\edef\tikz@to@out{\the\c@pgf@counta}%
@@ -158,7 +159,7 @@
\ifx\tikz@to@start@compute\tikz@to@start@compute@looseness%
\tikz@to@compute@distance%
\else%
- \ifx\tikz@from@start@compute\tikz@to@start@compute@looseness%
+ \ifx\tikz@from@start@compute\tikz@to@start@compute@looseness%
\tikz@to@compute@distance%
\fi%
\fi%
@@ -179,9 +180,9 @@
\pgf@process{\pgfpointdiff{\tikz@first@point}{\tikz@second@point}}%
\ifdim\pgf@x<0pt\pgf@xa=-\pgf@x\else\pgf@xa=\pgf@x\fi%
\ifdim\pgf@y<0pt\pgf@ya=-\pgf@y\else\pgf@ya=\pgf@y\fi%
- %
+ %
% Calculate length of second to first vector:
- %
+ %
\pgf@process{\pgfpointnormalised{\pgfqpoint{\pgf@xa}{\pgf@ya}}}%
\ifdim\pgf@x>\pgf@y%
\c@pgf@counta=\pgf@x%
@@ -255,10 +256,10 @@
\def\tikz@@@to@compute@relative#1{%
\def\tikz@toto{#1}%
\begingroup
- %
+ %
% Adjust start and target so that they lie on the border in the
% rotated coordinate system.
- %
+ %
\pgfutil@ifundefined{pgf@sh@ns@\tikztostart}
{%
\let\tikz@first@point=\tikz@tofrom%
@@ -363,18 +364,18 @@
% Loops
-\tikzstyle{loop}= [to path={
+\tikzset{loop/.style= {to path={
\pgfextra{\let\tikztotarget=\tikztostart}
[looseness=8,min distance=5mm,every loop]
\tikz@to@curve@path
- }]
+ }}}
-\tikzstyle{every loop}= [->,shorten >=1pt]
+\tikzset{every loop/.style= {->,shorten >=1pt}}
-\tikzstyle{loop right}= [right,out=15,in=-15,loop]
-\tikzstyle{loop above}= [above,out=105,in=75,loop]
-\tikzstyle{loop left}= [left,out=195,in=165,loop]
-\tikzstyle{loop below}= [below,out=285,in=255,loop]
+\tikzset{loop right/.style= {right,out=15,in=-15,loop}}
+\tikzset{loop above/.style= {above,out=105,in=75,loop}}
+\tikzset{loop left/.style= {left,out=195,in=165,loop}}
+\tikzset{loop below/.style= {below,out=285,in=255,loop}}
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytrees.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytrees.code.tex
index 7d34c2d6819..830435a029b 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytrees.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytrees.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytrees.code.tex,v 1.2 2008/02/24 10:00:52 tantau Exp $
+\ProvidesFileRCS{tikzlibrarytrees.code.tex}
@@ -15,13 +15,13 @@
% Three point growth
%
-\tikzoption{grow via three points}{\let\tikz@grow=\tikz@grow@three\tikz@parse@three#1}
+\tikzoption{grow via three points}{\let\tikz@grow=\tikz@grow@three\tikz@parse@three#1}%
\def\tikz@parse@three one child at#1(#2)#3and two children at#4(#5)#6and#7(#8){%
\def\tikz@tree@one@child{\tikz@scan@one@point\pgf@process(#2)}
\def\tikz@tree@left@child{\tikz@scan@one@point\pgf@process(#5)}
\def\tikz@tree@right@child{\tikz@scan@one@point\pgf@process(#8)}
-}
+}%
\def\tikz@grow@three{%
\pgf@process{\tikz@tree@one@child}%
@@ -51,7 +51,7 @@
\advance\pgf@ya by\pgf@yc%
\edef\pgf@temp{\noexpand\pgftransformshift{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}}%
\pgf@temp%
-}
+}%
@@ -59,31 +59,27 @@
% Circle grow
%
-\tikzstyle{grow cyclic}=[growth function=\tikz@grow@circle]
+\tikzset{grow cyclic/.style={growth function=\tikz@grow@circle}}%
-\tikzset{sibling angle/.initial=20}
+\tikzset{sibling angle/.initial=20}%
\def\tikz@grow@circle{%
\pgftransformrotate{%
(\pgfkeysvalueof{/tikz/sibling angle})*(-.5-.5*\tikznumberofchildren+\tikznumberofcurrentchild)}%
\pgftransformxshift{\the\tikzleveldistance}%
-}
+}%
-\tikzoption{counterclockwise from}{\let\tikz@grow=\tikz@grow@circle@from\def\tikz@grow@circle@from@start{#1}}
+\tikzoption{counterclockwise from}{\let\tikz@grow=\tikz@grow@circle@from\def\tikz@grow@circle@from@start{#1}}%
\def\tikz@grow@circle@from{%
\pgftransformshift{\pgfpointpolar{\tikz@grow@circle@from@start+(\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild-1)}{\the\tikzleveldistance}}%
-}
+}%
-\tikzoption{clockwise from}{\let\tikz@grow=\tikz@grow@circle@from@\def\tikz@grow@circle@from@start{#1}}
+\tikzoption{clockwise from}{\let\tikz@grow=\tikz@grow@circle@from@\def\tikz@grow@circle@from@start{#1}}%
\def\tikz@grow@circle@from@{%
\pgftransformshift{\pgfpointpolar{\tikz@grow@circle@from@start-(\pgfkeysvalueof{/tikz/sibling angle})*(\tikznumberofcurrentchild-1)}{\the\tikzleveldistance}}%
-}
-
-
-
-
+}%
@@ -91,18 +87,18 @@
% Connections
%
-\tikzstyle{edge from parent fork down}=
- [edge from parent path={(\tikzparentnode\tikzparentanchor) -- +(0pt,-.5\tikzleveldistance) -| (\tikzchildnode\tikzchildanchor)}]
+\tikzset{edge from parent fork down/.style=
+ {edge from parent path={(\tikzparentnode\tikzparentanchor) -- +(0pt,-.5\tikzleveldistance) -| (\tikzchildnode\tikzchildanchor)}}}%
+
+\tikzset{edge from parent fork up/.style=
+ {edge from parent path={(\tikzparentnode\tikzparentanchor) -- +(0pt,.5\tikzleveldistance) -| (\tikzchildnode\tikzchildanchor)}}}%
-\tikzstyle{edge from parent fork up}=
- [edge from parent path={(\tikzparentnode\tikzparentanchor) -- +(0pt,.5\tikzleveldistance) -| (\tikzchildnode\tikzchildanchor)}]
+\tikzset{edge from parent fork left/.style=
+ {edge from parent path={(\tikzparentnode\tikzparentanchor) -- +(-.5\tikzleveldistance,0pt) |- (\tikzchildnode\tikzchildanchor)}}}%
-\tikzstyle{edge from parent fork left}=
- [edge from parent path={(\tikzparentnode\tikzparentanchor) -- +(-.5\tikzleveldistance,0pt) |- (\tikzchildnode\tikzchildanchor)}]
+\tikzset{edge from parent fork right/.style=
+ {edge from parent path={(\tikzparentnode\tikzparentanchor) -- +(.5\tikzleveldistance,0pt) |- (\tikzchildnode\tikzchildanchor)}}}%
-\tikzstyle{edge from parent fork right}=
- [edge from parent path={(\tikzparentnode\tikzparentanchor) -- +(.5\tikzleveldistance,0pt) |- (\tikzchildnode\tikzchildanchor)}]
-
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryturtle.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryturtle.code.tex
index c0306b4d304..009a309e311 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryturtle.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryturtle.code.tex
@@ -7,29 +7,29 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryturtle.code.tex,v 1.3 2008/06/18 23:34:49 tantau Exp $
+\ProvidesFileRCS{tikzlibraryturtle.code.tex}
-\tikzset{turtle/.style={/tikz/turtle/.cd,#1}}
+\tikzset{turtle/.style={/tikz/turtle/.cd,#1}}%
% The current angle is stored in this key.
-\tikzset{turtle/direction/.code=\gdef\tikz@lib@turtle@dir{#1},turtle/direction=90}
+\tikzset{turtle/direction/.code=\gdef\tikz@lib@turtle@dir{#1},turtle/direction=90}%
% The current angle is stored in this key.
-\tikzset{turtle/distance/.initial=1cm}
+\tikzset{turtle/distance/.initial=1cm}%
% The to path options that are used to move the turtle
-\tikzset{turtle/how/.style=}
+\tikzset{turtle/how/.style=}%
% Let the turtle jump home
-\tikzset{turtle/home/.style={/tikz/insert path={(0,0) [turtle/direction=90]}}}
+\tikzset{turtle/home/.style={/tikz/insert path={(0,0) [turtle/direction=90]}}}%
% Moves the turtle forward by the given distance or, if no distance is
% given, by turtle distance
\tikzset{
turtle/forward/.default=\pgfkeysvalueof{/tikz/turtle/distance},
turtle/forward/.style={/tikz/insert path={to[/tikz/turtle/how]++(\tikz@lib@turtle@dir:#1)}}
-}
+}%
@@ -38,11 +38,11 @@
\tikzset{
turtle/back/.default=\pgfkeysvalueof{/tikz/turtle/distance},
turtle/back/.style={turtle forward=-#1}
-}
+}%
-% Turns the turle left by the given number of degrees
+% Turns the turtle left by the given number of degrees
\tikzset{
turtle/left/.default=90,
turtle/left/.code={%
@@ -50,12 +50,12 @@
\ifdim\pgfmathresult pt>360pt\relax%
\pgfmathparse{\pgfmathresult-360}%
\fi%
- \global\let\tikz@lib@turtle@dir\pgfmathresult
+ \global\let\tikz@lib@turtle@dir\pgfmathresult
}
-}
+}%
-% Turns the turle left by the given number of degrees
+% Turns the turtle left by the given number of degrees
\tikzset{
turtle/right/.default=90,
turtle/right/.code={%
@@ -64,9 +64,9 @@
\ifdim\pgfmathresult pt<0pt\relax%
\pgfmathparse{\pgfmathresult+360}%
\fi%
- \global\let\tikz@lib@turtle@dir\pgfmathresult
+ \global\let\tikz@lib@turtle@dir\pgfmathresult
}
-}
+}%
% Shortcuts:
@@ -78,7 +78,7 @@
lt/.style={left=#1},
lt/.default=90,
rt/.style={right=#1},
- rt/.default=90}
+ rt/.default=90}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryviews.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryviews.code.tex
new file mode 100644
index 00000000000..746dd60f638
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryviews.code.tex
@@ -0,0 +1,45 @@
+% Copyright 2015 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS{tikzlibraryviews.code.tex}
+
+
+\tikzset{
+ meet/.style={execute at begin scope={\tikz@lib@view@parse{meet}#1\pgf@stop},execute at end scope={\endpgfviewboxscope}},
+ view/.style={meet = {#1}},
+ slice/.style={execute at begin scope={\tikz@lib@view@parse{slice}#1\pgf@stop},execute at end scope={\endpgfviewboxscope}},
+}%
+
+\def\tikz@lib@view@parse#1#2\pgf@stop{%
+ \tikz@scan@one@point\tikz@lib@view@a#2\pgf@stop%
+ \pgfviewboxscope{\tikz@lib@view@stored@a}{\tikz@lib@view@stored@b}{\tikz@lib@view@stored@c}{\tikz@lib@view@stored@d}{#1}%
+}%
+\def\tikz@lib@view@a#1{%
+ \def\tikz@lib@view@stored@a{#1}%
+ \pgfutil@ifnextchar r{\tikz@lib@view@a@rec}{\tikz@scan@one@point\tikz@lib@view@b}%
+}%
+\def\tikz@lib@view@a@rec rectangle{\tikz@scan@one@point\tikz@lib@view@b}%
+\def\tikz@lib@view@b#1{%
+ \def\tikz@lib@view@stored@b{#1}%
+ \pgfutil@ifnextchar\pgf@stop{%
+ \let\tikz@lib@view@stored@c\tikz@lib@view@stored@a%
+ \let\tikz@lib@view@stored@d\tikz@lib@view@stored@b%
+ \pgfutil@gobble%
+ }{\tikz@lib@view@b@at}%
+}%
+\def\tikz@lib@view@b@at at{\tikz@scan@one@point\tikz@lib@view@c}%
+\def\tikz@lib@view@c#1{%
+ \def\tikz@lib@view@stored@c{#1}%
+ \pgfutil@ifnextchar r{\tikz@lib@view@c@rec}{\tikz@scan@one@point\tikz@lib@view@d}%
+}%
+\def\tikz@lib@view@c@rec rectangle{\tikz@scan@one@point\tikz@lib@view@d}%
+\def\tikz@lib@view@d#1{\def\tikz@lib@view@stored@d{#1}\pgfutil@ifnextchar\pgf@stop\pgfutil@gobble{\tikzerror{Wrong syntax for meet or slice key}}}%
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
index 09d9a2fa122..7e3ff194bdf 100644
--- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/tikz.code.tex,v 1.151 2015/08/07 10:17:34 cfeuersaenger Exp $
+\ProvidesPackageRCS{tikz.code.tex}
\def\tikzerror#1{\pgfutil@packageerror{tikz}{#1}{}}
@@ -39,16 +39,15 @@
\newif\iftikz@snaked
\newif\iftikz@decoratepath
-% |\pgfutil@empty| is defined in \file{pgfutil-common.tex}.
-\let\tikz@options=\pgfutil@empty
+\let\tikz@options\pgfutil@empty
% |\tikz@addoption| adds \texttt{#1} at the end of the replacement
% text of |\tikz@options| without expansion.
\def\tikz@addoption#1{%
- \expandafter\def\expandafter\tikz@options\expandafter{\tikz@options#1}}
+ \expandafter\def\expandafter\tikz@options\expandafter{\tikz@options#1}}%
% Same as |tikz@addoption| for |\tikz@mode|. Note that |\tikz@mode| is
% initially let to |\pgfutil@empty| later (see path usage options).
\def\tikz@addmode#1{%
- \expandafter\def\expandafter\tikz@mode\expandafter{\tikz@mode#1}}
+ \expandafter\def\expandafter\tikz@mode\expandafter{\tikz@mode#1}}%
% Same as |tikz@addoption| for |\tikz@transform|. Works even if
% |\tikz@transform| is not defined. In that case, nothing is added to
% |\tikz@transform|: \texttt{#1} is expanded.
@@ -57,54 +56,55 @@
#1%
\else
\expandafter\def\expandafter\tikz@transform\expandafter{\tikz@transform#1}%
- \fi}
+ \fi
+}%
% TikZ options management.
% Setting up the tikz key family (key management needs
% \file{pgfkeys.code.tex});
-\pgfkeys{/tikz/.is family}
+\pgfkeys{/tikz/.is family}%
% |\tikzset| is a shortcut to set keys that belongs to the tikz
% family.
-\def\tikzset{\pgfqkeys{/tikz}}
+\def\tikzset{\pgfqkeys{/tikz}}%
% Note: |\tikzoption| is supported for compatibility only. |\tikzset|
% should be used instead.
\def\tikzoption#1{%
\pgfutil@ifnextchar[%]
- {\tikzoption@opt{#1}}{\tikzoption@noopt{#1}}}
+ {\tikzoption@opt{#1}}{\tikzoption@noopt{#1}}}%
\def\tikzoption@opt#1[#2]#3{%
\pgfkeysdef{/tikz/#1}{#3}%
- \pgfkeyssetvalue{/tikz/#1/.@def}{#2}}
+ \pgfkeyssetvalue{/tikz/#1/.@def}{#2}}%
\def\tikzoption@noopt#1#2{%
\pgfkeysdef{/tikz/#1}{#2}%
- \pgfkeyssetvalue{/tikz/#1/.@def}{\pgfkeysvaluerequired}}
+ \pgfkeyssetvalue{/tikz/#1/.@def}{\pgfkeysvaluerequired}}%
% Baseline options
\tikzoption{baseline}[0pt]{%
\pgfutil@ifnextchar(%)
- {\tikz@baseline@coordinate}{\tikz@baseline@simple}#1\@nil}
-\def\tikz@baseline@simple#1\@nil{\pgfsetbaseline{#1}}
+ {\tikz@baseline@coordinate}{\tikz@baseline@simple}#1\@nil}%
+\def\tikz@baseline@simple#1\@nil{\pgfsetbaseline{#1}}%
\def\tikz@baseline@coordinate#1\@nil{%
- \pgfsetbaselinepointlater{\tikz@scan@one@point\pgfutil@firstofone#1}}
+ \pgfsetbaselinepointlater{\tikz@scan@one@point\pgfutil@firstofone#1}}%
-\tikzoption{trim left}[0pt]{\pgfutil@ifnextchar({\tikz@trim@coordinate{left}}{\tikz@trim@simple{left}}#1\@nil}%)
-\tikzoption{trim right}{\pgfutil@ifnextchar({\tikz@trim@coordinate{right}}{\tikz@trim@simple{right}}#1\@nil}%)
-\def\tikz@trim@simple#1#2\@nil{\csname pgfsettrim#1\endcsname{#2}}
-\def\tikz@trim@coordinate#1#2\@nil{\csname pgfsettrim#1pointlater\endcsname{\tikz@scan@one@point\pgfutil@firstofone#2}}
+\tikzoption{trim left}[0pt]{\pgfutil@ifnextchar({\tikz@trim@coordinate{left}}{\tikz@trim@simple{left}}#1\@nil}%)%
+\tikzoption{trim right}{\pgfutil@ifnextchar({\tikz@trim@coordinate{right}}{\tikz@trim@simple{right}}#1\@nil}%)%
+\def\tikz@trim@simple#1#2\@nil{\csname pgfsettrim#1\endcsname{#2}}%
+\def\tikz@trim@coordinate#1#2\@nil{\csname pgfsettrim#1pointlater\endcsname{\tikz@scan@one@point\pgfutil@firstofone#2}}%
% Draw options
\tikzoption{line width}{\tikz@semiaddlinewidth{#1}}%
-\def\tikz@semiaddlinewidth#1{\tikz@addoption{\pgfsetlinewidth{#1}}\pgfmathsetlength\pgflinewidth{#1}}
+\def\tikz@semiaddlinewidth#1{\tikz@addoption{\pgfsetlinewidth{#1}}\pgfmathsetlength\pgflinewidth{#1}}%
-\tikzoption{cap}{\tikz@addoption{\csname pgfset#1cap\endcsname}}
-\tikzoption{join}{\tikz@addoption{\csname pgfset#1join\endcsname}}
-\tikzoption{line cap}{\tikz@addoption{\csname pgfset#1cap\endcsname}}
-\tikzoption{line join}{\tikz@addoption{\csname pgfset#1join\endcsname}}
-\tikzoption{miter limit}{\tikz@addoption{\pgfsetmiterlimit{#1}}}
+\tikzoption{cap}{\tikz@addoption{\csname pgfset#1cap\endcsname}}%
+\tikzoption{join}{\tikz@addoption{\csname pgfset#1join\endcsname}}%
+\tikzoption{line cap}{\tikz@addoption{\csname pgfset#1cap\endcsname}}%
+\tikzoption{line join}{\tikz@addoption{\csname pgfset#1join\endcsname}}%
+\tikzoption{miter limit}{\tikz@addoption{\pgfsetmiterlimit{#1}}}%
\tikzoption{dash pattern}{% syntax: on 2pt off 3pt on 4pt ...
\def\tikz@temp{#1}%
@@ -116,23 +116,37 @@
\expandafter\tikz@scandashon\pgfutil@gobble#1o\@nil%
\edef\tikz@temp{{\tikz@dashpattern}{\noexpand\tikz@dashphase}}%
\expandafter\tikz@addoption\expandafter{\expandafter\pgfsetdash\tikz@temp}%
- \fi}
+ \fi}%
\tikzoption{dash phase}{%
\def\tikz@dashphase{#1}%
\edef\tikz@temp{{\tikz@dashpattern}{\noexpand\tikz@dashphase}}%
\expandafter\tikz@addoption\expandafter{\expandafter\pgfsetdash\tikz@temp}%
}%
-\def\tikz@dashphase{0pt}
-\def\tikz@dashpattern{}
+\tikzoption{dash}{\tikz@parse@full@dash#1\pgf@stop}%
+\def\tikz@parse@full@dash#1phase#2\pgf@stop{%
+ \def\tikz@dashphase{#2}%
+ \def\tikz@temp{#1}%
+ \ifx\tikz@temp\pgfutil@empty%
+ \def\tikz@dashpattern{}%
+ \tikz@addoption{\pgfsetdash{}{0pt}}%
+ \else%
+ \def\tikz@dashpattern{}%
+ \expandafter\tikz@scandashon\pgfutil@gobble#1o\@nil%
+ \edef\tikz@temp{{\tikz@dashpattern}{\noexpand\tikz@dashphase}}%
+ \expandafter\tikz@addoption\expandafter{\expandafter\pgfsetdash\tikz@temp}%
+ \fi%
+}%
+\def\tikz@dashphase{0pt}%
+\def\tikz@dashpattern{}%
\def\tikz@scandashon n#1o{%
\expandafter\def\expandafter\tikz@dashpattern\expandafter{\tikz@dashpattern{#1}}%
- \pgfutil@ifnextchar\@nil{\pgfutil@gobble}{\tikz@scandashoff}}
+ \pgfutil@ifnextchar\@nil{\pgfutil@gobble}{\tikz@scandashoff}}%
\def\tikz@scandashoff ff#1o{%
\expandafter\def\expandafter\tikz@dashpattern\expandafter{\tikz@dashpattern{#1}}%
- \pgfutil@ifnextchar\@nil{\pgfutil@gobble}{\tikz@scandashon}}
+ \pgfutil@ifnextchar\@nil{\pgfutil@gobble}{\tikz@scandashon}}%
-\tikzoption{draw opacity}{\tikz@addoption{\pgfsetstrokeopacity{#1}}}
+\tikzoption{draw opacity}{\tikz@addoption{\pgfsetstrokeopacity{#1}}}%
% Double draw options
\tikzoption{double}[]{%
@@ -146,7 +160,7 @@
\fi%
\tikz@addmode{\tikz@mode@doubletrue}%
\tikzset{every double/.try}%
- \fi}
+ \fi}%
\tikzoption{double distance}{%
\pgfmathsetlength{\pgf@x}{#1}%
\edef\tikz@double@setup{%
@@ -156,7 +170,7 @@
\noexpand\pgfsetlinewidth{\pgflinewidth}%
\noexpand\pgfsetinnerlinewidth{\the\pgf@x}%
}%
- \tikzset{double}}
+ \tikzset{double}}%
\def\tikz@double@setup{%
\pgf@x=2\pgflinewidth%
\advance\pgf@x by0.6pt%
@@ -175,28 +189,28 @@
\noexpand\pgfsetlinewidth{\pgflinewidth}%
\noexpand\pgfsetinnerlinewidth{\pgf@xa}%
}%
- \tikzset{double}}}
-\tikzset{double equal sign distance/.style={double distance between line centers=0.45ex}}
+ \tikzset{double}}}%
+\tikzset{double equal sign distance/.style={double distance between line centers=0.45ex}}%
% Fill options
-\tikzoption{even odd rule}[]{\tikz@addoption{\pgfseteorule}}
-\tikzoption{nonzero rule}[]{\tikz@addoption{\pgfsetnonzerorule}}
+\tikzoption{even odd rule}[]{\tikz@addoption{\pgfseteorule}}%
+\tikzoption{nonzero rule}[]{\tikz@addoption{\pgfsetnonzerorule}}%
-\tikzoption{fill opacity}{\tikz@addoption{\pgfsetfillopacity{#1}}}
+\tikzoption{fill opacity}{\tikz@addoption{\pgfsetfillopacity{#1}}}%
% Joined fill/draw options
-\tikzoption{opacity}{\tikz@addoption{\pgfsetstrokeopacity{#1}\pgfsetfillopacity{#1}}}
+\tikzoption{opacity}{\tikz@addoption{\pgfsetstrokeopacity{#1}\pgfsetfillopacity{#1}}}%
% Blend mode
-\tikzset{blend mode/.code={\tikz@addoption{\pgfsetblendmode{#1}}}}
+\tikzset{blend mode/.code={\tikz@addoption{\pgfsetblendmode{#1}}}}%
% Main color options
@@ -220,45 +234,45 @@
\pgfsetcolor{.}%
\pgfsys@color@reset@inordertrue%
}%
- \def\tikz@textcolor{#1}}
+ \def\tikz@textcolor{#1}}%
% Rounding options
-\tikzoption{rounded corners}[4pt]{\pgfsetcornersarced{\pgfpoint{#1}{#1}}}
-\tikzoption{sharp corners}[]{\pgfsetcornersarced{\pgfpointorigin}}
+\tikzoption{rounded corners}[4pt]{\pgfsetcornersarced{\pgfpoint{#1}{#1}}}%
+\tikzoption{sharp corners}[]{\pgfsetcornersarced{\pgfpointorigin}}%
% Radii and arc options
-\tikzset{x radius/.initial=0pt}
-\tikzset{y radius/.initial=0pt}
-\tikzset{radius/.style={/tikz/x radius=#1,/tikz/y radius=#1}}
-\tikzset{start angle/.initial=}
-\tikzset{end angle/.initial=}
-\tikzset{delta angle/.initial=}
+\tikzset{x radius/.initial=0pt}%
+\tikzset{y radius/.initial=0pt}%
+\tikzset{radius/.style={/tikz/x radius=#1,/tikz/y radius=#1}}%
+\tikzset{start angle/.initial=}%
+\tikzset{end angle/.initial=}%
+\tikzset{delta angle/.initial=}%
% Coordinate options
-\tikzoption{x}{\tikz@handle@vec{\pgfsetxvec}{\tikz@handle@x}#1\relax}
-\tikzoption{y}{\tikz@handle@vec{\pgfsetyvec}{\tikz@handle@y}#1\relax}
-\tikzoption{z}{\tikz@handle@vec{\pgfsetzvec}{\tikz@handle@z}#1\relax}
+\tikzoption{x}{\tikz@handle@vec{\pgfsetxvec}{\tikz@handle@x}#1\relax}%
+\tikzoption{y}{\tikz@handle@vec{\pgfsetyvec}{\tikz@handle@y}#1\relax}%
+\tikzoption{z}{\tikz@handle@vec{\pgfsetzvec}{\tikz@handle@z}#1\relax}%
-\def\tikz@handle@vec#1#2{\pgfutil@ifnextchar({\tikz@handle@coordinate#1}{\tikz@handle@single#2}}
-\def\tikz@handle@coordinate#1{\tikz@scan@one@point#1}
-\def\tikz@handle@single#1#2\relax{#1{#2}}
-\def\tikz@handle@x#1{\pgfsetxvec{\pgfpoint{#1}{0pt}}}
-\def\tikz@handle@y#1{\pgfsetyvec{\pgfpoint{0pt}{#1}}}
-\def\tikz@handle@z#1{\pgfsetzvec{\pgfpoint{#1}{#1}}}
+\def\tikz@handle@vec#1#2{\pgfutil@ifnextchar({\tikz@handle@coordinate#1}{\tikz@handle@single#2}}%
+\def\tikz@handle@coordinate#1{\tikz@scan@one@point#1}%
+\def\tikz@handle@single#1#2\relax{#1{#2}}%
+\def\tikz@handle@x#1{\pgfsetxvec{\pgfpoint{#1}{0pt}}}%
+\def\tikz@handle@y#1{\pgfsetyvec{\pgfpoint{0pt}{#1}}}%
+\def\tikz@handle@z#1{\pgfsetzvec{\pgfpoint{#1}{#1}}}%
% Transformation options
-\tikzoption{scale}{\tikz@addtransform{\pgftransformscale{#1}}}
-\tikzoption{scale around}{\tikz@addtransform{\def\tikz@aroundaction{\pgftransformscale}\tikz@doaround{#1}}}
-\tikzoption{xscale}{\tikz@addtransform{\pgftransformxscale{#1}}}
-\tikzoption{xslant}{\tikz@addtransform{\pgftransformxslant{#1}}}
-\tikzoption{yscale}{\tikz@addtransform{\pgftransformyscale{#1}}}
-\tikzoption{yslant}{\tikz@addtransform{\pgftransformyslant{#1}}}
-\tikzoption{rotate}{\tikz@addtransform{\pgftransformrotate{#1}}}
-\tikzoption{rotate around}{\tikz@addtransform{\def\tikz@aroundaction{\pgftransformrotate}\tikz@doaround{#1}}}
+\tikzoption{scale}{\tikz@addtransform{\pgftransformscale{#1}}}%
+\tikzoption{scale around}{\tikz@addtransform{\def\tikz@aroundaction{\pgftransformscale}\tikz@doaround{#1}}}%
+\tikzoption{xscale}{\tikz@addtransform{\pgftransformxscale{#1}}}%
+\tikzoption{xslant}{\tikz@addtransform{\pgftransformxslant{#1}}}%
+\tikzoption{yscale}{\tikz@addtransform{\pgftransformyscale{#1}}}%
+\tikzoption{yslant}{\tikz@addtransform{\pgftransformyslant{#1}}}%
+\tikzoption{rotate}{\tikz@addtransform{\pgftransformrotate{#1}}}%
+\tikzoption{rotate around}{\tikz@addtransform{\def\tikz@aroundaction{\pgftransformrotate}\tikz@doaround{#1}}}%
\def\tikz@doaround#1{%
\edef\tikz@temp{#1}% get rid of active stuff
\expandafter\tikz@doparseA\tikz@temp%
@@ -266,7 +280,7 @@
\def\tikz@doparseA#1:{%
\def\tikz@temp@rot{#1}%
\tikz@scan@one@point\tikz@doparseB%
-}
+}%
\def\tikz@doparseB#1{%
\pgf@process{#1}%
\pgf@xc=\pgf@x%
@@ -274,21 +288,21 @@
\pgftransformshift{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
\tikz@aroundaction{\tikz@temp@rot}%
\pgftransformshift{\pgfqpoint{-\pgf@xc}{-\pgf@yc}}%
-}
+}%
-\tikzoption{shift}{\tikz@addtransform{\tikz@scan@one@point\pgftransformshift#1\relax}}
-\tikzoption{xshift}{\tikz@addtransform{\pgftransformxshift{#1}}}
-\tikzoption{yshift}{\tikz@addtransform{\pgftransformyshift{#1}}}
-\tikzoption{cm}{\tikz@addtransform{\tikz@parse@cm#1\relax}}
-\tikzoption{reset cm}[]{\tikz@addtransform{\pgftransformreset}}
-\tikzoption{shift only}[]{\tikz@addtransform{\pgftransformresetnontranslations}}
+\tikzoption{shift}{\tikz@addtransform{\tikz@scan@one@point\pgftransformshift#1\relax}}%
+\tikzoption{xshift}{\tikz@addtransform{\pgftransformxshift{#1}}}%
+\tikzoption{yshift}{\tikz@addtransform{\pgftransformyshift{#1}}}%
+\tikzoption{cm}{\tikz@addtransform{\tikz@parse@cm#1\relax}}%
+\tikzoption{reset cm}[]{\tikz@addtransform{\pgftransformreset}}%
+\tikzoption{shift only}[]{\tikz@addtransform{\pgftransformresetnontranslations}}%
\def\tikz@parse@cm#1,#2,#3,#4,{%
\def\tikz@p@cm{{#1}{#2}{#3}{#4}}%
- \tikz@scan@one@point\tikz@parse@cmA}
+ \tikz@scan@one@point\tikz@parse@cmA}%
\def\tikz@parse@cmA#1{%
\expandafter\pgftransformcm\tikz@p@cm{#1}%
-}
+}%
\tikzset{transform canvas/.code=%
{%
@@ -303,7 +317,7 @@
\pgf@relevantforpicturesizefalse%
}%
}%
-}
+}%
\tikzset{turn/.code={%
\pgf@x=0pt%
@@ -318,21 +332,21 @@
{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@ya}}%
{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@x}}{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}%
}%
-}
+}%
\def\tikz@tangent@lookup{%
\pgfgetpath\tikz@temp%
\pgfprocesspathextractpoints\tikz@temp%
\pgfpointsecondlastonpath%
-}
+}%
% Code for rotating the xyz coordinate system
% around the x, y, or z vector.
%
\def\tikz@xyz@rotate@let{%
- \let\pgf@z=\pgf@yc
+ \let\pgf@z=\pgf@yc%
\let\pgf@za=\pgf@xc%
-}
+}%
\def\tikz@xyz@rotate@xyz@xaxis#1#2#3#4{%
\tikz@xyz@rotate@let%
@@ -345,7 +359,7 @@
\advance\pgf@y by-\tikz@xyz@sin\pgf@za%
\pgf@z=\tikz@xyz@sin\pgf@ya%
\advance\pgf@z by\tikz@xyz@cos\pgf@za%
-}
+}%
\def\tikz@xyz@rotate@xyz@yaxis#1#2#3#4{%
\tikz@xyz@rotate@let%
@@ -358,7 +372,7 @@
\advance\pgf@x by\tikz@xyz@sin\pgf@za%
\pgf@z=-\tikz@xyz@sin\pgf@xa%
\advance\pgf@z by\tikz@xyz@cos\pgf@za%
-}
+}%
\def\tikz@xyz@rotate@xyz@zaxis#1#2#3#4{%
\tikz@xyz@rotate@let%
@@ -371,7 +385,7 @@
\advance\pgf@x by-\tikz@xyz@sin\pgf@ya%
\pgf@y=\tikz@xyz@sin\pgf@xa%
\advance\pgf@y by\tikz@xyz@cos\pgf@ya%
-}
+}%
\tikzset{rotate around x/.code={%
\tikz@xyz@rotate@let%
@@ -399,23 +413,23 @@
\tikz@xyz@rotate@xyz@zaxis{0pt}{1pt}{0pt}{\tikz@xyz@angle}%
\pgfsetyvec{\pgfpointxyz{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}{\pgf@sys@tonumber{\pgf@z}}}%
\pgfsetxvec{\tikz@xyz@rotate@xvec}%
- }
-}
+ },
+}%
% Grid options
-\tikzoption{xstep}{\def\tikz@grid@x{#1}}
-\tikzoption{ystep}{\def\tikz@grid@y{#1}}
-\tikzoption{step}{\tikz@handle@vec{\tikz@step@point}{\tikz@step@single}#1\relax}
-\def\tikz@step@single#1{\def\tikz@grid@x{#1}\def\tikz@grid@y{#1}}
-\def\tikz@step@point#1{\pgf@process{#1}\edef\tikz@grid@x{\the\pgf@x}\edef\tikz@grid@y{\the\pgf@y}}
+\tikzoption{xstep}{\def\tikz@grid@x{#1}}%
+\tikzoption{ystep}{\def\tikz@grid@y{#1}}%
+\tikzoption{step}{\tikz@handle@vec{\tikz@step@point}{\tikz@step@single}#1\relax}%
+\def\tikz@step@single#1{\def\tikz@grid@x{#1}\def\tikz@grid@y{#1}}%
+\def\tikz@step@point#1{\pgf@process{#1}\edef\tikz@grid@x{\the\pgf@x}\edef\tikz@grid@y{\the\pgf@y}}%
-\def\tikz@grid@x{1cm}
-\def\tikz@grid@y{1cm}
+\def\tikz@grid@x{1cm}%
+\def\tikz@grid@y{1cm}%
% Current point updates
\newif\iftikz@current@point@local
-\tikzset{current point is local/.is if=tikz@current@point@local}
+\tikzset{current point is local/.is if=tikz@current@point@local}%
% Path usage options
\newif\iftikz@mode@double
@@ -428,16 +442,16 @@
\newif\iftikz@mode@fade@scope
\let\tikz@mode=\pgfutil@empty
-\def\tikz@nonetext{none}
+\def\tikz@nonetext{none}%
-\tikzoption{path only}[]{\let\tikz@mode=\pgfutil@empty}
+\tikzoption{path only}[]{\let\tikz@mode=\pgfutil@empty}%
\tikzset{
shade/.is choice,
shade/.default=true,
shade/true/.code=\tikz@addmode{\tikz@mode@shadetrue},
shade/false/.code=\tikz@addmode{\tikz@mode@shadefalse},
shade/none/.code=\tikz@addmode{\tikz@mode@shadefalse},
-}
+}%
\tikzoption{fill}[]{%
\edef\tikz@temp{#1}%
@@ -451,7 +465,7 @@
\fi%
\tikz@addmode{\tikz@mode@filltrue}%
\fi%
-}
+}%
\tikzoption{draw}[]{%
\edef\tikz@temp{#1}%
\ifx\tikz@temp\tikz@nonetext%
@@ -464,24 +478,24 @@
\fi%
\tikz@addmode{\tikz@mode@drawtrue}%
\fi%
-}
-\tikzoption{clip}[]{\tikz@addmode{\tikz@mode@cliptrue}}
-\tikzoption{use as bounding box}[]{\tikz@addmode{\tikz@mode@boundarytrue}}
+}%
+\tikzoption{clip}[]{\tikz@addmode{\tikz@mode@cliptrue}}%
+\tikzoption{use as bounding box}[]{\tikz@addmode{\tikz@mode@boundarytrue}}%
-\tikzoption{save path}{\tikz@addmode{\pgfsyssoftpath@getcurrentpath#1\global\let#1=#1}}
+\tikzoption{save path}{\tikz@addmode{\pgfsyssoftpath@getcurrentpath#1\global\let#1=#1}}%
\let\tikz@fillcolor=\pgfutil@empty
\let\tikz@strokecolor=\pgfutil@empty
% Insert a path using an option
-\tikzset{insert path/.code=\tikz@scan@next@command#1\pgf@stop}
+\tikzset{insert path/.code=\tikz@scan@next@command#1\pgf@stop}%
% Pattern options
\tikzset{pattern/.code=\tikzerror{You need to say \string\usetikzlibrary{patterns}},
- pattern color/.style=pattern}
+ pattern color/.style=pattern}%
% Path pictures
-\tikzset{path picture/.code=\tikz@addmode{\def\tikz@path@picture{#1}}}
+\tikzset{path picture/.code=\tikz@addmode{\def\tikz@path@picture{#1}}}%
% Fading options
\tikzset{path fading/.code={
@@ -496,7 +510,7 @@
\tikz@addmode{\tikz@mode@fade@pathtrue}%
\fi%
},
- path fading/.default=,
+ path fading/.default=,
scope fading/.code={
\def\tikz@temp{#1}%
\ifx\tikz@temp\tikz@nonetext%
@@ -509,83 +523,83 @@
\tikz@addmode{\tikz@mode@fade@scopetrue}%
\fi%
},
- scope fading/.default=}
-\tikzset{fit fading/.is if=tikz@fade@adjust}
-\tikzset{fading transform/.store in=\tikz@fade@transform}
-\tikzset{fading angle/.style={fading transform={rotate=#1}}}
+ scope fading/.default=}%
+\tikzset{fit fading/.is if=tikz@fade@adjust}%
+\tikzset{fading transform/.store in=\tikz@fade@transform}%
+\tikzset{fading angle/.style={fading transform={rotate=#1}}}%
-\newif\iftikz@fade@adjust
-\tikz@fade@adjusttrue
-\let\tikz@fade@transform\pgfutil@empty
+\newif\iftikz@fade@adjust%
+\tikz@fade@adjusttrue%
+\let\tikz@fade@transform\pgfutil@empty%
-\pgfutil@colorlet{transparent}{pgftransparent}
-\def\tikz@do@fade@transform{\let\tikz@transform=\relax\expandafter\tikzset\expandafter{\tikz@fade@transform}}
+\pgfutil@colorlet{transparent}{pgftransparent}%
+\def\tikz@do@fade@transform{\let\tikz@transform=\relax\expandafter\tikzset\expandafter{\tikz@fade@transform}}%
% Transparency groups
-\newif\iftikz@transparency@group
-\tikzset{/tikz/transparency group/.code=\tikz@transparency@grouptrue\def\tikz@transparency@group@options{isolated=true,#1}\let\tikz@blend@group\pgfutil@empty}
-\tikzset{/tikz/blend group/.code=\tikz@transparency@grouptrue\def\tikz@transparency@group@options{isolated=true}\def\tikz@blend@group{\pgfsetblendmode{#1}}}
+\newif\iftikz@transparency@group%
+\tikzset{/tikz/transparency group/.code=\tikz@transparency@grouptrue\def\tikz@transparency@group@options{isolated=true,#1}\let\tikz@blend@group\pgfutil@empty}%
+\tikzset{/tikz/blend group/.code=\tikz@transparency@grouptrue\def\tikz@transparency@group@options{isolated=true}\def\tikz@blend@group{\pgfsetblendmode{#1}}}%
\let\tikz@blend@group\pgfutil@empty
% Shading options
-\tikzoption{shading}{\def\tikz@shading{#1}\tikz@addmode{\tikz@mode@shadetrue}}
-\tikzoption{shading angle}{\def\tikz@shade@angle{#1}\tikz@addmode{\tikz@mode@shadetrue}}
+\tikzoption{shading}{\def\tikz@shading{#1}\tikz@addmode{\tikz@mode@shadetrue}}%
+\tikzoption{shading angle}{\def\tikz@shade@angle{#1}\tikz@addmode{\tikz@mode@shadetrue}}%
\tikzoption{top color}{%
\pgfutil@colorlet{tikz@axis@top}{#1}%
\pgfutil@colorlet{tikz@axis@middle}{tikz@axis@top!50!tikz@axis@bottom}%
- \def\tikz@shading{axis}\def\tikz@shade@angle{0}\tikz@addmode{\tikz@mode@shadetrue}}
+ \def\tikz@shading{axis}\def\tikz@shade@angle{0}\tikz@addmode{\tikz@mode@shadetrue}}%
\tikzoption{bottom color}{%
\pgfutil@colorlet{tikz@axis@bottom}{#1}%
\pgfutil@colorlet{tikz@axis@middle}{tikz@axis@top!50!tikz@axis@bottom}%
- \def\tikz@shading{axis}\def\tikz@shade@angle{0}\tikz@addmode{\tikz@mode@shadetrue}}
+ \def\tikz@shading{axis}\def\tikz@shade@angle{0}\tikz@addmode{\tikz@mode@shadetrue}}%
\tikzoption{middle color}{%
\pgfutil@colorlet{tikz@axis@middle}{#1}%
- \def\tikz@shading{axis}\tikz@addmode{\tikz@mode@shadetrue}}
+ \def\tikz@shading{axis}\tikz@addmode{\tikz@mode@shadetrue}}%
\tikzoption{left color}{%
\pgfutil@colorlet{tikz@axis@top}{#1}%
\pgfutil@colorlet{tikz@axis@middle}{tikz@axis@top!50!tikz@axis@bottom}%
- \def\tikz@shading{axis}\def\tikz@shade@angle{90}\tikz@addmode{\tikz@mode@shadetrue}}
+ \def\tikz@shading{axis}\def\tikz@shade@angle{90}\tikz@addmode{\tikz@mode@shadetrue}}%
\tikzoption{right color}{%
\pgfutil@colorlet{tikz@axis@bottom}{#1}%
\pgfutil@colorlet{tikz@axis@middle}{tikz@axis@top!50!tikz@axis@bottom}%
- \def\tikz@shading{axis}\def\tikz@shade@angle{90}\tikz@addmode{\tikz@mode@shadetrue}}
-\tikzoption{ball color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{ball}\tikz@addmode{\tikz@mode@shadetrue}}
-\tikzoption{inner color}{\pgfutil@colorlet{tikz@radial@inner}{#1}\def\tikz@shading{radial}\tikz@addmode{\tikz@mode@shadetrue}}
-\tikzoption{outer color}{\pgfutil@colorlet{tikz@radial@outer}{#1}\def\tikz@shading{radial}\tikz@addmode{\tikz@mode@shadetrue}}
+ \def\tikz@shading{axis}\def\tikz@shade@angle{90}\tikz@addmode{\tikz@mode@shadetrue}}%
+\tikzoption{ball color}{\pgfutil@colorlet{tikz@ball}{#1}\def\tikz@shading{ball}\tikz@addmode{\tikz@mode@shadetrue}}%
+\tikzoption{inner color}{\pgfutil@colorlet{tikz@radial@inner}{#1}\def\tikz@shading{radial}\tikz@addmode{\tikz@mode@shadetrue}}%
+\tikzoption{outer color}{\pgfutil@colorlet{tikz@radial@outer}{#1}\def\tikz@shading{radial}\tikz@addmode{\tikz@mode@shadetrue}}%
-\def\tikz@shading{axis}
-\def\tikz@shade@angle{0}
+\def\tikz@shading{axis}%
+\def\tikz@shade@angle{0}%
\pgfdeclareverticalshading[tikz@axis@top,tikz@axis@middle,tikz@axis@bottom]{axis}{100bp}{%
color(0bp)=(tikz@axis@bottom);
color(25bp)=(tikz@axis@bottom);
color(50bp)=(tikz@axis@middle);
color(75bp)=(tikz@axis@top);
- color(100bp)=(tikz@axis@top)}
+ color(100bp)=(tikz@axis@top)}%
-\pgfutil@colorlet{tikz@axis@top}{gray}
-\pgfutil@colorlet{tikz@axis@middle}{gray!50!white}
-\pgfutil@colorlet{tikz@axis@bottom}{white}
+\pgfutil@colorlet{tikz@axis@top}{gray}%
+\pgfutil@colorlet{tikz@axis@middle}{gray!50!white}%
+\pgfutil@colorlet{tikz@axis@bottom}{white}%
\pgfdeclareradialshading[tikz@ball]{ball}{\pgfqpoint{-10bp}{10bp}}{%
color(0bp)=(tikz@ball!15!white);
color(9bp)=(tikz@ball!75!white);
color(18bp)=(tikz@ball!70!black);
color(25bp)=(tikz@ball!50!black);
- color(50bp)=(black)}
+ color(50bp)=(black)}%
-\pgfutil@colorlet{tikz@ball}{blue}
+\pgfutil@colorlet{tikz@ball}{blue}%
\pgfdeclareradialshading[tikz@radial@inner,tikz@radial@outer]{radial}{\pgfpointorigin}{%
color(0bp)=(tikz@radial@inner);
color(25bp)=(tikz@radial@outer);
- color(50bp)=(tikz@radial@outer)}
+ color(50bp)=(tikz@radial@outer)}%
-\pgfutil@colorlet{tikz@radial@inner}{gray}
-\pgfutil@colorlet{tikz@radial@outer}{white}
+\pgfutil@colorlet{tikz@radial@inner}{gray}%
+\pgfutil@colorlet{tikz@radial@outer}{white}%
% Pin options
@@ -598,10 +612,11 @@
pin edge={},
tikz@pin@post/.code={\global\let\tikz@pin@edge@style@smuggle=\tikz@pin@edge@style},
tikz@pre@pin@edge/.code={%
- \def\pgf@marshal{\tikzstyle{tikz@pin@options}=}
- \expandafter\pgf@marshal\expandafter[\tikz@pin@edge@style@smuggle]%
- }%
-}
+ \toks0=\expandafter{\tikz@pin@edge@style@smuggle}%
+ \edef\pgf@marshal{\noexpand\tikzset{tikz@pin@options/.style={\the\toks0}}}%
+ \pgf@marshal
+ },%
+}%
\tikzset{%
pin/.code={%
@@ -617,7 +632,7 @@
{\tikz@parse@pin@nonactive}
{\tikz@parse@pin@nonactive[]}#1:\pgf@nil}%
\fi
- \tikz@next}}
+ \tikz@next}}%
\begingroup
\catcode`\:=\active\relax
@@ -625,8 +640,8 @@
\gdef\tikz@parse@pin@active@i#1{%
\pgfutil@ifnextchar[%]
{\tikz@parse@pin@active}
- {\tikz@parse@pin@active[]}#1:\pgf@nil}
-
+ {\tikz@parse@pin@active[]}#1:\pgf@nil}%
+
\long\gdef\tikz@parse@pin@active[#1]#2:#3\pgf@nil{%
\def\tikz@temp{#3}%
\ifx\tikz@temp\pgfutil@empty
@@ -634,7 +649,7 @@
\tikz@@parse@pin@active[#1]\tikz@pin@default@pos:#2:\pgf@nil%
\else
\tikz@@parse@pin@active[#1]#2:#3\pgf@nil%
- \fi}
+ \fi}%
\long\gdef\tikz@@parse@pin@active[#1]#2:#3:\pgf@nil{%
\tikzset{%
@@ -647,14 +662,14 @@
anchor=@auto,
#1,
append after command = {%
- (\tikz@save@last@node)
+ (\tikz@save@last@node)
edge [every pin edge,
tikz@pre@pin@edge,
- tikz@pin@options]
+ tikz@pin@options]
(\tikzlastnode)},
tikz@label@post = \tikz@pin@distance,
tikz@pin@post] {#3}
- \egroup}}}
+ \egroup}}}%
\endgroup
\long\def\tikz@parse@pin@nonactive[#1]#2:#3\pgf@nil{%
@@ -664,7 +679,7 @@
\tikz@@parse@pin@nonactive[#1]\tikz@pin@default@pos:#2:\pgf@nil%
\else
\tikz@@parse@pin@nonactive[#1]#2:#3\pgf@nil%
- \fi}
+ \fi}%
\long\def\tikz@@parse@pin@nonactive[#1]#2:#3:\pgf@nil{%
\tikzset{%
@@ -677,14 +692,14 @@
anchor=@auto,
#1,
append after command = {%
- (\tikz@save@last@node)
+ (\tikz@save@last@node)
edge [every pin edge,
tikz@pre@pin@edge,
- tikz@pin@options]
+ tikz@pin@options]
(\tikzlastnode)},
tikz@label@post = \tikz@pin@distance,
tikz@pin@post] {#3}
- \egroup}}}
+ \egroup}}}%
% Label and pin options
@@ -695,10 +710,10 @@
label position=above,
absolute/.is if=tikz@absolute,
tikz@label@angle/.store in=\tikz@label@angle
-}
+}%
\newif\iftikz@absolute
-\def\tikz@on@text{center}
+\def\tikz@on@text{center}%
\tikzset{tikz@label@post/.code 2 args={
\edef\tikz@label@angle{\tikz@label@angle}%
@@ -715,7 +730,7 @@
{\pgfpointadd{\pgfpointanchor{\tikzlastnode}{center}}{\pgfpointpolar{\tikz@label@angle}{1pt}}}}%
\edef\tikz@node@at{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
\tikz@compute@direction{\tikz@label@angle}%
- \tikz@addtransform{\pgftransformshift{\pgfpointpolar{\tikz@label@angle}{#1}}}%
+ \tikz@addtransform{\pgftransformshift{\pgfpointpolar{\tikz@label@angle}{#1}}}%
\else%
\pgf@process{\pgfpointanchor{\tikzlastnode}{\tikz@label@angle}}%
\edef\tikz@node@at{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
@@ -734,9 +749,9 @@
\fi%
\fi%
\fi%
- \iftikz@label@simple%
+ \iftikz@label@simple%
\tikz@compute@direction{\tikz@label@angle}%
- \tikz@addtransform{\pgftransformshift{\pgfpointpolar{\tikz@label@angle}{#1}}}%
+ \tikz@addtransform{\pgftransformshift{\pgfpointpolar{\tikz@label@angle}{#1}}}%
\else%
\pgf@process{\pgfpointnormalised{%
\pgfpointdiff{\pgfpointtransformed{\pgfqpoint{\pgf@xc}{\pgf@yc}}}{\pgfpointtransformed{\pgfqpoint{\pgf@xb}{\pgf@yb}}}}}%
@@ -754,8 +769,8 @@
\fi%
\fi%
\fi}
-}
-
+}%
+
\newif\iftikz@label@simple%
\tikzset{%
@@ -772,7 +787,7 @@
{\tikz@parse@label@nonactive}
{\tikz@parse@label@nonactive[]}#1:\pgf@nil}%
\fi
- \tikz@next}}
+ \tikz@next}}%
\begingroup
\catcode`\:=\active\relax
@@ -780,8 +795,8 @@
\gdef\tikz@parse@label@active@i#1{%
\pgfutil@ifnextchar[%]
{\tikz@parse@label@active}
- {\tikz@parse@label@active[]}#1:\pgf@nil}
-
+ {\tikz@parse@label@active[]}#1:\pgf@nil}%
+
\gdef\tikz@parse@label@active[#1]#2:#3\pgf@nil{%
\def\tikz@temp{#3}%
\ifx\tikz@temp\pgfutil@empty
@@ -795,11 +810,11 @@
\tikz@@parse@label@active[#1]#2:#3\pgf@nil%
\fi
\fi
- }
+ }%
\gdef\tikz@@parse@label@active[#1]#2:#3:\pgf@nil{%
\tikzset{%
- append after command = {%
+ append after command = {%
\bgroup
[current point is local=true]
\pgfextra{\let\tikz@save@last@fig@name=\tikz@last@fig@name\tikz@node@is@a@labelfalse}
@@ -807,9 +822,9 @@
tikz@label@angle = #2,
anchor=@auto,
#1,
- tikz@label@post = \tikz@label@distance] {\iftikz@handle@active@nodes\expandafter\scantokens\else\expandafter\pgfutil@firstofone\fi{#3}}
+ tikz@label@post = \tikz@label@distance] {\iftikz@handle@active@nodes\expandafter\scantokens\else\expandafter\pgfutil@firstofone\fi{#3\ignorespaces}}
\pgfextra{\global\let\tikz@last@fig@name=\tikz@save@last@fig@name}
- \egroup}}}
+ \egroup}}}%
\endgroup
\def\tikz@parse@label@nonactive[#1]#2:#3\pgf@nil{%
@@ -825,30 +840,30 @@
\tikz@@parse@label@nonactive[#1]#2:#3\pgf@nil%
\fi
\fi
-}
+}%
\def\tikz@@parse@label@nonactive[#1]#2:#3:\pgf@nil{%
\tikzset{%
- append after command = {%
+ append after command = {%
\bgroup
[current point is local=true]
\pgfextra{\let\tikz@save@last@fig@name=\tikz@last@fig@name\tikz@node@is@a@labelfalse}
- node [every label,
+ node [every label,
tikz@label@angle = #2,
anchor=@auto,
#1,
- tikz@label@post = \tikz@label@distance] {\iftikz@handle@active@nodes\expandafter\scantokens\else\expandafter\pgfutil@firstofone\fi{#3}}
+ tikz@label@post = \tikz@label@distance] {\iftikz@handle@active@nodes\expandafter\scantokens\else\expandafter\pgfutil@firstofone\fi{#3\ignorespaces}}
\pgfextra{\global\let\tikz@last@fig@name=\tikz@save@last@fig@name}
- \egroup}}}
+ \egroup}}}%
-\expandafter\def\csname tikz@label@angle@is@right\endcsname{\def\tikz@label@angle{0}}
-\expandafter\def\csname tikz@label@angle@is@above right\endcsname{\def\tikz@label@angle{45}}
-\expandafter\def\csname tikz@label@angle@is@above\endcsname{\def\tikz@label@angle{90}}
-\expandafter\def\csname tikz@label@angle@is@above left\endcsname{\def\tikz@label@angle{135}}
-\expandafter\def\csname tikz@label@angle@is@left\endcsname{\def\tikz@label@angle{180}}
-\expandafter\def\csname tikz@label@angle@is@below left\endcsname{\def\tikz@label@angle{225}}
-\expandafter\def\csname tikz@label@angle@is@below\endcsname{\def\tikz@label@angle{270}}
-\expandafter\def\csname tikz@label@angle@is@below right\endcsname{\def\tikz@label@angle{315}}
+\expandafter\def\csname tikz@label@angle@is@right\endcsname{\def\tikz@label@angle{0}}%
+\expandafter\def\csname tikz@label@angle@is@above right\endcsname{\def\tikz@label@angle{45}}%
+\expandafter\def\csname tikz@label@angle@is@above\endcsname{\def\tikz@label@angle{90}}%
+\expandafter\def\csname tikz@label@angle@is@above left\endcsname{\def\tikz@label@angle{135}}%
+\expandafter\def\csname tikz@label@angle@is@left\endcsname{\def\tikz@label@angle{180}}%
+\expandafter\def\csname tikz@label@angle@is@below left\endcsname{\def\tikz@label@angle{225}}%
+\expandafter\def\csname tikz@label@angle@is@below\endcsname{\def\tikz@label@angle{270}}%
+\expandafter\def\csname tikz@label@angle@is@below right\endcsname{\def\tikz@label@angle{315}}%
\def\tikz@compute@direction#1{%
\ifx\tikz@anchor\tikz@auto@text%
@@ -879,87 +894,87 @@
\else%
\def\tikz@anchor{west}%
\fi\fi\fi\fi\fi\fi\fi\fi%
- \fi%
-}
-\def\tikz@auto@text{@auto}
+ \fi%
+}%
+\def\tikz@auto@text{@auto}%
% General node options
\tikzset{
- name/.code={\edef\tikz@fig@name{\tikz@pp@name{#1}}},%
+ name/.code={\edef\tikz@fig@name{\tikz@pp@name{#1}}\let\tikz@id@name\tikz@fig@name},%
name prefix/.initial=,%
name suffix/.initial=%
-}
-\def\tikz@pp@name#1{\csname pgfk@/tikz/name prefix\endcsname#1\csname pgfk@/tikz/name suffix\endcsname}
+}%
+\def\tikz@pp@name#1{\csname pgfk@/tikz/name prefix\endcsname#1\csname pgfk@/tikz/name suffix\endcsname}%
\tikzset{
node contents/.code=\def\tikz@node@content{#1},
- pic type/.code=\def\tikz@node@content{#1}, % alias
-}
+ pic type/.code=\def\tikz@node@content{#1}, % alias
+}%
\tikzset{
behind path/.code=\def\tikz@whichbox{\tikz@figbox@bg},
in front of path/.code=\def\tikz@whichbox{\tikz@figbox}
-}
-\def\tikz@whichbox{\tikz@figbox}
+}%
+\def\tikz@whichbox{\tikz@figbox}%
-\tikzoption{at}{\tikz@scan@one@point\tikz@set@at#1}
+\tikzoption{at}{\tikz@scan@one@point\tikz@set@at#1}%
\def\tikz@set@at#1{\def\tikz@node@at{#1}}%
-\tikzoption{shape}{\edef\tikz@shape{#1}}
+\tikzoption{shape}{\edef\tikz@shape{#1}}%
-\tikzoption{nodes}{\tikzstyle{every node}+=[#1]}
+\tikzoption{nodes}{\tikzset{every node/.append style={#1}}}%
\tikzset{alias/.code={%
\tikz@fig@mustbenamed
- \begingroup
- \toks0=\expandafter{\tikz@alias}%
- \edef\pgf@temp{\noexpand\pgfnodealias{\tikz@pp@name{#1}}{\noexpand\tikz@fig@name}}%
- \toks1=\expandafter{\pgf@temp}%
- \xdef\pgf@marshal{%
- \noexpand\def\noexpand\tikz@alias{\the\toks0 \the\toks1 }%
- }%
- \endgroup
- \pgf@marshal
-}}
+ \begingroup
+ \toks0=\expandafter{\tikz@alias}%
+ \edef\pgf@temp{\noexpand\pgfnodealias{\tikz@pp@name{#1}}{\noexpand\tikz@fig@name}}%
+ \toks1=\expandafter{\pgf@temp}%
+ \xdef\pgf@marshal{%
+ \noexpand\def\noexpand\tikz@alias{\the\toks0 \the\toks1 }%
+ }%
+ \endgroup
+ \pgf@marshal
+}}%
% deprecated:
-\def\tikzaddafternodepathoption#1{#1\tikzset{prefix after command={\pgfextra{#1}}}}
-\tikzset{after node path/.style={append after command={#1}}}
+\def\tikzaddafternodepathoption#1{#1\tikzset{prefix after command={\pgfextra{#1}}}}%
+\tikzset{after node path/.style={append after command={#1}}}%
% Pic options
\newif\iftikz@node@is@pic
-\tikzset{pic text/.store in=\tikzpictext}
+\tikzset{pic text/.store in=\tikzpictext}%
\let\tikzpictext\relax
-\tikzset{pic text options/.store in=\tikzpictextoptions}
+\tikzset{pic text options/.store in=\tikzpictextoptions}%
\let\tikzpictextoptions\pgfutil@empty
% Anchoring
-\tikzoption{anchor}{\def\tikz@anchor{#1}\let\tikz@do@auto@anchor=\relax}
+\tikzoption{anchor}{\def\tikz@anchor{#1}\let\tikz@do@auto@anchor=\relax}%
-\tikzoption{left}[]{\def\tikz@anchor{east}\tikz@possibly@transform{x}{-}{#1}}
-\tikzoption{right}[]{\def\tikz@anchor{west}\tikz@possibly@transform{x}{}{#1}}
-\tikzoption{above}[]{\def\tikz@anchor{south}\tikz@possibly@transform{y}{}{#1}}
-\tikzoption{below}[]{\def\tikz@anchor{north}\tikz@possibly@transform{y}{-}{#1}}
+\tikzoption{left}[]{\def\tikz@anchor{east}\tikz@possibly@transform{x}{-}{#1}}%
+\tikzoption{right}[]{\def\tikz@anchor{west}\tikz@possibly@transform{x}{}{#1}}%
+\tikzoption{above}[]{\def\tikz@anchor{south}\tikz@possibly@transform{y}{}{#1}}%
+\tikzoption{below}[]{\def\tikz@anchor{north}\tikz@possibly@transform{y}{-}{#1}}%
\tikzoption{above left}[]%
{\def\tikz@anchor{south east}%
- \tikz@possibly@transform{x}{-}{#1}\tikz@possibly@transform{y}{}{#1}}
+ \tikz@possibly@transform{x}{-}{#1}\tikz@possibly@transform{y}{}{#1}}%
\tikzoption{above right}[]%
{\def\tikz@anchor{south west}%
- \tikz@possibly@transform{x}{}{#1}\tikz@possibly@transform{y}{}{#1}}
+ \tikz@possibly@transform{x}{}{#1}\tikz@possibly@transform{y}{}{#1}}%
\tikzoption{below left}[]%
{\def\tikz@anchor{north east}%
- \tikz@possibly@transform{x}{-}{#1}\tikz@possibly@transform{y}{-}{#1}}
+ \tikz@possibly@transform{x}{-}{#1}\tikz@possibly@transform{y}{-}{#1}}%
\tikzoption{below right}[]%
{\def\tikz@anchor{north west}%
- \tikz@possibly@transform{x}{}{#1}\tikz@possibly@transform{y}{-}{#1}}
-\tikzset{centered/.code=\def\tikz@anchor{center}}
-
-\tikzoption{node distance}{\def\tikz@node@distance{#1}}
-\def\tikz@node@distance{1cm}
+ \tikz@possibly@transform{x}{}{#1}\tikz@possibly@transform{y}{-}{#1}}%
+\tikzset{centered/.code=\def\tikz@anchor{center}}%
+
+\tikzoption{node distance}{\def\tikz@node@distance{#1}}%
+\def\tikz@node@distance{1cm}%
% The following are deprecated:
\tikzoption{above of}{\tikz@of{#1}{90}}%
@@ -976,17 +991,17 @@
\tikz@addtransform{%
\expandafter\tikz@extract@node@dist\tikz@node@distance and\pgf@stop%
\pgftransformshift{\pgfpointpolar{#2}{\tikz@extracted@node@distance}}}%
- \def\tikz@node@at{\pgfpointanchor{#1}{center}}}
+ \def\tikz@node@at{\pgfpointanchor{#1}{center}}}%
\def\tikz@extract@node@dist#1and#2\pgf@stop{%
- \def\tikz@extracted@node@distance{#1}}
+ \def\tikz@extracted@node@distance{#1}}%
\tikzset{
transform shape nonlinear/.is choice,
transform shape nonlinear/.default=true,
transform shape nonlinear/true/.code=\let\tikz@nlt\relax,
transform shape nonlinear/false/.code=\def\tikz@nlt{\pgfapproximatenonlineartranslation},
- transform shape nonlinear=false
-}
+ transform shape nonlinear=false,
+}%
\tikzoption{transform shape}[true]{%
@@ -996,7 +1011,7 @@
\else%
\pgfresetnontranslationattimetrue%
\fi%
-}
+}%
\newif\iftikz@fullytransformed
\pgfresetnontranslationattimetrue%
@@ -1012,30 +1027,30 @@
\pgfmathsetlength{\pgf@x}{#3}%
\pgf@x=#2\pgf@x\relax%
\edef\tikz@marshal{\noexpand\tikz@addtransform{%
- \expandafter\noexpand\csname pgftransform#1shift\endcsname{\the\pgf@x}}}%
+ \expandafter\noexpand\csname pgftransform#1shift\endcsname{\the\pgf@x}}}%
\tikz@marshal%
\fi%
-}
+}%
% Inter-picture options
\tikzoption{remember picture}[true]{\csname pgfrememberpicturepositiononpage#1\endcsname}
\tikzset{
- overlay/.is choice,
- overlay/true/.code={\pgf@relevantforpicturesizefalse},
- overlay/false/.code={\pgf@relevantforpicturesizetrue},
- overlay/.default=true
+ overlay/.is choice,
+ overlay/true/.code={\pgf@relevantforpicturesizefalse},
+ overlay/false/.code={\pgf@relevantforpicturesizetrue},
+ overlay/.default=true
}
% Line/curve label placement options
-\tikzoption{sloped}[true]{\csname pgfslopedattime#1\endcsname}
-\tikzoption{allow upside down}[true]{\csname pgfallowupsidedownattime#1\endcsname}
+\tikzoption{sloped}[true]{\csname pgfslopedattime#1\endcsname}%
+\tikzoption{allow upside down}[true]{\csname pgfallowupsidedownattime#1\endcsname}%
-\tikzoption{pos}{\edef\tikz@time{#1}\ifx\tikz@time\pgfutil@empty\else\pgfmathsetmacro\tikz@time{\tikz@time}\fi}
+\tikzoption{pos}{\edef\tikz@time{#1}\ifx\tikz@time\pgfutil@empty\else\pgfmathsetmacro\tikz@time{\tikz@time}\fi}%
-\tikzoption{auto}[]{\csname tikz@install@auto@anchor@#1\endcsname}
+\tikzoption{auto}[]{\csname tikz@install@auto@anchor@#1\endcsname}%
\tikzoption{swap}[]{%
\def\tikz@temp{left}%
\ifx\tikz@auto@anchor@direction\tikz@temp%
@@ -1043,39 +1058,39 @@
\else%
\def\tikz@auto@anchor@direction{left}%
\fi%
-}
-\tikzset{'/.style=swap} % shorthand
+}%
+\tikzset{'/.style=swap}% shorthand
-\def\tikz@install@auto@anchor@{\let\tikz@do@auto@anchor=\tikz@auto@anchor@on}
-\def\tikz@install@auto@anchor@false{\let\tikz@do@auto@anchor=\relax}
-\def\tikz@install@auto@anchor@left{\let\tikz@do@auto@anchor=\tikz@auto@anchor@on\def\tikz@auto@anchor@direction{left}}
-\def\tikz@install@auto@anchor@right{\let\tikz@do@auto@anchor=\tikz@auto@anchor@on\def\tikz@auto@anchor@direction{right}}
+\def\tikz@install@auto@anchor@{\let\tikz@do@auto@anchor=\tikz@auto@anchor@on}%
+\def\tikz@install@auto@anchor@false{\let\tikz@do@auto@anchor=\relax}%
+\def\tikz@install@auto@anchor@left{\let\tikz@do@auto@anchor=\tikz@auto@anchor@on\def\tikz@auto@anchor@direction{left}}%
+\def\tikz@install@auto@anchor@right{\let\tikz@do@auto@anchor=\tikz@auto@anchor@on\def\tikz@auto@anchor@direction{right}}%
\let\tikz@do@auto@anchor=\relax%
\def\tikz@auto@anchor@on{\csname tikz@auto@anchor@\tikz@auto@anchor@direction\endcsname}
-\def\tikz@auto@anchor@left{\tikz@auto@pre\tikz@auto@anchor\tikz@auto@post}
-\def\tikz@auto@anchor@right{\tikz@auto@pre\tikz@auto@anchor@prime\tikz@auto@post}
+\def\tikz@auto@anchor@left{\tikz@auto@pre\tikz@auto@anchor\tikz@auto@post}%
+\def\tikz@auto@anchor@right{\tikz@auto@pre\tikz@auto@anchor@prime\tikz@auto@post}%
-\def\tikz@auto@anchor@direction{left}
+\def\tikz@auto@anchor@direction{left}%
% Text options
-\tikzoption{text}{\def\tikz@textcolor{#1}}
-\tikzoption{font}{\def\tikz@textfont{#1}}
-\tikzoption{node font}{\def\tikz@node@textfont{#1}}
-\tikzoption{text opacity}{\def\tikz@textopacity{#1}}
-\tikzoption{text width}{\def\tikz@text@width{#1}}
-\tikzoption{text height}{\def\tikz@text@height{#1}}
-\tikzoption{text depth}{\def\tikz@text@depth{#1}}
+\tikzoption{text}{\def\tikz@textcolor{#1}}%
+\tikzoption{font}{\def\tikz@textfont{#1}}%
+\tikzoption{node font}{\def\tikz@node@textfont{#1}}%
+\tikzoption{text opacity}{\def\tikz@textopacity{#1}}%
+\tikzoption{text width}{\def\tikz@text@width{#1}}%
+\tikzoption{text height}{\def\tikz@text@height{#1}}%
+\tikzoption{text depth}{\def\tikz@text@depth{#1}}%
\tikzoption{text ragged}[]%
-{\def\tikz@text@action{\pgfutil@raggedright\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax}}
-\tikzoption{text badly ragged}[]{\def\tikz@text@action{\pgfutil@raggedright\relax}}
+{\def\tikz@text@action{\pgfutil@raggedright\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax}}%
+\tikzoption{text badly ragged}[]{\def\tikz@text@action{\pgfutil@raggedright\relax}}%
\tikzoption{text ragged left}[]%
-{\def\tikz@text@action{\pgfutil@raggedleft\leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax}}
-\tikzoption{text badly ragged left}[]{\def\tikz@text@action{\pgfutil@raggedleft\relax}}
-\tikzoption{text justified}[]{\def\tikz@text@action{\leftskip0pt\rightskip0pt\relax}}
+{\def\tikz@text@action{\pgfutil@raggedleft\leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax}}%
+\tikzoption{text badly ragged left}[]{\def\tikz@text@action{\pgfutil@raggedleft\relax}}%
+\tikzoption{text justified}[]{\def\tikz@text@action{\leftskip0pt\rightskip0pt\relax}}%
\tikzoption{text centered}[]{\def\tikz@text@action{%
\leftskip0pt plus2em%
\rightskip0pt plus2em%
@@ -1083,14 +1098,14 @@
\parfillskip=0pt%
\iftikz@warn@for@narrow@centered\else\hbadness10000\fi%
\let\\=\@centercr% for latex
- \relax}}
+ \relax}}%
\tikzoption{text badly centered}[]%
{\def\tikz@text@action{%
\let\\=\@centercr% for latex
\parfillskip=0pt%
\rightskip\pgfutil@flushglue%
- \leftskip\pgfutil@flushglue\relax}}
-\tikzset{badness warnings for centered text/.is if=tikz@warn@for@narrow@centered}
+ \leftskip\pgfutil@flushglue\relax}}%
+\tikzset{badness warnings for centered text/.is if=tikz@warn@for@narrow@centered}%
\newif\iftikz@warn@for@narrow@centered
\let\tikz@text@width=\pgfutil@empty
@@ -1101,7 +1116,7 @@
\let\tikz@textopacity=\pgfutil@empty
\let\tikz@node@textfont=\pgfutil@empty
-\def\tikz@text@action{\pgfutil@raggedright\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax}
+\def\tikz@text@action{\pgfutil@raggedright\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax}%
% Alignment
@@ -1115,23 +1130,23 @@
align/center/.style={text centered,node halign header=\tikz@align@center@header},
align/flush center/.style={text badly centered,node halign header=\tikz@align@center@header},
align/justify/.style ={text justified,node halign header=\tikz@align@left@header},
- align/none/.style ={text justified,node halign header=}
-}
-\def\tikz@align@left@header{##\hfil\cr}
-\def\tikz@align@right@header{\hfil##\cr}
-\def\tikz@align@center@header{\hfil##\hfil\cr}
+ align/none/.style ={text justified,node halign header=},
+}%
+\def\tikz@align@left@header{##\hfil\cr}%
+\def\tikz@align@right@header{\hfil##\cr}%
+\def\tikz@align@center@header{\hfil##\hfil\cr}%
% Arrow options
-\tikzoption{arrows}{\tikz@processarrows{#1}}
+\tikzoption{arrows}{\tikz@processarrows{#1}}%
\tikzoption{>}{\pgfdeclarearrow{name=<->,means={#1}}}%
-\pgfdeclarearrow{name=|<->|, means={>[sep=0pt].|}}
+\pgfdeclarearrow{name=|<->|, means={>[sep=0pt].|}}%
-\tikzoption{shorten <}{\pgfsetshortenstart{#1}}
-\tikzoption{shorten >}{\pgfsetshortenend{#1}}
+\tikzoption{shorten <}{\pgfsetshortenstart{#1}}%
+\tikzoption{shorten >}{\pgfsetshortenend{#1}}%
\def\tikz@processarrows#1{%
\def\tikz@current@arrows{#1}%
@@ -1140,94 +1155,94 @@
\else%
\pgfsetarrows{#1}%
\fi%
-}
+}%
-\def\tikz@current@arrows{-}
+\def\tikz@current@arrows{-}%
% Parabola options
\tikzoption{bend}{\tikz@scan@one@point\tikz@set@parabola@bend#1\relax}%
-\tikzoption{bend pos}{\def\tikz@parabola@bend@factor{#1}}
+\tikzoption{bend pos}{\def\tikz@parabola@bend@factor{#1}}%
\tikzoption{parabola height}{%
\def\tikz@parabola@bend@factor{.5}%
- \def\tikz@parabola@bend{\pgfpointadd{\pgfpoint{0pt}{#1}}{\tikz@last@position@saved}}}
+ \def\tikz@parabola@bend{\pgfpointadd{\pgfpoint{0pt}{#1}}{\tikz@last@position@saved}}}%
-\def\tikz@parabola@bend{\tikz@last@position@saved}
-\def\tikz@parabola@bend@factor{0}
+\def\tikz@parabola@bend{\tikz@last@position@saved}%
+\def\tikz@parabola@bend@factor{0}%
-\def\tikz@set@parabola@bend#1{\def\tikz@parabola@bend{#1}}
+\def\tikz@set@parabola@bend#1{\def\tikz@parabola@bend{#1}}%
% Axis options
-\tikzoption{domain}{\edef\tikz@plot@domain{#1}\expandafter\tikz@plot@samples@recalc\tikz@plot@domain\relax}
-\tikzoption{range}{\def\tikz@plot@range{#1}}
-\tikzoption{yrange}{\def\tikz@plot@range{#1}}
+\tikzoption{domain}{\edef\tikz@plot@domain{#1}\expandafter\tikz@plot@samples@recalc\tikz@plot@domain\relax}%
+\tikzoption{range}{\def\tikz@plot@range{#1}}%
+\tikzoption{yrange}{\def\tikz@plot@range{#1}}%
\let\tikz@plot@range=\pgfutil@empty
-\tikzoption{xrange}{\def\tikz@plot@xrange{#1}}
+\tikzoption{xrange}{\def\tikz@plot@xrange{#1}}%
\let\tikz@plot@xrange=\pgfutil@empty
% Plot options
-\tikzoption{smooth}[]{\let\tikz@plot@handler=\pgfplothandlercurveto}
-\tikzoption{smooth cycle}[]{\let\tikz@plot@handler=\pgfplothandlerclosedcurve}
-\tikzoption{sharp plot}[]{\let\tikz@plot@handler\pgfplothandlerlineto}
-\tikzoption{sharp cycle}[]{\let\tikz@plot@handler\pgfplothandlerpolygon}
-
-\tikzoption{tension}{\pgfsetplottension{#1}}
-
-\tikzoption{xcomb}[]{\let\tikz@plot@handler=\pgfplothandlerxcomb}
-\tikzoption{ycomb}[]{\let\tikz@plot@handler=\pgfplothandlerycomb}
-\tikzoption{polar comb}[]{\let\tikz@plot@handler=\pgfplothandlerpolarcomb}
-\tikzoption{ybar}[]{\let\tikz@plot@handler=\pgfplothandlerybar}
-\tikzoption{ybar interval}[]{\let\tikz@plot@handler=\pgfplothandlerybarinterval}
-\tikzoption{xbar interval}[]{\let\tikz@plot@handler=\pgfplothandlerxbarinterval}
-\tikzoption{xbar}[]{\let\tikz@plot@handler=\pgfplothandlerxbar}
-\tikzoption{const plot}[]{\let\tikz@plot@handler=\pgfplothandlerconstantlineto}
-\tikzoption{const plot mark left}[]{\let\tikz@plot@handler=\pgfplothandlerconstantlineto}
-\tikzoption{const plot mark right}[]{\let\tikz@plot@handler=\pgfplothandlerconstantlinetomarkright}
-\tikzoption{const plot mark mid}[]{\let\tikz@plot@handler=\pgfplothandlerconstantlinetomarkmid}
-\tikzoption{jump mark right}[]{\let\tikz@plot@handler=\pgfplothandlerjumpmarkright}
-\tikzoption{jump mark mid}[]{\let\tikz@plot@handler=\pgfplothandlerjumpmarkmid}
-\tikzoption{jump mark left}[]{\let\tikz@plot@handler=\pgfplothandlerjumpmarkleft}
-
-\tikzoption{raw gnuplot}[true]{\csname tikz@plot@raw@gnuplot#1\endcsname}
-\tikzoption{prefix}{\def\tikz@plot@prefix{#1}}
-\tikzoption{id}{\def\tikz@plot@id{#1}}
-
-\tikzoption{samples}{\pgfmathsetmacro\tikz@plot@samples{max(2,#1)}\expandafter\tikz@plot@samples@recalc\tikz@plot@domain\relax}
-\tikzoption{samples at}{\def\tikz@plot@samplesat{#1}}
-\tikzoption{parametric}[true]{\csname tikz@plot@parametric#1\endcsname}
-
-\tikzoption{variable}{\def\tikz@plot@var{#1}}
-
-\tikzoption{only marks}[]{\let\tikz@plot@handler\pgfplothandlerdiscard}
+\tikzoption{smooth}[]{\let\tikz@plot@handler=\pgfplothandlercurveto}%
+\tikzoption{smooth cycle}[]{\let\tikz@plot@handler=\pgfplothandlerclosedcurve}%
+\tikzoption{sharp plot}[]{\let\tikz@plot@handler\pgfplothandlerlineto}%
+\tikzoption{sharp cycle}[]{\let\tikz@plot@handler\pgfplothandlerpolygon}%
+
+\tikzoption{tension}{\pgfsetplottension{#1}}%
+
+\tikzoption{xcomb}[]{\let\tikz@plot@handler=\pgfplothandlerxcomb}%
+\tikzoption{ycomb}[]{\let\tikz@plot@handler=\pgfplothandlerycomb}%
+\tikzoption{polar comb}[]{\let\tikz@plot@handler=\pgfplothandlerpolarcomb}%
+\tikzoption{ybar}[]{\let\tikz@plot@handler=\pgfplothandlerybar}%
+\tikzoption{ybar interval}[]{\let\tikz@plot@handler=\pgfplothandlerybarinterval}%
+\tikzoption{xbar interval}[]{\let\tikz@plot@handler=\pgfplothandlerxbarinterval}%
+\tikzoption{xbar}[]{\let\tikz@plot@handler=\pgfplothandlerxbar}%
+\tikzoption{const plot}[]{\let\tikz@plot@handler=\pgfplothandlerconstantlineto}%
+\tikzoption{const plot mark left}[]{\let\tikz@plot@handler=\pgfplothandlerconstantlineto}%
+\tikzoption{const plot mark right}[]{\let\tikz@plot@handler=\pgfplothandlerconstantlinetomarkright}%
+\tikzoption{const plot mark mid}[]{\let\tikz@plot@handler=\pgfplothandlerconstantlinetomarkmid}%
+\tikzoption{jump mark right}[]{\let\tikz@plot@handler=\pgfplothandlerjumpmarkright}%
+\tikzoption{jump mark mid}[]{\let\tikz@plot@handler=\pgfplothandlerjumpmarkmid}%
+\tikzoption{jump mark left}[]{\let\tikz@plot@handler=\pgfplothandlerjumpmarkleft}%
+
+\tikzoption{raw gnuplot}[true]{\csname tikz@plot@raw@gnuplot#1\endcsname}%
+\tikzoption{prefix}{\def\tikz@plot@prefix{#1}}%
+\tikzoption{id}{\def\tikz@plot@id{#1}}%
+
+\tikzoption{samples}{\pgfmathsetmacro\tikz@plot@samples{max(2,#1)}\expandafter\tikz@plot@samples@recalc\tikz@plot@domain\relax}%
+\tikzoption{samples at}{\def\tikz@plot@samplesat{#1}}%
+\tikzoption{parametric}[true]{\csname tikz@plot@parametric#1\endcsname}%
+
+\tikzoption{variable}{\def\tikz@plot@var{#1}}%
+
+\tikzoption{only marks}[]{\let\tikz@plot@handler\pgfplothandlerdiscard}%
\tikzoption{mark}{%
- \def\tikz@plot@mark{#1}%
- \def\tikz@temp{none}%
- \ifx\tikz@temp\tikz@plot@mark
- \let\tikz@plot@mark=\pgfutil@empty
- \fi
-}
+ \def\tikz@plot@mark{#1}%
+ \def\tikz@temp{none}%
+ \ifx\tikz@temp\tikz@plot@mark
+ \let\tikz@plot@mark=\pgfutil@empty
+ \fi
+}%
\tikzset{
- no marks/.style={mark=none},%
- no markers/.style={mark=none},%
- every mark/.style={},
- mark options/.style={%
- every mark/.style={#1}%
- }}
-\tikzoption{mark size}{\pgfsetplotmarksize{#1}}
-
-\tikzoption{mark indices}{\def\tikz@mark@list{#1}}
-\tikzoption{mark phase}{\pgfsetplotmarkphase{#1}}
-\tikzoption{mark repeat}{\pgfsetplotmarkrepeat{#1}}
+ no marks/.style={mark=none},%
+ no markers/.style={mark=none},%
+ every mark/.style={},
+ mark options/.style={%
+ every mark/.style={#1}%
+ }}%
+\tikzoption{mark size}{\pgfsetplotmarksize{#1}}%
+
+\tikzoption{mark indices}{\def\tikz@mark@list{#1}}%
+\tikzoption{mark phase}{\pgfsetplotmarkphase{#1}}%
+\tikzoption{mark repeat}{\pgfsetplotmarkrepeat{#1}}%
\let\tikz@mark@list=\pgfutil@empty
\let\tikz@plot@handler=\pgfplothandlerlineto
\let\tikz@plot@mark=\pgfutil@empty
-\def\tikz@plot@samples{25}
-\def\tikz@plot@domain{-5:5}
-\def\tikz@plot@var{\x}
-\def\tikz@plot@samplesat{-5,-4.5833333,...,5}
+\def\tikz@plot@samples{25}%
+\def\tikz@plot@domain{-5:5}%
+\def\tikz@plot@var{\x}%
+\def\tikz@plot@samplesat{-5,-4.5833333,...,5}%
\def\tikz@plot@samples@recalc#1:#2\relax{%
\begingroup
\pgfmathparse{#1}%
@@ -1251,11 +1266,11 @@
\fi%
\pgfmath@smuggleone\tikz@plot@samplesat
\endgroup
-}
+}%
-\def\tikz@plot@prefix{\jobname.}
-\def\tikz@plot@id{pgf-plot}
+\def\tikz@plot@prefix{\jobname.}%
+\def\tikz@plot@id{pgf-plot}%
\newif\iftikz@plot@parametric
\newif\iftikz@plot@raw@gnuplot
@@ -1264,11 +1279,11 @@
%
% To and edge options
%
-\tikzoption{to path}{\def\tikz@to@path{#1}}
+\tikzoption{to path}{\def\tikz@to@path{#1}}%
-\def\tikz@to@path{-- (\tikztotarget) \tikztonodes}
+\def\tikz@to@path{-- (\tikztotarget) \tikztonodes}%
-\tikzset{edge macro/.store in=\tikz@edge@macro}
+\tikzset{edge macro/.store in=\tikz@edge@macro}%
\let\tikz@edge@macro\pgfutil@empty
\tikzset{
@@ -1276,8 +1291,8 @@
\expandafter\def\expandafter\tikz@tonodes\expandafter{\tikz@tonodes #1}
},
edge label/.style={/tikz/edge node={node[auto]{#1}}},
- edge label'/.style={/tikz/edge node={node[auto,swap]{#1}}}
-}
+ edge label'/.style={/tikz/edge node={node[auto,swap]{#1}}},
+}%
% After command options
@@ -1289,36 +1304,36 @@
\expandafter\expandafter\expandafter\tikz@after@path%
\expandafter\expandafter\expandafter{%
\expandafter\tikz@temp\tikz@after@path}%
- }
-}
+ },
+}%
\let\tikz@after@path\pgfutil@empty
% Tree options
\newif\iftikz@child@missing
-\pgfkeys{/tikz/missing/.is if=tikz@child@missing}
+\pgfkeys{/tikz/missing/.is if=tikz@child@missing}%
-\tikzset{edge from parent macro/.initial=\tikz@edge@from@parent@macro}
+\tikzset{edge from parent macro/.initial=\tikz@edge@from@parent@macro}%
\def\tikz@edge@from@parent@macro#1#2{
- [style=edge from parent, #1, /utils/exec=\tikz@node@is@a@labeltrue] \tikz@edge@to@parent@path #2}
+ [style=edge from parent, #1, /utils/exec=\tikz@node@is@a@labeltrue] \tikz@edge@to@parent@path #2}%
-\tikzoption{edge from parent path}{\def\tikz@edge@to@parent@path{#1}}
+\tikzoption{edge from parent path}{\def\tikz@edge@to@parent@path{#1}}%
-\tikzoption{parent anchor}{\def\tikzparentanchor{.#1}\ifx\tikzparentanchor\tikz@border@text\let\tikzparentanchor\pgfutil@empty\fi}
-\tikzoption{child anchor}{\def\tikzchildanchor{.#1}\ifx\tikzchildanchor\tikz@border@text\let\tikzchildanchor\pgfutil@empty\fi}
+\tikzoption{parent anchor}{\def\tikzparentanchor{.#1}\ifx\tikzparentanchor\tikz@border@text\let\tikzparentanchor\pgfutil@empty\fi}%
+\tikzoption{child anchor}{\def\tikzchildanchor{.#1}\ifx\tikzchildanchor\tikz@border@text\let\tikzchildanchor\pgfutil@empty\fi}%
-\tikzoption{level distance}{\pgfmathsetlength\tikzleveldistance{#1}}
-\tikzoption{sibling distance}{\pgfmathsetlength\tikzsiblingdistance{#1}}
+\tikzoption{level distance}{\pgfmathsetlength\tikzleveldistance{#1}}%
+\tikzoption{sibling distance}{\pgfmathsetlength\tikzsiblingdistance{#1}}%
-\tikzoption{growth function}{\let\tikz@grow=#1}
+\tikzoption{growth function}{\let\tikz@grow=#1}%
-\tikzset{grow siblings on line/.style={growth function=\tikz@grow@direction}}
+\tikzset{grow siblings on line/.style={growth function=\tikz@grow@direction}}%
-\tikzoption{growth parent anchor}{\def\tikz@growth@anchor{#1}}
+\tikzoption{growth parent anchor}{\def\tikz@growth@anchor{#1}}%
\tikzoption{grow}{\tikz@set@growth{#1}\edef\tikz@special@level{\the\tikztreelevel}}%
\tikzoption{grow'}{\tikz@set@growth{#1}\tikz@swap@growth\edef\tikz@special@level{\the\tikztreelevel}}%
-\def\tikz@growth@anchor{center}
+\def\tikz@growth@anchor{center}%
\def\tikz@special@level{-1}% never
@@ -1341,30 +1356,30 @@
\edef\tikz@angle@grow@left{\the\c@pgf@counta}%
\advance\c@pgf@counta by180\relax%
\edef\tikz@angle@grow@right{\the\c@pgf@counta}%
-}
+}%
-\def\tikz@border@text{.border}
+\def\tikz@border@text{.border}%
\let\tikzparentanchor=\pgfutil@empty
\let\tikzchildanchor=\pgfutil@empty
-\def\tikz@edge@to@parent@path{(\tikzparentnode\tikzparentanchor) -- (\tikzchildnode\tikzchildanchor)}
+\def\tikz@edge@to@parent@path{(\tikzparentnode\tikzparentanchor) -- (\tikzchildnode\tikzchildanchor)}%
-\tikzleveldistance=15mm
-\tikzsiblingdistance=15mm
+\tikzleveldistance=15mm%
+\tikzsiblingdistance=15mm%
-\def\tikz@grow@direction@down{-90}
-\def\tikz@grow@direction@up{90}
-\def\tikz@grow@direction@left{180}
-\def\tikz@grow@direction@right{0}
+\def\tikz@grow@direction@down{-90}%
+\def\tikz@grow@direction@up{90}%
+\def\tikz@grow@direction@left{180}%
+\def\tikz@grow@direction@right{0}%
-\def\tikz@grow@direction@south{-90}
-\def\tikz@grow@direction@north{90}
-\def\tikz@grow@direction@west{180}
-\def\tikz@grow@direction@east{0}
+\def\tikz@grow@direction@south{-90}%
+\def\tikz@grow@direction@north{90}%
+\def\tikz@grow@direction@west{180}%
+\def\tikz@grow@direction@east{0}%
-\expandafter\def\csname tikz@grow@direction@north east\endcsname{45}
-\expandafter\def\csname tikz@grow@direction@north west\endcsname{135}
-\expandafter\def\csname tikz@grow@direction@south east\endcsname{-45}
-\expandafter\def\csname tikz@grow@direction@south west\endcsname{-135}
+\expandafter\def\csname tikz@grow@direction@north east\endcsname{45}%
+\expandafter\def\csname tikz@grow@direction@north west\endcsname{135}%
+\expandafter\def\csname tikz@grow@direction@south east\endcsname{-45}%
+\expandafter\def\csname tikz@grow@direction@south west\endcsname{-135}%
\def\tikz@grow@direction{%
\pgftransformshift{\pgfpointpolar{\tikz@angle@grow}{\tikzleveldistance}}%
@@ -1377,30 +1392,30 @@
\pgftransformshift{\pgfpointpolar{\tikz@angle@grow@left}{\pgfutil@tempdima}}%
\pgftransformshift{\pgfpointpolar{\tikz@angle@grow@right}{\tikznumberofcurrentchild\tikzsiblingdistance}}%
\fi%
-}
+}%
-\tikzset{grow=down}
+\tikzset{grow=down}%
% Snakes are in a lib:
-\tikzset{snake/.code=\tikzerror{You need to say \string\usetikzlibrary{snakes}}}
+\tikzset{snake/.code=\tikzerror{You need to say \string\usetikzlibrary{snakes}}}%
% Decorations
-\tikzset{decorate/.code=\tikzerror{You need to load a decoration library}}
+\tikzset{decorate/.code=\tikzerror{You need to load a decoration library}}%
% Matrix options
-\usepgfmodule{matrix}
+\usepgfmodule{matrix}%
-\tikzoption{matrix}[true]{\csname tikz@is@matrix#1\endcsname}
+\tikzoption{matrix}[true]{\csname tikz@is@matrix#1\endcsname}%
-\tikzoption{matrix anchor}{\def\tikz@matrix@anchor{#1}}
+\tikzoption{matrix anchor}{\def\tikz@matrix@anchor{#1}}%
-\tikzoption{column sep}{\def\pgfmatrixcolumnsep{#1}}
-\tikzoption{row sep}{\def\pgfmatrixrowsep{#1}}
+\tikzoption{column sep}{\def\pgfmatrixcolumnsep{#1}}%
+\tikzoption{row sep}{\def\pgfmatrixrowsep{#1}}%
-\tikzoption{cells}{\tikzstyle{every cell}+=[#1]}
+\tikzoption{cells}{\tikzset{every cell/.append style={#1}}}%
-\tikzoption{ampersand replacement}{\def\tikz@ampersand@replacement{#1}}
+\tikzoption{ampersand replacement}{\def\tikz@ampersand@replacement{#1}}%
\newif\iftikz@is@matrix
\let\tikz@matrix@anchor=\pgfutil@empty
@@ -1411,25 +1426,25 @@
\tikzset{%
handle active characters in code/.is if=tikz@handle@active@code,
handle active characters in nodes/.is if=tikz@handle@active@nodes,
-}
+}%
\newif\iftikz@handle@active@code
\newif\iftikz@handle@active@nodes
% Execute option
-\tikzoption{execute at begin picture}{\expandafter\def\expandafter\tikz@atbegin@picture\expandafter{\tikz@atbegin@picture#1}}
-\tikzoption{execute at end picture}{\expandafter\def\expandafter\tikz@atend@picture\expandafter{\tikz@atend@picture#1}}
-\tikzoption{execute at begin scope}{\expandafter\def\expandafter\tikz@atbegin@scope\expandafter{\tikz@atbegin@scope#1}}
-\tikzoption{execute at end scope}{\expandafter\def\expandafter\tikz@atend@scope\expandafter{\tikz@atend@scope#1}}
-\tikzoption{execute at begin to}{\expandafter\def\expandafter\tikz@atbegin@to\expandafter{\tikz@atbegin@to#1}}
-\tikzoption{execute at end to}{\expandafter\def\expandafter\tikz@atend@to\expandafter{\tikz@atend@to#1}}
-\tikzoption{execute at begin node}{\expandafter\def\expandafter\tikz@atbegin@node\expandafter{\tikz@atbegin@node#1}}
-\tikzoption{execute at end node}{\expandafter\def\expandafter\tikz@atend@node\expandafter{\tikz@atend@node#1}}
-\tikzoption{execute at begin matrix}{\expandafter\def\expandafter\tikz@atbegin@matrix\expandafter{\tikz@atbegin@matrix#1}}
-\tikzoption{execute at end matrix}{\expandafter\def\expandafter\tikz@atend@matrix\expandafter{\tikz@atend@matrix#1}}
-\tikzoption{execute at begin cell}{\expandafter\def\expandafter\tikz@atbegin@cell\expandafter{\tikz@atbegin@cell#1}}
-\tikzoption{execute at end cell}{\expandafter\def\expandafter\tikz@atend@cell\expandafter{\tikz@atend@cell#1}}
-\tikzoption{execute at empty cell}{\expandafter\def\expandafter\tikz@at@emptycell\expandafter{\tikz@at@emptycell#1}}
+\tikzoption{execute at begin picture}{\expandafter\def\expandafter\tikz@atbegin@picture\expandafter{\tikz@atbegin@picture#1}}%
+\tikzoption{execute at end picture}{\expandafter\def\expandafter\tikz@atend@picture\expandafter{\tikz@atend@picture#1}}%
+\tikzoption{execute at begin scope}{\expandafter\def\expandafter\tikz@atbegin@scope\expandafter{\tikz@atbegin@scope#1}}%
+\tikzoption{execute at end scope}{\expandafter\def\expandafter\tikz@atend@scope\expandafter{\tikz@atend@scope#1}}%
+\tikzoption{execute at begin to}{\expandafter\def\expandafter\tikz@atbegin@to\expandafter{\tikz@atbegin@to#1}}%
+\tikzoption{execute at end to}{\expandafter\def\expandafter\tikz@atend@to\expandafter{\tikz@atend@to#1}}%
+\tikzoption{execute at begin node}{\expandafter\def\expandafter\tikz@atbegin@node\expandafter{\tikz@atbegin@node#1}}%
+\tikzoption{execute at end node}{\expandafter\def\expandafter\tikz@atend@node\expandafter{\tikz@atend@node#1}}%
+\tikzoption{execute at begin matrix}{\expandafter\def\expandafter\tikz@atbegin@matrix\expandafter{\tikz@atbegin@matrix#1}}%
+\tikzoption{execute at end matrix}{\expandafter\def\expandafter\tikz@atend@matrix\expandafter{\tikz@atend@matrix#1}}%
+\tikzoption{execute at begin cell}{\expandafter\def\expandafter\tikz@atbegin@cell\expandafter{\tikz@atbegin@cell#1}}%
+\tikzoption{execute at end cell}{\expandafter\def\expandafter\tikz@atend@cell\expandafter{\tikz@atend@cell#1}}%
+\tikzoption{execute at empty cell}{\expandafter\def\expandafter\tikz@at@emptycell\expandafter{\tikz@at@emptycell#1}}%
\let\tikz@atbegin@picture=\pgfutil@empty
\let\tikz@atend@picture=\pgfutil@empty
@@ -1447,17 +1462,17 @@
% Pre and post actions
-\tikzset{preaction/.code=\expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions\tikz@extra@preaction{#1}}}
-\tikzset{postaction/.code=\expandafter\def\expandafter\tikz@postactions\expandafter{\tikz@postactions\tikz@extra@postaction{#1}}}
+\tikzset{preaction/.code=\expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions\tikz@extra@preaction{#1}}}%
+\tikzset{postaction/.code=\expandafter\def\expandafter\tikz@postactions\expandafter{\tikz@postactions\tikz@extra@postaction{#1}}}%
\let\tikz@preactions=\pgfutil@empty
\let\tikz@postactions=\pgfutil@empty
% Styles
-\tikzoption{set style}{\tikzstyle#1}
+\tikzoption{set style}{\tikzstyle#1}%
% Handled in a special way.
-\def\tikzstyle{\pgfutil@ifnextchar\bgroup\tikz@style@parseA\tikz@style@parseB}
-\def\tikz@style@parseB#1={\tikz@style@parseA{#1}=}
+\def\tikzstyle{\pgfutil@ifnextchar\bgroup\tikz@style@parseA\tikz@style@parseB}%
+\def\tikz@style@parseB#1={\tikz@style@parseA{#1}=}%
\def\tikz@style@parseA#1#2=#3[#4]{% check for an optional argument
\pgfutil@in@[{#2}%]
\ifpgfutil@in@%
@@ -1474,14 +1489,14 @@
\pgfkeys{/tikz/#1/.append style={#4}}%
\else%
\pgfkeys{/tikz/#1/.style={#4}}%
- \fi}
+ \fi}%
\def\tikz@style@parseD#1#2=#3{%
\pgfutil@in@+{#2}%
\ifpgfutil@in@%
\pgfkeys{/tikz/#1/.append style={#3}}%
\else%
\pgfkeys{/tikz/#1/.style={#3}}%
- \fi}
+ \fi}%
%
@@ -1490,86 +1505,103 @@
%
%
-\tikzstyle{help lines}= [color=gray,line width=0.2pt]
-
-\tikzstyle{every picture}= []
-\tikzstyle{every path}= []
-\tikzstyle{every scope}= []
-\tikzstyle{every plot}= []
-\tikzstyle{every node}= []
-\tikzstyle{every child}= []
-\tikzstyle{every child node}= []
-\tikzstyle{every to}= []
-\tikzstyle{every cell}= []
-\tikzstyle{every matrix}= []
-\tikzstyle{every edge}= [draw]
-\tikzstyle{every label}= [draw=none,fill=none]
-\tikzstyle{every pin}= [draw=none,fill=none]
-\tikzstyle{every pin edge}= [help lines]
-
-\tikzstyle{ultra thin}= [line width=0.1pt]
-\tikzstyle{very thin}= [line width=0.2pt]
-\tikzstyle{thin}= [line width=0.4pt]
-\tikzstyle{semithick}= [line width=0.6pt]
-\tikzstyle{thick}= [line width=0.8pt]
-\tikzstyle{very thick}= [line width=1.2pt]
-\tikzstyle{ultra thick}= [line width=1.6pt]
-
-\tikzstyle{solid}= [dash pattern=]
-\tikzstyle{dotted}= [dash pattern=on \pgflinewidth off 2pt]
-\tikzstyle{densely dotted}= [dash pattern=on \pgflinewidth off 1pt]
-\tikzstyle{loosely dotted}= [dash pattern=on \pgflinewidth off 4pt]
-\tikzstyle{dashed}= [dash pattern=on 3pt off 3pt]
-\tikzstyle{densely dashed}= [dash pattern=on 3pt off 2pt]
-\tikzstyle{loosely dashed}= [dash pattern=on 3pt off 6pt]
-\tikzstyle{dashdotted}= [dash pattern=on 3pt off 2pt on \the\pgflinewidth off 2pt]
-\tikzstyle{dash dot}= [dash pattern=on 3pt off 2pt on \the\pgflinewidth off 2pt]
-\tikzstyle{densely dashdotted}= [dash pattern=on 3pt off 1pt on \the\pgflinewidth off 1pt]
-\tikzstyle{densely dash dot}= [dash pattern=on 3pt off 1pt on \the\pgflinewidth off 1pt]
-\tikzstyle{loosely dashdotted}= [dash pattern=on 3pt off 4pt on \the\pgflinewidth off 4pt]
-\tikzstyle{loosely dash dot}= [dash pattern=on 3pt off 4pt on \the\pgflinewidth off 4pt]
-\tikzstyle{dashdotdotted}= [dash pattern=on 3pt off 2pt on \the\pgflinewidth off 2pt on \the\pgflinewidth off 2pt]
-\tikzstyle{densely dashdotdotted}= [dash pattern=on 3pt off 1pt on \the\pgflinewidth off 1pt on \the\pgflinewidth off 1pt]
-\tikzstyle{loosely dashdotdotted}= [dash pattern=on 3pt off 4pt on \the\pgflinewidth off 4pt on \the\pgflinewidth off 4pt]
-\tikzstyle{dash dot dot}= [dash pattern=on 3pt off 2pt on \the\pgflinewidth off 2pt on \the\pgflinewidth off 2pt]
-\tikzstyle{densely dash dot dot}= [dash pattern=on 3pt off 1pt on \the\pgflinewidth off 1pt on \the\pgflinewidth off 1pt]
-\tikzstyle{loosely dash dot dot}= [dash pattern=on 3pt off 4pt on \the\pgflinewidth off 4pt on \the\pgflinewidth off 4pt]
-
-
-\tikzstyle{transparent}= [opacity=0]
-\tikzstyle{ultra nearly transparent}=[opacity=0.05]
-\tikzstyle{very nearly transparent}= [opacity=0.1]
-\tikzstyle{nearly transparent}= [opacity=0.25]
-\tikzstyle{semitransparent}= [opacity=0.5]
-\tikzstyle{nearly opaque}= [opacity=0.75]
-\tikzstyle{very nearly opaque}= [opacity=0.9]
-\tikzstyle{ultra nearly opaque}= [opacity=0.95]
-\tikzstyle{opaque}= [opacity=1]
-
-\tikzstyle{at start}= [pos=0]
-\tikzstyle{very near start}= [pos=0.125]
-\tikzstyle{near start}= [pos=0.25]
-\tikzstyle{midway}= [pos=0.5]
-\tikzstyle{near end}= [pos=0.75]
-\tikzstyle{very near end}= [pos=0.875]
-\tikzstyle{at end}= [pos=1]
-
-\tikzstyle{bend at start}= [bend pos=0,bend={+(0,0)}]
-\tikzstyle{bend at end}= [bend pos=1,bend={+(0,0)}]
-
-\tikzstyle{edge from parent}= [draw]
+\tikzset{help lines/.style= {color=gray,line width=0.2pt}}%
+
+\tikzset{every picture/.style= {}}%
+\tikzset{every path/.style= {}}%
+\tikzset{every scope/.style= {}}%
+\tikzset{every plot/.style= {}}%
+\tikzset{every node/.style= {}}%
+\tikzset{every child/.style= {}}%
+\tikzset{every child node/.style= {}}%
+\tikzset{every to/.style= {}}%
+\tikzset{every cell/.style= {}}%
+\tikzset{every matrix/.style= {}}%
+\tikzset{every edge/.style= {draw}}%
+\tikzset{every label/.style= {draw=none,fill=none}}%
+\tikzset{every pin/.style= {draw=none,fill=none}}%
+\tikzset{every pin edge/.style= {help lines}}%
+
+\tikzset{ultra thin/.style= {line width=0.1pt}}%
+\tikzset{very thin/.style= {line width=0.2pt}}%
+\tikzset{thin/.style= {line width=0.4pt}}%
+\tikzset{semithick/.style= {line width=0.6pt}}%
+\tikzset{thick/.style= {line width=0.8pt}}%
+\tikzset{very thick/.style= {line width=1.2pt}}%
+\tikzset{ultra thick/.style= {line width=1.6pt}}%
+
+\tikzset{solid/.style= {dash pattern=}}%
+\tikzset{dotted/.style= {dash pattern=on \pgflinewidth off 2pt}}%
+\tikzset{densely dotted/.style= {dash pattern=on \pgflinewidth off 1pt}}%
+\tikzset{loosely dotted/.style= {dash pattern=on \pgflinewidth off 4pt}}%
+\tikzset{dashed/.style= {dash pattern=on 3pt off 3pt}}%
+\tikzset{densely dashed/.style= {dash pattern=on 3pt off 2pt}}%
+\tikzset{loosely dashed/.style= {dash pattern=on 3pt off 6pt}}%
+\tikzset{dashdotted/.style= {dash pattern=on 3pt off 2pt on \the\pgflinewidth off 2pt}}%
+\tikzset{dash dot/.style= {dash pattern=on 3pt off 2pt on \the\pgflinewidth off 2pt}}%
+\tikzset{densely dashdotted/.style= {dash pattern=on 3pt off 1pt on \the\pgflinewidth off 1pt}}%
+\tikzset{densely dash dot/.style= {dash pattern=on 3pt off 1pt on \the\pgflinewidth off 1pt}}%
+\tikzset{loosely dashdotted/.style= {dash pattern=on 3pt off 4pt on \the\pgflinewidth off 4pt}}%
+\tikzset{loosely dash dot/.style= {dash pattern=on 3pt off 4pt on \the\pgflinewidth off 4pt}}%
+\tikzset{dashdotdotted/.style= {dash pattern=on 3pt off 2pt on \the\pgflinewidth off 2pt on \the\pgflinewidth off 2pt}}%
+\tikzset{densely dashdotdotted/.style= {dash pattern=on 3pt off 1pt on \the\pgflinewidth off 1pt on \the\pgflinewidth off 1pt}}%
+\tikzset{loosely dashdotdotted/.style= {dash pattern=on 3pt off 4pt on \the\pgflinewidth off 4pt on \the\pgflinewidth off 4pt}}%
+\tikzset{dash dot dot/.style= {dash pattern=on 3pt off 2pt on \the\pgflinewidth off 2pt on \the\pgflinewidth off 2pt}}%
+\tikzset{densely dash dot dot/.style= {dash pattern=on 3pt off 1pt on \the\pgflinewidth off 1pt on \the\pgflinewidth off 1pt}}%
+\tikzset{loosely dash dot dot/.style= {dash pattern=on 3pt off 4pt on \the\pgflinewidth off 4pt on \the\pgflinewidth off 4pt}}%
+
+
+\tikzset{transparent/.style= {opacity=0}}%
+\tikzset{ultra nearly transparent/.style={opacity=0.05}}%
+\tikzset{very nearly transparent/.style= {opacity=0.1}}%
+\tikzset{nearly transparent/.style= {opacity=0.25}}%
+\tikzset{semitransparent/.style= {opacity=0.5}}%
+\tikzset{nearly opaque/.style= {opacity=0.75}}%
+\tikzset{very nearly opaque/.style= {opacity=0.9}}%
+\tikzset{ultra nearly opaque/.style= {opacity=0.95}}%
+\tikzset{opaque/.style= {opacity=1}}%
+
+\tikzset{at start/.style= {pos=0}}%
+\tikzset{very near start/.style= {pos=0.125}}%
+\tikzset{near start/.style= {pos=0.25}}%
+\tikzset{midway/.style= {pos=0.5}}%
+\tikzset{near end/.style= {pos=0.75}}%
+\tikzset{very near end/.style= {pos=0.875}}%
+\tikzset{at end/.style= {pos=1}}%
+
+\tikzset{bend at start/.style= {bend pos=0,bend={+(0,0)}}}%
+\tikzset{bend at end/.style= {bend pos=1,bend={+(0,0)}}}%
+
+\tikzset{edge from parent/.style= {draw}}%
+
+
+
+% Animation callbacks
+\tikzset{
+ animate/.code=\tikzerror{You need to say \string\usetikzlibrary{animations} to use animations}
+}
+
+% ID callbacks
+\newif\iftikz@is@node
+\let\tikz@id@hook\pgfutil@empty
+\def\tikz@call@id@hook{\ifx\tikz@id@hook\pgfutil@empty\else\tikz@id@hook\pgfuseid{\tikz@id@name}\fi}%
+
+% RDF stuff
+\let\tikz@clear@rdf@options\relax
+\let\tikz@do@rdf@post@options\relax
+\let\tikz@do@rdf@pre@options\relax
%
% Setting keys
%
-\pgfkeys{/tikz/style/.style=#1}
+\pgfkeys{/tikz/style/.style=#1}%
\pgfkeys{/tikz/.unknown/.code=%
% Is it a pgf key?
- \let\tikz@key\pgfkeyscurrentname%
+ \let\tikz@key\pgfkeyscurrentname%
\pgfkeys{/pgf/\tikz@key/.try={#1}}%
\ifpgfkeyssuccess%
\else%
@@ -1580,7 +1612,7 @@
\edef\tikz@textcolor{\tikz@key}%
\else%
\pgfutil@doifcolorelse{\tikz@key}
- {%
+ {%
\expandafter\tikz@addoption\expandafter{\expandafter\tikz@compat@color@set\expandafter{\tikz@key}}%
\edef\tikz@textcolor{\tikz@key}%
}%
@@ -1594,8 +1626,7 @@
% Ok, third chance: A shape!
\expandafter\ifx\csname pgf@sh@s@\tikz@key\endcsname\relax%
\pgfkeys{/errors/unknown key/.expand
- once=\expandafter{\expandafter/\expandafter t\expandafter
- i\expandafter k\expandafter z\expandafter/\tikz@key}{#1}}%
+ once=\expandafter{\expandafter/\expandafter t\expandafter i\expandafter k\expandafter z\expandafter/\tikz@key}{#1}}%
\else%
\edef\tikz@shape{\tikz@key}%
\fi%
@@ -1603,14 +1634,14 @@
}%
\fi%
\fi%
-}
+}%
\def\tikz@compat@color@set#1{%
\pgfutil@color{#1}\pgfutil@colorlet{pgffillcolor}{#1}%
- \expandafter\let\expandafter\pgf@temp\csname\string\color@pgffillcolor\endcsname
+ \expandafter\let\expandafter\pgf@temp\csname\string\color@pgffillcolor\endcsname%
% for arrow tips:
\global\let\pgf@strokecolor@global=\pgf@temp
\global\let\pgf@fillcolor@global=\pgf@temp
-}
+}%
\def\tikz@startup@env{%
\ifnum\the\catcode`\;=\active\relax\expandafter\let\expandafter\tikz@origsemi\expandafter=\tikz@activesemicolon\fi%
@@ -1620,7 +1651,7 @@
\iftikz@handle@active@code%
\tikz@switchoff@shorthands%
\fi%
-}
+}%
%
% Main TikZ Environment
@@ -1629,7 +1660,7 @@
\def\tikzpicture{%
\begingroup%
\tikz@startup@env%
- \pgfutil@ifnextchar[\tikz@picture{\tikz@picture[]}}%}
+ \tikz@collect@scope@anims\tikz@picture}%
\def\tikz@picture[#1]{%
\pgfpicture%
\let\tikz@atbegin@picture=\pgfutil@empty%
@@ -1643,22 +1674,22 @@
\fi%
\expandafter\tikz@atbegin@picture%
\tikz@lib@scope@check%
-}
+}%
\def\endtikzpicture{%
\tikz@atend@picture%
\global\let\pgf@shift@baseline@smuggle=\pgf@baseline%
\global\let\pgf@trimleft@final@smuggle=\pgf@trimleft%
\global\let\pgf@trimright@final@smuggle=\pgf@trimright%
\global\let\pgf@remember@smuggle=\ifpgfrememberpicturepositiononpage%
- \pgf@remember@layerlist@globally
+ \pgf@remember@layerlist@globally
\endscope%
\let\pgf@baseline=\pgf@shift@baseline@smuggle%
\let\pgf@trimleft=\pgf@trimleft@final@smuggle%
\let\pgf@trimright=\pgf@trimright@final@smuggle%
\let\ifpgfrememberpicturepositiononpage=\pgf@remember@smuggle%
- \pgf@restore@layerlist@from@global
- \endpgfpicture\endgroup}
-
+ \pgf@restore@layerlist@from@global
+ \endpgfpicture\endgroup}%
+
% Inlined picture
%
@@ -1676,108 +1707,128 @@
\def\tikz{%
\begingroup%
\tikz@startup@env%
- \pgfutil@ifnextchar[{\tikz@opt}{\tikz@opt[]}}
-\def\tikz@opt[#1]{\tikzpicture[#1]\pgfutil@ifnextchar\bgroup{\tikz@}{\tikz@@single}}
-\def\tikz@{\bgroup\tikz@auto@end@pathtrue\aftergroup\endtikzpicture\aftergroup\endgroup\let\pgf@temp=}
+ \tikz@collect@scope@anims\tikz@opt}%
+\def\tikz@opt[#1]{\tikzpicture[#1]\pgfutil@ifnextchar\bgroup{\tikz@}{\tikz@@single}}%
+\def\tikz@{\bgroup\tikz@auto@end@pathtrue\aftergroup\endtikzpicture\aftergroup\endgroup\let\pgf@temp=}%
\def\tikz@@single#1{%
\expandafter\ifx\csname tikz@protected@command\string#1\endcsname\relax%
\expandafter\tikz@@%
\else%
\begingroup\def\tikz@path@do@at@end{\endgroup\endtikzpicture\endgroup}%
\fi%
- #1%
-}
-
-\expandafter\let\csname tikz@protected@command\string\draw\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\pattern\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\fill\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\filldraw\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\shade\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\shadedraw\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\clip\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\graph\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\useasboundingbox\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\node\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\coordinate\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\matrix\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\datavisualization\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\path\endcsname\pgfutil@empty
-\expandafter\let\csname tikz@protected@command\string\pic\endcsname\pgfutil@empty
+ #1%
+}%
+
+\expandafter\let\csname tikz@protected@command\string\draw\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\pattern\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\fill\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\filldraw\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\shade\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\shadedraw\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\clip\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\graph\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\useasboundingbox\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\node\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\coordinate\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\matrix\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\datavisualization\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\path\endcsname\pgfutil@empty%
+\expandafter\let\csname tikz@protected@command\string\pic\endcsname\pgfutil@empty%
% Comment by TT: I hope I fixed the \tikz \foreach problem. The new
% version will take a conservative approach and will only do fancy
% stuff when the next keyword after \tikz is one of the following:
-% \draw, \fill, \filldraw, \graph, \matrix,
+% \draw, \fill, \filldraw, \graph, \matrix,
\def\tikz@@{%
\let\tikz@next=\tikz@collectnormalsemicolon%
\ifnum\the\catcode`\;=\active\relax%
\let\tikz@next=\tikz@collectactivesemicolon%
\fi%
- \tikz@next}
+ \tikz@next}%
\def\tikz@collectnormalsemicolon#1;{#1;\endtikzpicture\endgroup}
{
\catcode`\;=\active
\gdef\tikz@collectactivesemicolon#1;{#1;\endtikzpicture\endgroup}
-}
+}%
% End old code
-% Invokes '#1' if the command is invoked withing a tikzpicture and
+% Invokes '#1' if the command is invoked within a tikzpicture and
% '#2' if not.
\def\tikzifinpicture#1#2{%
- \pgfutil@ifundefined{filldraw}{#2}{#1}% TT: This is a wrong
+ \pgfutil@ifundefined{filldraw}{#2}{#1}% TT: This is a wrong
% test! Who uses this?...
}%
+
+\def\tikz@collect@scope@anims#1{%
+ \pgfutil@ifnextchar[#1{#1[]}%]
+}%
+
%
% Environment for scoping graphic state settings
%
-\def\tikz@scope@env{\pgfutil@ifnextchar[\tikz@@scope@env{\tikz@@scope@env[]}}
-\def\tikz@@scope@env[#1]{%
+\def\tikz@scope@env{%
\pgfscope%
\begingroup%
\let\tikz@atbegin@scope=\pgfutil@empty%
\let\tikz@atend@scope=\pgfutil@empty%
\let\tikz@options=\pgfutil@empty%
+ \tikz@clear@rdf@options%
\let\tikz@mode=\pgfutil@empty%
+ \let\tikz@id@name=\pgfutil@empty%
\tikz@transparency@groupfalse%
- \tikzset{every scope/.try,#1}%
+ \tikzset{every scope/.try}%
+ \tikz@collect@scope@anims\tikz@scope@opt%
+}%
+\def\tikz@scope@opt[#1]{%
+ \tikzset{#1}%
\tikz@options%
+ \tikz@do@rdf@pre@options%
\iftikz@transparency@group\expandafter\pgftransparencygroup\expandafter[\tikz@transparency@group@options]\tikz@blend@group\fi%
- \expandafter\tikz@atbegin@scope%
- \tikz@lib@scope@check%
-}
+ \tikz@is@nodefalse%
+ \tikz@call@id@hook%
+ \pgfidscope%
+ \tikz@do@rdf@post@options%
+ \begingroup%
+ \let\tikz@id@name\pgfutil@empty%
+ \expandafter\tikz@atbegin@scope%
+ \expandafter\pgfclearid%
+ \tikz@lib@scope@check%
+}%
\def\endtikz@scope@env{%
- \tikz@atend@scope%
+ \tikz@atend@scope%
+ \endgroup%
+ \endpgfidscope%
\iftikz@transparency@group\endpgftransparencygroup\fi%
\endgroup%
\endpgfscope%
\tikz@lib@scope@check%
-}
+}%
-\def\tikz@scoped{\pgfutil@ifnextchar[{\tikz@scoped@opt}{\tikz@scoped@opt[]}}
-\def\tikz@scoped@opt[#1]{\scope[#1]\pgfutil@ifnextchar\bgroup{\tikz@scoped@}{\tikz@scoped@@single}}
-\def\tikz@scoped@{\bgroup\tikz@auto@end@pathtrue\aftergroup\endscope\let\pgf@temp=}
+\def\tikz@scoped{\tikz@collect@scope@anims\tikz@scoped@opt}%
+\def\tikz@scoped@opt[#1]{\scope[#1]\pgfutil@ifnextchar\bgroup{\tikz@scoped@}{\tikz@scoped@@single}}%
+\def\tikz@scoped@{\bgroup\tikz@auto@end@pathtrue\aftergroup\endscope\let\pgf@temp=}%
\def\tikz@scoped@@single#1{%
\expandafter\ifx\csname tikz@scoped@protected@command\string#1\endcsname\relax%
\expandafter\tikz@scoped@@%
\else%
\begingroup\def\tikz@scoped@path@do@at@end{\endgroup\endscope}%
\fi%
- #1%
-}
+ #1%
+}%
\def\tikz@scoped@@{%
\let\tikz@scoped@next=\tikz@scoped@collectnormalsemicolon%
\ifnum\the\catcode`\;=\active\relax%
\let\tikz@scoped@next=\tikz@scoped@collectactivesemicolon%
\fi%
- \tikz@scoped@next}
+ \tikz@scoped@next}%
\def\tikz@scoped@collectnormalsemicolon#1;{#1;\endscope}
{
\catcode`\;=\active
\gdef\tikz@scoped@collectactivesemicolon#1;{#1;\endscope}
-}
-
+}%
+
% Install a shortcut command which is only valid inside of a
% tikzpicture.
@@ -1788,17 +1839,17 @@
% #1: shortcut command inside of tikzpicture
% #2: real command name
\def\tikzaddtikzonlycommandshortcutlet#1#2{%
- \expandafter\def\expandafter\tikz@installcommands\expandafter{\tikz@installcommands
- \let#1=#2%
- }%
+ \expandafter\def\expandafter\tikz@installcommands\expandafter{\tikz@installcommands
+ \let#1=#2%
+ }%
}%
% Has the same effect as \tikzaddtikzonlycommandshortcutlet but uses
% \def#1{#2} instead of \let.
\def\tikzaddtikzonlycommandshortcutdef#1#2{%
- \expandafter\def\expandafter\tikz@installcommands\expandafter{\tikz@installcommands
- \def#1{#2}%
- }%
+ \expandafter\def\expandafter\tikz@installcommands\expandafter{\tikz@installcommands
+ \def#1{#2}%
+ }%
}%
%
@@ -1836,33 +1887,33 @@
\let\path=\tikz@command@path%
\let\againpath=\tikz@command@againpath%
%
- \def\draw{\path[draw]}
- \def\pattern{\path[pattern]}
- \def\fill{\path[fill]}
- \def\filldraw{\path[fill,draw]}
- \def\shade{\path[shade]}
- \def\shadedraw{\path[shade,draw]}
- \def\clip{\path[clip]}
- \def\graph{\path graph}
- \def\useasboundingbox{\path[use as bounding box]}
- \def\node{\tikz@path@overlay{node}}
- \def\pic{\tikz@path@overlay{pic}}
- \def\coordinate{\tikz@path@overlay{coordinate}}
- \def\matrix{\tikz@path@overlay{node[matrix]}}
- \def\calendar{\tikz@lib@cal@calendar}%
+ \def\draw{\path[draw]}%
+ \def\pattern{\path[pattern]}%
+ \def\fill{\path[fill]}%
+ \def\filldraw{\path[fill,draw]}%
+ \def\shade{\path[shade]}%
+ \def\shadedraw{\path[shade,draw]}%
+ \def\clip{\path[clip]}%
+ \def\graph{\path graph}%
+ \def\useasboundingbox{\path[use as bounding box]}%
+ \def\node{\tikz@path@overlay{node}}%
+ \def\pic{\tikz@path@overlay{pic}}%
+ \def\coordinate{\tikz@path@overlay{coordinate}}%
+ \def\matrix{\tikz@path@overlay{node[matrix]}}%
+ \def\calendar{\tikz@lib@cal@calendar}%
\def\datavisualization{\tikz@lib@datavisualization}%
-}
+}%
\ifx\tikz@lib@cal@calendar\@undefined
-\def\tikz@lib@cal@calendar{\tikzerror{You need to say \string\usetikzlibrary{calendar} to use the \string\calendar{} command}}
+\def\tikz@lib@cal@calendar{\tikzerror{You need to say \string\usetikzlibrary{calendar} to use the \string\calendar{} command}}%
\fi
\ifx\tikz@lib@datavisualization\@undefined
-\def\tikz@lib@datavisualization{\tikzerror{You need to say \string\usetikzlibrary{datavisualization} to use the \string\datavisualization{} command}}
+\def\tikz@lib@datavisualization{\tikzerror{You need to say \string\usetikzlibrary{datavisualization} to use the \string\datavisualization{} command}}%
\fi
\def\tikz@path@overlay#1{%
\let\tikz@signal@path=\tikz@signal@path% for detection at begin of matrix cell
- \pgfutil@ifnextchar<{\tikz@path@overlayed{#1}}{\path #1}}
-\def\tikz@path@overlayed#1<#2>{\path<#2> #1}
+ \pgfutil@ifnextchar<{\tikz@path@overlayed{#1}}{\path #1}}%
+\def\tikz@path@overlayed#1<#2>{\path<#2> #1}%
\def\tikz@uninstallcommands{%
\let\scope=\tikz@origscope%
@@ -1887,18 +1938,18 @@
\let\calendar=\tikz@origcalendar%
\let\datavisualization=\tikz@origdv%
\let\graph=\tikz@origgraph%
-}
+}%
-{
+{%
\catcode`\;=12
- \gdef\tikz@nonactivesemicolon{;}
+ \gdef\tikz@nonactivesemicolon{;}%
\catcode`\:=12
- \gdef\tikz@nonactivecolon{:}
+ \gdef\tikz@nonactivecolon{:}%
\catcode`\|=12
- \gdef\tikz@nonactivebar{|}
+ \gdef\tikz@nonactivebar{|}%
\catcode`\!=12
- \gdef\tikz@nonactiveexlmark{!}
+ \gdef\tikz@nonactiveexlmark{!}%
\catcode`\;=\active
\catcode`\:=\active
\catcode`\|=\active
@@ -1915,8 +1966,8 @@
\def:{\tikz@nonactivecolon}%
\def|{\tikz@nonactivebar}%
\def!{\tikz@nonactiveexlmark}%
- }
-}
+ }%
+}%
\let\tikz@orig@shorthands\pgfutil@empty
\def\tikz@switchoff@shorthands{%
@@ -1950,32 +2001,32 @@
\catcode`\.12\relax%
\catcode`\$3\relax%
\fi%
-}
+}%
% Constructs a path and draws/fills them according to the current
-% settings.
+% settings.
\def\tikz@command@path{%
\let\tikz@signal@path=\tikz@signal@path% for detection at begin of matrix cell
\pgfutil@ifnextchar[{\tikz@check@earg}%]
- {\pgfutil@ifnextchar<{\tikz@doopt}{\tikz@@command@path}}}
+ {\pgfutil@ifnextchar<{\tikz@doopt}{\tikz@@command@path}}}%
\def\tikz@signal@path{\tikz@signal@path}%
\def\tikz@check@earg[#1]{%
\pgfutil@ifnextchar<{\tikz@swap@args[#1]}{\tikz@@command@path[#1]}}
-\def\tikz@swap@args[#1]<#2>{\tikz@command@path<#2>[#1]}
+\def\tikz@swap@args[#1]<#2>{\tikz@command@path<#2>[#1]}%
\def\tikz@doopt{%
\let\tikz@next=\tikz@eargnormalsemicolon%
\ifnum\the\catcode`\;=\active\relax%
\let\tikz@next=\tikz@eargactivesemicolon%
\fi%
- \tikz@next}
-\long\def\tikz@eargnormalsemicolon<#1>#2;{\alt<#1>{\tikz@@command@path#2;}{\tikz@path@do@at@end}}
+ \tikz@next}%
+\long\def\tikz@eargnormalsemicolon<#1>#2;{\alt<#1>{\tikz@@command@path#2;}{\tikz@path@do@at@end}}%
{
\catcode`\;=\active
- \long\global\def\tikz@eargactivesemicolon<#1>#2;{\alt<#1>{\tikz@@command@path#2;}{\tikz@path@do@at@end}}
+ \long\global\def\tikz@eargactivesemicolon<#1>#2;{\alt<#1>{\tikz@@command@path#2;}{\tikz@path@do@at@end}}%
}
\def\tikz@@command@path{%
@@ -1985,6 +2036,7 @@
\setbox\tikz@figbox@bg=\box\pgfutil@voidb@x%
\let\tikz@path@do@at@end=\tikz@lib@scope@check%
\let\tikz@options=\pgfutil@empty%
+ \tikz@clear@rdf@options%
\let\tikz@mode=\pgfutil@empty%
\let\tikz@moveto@waiting=\relax%
\let\tikz@timer=\relax%
@@ -2004,53 +2056,54 @@
\tikz@lastysaved=0pt%
\tikzset{every path/.try}%
\tikz@scan@next@command%
-}
+}%
\def\tikz@scan@next@command{%
\ifx\tikz@collected@onpath\pgfutil@empty%
\else%
\tikz@invoke@collected@onpath%
\fi%
\afterassignment\tikz@handle\let\pgf@let@token=%
-}
+}%
\newcount\tikz@expandcount
+\let\tikz@collected@onpath=\pgfutil@empty%
% Central dispatcher for commands
\def\tikz@handle{%
- \let\@next=\tikz@expand%
+ \let\pgfutil@next=\tikz@expand%
\ifx\pgf@let@token(%)
- \let\@next=\tikz@movetoabs%
+ \let\pgfutil@next=\tikz@movetoabs%
\else%
\ifx\pgf@let@token+%
- \let\@next=\tikz@movetorel%
+ \let\pgfutil@next=\tikz@movetorel%
\else%
\ifx\pgf@let@token-%
- \let\@next=\tikz@lineto%
+ \let\pgfutil@next=\tikz@lineto%
\else%
\ifx\pgf@let@token.%
- \let\@next=\tikz@dot%
+ \let\pgfutil@next=\tikz@dot%
\else%
\ifx\pgf@let@token r%
- \let\@next=\tikz@rect%
+ \let\pgfutil@next=\tikz@rect%
\else%
\ifx\pgf@let@token n%
- \let\@next=\tikz@fig%
+ \let\pgfutil@next=\tikz@fig%
\else%
\ifx\pgf@let@token[%]
- \let\@next=\tikz@parse@options%
+ \let\pgfutil@next=\tikz@parse@options%
\else%
\ifx\pgf@let@token c%
- \let\@next=\tikz@cchar%
+ \let\pgfutil@next=\tikz@cchar%
\else%
\ifx\pgf@let@token\bgroup%
- \let\@next=\tikz@beginscope%
+ \let\pgfutil@next=\tikz@beginscope%
\else%
\ifx\pgf@let@token\egroup%
- \let\@next=\tikz@endscope%
+ \let\pgfutil@next=\tikz@endscope%
\else%
\ifx\pgf@let@token;%
- \let\@next=\tikz@finish%
+ \let\pgfutil@next=\tikz@finish%
\else%
- \let\@next=\tikz@handle@more%
+ \let\pgfutil@next=\tikz@handle@more%
\fi%
\fi%
\fi%
@@ -2062,72 +2115,76 @@
\fi%
\fi%
\fi%
- \@next%
-}
+ \pgfutil@next%
+}%
% Continued...
\def\tikz@handle@more{%
\ifx\pgf@let@token a%
- \let\@next=\tikz@arcA%
+ \let\pgfutil@next=\tikz@a@char%
\else%
\ifx\pgf@let@token e%
- \let\@next=\tikz@e@char%
+ \let\pgfutil@next=\tikz@e@char%
\else%
\ifx\pgf@let@token g%
- \let\@next=\tikz@g@char%
+ \let\pgfutil@next=\tikz@g@char%
\else%
\ifx\pgf@let@token s%
- \let\@next=\tikz@schar%
+ \let\pgfutil@next=\tikz@schar%
\else%
\ifx\pgf@let@token |%
- \let\@next=\tikz@vh@lineto%
+ \let\pgfutil@next=\tikz@vh@lineto%
\else%
\ifx\pgf@let@token p%
- \let\@next=\tikz@pchar%
+ \let\pgfutil@next=\tikz@pchar%
\pgfsetmovetofirstplotpoint%
\else%
\ifx\pgf@let@token t%
- \let\@next=\tikz@to%
+ \let\pgfutil@next=\tikz@to%
\else%
\ifx\pgf@let@token\pgfextra%
- \let\@next=\tikz@extra%
+ \let\pgfutil@next=\tikz@extra%
\else%
\ifx\pgf@let@token\foreach%
- \let\@next=\tikz@foreach%
+ \let\pgfutil@next=\tikz@foreach%
\else%
\ifx\pgf@let@token f%
- \let\@next=\tikz@fchar%
+ \let\pgfutil@next=\tikz@fchar%
\else%
\ifx\pgf@let@token\pgf@stop%
- \let\@next=\relax%
+ \let\pgfutil@next=\relax%
\else%
\ifx\pgf@let@token\par%
- \let\@next=\tikz@scan@next@command%
+ \let\pgfutil@next=\tikz@scan@next@command%
\else%
\ifx\pgf@let@token d%
- \let\@next=\tikz@decoration%
+ \let\pgfutil@next=\tikz@decoration%
\else%
\ifx\pgf@let@token l%
- \let\@next=\tikz@l@char%\tikz@let@command%
+ \let\pgfutil@next=\tikz@l@char%
\else%
- \let\@next=\tikz@expand%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
+ \ifx\pgf@let@token:%
+ \let\pgfutil@next=\tikz@colon@char%
+ \else%
+ \let\pgfutil@next=\tikz@expand%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
\fi%
\fi%
\fi%
\fi%
- \ifx\@next\tikz@expand\else\tikz@expandcount=100\relax\fi%
- \@next%
-}
+ \ifx\pgfutil@next\tikz@expand\else\tikz@expandcount=100\relax\fi%
+ \pgfutil@next%
+}%
\def\tikz@l@char{%
\pgfutil@ifnextchar e{\tikz@let@command}{%
@@ -2135,54 +2192,56 @@
\pgfutil@ifnextchar-{\tikz@@lsystem}{\tikz@expand}%
}%
}%
-}
+}%
\def\tikz@lsystem{%
\tikzerror{You need to say \string\usetikzlibrary{lindenmayersystems} to draw Lindenmayer systems}
-}
+}%
\def\tikz@@lsystem{%
\tikzerror{You need to say \string\usetikzlibrary{lindenmayersystems} to draw L-systems}
-}
+}%
-\def\tikz@pchar{\pgfutil@ifnextchar l{\tikz@plot}{\pgfutil@ifnextchar i{\tikz@subpicture}{\tikz@parabola}}}
+\def\tikz@pchar{\pgfutil@ifnextchar l{\tikz@plot}{\pgfutil@ifnextchar i{\tikz@subpicture}{\tikz@parabola}}}%
\def\tikz@cchar{%
\pgfutil@ifnextchar i{\tikz@circle}%
{\pgfutil@ifnextchar h{\tikz@children}{\tikz@cochar}}}%
\def\tikz@cochar o{%
- \pgfutil@ifnextchar o{\tikz@coordinate}{\tikz@cosine}}
+ \pgfutil@ifnextchar o{\tikz@coordinate}{\tikz@cosine}}%
\def\tikz@e@char{%
\pgfutil@ifnextchar l{\tikz@ellipse}{\tikz@@e@char}}%
+\def\tikz@a@char{%
+ \pgfutil@ifnextchar r{\tikz@arcA}{\tikzerror{Arc expected}}}%
\def\tikz@@e@char dge{%
\pgfutil@ifnextchar f{\tikz@edgetoparent}{\tikz@edge@plain}}%
-\def\tikz@schar{\pgfutil@ifnextchar i{\tikz@sine}{\tikz@svg@path}}
+\def\tikz@schar{\pgfutil@ifnextchar i{\tikz@sine}{\tikz@svg@path}}%
-\def\tikz@g@char r{\pgfutil@ifnextchar i{\tikz@grid}{\tikz@graph}}
+\def\tikz@g@char r{\pgfutil@ifnextchar i{\tikz@grid}{\tikz@graph}}%
% svg syntax
% svg[options] {...}
\def\tikz@svg@path{%
\tikzerror{You need to say \string\usetikzlibrary{svg.path} to use the svg path command}
-}
+}%
\def\tikz@finish{%
- % Rendering pipeline
- %
+ % Rendering pipeline
+ %
% Step 1: The path background box
%
\box\tikz@figbox@bg%
- %
+ %
% Step 2: Decorate path
- %
+ %
\iftikz@decoratepath%
\tikz@lib@dec@decorate@path%
\fi%
- %
+ %
% Step 3: Preactions
- %
+ %
\pgfsyssoftpath@getcurrentpath\tikz@actions@path%
\edef\tikz@restorepathsize{%
\global\pgf@pathmaxx=\the\pgf@pathmaxx%
@@ -2238,8 +2297,8 @@
\tikz@mode@fade@scopefalse%
\fi%
%
- % Step 3: Setup options
- %
+ % Step 5': Setup options
+ %
\ifx\tikz@options\pgfutil@empty%
\else%
\pgfsys@beginscope%
@@ -2248,7 +2307,18 @@
\begingroup%
\tikz@options%
\fi%
- %
+ \tikz@do@rdf@pre@options%
+ %
+ % Step 5'': Setup animations
+ %
+ \tikz@is@nodefalse%
+ \tikz@call@id@hook%
+ \iftikz@mode@clip\else%
+ \pgfidscope%
+ \tikz@do@rdf@post@options%
+ \begingroup%
+ \fi% open an animation scope here, unless clipping is done
+ %
% Step 6: Do a fill if shade or a path picture follows.
%
\iftikz@mode@fill%
@@ -2257,7 +2327,10 @@
\pgfprocessround{\tikz@temppath}{\tikz@temppath}% change the path
\pgfsyssoftpath@setcurrentpath\tikz@temppath%
\pgfsyssoftpath@invokecurrentpath%
+ \pgfpushtype%
+ \pgfusetype{.path fill}%
\pgfsys@fill%
+ \pgfpoptype%
\tikz@mode@fillfalse% no more filling...
\else%
\ifx\tikz@path@picture\pgfutil@empty%
@@ -2266,28 +2339,38 @@
\pgfprocessround{\tikz@temppath}{\tikz@temppath}% change the path
\pgfsyssoftpath@setcurrentpath\tikz@temppath%
\pgfsyssoftpath@invokecurrentpath%
+ \pgfpushtype%
+ \pgfusetype{.path fill}%
\pgfsys@fill%
+ \pgfpoptype%
\tikz@mode@fillfalse% no more filling...
\fi%
\fi%
\fi%
- %
+ %
% Step 7: Do a shade if necessary.
%
\iftikz@mode@shade%
\pgfsyssoftpath@getcurrentpath\tikz@temppath
\pgfprocessround{\tikz@temppath}{\tikz@temppath}% change the path
\pgfsyssoftpath@setcurrentpath\tikz@temppath%
+ \pgfpushtype%
+ \pgfusetype{.path shade}%
\pgfshadepath{\tikz@shading}{\tikz@shade@angle}%
+ \pgfpoptype%
\tikz@mode@shadefalse% no more shading...
\fi%
- %
+ %
% Step 8: Do a path picture if necessary.
%
\ifx\tikz@path@picture\pgfutil@empty%
\else%
\begingroup%
+ \pgfusetype{.path picture}%
+ \pgfidscope%
\pgfsys@beginscope%
+ \let\tikz@id@name\pgfutil@empty%
+ \pgfclearid%
\pgfsyssoftpath@getcurrentpath\tikz@temppath
\pgfprocessround{\tikz@temppath}{\tikz@temppath}% change the path
\pgfsyssoftpath@setcurrentpath\tikz@temppath%
@@ -2302,14 +2385,15 @@
}
\expandafter\def\csname pgf@sh@nt@path picture bounding box\endcsname{{1}{0}{0}{1}{0pt}{0pt}}
\expandafter\def\csname pgf@sh@pi@path picture bounding box\endcsname{\pgfpictureid}
- \pgfinterruptpath%
+ \pgfinterruptpath%
\tikz@path@picture%
\endpgfinterruptpath%
\pgfsys@endscope%
+ \endpgfidscope%
\endgroup%
- \let\tikz@path@picture=\pgfutil@empty%
+ \let\tikz@path@picture=\pgfutil@empty%
\fi%
- %
+ %
% Step 9: Double stroke, if necessary
%
\iftikz@mode@draw%
@@ -2320,17 +2404,20 @@
\tikz@double@setup%
\fi%
\fi%
- %
+ %
% Step 10: Do stroke/fill/clip as needed
%
+ \pgfpushtype%
\edef\tikz@temp{\noexpand\pgfusepath{%
\iftikz@mode@fill fill,\fi%
\iftikz@mode@draw draw,\fi%
\iftikz@mode@clip clip\fi%
}}%
+ \pgfusetype{.path}%
\tikz@temp%
+ \pgfpoptype%
\tikz@mode@fillfalse% no more filling
- %
+ %
% Step 11: Double stroke, if necessary
%
\iftikz@mode@draw%
@@ -2344,11 +2431,15 @@
% Step 12: Postactions
%
\tikz@postactions%
- %
+ %
% Step 13: Add labels and nodes
%
\box\tikz@figbox%
%
+ % Step 14: Close animations
+ %
+ \iftikz@mode@clip\else\endgroup\endpgfidscope\fi%
+ %
% Step 14: Close option brace
%
\ifx\tikz@options\pgfutil@empty%
@@ -2370,9 +2461,10 @@
\endgroup%
\global\pgflinewidth=\tikzscope@linewidth%
\tikz@path@do@at@end%
-}
+}%
\let\tikz@lib@scope@check\pgfutil@empty% this is a hook for the scopes library
-\def\tikz@path@do@at@end{\tikz@lib@scope@check}
+\def\tikz@path@do@at@end{\tikz@lib@scope@check}%
+\def\tikz@@pathtext{@path}%
\def\pgf@outer@auto@adjust@hook{%
{%
@@ -2380,11 +2472,11 @@
\tikz@mode%
\expandafter%
}%
- \iftikz@mode@draw\else%xxx
+ \iftikz@mode@draw\else%
\pgfkeyslet{/pgf/outer xsep}\pgf@zero@text
\pgfkeyslet{/pgf/outer ysep}\pgf@zero@text
\fi%
-}
+}%
% Extra actions
@@ -2398,7 +2490,7 @@
\tikz@restorepathsize%
\pgfsys@endscope%
}%
-}
+}%
\def\tikz@extra@postaction#1{%
{%
@@ -2410,36 +2502,36 @@
\pgf@resetpathsizes%
\pgfsys@endscope%
}%
-}
+}%
-\def\tikz@skip#1{\tikz@scan@next@command#1}
+\def\tikz@skip#1{\tikz@scan@next@command#1}%
\def\tikz@expand{%
\advance\tikz@expandcount by -1%
\ifnum\tikz@expandcount<0\relax%
\tikzerror{Giving up on this path. Did you forget a semicolon?}%
- \let\@next=\tikz@finish%
+ \let\pgfutil@next=\tikz@finish%
\else%
- \let\@next=\tikz@@expand
+ \let\pgfutil@next=\tikz@@expand
\fi%
- \@next}
+ \pgfutil@next}%
\def\tikz@@expand{%
- \expandafter\tikz@scan@next@command\pgf@let@token}
+ \expandafter\tikz@scan@next@command\pgf@let@token}%
-% Syntax for scopes:
+% Syntax for scopes:
% {scoped path commands}
\newif\iftikz@auto@end@path
-\def\tikz@beginscope{\begingroup\tikz@auto@end@pathfalse\tikz@scan@next@command}
+\def\tikz@beginscope{\begingroup\tikz@auto@end@pathfalse\tikz@scan@next@command}%
\def\tikz@endscope{%
\iftikz@auto@end@path\expandafter\tikz@finish\expandafter\egroup\else\expandafter\tikz@@endscope\fi%
-}
-\def\tikz@@endscope{%
+}%
+\def\tikz@@endscope{%
\global\setbox\tikz@tempbox=\box\tikz@figbox%
\global\setbox\tikz@tempbox@bg=\box\tikz@figbox@bg%
\global\let\tikz@tangent@temp\tikz@tangent%
@@ -2468,24 +2560,24 @@
\setbox\tikz@figbox=\box\tikz@tempbox%
\setbox\tikz@figbox@bg=\box\tikz@tempbox@bg%
\let\tikz@tangent\tikz@tangent@temp%
- \tikz@scan@next@command}
+ \tikz@scan@next@command}%
-% Syntax for pgfextra:
+% Syntax for pgfextra:
% \pgfextra {normal tex text}
% \pgfextra normal tex text \endpgfextra
-\def\tikz@extra{\pgfutil@ifnextchar\bgroup\tikz@@extra\relax}
-\long\def\tikz@@extra#1{#1\tikz@scan@next@command}
+\def\tikz@extra{\pgfutil@ifnextchar\bgroup\tikz@@extra\relax}%
+\long\def\tikz@@extra#1{#1\tikz@scan@next@command}%
\let\endpgfextra=\tikz@scan@next@command
-\def\pgfextra{pgfextra}
+\def\pgfextra{pgfextra}%
% Syntax for foreach:
%
% foreach \var in {list} {path text}
-%
+%
% or
%
% \foreach \var in {list} {path text}
@@ -2494,7 +2586,7 @@
%
% \draw (0,0) \foreach \x in {1,2,3} {-- (\x,0) circle (1cm)} -- (5,5);
-\def\tikz@fchar oreach{\tikz@foreach}
+\def\tikz@fchar oreach{\tikz@foreach}%
\def\tikz@foreach{%
\def\pgffor@beginhook{%
@@ -2530,10 +2622,10 @@
\xdef\tikz@foreach@save@lasty{\the\tikz@lasty}%
\xdef\tikz@foreach@save@lastxsaved{\the\tikz@lastxsaved}%
\xdef\tikz@foreach@save@lastysaved{\the\tikz@lastysaved}%
- \foreach}
+ \foreach}%
+
-
-% Syntax for againpath:
+% Syntax for againpath:
% \againpath \somepathname
\def\tikz@command@againpath#1{%
@@ -2541,27 +2633,34 @@
\pgfsyssoftpath@getcurrentpath\tikz@temp%
\expandafter\pgfutil@g@addto@macro\expandafter\tikz@temp\expandafter{#1}%
\pgfsyssoftpath@setcurrentpath\tikz@temp%
- }
-}
+ }%
+}%
+
+% animation syntax
+% :attribute = {...}
+
+\def\tikz@colon@char#1=#2{%
+ \tikz@scan@next@command{[animate={myself:{#1}={#2}}]}%
+}%
%
% When this if is set, a just-scanned point is a shape and its border
% position still needs to be determined, depending on subsequent
-% commands.
+% commands.
%
\newif\iftikz@shapeborder
-% Syntax for moveto:
+% Syntax for moveto:
% <point>
-\def\tikz@movetoabs{\tikz@moveto(}
-\def\tikz@movetorel{\tikz@moveto+}
+\def\tikz@movetoabs{\tikz@moveto(}%
+\def\tikz@movetorel{\tikz@moveto+}%
\def\tikz@moveto{%
- \tikz@scan@one@point{\tikz@@moveto}}
+ \tikz@scan@one@point{\tikz@@moveto}}%
\def\tikz@@moveto#1{%
\tikz@make@last@position{#1}%
\iftikz@shapeborder%
@@ -2573,7 +2672,7 @@
\let\tikz@moveto@waiting=\relax%
\fi%
\tikz@scan@next@command%
-}
+}%
\let\tikz@moveto@waiting=\relax % normally, nothing is waiting...
@@ -2583,7 +2682,7 @@
\pgfpathmoveto{\tikz@last@position}%
\fi%
\let\tikz@moveto@waiting=\relax%
-}
+}%
\def\tikz@flush@moveto@toward#1#2#3{%
@@ -2600,22 +2699,22 @@
\pgfpathmoveto{\pgfqpoint{\pgf@x}{\pgf@y}}%
\fi%
\let\tikz@moveto@waiting=\relax%
-}
+}%
%
-% Collecting labels on the path
+% Collecting labels on the path
%
\def\tikz@collect@coordinate@onpath#1c{%
- \pgfutil@ifnextchar y{\tikz@cycle@expander@add#1}{\tikz@collect@coordinate@onpath@{#1}}}
+ \pgfutil@ifnextchar y{\tikz@cycle@expander@add#1}{\tikz@collect@coordinate@onpath@{#1}}}%
\def\tikz@collect@coordinate@onpath@#1oordinate{%
- \pgfutil@ifnextchar[{\tikz@@collect@coordinate@opt#1}{\tikz@@collect@coordinate@opt#1[]}}%}
+ \pgfutil@ifnextchar[{\tikz@@collect@coordinate@opt#1}{\tikz@@collect@coordinate@opt#1[]}}%}%
\def\tikz@@collect@coordinate@opt#1[#2]{%
\pgfutil@ifnextchar({\tikz@@collect@coordinate#1[#2]}{%
- \tikz@collect@label@onpath#1node[shape=coordinate,#2]{}}}%}
+ \tikz@collect@label@onpath#1node[shape=coordinate,#2]{}}}%}%
\def\tikz@@collect@coordinate#1[#2](#3){%
- \tikz@collect@label@onpath#1node[shape=coordinate,#2](#3){}}
+ \tikz@collect@label@onpath#1node[shape=coordinate,#2](#3){}}%
\newif\iftikz@collect@pic
@@ -2623,43 +2722,48 @@
\expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath node}%
\let\tikz@collect@cont#1%
\tikz@collect@picfalse%
- \tikz@collect@label@scan}
+ \tikz@collect@label@scan}%
\def\tikz@collect@pic@onpath#1pic{%
\expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath pic}%
\let\tikz@collect@cont#1
\tikz@collect@pictrue%
- \tikz@collect@label@scan}
+ \tikz@collect@label@scan}%
-\def\tikz@collect@label@scan{%
+\def\tikz@collect@label@scan{%
\pgfutil@ifnextchar f{\tikz@collect@nodes}{%
\pgfutil@ifnextchar({\tikz@collect@paran}%
{\pgfutil@ifnextchar[{\tikz@collect@options}%
- {\pgfutil@ifnextchar\bgroup{\tikz@collect@arg}%
- {\tikz@collect@cont}}}}%
-}%}}
+ {\pgfutil@ifnextchar:{\tikz@collect@animation}%
+ {\pgfutil@ifnextchar\bgroup{\tikz@collect@arg}%
+ {\tikz@collect@cont}}}}}%
+}%}}%
\def\tikz@collect@nodes foreach#1in{%
\expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath foreach#1in}%
\pgfutil@ifnextchar\bgroup\tikz@collect@nodes@group\tikz@collect@nodes@one%
-}
+}%
\def\tikz@collect@nodes@one#1{%
- \expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath #1}%
+ \expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath #1}%
\tikz@collect@label@scan%
-}
+}%
\def\tikz@collect@nodes@group#1{%
- \expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath{#1}}%
+ \expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath{#1}}%
\tikz@collect@label@scan%
-}
+}%
+\def\tikz@collect@animation#1=#2{%
+ \expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath#1={#2}}%
+ \tikz@collect@label@scan%
+}%
\def\tikz@collect@paran#1){%
\expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath#1)}%
\tikz@collect@label@scan%
-}
+}%
\def\tikz@collect@options#1]{%
\expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath#1]}%
\tikz@collect@label@scan%
-}
+}%
\def\tikz@collect@arg#1{%
\iftikz@handle@active@nodes%
\iftikz@collect@pic%
@@ -2671,7 +2775,7 @@
\expandafter\def\expandafter\tikz@collected@onpath\expandafter{\tikz@collected@onpath{#1}}%
\fi%
\tikz@collect@cont%
-}
+}%
\def\tikz@invoke@collected@onpath{%
\tikz@node@is@a@labeltrue%
@@ -2679,37 +2783,37 @@
\let\tikz@collected@onpath=\pgfutil@empty%
\expandafter\tikz@scan@next@command\tikz@temp\pgf@stop%
\tikz@node@is@a@labelfalse%
-}
+}%
%
% Macros for the cycle command
%
-\def\tikz@cycle@expander#1{\pgfutil@ifnextchar c{\tikz@cycle@expander@{#1}}{#1}}
-\def\tikz@cycle@expander@#1c{\pgfutil@ifnextchar y{\tikz@cycle@expander@add{#1}}{#1c}}
-\def\tikz@cycle@expander@add#1ycle{#1(current subpath start)--cycle}
+\def\tikz@cycle@expander#1{\pgfutil@ifnextchar c{\tikz@cycle@expander@{#1}}{#1}}%
+\def\tikz@cycle@expander@#1c{\pgfutil@ifnextchar y{\tikz@cycle@expander@add{#1}}{#1c}}%
+\def\tikz@cycle@expander@add#1ycle{#1(current subpath start)--cycle}%
-% Syntax for lineto:
+% Syntax for lineto:
% -- <point>
\def\tikz@lineto{%
\pgfutil@ifnextchar |%
{\expandafter\tikz@hv@lineto\pgfutil@gobble}%
{\expandafter\pgfutil@ifnextchar\tikz@activebar{\expandafter\tikz@hv@lineto\pgfutil@gobble}%
- {\expandafter\tikz@lineto@mid\pgfutil@gobble}}}
+ {\expandafter\tikz@lineto@mid\pgfutil@gobble}}}%
\def\tikz@lineto@mid{%
\pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@lineto@mid}%
{%
\pgfutil@ifnextchar c{\tikz@close}{%
- \pgfutil@ifnextchar p{\tikz@lineto@plot@or@pic}{\tikz@scan@one@point{\tikz@@lineto}}}}}
+ \pgfutil@ifnextchar p{\tikz@lineto@plot@or@pic}{\tikz@scan@one@point{\tikz@@lineto}}}}}%
\def\tikz@lineto@plot@or@pic p{%
\pgfutil@ifnextchar i{\tikz@collect@pic@onpath\tikz@lineto@mid p}{%
\pgfsetlinetofirstplotpoint\tikz@plot}%
-}
+}%
\def\tikz@@lineto#1{%
% Record the starting point for later labels on the path:
\edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}
@@ -2721,7 +2825,7 @@
\tikz@path@lineto{\tikz@last@position}%
\edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
\tikz@make@last@position{#1}%
- \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
+ \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
\else%
% target is a reasonable point...
% Record the starting point for later labels on the path:
@@ -2733,7 +2837,7 @@
\let\tikz@timer=\tikz@timer@line%
\let\tikz@tangent\tikz@timer@start%
\tikz@scan@next@command%
-}
+}%
% snake or lineto?
\def\tikz@path@lineto#1{%
@@ -2745,7 +2849,7 @@
\else%
\pgfpathlineto{#1}%
\fi%
-}
+}%
% snake or lineto?
\def\tikz@path@close#1{%
@@ -2756,17 +2860,17 @@
}%
\fi%
\pgfpathclose%
-}
+}%
-% Syntax for lineto horizontal/vertical:
+% Syntax for lineto horizontal/vertical:
% -| <point>
\def\tikz@hv@lineto{%
\pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@hv@lineto}{
\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikz@hv@lineto}%
{\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@hv@lineto}%
- {\tikz@scan@one@point{\tikz@@hv@lineto}}}}}
+ {\tikz@scan@one@point{\tikz@@hv@lineto}}}}}%
\def\tikz@@hv@lineto#1{%
\edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
\pgf@yc=\tikz@lasty%
@@ -2783,7 +2887,7 @@
\xdef\tikz@timer@end@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% move out of group
}%
\let\tikz@timer@end=\tikz@timer@end@temp%
- \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
+ \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
\else%
\tikz@path@lineto{\pgfqpoint{\tikz@lastx}{\pgf@yc}}%
\tikz@path@lineto{\tikz@last@position}%
@@ -2791,17 +2895,17 @@
\fi%
\let\tikz@timer=\tikz@timer@hvline%
\tikz@scan@next@command%
-}
+}%
-% Syntax for lineto vertical/horizontal:
+% Syntax for lineto vertical/horizontal:
% |- <point>
-\def\tikz@vh@lineto-{\tikz@vh@lineto@next}
+\def\tikz@vh@lineto-{\tikz@vh@lineto@next}%
\def\tikz@vh@lineto@next{%
\pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@vh@lineto@next}{%
\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikz@vh@lineto@next}%
{\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@vh@lineto@next}%
- {\tikz@scan@one@point\tikz@@vh@lineto}}}}
+ {\tikz@scan@one@point\tikz@@vh@lineto}}}}%
\def\tikz@@vh@lineto#1{%
\edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
\pgf@xc=\tikz@lastx%
@@ -2818,7 +2922,7 @@
\xdef\tikz@timer@end@temp{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}% move out of group
}%
\let\tikz@timer@end=\tikz@timer@end@temp%
- \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
+ \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
\else%
\tikz@path@lineto{\pgfqpoint{\pgf@xc}{\tikz@lasty}}%
\tikz@path@lineto{\tikz@last@position}%
@@ -2826,9 +2930,9 @@
\fi%
\let\tikz@timer=\tikz@timer@vhline%
\tikz@scan@next@command%
-}
+}%
-% Syntax for cycle:
+% Syntax for cycle:
% -- cycle
\def\tikz@close c{%
\pgfutil@ifnextchar o{\tikz@collect@coordinate@onpath\tikz@lineto@mid c}% oops, a coordinate
@@ -2843,39 +2947,53 @@
\let\tikz@timer=\tikz@timer@line%
\let\tikz@tangent\tikz@timer@start%
\tikz@scan@next@command%
-}
+}%
-% Syntax for options:
+% Syntax for options:
% [options]
\def\tikz@parse@options#1]{%
\tikzset{#1}%
\tikz@scan@next@command%
-}
+}%
% Syntax for edges:
% edge [options] (coordinate)
% edge [options] node {node text} (coordinate)
+% edge :attribute={...} [options] node {node text} (coordinate)
\def\tikz@edge@plain{%
\begingroup%
\ifx\tikz@to@use@whom\pgfutil@undefined\else\tikz@to@use@whom\fi
\let\tikz@to@or@edge@function=\tikz@do@edge%
- \tikz@to@or@edge}
+ \let\tikz@@to@local@options\pgfutil@empty%
+ \let\tikz@collected@onpath=\pgfutil@empty%
+ \tikz@to@or@edge}%
% Syntax for to paths:
% to [options] (coordinate)
% to [options] node {node text} (coordinate)
+% to :attribute={...} [options] node {node text} (coordinate)
\def\tikz@to o{%
\tikz@to@use@last@coordinate%
\let\tikz@to@or@edge@function=\tikz@do@to%
- \tikz@to@or@edge}
-
-\def\tikz@to@or@edge{\pgfutil@ifnextchar[\tikz@@to@or@edge{\tikz@@to@or@edge[]}}%}
-\def\tikz@@to@or@edge[#1]{%
- \def\tikz@@to@local@options{#1}%
+ \let\tikz@@to@local@options\pgfutil@empty%
\let\tikz@collected@onpath=\pgfutil@empty%
- \tikz@@to@collect%
-}
+ \tikz@to@or@edge}%
+
+\def\tikz@to@or@edge{%
+ \pgfutil@ifnextchar[{\tikz@to@or@edge@option}{%
+ \pgfutil@ifnextchar:{\tikz@to@or@edge@animation}{%
+ \tikz@@to@collect}}%]
+}%
+\def\tikz@to@or@edge@option[#1]{%
+ \expandafter\def\expandafter\tikz@@to@local@options\expandafter{\tikz@@to@local@options,#1}%
+ \tikz@to@or@edge%
+}%
+\def\tikz@to@or@edge@animation:#1=#2{%
+ \expandafter\def\expandafter\tikz@@to@local@options\expandafter{\tikz@@to@local@options,%
+ animate={myself:{#1}={#2}}}%
+ \tikz@to@or@edge%
+}%
\def\tikz@@to@collect{%
\pgfutil@ifnextchar(\tikz@@to@or@edge@coordinate%)
{\pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@@to@collect}%
@@ -2884,7 +3002,7 @@
{\pgfutil@ifnextchar +{\tikz@scan@one@point\tikz@@to@or@edge@math}%
{\tikzerror{(, +, coordinate, pic, or node expected}%)
\tikz@@to@or@edge@coordinate()}}}}}%
-}
+}%
\def\tikz@@to@or@edge@coordinate({%
\pgfutil@ifnextchar${%$
@@ -2897,17 +3015,17 @@
\tikz@@to@or@edge@@coordinate(%
}%
}%
-}
-\def\tikz@@to@or@edge@math#1{%
+}%
+\def\tikz@@to@or@edge@math#1{%
\pgf@process{#1}%
\edef\tikztotarget{\the\pgf@x,\the\pgf@y}%
\tikz@to@or@edge@function%
-}
+}%
\def\tikz@@to@or@edge@@coordinate(#1){%
\def\tikztotarget{#1}%
\tikz@to@or@edge@function%
-}
+}%
\def\tikz@do@edge{%
\ifx\tikz@edge@macro\pgfutil@empty%
@@ -2919,10 +3037,14 @@
\pgfscope%
\let\tikz@transform=\pgfutil@empty%
\let\tikz@options=\pgfutil@empty%
+ \tikz@clear@rdf@options%
\let\tikz@tonodes=\tikz@collected@onpath%
\def\tikztonodes{{\pgfextra{\tikz@node@is@a@labeltrue}\tikz@tonodes}}%
\let\tikz@collected@onpath=\pgfutil@empty%
\tikz@options%
+ \tikz@do@rdf@pre@options%
+ \pgfidscope%
+ \tikz@do@rdf@post@options%
\tikz@transform%
\let\tikz@transform=\relax%
% Typeset node:
@@ -2932,6 +3054,7 @@
\path[style=every edge]\expandafter[\tikz@@to@local@options](\tikztostart)\tikz@to@path
\pgfextra{\global\let\tikz@after@path@smuggle=\tikz@after@path};%
\tikz@atend@to%
+ \endpgfidscope%
\endpgfscope%
\endpgfinterruptpath%
\egroup
@@ -2939,15 +3062,15 @@
\egroup%
\global\setbox\tikz@tempbox=\box\tikz@whichbox%
\expandafter\endgroup%
- \expandafter\setbox\tikz@whichbox=\box\tikz@tempbox%
+ \expandafter\setbox\tikz@whichbox=\box\tikz@tempbox%
\else%
\expandafter\expandafter\expandafter\tikz@edge@macro%
\expandafter\expandafter\expandafter{\expandafter\tikz@@to@local@options\expandafter}\expandafter{\tikz@collected@onpath}%
\endgroup%
\let\tikz@after@path@smuggle=\pgfutil@empty%
\fi%
- \expandafter\tikz@scan@next@command\tikz@after@path@smuggle%
-}
+ \expandafter\tikz@scan@next@command\tikz@after@path@smuggle%
+}%
\def\tikz@do@to{%
\let\tikz@tonodes=\tikz@collected@onpath%
@@ -2963,7 +3086,7 @@
\pgf@stop%
\expandafter\tikz@scan@next@command\expandafter%
}\tikz@after@path%
-}
+}%
\def\tikz@to@use@last@coordinate{%
@@ -2972,60 +3095,60 @@
\else%
\edef\tikztostart{\the\tikz@lastx,\the\tikz@lasty}%
\fi%
-}
+}%
\def\tikz@to@use@last@fig@name{%
\edef\tikztostart{\tikz@to@last@fig@name}%
-}
+}%
% Syntax for graph path command:
-% graph {...}
+% graph [options] {...}
% See the graph library for details
-\def\tikz@graph aph{\tikz@lib@graph@parser}
+\def\tikz@graph aph{\tikz@lib@graph@parser}%
-\def\tikz@lib@graph@parser{\pgfutil@ifnextchar[\tikz@graph@error{\tikz@graph@error[]}}%]
+\def\tikz@lib@graph@parser{\pgfutil@ifnextchar[\tikz@graph@error{\tikz@graph@error[]}}%]%
\def\tikz@graph@error[#1]#2{%
- \tikzerror{You need to say \string\usetikzlibrary{graphs} in order to use the graph syntax}%
+ \tikzerror{You need to say \string\usetikzlibrary{graphs} in order to use the graph syntax}%
\tikz@lib@graph@parser@done%
-}
+}%
\def\tikz@lib@graph@parser@done{%
\tikz@scan@next@command%
-}
+}%
-% Syntax for edge from parent:
+% Syntax for edge from parent:
% edge from parent [options]
-\def\tikz@edgetoparent from parent{\pgfutil@ifnextchar[\tikz@@edgetoparent{\tikz@@edgetoparent[]}}%}
+\def\tikz@edgetoparent from parent{\pgfutil@ifnextchar[\tikz@@edgetoparent{\tikz@@edgetoparent[]}}%}%
\def\tikz@@edgetoparent[#1]{%
\let\tikz@edge@to@parent@needed=\pgfutil@empty%
\def\tikz@edgetoparent@options{#1}%
\begingroup%
\let\tikz@collected@onpath=\pgfutil@empty%
\tikz@edgetoparentcollect%
-}
+}%
\def\tikz@edgetoparentcollect{
\pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@edgetoparentcollect}%
{%
- \expandafter%
+ \expandafter%
\endgroup%
- \expandafter\tikz@edgetoparent@rollout\expandafter{\tikz@collected@onpath}%
+ \expandafter\tikz@edgetoparent@rollout\expandafter{\tikz@collected@onpath}%
}
-}
+}%
\def\tikz@edgetoparent@rollout#1{%
\pgfkeysgetvalue{/tikz/edge from parent macro}\tikz@etop@temp
\expandafter\tikz@scan@next@command\expandafter\tikz@etop@temp\expandafter{\tikz@edgetoparent@options}{#1}%
-}
+}%
% Syntax for bezier curves
% .. controls(point) and (point) .. (target)
-% .. controls(point) .. (target)
+% .. controls(point) .. (target)
% .. (target) % currently not supported
\def\tikz@dot.{\tikz@@dot}%
@@ -3033,14 +3156,14 @@
\pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@@dot}{%
\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikz@@dot}%
{\pgfutil@ifnextchar c{\tikz@curveto@double}{\tikz@curveto@auto}}}%
-}
+}%
\def\tikz@curveto@double co{%
\pgfutil@ifnextchar o{\tikz@collect@coordinate@onpath\tikz@@dot co}
- {\tikz@cureveto@@double}}
+ {\tikz@cureveto@@double}}%
\def\tikz@cureveto@@double ntrols#1{%
\tikz@scan@one@point\tikz@curveA#1%
-}
+}%
\def\tikz@curveA#1{%
\edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
{%
@@ -3052,29 +3175,29 @@
\pgfutil@ifnextchar a
{\tikz@curveBand}%
{\let\tikz@curve@second\tikz@curve@first\tikz@curveCdots}%
-}
+}%
\def\tikz@curveBand and{%
\tikz@scan@one@point\tikz@curveB%
-}
+}%
\def\tikz@curveB#1{%
\def\tikz@curve@second{#1}%
\tikz@curveCdots}
\def\tikz@curveCdots{%
- \afterassignment\tikz@curveCdot\let\@next=}
+ \afterassignment\tikz@curveCdot\let\pgfutil@next=}%
\def\tikz@curveCdot.{%
- \ifx\@next.%
+ \ifx\pgfutil@next.%
\else%
\tikzerror{Dot expected}%
\fi%
\tikz@updatecurrenttrue%
\tikz@curveCcheck%
-}
+}%
\def\tikz@curveCcheck{%
\pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@curveCcheck}{%
\pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikz@curveCcheck}%
{\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@curveCcheck}
{\tikz@scan@one@point\tikz@curveC}}}%
-}
+}%
\def\tikz@curveC#1{%
\tikz@make@last@position{#1}%
\edef\tikz@curve@third{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
@@ -3095,7 +3218,7 @@
\pgfpathmoveto{\pgfqpoint{\pgf@x}{\pgf@y}}%
\fi%
\let\tikz@timer@cont@one=\tikz@curve@first%
- \let\tikz@timer@cont@two=\tikz@curve@second%
+ \let\tikz@timer@cont@two=\tikz@curve@second%
% Second, the end:
\iftikz@shapeborder%
% ok, target is a shape. recalculate third
@@ -3107,7 +3230,7 @@
\global\let\tikz@timer@end@temp=\tikz@curve@third% move out of group
}%
\let\tikz@timer@end=\tikz@timer@end@temp%
- \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
+ \edef\tikz@moveto@waiting{\tikz@shapeborder@name}%
\else%
\pgfpathcurveto{\tikz@curve@first}{\tikz@curve@second}{\tikz@curve@third}%
\let\tikz@timer@end=\tikz@curve@third
@@ -3116,11 +3239,11 @@
\let\tikz@timer=\tikz@timer@curve%
\let\tikz@tangent=\tikz@curve@second%
\tikz@scan@next@command%
-}
+}%
-% Syntax for rectangles:
-% rectangle <corner point>
+% Syntax for rectangles:
+% rectangle <corner point>
\def\tikz@rect ectangle{%
\tikz@flush@moveto%
\edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
@@ -3132,16 +3255,16 @@
{
\pgf@xa=\tikz@lastx\relax%
\pgf@ya=\tikz@lasty\relax%
- \tikz@scan@one@point\tikz@rectB}}}}
+ \tikz@scan@one@point\tikz@rectB}}}}%
\def\tikz@rectB#1{%
\tikz@make@last@position{#1}%
\edef\tikz@timer@end{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
- \let\tikz@timer=\tikz@timer@line%
+ \let\tikz@timer=\tikz@timer@line%
\pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
\tikz@path@lineto{\pgfqpoint{\pgf@xa}{\tikz@lasty}}%
\tikz@path@lineto{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}%
\tikz@path@lineto{\pgfqpoint{\tikz@lastx}{\pgf@ya}}%
- \iftikz@snaked%
+ \iftikz@snaked%
\tikz@path@lineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
\fi%
\pgfpathclose%
@@ -3149,17 +3272,17 @@
\def\pgfstrokehook{}%
\let\tikz@tangent\relax%
\tikz@scan@next@command%
-}
+}%
-% Syntax for grids:
-% grid <corner point>
+% Syntax for grids:
+% grid <corner point>
\def\tikz@grid id{%
\tikz@flush@moveto%
\pgf@xa=\tikz@lastx\relax%
\pgf@ya=\tikz@lasty\relax%
- \pgfutil@ifnextchar[{\tikz@gridA}{\tikz@gridA[]}}%}
+ \pgfutil@ifnextchar[{\tikz@gridA}{\tikz@gridA[]}}%}%
\def\tikz@gridA[#1]{%
\def\tikz@grid@options{#1}%
\tikz@cycle@expander{\tikz@scan@one@point\tikz@gridB}}%
@@ -3189,16 +3312,16 @@
{\pgfqpoint{\pgf@xa}{\pgf@ya}}{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}%
\expandafter}%
\expandafter\tikz@scan@next@command\tikz@after@path%
-}
+}%
-% Syntax for plot:
+% Syntax for plot:
% plot [local options] ... % starts with a moveto
% -- plot [local options] ... % starts with a lineto
\def\tikz@plot lot{%
\tikz@flush@moveto%
- \pgfutil@ifnextchar[{\tikz@@plot}{\tikz@@plot[]}}%}
+ \pgfutil@ifnextchar[{\tikz@@plot}{\tikz@@plot[]}}%}%
\def\tikz@@plot[#1]{%
\let\tikz@tangent\tikz@tangent@lookup%
\begingroup%
@@ -3210,8 +3333,8 @@
{\pgfutil@ifnextchar c{\tikz@plot@scan@points}%
{\pgfutil@ifnextchar ({\tikz@plot@expression}{%
\tikzerror{Cannot parse this plotting data}%
- \endgroup}}}}
-\def\tikz@plot@f f{\pgfutil@ifnextchar i{\tikz@plot@file}{\tikz@plot@function}}
+ \endgroup}}}}%
+\def\tikz@plot@f f{\pgfutil@ifnextchar i{\tikz@plot@file}{\tikz@plot@function}}%
\def\tikz@plot@file ile#1{\def\tikz@plot@data{\pgfplotxyfile{#1}}\tikz@@@plot}%
\def\tikz@plot@scan@points coordinates#1{%
@@ -3220,18 +3343,18 @@
\pgfutil@ifnextchar\pgf@stop{\pgfplotstreamend\expandafter\tikz@@@plot\pgfutil@gobble}
{\tikz@scan@one@point\tikz@plot@next@point}%
#1\pgf@stop%
-}
+}%
\def\tikz@plot@next@point#1{%
\pgfplotstreampoint{#1}%
\pgfutil@ifnextchar\pgf@stop{\pgfplotstreamend\expandafter\tikz@@@plot\pgfutil@gobble}%
{\tikz@scan@one@point\tikz@plot@next@point}%
-}
+}%
\def\tikz@plot@function unction#1{%
- \def\tikz@plot@filename{\tikz@plot@prefix\tikz@plot@id}%
+ \def\tikz@plot@filename{\tikz@plot@prefix\tikz@plot@id}%
\iftikz@plot@raw@gnuplot%
\def\tikz@plot@data{\pgfplotgnuplot[\tikz@plot@filename]{#1}}%
\else%
- \iftikz@plot@parametric%
+ \iftikz@plot@parametric%
\def\tikz@plot@data{\pgfplotgnuplot[\tikz@plot@filename]{%
set samples \tikz@plot@samples;
set parametric;
@@ -3248,19 +3371,19 @@
\fi%
\fi%
\tikz@@@plot%
-}
+}%
\def\tikz@plot@no@resample{%
\pgfutil@IfFileExists{\tikz@plot@filename.table}%
{\def\tikz@plot@data{\pgfplotxyfile{\tikz@plot@filename.table}}}%
{}%
-}
+}%
\def\tikz@plot@expression(#1){%
\edef\tikz@plot@data{\noexpand\pgfplotfunction{\expandafter\noexpand\tikz@plot@var}{\tikz@plot@samplesat}}%
\expandafter\def\expandafter\tikz@plot@data\expandafter{\tikz@plot@data{\tikz@scan@one@point\pgfutil@firstofone(#1)}}%
\tikz@@@plot%
-}
+}%
\def\tikz@@@plot{%
\def\pgfplotlastpoint{\pgfpointorigin}%
@@ -3293,17 +3416,17 @@
\global\setbox\tikz@tempbox=\box\tikz@whichbox%
\global\let\tikz@after@path@smuggle=\tikz@after@path
\expandafter\endgroup%
- \expandafter\setbox\tikz@whichbox=\box\tikz@tempbox%
- \tikz@make@last@position{\tikz@@@temp}%
+ \expandafter\setbox\tikz@whichbox=\box\tikz@tempbox%
+ \tikz@make@last@position{\tikz@@@temp}%
\expandafter\tikz@scan@next@command\tikz@after@path@smuggle%
-}
+}%
\pgfdeclareplotmark{ball}
{%
\def\tikz@shading{ball}%
\shade (0pt,0pt) circle (\pgfplotmarksize);%
-}
+}%
@@ -3326,7 +3449,7 @@
\tikz@updatecurrenttrue%
\pgfpathcosine{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
\tikz@scan@next@command%
-}
+}%
% Syntax for sine curves:
% sin <end of quarter-period>
@@ -3346,22 +3469,22 @@
\tikz@updatecurrenttrue%
\pgfpathsine{\pgfqpoint{\pgf@xc}{\pgf@yc}}%
\tikz@scan@next@command%
-}
+}%
-% Syntax for parabolas:
+% Syntax for parabolas:
% parabola[options] bend <coordinate> <coordinate>
\def\tikz@parabola arabola{%
\let\tikz@tangent\tikz@tangent@lookup%
- \pgfutil@ifnextchar[{\tikz@parabola@options}{\tikz@parabola@options[]}}%}
+ \pgfutil@ifnextchar[{\tikz@parabola@options}{\tikz@parabola@options[]}}%}%
\def\tikz@parabola@options[#1]{%
\def\tikz@parabola@option{#1}%
- \pgfutil@ifnextchar b{\tikz@parabola@scan@bend}{\tikz@cycle@expander{\tikz@scan@one@point\tikz@parabola@semifinal}}}
-\def\tikz@parabola@scan@bend bend{\tikz@scan@one@point\tikz@parabola@scan@bendB}
+ \pgfutil@ifnextchar b{\tikz@parabola@scan@bend}{\tikz@cycle@expander{\tikz@scan@one@point\tikz@parabola@semifinal}}}%
+\def\tikz@parabola@scan@bend bend{\tikz@scan@one@point\tikz@parabola@scan@bendB}%
\def\tikz@parabola@scan@bendB#1{%
\def\tikz@parabola@bend{#1}%
\tikz@cycle@expander{\tikz@scan@one@point\tikz@parabola@semifinal}%
-}
+}%
\def\tikz@parabola@semifinal#1{%
\tikz@flush@moveto%
% Save original start:
@@ -3390,7 +3513,7 @@
\expandafter\endgroup%
\expandafter\expandafter\expandafter\pgfpathparabola\expandafter\tikz@parabola@b%
\expandafter\tikz@scan@next@command\tikz@after@path%
-}
+}%
% Syntax for circles:
@@ -3402,23 +3525,23 @@
% ellipse (x-radius and y-radius) % deprecated
%
% radii can be dimensionless, then they are in the xy-system
-\def\tikz@circle ircle{\tikz@flush@moveto\tikz@@circle}
-\def\tikz@ellipse llipse{\tikz@flush@moveto\tikz@@circle}
+\def\tikz@circle ircle{\tikz@flush@moveto\tikz@@circle}%
+\def\tikz@ellipse llipse{\tikz@flush@moveto\tikz@@circle}%
\def\tikz@@circle{%
\let\tikz@tangent\relax%
\pgfutil@ifnextchar(\tikz@@@circle
{\pgfutil@ifnextchar[\tikz@circle@opt{%])
\advance\tikz@expandcount by -10\relax% go down quickly
\ifnum\tikz@expandcount<0\relax%
- \let\@next=\tikz@@circle@normal%
+ \let\pgfutil@next=\tikz@@circle@normal%
\else%
- \let\@next=\tikz@@circle@scanexpand%
+ \let\pgfutil@next=\tikz@@circle@scanexpand%
\fi%
- \@next%
+ \pgfutil@next%
}}%
-}
-\def\tikz@@circle@scanexpand{\expandafter\tikz@@circle}
-\def\tikz@@circle@normal{\tikz@circle@opt[]}
+}%
+\def\tikz@@circle@scanexpand{\expandafter\tikz@@circle}%
+\def\tikz@@circle@normal{\tikz@circle@opt[]}%
\def\tikz@circle@opt[#1]{%
{%
@@ -3430,7 +3553,7 @@
\tikz@do@circle{\pgfkeysvalueof{/tikz/x radius}}{\pgfkeysvalueof{/tikz/y radius}}
}%
\tikz@scan@next@command%
-}
+}%
\def\tikz@@@circle(#1){%
{%
@@ -3443,10 +3566,10 @@
\fi%
}%
\tikz@scan@next@command%
-}
+}%
\def\tikz@@ellipseB(#1 and #2){%
\tikz@do@circle{#1}{#2}
-}
+}%
\def\tikz@do@circle#1#2{
\pgfmathparse{#1}%
\let\tikz@ellipse@x=\pgfmathresult%
@@ -3469,15 +3592,12 @@
\pgfpointxy{\tikz@ellipse@x}{0}}{\pgfpointxy{0}{\tikz@ellipse@y}}%
\fi%
\fi%
-}
+}%
-% Syntax 1 for arcs:
-% arc (start angle:end angle:radius)
+% Syntax for arcs:
+% arc [options]
%
-% Syntax 2 for arcs:
-% arc (start angle:end angle:x-radius and y-radius)
-%
-% radius can be dimensionless, then the arc is in the xy-coordinate system
+% (The syntax with parentheses is deprecated.)
\def\tikz@arcA rc{\tikz@flush@moveto\tikz@arc@cont}%
\def\tikz@arc@cont{%
\pgfutil@ifnextchar(%)
@@ -3487,16 +3607,16 @@
{%
\advance\tikz@expandcount by -10\relax% go down quickly
\ifnum\tikz@expandcount<0\relax%
- \let\@next=\tikz@@arc@normal%
+ \let\pgfutil@next=\tikz@@arc@normal%
\else%
- \let\@next=\tikz@@arc@scanexpand%
+ \let\pgfutil@next=\tikz@@arc@scanexpand%
\fi%
- \@next%
+ \pgfutil@next%
}%
}%
-}
-\def\tikz@@arc@scanexpand{\expandafter\tikz@arc@cont}
-\def\tikz@@arc@normal{\tikz@arc@opt[]}
+}%
+\def\tikz@@arc@scanexpand{\expandafter\tikz@arc@cont}%
+\def\tikz@@arc@normal{\tikz@arc@opt[]}%
\def\tikz@arc@opt[#1]{%
@@ -3508,7 +3628,7 @@
\ifx\tikz@s\pgfutil@empty%
\pgfmathsetmacro\tikz@s{\tikz@e-\tikz@d}
\else
- \ifx\tikz@e\pgfutil@empty%
+ \ifx\tikz@e\pgfutil@empty%
\pgfmathsetmacro\tikz@e{\tikz@s+\tikz@d}
\fi%
\fi%
@@ -3518,27 +3638,27 @@
{\pgfkeysvalueof{/tikz/y radius}}}%
}%
\pgf@marshal%
- \tikz@arcfinal%
-}
+ \tikz@arcfinal%
+}%
\def\tikz@@arcto(#1){%
\edef\tikz@temp{(#1)}%
\expandafter\tikz@@@arcto@check@slashand\tikz@temp%
-}
+}%
\def\tikz@@@arcto@check@slashand(#1:#2:#3){%
\pgfutil@in@{ and }{#3}%
- \ifpgfutil@in@%
+ \ifpgfutil@in@%
\tikz@parse@arc@and(#1:#2:#3)%
\else%
\tikz@parse@arc@and(#1:#2:{#3} and {#3})%
\fi%
- \tikz@arcfinal%
-}
+ \tikz@arcfinal%
+}%
\def\tikz@parse@arc@and(#1:#2:#3 and #4){%
\tikz@do@arc{#1}{#2}{#3}{#4}%
-}
+}%
\def\tikz@do@arc#1#2#3#4{%
\let\tikz@tangent\tikz@tangent@lookup%
\edef\tikz@timer@start{\noexpand\pgfqpoint{\the\tikz@lastx}{\the\tikz@lasty}}%
@@ -3553,8 +3673,8 @@
\tikz@@@arcfinal{\pgfpatharc{\tikz@timer@start@angle}{\tikz@timer@end@angle}{\tikz@arc@x pt and \tikz@arc@y pt}}
{\pgfpointpolar{\tikz@timer@start@angle}{\tikz@arc@x pt and \tikz@arc@y pt}}
{\pgfpointpolar{\tikz@timer@end@angle}{\tikz@arc@x pt and \tikz@arc@y pt}}%
- \edef\tikz@timer@zero@axis{\noexpand\pgfqpoint{\tikz@arc@x pt}{0pt}}
- \edef\tikz@timer@ninety@axis{\noexpand\pgfqpoint{0pt}{\tikz@arc@y pt}}
+ \edef\tikz@timer@zero@axis{\noexpand\pgfqpoint{\tikz@arc@x pt}{0pt}}
+ \edef\tikz@timer@ninety@axis{\noexpand\pgfqpoint{0pt}{\tikz@arc@y pt}}
\else%
\tikzerror{You cannot mix dimensions and dimensionless values in an arc}%
\fi%
@@ -3567,12 +3687,12 @@
\tikz@@@arcfinal{\pgfpatharcaxes{\tikz@timer@start@angle}{\tikz@timer@end@angle}{\pgfpointxy{\tikz@arc@x}{0}}{\pgfpointxy{0}{\tikz@arc@y}}}
{\pgfpointpolarxy{\tikz@timer@start@angle}{\tikz@arc@x and \tikz@arc@y}}{\pgfpointpolarxy{\tikz@timer@end@angle}{\tikz@arc@x and \tikz@arc@y}}%
\pgf@process{\pgfpointxy{\tikz@arc@x}{0}}
- \edef\tikz@timer@zero@axis{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}
+ \edef\tikz@timer@zero@axis{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}
\pgf@process{\pgfpointxy{0}{\tikz@arc@y}}
- \edef\tikz@timer@ninety@axis{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}
+ \edef\tikz@timer@ninety@axis{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}
\fi%
\fi%
-}
+}%
\def\tikz@@@arcfinal#1#2#3{%
#1%
@@ -3580,7 +3700,7 @@
\xdef\tikz@arc@save@first{\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
\pgf@process{#3}
\xdef\tikz@arc@save@second{\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
-}
+}%
\def\tikz@arcfinal{%
\pgf@process{\tikz@arc@save@first}%
@@ -3593,40 +3713,40 @@
\tikz@lastysaved=\tikz@lasty%
\let\tikz@timer=\tikz@timer@arc%
\tikz@scan@next@command%
-}
+}%
% Syntax for coordinates:
% coordinate[options] (coordinate name) at (point)
% where ``at (point)'' is optional
\def\tikz@coordinate ordinate{%
- \pgfutil@ifnextchar[{\tikz@@coordinate@opt}{\tikz@@coordinate@opt[]}}
+ \pgfutil@ifnextchar[{\tikz@@coordinate@opt}{\tikz@@coordinate@opt[]}}%
\def\tikz@@coordinate@opt[#1]{%
\pgfutil@ifnextchar({\tikz@@coordinate[#1]}
- {\tikz@fig ode[shape=coordinate,#1]{}}}%}
+ {\tikz@fig ode[shape=coordinate,#1]{}}}%}%
\def\tikz@@coordinate[#1](#2){%
\pgfutil@ifnextchar a{\tikz@@coordinate@at[#1](#2)}
- {\tikz@fig ode[shape=coordinate,#1](#2){}}}
+ {\tikz@fig ode[shape=coordinate,#1](#2){}}}%
\def\tikz@@coordinate@at[#1](#2)a{%
\pgfutil@ifnextchar t{\tikz@@coordinate@@at[#1](#2)a}%
{\tikz@fig ode[shape=coordinate,#1](#2){}a}%
-}
+}%
\def\tikz@@coordinate@@at[#1](#2)at#3({%
\def\tikz@coordinate@caller{\tikz@fig ode[shape=coordinate,#1](#2)at}%
\tikz@scan@one@point\tikz@@coordinate@at@math(%
-}
+}%
\def\tikz@@coordinate@at@math#1{%
\pgf@process{#1}%
\edef\tikz@temp{(\the\pgf@x,\the\pgf@y)}%
\expandafter\tikz@coordinate@caller\tikz@temp{}%
-}
-
+}%
+
% Syntax for nodes:
-% node foreach \var in {list} ... [options] (node name) at (pos) {label text}
+% node foreach \var in {list} ... :attribute={...} [options] (node name) at (pos) {label text}
%
-% all of [options], (node name), at(pos), and foreach are
+% all of :attribute, [options], (node name), at(pos), and foreach are
% optional. There can be multiple options and the ordering is not
% important as in node[draw] (a) [rotate=10] {text}, *except* that all
% foreach statements must come first.
@@ -3635,7 +3755,7 @@
%
\def\tikz@fig ode{%
\pgfutil@ifnextchar a\tikz@test@also{
- \pgfutil@ifnextchar f{\tikz@nodes@start}\tikz@normal@fig}}
+ \pgfutil@ifnextchar f{\tikz@nodes@start}\tikz@normal@fig}}%
\def\tikz@test@also a{\pgfutil@ifnextchar l\tikz@node@also{\tikz@normal@fig a}}%
\def\tikz@normal@fig{%
\edef\tikz@save@line@width{\the\pgflinewidth}%
@@ -3648,6 +3768,8 @@
\let\tikz@atend@scope=\pgfutil@empty%
\let\tikz@do@after@node=\tikz@scan@next@command%
\let\tikz@options=\pgfutil@empty%
+ \tikz@clear@rdf@options%
+ \let\tikz@id@name=\pgfutil@empty%
\let\tikz@after@path=\pgfutil@empty%
\let\tikz@transform=\pgfutil@empty%
\let\tikz@mode=\pgfutil@empty%
@@ -3670,21 +3792,23 @@
\pgfutil@ifnextchar a{\tikz@fig@scan@at}
{\pgfutil@ifnextchar({\tikz@fig@scan@name}
{\pgfutil@ifnextchar[{\tikz@fig@scan@options}%
- {\pgfutil@ifnextchar\bgroup{\tikz@fig@main}%
- {\tikzerror{A node must have a (possibly empty) label text}%
- \tikz@fig@main{}}}}}}%}}
+ {\pgfutil@ifnextchar:{\tikz@fig@scan@animation}%
+ {\pgfutil@ifnextchar\bgroup{\tikz@fig@main}%
+ {\tikzerror{A node must have a (possibly empty) label text}%
+ \tikz@fig@main{}}}}}}}%}}%
\def\tikz@fig@scan@at at{%
- \tikz@scan@one@point\tikz@@fig@scan@at}
+ \tikz@scan@one@point\tikz@@fig@scan@at}%
\def\tikz@@fig@scan@at#1{%
\def\tikz@node@at{#1}\tikz@@scan@fig}%
\def\tikz@fig@scan@name(#1){%
- \pgfkeysvalueof{/tikz/name/.@cmd}#1\pgfeov% CF : this is now ALWAYS consistent with 'name=' option; allows overrides.
- \tikz@@scan@fig}%
+ \pgfkeysvalueof{/tikz/name/.@cmd}#1\pgfeov% CF : this is now ALWAYS consistent with 'name=' option; allows overrides.
+ \tikz@@scan@fig}%
% make it \long to allow \par in "pin" options etc:
\long\def\tikz@fig@scan@options[#1]{\iftikz@node@is@pic\tikz@enable@pic@quotes\else\tikz@enable@node@quotes\fi\tikzset{#1}\ifx\tikz@node@content\relax\expandafter\tikz@@scan@fig\else\tikz@expand@node@contents\fi}%
+\def\tikz@fig@scan@animation:#1=#2{\tikzset{animate={myself:{#1}={#2}}}\tikz@@scan@fig}%
\def\tikz@expand@node@contents{%
\expandafter\tikz@@scan@fig\expandafter{\tikz@node@content}%
-}
+}%
\let\tikz@node@reset@hook=\pgfutil@empty%
\let\tikz@node@begin@hook=\pgfutil@empty%
\def\tikz@fig@main{%
@@ -3693,58 +3817,63 @@
\expandafter\tikz@subpicture@handle%
\else%
\afterassignment\tikz@@fig@main\expandafter\let\expandafter\next\expandafter=%
- \fi}
+ \fi}%
\def\tikz@@fig@main{%
\pgfutil@ifundefined{pgf@sh@s@\tikz@shape}%
{\tikzerror{Unknown shape ``\tikz@shape.'' Using ``rectangle'' instead}%
\def\tikz@shape{rectangle}}%
{}%
\tikzset{every \tikz@shape\space node/.try}%
- \tikz@node@textfont%
+ \tikz@node@textfont%
\tikz@node@begin@hook%
\iftikz@is@matrix%
\let\tikz@next=\tikz@do@matrix%
\else%
\let\tikz@next=\tikz@do@fig%
\fi%
- \tikz@next%
-}
+ \tikz@next%
+}%
\let\tikz@nodepart@list\pgfutil@empty
-\def\tikz@do@fig{%
+\def\tikz@do@fig{%
% Ok, reset all node part boxes
\pgfutil@for\tikz@temp:=\tikz@nodepart@list\do{%
\expandafter\setbox\csname pgfnodepart\tikz@temp box\endcsname=\box\pgfutil@voidb@x%
}%
\setbox\pgfnodeparttextbox=\hbox%
\bgroup%
- \tikzset{every text node part/.try}%
- \ifx\tikz@textopacity\pgfutil@empty%
- \else%
- \pgfsetfillopacity{\tikz@textopacity}%
- \pgfsetstrokeopacity{\tikz@textopacity}%
- \fi%
\pgfinterruptpicture%
+ \pgfsys@begin@text%
+ \pgfsys@text@to@black@hook%
+ \tikzset{every text node part/.try}%
+ \ifx\tikz@textopacity\pgfutil@empty%
+ \else%
+ \pgfsetfillopacity{\tikz@textopacity}%
+ \pgfsetstrokeopacity{\tikz@textopacity}%
+ \fi%
\ifx\tikz@text@width\pgfutil@empty%
- \tikz@textfont%
+ \tikz@textfont%
\else%
\begingroup%
- \pgfmathsetlength{\pgf@x}{\tikz@text@width}%
+ \pgfmathsetlength{\pgf@x}{\tikz@text@width}%
\pgfutil@minipage[t]{\pgf@x}\leavevmode\hbox{}%
- \tikz@textfont%
+ \tikz@textfont%
\tikz@text@action%
\fi%
\tikz@atbegin@node%
\bgroup%
\aftergroup\unskip%
+ % Some color stuff has been moved from here to outside; this is
+ % necessary for support of dvisvgm and of animation
+ % snapshots.
\ifx\tikz@textcolor\pgfutil@empty%
\else%
\pgfutil@colorlet{.}{\tikz@textcolor}%
\fi%
- \pgfsetcolor{.}%
+ \pgfutil@color{.}%
\setbox\tikz@figbox=\box\pgfutil@voidb@x%
\setbox\tikz@figbox@bg=\box\pgfutil@voidb@x%
\tikz@uninstallcommands%
- \iftikz@handle@active@code%
+ \iftikz@handle@active@code%
\tikz@orig@shorthands%
\let\tikz@orig@shorthands\pgfutil@empty%
\fi%
@@ -3754,12 +3883,12 @@
\aftergroup\tikz@fig@collectresetcolor%
\tikz@halign@check%
\ignorespaces%
-}
+}%
\def\tikz@fig@collectresetcolor{%
% Hacks for special packages that mess with \aftergroup
\pgfutil@ifnextchar\reset@color% hack for color package
{\reset@color\afterassignment\tikz@fig@collectresetcolor\let\tikz@temp=}\tikz@fig@boxdone%
-}
+}%
\def\tikz@fig@boxdone{%
\tikz@atend@node%
\ifx\tikz@text@width\pgfutil@empty%
@@ -3767,13 +3896,14 @@
\pgfutil@endminipage%
\endgroup%
\fi%
+ \pgfsys@end@text%
\endpgfinterruptpicture%
\egroup%
\pgfutil@ifnextchar c{\tikz@fig@mustbenamed\tikz@fig@continue}%
{\pgfutil@ifnextchar[{\tikz@fig@mustbenamed\tikz@fig@continue}%
{\pgfutil@ifnextchar t{\tikz@fig@mustbenamed\tikz@fig@continue}
{\pgfutil@ifnextchar e{\tikz@fig@mustbenamed\tikz@fig@continue}
- {\ifx\tikz@after@path\pgfutil@empty\expandafter\tikz@fig@continue\else\expandafter\tikz@fig@mustbenamed\expandafter\tikz@fig@continue\fi}}}}}%}
+ {\ifx\tikz@after@path\pgfutil@empty\expandafter\tikz@fig@continue\else\expandafter\tikz@fig@mustbenamed\expandafter\tikz@fig@continue\fi}}}}}%}%
\def\tikz@do@matrix{%
\tikzset{every matrix/.try}%
@@ -3786,77 +3916,86 @@
\pgfscope%
\ifx\tikz@time\pgfutil@empty\let\tikz@time\tikz@time@for@matrix\fi%
\tikz@options%
- \setbox\tikz@figbox=\box\pgfutil@voidb@x%
- \setbox\tikz@figbox@bg=\box\pgfutil@voidb@x%
- \let\tikzmatrixname=\tikz@fig@name%
- \edef\tikz@m@anchor{\ifx\tikz@matrix@anchor\pgfutil@empty\tikz@anchor\else\tikz@matrix@anchor\fi}%
- \expandafter\pgfutil@in@\expandafter{\expandafter.\expandafter}\expandafter{\tikz@m@anchor}%
- \ifpgfutil@in@%
- \expandafter\tikz@matrix@split\tikz@m@anchor\relax%
- \else%
- \def\tikz@matrix@shift{\pgfpointorigin}%
- \fi%
- \let\tikz@transform=\relax%
- \pgfmatrix%
- {\tikz@shape}%
- {\tikz@m@anchor}%
- {\tikz@fig@name}%
- {%
- \pgfutil@tempdima=\pgflinewidth%
- {\begingroup\tikz@finish}%
- \global\pgflinewidth=\pgfutil@tempdima%
- }%
- {\tikz@matrix@shift}%
- {%
- \tikz@matrix@make@active@ampersand%
- \def\pgfmatrixbegincode{%
- \pgfsys@beginscope%
- \tikz@common@matrix@code%
- \tikz@atbegin@cell%
- }%
- \def\tikz@common@matrix@code{%
- \let\tikz@options=\pgfutil@empty%
- \let\tikz@mode=\pgfutil@empty%
- \tikzset{every cell/.try={\the\pgfmatrixcurrentrow}{\the\pgfmatrixcurrentcolumn}}%
- \tikzset{column \the\pgfmatrixcurrentcolumn/.try}%
- \ifodd\pgfmatrixcurrentcolumn%
- \tikzset{every odd column/.try}%
- \else%
- \tikzset{every even column/.try}%
- \fi%
- \tikzset{row \the\pgfmatrixcurrentrow/.try}%
- \ifodd\pgfmatrixcurrentrow%
- \tikzset{every odd row/.try}%
- \else%
- \tikzset{every even row/.try}%
- \fi%
- \tikzset{row \the\pgfmatrixcurrentrow\space column \the\pgfmatrixcurrentcolumn/.try}%
- \tikz@options%
- }%
- \def\pgfmatrixendcode{%
- \tikz@atend@cell%
- \pgfsys@endscope%
- }%
- \def\pgfmatrixemptycode{%
- \pgfsys@beginscope%
- \tikz@common@matrix@code%
- \tikz@at@emptycell%
- \pgfsys@endscope%
+ \tikz@do@rdf@pre@options%
+ \tikz@is@nodefalse%
+ \tikz@call@id@hook%
+ \pgfidscope%
+ \tikz@do@rdf@post@options%
+ \begingroup%
+ \let\tikz@id@name\pgfutil@empty%
+ \pgfclearid%
+ \setbox\tikz@figbox=\box\pgfutil@voidb@x%
+ \setbox\tikz@figbox@bg=\box\pgfutil@voidb@x%
+ \let\tikzmatrixname=\tikz@fig@name%
+ \edef\tikz@m@anchor{\ifx\tikz@matrix@anchor\pgfutil@empty\tikz@anchor\else\tikz@matrix@anchor\fi}%
+ \expandafter\pgfutil@in@\expandafter{\expandafter.\expandafter}\expandafter{\tikz@m@anchor}%
+ \ifpgfutil@in@%
+ \expandafter\tikz@matrix@split\tikz@m@anchor\relax%
+ \else%
+ \def\tikz@matrix@shift{\pgfpointorigin}%
+ \fi%
+ \let\tikz@transform=\relax%
+ \pgfmatrix%
+ {\tikz@shape}%
+ {\tikz@m@anchor}%
+ {\tikz@fig@name}%
+ {%
+ \pgfutil@tempdima=\pgflinewidth%
+ {\begingroup\tikz@finish}%
+ \global\pgflinewidth=\pgfutil@tempdima%
}%
- \tikz@atbegin@matrix%
- \aftergroup\tikz@do@matrix@cont}%
- \bgroup%
-}
+ {\tikz@matrix@shift}%
+ {%
+ \tikz@matrix@make@active@ampersand%
+ \def\pgfmatrixbegincode{%
+ \pgfsys@beginscope%
+ \tikz@common@matrix@code%
+ \tikz@atbegin@cell%
+ }%
+ \def\tikz@common@matrix@code{%
+ \let\tikz@options=\pgfutil@empty%
+ \let\tikz@mode=\pgfutil@empty%
+ \tikzset{every cell/.try={\the\pgfmatrixcurrentrow}{\the\pgfmatrixcurrentcolumn}}%
+ \tikzset{column \the\pgfmatrixcurrentcolumn/.try}%
+ \ifodd\pgfmatrixcurrentcolumn%
+ \tikzset{every odd column/.try}%
+ \else%
+ \tikzset{every even column/.try}%
+ \fi%
+ \tikzset{row \the\pgfmatrixcurrentrow/.try}%
+ \ifodd\pgfmatrixcurrentrow%
+ \tikzset{every odd row/.try}%
+ \else%
+ \tikzset{every even row/.try}%
+ \fi%
+ \tikzset{row \the\pgfmatrixcurrentrow\space column \the\pgfmatrixcurrentcolumn/.try}%
+ \tikz@options%
+ }%
+ \def\pgfmatrixendcode{%
+ \tikz@atend@cell%
+ \pgfsys@endscope%
+ }%
+ \def\pgfmatrixemptycode{%
+ \pgfsys@beginscope%
+ \tikz@common@matrix@code%
+ \tikz@at@emptycell%
+ \pgfsys@endscope%
+ }%
+ \tikz@atbegin@matrix%
+ \aftergroup\tikz@do@matrix@cont}%
+ \bgroup%
+}%
\def\tikz@do@matrix@cont{%
- \tikz@atend@matrix%
+ \tikz@atend@matrix%
+ \endgroup%
+ \endpgfidscope%
\endpgfscope
\endpgfinterruptpath%
\egroup\egroup%
\egroup%
%
\tikz@node@finish%
-}
-
+}%
{%
\catcode`\&=13
\gdef\tikz@matrix@make@active@ampersand{%
@@ -3873,8 +4012,8 @@
\def\tikz@matrix@split#1.#2\relax{%
\def\tikz@m@anchor{text}%
\def\tikz@matrix@shift{\pgfpointanchor{#1}{#2}}%
-}
-
+}%
+
\def\tikz@fig@continue{%
\ifx\tikz@text@width\pgfutil@empty%
\else%
@@ -3896,28 +4035,49 @@
%
\tikz@node@transformations%
\tikz@nlt%
- %
+ %
\setbox\tikz@whichbox=\hbox{%
\unhbox\tikz@whichbox%
\hbox{{%
\pgfinterruptpath%
\pgfscope%
\tikz@options%
- \setbox\tikz@figbox=\box\pgfutil@voidb@x%
- \setbox\tikz@figbox@bg=\box\pgfutil@voidb@x%
- \pgfmultipartnode{\tikz@shape}{\tikz@anchor}{\tikz@fig@name}{%
- \pgfutil@tempdima=\pgflinewidth%
- {\begingroup\tikz@finish}%
- \global\pgflinewidth=\pgfutil@tempdima%
- }%
- \endpgfscope
+ \tikz@do@rdf@pre@options%
+ \tikz@is@nodetrue%
+ \tikz@call@id@hook%
+ \pgfidscope%
+ \tikz@do@rdf@post@options%
+ \let\tikz@id@name\pgfutil@empty%
+ \setbox\tikz@figbox=\box\pgfutil@voidb@x%
+ \setbox\tikz@figbox@bg=\box\pgfutil@voidb@x%
+ % Add color modifications to text box
+ \setbox\pgfnodeparttextbox=\hbox{{%
+ \pgfsys@begin@text% Colors moved here...
+ \ifx\tikz@textcolor\pgfutil@empty%
+ \else%
+ \pgfutil@colorlet{.}{\tikz@textcolor}%
+ \fi%
+ \pgfsetcolor{.}%
+ \pgfusetype{.text}%
+ \pgfidscope%
+ \box\pgfnodeparttextbox%
+ \endpgfidscope%
+ \pgfsys@end@text%
+ }}%
+ \pgfmultipartnode{\tikz@shape}{\tikz@anchor}{\tikz@fig@name}{%
+ \pgfutil@tempdima=\pgflinewidth%
+ {\begingroup\tikz@finish}%
+ \global\pgflinewidth=\pgfutil@tempdima%
+ }%
+ \endpgfidscope%
+ \endpgfscope%
\endpgfinterruptpath%
}}%
}%
%
\tikz@alias%
\tikz@node@finish%
-}
+}%
\def\tikz@fig@mustbenamed{%
@@ -3925,13 +4085,14 @@
% Assign a dummy name
\global\advance\tikz@fig@count by1\relax
\edef\tikz@fig@name{tikz@f@\the\tikz@fig@count}%
+ \let\tikz@id@name\tikz@fig@name%
\fi%
-}
+}%
\def\tikz@node@transformations{%
- %
+ %
% Possibly, we are ``online''
- %
+ %
\ifx\tikz@time\pgfutil@empty%
\pgftransformshift{\tikz@node@at}%
\iftikz@fullytransformed%
@@ -3944,9 +4105,9 @@
\fi%
% Invoke local transformations
\tikz@transform%
-}
+}%
-\def\tikz@node@finish{%
+\def\tikz@node@finish{%
\global\let\tikz@last@fig@name=\tikz@fig@name%
\global\let\tikz@after@path@smuggle=\tikz@after@path%
% shift box outside group
@@ -3959,10 +4120,10 @@
\tikz@do@after@path@smuggle%
\tikz@node@is@picfalse
\tikz@do@after@node%
-}
+}%
\let\tikz@fig@continue@orig=\tikz@fig@continue
-\def\tikz@do@after@node{\tikz@scan@next@command}
+\def\tikz@do@after@node{\tikz@scan@next@command}%
\def\tikz@do@after@path@smuggle{%
\let\tikz@to@last@fig@name=\tikz@last@fig@name%
@@ -3977,9 +4138,9 @@
\tikz@scan@next@command{\tikz@after@path@smuggle}\pgf@stop%
\fi%
\fi%
-}
+}%
-\def\tikz@call@late#1#2{\pgfnodepostsetupcode{#1}{\path[late options={name={#1},append after command={#2}}];}}
+\def\tikz@call@late#1#2{\pgfnodepostsetupcode{#1}{\path[late options={name={#1},append after command={#2}}];}}%
\newif\iftikz@do@align
@@ -3998,10 +4159,10 @@
\setbox\tikz@align@aligned@box=\box\pgfutil@voidb@x% void
\let\\=\tikz@align@newline%
\expandafter\tikz@start@align%
- \fi%
-}
-\def\tikz@align@newline{\pgfutil@protect\tikz@align@newline@}
-\def\tikz@align@newline@{\unskip\pgfutil@ifnextchar[\tikz@@align@newline{\tikz@@align@newline[0pt]}}%}
+ \fi%
+}%
+\def\tikz@align@newline{\pgfutil@protect\tikz@align@newline@}%
+\def\tikz@align@newline@{\unskip\pgfutil@ifnextchar[\tikz@@align@newline{\tikz@@align@newline[0pt]}}%}%
\def\tikz@@align@newline[#1]{\egroup\tikz@align@continue\pgfmathparse{#1}\let\tikz@align@temp=\pgfmathresult\tikz@start@align}%
% Two safe boxes for alignment:
\let\tikz@align@aligned@box=\pgfnodeparttextbox
@@ -4011,12 +4172,12 @@
% Start collecting text:
\setbox\tikz@align@line@box=\hbox\bgroup\bgroup%
\aftergroup\tikz@align@collectresetcolor\ignorespaces%
-}
+}%
\def\tikz@align@collectresetcolor{%
\pgfutil@ifnextchar\reset@color%
{\reset@color\afterassignment\tikz@align@collectresetcolor\let\tikz@temp=}%
{\tikz@align@end@check}%
-}
+}%
\def\tikz@align@end@check{%
\egroup%
\ifvoid\tikz@align@aligned@box%
@@ -4034,26 +4195,26 @@
\box\tikz@align@aligned@box%
\egroup%
}%
-}
-\def\tikz@align@continue{\tikz@@align@continue}
+}%
+\def\tikz@align@continue{\tikz@@align@continue}%
\let\tikz@@align@continue=\pgfutil@empty
-\def\tikz@node@also lso{\pgfutil@ifnextchar[\tikz@node@also@opt{\tikz@node@also@opt[]}}
+\def\tikz@node@also lso{\pgfutil@ifnextchar[\tikz@node@also@opt{\tikz@node@also@opt[]}}%
\def\tikz@node@also@opt[#1]{
\pgfutil@ifnextchar(%)
{\tikz@node@also@opt@cont[#1]}%
{\tikzerror{Syntax error in node also: ``('' expected.}%
\tikz@scan@next@command}%
-}
-\def\tikz@node@also@opt@cont[#1](#2){\tikzset{late options={name=#2,#1}}\tikz@scan@next@command}
-
+}%
+\def\tikz@node@also@opt@cont[#1](#2){\tikzset{late options={name=#2,#1}}\tikz@scan@next@command}%
+
% Syntax for parts of nodes:
% node ... {... \nodepart[options]{name} ... \nodepart{name} ...}
-\def\tikz@nodepart{\pgfutil@ifnextchar[\tikz@@nodepart{\tikz@@nodepart[]}}%}
+\def\tikz@nodepart{\pgfutil@ifnextchar[\tikz@@nodepart{\tikz@@nodepart[]}}%}%
\def\tikz@@nodepart[#1]#2{%
\tikz@atend@node%
\unskip%
@@ -4061,7 +4222,7 @@
\gdef\tikz@nodepart@name{#2}%
\global\let\tikz@fig@continue=\tikz@nodepart@continue%
\pgfutil@ifnextchar x{\egroup\relax}{\egroup\relax}% gobble spaces
-}
+}%
\def\tikz@nodepart@continue{%
\global\let\tikz@fig@continue=\tikz@fig@continue@orig%
\ifx\tikz@nodepart@list\pgfutil@empty%
@@ -4072,6 +4233,9 @@
% Now start new box:
\expandafter\setbox\csname pgfnodepart\tikz@nodepart@name box\endcsname=\hbox%
\bgroup%
+ \pgfinterruptpicture%
+ \pgfsys@begin@text%
+ \pgfsys@text@to@black@hook%
\tikzset{every \tikz@nodepart@name\space node part/.try}%
\expandafter\tikzset\expandafter{\tikz@nodepart@options}%
\ifx\tikz@textopacity\pgfutil@empty%
@@ -4079,27 +4243,27 @@
\pgfsetfillopacity{\tikz@textopacity}%
\pgfsetstrokeopacity{\tikz@textopacity}%
\fi%
- \pgfinterruptpicture%
+ % Colors moved here...
+ \ifx\tikz@textcolor\pgfutil@empty%
+ \else%
+ \pgfutil@colorlet{.}{\tikz@textcolor}%
+ \fi%
+ \pgfsetcolor{.}%
\ifx\tikz@text@width\pgfutil@empty%
- \tikz@textfont%
+ \tikz@textfont%
\else%
\begingroup%
\pgfmathsetlength{\pgf@x}{\tikz@text@width}%
\pgfutil@minipage[t]{\pgf@x}\leavevmode\hbox{}%
- \tikz@textfont%
+ \tikz@textfont%
\tikz@text@action%
\fi%
\bgroup%
\aftergroup\unskip%
- \ifx\tikz@textcolor\pgfutil@empty%
- \else%
- \pgfutil@colorlet{.}{\tikz@textcolor}%
- \fi%
- \pgfsetcolor{.}%
\setbox\tikz@figbox=\box\pgfutil@voidb@x%
\setbox\tikz@figbox@bg=\box\pgfutil@voidb@x%
\tikz@uninstallcommands%
- \iftikz@handle@active@code%
+ \iftikz@handle@active@code%
\tikz@orig@shorthands%
\let\tikz@orig@shorthands\pgfutil@empty%
\fi%
@@ -4110,12 +4274,12 @@
\aftergroup\tikz@fig@collectresetcolor%
\tikz@halign@check%
\ignorespaces%
-}
+}%
-%
+%
% Node foreach
-%
+%
\def\tikz@nodes@start{%
\let\tikz@nodes@list\pgfutil@empty%
@@ -4125,27 +4289,27 @@
\def\tikz@nodes@collect{node }%
\fi%
\tikz@nodes%
-}
+}%
\def\tikz@nodes foreach{\pgfutil@ifnextchar x\tikz@nodes@\tikz@nodes@}% get rid of spaces
\def\tikz@nodes@#1in{%
\expandafter\def\expandafter\tikz@nodes@list\expandafter{\tikz@nodes@list\foreach#1in}%
\pgfutil@ifnextchar\bgroup\tikz@nodes@group\tikz@nodes@one%
-}
+}%
\def\tikz@nodes@one#1{%
\expandafter\def\expandafter\tikz@nodes@list\expandafter{\tikz@nodes@list#1}%
\pgfutil@ifnextchar f\tikz@nodes\tikz@nodes@scan%
-}
+}%
\def\tikz@nodes@group#1{%
\expandafter\def\expandafter\tikz@nodes@list\expandafter{\tikz@nodes@list{#1}}%
\pgfutil@ifnextchar f\tikz@nodes\tikz@nodes@scan%
-}
+}%
\def\tikz@nodes@scan{%
\pgfutil@ifnextchar a{\tikz@nodes@at}%
{\pgfutil@ifnextchar({\tikz@nodes@name}%
{\pgfutil@ifnextchar[{\tikz@nodes@opt}%
{\pgfutil@ifnextchar\bgroup{\tikz@nodes@main}%
{\tikzerror{Nodes must have a (possibly empty) label text}%
- \tikz@fig@main{}}}}}}%}}
+ \tikz@fig@main{}}}}}}%}}%
\def\tikz@nodes@at at#1){%
\expandafter\def\expandafter\tikz@nodes@collect\expandafter{\tikz@nodes@collect at#1)}%
\tikz@nodes@scan}%
@@ -4179,14 +4343,14 @@
\setbox\tikz@figbox=\box\tikz@tempbox%
\setbox\tikz@figbox@bg=\box\tikz@tempbox@bg%
\tikz@scan@next@command%
-}
+}%
%
% "late" options can be used to "redo" a node
%
-\tikzset{late options/.code=\tikz@late@options{#1}}
+\tikzset{late options/.code=\tikz@late@options{#1}}%
\def\tikz@late@options#1{%
% Do a "virtual" node:
\begingroup%
@@ -4197,6 +4361,7 @@
\fi%
\tikz@is@matrixfalse%
\let\tikz@options=\pgfutil@empty%
+ \tikz@clear@rdf@options%
\let\tikz@after@path=\pgfutil@empty%
\let\tikz@afternodepathoptions=\pgfutil@empty%
\let\tikz@alias=\pgfutil@empty%
@@ -4204,7 +4369,7 @@
\tikz@decoratepathfalse%
\tikz@node@reset@hook%
\tikz@enable@node@quotes%
- \tikzset{every node/.try,#1}%
+ \tikzset{every node/.try,#1}%
\ifx\tikz@fig@name\pgfutil@empty%
\tikzerror{Late options must reference some existing node}%
\fi%
@@ -4215,7 +4380,7 @@
\global\let\tikz@after@path@smuggle=\tikz@after@path%
\endgroup%
\tikz@do@after@path@smuggle%
-}
+}%
% Auto placement
@@ -4223,19 +4388,23 @@
\def\tikz@auto@pre{%
\begingroup
\pgfresetnontranslationattimefalse
- \pgfslopedattimetrue%
+ \ifpgfslopedattime
+ \pgfslopedattimefalse%
+ \else
+ \pgfslopedattimetrue%
+ \fi
\pgfallowupsidedownattimetrue%
\tikz@timer%
- \pgf@x=\pgf@pt@aa pt%
+ \pgf@x=\pgf@pt@aa pt%
\pgf@y=\pgf@pt@ab pt%
\pgfpointnormalised{}%
-}
+}%
\def\tikz@auto@post{%
\global\let\tikz@anchor@smuggle=\tikz@anchor%
\endgroup%
\let\tikz@anchor=\tikz@anchor@smuggle%
-}
+}%
\def\tikz@auto@anchor{%
\ifdim\pgf@x>0.05pt%
@@ -4261,7 +4430,7 @@
\def\tikz@anchor{west}%
\fi%
\fi\fi%
-}
+}%
\def\tikz@auto@anchor@prime{%
\ifdim\pgf@x>0.05pt%
@@ -4287,16 +4456,16 @@
\def\tikz@anchor{east}%
\fi%
\fi\fi%
-}
+}%
%
% Callbacks: Please see the documentation of the graph drawing
% lib for info on these callbacks
%
-\def\tikzgdeventcallback#1#2{}
-\def\tikzgdeventgroupcallback#1{}
-\def\tikzgdlatenodeoptionacallback#1{}
+\def\tikzgdeventcallback#1#2{}%
+\def\tikzgdeventgroupcallback#1{}%
+\def\tikzgdlatenodeoptionacallback#1{}%
% Syntax for trees:
% node {...} child [options] {...} child [options] {...} ...
@@ -4306,22 +4475,22 @@
% Start collecting the children:
\let\tikz@children@list=\pgfutil@empty%
\tikznumberofchildren=0\relax%
- \tikz@collect@children c}
+ \tikz@collect@children c}%
-\def\tikz@collect@children{\pgfutil@ifnextchar c{\tikz@collect@children@cchar}{\tikz@children@collected}}
-\def\tikz@collect@children@cchar c{\pgfutil@ifnextchar h{\tikz@collect@child}{\tikz@children@collected c}}
-\def\tikz@collect@child hild{\pgfutil@ifnextchar[{\tikz@collect@childA}{\tikz@collect@childA[]}}%}
-\def\tikz@collect@childA[#1]{\pgfutil@ifnextchar f{\tikz@collect@children@foreach[#1]}{\tikz@collect@childB[#1]}}
+\def\tikz@collect@children{\pgfutil@ifnextchar c{\tikz@collect@children@cchar}{\tikz@children@collected}}%
+\def\tikz@collect@children@cchar c{\pgfutil@ifnextchar h{\tikz@collect@child}{\tikz@children@collected c}}%
+\def\tikz@collect@child hild{\pgfutil@ifnextchar[{\tikz@collect@childA}{\tikz@collect@childA[]}}%}%
+\def\tikz@collect@childA[#1]{\pgfutil@ifnextchar f{\tikz@collect@children@foreach[#1]}{\tikz@collect@childB[#1]}}%
\def\tikz@collect@childB[#1]{%
\advance\tikznumberofchildren by1\relax
\expandafter\def\expandafter\tikz@children@list\expandafter{\tikz@children@list \tikz@childnode[#1]}%
- \pgfutil@ifnextchar\bgroup{\tikz@collect@child@code}{\tikz@collect@child@code{}}}
+ \pgfutil@ifnextchar\bgroup{\tikz@collect@child@code}{\tikz@collect@child@code{}}}%
\def\tikz@collect@child@code#1{%
\expandafter\def\expandafter\tikz@children@list\expandafter{\tikz@children@list{#1}}%
\tikz@collect@children%
-}
+}%
\def\tikz@collect@children@foreach[#1]foreach#2in#3{%
- \pgfutil@ifnextchar\bgroup{\tikz@collect@children@foreachA{#1}{#2}{#3}}{\tikz@collect@children@foreachA{#1}{#2}{#3}{}}}
+ \pgfutil@ifnextchar\bgroup{\tikz@collect@children@foreachA{#1}{#2}{#3}}{\tikz@collect@children@foreachA{#1}{#2}{#3}{}}}%
\def\tikz@collect@children@foreachA#1#2#3#4{%
\expandafter\def\expandafter\tikz@children@list\expandafter
{\tikz@children@list\tikz@childrennodes[#1]{#2}{#3}{#4}}%
@@ -4332,15 +4501,16 @@
}%
\tikznumberofchildren=\c@pgf@counta%
\tikz@collect@children%
-}
+}%
\long\def\tikz@children@collected{%
\begingroup%
\advance\tikztreelevel by 1\relax%
\tikzgdeventgroupcallback{descendants}%
\let\tikz@options=\pgfutil@empty%
+ \tikz@clear@rdf@options%
\let\tikz@transform=\pgfutil@empty%
\tikzset{level/.try=\the\tikztreelevel,level \the\tikztreelevel/.try}%
- \tikz@transform%
+ \tikz@transform%
\let\tikz@transform=\relax%
\let\tikzparentnode=\tikz@last@fig@name%
\ifx\tikz@grow\relax\else%
@@ -4352,10 +4522,10 @@
\global\setbox\tikz@tempbox=\box\tikz@figbox%
\global\setbox\tikz@tempbox@bg=\box\tikz@figbox@bg%
\endgroup%
- \setbox\tikz@figbox=\box\tikz@tempbox%
- \setbox\tikz@figbox@bg=\box\tikz@tempbox@bg%
+ \setbox\tikz@figbox=\box\tikz@tempbox%
+ \setbox\tikz@figbox@bg=\box\tikz@tempbox@bg%
\tikz@scan@next@command%
-}
+}%
% Syntax for children:
%
@@ -4378,7 +4548,7 @@
\tikznumberofcurrentchild=\c@pgf@counta\relax%
\setbox\tikz@figbox=\box\tikz@tempbox%
\setbox\tikz@figbox@bg=\box\tikz@tempbox@bg%
-}
+}%
% Syntax for child:
@@ -4404,7 +4574,7 @@
\let\tikz@transform=\pgfutil@empty%
\tikzset{every child/.try,#1}%
\tikz@options%
- \tikz@transform%
+ \tikz@transform%
\let\tikz@transform=\relax%
\tikz@grow%
% Typeset node:
@@ -4429,12 +4599,12 @@
\egroup\egroup%
\egroup%
\fi%
-}
+}%
\def\tikz@parse@child@node{%
\pgfutil@ifnextchar n{\tikz@parse@child@node@n}%
{\pgfutil@ifnextchar c{\tikz@parse@child@node@c}%
- {\pgfutil@ifnextchar\pgf@stop\tikz@parse@child@node@rest\tikz@parse@child@node@expand}}}
+ {\pgfutil@ifnextchar\pgf@stop\tikz@parse@child@node@rest\tikz@parse@child@node@expand}}}%
\def\tikz@parse@child@node@expand{%
\advance\tikz@expandcount by-1\relax%
\ifnum\tikz@expandcount<0\relax%
@@ -4442,22 +4612,22 @@
\else%
\expandafter\expandafter\expandafter\tikz@parse@child@node%
\fi%
-}
-\def\tikz@parse@child@node@rest#1\pgf@stop{\tikz@expandcount=100\relax\def\tikz@child@node@rest{#1}}
-\def\tikz@parse@child@node@c c{\tikz@expandcount=100\pgfutil@ifnextchar o{\tikz@parse@child@node@co}{\tikz@parse@child@node@rest c}}
-\def\tikz@parse@child@node@co o{\pgfutil@ifnextchar o{\tikz@parse@child@node@coordinate}{\tikz@parse@child@node@rest co}}
+}%
+\def\tikz@parse@child@node@rest#1\pgf@stop{\tikz@expandcount=100\relax\def\tikz@child@node@rest{#1}}%
+\def\tikz@parse@child@node@c c{\tikz@expandcount=100\pgfutil@ifnextchar o{\tikz@parse@child@node@co}{\tikz@parse@child@node@rest c}}%
+\def\tikz@parse@child@node@co o{\pgfutil@ifnextchar o{\tikz@parse@child@node@coordinate}{\tikz@parse@child@node@rest co}}%
\def\tikz@parse@child@node@coordinate ordinate{%
\pgfutil@ifnextchar ({\tikz@@parse@child@node@coordinate}{%
\def\tikz@child@node@text{[shape=coordinate]{}}%
- \tikz@parse@child@node@rest}}%}
+ \tikz@parse@child@node@rest}}%}%
\def\tikz@@parse@child@node@coordinate(#1){%
\pgfutil@ifnextchar a{\tikz@p@c@n@c@at(#1)}{%
\def\tikz@child@node@text{[shape=coordinate,name=#1]{}}%
- \tikz@parse@child@node@rest}}
+ \tikz@parse@child@node@rest}}%
\def\tikz@p@c@n@c@at(#1)at#2({%
\def\tikz@child@node@text@pre{[shape=coordinate,name=#1]at}%
\tikz@scan@one@point\tikz@p@c@n@c@at@math(%
-}
+}%
\def\tikz@p@c@n@c@at@math#1{%
\pgf@process{#1}%
\edef\tikz@marshal{(\the\pgf@x,\the\pgf@y){}}%
@@ -4465,7 +4635,7 @@
\expandafter\expandafter\expandafter\tikz@child@node@text%
\expandafter\expandafter\expandafter{\expandafter\tikz@child@node@text@pre\tikz@marshal}%
\tikz@parse@child@node@rest%
-}
+}%
\def\tikz@parse@child@node@n node{\tikz@expandcount=100%
\let\tikz@child@node@text=\pgfutil@empty%
\tikz@p@c@s}%
@@ -4474,73 +4644,74 @@
{\pgfutil@ifnextchar ({\tikz@p@c@s@paran}
{\pgfutil@ifnextchar [{\tikz@p@c@s@bra}
{\pgfutil@ifnextchar \bgroup{\tikz@p@c@s@group}
- {\tikzerror{Cannot parse this node}}}}}}%}}
+ {\tikzerror{Cannot parse this node}}}}}}%}}%
\def\tikz@p@c@s@at at#1({%
\tikz@scan@one@point\tikz@p@c@s@at@math(%
-}
+}%
\def\tikz@p@c@s@at@math#1{%
\pgf@process{#1}%
\edef\tikz@marshal{ at(\the\pgf@x,\the\pgf@y)}%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter\tikz@child@node@text%
\expandafter\expandafter\expandafter{\expandafter\tikz@child@node@text\tikz@marshal}
- \tikz@p@c@s}
+ \tikz@p@c@s}%
\def\tikz@p@c@s@paran(#1){%
\expandafter\def\expandafter\tikz@child@node@text\expandafter{\tikz@child@node@text(#1)}
- \tikz@p@c@s}
+ \tikz@p@c@s}%
\def\tikz@p@c@s@bra[#1]{%
\expandafter\def\expandafter\tikz@child@node@text\expandafter{\tikz@child@node@text[#1]}
- \tikz@p@c@s}
+ \tikz@p@c@s}%
\def\tikz@p@c@s@group#1{%
- \iftikz@handle@active@nodes%
+ \iftikz@handle@active@nodes%
\expandafter\def\expandafter\tikz@child@node@text\expandafter{\tikz@child@node@text{\scantokens{#1}}}%
\else%
\expandafter\def\expandafter\tikz@child@node@text\expandafter{\tikz@child@node@text{#1}}
\fi%
\tikz@parse@child@node@rest%
-}
+}%
-%
+%
% Syntax for decorated subpaths:
%
% decorate [option] { subpath }
%
\def\tikz@decoration ecorate{%
\pgfutil@ifnextchar[{\tikz@lib@decoration}{\tikz@lib@decoration[]}%]
-}
+}%
-\def\tikz@lib@decoration[#1]#2{\tikzerror{You need to load a decoration library}}
+\def\tikz@lib@decoration[#1]#2{\tikzerror{You need to load a decoration library}}%
% The decorate path command:
-\def\tikz@lib@dec@decorate@path{\tikzerror{You need to load a decoration library}}
+\def\tikz@lib@dec@decorate@path{\tikzerror{You need to load a decoration library}}%
-%
+%
% Syntax for let :
%
-% let \p1 = (coordinate), \p2 = (coordinate),... in
+% let \p1 = (coordinate), \p2 = (coordinate),... in
%
\def\tikz@let@command et#1in{%
\tikzerror{You need to say \string\usetikzlibrary{calc} to use the let command}%
-}
+ \tikz@scan@next@command%
+}%
%
% Syntax for pictures:
-%
+%
% as for nodes, but with "pic" instead of "node"
-%
+%
\newif\iftikz@node@is@pic
-\def\tikz@subpicture ic{\tikz@node@is@pictrue\tikz@scan@next@command node}
+\def\tikz@subpicture ic{\tikz@node@is@pictrue\tikz@scan@next@command node}%
\def\tikz@subpicture@handle#1{%
\pgfkeys@spdef\tikz@temp{#1}%
\expandafter\tikz@subpicture@handle@\expandafter{\tikz@temp}%
-}
+}%
\def\tikz@subpicture@handle@#1{
- \pgfkeys{/tikz/pics/.cd,#1}
+ \pgfkeys{/tikz/pics/.cd,#1}%
\tikz@node@transformations%
\let\tikz@transform=\relax%
\let\tikz@picmode\tikz@mode%
@@ -4570,7 +4741,7 @@
\egroup
\egroup%
\egroup%
- \fi%
+ \fi%
\pgfkeysgetvalue{/tikz/pics/foreground code}{\tikz@pic@code}
\ifx\tikz@pic@code\pgfutil@empty\else%
\setbox\tikz@figbox=\hbox\bgroup%
@@ -4592,7 +4763,7 @@
\egroup
\egroup%
\egroup%
- \fi%
+ \fi%
\pgfkeysgetvalue{/tikz/pics/background code}{\tikz@pic@code}
\ifx\tikz@pic@code\pgfutil@empty\else%
\setbox\tikz@figbox@bg=\hbox\bgroup%
@@ -4614,12 +4785,12 @@
\egroup
\egroup%
\egroup%
- \fi%
+ \fi%
\tikz@node@finish%
-}
+}%
\tikzset{
pic actions/.code=\tikz@addmode{\tikz@picmode}
-}
+}%
% Setting up the picture codes:
\tikzset{
@@ -4627,26 +4798,26 @@
pics/code/.initial=,
pics/background code/.initial=,
pics/foreground code/.initial=
-}
+}%
% Defining pictures:
-\def\tikzdeclarepic#1#2{\pgfkeys{/tikz/#1/.cd,#2}}
+\def\tikzdeclarepic#1#2{\pgfkeys{/tikz/#1/.cd,#2}}%
\pgfkeysdef{/handlers/.pic}{%
\edef\pgf@temp{\pgfkeyscurrentpath}%
\edef\pgf@temp{\expandafter\tikz@smuggle@pics@in\pgf@temp\pgf@stop}%
- \expandafter\pgfkeys\expandafter{\pgf@temp/.style={code={#1}}}
-}
-\def\tikz@smuggle@pics@in/tikz/#1\pgf@stop{/tikz/pics/#1}
+ \expandafter\pgfkeys\expandafter{\pgf@temp/.style={code={#1}}}%
+}%
+\def\tikz@smuggle@pics@in/tikz/#1\pgf@stop{/tikz/pics/#1}%
%
% Timers
-%
+%
\def\tikz@timer@line{%
\pgftransformlineattime{\tikz@time}{\tikz@timer@start}{\tikz@timer@end}%
-}
+}%
\def\tikz@timer@vhline{%
\ifdim\tikz@time pt<0.5pt% first half
@@ -4655,7 +4826,7 @@
\pgf@ya=\pgf@y%
\pgf@process{\tikz@timer@end}%
\pgf@xb=\tikz@time pt%
- \pgf@xb=2\pgf@xb%
+ \pgf@xb=2\pgf@xb%
\edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}{\noexpand\tikz@timer@start}{%
\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@y}}}%
\tikz@marshal%
@@ -4671,7 +4842,7 @@
{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@y}}{\noexpand\tikz@timer@end}}%
\tikz@marshal%
\fi%
-}
+}%
\def\tikz@timer@hvline{%
\ifdim\tikz@time pt<0.5pt% first half
@@ -4680,7 +4851,7 @@
\pgf@ya=\pgf@y%
\pgf@process{\tikz@timer@end}%
\pgf@xb=\tikz@time pt%
- \pgf@xb=2\pgf@xb%
+ \pgf@xb=2\pgf@xb%
\edef\tikz@marshal{\noexpand\pgftransformlineattime{\pgf@sys@tonumber{\pgf@xb}}{\noexpand\tikz@timer@start}{%
\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@ya}}}%
\tikz@marshal%
@@ -4696,11 +4867,11 @@
{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@ya}}{\noexpand\tikz@timer@end}}%
\tikz@marshal%
\fi%
-}
+}%
\def\tikz@timer@curve{%
\pgftransformcurveattime{\tikz@time}{\tikz@timer@start}{\tikz@timer@cont@one}{\tikz@timer@cont@two}{\tikz@timer@end}%
-}
+}%
\def\tikz@timer@arc{%
@@ -4721,13 +4892,13 @@
{\tikz@timer@zero@axis}%
{\tikz@timer@ninety@axis}%
{\tikz@timer@start@angle}{\tikz@timer@end@angle}%
-}
+}%
%
% Coordinate systems
-%
+%
\def\tikzdeclarecoordinatesystem#1#2{%
\expandafter\def\csname tikz@parse@cs@#1\endcsname(##1){%
@@ -4737,41 +4908,41 @@
}%
\let\tikz@shapeborder@name=\tikz@smubble@b%
\edef\tikz@return@coordinate{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
-}
+}%
\def\tikzaliascoordinatesystem#1#2{%
\edef\pgf@marshal{\noexpand\let\expandafter\noexpand\csname
tikz@parse@cs@#1\endcsname=\expandafter\noexpand\csname
tikz@parse@cs@#2\endcsname}%
\pgf@marshal%
-}
+}%
-% Default coodinate systems:
+% Default coordinate systems:
\tikzdeclarecoordinatesystem{canvas}
{%
\tikzset{cs/.cd,x=0pt,y=0pt,#1}%
\pgfpoint{\tikz@cs@x}{\tikz@cs@y}%
-}
+}%
\tikzdeclarecoordinatesystem{canvas polar}
{%
\tikzset{cs/.cd,angle=0,radius=0cm,#1}%
\pgfpointpolar{\tikz@cs@angle}{\tikz@cs@xradius and \tikz@cs@yradius}%
-}
+}%
\tikzdeclarecoordinatesystem{xyz}
{%
\tikzset{cs/.cd,x=0,y=0,z=0,#1}%
\pgfpointxyz{\tikz@cs@x}{\tikz@cs@y}{\tikz@cs@z}%
-}
+}%
\tikzdeclarecoordinatesystem{xyz polar}
{%
\tikzset{cs/.cd,angle=0,radius=0,#1}%
\pgfpointpolarxy{\tikz@cs@angle}{\tikz@cs@xradius and \tikz@cs@yradius}%
-}
-\tikzaliascoordinatesystem{xy polar}{xyz polar}
+}%
+\tikzaliascoordinatesystem{xy polar}{xyz polar}%
\tikzdeclarecoordinatesystem{node}
@@ -4791,14 +4962,14 @@
\else%
\pgfpointanchor{\tikz@pp@name{\tikz@cs@node}}{\tikz@cs@anchor}%
\fi%
-}
+}%
% Intersection coordinates
-\tikzset{cs/first line/.code=\def\tikz@cs@line@a{#1}\def\tikz@cs@type@a{line}}
-\tikzset{cs/second line/.code=\def\tikz@cs@line@b{#1}\def\tikz@cs@type@b{line}}
+\tikzset{cs/first line/.code=\def\tikz@cs@line@a{#1}\def\tikz@cs@type@a{line}}%
+\tikzset{cs/second line/.code=\def\tikz@cs@line@b{#1}\def\tikz@cs@type@b{line}}%
-\tikzset{cs/first node/.code=\tikz@cs@unpack{\tikz@cs@node@a}{\tikz@cs@type@a}{#1}}
-\tikzset{cs/second node/.code=\tikz@cs@unpack{\tikz@cs@node@b}{\tikz@cs@type@b}{#1}}
+\tikzset{cs/first node/.code=\tikz@cs@unpack{\tikz@cs@node@a}{\tikz@cs@type@a}{#1}}%
+\tikzset{cs/second node/.code=\tikz@cs@unpack{\tikz@cs@node@b}{\tikz@cs@type@b}{#1}}%
\def\tikz@cs@unpack#1#2#3{%
\expandafter\ifx\csname pgf@sh@ns@#3\endcsname\relax%
@@ -4807,12 +4978,12 @@
\def#1{#3}%
\edef#2{\csname pgf@sh@ns@#3\endcsname}%
\fi%
-}
+}%
-\tikzset{cs/solution/.initial=1}
+\tikzset{cs/solution/.initial=1}%
-\tikzset{cs/horizontal line through/.store in=\tikz@cs@hori@line}
-\tikzset{cs/vertical line through/.store in=\tikz@cs@vert@line}
+\tikzset{cs/horizontal line through/.store in=\tikz@cs@hori@line}%
+\tikzset{cs/vertical line through/.store in=\tikz@cs@vert@line}%
\tikzdeclarecoordinatesystem{intersection}
{%
@@ -4825,7 +4996,7 @@
\else%
\csname tikz@intersect@\tikz@cs@type@a @and@\tikz@cs@type@b\endcsname%
\fi%
-}
+}%
\def\tikz@intersect@line@and@line{%
\expandafter\tikz@scan@one@point\expandafter\tikz@parse@line\tikz@cs@line@a%
@@ -4841,14 +5012,14 @@
{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}}%
\pgf@marshal%
-}
+}%
\def\tikz@parse@line#1--{%
\pgf@process{#1}%
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
\tikz@scan@one@point\pgf@process%
-}
+}%
\tikzdeclarecoordinatesystem{perpendicular}
@@ -4857,7 +5028,7 @@
\expandafter\tikz@scan@one@point\expandafter\tikz@parse@intersection@a\tikz@cs@hori@line%
\expandafter\tikz@scan@one@point\expandafter\tikz@parse@intersection@b\tikz@cs@vert@line%
\pgfqpoint{\the\pgf@xb}{\the\pgf@ya}
-}
+}%
\tikzdeclarecoordinatesystem{barycentric}
{%
@@ -4870,7 +5041,7 @@
\global\pgf@x=\pgfmathresult\pgf@xa%
\global\pgf@y=\pgfmathresult\pgf@ya%
}%
-}
+}%
\def\tikz@bary@dolist#1=#2,{%
\def\tikz@temp{#1}%
@@ -4883,17 +5054,17 @@
\advance\pgf@xb by\pgfmathresult pt%
\expandafter\tikz@bary@dolist%
\fi%
-}
+}%
-\tikzset{cs/x/.store in=\tikz@cs@x}
-\tikzset{cs/y/.store in=\tikz@cs@y}
-\tikzset{cs/z/.store in=\tikz@cs@z}
-\tikzset{cs/angle/.store in=\tikz@cs@angle}
-\tikzset{cs/x radius/.store in=\tikz@cs@xradius}
-\tikzset{cs/y radius/.store in=\tikz@cs@yradius}
-\tikzset{cs/radius/.style={/tikz/cs/x radius=#1,/tikz/cs/y radius=#1}}
-\tikzset{cs/name/.store in=\tikz@cs@node}
-\tikzset{cs/anchor/.store in=\tikz@cs@anchor}
+\tikzset{cs/x/.store in=\tikz@cs@x}%
+\tikzset{cs/y/.store in=\tikz@cs@y}%
+\tikzset{cs/z/.store in=\tikz@cs@z}%
+\tikzset{cs/angle/.store in=\tikz@cs@angle}%
+\tikzset{cs/x radius/.store in=\tikz@cs@xradius}%
+\tikzset{cs/y radius/.store in=\tikz@cs@yradius}%
+\tikzset{cs/radius/.style={/tikz/cs/x radius=#1,/tikz/cs/y radius=#1}}%
+\tikzset{cs/name/.store in=\tikz@cs@node}%
+\tikzset{cs/anchor/.store in=\tikz@cs@anchor}%
@@ -4903,8 +5074,8 @@
% Last position visited
-\def\tikz@last@position{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}
-\def\tikz@last@position@saved{\pgfqpoint{\tikz@lastxsaved}{\tikz@lastysaved}}
+\def\tikz@last@position{\pgfqpoint{\tikz@lastx}{\tikz@lasty}}%
+\def\tikz@last@position@saved{\pgfqpoint{\tikz@lastxsaved}{\tikz@lastysaved}}%
% Make given point the last position visited
\def\tikz@make@last@position#1{%
@@ -4916,45 +5087,45 @@
\tikz@lastysaved=\pgf@y\relax%
\fi%
\tikz@updatecurrenttrue%
-}
+}%
\newif\iftikz@updatecurrent
\tikz@updatecurrenttrue
-% Scanner: Scans a point or a relative point.
+% Scanner: Scans a point or a relative point.
% It then calls the first parameter with the argument set to an
% appropriate pgf command representing that point.
\def\tikz@scan@one@point#1{%
\let\tikz@to@use@whom=\tikz@to@use@last@coordinate%
\tikz@shapeborderfalse%
- \pgfutil@ifnextchar+{\tikz@scan@relative#1}{\tikz@scan@absolute#1}}
+ \pgfutil@ifnextchar+{\tikz@scan@relative#1}{\tikz@scan@absolute#1}}%
\def\tikz@scan@absolute#1{%
\pgfutil@ifnextchar({\tikz@scan@@absolute#1}%)
{%
\advance\tikz@expandcount by -1%
\ifnum\tikz@expandcount<0\relax%
- \let\@next=\tikz@@scangiveup%
+ \let\pgfutil@next=\tikz@@scangiveup%
\else%
- \let\@next=\tikz@@scanexpand%
+ \let\pgfutil@next=\tikz@@scanexpand%
\fi%
- \@next{#1}%
+ \pgfutil@next{#1}%
}%
-}
-\def\tikz@@scanexpand#1{\expandafter\tikz@scan@one@point\expandafter#1}
-\def\tikz@@scangiveup#1{\tikzerror{Cannot parse this coordinate}#1{\pgfpointorigin}}
+}%
+\def\tikz@@scanexpand#1{\expandafter\tikz@scan@one@point\expandafter#1}%
+\def\tikz@@scangiveup#1{\tikzerror{Cannot parse this coordinate}#1{\pgfpointorigin}}%
\def\tikz@scan@@absolute#1({%
\pgfutil@ifnextchar[% uhoh... options!
{\def\tikz@scan@point@recall{#1}\tikz@scan@options}%
{\tikz@@@scan@@absolute#1(}%
-}
+}%
\def\tikz@scan@options[#1]#2{%
\def\tikz@scan@point@options{#1}%
\tikz@@@scan@@absolute\tikz@scan@handle@options(#2%
-}
+}%
\def\tikz@scan@handle@options#1{%
{%
@@ -4967,15 +5138,15 @@
\pgf@process{\pgfpointtransformed{#1}}%
\xdef\tikz@marshal{\expandafter\noexpand\tikz@scan@point@recall{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
}%
- \tikz@marshal%
-}
+ \tikz@marshal%
+}%
\def\tikz@ensure@dollar@catcode{%
\ifnum\catcode`\$=3 %
\else
\tikzerror{Sorry, some package has redefined the meaning of the
math-mode dollar sign. This is incompatible with tikz and its calc
- library and might cause unrecoverable errors}%
+ library and might cause unrecoverable errors}%
% only show error once:
\global\let\tikz@ensure@dollar@catcode=\relax
\fi
@@ -4986,50 +5157,50 @@
\pgfutil@ifnextchar{$}%$
{\tikz@parse@calculator#1(}
{\tikz@scan@no@calculator#1(}%
-}
+}%
\def\tikz@scan@no@calculator#1(#2){%
\edef\tikz@temp{(#2)}%
\expandafter\tikz@@scan@@no@calculator\expandafter#1\tikz@temp%
-}
+}%
\def\tikz@@scan@@no@calculator#1(#2){%
\pgfutil@in@{cs:}{#2}%
\ifpgfutil@in@%
- \let\@next\tikz@parse@coordinatesystem%
+ \let\pgfutil@next\tikz@parse@coordinatesystem%
\else%
\pgfutil@in@{intersection }{#2}%
\ifpgfutil@in@%
- \let\@next\tikz@parse@intersection%
+ \let\pgfutil@next\tikz@parse@intersection%
\else%
\pgfutil@in@|{#2}%
\ifpgfutil@in@
\pgfutil@in@{-|}{#2}%
\ifpgfutil@in@
- \let\@next\tikz@parse@hv%
+ \let\pgfutil@next\tikz@parse@hv%
\else%
- \let\@next\tikz@parse@vh%
+ \let\pgfutil@next\tikz@parse@vh%
\fi%
\else%
\pgfutil@in@:{#2}%
\ifpgfutil@in@
- \let\@next\tikz@parse@polar%
+ \let\pgfutil@next\tikz@parse@polar%
\else%
\pgfutil@in@,{#2}%
- \ifpgfutil@in@%
- \let\@next\tikz@parse@regular%
+ \ifpgfutil@in@%
+ \let\pgfutil@next\tikz@parse@regular%
\else%
- \let\@next\tikz@parse@node%
+ \let\pgfutil@next\tikz@parse@node%
\fi%
\fi%
\fi%
\fi%
\fi%
- \@next#1(#2)%
-}
+ \pgfutil@next#1(#2)%
+}%
\def\tikz@parse@calculator#1($#2$){%
\tikzerror{You need to say \string\usetikzlibrary{calc} for coordinate calculation}%
#1{\pgfpointorigin}%
-}
+}%
\def\tikz@parse@coordinatesystem#1(#2 cs:#3){%
\let\tikz@return@coordinate=\pgfpointorigin%
@@ -5037,20 +5208,20 @@
{\tikzerror{Unknown coordinate system '#2'}}
{\csname tikz@parse@cs@#2\endcsname(#3)}%
\expandafter#1\expandafter{\tikz@return@coordinate}%
-}
+}%
\newif\iftikz@isdimension
\def\tikz@checkunit#1{%
\pgfmathparse{#1}%
\let\iftikz@isdimension=\ifpgfmathunitsdeclared%
-}
+}%
\def\tikz@parse@polar#1(#2:#3){%
\pgfutil@ifundefined{tikz@polar@dir@#2}
{\tikz@@parse@polar#1({#2}:{#3})}
{\tikz@@parse@polar#1(\csname tikz@polar@dir@#2\endcsname:{#3})}%
-}
+}%
\def\tikz@@parse@polar#1(#2:#3){%
\pgfutil@in@{ and }{#3}%
\ifpgfutil@in@%
@@ -5059,7 +5230,7 @@
\edef\tikz@args{({#2}:{#3} and {#3})}%
\fi%
\expandafter\tikz@@@parse@polar\expandafter#1\tikz@args%
-}
+}%
\def\tikz@@@parse@polar#1(#2:#3 and #4){%
\tikz@checkunit{#3}%
\iftikz@isdimension%
@@ -5080,69 +5251,65 @@
\fi%
\fi%
\tikz@next%
-}
-\def\tikz@polar@dir@up{90}
-\def\tikz@polar@dir@down{-90}
-\def\tikz@polar@dir@left{180}
-\def\tikz@polar@dir@right{0}
-\def\tikz@polar@dir@north{90}
-\def\tikz@polar@dir@south{-90}
-\def\tikz@polar@dir@east{0}
-\def\tikz@polar@dir@west{180}
-\expandafter\def\csname tikz@polar@dir@north east\endcsname{45}
-\expandafter\def\csname tikz@polar@dir@north west\endcsname{135}
-\expandafter\def\csname tikz@polar@dir@south east\endcsname{-45}
-\expandafter\def\csname tikz@polar@dir@south west\endcsname{-135}
-
-
-% MW:
-% Check to see if the y-coordinate is inside {}. If it is, scan it and
-% reinsert it into the stream inside an extra group.
-%
-% MW:
+}%
+\def\tikz@polar@dir@up{90}%
+\def\tikz@polar@dir@down{-90}%
+\def\tikz@polar@dir@left{180}%
+\def\tikz@polar@dir@right{0}%
+\def\tikz@polar@dir@north{90}%
+\def\tikz@polar@dir@south{-90}%
+\def\tikz@polar@dir@east{0}%
+\def\tikz@polar@dir@west{180}%
+\expandafter\def\csname tikz@polar@dir@north east\endcsname{45}%
+\expandafter\def\csname tikz@polar@dir@north west\endcsname{135}%
+\expandafter\def\csname tikz@polar@dir@south east\endcsname{-45}%
+\expandafter\def\csname tikz@polar@dir@south west\endcsname{-135}%
+
+
+% MW:
% Check to see if the y-coordinate is inside {}. If it is, scan it and
-% reinsert it into the stream inside an extra group.
+% reinsert it into the stream inside an extra group.
%
\def\tikz@parse@regular#1(#2,{%
- \pgfutil@ifnextchar\bgroup{\tikz@@parse@regular#1{#2}}{\tikz@@@parse@regular#1{#2}}%
-}
+ \pgfutil@ifnextchar\bgroup{\tikz@@parse@regular#1{#2}}{\tikz@@@parse@regular#1{#2}}%
+}%
\def\tikz@@parse@regular#1#2#3{%
- \pgfutil@ifnextchar[{% Uh oh! An array index.
- \tikz@@@parse@regular#1{#2}{#3}}%
- {\tikz@@@parse@regular#1{#2}{{#3}}}}
-
+ \pgfutil@ifnextchar[{% Uh oh! An array index.
+ \tikz@@@parse@regular#1{#2}{#3}}%
+ {\tikz@@@parse@regular#1{#2}{{#3}}}}%
+
% Originally \def\tikz@parse@regular#1(#2,#3){%
%
\def\tikz@@@parse@regular#1#2#3){%
\pgfutil@in@,{#3}%
- \ifpgfutil@in@%
+ \ifpgfutil@in@%
\tikz@parse@splitxyz{#1}{#2}#3,%
\else%
\tikz@checkunit{#2}%
\iftikz@isdimension%
\tikz@checkunit{#3}%
\iftikz@isdimension%
- \def\@next{#1{\pgfpoint{#2}{#3}}}%
+ \def\pgfutil@next{#1{\pgfpoint{#2}{#3}}}%
\else%
- \def\@next{#1{\pgfpointadd{\pgfpoint{#2}{0pt}}{\pgfpointxy{0}{#3}}}}%
+ \def\pgfutil@next{#1{\pgfpointadd{\pgfpoint{#2}{0pt}}{\pgfpointxy{0}{#3}}}}%
\fi%
\else%
\tikz@checkunit{#3}%
\iftikz@isdimension%
- \def\@next{#1{\pgfpointadd{\pgfpoint{0pt}{#3}}{\pgfpointxy{#2}{0}}}}%
+ \def\pgfutil@next{#1{\pgfpointadd{\pgfpoint{0pt}{#3}}{\pgfpointxy{#2}{0}}}}%
\else%
- \def\@next{#1{\pgfpointxy{#2}{#3}}}%
+ \def\pgfutil@next{#1{\pgfpointxy{#2}{#3}}}%
\fi%
\fi%
\fi%
- \@next%
-}
+ \pgfutil@next%
+}%
\def\tikz@parse@splitxyz#1#2#3,#4,{%
- \def\@next{#1{\pgfpointxyz{#2}{#3}{#4}}}%
-}
+ \def\pgfutil@next{#1{\pgfpointxyz{#2}{#3}{#4}}}%
+}%
-\def\tikz@coordinate@text{coordinate}
+\def\tikz@coordinate@text{coordinate}%
\def\tikz@parse@node#1(#2){%
\pgfutil@in@.{#2}% Ok, flag this
@@ -5151,7 +5318,7 @@
\else%
\tikz@calc@anchor#2.center\tikz@stop% to be on the save side, in
% case iftikz@shapeborder is ignored...
- \expandafter\ifx\csname pgf@sh@ns@#2\endcsname\tikz@coordinate@text%
+ \expandafter\ifx\csname pgf@sh@ns@\tikz@pp@name{#2}\endcsname\tikz@coordinate@text%
\else
\tikz@shapebordertrue%
\def\tikz@shapeborder@name{\tikz@pp@name{#2}}%
@@ -5159,11 +5326,11 @@
\fi%
\edef\tikz@marshal{\noexpand#1{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
\tikz@marshal%
-}
+}%
\def\tikz@calc@anchor#1.#2\tikz@stop{%
\pgfpointanchor{\tikz@pp@name{#1}}{#2}%
-}
+}%
\def\tikz@parse@hv#1(#2){%
@@ -5183,11 +5350,11 @@
\fi%
\fi%
\fi%
- \tikz@next#1(#2)}
-\def\tikz@parse@hvboth#1(#2 -| #3){\tikz@parse@vhdone#1({#3}|-{#2})}
-\def\tikz@parse@hvleft#1(#2 -|#3){\tikz@parse@vhdone#1({#3}|-{#2})}
-\def\tikz@parse@hvright#1(#2-| #3){\tikz@parse@vhdone#1({#3}|-{#2})}
-\def\tikz@parse@hvdone#1(#2-|#3){\tikz@parse@vhdone#1({#3}|-{#2})}
+ \tikz@next#1(#2)}%
+\def\tikz@parse@hvboth#1(#2 -| #3){\tikz@parse@vhdone#1({#3}|-{#2})}%
+\def\tikz@parse@hvleft#1(#2 -|#3){\tikz@parse@vhdone#1({#3}|-{#2})}%
+\def\tikz@parse@hvright#1(#2-| #3){\tikz@parse@vhdone#1({#3}|-{#2})}%
+\def\tikz@parse@hvdone#1(#2-|#3){\tikz@parse@vhdone#1({#3}|-{#2})}%
\def\tikz@parse@vh#1(#2){%
\pgfutil@in@{ |- }{#2}%
@@ -5206,10 +5373,10 @@
\fi%
\fi%
\fi%
- \tikz@next#1(#2)}
-\def\tikz@parse@vhboth#1(#2 |- #3){\tikz@parse@vhdone#1({#2}|-{#3})}
-\def\tikz@parse@vhleft#1(#2 |-#3){\tikz@parse@vhdone#1({#2}|-{#3})}
-\def\tikz@parse@vhright#1(#2|- #3){\tikz@parse@vhdone#1({#2}|-{#3})}
+ \tikz@next#1(#2)}%
+\def\tikz@parse@vhboth#1(#2 |- #3){\tikz@parse@vhdone#1({#2}|-{#3})}%
+\def\tikz@parse@vhleft#1(#2 |-#3){\tikz@parse@vhdone#1({#2}|-{#3})}%
+\def\tikz@parse@vhright#1(#2|- #3){\tikz@parse@vhdone#1({#2}|-{#3})}%
\def\tikz@parse@vhdone#1(#2|-#3){%
{%
\tikz@@@scan@@absolute\tikz@parse@vh@mid(#2)%
@@ -5217,9 +5384,9 @@
\xdef\tikz@marshal{\noexpand#1{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}}%
}%
\tikz@marshal%
-}
-\def\tikz@parse@vh@mid#1{\pgf@process{#1}\pgf@xa=\pgf@x}
-\def\tikz@parse@vh@end#1{\pgf@process{#1}\pgf@ya=\pgf@y}
+}%
+\def\tikz@parse@vh@mid#1{\pgf@process{#1}\pgf@xa=\pgf@x}%
+\def\tikz@parse@vh@end#1{\pgf@process{#1}\pgf@ya=\pgf@y}%
\def\tikz@parse@intersection#1(intersection{%
\pgfutil@ifnextchar o{%
@@ -5227,7 +5394,7 @@
}{%
\tikz@parse@main@intersection#1%
}%
-}
+}%
\def\tikz@parse@main@intersection#1#2of #3 and #4){%
\tikzset{cs/solution=#2}%
\pgfutil@in@{--}{#3}%
@@ -5245,36 +5412,36 @@
\tikz@parse@cs@intersection()% advanced hackery...
\edef\pgf@marshal{\noexpand#1{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
\pgf@marshal%
-}
+}%
\def\tikz@reparse@line#1#2--#3\pgf@stop{%
\tikzset{cs/#1 line={(#2)--(#3)}}%
-}
+}%
-\def\tikz@parse@intersection@a#1{\pgf@process{#1}\pgf@xa=\pgf@x\pgf@ya=\pgf@y}
-\def\tikz@parse@intersection@b#1{\pgf@process{#1}\pgf@xb=\pgf@x\pgf@yb=\pgf@y}
+\def\tikz@parse@intersection@a#1{\pgf@process{#1}\pgf@xa=\pgf@x\pgf@ya=\pgf@y}%
+\def\tikz@parse@intersection@b#1{\pgf@process{#1}\pgf@xb=\pgf@x\pgf@yb=\pgf@y}%
\def\tikz@scan@relative#1+{%
- \pgfutil@ifnextchar+{\tikz@scan@plusplus#1}{\tikz@scan@oneplus#1}}
+ \pgfutil@ifnextchar+{\tikz@scan@plusplus#1}{\tikz@scan@oneplus#1}}%
\def\tikz@scan@plusplus#1+{%
\def\tikz@doafter{#1}%
\tikz@scan@absolute\tikz@add%
-}
+}%
\def\tikz@add#1{%
\tikz@doafter{\pgfpointadd{#1}{\tikz@last@position@saved}}%
-}
+}%
\def\tikz@scan@oneplus#1{%
\def\tikz@doafter{#1}%
\tikz@updatecurrentfalse%
\tikz@scan@absolute\tikz@add%
-}
+}%
-%
+%
% Quote handling
-%
+%
\let\tikz@enable@node@quotes\relax
\let\tikz@enable@edge@quotes\relax
@@ -5287,16 +5454,16 @@
% Include a library file.
%
% #1 = List of names of library file.
-%
+%
% Description:
%
% This command includes a list of TikZ library files. For each file X in the
% list, the file tikzlibraryX.code.tex is included, provided this has
-% not been done earlier.
+% not been done earlier.
%
% For the convenience of Context users, both round and square brackets
% are possible for the argument.
-%
+%
% If no file tikzlibraryX.code.tex exists, the file
% pgflibraryX.code.tex is tried instead. If this file, also, does not
% exist, an error message is printed.
@@ -5306,8 +5473,8 @@
% \usetikzlibrary{arrows}
% \usetikzlibrary[patterns,topaths]
-\def\usetikzlibrary{\pgfutil@ifnextchar[{\use@tikzlibrary}{\use@@tikzlibrary}}%}
-\def\use@tikzlibrary[#1]{\use@@tikzlibrary{#1}}
+\def\usetikzlibrary{\pgfutil@ifnextchar[{\use@tikzlibrary}{\use@@tikzlibrary}}%}%
+\def\use@tikzlibrary[#1]{\use@@tikzlibrary{#1}}%
\def\use@@tikzlibrary#1{%
\edef\pgf@list{#1}%
\pgfutil@for\pgf@temp:=\pgf@list\do{%
@@ -5338,12 +5505,12 @@
\fi%
\fi
}%
-}
+}%
% Always-present libraries:
-\usetikzlibrary{topaths}
+\usetikzlibrary{topaths}%
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf.lua
index 0ffbaf53c13..da0aba39121 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf.lua,v 1.3 2013/04/04 20:43:44 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd.lua
index b813ccab603..cf94454a494 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd.lua,v 1.1 2012/11/27 17:24:23 tantau Exp $
+--- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings.lua
index 8f72092e4e9..410da3af455 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/bindings.lua,v 1.1 2012/11/27 17:24:23 tantau Exp $
+--- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings/Binding.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings/Binding.lua
index f062c7a54c5..5b60d90ccd6 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings/Binding.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings/Binding.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/bindings/Binding.lua,v 1.6 2013/04/04 20:43:45 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings/BindingToPGF.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings/BindingToPGF.lua
index 0ad475fbf3e..90519e23d55 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings/BindingToPGF.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/bindings/BindingToPGF.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/bindings/BindingToPGF.lua,v 1.11 2015/06/08 21:58:24 tantau Exp $
+-- @release $Header$
@@ -63,10 +63,16 @@ require("pgf.gd.bindings").BindingToPGF = BindingToPGF
-- Imports
local lib = require "pgf.gd.lib"
+local Coordinate = require "pgf.gd.model.Coordinate"
+local Path = require "pgf.gd.model.Path"
+
-- The implementation
-- Forward
local table_in_pgf_syntax
+local animations_in_pgf_syntax
+local path_in_pgf_syntax
+local coordinate_in_pgf_syntax
@@ -140,7 +146,7 @@ function BindingToPGF:renderVertex(v)
local info = assert(self.storage[v], "thou shalt not modify the syntactic digraph")
tex.print(
string.format(
- "\\pgfgdcallbackrendernode{%s}{%.12fpt}{%.12fpt}{%.12fpt}{%.12fpt}{%.12fpt}{%.12fpt}{%s}",
+ "\\pgfgdcallbackrendernode{%s}{%.12fpt}{%.12fpt}{%.12fpt}{%.12fpt}{%.12fpt}{%.12fpt}{%s}{%s}",
'not yet positionedPGFINTERNAL' .. v.name,
info.x_min,
info.x_max,
@@ -148,7 +154,8 @@ function BindingToPGF:renderVertex(v)
info.y_max,
v.pos.x,
v.pos.y,
- info.box_count))
+ info.box_count,
+ animations_in_pgf_syntax(v.animations)))
end
function BindingToPGF:retrieveBox(index, box_num)
@@ -230,6 +237,7 @@ function BindingToPGF:renderEdge(e)
end
callback [#callback + 1] = '}'
+ callback [#callback + 1] = '{' .. animations_in_pgf_syntax(e.animations) .. '}'
-- hand TikZ code over to TeX
tex.print(table.concat(callback))
@@ -276,5 +284,91 @@ function table_in_pgf_syntax (t)
end
+function animations_in_pgf_syntax (a)
+ return
+ table.concat(
+ lib.imap(
+ a,
+ function(animation)
+ return "\\pgfanimateattribute{" .. animation.attribute .. "}{whom=pgf@gd," ..
+ table.concat(
+ lib.imap (
+ animation.entries,
+ function (entry)
+ return "entry={" .. entry.t .. "s}{" .. to_pgf(entry.value) .. "}"
+ end
+ ), ",") ..
+ "," ..
+ table.concat(
+ lib.imap(
+ animation.options or {},
+ function(table)
+ if table.value then
+ return table.key .. "={" .. to_pgf(table.value) .. "}"
+ else
+ return table.key
+ end
+ end), ",")
+ .. "}"
+ end)
+ )
+end
+
+
+function to_pgf(x)
+ if type (x) == "table" then
+ if getmetatable(x) == Coordinate then
+ return coordinate_in_pgf_syntax(x)
+ elseif getmetatable(x) == Path then
+ return path_in_pgf_syntax(x)
+ else
+ error("illegal table in value of a key to be passed back to pgf")
+ end
+ else
+ return tostring(x)
+ end
+end
+
+function path_in_pgf_syntax (p)
+
+ local s = {}
+
+ local i = 1
+ while i <= #p do
+ local c = p[i]
+ assert (type(c) == "string", "illegal path operand")
+
+ if c == "lineto" then
+ i = i + 1
+ local d = rigid(p[i])
+ s [#s + 1] = '\\pgfpathlineto{\\pgfqpoint{' .. to_pt(d.x) .. '}{' .. to_pt(d.y) .. '}}'
+ i = i + 1
+ elseif c == "moveto" then
+ i = i + 1
+ local d = rigid(p[i])
+ s [#s + 1] = '\\pgfpathmoveto{\\pgfqpoint{' .. to_pt(d.x) .. '}{' .. to_pt(d.y) .. '}}'
+ i = i + 1
+ elseif c == "closepath" then
+ s [#s + 1] = '\\pgfpathclose'
+ i = i + 1
+ elseif c == "curveto" then
+ local d1, d2, d3 = rigid(p[i+1]), rigid(p[i+2]), rigid(p[i+3])
+ i = i + 3
+ s [#s + 1] = '\\pgfpathcurveto{\\pgfqpoint{' .. to_pt(d1.x) .. '}{' .. to_pt(d1.y) .. '}}{\\pgfqpoint{'
+ .. to_pt(d2.x) .. '}{' .. to_pt(d2.y) .. '}}{\\pgfqpoint{'
+ .. to_pt(d3.x) .. '}{' .. to_pt(d3.y) .. '}}'
+ i = i + 1
+ else
+ error("illegal operation in edge path")
+ end
+ end
+
+ return table.concat(s)
+end
+
+function coordinate_in_pgf_syntax(c)
+ return '\\pgfqpoint{'..to_pt(c.x) .. '}{'.. to_pt(c.y) .. '}'
+end
+
-return BindingToPGF \ No newline at end of file
+return BindingToPGF
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular.lua
index 0249c9130af..cddfd96dfd4 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/circular.lua,v 1.1 2012/11/27 17:24:23 tantau Exp $
+--- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/Tantau2012.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/Tantau2012.lua
index 1966a3066c5..8e0d7d5bc66 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/Tantau2012.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/Tantau2012.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/circular/Tantau2012.lua,v 1.9 2014/03/19 09:20:57 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua
index d3c267394c4..e532e783e11 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/circular/doc.lua,v 1.1 2014/03/19 09:20:57 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
local documentation = require 'pgf.gd.doc'.documentation
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/library.lua
index ac229a8e0d0..016cfe483f7 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/library.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/circular/library.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/circular/library.lua,v 1.2 2013/04/04 20:43:45 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control.lua
index 3492510d242..a3bec1fef38 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control.lua,v 1.1 2012/11/27 17:24:23 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Anchoring.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Anchoring.lua
index a3f5de83194..ccbb097583c 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Anchoring.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Anchoring.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/Anchoring.lua,v 1.7 2014/03/19 09:20:58 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentAlign.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentAlign.lua
index f5475227245..dec07caaccd 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentAlign.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentAlign.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentAlign.lua,v 1.4 2013/05/23 20:01:25 tantau Exp $
+-- @release $Header$
local declare = require "pgf.gd.interface.InterfaceToAlgorithms".declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDirection.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDirection.lua
index 39df30ab248..a84800d94cf 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDirection.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDirection.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDirection.lua,v 1.2 2013/05/23 20:01:25 tantau Exp $
+-- @release $Header$
local declare = require "pgf.gd.interface.InterfaceToAlgorithms".declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDistance.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDistance.lua
index 30f5630ce52..5bf473e9c6a 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDistance.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDistance.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDistance.lua,v 1.2 2013/05/23 20:01:25 tantau Exp $
+-- @release $Header$
local declare = require "pgf.gd.interface.InterfaceToAlgorithms".declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentOrder.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentOrder.lua
index 63a8896e8a4..0cad5d7d9b5 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentOrder.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentOrder.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentOrder.lua,v 1.3 2013/05/23 20:01:25 tantau Exp $
+-- @release $Header$
local declare = require "pgf.gd.interface.InterfaceToAlgorithms".declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua
index 0d1d2b1bf48..9d9621e6da4 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua,v 1.3 2013/05/23 20:01:25 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Distances.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Distances.lua
index 046940d84f3..c1b64729fab 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Distances.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Distances.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/Distances.lua,v 1.5 2013/05/23 20:01:25 tantau Exp $
+-- @release $Header$
local declare = require "pgf.gd.interface.InterfaceToAlgorithms".declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/FineTune.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/FineTune.lua
index bb2fd065b24..be1666b255b 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/FineTune.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/FineTune.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/FineTune.lua,v 1.3 2013/05/23 20:01:25 tantau Exp $
+-- @release $Header$
local declare = require "pgf.gd.interface.InterfaceToAlgorithms".declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/LayoutPipeline.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/LayoutPipeline.lua
index 7a6a910dfa0..c998ca490aa 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/LayoutPipeline.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/LayoutPipeline.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/LayoutPipeline.lua,v 1.13 2014/03/19 09:20:58 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/NodeAnchors.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/NodeAnchors.lua
index b159f21eef2..e7d44d7d10e 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/NodeAnchors.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/NodeAnchors.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/NodeAnchors.lua,v 1.3 2013/10/08 09:21:17 tantau Exp $
+-- @release $Header$
local declare = require "pgf.gd.interface.InterfaceToAlgorithms".declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Orientation.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Orientation.lua
index a3205a06dbe..10f5ecdf471 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Orientation.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Orientation.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/Orientation.lua,v 1.2 2013/05/23 20:01:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Sublayouts.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Sublayouts.lua
index c10df7a0696..c28d12db563 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Sublayouts.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Sublayouts.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/Sublayouts.lua,v 1.4 2013/09/23 20:04:26 tantau Exp $
+-- @release $Header$
local function full_print(g, pref)
local s = ""
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua
index ac2b186f5d5..2d8317bd72d 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua,v 1.1 2014/03/19 09:20:58 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
local documentation = require 'pgf.gd.doc'.documentation
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/library.lua
index fbb3a33857d..e25e0cd628e 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/library.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/library.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/control/library.lua,v 1.9 2013/05/23 20:01:26 tantau Exp $
+-- @release $Header$
-- Load declarations from:
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Cluster.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Cluster.lua
index 748eee9429a..0b8d9e324fb 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Cluster.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Cluster.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Cluster.lua,v 1.1 2012/11/27 17:24:25 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Edge.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Edge.lua
index 22ba62e04af..7d6369d2bc9 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Edge.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Edge.lua
@@ -9,7 +9,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Edge.lua,v 1.1 2012/11/27 17:24:25 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Graph.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Graph.lua
index 43b886787c4..23712278990 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Graph.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Graph.lua
@@ -9,7 +9,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Graph.lua,v 1.1 2012/11/27 17:24:25 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Iterators.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Iterators.lua
index 8e29d78667a..9e41e1124ee 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Iterators.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Iterators.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Iterators.lua,v 1.1 2012/11/27 17:24:25 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Node.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Node.lua
index 89e8a2e68fa..84d3d3ee11f 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Node.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Node.lua
@@ -9,7 +9,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Node.lua,v 1.1 2012/11/27 17:24:25 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Vector.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Vector.lua
index ab94ebe9686..ef8500b5aeb 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Vector.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Vector.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/deprecated/Vector.lua,v 1.1 2012/11/27 17:24:25 tantau Exp $
+-- @release $Header$
--- Vector class
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc.lua
index 5d02603943c..428091a9ae4 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc.lua,v 1.2 2013/03/20 17:16:38 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased.lua
index 7dfd9179648..37878cd20f4 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased.lua,v 1.1 2013/03/07 22:28:37 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FMMMLayout.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FMMMLayout.lua
index 3f2b9bc2e30..0d987f7c5b6 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FMMMLayout.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FMMMLayout.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FMMMLayout.lua,v 1.2 2013/10/09 19:46:59 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FastMultipoleEmbedder.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FastMultipoleEmbedder.lua
index 8fe64399c91..4b676aff121 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FastMultipoleEmbedder.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FastMultipoleEmbedder.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/FastMultipoleEmbedder.lua,v 1.1 2013/03/15 15:04:41 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/GEMLayout.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/GEMLayout.lua
index d564af44dfa..674bc996f14 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/GEMLayout.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/GEMLayout.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/GEMLayout.lua,v 1.2 2013/10/07 18:43:25 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/MultilevelLayout.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/MultilevelLayout.lua
index 783ab8b4bff..4dc8d3b3fc7 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/MultilevelLayout.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/MultilevelLayout.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/MultilevelLayout.lua,v 1.1 2013/03/15 15:04:41 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFR.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFR.lua
index 2c5ae1bc293..b71d6629c13 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFR.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFR.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFR.lua,v 1.1 2013/11/07 15:43:35 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFRExact.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFRExact.lua
index 8d4462d0815..a79d94f7e2a 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFRExact.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFRExact.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderFRExact.lua,v 1.1 2013/11/07 15:43:35 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderKK.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderKK.lua
index a2882845c98..0d130b19235 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderKK.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderKK.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/SpringEmbedderKK.lua,v 1.1 2013/11/07 15:43:35 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/BarycenterPlacer.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/BarycenterPlacer.lua
index 20ca3ce3d12..55ac157e302 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/BarycenterPlacer.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/BarycenterPlacer.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/BarycenterPlacer.lua,v 1.1 2013/03/15 15:04:41 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/CirclePlacer.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/CirclePlacer.lua
index 0cda25ca466..1ef3e4914cb 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/CirclePlacer.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/CirclePlacer.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/CirclePlacer.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/EdgeCoverMerger.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/EdgeCoverMerger.lua
index 9623b70d89e..82af7b56366 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/EdgeCoverMerger.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/EdgeCoverMerger.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/EdgeCoverMerger.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/IndependentSetMerger.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/IndependentSetMerger.lua
index 15e11ff91c7..e65a9f41fe6 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/IndependentSetMerger.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/IndependentSetMerger.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/IndependentSetMerger.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/LocalBiconnectedMerger.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/LocalBiconnectedMerger.lua
index 352a1f5400a..7e5e261f55f 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/LocalBiconnectedMerger.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/LocalBiconnectedMerger.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/LocalBiconnectedMerger.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MatchingMerger.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MatchingMerger.lua
index eb52badcc55..e7f8144e3bb 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MatchingMerger.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MatchingMerger.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MatchingMerger.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MedianPlacer.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MedianPlacer.lua
index 50be16489c2..10a8ba58994 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MedianPlacer.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MedianPlacer.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/MedianPlacer.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomMerger.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomMerger.lua
index 4d8bfd179de..aafb8afd2ad 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomMerger.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomMerger.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomMerger.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomPlacer.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomPlacer.lua
index 779e992bb83..a0c9738fa17 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomPlacer.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomPlacer.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/RandomPlacer.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarMerger.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarMerger.lua
index 081067143da..99ff4c621d3 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarMerger.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarMerger.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarMerger.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarPlacer.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarPlacer.lua
index 21eb1f122ee..eb186a56157 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarPlacer.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarPlacer.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/SolarPlacer.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/ZeroPlacer.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/ZeroPlacer.lua
index f4dcfc632cc..e7722fd669a 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/ZeroPlacer.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/ZeroPlacer.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/energybased/multilevelmixer/ZeroPlacer.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered.lua
index 6dfa6a46575..77a679d2be2 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered.lua,v 1.2 2013/03/07 18:17:14 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/BarycenterHeuristic.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/BarycenterHeuristic.lua
index f0e20321e86..5e4138eecef 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/BarycenterHeuristic.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/BarycenterHeuristic.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/BarycenterHeuristic.lua,v 1.1 2013/03/07 18:17:14 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/CoffmanGrahamRanking.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/CoffmanGrahamRanking.lua
index b5fd3ba6669..e2c09f21242 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/CoffmanGrahamRanking.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/CoffmanGrahamRanking.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/CoffmanGrahamRanking.lua,v 1.1 2013/03/05 23:44:30 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/DfsAcyclicSubgraph.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/DfsAcyclicSubgraph.lua
index 4a4935e4aea..eced60b2ed6 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/DfsAcyclicSubgraph.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/DfsAcyclicSubgraph.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/DfsAcyclicSubgraph.lua,v 1.1 2013/03/05 23:44:30 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastHierarchyLayout.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastHierarchyLayout.lua
index af593f6d972..4d45270a01f 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastHierarchyLayout.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastHierarchyLayout.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastHierarchyLayout.lua,v 1.2 2013/03/07 22:28:37 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastSimpleHierarchyLayout.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastSimpleHierarchyLayout.lua
index 1798cb7e0df..719e6035699 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastSimpleHierarchyLayout.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastSimpleHierarchyLayout.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/FastSimpleHierarchyLayout.lua,v 1.1 2013/03/07 18:17:14 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyCycleRemoval.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyCycleRemoval.lua
index c0b407bb050..788baece4ff 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyCycleRemoval.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyCycleRemoval.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyCycleRemoval.lua,v 1.1 2013/03/05 23:44:30 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyInsertHeuristic.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyInsertHeuristic.lua
index f6c59ac2125..a8cd94ef197 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyInsertHeuristic.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyInsertHeuristic.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/GreedyInsertHeuristic.lua,v 1.1 2013/03/07 18:17:14 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/LongestPathRanking.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/LongestPathRanking.lua
index 65dd5176f8b..e81bb2e1c30 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/LongestPathRanking.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/LongestPathRanking.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/LongestPathRanking.lua,v 1.1 2013/03/05 23:44:30 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/MedianHeuristic.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/MedianHeuristic.lua
index 5ad07881fe1..b37480ac78c 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/MedianHeuristic.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/MedianHeuristic.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/MedianHeuristic.lua,v 1.1 2013/03/07 18:17:14 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/OptimalRanking.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/OptimalRanking.lua
index e694de6e790..64eb7eadd80 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/OptimalRanking.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/OptimalRanking.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/OptimalRanking.lua,v 1.1 2013/03/05 23:44:30 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SiftingHeuristic.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SiftingHeuristic.lua
index 6231ab49249..f54f0c33462 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SiftingHeuristic.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SiftingHeuristic.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SiftingHeuristic.lua,v 1.1 2013/03/07 18:17:14 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SplitHeuristic.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SplitHeuristic.lua
index fc897d71c51..1579c7153d9 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SplitHeuristic.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SplitHeuristic.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SplitHeuristic.lua,v 1.1 2013/03/07 18:17:14 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SugiyamaLayout.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SugiyamaLayout.lua
index d887b6c6bad..ef68a1db0db 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SugiyamaLayout.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SugiyamaLayout.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/layered/SugiyamaLayout.lua,v 1.4 2013/10/09 19:47:00 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout.lua
index e9c2c427774..bdf85e9905e 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout.lua,v 1.1 2013/03/15 15:04:41 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/BalloonLayout.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/BalloonLayout.lua
index 9a8dd45a641..bca8edd9ebc 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/BalloonLayout.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/BalloonLayout.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/BalloonLayout.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/CircularLayout.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/CircularLayout.lua
index 4cada7886b4..5c8a926384e 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/CircularLayout.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/CircularLayout.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/misclayout/CircularLayout.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/AcyclicSubgraphModule.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/AcyclicSubgraphModule.lua
index 97d3a7f0191..b2bb7e1d24c 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/AcyclicSubgraphModule.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/AcyclicSubgraphModule.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/AcyclicSubgraphModule.lua,v 1.1 2013/03/05 23:44:30 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/HierarchyLayoutModule.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/HierarchyLayoutModule.lua
index 9ee6a534eb4..a0292530cdb 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/HierarchyLayoutModule.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/HierarchyLayoutModule.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/HierarchyLayoutModule.lua,v 1.1 2013/03/07 22:28:37 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/InitialPlacer.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/InitialPlacer.lua
index 7fc5c535f2d..328a2806db8 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/InitialPlacer.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/InitialPlacer.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/InitialPlacer.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/MultilevelBuilder.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/MultilevelBuilder.lua
index d79f1c41fc7..9604c986409 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/MultilevelBuilder.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/MultilevelBuilder.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/MultilevelBuilder.lua,v 1.1 2013/03/15 15:04:43 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/RankingModule.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/RankingModule.lua
index 672a3375358..8dce27a3355 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/RankingModule.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/RankingModule.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/RankingModule.lua,v 1.1 2013/03/05 23:44:30 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/TwoLayerCrossMin.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/TwoLayerCrossMin.lua
index edc96e7b49f..877cba47f60 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/TwoLayerCrossMin.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/TwoLayerCrossMin.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/module/TwoLayerCrossMin.lua,v 1.1 2013/03/07 22:28:37 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity.lua
index 66835b6f012..c653bdc6b60 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity.lua,v 1.1 2013/05/23 20:01:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity/PlanarizationLayout.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity/PlanarizationLayout.lua
index bceba167894..516d119f553 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity/PlanarizationLayout.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity/PlanarizationLayout.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/doc/ogdf/planarity/PlanarizationLayout.lua,v 1.1 2013/05/23 20:01:26 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples.lua
index bf6907bddb1..de33c0ed371 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/examples.lua,v 1.1 2012/11/27 17:24:23 tantau Exp $
+--- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleDemo.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleDemo.lua
index cff5d95253a..da850ff0dea 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleDemo.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleDemo.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleDemo.lua,v 1.6 2013/12/20 14:44:46 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleEdgeDemo.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleEdgeDemo.lua
index 2becd305cf1..8eb9d7d7019 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleEdgeDemo.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleEdgeDemo.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleEdgeDemo.lua,v 1.3 2013/12/20 14:44:46 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleHuffman.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleHuffman.lua
index 1e3bd381e79..270ecce2c90 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleHuffman.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleHuffman.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/examples/SimpleHuffman.lua,v 1.5 2013/12/20 14:44:46 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/library.lua
index 0c8038d3148..85e74970095 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/library.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/examples/library.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/examples/library.lua,v 1.2 2013/04/04 20:43:45 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/GraphAnimationCoordination.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/GraphAnimationCoordination.lua
new file mode 100644
index 00000000000..2dd23937fe1
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/GraphAnimationCoordination.lua
@@ -0,0 +1,638 @@
+-- Copyright 2015 by Malte Skambath
+--
+-- This file may be distributed an/or modified
+--
+-- 1. under the LaTeX Project Public License and/or
+-- 2. under the GNU Public License
+--
+-- See the file doc/generic/pgf/licenses/LICENSE for more information
+
+
+--
+--
+-- @field.visible_objects An array which stores for each supernode a mapping
+-- of snapshots to the related visible snapshot nodes.
+-- Note that these mappings may differ from the supergraph
+-- because if there are two snapshot nodes in consecutive snapshots
+-- then the first can be shown for a longer time period to
+-- put aside some fade animations.
+-- @field is_first A table storing for each snapshot node or snapshot arc if it
+-- appears in its snapshot. This means that in the previous snapshot
+-- there is no corresponding arc or node.
+-- @field is_last A table storing for each snapshot node or arc if there
+-- is no representative in the next snapshot.
+-- @field move_on_enter A table which stores for each snapshot object if it is in
+-- motion while it appears in its snapshot.
+-- @field move_on_leave A table which stores for each snapshot object if it is in
+-- motion while switching to the next snapshot
+-- @field last_rep
+-- A table which stores for every snapshot node if the representing (visible) node
+-- disappears with the next snapshot.
+--
+-- @field previous_node The same as |next_node| just for the previous node
+-- @field next_node A Storage to map each snapshot node to the next node in the
+-- following snapshot related to the same supernode.
+-- If in the next snapshot there is node following snapshot node
+-- then the value is nil.
+--
+local GraphAnimationCoordination = {}
+
+-- Imports
+local lib = require "pgf.gd.lib"
+local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
+local Storage = require "pgf.gd.lib.Storage"
+local Coordinate = require "pgf.gd.model.Coordinate"
+
+
+declare {
+ key = "modified",
+ type = "boolean",
+ Initial = false,
+ documentation = [["
+ This key specifies, if a supernode changed its
+ visual properties since the last snapshot.
+ The default value is |false| and prevent the algorithm
+ to produce a lot of unnecessary animations.
+ "]]
+}
+
+declare {
+ key = "unmodified",
+ use = {
+ { key = "modified", boolean = false},
+ },
+}
+
+
+---
+declare {
+ key = "minimum rest time",
+ type = "number",
+ initial = 0.5,
+ documentation = [["
+ This key specifies a minimum time in which a single node
+ has to be prohibited to be animated.
+ For a node with minimum rest time of 1s that exists in a snapshot
+ at time $t$ this means that all animations including movements and fadings
+ are only allowed before $t$-0.5s and after $t$+0.5s.
+ "]],
+}
+
+declare {
+ key = "maximum motion time",
+ type = "number",
+ initial = math.huge,
+ documentation = [["
+ Use this key if you want to limit the time during nodes are allowed to move
+ when they changing their positions.
+ "]],
+}
+
+declare {
+ key = "overlapping transition",
+ type = "boolean",
+ initial = true,
+ documentation = [["
+ Use this key if you want to allow that the fade animations for or dissappearing nodes may occurs while the mid time between two snapshots. If false then the appearing ends on the midtime and the disappering starts in this moment.
+ "]]
+}
+
+---
+declare {
+ key = "default evolving graph animation",
+ algorithm = GraphAnimationCoordination,
+ phase = "evolving graph animation",
+ phase_default = true,
+ summary = [["
+ This phase animates all vertices including movements and
+ fade in or fade out animations given an evolving graph as sequence
+ of single snapshot graphs.
+ "]],
+ documentation = [["
+ This phase animates all vertices including movements and
+ fade in or fade out animations given an evolving graph as sequence
+ of single snapshot graphs.
+
+ Your algorithm needs to work on evolving graphs and has to use
+ the |evolving graph animation| phase. You do not need to use
+ this key by yourself then because this key starts the default
+ algorithm algorithm of the phase.
+
+ \begin{codeexample}[]
+ local ga_class = self.digraph.options.algorithm_phases['evolving graph animation']
+ -- animate graph
+ ga_class.new {
+ main_algorithm = self,
+ supergraph = supergraph,
+ digraph = self.digraph,
+ ugraph = self.ugraph
+ }:run()
+ \end{codeexample}
+
+ This algorithm and phase require a supergraph instance and the original digraph and ugraph.
+ Note that you have to set the layout of the snapshot nodes before running algorithms of this
+ is useful.
+
+ "]],
+}
+
+-- Helpfunctions
+
+--
+-- Appends a move animation to a given snapshot object such that the
+-- object moves from one point to another on a straight line. Note
+-- that the coordinates of the two points are given as relative
+-- coordinates to the current origin of the object.
+--
+-- This means if we want to move a node 1cm to the right the value of
+-- |c_from| has to be (0,0) while |c_to| must be (1,0). The argument
+-- |c_from| is usefull for a node which has a position but its
+-- previous node related to the same supervertex is at a different
+-- position. Then we can use this argument to move the new node to
+-- its origin position for smooth transitions.
+--
+-- @field object The snapshot object which should be moved
+--
+-- @field c_from The coordinate where the animation starts
+--
+-- @field c_to The coordinate where the animation should end
+--
+-- @field t_start The time when the movement starts.
+--
+-- @field t_end The time when the animation stops.
+local function append_move_animation(object, c_from, c_to, t_start, t_end)
+ if not object then return end
+ assert(object, "no object to animate")
+ if ((c_from.x~=c_to.x) or (c_from.y~=c_to.y))then
+ local animations = object.animations or {}
+ local c1 = Coordinate.new((2*c_from.x+c_to.x)/3,(2*c_from.y+c_to.y)/3)
+ local c2 = Coordinate.new((c_from.x+2*c_to.x)/3,(c_from.y+2*c_to.y)/3)
+ local t1 = (7*t_start + 5*t_end)/12
+ local t2 = (5*t_start + 7*t_end)/12
+ table.insert(animations, {
+ attribute = "translate",
+ entries = {
+ { t = t_start, value = c_from},
+-- { t = t1, value = c1 },
+-- { t = t2, value = c2 },
+ { t = t_end, value = c_to }
+ },
+ options = { { key = "freeze at end", },
+-- {key = "entry control", value="0}{1",}
+ }
+ })
+ object.animations = animations
+ end
+end
+
+local function append_fade_animation(object, v_start, v_end, t_start, t_end)
+ local animations = object.animations or {}
+
+ if v_start == 0 then
+ table.insert(animations, {
+ attribute = "stage",
+ entries = { { t = t_start, value = "true"}, },
+ options = { { key = "freeze at end" } }
+ })
+ elseif v_end == 0 and nil then
+ table.insert(animations, {
+ attribute = "stage",
+ entries = { { t = t_end, value = "false"}, },
+ options = { --{ key = "freeze at end" }
+ }
+ })
+ end
+
+ table.insert(animations, {
+ attribute = "opacity",
+ entries = {
+ { t = t_start, value = v_start },
+ { t = t_end, value = v_end } },
+ options = { { key = "freeze at end" } }
+ })
+ object.animations = animations
+end
+
+--
+-- check if the difference/vector between two pairs (a1,a2),(b1,b2) of points
+-- is the same.
+local function eq_offset(a1, a2, b1, b2)
+ local dx = ((a1.x-a2.x) - (b1.x-b2.x))
+ local dy = ((a1.y-a2.y) - (b1.y-b2.y))
+ if dx<0 then dx = -dx end
+ if dy<0 then dy = -dy end
+ return dx<0.001 and dy<0.001
+end
+
+--
+-- Check if two arcs connect a pair of nodes at the same position.
+-- This can be used as an indicator that two consecutive arcs
+-- can be representet by the same arc object.
+--
+local function eq_arc(arc1, arc2)
+ if not arc1 or not arc2 then
+ return false
+ end
+ return eq_offset(arc1.tail.pos, arc1.head.pos, arc2.tail.pos, arc2.head.pos)
+end
+
+
+-- Implementation
+
+function GraphAnimationCoordination:run()
+ assert(self.supergraph, "no supergraph defined")
+
+ self.is_first = Storage.new()
+ self.is_last = Storage.new()
+ self.last_rep = Storage.new()
+ self.move_on_enter = Storage.new()
+ self.move_on_leave = Storage.new()
+ self.previous_node = Storage.new()
+ self.next_node = Storage.new()
+ self.visible_objects = Storage.new()
+
+
+ self:precomputeNodes()
+ self:precomputeEdges()
+ self:animateNodeAppearing()
+ self:animateEdgeAppearing()
+ self:generateNodeMotions()
+ self:generateEdgeMotions()
+end
+
+function GraphAnimationCoordination:generateNodeMotions(node_types)
+ local supergraph = self.supergraph
+ local graph = self.digraph
+
+ for _, supervertex in ipairs(self.supergraph.vertices) do
+ local lj = -1
+ local last_v = nil
+ local last_time = nil
+ for j, s in ipairs(supergraph.snapshots) do
+ local vertex = supergraph:getSnapshotVertex(supervertex, s)
+
+ if lj == j-1 and vertex and last_v then
+ local mrt1 = last_v.options["minimum rest time"]/2
+ local mrt2 = vertex.options["minimum rest time"]/2
+
+ local s1 = Coordinate.new(0,0)
+ local e1 = Coordinate.new(vertex.pos.x-last_v.pos.x,-vertex.pos.y+last_v.pos.y)
+
+ local s2 = Coordinate.new(-vertex.pos.x+last_v.pos.x,vertex.pos.y-last_v.pos.y)
+ local e2 = Coordinate.new(0,0)
+
+ local t_end = s.timestamp - math.max(0, mrt2)
+ local t_start = last_time + math.max(0,mrt1)
+
+ local representative = self.visible_objects[supervertex][s]
+ if representative == vertex then
+ append_move_animation(vertex, s2, e2, t_start, t_end)
+ append_move_animation(last_v, s1, e1, t_start, t_end)
+ else
+ append_move_animation(representative,s1,e1,t_start,t_end)
+ end
+ end
+ last_time = s.timestamp
+ lj = j
+ last_v = vertex
+ end
+ end
+end
+
+
+
+
+
+function GraphAnimationCoordination:generateEdgeMotions()
+ local supergraph = self.supergraph
+ local graph = self.digraph
+
+ for i, arc in ipairs(supergraph.arcs) do
+ local head = arc.head
+ local tail = arc.tail
+
+ local last_arc = nil
+ local last_time = nil
+ local last_v = nil
+ local last_w = nil
+
+ for j, s in ipairs(supergraph.snapshots) do
+ local v = supergraph:getSnapshotVertex(tail,s)
+ local w = supergraph:getSnapshotVertex(head,s)
+
+ if v and w then
+ local this_arc = graph:arc(v,w) --or graph:arc(w,v)
+ if this_arc then
+ if this_arc and last_arc then
+ local mrt1 = last_v.options["minimum rest time"]/2
+ local mrt2 = v.options["minimum rest time"]/2
+
+ local s1 = Coordinate.new(0,0)--lv.pos
+ local e1 = Coordinate.new(v.pos.x-last_v.pos.x,-v.pos.y+last_v.pos.y)
+
+ local s2 = Coordinate.new(-v.pos.x+last_v.pos.x,v.pos.y-last_v.pos.y)
+ local e2 = Coordinate.new(0,0)
+
+ local t_end = s.timestamp - math.max(0,mrt2)
+ local t_start = last_time + math.max(0,mrt1)
+
+ local representative = self.visible_objects[arc][s]
+ if representative == this_arc then
+ append_move_animation(last_arc, s1, e1, t_start,t_end)
+ append_move_animation(this_arc, s2, e2, t_start,t_end)
+ else
+ append_move_animation(representative,s1,e1,t_start,t_end)
+ end
+ this_arc = representative
+ end
+ last_arc = this_arc
+ last_v = v
+ last_time = s.timestamp
+ else
+ last_arc = nil
+ end
+ else
+ last_arc = nil
+ end
+ end
+ end
+end
+
+--
+--
+-- @field t_transition The mid time between two snapshot times.
+-- @field fade_duration The duration of the fade animation
+-- @field overlapping A boolean defining if the animation occurs
+-- beofre and after the mid time (true) or if it
+-- starts/end only in one interval (false)
+-- @field closing A boolean specifieng if this is a outfading time
+local function compute_fade_times(t_transition, fade_duration, overlapping, closing)
+
+ if overlapping then
+ t_start = t_transition - fade_duration / 2
+ t_end = t_transition + fade_duration / 2
+ else
+ if closing then
+ t_start = t_transition - fade_duration
+ t_end = t_transition
+ else
+ t_start = t_transition
+ t_end = t_transition + fade_duration
+ end
+ end
+ return {t_start = t_start, t_end = t_end}
+end
+
+function GraphAnimationCoordination:animateNodeAppearing()
+ local supergraph = self.supergraph
+ for i,vertex in ipairs(self.ugraph.vertices) do
+ local snapshot = supergraph:getSnapshot(vertex)
+ local interval = snapshot.interval
+ local supernode = supergraph:getSupervertex(vertex)
+ local representative = self.visible_objects[supernode][snapshot]
+ local overlapping_in = true -- init true for crossfading
+ local overlapping_out= true
+ local minimum_rest_time = math.max(0,vertex.options["minimum rest time"])
+ local allow_overlapping = vertex.options["overlapping transition"]
+ local fadein_duration = 0.01
+ local fadeout_duration = 0.01
+
+ if self.is_first[vertex] then
+ fadein_duration = self.ugraph.options["fadein time"]
+ overlapping_in = false or allow_overlapping
+ end
+ if self.is_last[vertex] then
+ fadeout_duration = self.ugraph.options["fadeout time"]
+ overlapping_out = false or allow_overlapping
+ end
+
+ if fadein_duration == math.huge or fadein_duration<0 then
+ fadein_duration = (interval.to-interval.from-minimum_rest_time)/2
+ if overlapping then fadein_duration = fadein_duration * 2 end
+ end
+ if fadeout_duration == math.huge or fadeout_duration<0 then
+ fadeout_duration = (interval.to-interval.from-minimum_rest_time)/2
+ if overlapping then fadeout_duration = fadeout_duration*2 end
+ end
+
+ local fin = compute_fade_times(interval.from, fadein_duration, overlapping_in, false)
+ local fout = compute_fade_times(interval.to, fadeout_duration, overlapping_out, true)
+
+ vertex.animations = vertex.animations or {}
+
+ if representative~= vertex then
+ table.insert(vertex.animations,{
+ attribute = "stage",
+ entries = { { t = 0, value = "false"}, },
+ options = {}
+ })
+ end
+
+ if interval.from > -math.huge and (vertex == representative or self.is_first[vertex]) then
+ -- only appears if the snapshot node is its own repr. or if in the prev snapshot is
+ -- no representative.
+ append_fade_animation(representative, 0, 1, fin.t_start, fin.t_end)
+ end
+ if interval.to < math.huge and (self.is_last[vertex] or self.last_rep[vertex]) then
+ -- The snapshot node only disappears when the node is not visible
+ -- in the next or (this=)last snapshot:
+ append_fade_animation(representative, 1, 0, fout.t_start, fout.t_end)
+ end
+ end
+end
+
+
+
+function GraphAnimationCoordination:animateEdgeAppearing()
+ local supergraph = self.supergraph
+ local graph = self.digraph
+ for _,edge in ipairs(graph.arcs) do
+ local snapshot = supergraph:getSnapshot(edge.head)
+ local int = snapshot.interval
+ local superarc = supergraph:getSuperarc(edge)
+ local representative = self.visible_objects[superarc][snapshot] or edge
+
+ local minimum_rest_time = math.max(0,edge.head.options["minimum rest time"]/2,
+ edge.tail.options["minimum rest time"]/2)
+
+ local appears = math.max(int.from, int.from)
+ local disappears = math.min(int.to, int.to)
+
+ local overlapping_in = true -- init true for crossfading
+ local overlapping_out= true
+ local fadein_duration = 0.01
+ local fadeout_duration = 0.01
+ local allow_overlapping = (edge.tail.options["overlapping transition"] and edge.head.options["overlapping transition"])
+
+ if self.is_first[edge] and not self.move_on_enter[edge] and not self.move_on_enter[edge.head] then
+ fadein_duration = self.ugraph.options["fadein time"]
+ overlapping_in = false or allow_overlapping
+ end
+
+ if self.is_last[edge] and not self.move_on_leave[edge] then
+ fadeout_duration = self.ugraph.options["fadeout time"]
+ overlapping_out = false or allow_overlapping
+ end
+
+
+ if self.is_first[edge]
+ and (self.move_on_enter[edge.head]
+ or self.move_on_enter[edge.tail] )
+ then
+ appears = snapshot.timestamp - minimum_rest_time
+ end
+ if self.is_last[edge] and
+ (self.move_on_leave[edge.head]
+ or self.move_on_leave[edge.tail]
+ ) then
+ disappears = snapshot.timestamp + minimum_rest_time
+ end
+
+ local fin = compute_fade_times(appears, fadein_duration, overlapping_in,false)
+ local fout = compute_fade_times(disappears,fadeout_duration,overlapping_out,true)
+
+ edge.animations = edge.animations or {}
+
+ if representative~=edge then
+ table.insert(edge.animations,{
+ attribute = "stage",
+ entries = { { t = 0, value = "false"}, },
+ options = {}})
+ end
+
+ -- Fade in:
+ if appears > -math.huge and (edge == representative or self.is_first[edge]) then
+ append_fade_animation(representative, 0, 1, fin.t_start, fin.t_end )
+ end
+
+ -- Fade out:
+ if disappears < math.huge and (self.is_last[edge] or self.last_rep[edge])then
+ append_fade_animation(representative, 1, 0, fout.t_start,fout.t_end )
+ end
+
+ end
+
+end
+
+function GraphAnimationCoordination:precomputeNodes()
+ local supergraph = self.supergraph
+
+ for _, supernode in ipairs(supergraph.vertices) do
+
+ local vis_nodes = {}
+ self.visible_objects[supernode] = vis_nodes
+
+ local any_previous_node = nil
+ local previous_representant = nil
+ local node_before = nil
+
+ for i, s in ipairs(supergraph.snapshots) do
+ local node = supergraph:getSnapshotVertex(supernode, s)
+
+ if node then
+ -- assume the node is the last node
+ self.is_last[node] = true
+
+ if node.options["modified"] then
+ -- modified
+ vis_nodes[s] = node
+ previous_representant = node
+ if any_previous_node then
+ self.last_rep[any_previous_node] = true
+ end
+ else
+ -- unmodified
+ previous_representant = previous_representant or node
+ vis_nodes[s] = previous_representant
+ end
+ any_previous_node = node
+
+ if node_before then
+ self.is_last[node_before] = false
+ self.previous_node[node] = node_before
+ self.next_node[node_before] = node
+
+ local do_move = (( node.pos.x ~= node_before.pos.x )
+ or (node.pos.y ~= node_before.pos.y))
+ self.move_on_enter[node] = do_move
+ self.move_on_leave[node_before] = do_move
+ else
+ self.is_first[node] = true
+ end
+ node_before = node
+ else
+ node_before = nil
+ end
+ end
+ end
+end
+
+function GraphAnimationCoordination:precomputeEdges()
+ -- 1. classify arcs (appearing, disappearing)
+ for _, arc in ipairs(self.digraph.arcs) do
+ local head = arc.head
+ local tail = arc.tail
+ if not ( self.is_first[head] or self.is_first[tail]) then
+ if not self.digraph:arc(self.previous_node[tail], self.previous_node[head]) then
+ -- new arc connects existing nodes
+ self.is_first[arc] = true
+ end
+ else
+ -- arc and at least one node is new.
+ self.is_first[arc] = true
+ end
+ if not ( self.is_last[head] or self.is_last[tail]) then
+ if not self.digraph:arc(self.next_node[tail],self.next_node[head]) then
+ -- arc disappears while nodes are still in the next snapshot
+ self.is_last[arc] = true
+ end
+ else
+ -- arc and at least one node disappears in the next snapshot
+ self.is_last[arc] = true
+ end
+ self.move_on_enter[arc] = self.move_on_enter[head] or self.move_on_enter[tail]
+ self.move_on_leave[arc] = self.move_on_leave[head] or self.move_on_leave[tail]
+ end
+
+ -- 2. precompute the unmodified edges
+ local supergraph = self.supergraph
+
+ for _, superarc in ipairs(supergraph.arcs) do
+ local vis_objects = {}
+ self.visible_objects[superarc] = vis_objects
+
+ local previous_arc
+ local previous_representant
+
+ for _, s in ipairs(supergraph.arc_snapshots[superarc]) do
+ local head = supergraph:getSnapshotVertex(superarc.head, s)
+ local tail = supergraph:getSnapshotVertex(superarc.tail, s)
+ -- use the digraph because the snapshot arc is not syncted
+ local arc = self.digraph:arc(tail, head)
+
+ local modified = false
+ local opt_array = arc:optionsArray('modified')
+ for i = 1,#opt_array.aligned do
+ modified = modified or opt_array[i]
+ end
+
+ if modified or
+ not eq_arc(arc, previous_arc) or self.is_first[arc] then
+ --modified
+ previous_representant = arc
+ vis_objects[s] = arc
+ if previous_arc then
+ self.last_rep[previous_arc] = true
+ end
+ else
+ -- unmodified
+ previous_representant = previous_representant or arc
+ vis_objects[s] = previous_representant
+ end
+ previous_arc = arc
+ end
+ end
+end
+-- Done
+
+return GraphAnimationCoordination
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/GreedyTemporalCycleRemoval.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/GreedyTemporalCycleRemoval.lua
new file mode 100644
index 00000000000..17c46aa352c
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/GreedyTemporalCycleRemoval.lua
@@ -0,0 +1,177 @@
+-- Copyright 2015 by Malte Skambath
+--
+-- This file may be distributed an/or modified
+--
+-- 1. under the LaTeX Project Public License and/or
+-- 2. under the GNU Public License
+--
+-- See the file doc/generic/pgf/licenses/LICENSE for more information
+
+
+local GreedyTemporalCycleRemoval = {}
+
+-- Imports
+local lib = require "pgf.gd.lib"
+local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
+
+local Vertex = require "pgf.gd.model.Vertex"
+local Digraph = require "pgf.gd.model.Digraph"
+local Coordinate = require "pgf.gd.model.Coordinate"
+
+local PriorityQueue = require "pgf.gd.lib.PriorityQueue"
+
+-- Keys
+
+---
+
+declare {
+ key = "split critical arc head",
+ type = "boolean",
+ initial = true,
+ summary = "Specifies, that for a critical the tail node is separated"
+}
+
+---
+
+declare {
+ key = "split critical arc tail",
+ type = "boolean",
+ initial = true,
+ summary = "Specifies, that for a critical the tail node is separated"
+}
+
+---
+
+declare {
+ key = "greedy temporal cycle removal",
+ algorithm = GreedyTemporalCycleRemoval,
+ phase = "temporal cycle removal",
+ phase_default = true,
+ summary = [["
+ A temporal dependency cycle is a cyclic path in the supergraph of
+ an evolving graph. Use this key if you want remove all temporal
+ dependency cycles by a greedy strategy which incrementally inserts
+ edge checks if this edge creates a cycle and splits at least one node
+ into two supernode at a given time.
+ "]],
+ documentation = [["
+ See ToDo
+ "]]
+}
+
+-- Helpfunctions
+local function reachable(graph, v, w)
+ local visited = {}
+ local queue = PriorityQueue.new()
+ queue:enqueue(v,1)
+ while not queue:isEmpty() do
+ local vertex = queue:dequeue()
+ if vertex==w then
+ return true
+ end
+ local outgoings = graph:outgoing(vertex)
+ for _, e in ipairs(outgoings) do
+ local head = e.head
+ if not visited[head] then
+ visited[head] = true
+ if head == w then
+ return true
+ else
+ queue:enqueue(head,1)
+ end
+ end
+ end
+ end
+ return false
+end
+
+-- Implementation
+
+function GreedyTemporalCycleRemoval:run()
+ local supergraph = assert(self.supergraph, "no supergraph passed")
+ local digraph = assert(self.digraph, "no digraph passed to the phase")
+ local split_tail = digraph.options["split critical arc tail"]
+ local split_head = digraph.options["split critical arc head"]
+ assert(split_tail or split_head, "without splitting nodes dependency cycles cannot be removed.")
+
+ self:iterativeCycleRemoval(supergraph, split_tail, split_head)
+end
+
+--
+-- Resolves all dependencies by splitting supernodes into multiple supernodes.
+-- To resolve a cycle each edge will be inserted into a dependency graph
+-- successively. Each time such edge closes a cycle the head and tail will
+-- be splitet at the related snapshot.
+--
+-- @param supergraph
+--
+function GreedyTemporalCycleRemoval:iterativeCycleRemoval(supergraph, split_tail, split_head)
+ -- Build up the global dependency graph
+ -- A supernode v directly depends on another supernode w iff
+ -- there is a snapshot in which w is a child of w
+ local dependency_graph = Digraph.new(supergraph)
+ local stable_arcs = {}
+ for i, snapshot in ipairs(supergraph.snapshots) do
+ --local tree = snapshot.spanning_tree
+ for _,tree in ipairs(snapshot.spanning_trees) do
+ local new_arcs = {}
+
+ for _, e in ipairs(tree.arcs) do
+ if e.head.kind ~= "dummy" and e.tail.kind~="dummy" then
+ table.insert(new_arcs, e)
+
+ local sv = supergraph:getSupervertex(e.tail)
+ local sw = supergraph:getSupervertex(e.head)
+ local dep_arc = dependency_graph:arc(sv, sw)
+
+
+ if (not dep_arc) then
+ -- check if the edge v->w closes a cycle in the dependencygraph
+ --pgf.debug{dependency_graph}
+ local cycle_arc = reachable(dependency_graph, sw, sv)
+ dep_arc = dependency_graph:connect(sv,sw)
+-- texio.write("\ncheck ".. sv.name.."->" .. sw.name)
+ if cycle_arc then
+ if split_tail then
+ supergraph:splitSupervertex(sv, { [1]=snapshot })
+ end
+ if split_head then
+ supergraph:splitSupervertex(sw, { [1]=snapshot })
+ end
+
+ -- rebuild dependency graph
+ dependency_graph = Digraph.new(supergraph)
+
+ for _, arc in ipairs(stable_arcs) do
+ dependency_graph:connect(arc.tail, arc.head)
+ end
+
+ for _, arc in ipairs(new_arcs) do
+ local sv = supergraph:getSupervertex(arc.tail)
+ local sw = supergraph:getSupervertex(arc.head)
+ dependency_graph:connect(sv, sw)
+ end
+ end -- end of resovle cycle_arc
+ end
+ end
+ end
+ -- Stable Arcs:
+ for _, arc in ipairs(new_arcs) do
+
+ local sv = supergraph:getSupervertex(arc.tail)
+ local sw = supergraph:getSupervertex(arc.head)
+ local deparc = dependency_graph:arc(sv, sw)
+-- if not deparc or not stable_arcs[deparc] then
+-- stable_arcs[deparc] = true
+ table.insert(stable_arcs, deparc)
+-- end
+
+ end
+ end -- end for spanning_tree
+ end -- end for snapshot
+end
+
+
+-- Done
+
+return GreedyTemporalCycleRemoval
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/Skambath2016.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/Skambath2016.lua
new file mode 100644
index 00000000000..23bbdf36a8c
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/Skambath2016.lua
@@ -0,0 +1,875 @@
+-- Copyright 2015 by Malte Skambath
+--
+-- This file may be distributed an/or modified
+--
+-- 1. under the LaTeX Project Public License and/or
+-- 2. under the GNU Public License
+--
+-- See the file doc/generic/pgf/licenses/LICENSE for more information
+--
+
+-- Imports
+require "pgf.gd.trees.ChildSpec"
+
+local Digraph = require "pgf.gd.model.Digraph"
+local Vertex = require "pgf.gd.model.Vertex"
+
+local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
+local layered = require "pgf.gd.layered"
+local tlayered = require "pgf.gd.experimental.evolving.layered"
+local SpanningTreeComputation = require "pgf.gd.trees.SpanningTreeComputation"
+local lib = require "pgf.gd.lib"
+
+local Storage = require "pgf.gd.lib.Storage"
+local PriorityQueue = require "pgf.gd.lib.PriorityQueue"
+
+local Supergraph = require "pgf.gd.experimental.evolving.Supergraph"
+
+local LayoutPipeline = require "pgf.gd.control.LayoutPipeline"
+local Direct = require "pgf.gd.lib.Direct"
+
+--
+--
+local Skambath2016 = {}
+
+
+---
+declare {
+ key = "animated tree layout",
+ algorithm = Skambath2016,
+ postconditions = {
+ upward_oriented = true
+ },
+ documentation_in = "pgf.gd.evolving.doc"
+}
+
+---
+declare {
+ key = "animated binary tree layout",
+ use = {
+ { key = "animated tree layout" },
+ { key = "minimum number of children", value = 2 },
+ { key = "significant sep", value = 0 },
+ },
+
+ documentation_in = "pgf.gd.evolving.doc"
+}
+
+---
+declare {
+ key = "extended animated binary tree layout",
+ use = {
+ { key = "animated tree layout" },
+ { key = "minimum number of children", value=2 },
+ { key = "missing nodes get space" },
+ { key = "significant sep", value = 0 }
+ },
+ documentation_in = "pgf.gd.evolving.doc"
+}
+
+
+
+
+
+-- Helpfunctions
+
+---
+-- Borders models the borderlines / the line of border vertices
+-- of a tree or subtree structure which can change over time.
+-- Each ordered and rooted tree or subtree has vertices per layer for which they
+-- are on the outer places. On the left or respectivly on the right.
+-- The field |left| and |right| stores the both borderlines.
+-- A \emph{borderline} is an array. This array contains for each layer of the tree
+-- a table mapping a given snapshot to the related border-vertex of the layer
+-- in the snapshot.
+--
+-- @field left
+-- @field right
+--
+local Borders = {}
+Borders.__index = Borders
+
+
+-- Namespace
+
+--require("pgf.gd.experimental.evolving").Borders = Borders
+
+
+--- Create a new tree border description.
+--
+--
+function Borders.new()
+ return setmetatable( {left = {}, right = {}}, Borders )
+end
+
+function Borders:addBoth(layer, snapshot, vertex)
+ local lleft = self.left[layer] or {}
+ local lright = self.right[layer] or {}
+ assert(not lleft[snapshot] and not lright[snapshot], "borders already defined for given layer and snapshot")
+ lleft[snapshot] = vertex
+ lright[snapshot] = vertex
+ self.left[layer] = lleft
+ self.right[layer] = lright
+end
+
+function Borders:appendBelow(level, borders)
+ assert(borders, "invalid argument for borders. Value must not be 'nil'.")
+ assert((#self.left == #self.right) and (#self.left == level), "cannot be appended")
+ local new_level = borders:getLevel()
+ for i = 1, new_level do
+ self.left[i + level] = borders.left[i]
+ self.right[i + level] = borders.right[i]
+ end
+end
+
+---
+--
+-- @return the number of levels in which bordervertices exists.
+function Borders:getLevel()
+ assert(#self.left == #self.right, "different levels")
+ return #self.left
+end
+
+function Borders.copyBordersAtSnapshot(source, target, snapshot)
+ local source_level = source:getLevel()
+ for i = 1, source_level do
+ level_border_left = target.left[i] or {}
+ level_border_right = target.right[i] or {}
+ assert(not level_border_left[snapshot] and not level_border_right[snapshot],
+ "border for a given snapshat already defined")
+ level_border_left[snapshot] = source.left[i][snapshot]
+ level_border_right[snapshot] = source.right[i][snapshot]
+ target.left[i] = level_border_left
+ target.right[i] = level_border_right
+ end
+end
+
+--
+-- Adapt existing borders with the borders of a group which will be
+-- placed on the right next to the existing borders. For each level
+-- and time in which the group has a border the borders on the right
+-- will be replaced with this border. If it is not existing in the old
+-- borders then also the left border will be adapted
+--
+-- @param borders The existing borders. These will be modified with
+-- the borders of
+--
+-- @param group_borders The borders of the group
+--
+-- @param snapshots All snapshots in which checking for distances is necessary.
+--
+local function adapt_borders(borders, group_borders, snapshots, ignore_dummies)
+ for level = 1, group_borders:getLevel() do
+ local l = borders.left[level] or {}
+ local r = borders.right[level] or {}
+ for _, s in pairs(snapshots) do
+ if ignore_dummies then
+ local gls,grs = group_borders.left[level][s], group_borders.right[level][s]
+ if gls~=nil then
+ if gls.kind~="dummy" then
+ l[s] = l[s] or gls
+ end
+ end
+ if grs~=nil then
+ if grs.kind~="dummy" then
+ r[s] = grs or r[s]
+ end
+ end
+ else
+ l[s] = l[s] or group_borders.left[level][s]
+ r[s] = group_borders.right[level][s] or r[s]
+ end
+
+ end
+ borders.left[level] = l
+ borders.right[level] = r
+ end
+
+end
+
+--
+-- Shift all vertices of a group and their descendants
+-- for a certain length into horizontal direction.
+--
+-- @param shift the length all involved vertices
+-- should be shifted in horizontal direction
+--
+--
+-- @param group A group of the spanning trees that should be shifted.
+-- A group entry has to map snapshots to root nodes
+--
+-- @param snapshots An array of at least all snapshots in which the group
+-- has a vertex
+--
+-- @param descendants A table or Storage storing the list of descendants
+-- for each vertex
+--
+-- @return the highest x-coordinate of vertices in the group after the shift.
+-- If there is no vertex which was shifted then -math.huge
+-- will be returned
+--
+local function shift_group(shift, group, snapshots, descendants)
+ assert(group,"no group passed")
+ assert(shift~=math.huge and shift ~=-math.huge,
+ "shift must be a valid finit length")
+ local shifted = {} -- remember which vertex was shifted during this run
+ local anchor = -math.huge
+ for _, s in ipairs(snapshots) do
+ local v = group[s]
+ if not shifted[v] and v then
+ v.pos.x = v.pos.x + shift
+ shifted[v] = true
+
+ -- also shift all descendants of the group vertex
+ for _, d in ipairs(descendants[v]) do
+ if not shifted[d] then
+ d.pos.x = d.pos.x + shift
+ shifted[d] = true
+ end
+ end
+ anchor = math.max(anchor, v.pos.x )
+ end
+ end
+ return anchor
+end
+
+--
+-- Traverse through the spanneng tree |tree| of a snapshot and sort
+-- the child nodes into groups. A group summarises for a given parent
+-- node all children node over time that are at the same child
+-- position. The k-th child group groups[i] maps each snapshot to the
+-- k-th node in the related snapshot.
+--
+--
+-- @field supergraph the supergraph
+--
+-- @field tree the tree or spanning tree to decide the indices of the
+-- child nodes
+--
+-- @field childgroups a Storage which contains the list of childgroups
+-- for each supernode
+--
+-- @field snapshot
+--
+local function precompute_childgroups(supergraph, tree, node, childgroups, snapshot)
+ local outgoings = tree:outgoing(node)
+ if #outgoings > 0 then
+ local supervertex = supergraph:getSupervertex(node)
+ local groups = childgroups[supervertex] or {}
+ for i, e in ipairs(outgoings) do
+
+ group = groups[i] or {}
+ assert(e.head, "no edge")
+ group[snapshot] = e.head
+ groups[i] = group
+ precompute_childgroups(supergraph, tree, e.head, childgroups, snapshot)
+ end
+ assert(supervertex, "no mv")
+ childgroups[supervertex] = groups
+ end
+end
+
+--
+-- Use this function to compute the horizontal positions of all
+-- vertices in a tree by accumulation of the relative shifts on the
+-- path from the root to the vertex recursively.
+--
+-- @param tree the tree in which the vertice's position should be
+-- computed.
+--
+-- @param vertex the next vertex that gets its absolute coordinate.
+--
+-- @param shifts a Storage, which stores for each node the relative
+-- shift between the vertex and its parent.
+--
+-- @param abs_shift the sum of all relative shifts on the path from
+-- the root to the vertex.
+--
+local function accumulate_hpos(tree, vertex, shifts, abs_shift)
+ local new_shift = abs_shift + shifts[vertex]
+ local test = vertex.pos.x
+ vertex.pos.x = new_shift
+-- if vertex.pos.x - test > 0.0001 then texio.write("X")end
+ local outgoings = tree:outgoing(vertex)
+ for _, e in ipairs(outgoings) do
+ accumulate_hpos(tree, e.head, shifts, new_shift)
+ end
+end
+
+
+local function get_next(border_pair, next)
+ local nl = next.left[border_pair.left]
+ local nr = next.right[border_pair.right]
+ assert ((nl and nr) or (not nl and not nr))
+ return {left = nl, right = nr,
+ }
+end
+
+local function add_shift(abs_shift, border_pair, next)
+ abs_shift.left = abs_shift.left + next.left_shift[border_pair.left]
+ abs_shift.right = abs_shift.right + next.right_shift[border_pair.right]
+end
+
+--
+-- Given a tree, computes the required distance between the i-th and the (i+1)-th subtree
+-- of the vertex |snapshot_vertex|.
+--
+-- @param shifts a Storage, which contains for each vertex the relative horizontal shift
+-- to its parent vertex.
+--
+function Skambath2016:computeRequiredDistance(tree, vertex, i, shifts, next)
+ local outgoings = tree:outgoing(vertex)
+-- texio.write("\n::"..vertex.name.. " "..i.."|"..(i+1))
+ if #outgoings > 0 then
+ local clumb = {left = outgoings[1].head,right = outgoings[i].head}
+ if clumb.right.kind=="dummy" then shifts[clumb.right] = 0 end
+ local v0 = outgoings[i].head
+ local v1 = outgoings[i+1].head
+ local shift = layered.ideal_sibling_distance(self.adjusted_bb, self.ugraph, v0, v1) + shifts[clumb.right]
+ local last0 = {left = clumb.left, right = clumb.right}
+ local last1 = {left = v1, right = v1}
+ local next0 = get_next(last0, next)
+ local next1 = get_next(last1, next)
+ local abs_shift0 = {left = shifts[clumb.left], right = shifts[clumb.right]}
+ local abs_shift1 = {left = 0, right = 0}
+
+ while (next0.left and next1.left) do
+ add_shift(abs_shift0, last0, next)
+ add_shift(abs_shift1, last1, next)
+
+ shift = math.max(shift,
+ layered.ideal_sibling_distance(self.adjusted_bb,
+ self.ugraph,
+ next0.right,
+ next1.left)
+ + abs_shift0.right - abs_shift1.left)
+-- texio.write("\n | "..(next0.right.name or "dummy").."<->"..(next1.left.name or "dummy").." :\t"..shift)
+ last0, last1 = next0, next1
+ next0 = get_next(next0, next)
+ next1 = get_next(next1, next)
+ end
+ return shift, {l0 = last0, l1 = last1, n0 = next0, n1 = next1,abs_shift1 = abs_shift1,abs_shift0=abs_shift0}
+ -- end
+ else
+ return 0
+ end
+end
+
+local function apply_shift(tree, vertex, i, shifts, next, border_ptr, shift)
+ local outgoings = tree:outgoing(vertex)
+-- texio.write("\n" .. (vertex.name or "dummy")..": ".. shift )
+ if #outgoings >= (i+1) then
+ assert(border_ptr, "unexpected error")
+ local last0 = border_ptr.l0
+ local last1 = border_ptr.l1
+ local next0 = border_ptr.n0
+ local next1 = border_ptr.n1
+ local abs0 = border_ptr.abs_shift0
+ local abs1 = border_ptr.abs_shift1
+ local vbase = outgoings[1].head -- before centering the 1st vertex is at x=0
+ local v0 = outgoings[i].head
+ local v1 = outgoings[i+1].head
+ if v0.kind=="dummy" then shifts[v0] = 0 end
+ shifts[v1] = shifts[vbase] + shift
+ if next0.left then
+ assert(next0.right and next0.left, "failA")
+ -- pointer from T_i to T_{i+0}
+ next.right[last1.right] = next0.right
+ next.right_shift[last1.right] = - shift - abs1.right + (abs0.right + next.right_shift[last0.right])
+ elseif next1.right then
+ assert(next1.right and next1.left, "")
+ -- pointer from T_{i+0} to T_i
+ -- texio.write(last0.left .." -> " ..next1.left)
+ next.left[last0.left] = next1.left
+-- pgf.debug{last0,abs0,abs1,last1}
+ next.left_shift[last0.left] = shift - abs0.left + (abs1.left + next.left_shift[last1.left] )
+
+ else
+ -- both trees have the same height
+ end
+ end
+end
+
+-- Implementation
+
+function Skambath2016:run()
+ local layers = Storage.new()
+ local descendants = Storage.new()
+ local childgroups = Storage.new()
+
+ local phases = self.digraph.options.algorithm_phases
+
+ local so_class = phases['supergraph optimization']
+ local ga_class = phases['evolving graph animation']
+ local cr_class = phases['temporal cycle removal']
+
+ self.extended_version = self.digraph.options['missing nodes get space']
+ self.supergraph = Supergraph.generateSupergraph(self.digraph)
+ local supergraph_original = Supergraph.generateSupergraph(self.digraph)
+
+ -- optimize graph by splitting nodes by trivial criteria
+ so_class.new {
+ main_algorithm = self,
+ supergraph = self.supergraph,
+ digraph = self.digraph,
+ ugraph = self.ugraph
+ }:run()
+
+
+ self:precomputeSpanningTrees()
+
+ -- Resolve cyclic dependencies if exists.
+ cr_class.new {
+ main_algorithm = self,
+ supergraph = self.supergraph,
+ digraph = self.digraph,
+ }:run()
+
+
+
+ self:precomputeDescendants(layers, descendants)
+ self:precomputeChildgroups(childgroups)
+
+ self:computeHorizontalLayout(childgroups, descendants)
+-- self:computeHorizontalLayoutFast()
+
+ -- vertical positions
+ tlayered.arrange_layers_by_baselines(layers,
+ self.adjusted_bb,
+ self.ugraph,
+ self.supergraph.snapshots,
+ self.supergraph.vertex_snapshots)
+
+ -- animate graph
+ ga_class.new {
+ main_algorithm = self,
+ supergraph = supergraph_original,
+ digraph = self.digraph,
+ ugraph = self.ugraph
+ }:run()
+end
+
+--
+-- Compute the required shift value for a second tree to garuantee
+-- a required node distance.
+-- @field right_borders The Border data structure for the right border of
+-- the left tree
+-- @field left_borders The Border data structure for the left border of
+-- the right tree
+-- @field selected_snapshots if you set this value with an array of snapshots
+-- only the predefined snapshots are used in the border
+-- computation.
+--
+function Skambath2016:computeMinShift(right_borders, left_borders, selected_snapshots)
+ local shift = -math.huge
+ local max_level = math.min(#right_borders, #left_borders)
+ local first_shift = 0
+ local snapshots = selected_snapshots or self.supergraph.snapshots
+
+ for layer = 1, max_level do
+ local rb, lb = right_borders[layer], left_borders[layer]
+ for _,s in ipairs(snapshots) do
+
+ local v1,v2 = rb[s],lb[s]
+ if v1 and v2 then
+ local local_shift = layered.ideal_sibling_distance(self.adjusted_bb, self.ugraph, v1, v2) + v1.pos.x - v2.pos.x
+ shift = math.max(shift, local_shift)
+ end
+ end
+ if layer == 1 then
+ first_shift = shift
+ end
+ end
+
+ local is_significant = false
+
+ if max_level > 1 and shift<=first_shift then
+ -- if the necessary shift of the subtrees
+ -- is the minimum required shift between two
+ -- nodes than a node is significant
+ is_significant = true
+ end
+
+ if shift <= -math.huge then
+ shift = 0
+ end
+
+ if is_significant then
+ shift = shift + self.ugraph.options['significant sep']
+ end
+
+ return shift
+end
+
+
+--
+-- The main algorithm: This method computes the layout for each vertex.
+-- For this all supervertices are visited in a topological order to their dependency.
+-- If a . This requires the supergraph to be acyclic. If this is not the case
+-- the calling process has to remove all cycles otherwise the x-coordinate will
+-- not be computed for every vertex.
+--
+function Skambath2016:computeHorizontalLayout(groups, descendants)
+ local subtree_borders = Storage.new()
+ local dep_counter = {}
+ local visited = {}
+ local queue = PriorityQueue.new()
+ local dependency_graph = Digraph.new()
+ for _, vertex in ipairs(self.supergraph.vertices) do
+ dep_counter[vertex] = 0
+ dependency_graph:add {vertex}
+ end
+
+ -- 1. Initialize Dependencies
+
+ for _, snapshot in ipairs(self.supergraph.snapshots) do
+ for _, spanning_tree in ipairs(snapshot.spanning_trees) do
+ for _, arc in ipairs(spanning_tree.arcs) do
+
+ local head = self.supergraph:getSupervertex(arc.head)
+ local tail = self.supergraph:getSupervertex(arc.tail)
+
+ if(head and tail) then
+ if not dependency_graph:arc(tail, head) then
+ dependency_graph:connect(tail, head)
+ dep_counter[tail] = dep_counter[tail] + 1
+ end
+ end
+ end
+ end
+ end
+
+ -- 2. Find independent vertices
+ for _, vertex in ipairs(dependency_graph.vertices) do
+ local outgoings = dependency_graph:outgoing(vertex)
+ if #outgoings == 0 then
+ queue:enqueue(vertex, 1)
+ end
+ end
+
+ -- 2.
+ while not queue:isEmpty() do
+ local vertex = queue:dequeue()
+ local vertex_snapshots = self.supergraph:getSnapshots(vertex)
+
+ -- a. Resolve dependencies on this vertex:
+ local incomings = dependency_graph:incoming(vertex)
+ for _, e in ipairs(incomings) do
+ dep_counter[e.tail] = dep_counter[e.tail] - 1
+ if dep_counter[e.tail] == 0 then
+ queue:enqueue(e.tail, 1)
+ end
+ end
+
+ -- b. Compute borders of this supervertex:
+ local vertex_borders = Borders.new()
+ for _, s in ipairs(vertex_snapshots) do
+ local snapshot_vertex = self.supergraph:getSnapshotVertex(vertex, s)
+ vertex_borders:addBoth(1, s, snapshot_vertex)
+ snapshot_vertex.pos.x = 0
+ snapshot_vertex.pos.y = 0
+ end
+
+ local vertex_groups = groups[vertex]
+ local last_pos_x = 0
+ if vertex_groups then
+ -- c. Compute borders of groups:
+ local all_group_borders = {}
+ for i, group in ipairs(vertex_groups) do
+ local group_boders = Borders.new()
+ for _,s in ipairs(vertex_snapshots) do
+ local child = group[s]
+ if child then
+ local child_borders
+ if not (child.kind == "dummy") then
+ local superchild = self.supergraph:getSupervertex(child)
+ child_borders = subtree_borders[superchild] or Borders.new()
+ else
+ child_borders = Borders.new()
+ child_borders:addBoth(1, s, child)
+ end
+ assert(child.pos~=math.huge, "invalid child pos")
+ shift_group(-child.pos.x,{[s]=child},{[1]=s}, descendants)
+ Borders.copyBordersAtSnapshot(child_borders, group_boders, s)
+ end
+ end
+ all_group_borders[i] = group_boders
+ end
+
+ -- d. Place groups and merge borders of groups:
+ local last_group = nil
+ last_pos_x = 0
+ local merged_borders = Borders.new()
+ local final_borders = Borders.new()
+ for i, group in ipairs(vertex_groups) do
+ local group_borders = all_group_borders[i]
+ if last_group_borders then
+ -- i. compute minimal shift
+
+ local shift
+ shift = self:computeMinShift(merged_borders.right, group_borders.left)
+
+
+ assert(shift ~= math.huge and shift~=-math.huge, "invalid shift")
+
+ -- ii. shift group
+ local anchor = shift_group(shift, group,vertex_snapshots, descendants)
+ last_pos_x = anchor
+ end
+ last_group_borders = group_borders
+
+ -- iii. adapt borders
+ adapt_borders(merged_borders,
+ group_borders,
+ self.supergraph.snapshots)
+ adapt_borders(final_borders,
+ group_borders,
+ self.supergraph.snapshots,
+ not self.extended_version)
+ end -- for (group)
+ vertex_borders:appendBelow(1, final_borders)
+ end
+ -- e. store borders:
+ assert(last_pos_x~=math.huge and last_pos_x~=-math.huge, "invalid position")
+ local x = ((last_pos_x) - 0)/2 + 0
+ assert(x~=math.huge and x~=-math.huge, "invalid position")
+ for _,s in ipairs(vertex_snapshots) do
+ local snapshot_vertex = self.supergraph:getSnapshotVertex(vertex, s)
+ snapshot_vertex.pos.x = x
+ end
+
+ subtree_borders[vertex] = vertex_borders
+ end
+
+ -- align roots
+ for _, s in ipairs(self.supergraph.snapshots) do
+ local lastroot
+ local rborder
+ for i, spanning_tree in ipairs(s.spanning_trees) do
+ local root = spanning_tree.root
+ local rootborders = subtree_borders[self.supergraph:getSupervertex(root)]
+ shift_group(-root.pos.x,{[s]=root},{[1]=s}, descendants)
+ if i>1 then
+ local l = subtree_borders[self.supergraph:getSupervertex(lastroot)]
+ local r = rootborders
+ shift = math.max(self:computeMinShift(l.right, r.left, {[1]=s}),
+ self:computeMinShift(rborder.right,r.left, {[1]=s}))
+ shift_group(shift,{[s]=root},{[1]=s}, descendants)
+ else
+ rborder = Borders.new()
+ end
+ adapt_borders(rborder,rootborders,self.supergraph.snapshots,false)
+ lastroot = root
+ end
+ end
+end
+
+--
+-- The main algorithm: This method computes the layout for each vertex.
+-- For this all supervertices are visited in a topological order to their dependency.
+-- If a . This requires the supergraph to be acyclic. If this is not the case
+-- the calling process has to remove all cycles otherwise the x-coordinate will
+-- not be computed for every vertex.
+--
+function Skambath2016:computeHorizontalLayoutFast()
+ local all_trees = Storage.new()
+ local dep_counter = {}
+ local visited = {}
+ local queue = PriorityQueue.new()
+ local dependency_graph = Digraph.new()
+ local shifts = Storage.new()
+ local next = Storage.new()
+ for _, vertex in ipairs(self.supergraph.vertices) do
+ dep_counter[vertex] = 0
+ dependency_graph:add {vertex}
+ end
+
+
+ -- I. Initialize Dependencies (Build Dependency Graph)
+ for _, snapshot in ipairs(self.supergraph.snapshots) do
+ for _, spanning_tree in ipairs(snapshot.spanning_trees) do
+ table.insert(all_trees, spanning_tree)
+ shifts[spanning_tree] = Storage.new()
+ next[spanning_tree] = {left= Storage.new(),
+ right= Storage.new(),
+ left_shift = Storage.new(),
+ right_shift = Storage.new()
+ }
+
+ for _, arc in ipairs(spanning_tree.arcs) do
+ local head = self.supergraph:getSupervertex(arc.head)
+ local tail = self.supergraph:getSupervertex(arc.tail)
+
+ if(head and tail) then
+ if not dependency_graph:arc(tail, head) then
+ dependency_graph:connect(tail, head)
+ dep_counter[tail] = dep_counter[tail] + 1
+ end
+ end
+ end
+ end
+ end
+
+ -- II. Visit vertices in topological ordering
+ -- Find independent vertices
+ for _, vertex in ipairs(dependency_graph.vertices) do
+ local outgoings = dependency_graph:outgoing(vertex)
+ if #outgoings == 0 then
+ queue:enqueue(vertex, 1)
+ end
+ end
+
+ while not queue:isEmpty() do
+ -- Next node in topological order
+ local vertex = queue:dequeue()
+-- texio.write("\n\n --- "..vertex.name .. " ---")
+ --pgf.debug{next}
+ local vertex_snapshots = self.supergraph:getSnapshots(vertex)
+
+ -- a. Resolve dependencies on this vertex:
+ local incomings = dependency_graph:incoming(vertex)
+ for _, e in ipairs(incomings) do
+ dep_counter[e.tail] = dep_counter[e.tail] - 1
+ if dep_counter[e.tail] == 0 then
+ queue:enqueue(e.tail, 1)
+ end
+ end
+
+ -- b. Compute maximum number of children over time:
+ local num_children = 0
+ for _, s in ipairs(vertex_snapshots) do
+ local v = self.supergraph:getSnapshotVertex(vertex, s)
+ local tree = s.spanning_trees[1]
+ num_children = math.max(num_children, #(tree:outgoing(v)))
+ shifts[tree][v] = 0
+ end
+
+ -- c. Shift all subtrees in all snapshots:
+ local hlp_ptr = Storage.new()
+ local max_shift = 0
+ for i = 1, (num_children - 1) do
+ -- i) Compute the necessary shift between the i-th and (i+1)-th subtrees (per snapshot):
+ local min_shift = 0
+ for t, s in ipairs(vertex_snapshots) do
+ local snapshot_vertex = self.supergraph:getSnapshotVertex(vertex, s)
+ local tree = s.spanning_trees[1]
+ local req_shift, hptr
+ req_shift, hptr = self:computeRequiredDistance(tree,
+ snapshot_vertex,
+ i,
+ shifts[tree],
+ next[tree]
+ )
+ hlp_ptr[t] = hptr
+-- texio.write(" -> \t"..req_shift)
+ min_shift = math.max(min_shift, req_shift)
+ end
+
+-- texio.write("\n \t\t".. min_shift )
+
+ -- ii) Synchronize distance between neigbored subtrees and apply shifts
+ for t, s in ipairs(vertex_snapshots) do
+ local snapshot_vertex = self.supergraph:getSnapshotVertex(vertex, s)
+ local tree = s.spanning_trees[1]
+ apply_shift(tree, snapshot_vertex, i, shifts[tree], next[tree], hlp_ptr[t], min_shift)
+ end
+
+ max_shift = min_shift
+ end
+
+ for t, s in ipairs(vertex_snapshots) do
+ local snapshot_vertex = self.supergraph:getSnapshotVertex(vertex, s)
+ local tree = s.spanning_trees[1]
+ local outgoings = tree:outgoing(snapshot_vertex)
+
+-- next[tree].left[snapshot_vertex] = outgoings[1].head
+
+
+ for i = 1,#outgoings do
+ if i==1 then
+ next[tree].left_shift[snapshot_vertex] = - max_shift / 2
+ next[tree].left[snapshot_vertex]= outgoings[i].head
+ end
+ shifts[tree][outgoings[i].head] = shifts[tree][outgoings[i].head] - max_shift / 2
+ next[tree].right[snapshot_vertex] = outgoings[i].head
+ next[tree].right_shift[snapshot_vertex] = shifts[tree][outgoings[i].head]
+ end
+
+ end
+
+ end -- end while (all vertices have been processed)
+
+ -- III. Accumulate absolute horizontal coordinates
+ for _, tree in ipairs(all_trees) do
+ accumulate_hpos(tree, tree.root, shifts[tree], 0)
+ end
+end
+
+
+
+
+function Skambath2016:precomputeTreeDescendants(tree, node, depth, layers, descendants)
+ local my_descendants = { node }
+
+ for _,arc in ipairs(tree:outgoing(node)) do
+ local head = arc.head
+ self:precomputeTreeDescendants(tree, head, depth+1, layers, descendants)
+ for _,d in ipairs(descendants[head]) do
+ my_descendants[#my_descendants + 1] = d
+ end
+ end
+ layers[node] = depth
+ descendants[node] = my_descendants
+end
+
+function Skambath2016:precomputeDescendants(layers, descendants)
+ for _,snapshot in ipairs(self.supergraph.snapshots) do
+ for _, spanning_tree in ipairs(snapshot.spanning_trees) do
+ self:precomputeTreeDescendants(spanning_tree, spanning_tree.root, 1, layers, descendants)
+ end
+ end
+end
+
+
+--
+--
+--
+function Skambath2016:precomputeChildgroups(childgroups)
+ for _,s in ipairs(self.supergraph.snapshots) do
+ for _,spanning_tree in ipairs(s.spanning_trees) do
+ precompute_childgroups(self.supergraph, spanning_tree, spanning_tree.root, childgroups, s)
+ end
+ end
+end
+
+--
+-- Compute a for each connected component of each
+-- snapshot and appends the result for a snapshot s to
+-- the array s.spanning_trees.
+--
+function Skambath2016:precomputeSpanningTrees()
+ local events = assert(self.scope.events,
+ "no events found for the spanning tree computation")
+
+ for i, s in ipairs(self.supergraph.snapshots) do
+ -- The involved snapshot graph:
+ local s_copy = Digraph.new(s)
+ for _,a in ipairs(s.arcs) do
+ local new_a = s_copy:connect(a.tail,a.head)
+ new_a.syntactic_edges = a.syntactic_edges
+ end
+ s.spanning_trees = s.spanning_trees or {}
+ -- Step 1: Decompose the snapshot into its connected components
+ local syntactic_components = LayoutPipeline.decompose(s_copy)
+ for i, syntactic_component in ipairs (syntactic_components) do
+ local tree = SpanningTreeComputation.computeSpanningTree(syntactic_component, true, events)
+ s.spanning_trees[i] = tree
+ end
+ end
+end
+
+return Skambath2016
+
+
+
+
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/Supergraph.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/Supergraph.lua
new file mode 100644
index 00000000000..490b8b3191d
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/Supergraph.lua
@@ -0,0 +1,570 @@
+-- Copyright 2015 by Malte Skambath
+--
+-- This file may be distributed an/or modified
+--
+-- 1. under the LaTeX Project Public License and/or
+-- 2. under the GNU Public License
+--
+
+-- Imports
+local lib = require "pgf.gd.lib"
+
+local Vertex = require "pgf.gd.model.Vertex"
+local Digraph = require "pgf.gd.model.Digraph"
+local Storage = require "pgf.gd.lib.Storage"
+
+
+local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
+
+---
+-- Each |Supergraph| instance is a |Digraph| instance which represents
+-- the graph by union operation on all graphs G_i of an evolving graph
+-- $G=(G_1, G_2, \dots, G_n)$. Additional to that all references to
+-- the snapshot-graphs are shared such that is possible to get access
+-- to all vertices for each snapshot graph in a sequence. A vertex of
+-- an evolving graph may exists at different times, thus in in
+-- different snapshots. Each vertex will be a vertex in the supergraph
+-- and if there is a single snapshot in which two vertices are
+-- connected by an edge they are connected in the supergraph.
+--
+-- Note that in TikZ a \emph{node} is more than a single dot. A node
+-- has a content and different properties like background-color or a
+-- shape. Formally this can be modelled by function mapping vertices
+-- to their properties. For evolving graphs this could be done in the
+-- same way. As this is difficult to be realised in PGF because there
+-- is no basic support for time dependend properties on nodes, each
+-- vertex will be displayed over time by different single
+-- (snapshot-)nodes which can have different visual properties. This
+-- means for a vertex which we call |supervertex| in the following we
+-- will have a (snapshot-)node for each time stamp.
+--
+-- \medskip
+-- \noindent\emph{Snapshots.}
+-- Since an evolving graph is a sequence of different snapshot-graphs
+-- $G_i$ each snapshot is assigned to a time
+--
+--
+-- @field vertex_snapshots This storage maps each pgf-node to the snapshots
+-- in which they are visible.
+--
+-- @field supervertices This storage maps each pgf-node to its supervertex
+-- which represents all pgf-vertices assigned to the same node
+--
+-- @field supervertices_by_id This storage maps a node identifier to the
+-- related supervertex such that PGF-nodes which belonging to
+-- the same superverticex can be identified
+--
+-- @field snapshots An array of all snapshots. Sorted in ascending order
+-- over the timestamps of the snapshots.
+--
+-- @field arc_snapshots A table storing all snapshots of a supervertex in which
+-- the related nodes are connected. Using a snapshot as key you can check
+-- if a given snapshot is in the array.
+--
+-- Assume we want to iterate over all snapshots
+-- for a certain pair of supernodes in which they are connected
+-- by an arc. The arc_snapshots storage helps in this case:
+-- \begin{codeexample}[code only, tikz syntax=false]
+-- local supergraph = Supergraph.generateSupergraph(self.digraph)
+-- local u = supergraph.vertices[1]
+-- local v = supergraph.vertices[2]
+--
+-- local snapshots = supergraph.arc_snapshots[supergraph:arc(u, v)]
+-- for _, snapshot in ipairs(snapshots) do
+-- do_something(snapshot)
+-- end
+-- \end{codeexample}
+--
+local Supergraph = lib.class { base_class = Digraph }
+
+-- Namespace
+--require("pgf.gd.experimental.evolving").Supergraph = Supergraph
+
+Supergraph.__index =
+ function (t, k)
+ if k == "arcs" then
+ return Digraph.__index(t,k)
+ else
+ return rawget(Supergraph, k) or rawget(Digraph, k)
+ end
+ end
+
+function Supergraph.new(initial)
+ local supergraph = Digraph.new(initial)
+ setmetatable(supergraph, Supergraph)
+
+ supergraph.vertex_snapshots = Storage.new()
+ supergraph.supervertices = Storage.new()
+ supergraph.supervertices_by_id = {}
+ supergraph.arc_snapshots = Storage.newTableStorage()
+
+ return supergraph
+
+end
+
+
+local get_snapshot
+
+---
+-- Generate or extract a snapshot instance for a given snapshot time.
+--
+-- @param snapshots An array of all existing snapshots
+-- @param timestamps A table which maps known timestamps to their
+-- related snapshots
+-- @param ugraph The ugraph of the underlying graph structure
+-- @param snapshot_time
+--
+-- @return The snapshot instance found in the snapshots array for the
+-- wanted timestamp snapshot_time if it does'nt exists a new snapshot
+-- will be generated and added to the arrays
+--
+function get_snapshot(snapshots, timestamps, ugraph, snapshot_time)
+ local snapshot
+ local snapshot_idx = timestamps[snapshot_time]
+
+ if not snapshot_idx then
+ -- store snapshot if it doesn't exists
+ snapshot_idx = timestamps.n + 1
+ timestamps[snapshot_time] = snapshot_idx
+ timestamps.n = timestamps.n + 1
+ snapshot = Digraph.new {
+ syntactic_digraph = ugraph.syntactic_digraph,
+ options = ugraph.options
+ }
+ snapshot.timestamp = snapshot_time
+ snapshots[snapshot_idx] = snapshot
+ else
+ snapshot = snapshots[snapshot_idx]
+ end
+ assert(snapshot~=nil, "an unexpected error occured")
+ return snapshot
+end
+
+
+---
+-- Generate a new supergraph to describe the whole evolving graph by
+-- collecting all temporal information from the digraph and the node
+-- options. All nodes in the |digraph| require a |snapshot| and
+-- a |supernode| option. To identify a (snapshot-)node with its
+-- supernode and snapshot.
+--
+-- @param digraph
+--
+-- @return The supergraph which is a |Digraph| that has a supervertex
+-- for each set of snapshot-vertices with the same |supernode|
+-- attribute.
+--
+function Supergraph.generateSupergraph(digraph)
+ local new_supergraph
+ new_supergraph = Supergraph.new {
+ syntactic_digraph = digraph.syntactic_digraph,
+ options = digraph.options,
+ digraph = digraph,
+ }
+
+ -- array to store the supervertices for a given vertex name
+ local local_snapshots = {} -- array to store each snapshot graphs
+
+ local timestamps = { n = 0 } -- set of snapshot times
+
+ -- separate and assign vertices to their snapshots and supervertives
+ for i,vertex in ipairs(digraph.vertices) do
+ local snapshot_time = assert(vertex.options["snapshot"], "Missing option 'snapshot' for vertex ".. vertex.name ..". ")
+ local supernode_name = assert(vertex.options["supernode"], "Missing option 'supernode' for vertex"..vertex.name..". ")
+
+ local snapshot = get_snapshot(local_snapshots, timestamps, digraph, snapshot_time)
+ local supervertex = new_supergraph.supervertices_by_id[supernode_name]
+
+ if not supervertex then
+ -- first appeareance of the supernode id
+ supervertex = Vertex.new {
+ kind = "super",
+ name = supernode_name
+ }
+ supervertex.snapshots = {}
+ supervertex.subvertex = {}
+ new_supergraph.supervertices_by_id[supernode_name] = supervertex
+ new_supergraph:add{supervertex}
+
+ supervertex.options = {}
+ supervertex.options = vertex.options
+ end
+
+ snapshot:add{vertex}
+
+ new_supergraph.supervertices[vertex] = supervertex
+ new_supergraph.vertex_snapshots[vertex] = snapshot
+ new_supergraph:addSnapshotVertex(supervertex, snapshot, vertex)
+ end
+
+ -- Create edges
+ for i, e in ipairs(digraph.arcs) do
+ local u,v = e.tail, e.head
+ local snapshot_tail = new_supergraph.vertex_snapshots[e.tail]
+ local snapshot_head = new_supergraph.vertex_snapshots[e.head]
+
+ assert(snapshot_head == snapshot_tail, "Arcs must connect nodes that exist at the same time.")
+
+ -- connect in the snapshot graph
+ local arc = snapshot_tail:connect(u,v)
+
+ -- connect in the supergraph:
+ local super_tail = new_supergraph.supervertices[u]
+ local super_head = new_supergraph.supervertices[v]
+
+ new_supergraph:assignToSuperarc(super_tail, super_head, snapshot_tail)
+ end
+
+ -- snapshots in temporal order
+ table.sort(local_snapshots,
+ function(s1,s2)
+ return s1.timestamp < s2.timestamp
+ end )
+
+ local previous_snapshot
+
+ for i,s in ipairs(local_snapshots) do
+ local start = -math.huge
+ if previous_snapshot then
+ start = (s.timestamp - previous_snapshot.timestamp) / 2 + previous_snapshot.timestamp
+ previous_snapshot.interval.to = start
+ end
+ s.interval = { from = start , to = math.huge }
+ previous_snapshot = s
+ end
+
+ new_supergraph.snapshots = local_snapshots
+ new_supergraph.snapshots_indices = Storage.new()
+
+ for i, s in ipairs(new_supergraph.snapshots) do
+ new_supergraph.snapshots_indices[s] = i
+ end
+
+ return new_supergraph
+end
+
+
+function Supergraph:getSnapshotStaticDuration(snapshot)
+ assert(snapshot, "a snapshot as parameter expected, but got nil")
+ local idur = snapshot.interval.to - snapshot.interval.from
+ assert(idur, "unexpected nil-value")
+ local d1 = snapshot.interval.to - snapshot.timestamp
+ local d2 = snapshot.timestamp - snapshot.interval.from
+ local dm = math.min(d1,d2)
+ if (idur >= math.huge and dm < math.huge) then
+ return dm -- [-\infty,t] or [t,\infty]
+ elseif idur >= math.huge then
+ return 0 -- only one snapshot [-\infty,\infty]
+ else
+ return d1 + d2 -- [t_1, t_2]
+ end
+end
+
+---
+-- Get the durations of the graph in which snapshots are given which is exactly
+-- the time between the first and the last defined snapshot
+--
+-- @return The time between the last and first snapshot in seconds
+function Supergraph:getDuration()
+ local first_snapshot = self.snapshots[1]
+ local last_snapshot = self.snapshots[#self.snapshots]
+ return last_snapshot.timestamp - first_snapshot.timestamp
+end
+
+---
+--
+-- @return The ratio of the time of a snapshot related to the global duration of the whole
+-- evlolving trees. (The time between the last and first snapshot)
+function Supergraph:getSnapshotRelativeDuration(snapshot)
+ if self:getDuration() == 0 then
+ return 1
+ else
+ return self:getSnapshotStaticDuration(snapshot) / self:getDuration()
+ end
+end
+
+---
+-- Give the supervertex for a certain pgf-vertex (vertex of a snapshot)
+--
+-- @param vertex A vertex of a snapshot.
+--
+-- @return A supervertex in the supergraph for the given vertex, nil if no
+-- supervertex was assigned before.
+--
+function Supergraph:getSupervertex(vertex)
+ assert(vertex, "vertex required")
+ assert(self.supervertices, "supervertex table is not defined")
+ return self.supervertices[vertex]
+end
+
+function Supergraph:getSuperarc(arc)
+ local superhead = self:getSupervertex(arc.head)
+ local supertail = self:getSupervertex(arc.tail)
+ local arc = assert(self:arc(supertail, superhead),"unexpected problem")
+ return arc
+end
+
+function Supergraph:getSnapshots(supervertex)
+ return supervertex.snapshots
+end
+
+---
+-- Find the snapshot-instance for a given pgf-vertex
+-- (which is a vertex for one certain snapshot)
+--
+-- @param vertex A vertex for which you want to get the related snapshot
+--
+-- @return The snapshot which contains the given vertex as vertex.
+function Supergraph:getSnapshot(vertex)
+ return self.vertex_snapshots[vertex]
+end
+
+---
+-- For a given supervertex get the related vertex for a snapshot
+--
+-- @param supervertex
+--
+-- @param snapshot
+--
+-- @return The vertex of the supervertex at the specified snapshot
+--
+function Supergraph:getSnapshotVertex(supervertex, snapshot)
+ assert(supervertex, "supervertex must not be nil")
+ assert(snapshot, "snapshot must not be nil")
+ return supervertex.subvertex[snapshot]
+end
+
+
+function Supergraph:consecutiveSnapshots(snapshot1, snapshot2, n)
+ assert(snapshot1 and snapshot2, "no snapshot passed")
+ local idx1 = self.snapshots_indices[snapshot1] --or -1
+ local idx2 = self.snapshots_indices[snapshot2] --or -1
+ local d = n or 1
+
+ return (idx2-idx1 <= d) or (idx1-idx2 <= d)
+end
+
+function Supergraph:consecutive(vertex1, vertex2, n)
+ local s1 = self:getSnapshot(vertex1)
+ local s2 = self:getSnapshot(vertex2)
+ return self:consecutiveSnapshots(s1, s2, n)
+end
+
+---
+-- Write pack all position information to the nodes of each snapshot
+-- such that all nodes with the same supervertex have the same position
+--
+-- @param ugraph An undirected graph for which the vertices should get
+-- their positions from the supergraph.
+--
+function Supergraph:sharePositions(ugraph, ignore)
+
+ for _,vertex in ipairs(ugraph.vertices) do
+ if not ignore then
+ vertex.pos.x = self.supervertices[vertex].pos.x
+ vertex.pos.y = self.supervertices[vertex].pos.y
+ else
+ if not ignore.x then
+ vertex.pos.x = self.supervertices[vertex].pos.x
+ end
+ if not ignore.y then
+ vertex.pos.y = self.supervertices[vertex].pos.y
+ end
+ end
+
+
+ end
+end
+
+function Supergraph:onAllSnapshotvertices(f, ugraph)
+ for _,vertex in ipairs(ugraph.vertices) do
+ local snapshot_vertex = self.supertvertices[vertex]
+ if snapshot_vertex then
+ f(vertex, snapshot_vertex)
+ end
+ end
+end
+
+---
+-- Split a supervertex into new supervertices such that
+-- for a given snapshot there is a new pseudo-supervertex.
+-- This pseudo-supervertex will be assigned to all snapshots
+-- after the given snapshot.
+-- All snapshots of a new pseudo-supervertex are removed from
+-- the original vertex.
+-- If a supervertex has no subvertices then it will not be added to the graph.
+--
+-- @param supervertex The supervertex which should be splitted.
+--
+-- @param snapshots An array of snapshots at which the supervertex
+-- should be splitted into a new one with the corresponding pgf-vertices.
+-- If there are more than one snapshots passed to the function
+-- for each snapshot there will be a new pseudo-vertex
+--
+function Supergraph:splitSupervertex(supervertex, snapshots)
+ assert(supervertex, "no supervertex defined")
+ -- snapshots in temporal order
+ table.sort(snapshots,
+ function(s1,s2)
+ return s1.timestamp < s2.timestamp
+ end )
+
+ assert(#snapshots~=0)
+
+ local edit_snapshots = supervertex.snapshots
+ local first_removed = math.huge
+ local rem_arcs = {}
+ for i = 1, #snapshots do
+ local s_first = self.snapshots_indices[snapshots[i]]
+ first_removed = math.min(s_first,first_removed)
+ local s_last
+ if i==#snapshots then
+ s_last = #self.snapshots
+ else
+ s_last = self.snapshots_indices[snapshots[i+1]]-1
+ end
+
+ local pseudovertex = Vertex.new {
+ kind = "super",
+ name = supervertex.name.."*"..i,
+ subvertex = {},
+ snapshots = {}
+ }
+
+ local has_subvertices = false
+
+ for j = s_first, s_last do
+ local s = self.snapshots[j]
+ local vertex = self:getSnapshotVertex(supervertex, s)
+ if vertex then
+ self.supervertices[vertex] = pseudovertex
+ self:addSnapshotVertex(pseudovertex, s, vertex)
+ self:removeSnapshotVertex(supervertex, s)
+
+ if not has_subvertices then
+ has_subvertices = true
+ self:add{pseudovertex}
+ end
+
+ -- update edges:
+ local incoming = self.digraph:incoming(vertex)
+ local outgoing = self.digraph:outgoing(vertex)
+
+ for _, arc in ipairs(incoming) do
+ local tail = self.supervertices[arc.tail]
+ local head = self.supervertices[arc.head]
+ self:assignToSuperarc(tail, pseudovertex, s)
+
+ local super_arc = self:arc(tail, supervertex)
+ if not rem_arcs[super_arc] then
+ table.insert(rem_arcs, {arc = super_arc, snapshot = s})
+ rem_arcs[super_arc] = true
+ end
+ end
+
+ for _, arc in ipairs(outgoing) do
+ local tail = self.supervertices[arc.tail]
+ local head = self.supervertices[arc.head]
+ self:assignToSuperarc(pseudovertex, head, s)
+
+ local super_arc = self:arc(supervertex, head)
+ if not rem_arcs[super_arc] then
+ table.insert(rem_arcs, {arc = super_arc, snapshot = s})
+ rem_arcs[super_arc] = true
+ end
+ end
+ end
+ end
+ end
+
+ if first_removed ~= math.huge then
+ for _, removed_arc in ipairs(rem_arcs) do
+ local snapshots = self.arc_snapshots[removed_arc.arc]
+ for i=#snapshots,1,-1 do
+ local s = snapshots[i]
+ if s.timestamp >= removed_arc.snapshot.timestamp then
+ table.remove(snapshots, i)
+ end
+ end
+
+ if #snapshots==0 then
+ self:disconnect(removed_arc.arc.tail, removed_arc.arc.head)
+ end
+ end
+ end
+end
+
+-- function Supergraph:reloadArcSnapshots()
+-- for _, arc in ipairs(self.digraph.arcs) do
+-- local snapshot = self:getSnapshot(arc.head)
+-- local superarc = self:getSuperarc(arc)
+-- texio.write("\n"..arc.tail.name..">"..arc.head.name)
+-- self.arc_snapshots[superarc] = snapshot
+-- end
+-- end
+
+---
+-- Remove the binding of a vertex at a certain snapshot from its assigned
+-- supervertex.
+-- This requires time $O(n)$ where $n$ is the number of nodes actually
+-- assigned to the supervertex.
+function Supergraph:removeSnapshotVertex(supervertex, snapshot)
+ assert(supervertex and snapshot,"missing argument: the supervertex and snapshot must not be nil")
+
+ -- remove reference to snapshot
+ for i = #supervertex.snapshots,1,-1 do
+ if supervertex.snapshots[i] == snapshot then
+ table.remove(supervertex.snapshots, i)
+ end
+ end
+ -- remove vertex at snapshot
+ supervertex.subvertex[snapshot] = nil
+end
+
+---
+-- Assign a vertex to a snapshot vertex of this supergraph.
+-- This requires time $O(1)$
+-- @param supervertex
+--
+-- @param snapshot
+--
+-- @param vertex The vertex which should be assigned to the supervertex
+-- for the given snapshot.
+--
+function Supergraph:addSnapshotVertex(supervertex, snapshot, vertex)
+ supervertex.subvertex[snapshot] = vertex
+ table.insert(supervertex.snapshots, snapshot)
+end
+
+---
+-- Assign a given snapshot to the superarc between two supernodes.
+-- If still no arc between those nodes exists a new edges will
+-- be created.
+-- This requires time $O(n)$ where $n$ is the number of snapshots already
+-- assigned to the given arc.
+--
+-- @param super_tail The tail of the directed arc in the supergraph.
+--
+-- @param super_head The head of the directed arc in the supergraph.
+--
+-- @param snapshot A snapshot in which both nodes are connected.
+--
+-- @return The arc which was created or updated.
+--
+function Supergraph:assignToSuperarc(super_tail, super_head, snapshot)
+ assert(self:contains(super_tail) and self:contains(super_head),
+ "tried to connect supernodes not in the supergraph")
+
+ local super_arc = self:arc(super_tail, super_head)
+ if not super_arc then
+ super_arc = self:connect(super_tail, super_head)
+ end
+
+ table.insert(self.arc_snapshots[super_arc], snapshot)
+ self.arc_snapshots[super_arc][snapshot] = true
+
+ return super_arc
+end
+
+return Supergraph
+
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/SupergraphVertexSplitOptimization.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/SupergraphVertexSplitOptimization.lua
new file mode 100644
index 00000000000..2295e60513b
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/SupergraphVertexSplitOptimization.lua
@@ -0,0 +1,196 @@
+-- Copyright 2015 by Malte Skambath
+--
+-- This file may be distributed an/or modified
+--
+-- 1. under the LaTeX Project Public License and/or
+-- 2. under the GNU Public License
+--
+-- See the file doc/generic/pgf/licenses/LICENSE for more information
+
+
+local SupergraphVertexSplitOptimization = {}
+
+-- Imports
+local lib = require "pgf.gd.lib"
+local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
+
+local Vertex = require "pgf.gd.model.Vertex"
+local Digraph = require "pgf.gd.model.Digraph"
+local Coordinate = require "pgf.gd.model.Coordinate"
+
+declare {
+ key = "split me",
+ type = "boolean",
+ initial = false
+}
+
+declare {
+ key = "split on disappearing",
+ type = "boolean",
+ initial = true
+}
+
+declare {
+ key = "split on disjoint neighbors",
+ type = "boolean",
+ initial = false
+}
+
+declare {
+ key = "split on disjoint children",
+ type = "boolean",
+ initial = false
+}
+
+declare {
+ key = "split on disjoint parents",
+ type = "boolean",
+ initial = false
+}
+
+declare {
+ key = "split all supervertices",
+ type = "boolean",
+ initial = false
+}
+
+declare {
+ key = "unbound vertex splitting",
+ algorithm = SupergraphVertexSplitOptimization,
+ phase = "supergraph optimization",
+ phase_default = true,
+ summary = [["
+ Use this key if you want to disable animations.
+ Instead of producing animations the evolving graph animation phasephase animates all vertices including movements and
+ fade in or fade out animations.
+ "]],
+ documentation = [["
+ See ToDo
+ "]]
+}
+
+
+
+-- Helpfunctions
+
+
+-- Implementation
+
+function SupergraphVertexSplitOptimization:run()
+ local supergraph = assert(self.supergraph, "no supergraph passed")
+
+ local split_on_dissapearing = self.digraph.options["split on disappearing"]
+ local split_on_no_common_neighbor = self.digraph.options["split on disjoint neighbors"]
+ local split_on_no_common_child = self.digraph.options["split on disjoint children"]
+ local split_on_no_common_parent = self.digraph.options["split on disjoint parents"]
+ local split_all = self.digraph.options["split all supervertices"]
+
+ for _, supernode in ipairs(supergraph.vertices) do
+ -- follow trace of the supernode
+ local snapshots = supergraph:getSnapshots(supernode)
+ local splitsnapshots = {}
+
+ for i=2, #snapshots do
+ local s = snapshots[i]
+ local s_prev = snapshots[i - 1]
+ local can_split = false
+
+ if supergraph:consecutiveSnapshots(s_prev, s) then
+ local v1 = supergraph:getSnapshotVertex(supernode, s_prev)
+ local v2 = supergraph:getSnapshotVertex(supernode, s)
+ local is_child1 = {}
+ local is_parent1 = {}
+ local is_neighbor1 = {}
+
+ local incoming1 = s_prev:incoming(v1)
+ local outgoing1 = s_prev:outgoing(v1)
+
+ for _,e in ipairs(incoming1) do
+ local p = supergraph:getSupervertex(e.tail)
+ if p then
+ is_parent1[p] = true
+ is_neighbor1[p] = true
+ end
+ end
+
+ for _,e in ipairs(outgoing1) do
+ local p = supergraph:getSupervertex(e.head)
+ if p then
+ is_child1[p] = true
+ is_neighbor1[p] = true
+ end
+ end
+
+ local incoming2 = s:incoming(v2)
+ local outgoing2 = s:outgoing(v2)
+
+ no_common_parent = true
+ no_common_child = true
+ no_common_neighbor = true
+ for _,e in ipairs(incoming2) do
+ local p = supergraph:getSupervertex(e.tail)
+ if p then
+ if is_neighbor1[p] then
+ no_common_neighbor = false
+ end
+ if is_parent1[p] then
+ no_common_parent = false
+ end
+ if (not no_common_neighbor) and (not no_common_parent) then
+ break
+ end
+ end
+ end
+
+ for _,e in ipairs(outgoing2) do
+ local p = supergraph:getSupervertex(e.head)
+ if p then
+ if is_neighbor1[p] then
+ no_common_neighbor = false
+ end
+ if is_child1[p] then
+ no_common_child = false
+ end
+ if (not no_common_neighbor) and (not no_common_child) then
+ break
+ end
+ end
+ end
+
+
+
+ if no_common_neighbor and split_on_no_common_neighbor then
+ can_split = true
+ --texio.write("[N@".. s.timestamp .."]")
+ end
+ if no_common_parent and split_on_no_common_parent then
+ can_split = true
+ --texio.write("[P@".. s.timestamp .."]")
+ end
+ if no_common_child and split_on_no_common_child then
+ can_split = true
+ --texio.write("[N@".. s.timestamp .."]")
+ end
+ if v2.options["split me"] then
+ can_split = true
+ end
+ else
+ can_split = true
+ --texio.write("[R@".. s.timestamp .."]")
+ end
+ if can_split or split_all then
+ table.insert(splitsnapshots, s)
+ end
+ end
+ if #splitsnapshots>0 then
+ supergraph:splitSupervertex(supernode, splitsnapshots)
+ end
+ end
+end
+
+
+
+
+-- Done
+
+return SupergraphVertexSplitOptimization
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/TimeSpec.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/TimeSpec.lua
new file mode 100644
index 00000000000..13d453f1fd6
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/TimeSpec.lua
@@ -0,0 +1,60 @@
+-- Copyright 2015 by Malte Skambath
+--
+-- This file may be distributed and/or modified
+--
+-- 1. under the LaTeX Project Public License and/or
+-- 2. under the GNU Public License
+--
+-- See the file doc/generic/pgf/licenses/LICENSE for more information
+
+
+-- Imports
+local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
+
+---
+
+declare {
+ key = "snapshot",
+ type = "time",
+ initial = "0s",
+ summary = "The time of the snapshot in which a PGF node should be visible.",
+ documentation = [["
+ This option defines the time in seconds when respectively in which
+ state or snapshot of the graph the PGF represents a graph node.
+"]]
+}
+
+---
+
+declare {
+ key = "supernode",
+ type = "string",
+ initial = "null",
+ summary = "A unique name for a node a given PGF node should be assigned to.",
+ documentation = [["
+ Because it should be possible that nodes can change their
+ appearance, they are represented by separate PGF nodes in each
+ snapshot. To identify PGF nodes of the same supernode we have to
+ specify this key.
+"]]
+}
+
+---
+
+declare {
+ key = "fadein time",
+ type = "time",
+ initial = "0.5s",
+ summary = [["The time in seconds it should take that a nodes will be fade in
+ when it disappears in the graph"]],
+}
+
+---
+
+declare {
+ key = "fadeout time",
+ type = "time",
+ initial = "0.5s",
+ summary = "",
+ documentation = "The same as |fadein time| but for disappearing nodes."
+}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/doc.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/doc.lua
new file mode 100644
index 00000000000..801e3808bb4
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/doc.lua
@@ -0,0 +1,116 @@
+-- Copyright 2012 by Malte Skambath
+--
+-- This file may be distributed an/or modified
+--
+-- 1. under the LaTeX Project Public License and/or
+-- 2. under the GNU Public License
+--
+-- See the file doc/generic/pgf/licenses/LICENSE for more information
+
+--
+
+
+local key = require 'pgf.gd.doc'.key
+local documentation = require 'pgf.gd.doc'.documentation
+local summary = require 'pgf.gd.doc'.summary
+local example = require 'pgf.gd.doc'.example
+
+
+--------------------------------------------------------------------
+key "animated tree layout"
+
+summary "This layout uses the Reingold--Tilform method for drawing trees."
+
+documentation
+[[
+A method to create layouts for evolving graphs as an SVG animation.The Reingold--Tilford method is a standard method for drawing
+trees. It is described in:
+
+The algorithm, which is based on the Reingold--Tilford algorithm and
+its implementation in |graphdrawing.trees|, is introduced in my Masthesis:
+\begin{itemize}
+\item
+ M.\ Skambath,
+ \newblock Algorithmic Drawing of Evolving Trees, Masterthesis, 2016
+\end{itemize}
+
+You can use the same known graph macros as for other graph drawing
+algorithms in Ti\emph{k}Z. In addition all keys and features that
+are available for the static tree algorithm can be used:
+
+\begin{codeexample}[animation list={1,1.5,2,2.5,3,3.5,4}]
+ \tikz \graph[animated binary tree layout,
+ nodes={draw,circle}, auto supernode,
+ ] {
+ {[when=1] 15 -> {10 -> { ,11}, 20 }},
+ {[when=2] 15 -> {10 -> {3,11}, 20 }},
+ {[when=3] 15 -> {10 -> {3, }, 20 }},
+ {[when=4] 15 -> {10 -> {3, }, 20 -> 18 }},
+ };
+\end{codeexample}
+]]
+
+
+example
+[[
+\tikz[animated binary tree layout]
+ \graph[nodes={draw,circle}, auto supernode] {
+ {[when=1] 15 -> {10 -> { ,11}, 20 }},
+ {[when=2] 15 -> {10 -> {3,11}, 20 }},
+ {[when=3] 15 -> {10 -> {3, }, 20 }},
+ {[when=4] 15 -> {10 -> {3, }, 20 -> 18 }},
+ };
+]]
+--------------------------------------------------------------------
+
+
+
+--------------------------------------------------------------------
+
+--------------------------------------------------------------------
+
+
+
+--------------------------------------------------------------------
+key "animated binary tree layout"
+
+summary
+[[ A layout based on the Reingold--Tilford method for drawing
+binary trees. ]]
+
+documentation
+[[
+This key executes:
+\begin{enumerate}
+\item |animated tree layout|, thereby selecting the Reingold--Tilford method,
+\item |minimum number of children=2|, thereby ensuring the all nodes
+ have (at least) two children or none at all, and
+\end{enumerate}
+]]
+
+
+example
+[[
+]]
+
+example
+[[
+]]
+--------------------------------------------------------------------
+
+
+
+--------------------------------------------------------------------
+key "extended animated binary tree layout"
+
+summary
+[[ This algorithm is similar to |animated binary tree layout|, only the
+option \texttt{missing nodes get space} is executed and the
+\texttt{significant sep} is zero. ]]
+
+example
+[[
+]]
+--------------------------------------------------------------------
+
+
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/layered.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/layered.lua
new file mode 100644
index 00000000000..dc1e8ab571c
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/layered.lua
@@ -0,0 +1,107 @@
+-- Copyright 2012 by Till Tantau
+-- Copyright 2015 by Malte Skambath
+--
+-- This file may be distributed an/or modified
+--
+-- 1. under the LaTeX Project Public License and/or
+-- 2. under the GNU Public License
+--
+-- See the file doc/generic/pgf/licenses/LICENSE for more information
+
+
+
+
+local temporallayered = {}
+
+-- Namespace
+
+--require("pgf.gd").layered = layered
+--require("pgf.gd.experimental.evolving").layered = layered
+
+-- Import
+local lib = require "pgf.gd.lib"
+local Storage = require "pgf.gd.lib.Storage"
+local layered = require "pgf.gd.layered"
+
+--
+-- This file defines some basic functions to compute and/or set the
+-- ideal distances between nodes of any kind of layered drawing of a
+-- graph.
+
+
+
+---
+-- Position nodes in layers using baselines
+--
+-- @param layers A |Storage| object assigning layers to vertices.
+-- @param paddings A |Storage| object storing the computed distances
+-- (paddings).
+-- @param graph The graph in which the nodes reside
+-- @param snapshots The list of snapshots over which the overlaying evolving
+-- graph exists
+function temporallayered.arrange_layers_by_baselines (layers, paddings, graph, snapshots, vertex_snapshots)
+ assert(vertex_snapshots, "vertex_snapshots must not be nil")
+ --local layer_vertices = Storage.newTableStorage()
+ local snapshots_layers = Storage.newTableStorage()
+ local count_layers = 0
+ -- Decompose into layers:
+ for _,v in ipairs(graph.vertices) do
+ local layer_vertices = snapshots_layers[vertex_snapshots[v]] or {}
+ if layer_vertices[layers[v]] == nil then
+ assert( layers[v], "layer of node " .. v.name .. " has not been computed.")
+ layer_vertices[layers[v]] = {}
+ end
+ table.insert(layer_vertices[layers[v]], v)
+ count_layers = math.max(count_layers, layers[v])
+ end
+
+ if count_layers > 0 then
+
+
+ -- Now compute ideal distances and store
+ local height = 0
+
+ for _, s in ipairs(snapshots) do
+ local layer_vertices = snapshots_layers[s]
+ if #layer_vertices > 0 then -- sanity check
+ for _,v in ipairs(layer_vertices[1]) do
+ v.pos.y = 0
+ end
+ end
+ end
+
+ for i=2, count_layers do
+ local distance = 0
+ for _, s in ipairs(snapshots) do
+ local layer_vertices = snapshots_layers[s]
+ if #layer_vertices >= i then
+ distance = math.max(
+ distance,
+ layered.baseline_distance(
+ paddings,
+ s,
+ layer_vertices[i-1],
+ layer_vertices[i]))
+ end
+ end
+
+ height = height + distance
+
+ for _, s in ipairs(snapshots) do
+ local layer_vertices = snapshots_layers[s]
+ if #layer_vertices >= i then
+ for _,v in ipairs(layer_vertices[i]) do
+ v.pos.y = height
+ end
+ end
+ end
+ end
+ end
+end
+
+
+
+
+-- Done
+
+return temporallayered
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/library.lua
new file mode 100644
index 00000000000..bb50eaf2cb5
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/experimental/evolving/library.lua
@@ -0,0 +1,33 @@
+-- Copyright 2016 by Malte Skambath
+--
+-- This file may be distributed an/or modified
+--
+-- 1. under the LaTeX Project Public License and/or
+-- 2. under the GNU Public License
+--
+-- See the file doc/generic/pgf/licenses/LICENSE for more information
+
+
+
+-- @library
+
+local evolving -- Library name
+
+-- Load dependencies:
+require "pgf.gd.trees.ChildSpec"
+require "pgf.gd.trees.ReingoldTilford1981"
+require "pgf.gd.layered"
+
+-- Load declarations from:
+require "pgf.gd.experimental.evolving.TimeSpec"
+require "pgf.gd.experimental.evolving.Supergraph"
+
+-- Load preprocessing/optimization phases from:
+require "pgf.gd.experimental.evolving.SupergraphVertexSplitOptimization"
+require "pgf.gd.experimental.evolving.GreedyTemporalCycleRemoval"
+
+-- Load postprocessing/graph animation phases from:
+require "pgf.gd.experimental.evolving.GraphAnimationCoordination"
+
+-- Load algorithms from:
+require "pgf.gd.experimental.evolving.Skambath2016"
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force.lua
index cb30ec17914..71efda1b35d 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force.lua,v 1.1 2012/11/27 17:24:23 tantau Exp $
+--- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/CoarseGraph.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/CoarseGraph.lua
index c9739dcaf63..6cd46c60eb2 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/CoarseGraph.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/CoarseGraph.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/CoarseGraph.lua,v 1.1 2012/11/27 17:24:25 tantau Exp $
+-- @release $Header$
--- A class for handling "coarse" versions of a graph. Such versions contain
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/Control.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/Control.lua
deleted file mode 100644
index 113f54b7ace..00000000000
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/Control.lua
+++ /dev/null
@@ -1,28 +0,0 @@
--- Copyright 2012 by Till Tantau
---
--- This file may be distributed an/or modified
---
--- 1. under the LaTeX Project Public License and/or
--- 2. under the GNU Public License
---
--- See the file doc/generic/pgf/licenses/LICENSE for more information
-
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/Control.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
-
-
--- Imports
-local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
-
-
----
--- @section subsection {Controlling and Configuring Force-Based Algorithms}
---
--- All force-based algorithms are based on
--- a general pattern which we detail in the following. Numerous options
--- can be used to influence the behaviour of this general pattern; more
--- specific options that apply only to individual algorithms are
--- explained along with these algorithms.
---
--- @end
-
-
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlCoarsening.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlCoarsening.lua
index 330f401d5b5..17cd121b85e 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlCoarsening.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlCoarsening.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlCoarsening.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlDeclare.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlDeclare.lua
new file mode 100644
index 00000000000..6d80fff6aa6
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlDeclare.lua
@@ -0,0 +1,41 @@
+-- Copyright 2012 by Till Tantau
+--
+-- This file may be distributed an/or modified
+--
+-- 1. under the LaTeX Project Public License and/or
+-- 2. under the GNU Public License
+--
+-- See the file doc/generic/pgf/licenses/LICENSE for more information
+
+-- @release $Header$
+
+
+-- Imports
+local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
+
+
+---
+-- @section subsection {Controlling and Configuring Force-Based Algorithms}
+--
+-- All force-based algorithms are based on
+-- a general pattern which we detail in the following. Numerous options
+-- can be used to influence the behaviour of this general pattern; more
+-- specific options that apply only to individual algorithms are
+-- explained along with these algorithms.
+--
+-- The vertices are initially laid out in a random configuration.
+-- Then the configuration is annealed to find a configuration of
+-- minimal energy. To avoid getting stuck in a local minimum or at a
+-- saddle point, random forces are added. All of this makes the final
+-- layout extremely susceptible to changes in the random numbers. To
+-- achieve a certain stability of the results, you should fix the
+-- random seed. However, in the recent past Lua has switched its
+-- random number generator, which means that you won't get the same
+-- sequence of random numbers as in a previous version, even for
+-- identical seed. If you rely on the long-term stability of vertex
+-- placement, you should consider using a different layout. With the
+-- spring layout you have to assume that the layout will be random.
+--
+-- @end
+
+
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlElectric.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlElectric.lua
index d708bd6d7b7..7bd118d7b85 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlElectric.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlElectric.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlElectric.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlIteration.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlIteration.lua
index f07f23aeac3..b845d9d1f89 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlIteration.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlIteration.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlIteration.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlSprings.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlSprings.lua
index 2ef55169bca..9252f7b1cb8 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlSprings.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlSprings.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlSprings.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlStart.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlStart.lua
index 6b93f311290..b62be10c0a5 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlStart.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlStart.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlStart.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/QuadTree.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/QuadTree.lua
index 1a7d0abf25a..4e511746bb2 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/QuadTree.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/QuadTree.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/QuadTree.lua,v 1.1 2012/11/27 17:24:25 tantau Exp $
+-- @release $Header$
--- An implementation of a quad trees.
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalHu2006.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalHu2006.lua
index 54ceddcc25a..9fa709a8053 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalHu2006.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalHu2006.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalHu2006.lua,v 1.1 2012/11/27 17:24:25 tantau Exp $
+-- @release $Header$
local SpringElectricalHu2006 = {}
@@ -97,7 +97,11 @@ function SpringElectricalHu2006:run()
-- initialize node weights
for _,node in ipairs(self.graph.nodes) do
- node.weight = node:getOption('electric charge')
+ if node:getOption('electric charge') ~= nil then
+ node.weight = node:getOption('electric charge')
+ else
+ node.weight = 1
+ end
end
-- initialize edge weights
@@ -171,7 +175,7 @@ function SpringElectricalHu2006:run()
-- set the spring length to the average edge length of the initial layout
spring_length = 0
- for _,e in ipairs(coarse_graph.graph.edges) do
+ for _,edge in ipairs(coarse_graph.graph.edges) do
spring_length = spring_length + edge.nodes[1].pos:minus(edge.nodes[2].pos):norm()
end
spring_length = spring_length / #coarse_graph.graph.edges
@@ -205,7 +209,7 @@ function SpringElectricalHu2006:computeInitialLayout(graph, spring_length)
-- position the loose node relative to the fixed node, with
-- the displacement (random direction) matching the spring length
- local direction = Vector.new{x = math.random(1, spring_length), y = math.random(1, spring_length)}
+ local direction = Vector.new{x = lib.random(1, spring_length), y = lib.random(1, spring_length)}
local distance = 3 * spring_length * self.graph_density * math.sqrt(self.graph_size) / 2
local displacement = direction:normalized():timesScalar(distance)
@@ -218,7 +222,7 @@ function SpringElectricalHu2006:computeInitialLayout(graph, spring_length)
-- use a random positioning technique
local function positioning_func(n)
local radius = 3 * spring_length * self.graph_density * math.sqrt(self.graph_size) / 2
- return math.random(-radius, radius)
+ return lib.random(-radius, radius)
end
-- compute initial layout based on the random positioning technique
@@ -518,4 +522,4 @@ end
-- done
-return SpringElectricalHu2006 \ No newline at end of file
+return SpringElectricalHu2006
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalLayouts.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalLayouts.lua
index f8854e71618..df7dc70a745 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalLayouts.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalLayouts.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalLayouts.lua,v 1.4 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalWalshaw2000.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalWalshaw2000.lua
index 25782bc9c3c..02fd09a72d9 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalWalshaw2000.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalWalshaw2000.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringElectricalWalshaw2000.lua,v 1.1 2012/11/27 17:24:25 tantau Exp $
+-- @release $Header$
@@ -127,7 +127,11 @@ function SpringElectricalWalshaw2000:run()
-- initialize node weights
for _,node in ipairs(self.graph.nodes) do
- node.weight = node:getOption('electric charge')
+ if node:getOption('electric charge') ~= nil then
+ node.weight = node:getOption('electric charge')
+ else
+ node.weight = 1
+ end
-- a node is charged if its weight derives from the default setting
-- of 1 (where it has no influence on the forces)
@@ -212,7 +216,7 @@ function SpringElectricalWalshaw2000:computeInitialLayout(graph, spring_length)
-- position the loose node relative to the fixed node, with
-- the displacement (random direction) matching the spring length
- local direction = Vector.new{x = math.random(1, 2), y = math.random(1, 2)}
+ local direction = Vector.new{x = lib.random(1, 2), y = lib.random(1, 2)}
local distance = 3 * spring_length * self.graph_density * math.sqrt(self.graph_size) / 2
local displacement = direction:normalized():timesScalar(distance)
@@ -227,7 +231,7 @@ function SpringElectricalWalshaw2000:computeInitialLayout(graph, spring_length)
-- use the random positioning technique
local function positioning_func(n)
local radius = 3 * spring_length * self.graph_density * math.sqrt(self.graph_size) / 2
- return math.random(-radius, radius)
+ return lib.random(-radius, radius)
end
-- compute initial layout based on the random positioning technique
@@ -513,4 +517,4 @@ end
-- done
-return SpringElectricalWalshaw2000 \ No newline at end of file
+return SpringElectricalWalshaw2000
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringHu2006.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringHu2006.lua
index 35dc21008fb..b53bc9bff98 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringHu2006.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringHu2006.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringHu2006.lua,v 1.1 2012/11/27 17:24:25 tantau Exp $
+-- @release $Header$
@@ -64,7 +64,6 @@ local lib = require("pgf.gd.lib")
-
function SpringHu2006:run()
-- Setup some parameters
@@ -214,7 +213,7 @@ function SpringHu2006:computeInitialLayout(graph, spring_length)
-- position the loose node relative to the fixed node, with
-- the displacement (random direction) matching the spring length
- local direction = Vector.new{x = math.random(1, spring_length), y = math.random(1, spring_length)}
+ local direction = Vector.new{x = lib.random(1, spring_length), y = lib.random(1, spring_length)}
local distance = 1.8 * spring_length * self.graph_density * math.sqrt(self.graph_size) / 2
local displacement = direction:normalized():timesScalar(distance)
@@ -226,7 +225,7 @@ function SpringHu2006:computeInitialLayout(graph, spring_length)
-- use a random positioning technique
local function positioning_func(n)
local radius = 2 * spring_length * self.graph_density * math.sqrt(self.graph_size) / 2
- return math.random(-radius, radius)
+ return lib.random(-radius, radius)
end
-- compute initial layout based on the random positioning technique
@@ -384,4 +383,4 @@ end
-- done
-return SpringHu2006 \ No newline at end of file
+return SpringHu2006
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringLayouts.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringLayouts.lua
index ab0126d7fcd..5554410816e 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringLayouts.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringLayouts.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/SpringLayouts.lua,v 1.4 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/library.lua
index af3a1a62c27..be0faf465c1 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/library.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/library.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/force/library.lua,v 1.4 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
@@ -109,7 +109,7 @@
local force -- Library name
-- Load declarations from:
-require "pgf.gd.force.Control"
+require "pgf.gd.force.ControlDeclare"
require "pgf.gd.force.ControlStart"
require "pgf.gd.force.ControlIteration"
require "pgf.gd.force.ControlSprings"
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface.lua
index bd53ae4376b..df2649521b2 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/interface.lua,v 1.1 2012/11/27 17:24:24 tantau Exp $
+--- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceCore.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceCore.lua
index 8de6d96d48d..8dfbae44850 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceCore.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceCore.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceCore.lua,v 1.6 2014/02/24 10:40:32 tantau Exp $
+-- @release $Header$
@@ -117,6 +117,13 @@ local factors = {
[""]=1,
}
+local time_factors = {
+ s=1,
+ ms=0.001,
+ min=60,
+ h=3600
+}
+
local directions = {
down = -90,
up = 90,
@@ -157,6 +164,9 @@ function InterfaceCore.convert(s,t)
elseif t == "length" then
local num, dim = string.match(s, "([%d.]+)(.*)")
return tonumber(num) * assert(factors[dim], "unknown unit")
+ elseif t == "time" then
+ local num, dim = string.match(s, "([%d.]+)(.*)")
+ return tonumber(num) * assert(time_factors[dim], "unknown time unit")
elseif t == "string" then
return s
elseif t == "canvas coordinate" or t == "coordinate" then
@@ -178,4 +188,4 @@ end
-- Done
-return InterfaceCore \ No newline at end of file
+return InterfaceCore
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToAlgorithms.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToAlgorithms.lua
index 0ea7bacf96a..f1b203e550c 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToAlgorithms.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToAlgorithms.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToAlgorithms.lua,v 1.18 2014/02/24 10:40:32 tantau Exp $
+-- @release $Header$
@@ -283,6 +283,8 @@ end
-- a dimension like |cm| attached to it). It is the job of the display
-- layer to map this to a number in ``\TeX\ points,'' that is, to a
-- multiple of $1/72.27$th of an inch.
+-- \item |time| A ``time'' in the sense of |\pgfparsetime|. Examples
+-- are |6s| or |0.1min| or |6000ms|, all of which will map to |6|.
-- \item |string| Some text. Will be mapped to a Lua |string|.
-- \item |canvas coordinate| A position on the canvas. Will be mapped
-- to a |model.Coordinate|.
@@ -957,4 +959,4 @@ end
-- Done
-return InterfaceToAlgorithms \ No newline at end of file
+return InterfaceToAlgorithms
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToC.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToC.lua
index 37db0b3d91e..2aeb2e6a7aa 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToC.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToC.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToC.lua,v 1.7 2014/02/24 10:40:32 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToDisplay.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToDisplay.lua
index a636e79b8ea..c0ddf0dc8ce 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToDisplay.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToDisplay.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToDisplay.lua,v 1.14 2014/03/19 09:20:59 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/Scope.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/Scope.lua
index 7826e77e6ae..438925a2213 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/Scope.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/Scope.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/interface/Scope.lua,v 1.2 2013/02/08 17:14:05 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered.lua
index e5b4b5f1747..dd897fbe8ac 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered.lua,v 1.2 2013/02/08 17:14:04 tantau Exp $
+--- @release $Header$
local layered = {}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CrossingMinimizationGansnerKNV1993.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CrossingMinimizationGansnerKNV1993.lua
index 86baaf14c33..3fe3eac2552 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CrossingMinimizationGansnerKNV1993.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CrossingMinimizationGansnerKNV1993.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/CrossingMinimizationGansnerKNV1993.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990a.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990a.lua
index 8e5111cfb72..55207b845d3 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990a.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990a.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990a.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990b.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990b.lua
index deaae695246..218ecbd2099 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990b.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990b.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalBergerS1990b.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
local CycleRemovalBergerS1990b = {}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalEadesLS1993.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalEadesLS1993.lua
index 6ff83ceae39..ffb919b2092 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalEadesLS1993.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalEadesLS1993.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalEadesLS1993.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua
index a2ee9c01863..b480b7c4e70 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/CycleRemovalGansnerKNV1993.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
local CycleRemovalGansnerKNV1993 = {}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/EdgeRoutingGansnerKNV1993.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/EdgeRoutingGansnerKNV1993.lua
index 649db1e54b6..c451f74116e 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/EdgeRoutingGansnerKNV1993.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/EdgeRoutingGansnerKNV1993.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/EdgeRoutingGansnerKNV1993.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NetworkSimplex.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NetworkSimplex.lua
index abc17477bac..40078405f90 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NetworkSimplex.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NetworkSimplex.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/NetworkSimplex.lua,v 1.2 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodePositioningGansnerKNV1993.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodePositioningGansnerKNV1993.lua
index ce0fab4efe7..3af15ad1593 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodePositioningGansnerKNV1993.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodePositioningGansnerKNV1993.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodePositioningGansnerKNV1993.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingGansnerKNV1993.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingGansnerKNV1993.lua
index e941029b3d3..4a53acf8646 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingGansnerKNV1993.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingGansnerKNV1993.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingGansnerKNV1993.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
local NodeRankingGansnerKNV1993 = {}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingMinimumHeight.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingMinimumHeight.lua
index 38f52f6ba7f..8aa98bd03ad 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingMinimumHeight.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingMinimumHeight.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/NodeRankingMinimumHeight.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
local NodeRankingMinimumHeight = {}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/Ranking.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/Ranking.lua
index 8b2527edd5f..228039b536f 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/Ranking.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/Ranking.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/Ranking.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/Sugiyama.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/Sugiyama.lua
index 4d1e0ae47ed..3ab9596322d 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/Sugiyama.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/Sugiyama.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/Sugiyama.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/crossing_minimization.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/crossing_minimization.lua
index 16e3b1653de..6bede7eb015 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/crossing_minimization.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/crossing_minimization.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/crossing_minimization.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/cycle_removal.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/cycle_removal.lua
index e201de6da4a..63c43f5b14f 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/cycle_removal.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/cycle_removal.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/cycle_removal.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/edge_routing.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/edge_routing.lua
index e2cb40f68b3..b790d527e3d 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/edge_routing.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/edge_routing.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/edge_routing.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/library.lua
index a3c03b7283e..9f681929ecb 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/library.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/library.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/library.lua,v 1.3 2013/04/04 20:43:45 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_positioning.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_positioning.lua
index d53b0873a3f..8fa55f9cbb9 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_positioning.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_positioning.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_positioning.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_ranking.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_ranking.lua
index 3a1098d6c03..7aef0bde5fc 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_ranking.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_ranking.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/layered/node_ranking.lua,v 1.3 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib.lua
index aaa7f648a51..bcd4f6cfc1e 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib.lua,v 1.6 2014/02/24 10:40:32 tantau Exp $
+-- @release $Header$
@@ -209,7 +209,7 @@ function lib.random_permutation(n)
p[i] = i
end
for i=1,n-1 do
- local j = math.random(i,n)
+ local j = lib.random(i,n)
p[i], p[j] = p[i], p[j]
end
return p
@@ -394,6 +394,28 @@ function lib.ondemand(filename, table, name)
end
+
+---
+-- This implements the legacy random number generator of Lua 5.2 in
+-- pure Lua. This is needed for Lua 5.3 compatibility to obtain
+-- consitent results.
+--
+-- @param l Lower bound
+-- @param u Upper bound
+-- @return A random number
+function lib.random(l,u)
+ local r = math.random()
+ if l and u then
+ assert(l <= u)
+ return math.floor(r*(u-l+1)) + l
+ elseif l then
+ assert(1.0 <= l)
+ return math.floor(r*l) + 1.0
+ else
+ return r
+ end
+end
+
-- Done
-return lib \ No newline at end of file
+return lib
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Bezier.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Bezier.lua
index aa149c3e4f9..292f9e56bf2 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Bezier.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Bezier.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib/Bezier.lua,v 1.1 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/DepthFirstSearch.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/DepthFirstSearch.lua
index 768a5da0ffe..564b8f6839a 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/DepthFirstSearch.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/DepthFirstSearch.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib/DepthFirstSearch.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Direct.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Direct.lua
index dd5dde22e1c..aaad047c702 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Direct.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Direct.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib/Direct.lua,v 1.2 2013/04/04 20:43:45 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Event.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Event.lua
index 918c118f4b2..952f37796eb 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Event.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Event.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib/Event.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/LookupTable.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/LookupTable.lua
index a3c04ca54df..0014c94a375 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/LookupTable.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/LookupTable.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib/LookupTable.lua,v 1.2 2013/04/04 20:43:45 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/PathLengths.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/PathLengths.lua
index c617cf80d8b..05b480713b0 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/PathLengths.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/PathLengths.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib/PathLengths.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/PriorityQueue.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/PriorityQueue.lua
index 7b93c755c56..378800fbf5b 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/PriorityQueue.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/PriorityQueue.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib/PriorityQueue.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Simplifiers.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Simplifiers.lua
index b935305893a..abb428b8725 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Simplifiers.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Simplifiers.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib/Simplifiers.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Stack.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Stack.lua
index 11466c04961..dfab15697de 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Stack.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Stack.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib/Stack.lua,v 1.1 2012/11/27 17:24:26 tantau Exp $
+-- @release $Header$
--- A Stack is a very simple wrapper around an array
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Storage.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Storage.lua
index 525fcb4f8fc..eb520e77452 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Storage.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Storage.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib/Storage.lua,v 1.4 2013/12/20 14:44:46 tantau Exp $
+-- @release $Header$
@@ -107,4 +107,4 @@ end
-- Done
-return Storage \ No newline at end of file
+return Storage
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Transform.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Transform.lua
index d477c682f60..1f81b269202 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Transform.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/lib/Transform.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/lib/Transform.lua,v 1.2 2014/02/24 10:40:32 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model.lua
index badde1bbd58..4a0130488bc 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model.lua,v 1.1 2012/11/27 17:24:24 tantau Exp $
+--- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Arc.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Arc.lua
index 5c2f10cd383..997a452399f 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Arc.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Arc.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model/Arc.lua,v 1.7 2015/04/21 14:10:00 tantau Exp $
+-- @release $Header$
---
@@ -31,13 +31,17 @@
-- synactic edges that ``belong'' to an edge.
--
-- In order to \emph{set} options of the edges, you can set the
--- |generate_options| field of an arc (which is |nil| by default), see
+-- |generated_options| field of an arc (which is |nil| by default), see
-- the |declare_parameter_sequence| function for the syntax. Similar
-- to the |path| field below, the options set in this table are
-- written back to the syntactic edges during a sync.
--
--- In detail, the following happens: Even though an arc has a |path|
--- field and a |generated_options| field, setting these fields does
+-- Finally, there is also an |animations| field, which, similarly to
+-- the |generated_options|, gets written back during a sync when it is
+-- not |nil|.
+--
+-- In detail, the following happens: Even though an arc has a |path|,
+-- |generated_options|, and |animations| fields, setting these fields does
-- not immediately set the paths of the syntactic edges nor does it
-- generate options. Indeed, you will normally want to setup and
-- modify the |path| field of an arc during your algorithm and only at
@@ -65,6 +69,9 @@
-- above.
-- @field generated_options If non-nil, some options to be passed back
-- to the original syntactic edges, see the description above.
+-- @field animations If non-nil, some animations to be passed back
+-- to the original syntactic edges. See the description of the
+-- |animations| field for |Vertex| for details on the syntax.
-- @field syntactic_edges In case this arc is an arc in the syntatic
-- digraph (and only then), this field contains an array containing
-- syntactic edges (``real'' edges in the syntactic digraph) that
@@ -528,6 +535,26 @@ function Arc:sync()
end
end
end
+ if self.animations then
+ local head = self.head
+ local tail = self.tail
+ local a = self.syntactic_digraph:arc(tail,head)
+ if a and #a.syntactic_edges>0 then
+ for _,e in ipairs(a.syntactic_edges) do
+ for _,o in ipairs(self.animations) do
+ e.animations[#e.animations+1] = o
+ end
+ end
+ end
+ local a = head ~= tail and self.syntactic_digraph:arc(head,tail)
+ if a and #a.syntactic_edges>0 then
+ for _,e in ipairs(a.syntactic_edges) do
+ for _,o in ipairs(self.animations) do
+ e.animations[#e.animations+1] = o
+ end
+ end
+ end
+ end
end
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Collection.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Collection.lua
index a460e83505d..8ebb6f144cf 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Collection.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Collection.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model/Collection.lua,v 1.2 2013/02/08 17:14:05 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Coordinate.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Coordinate.lua
index 8d11fe89d8f..815544ee705 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Coordinate.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Coordinate.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model/Coordinate.lua,v 1.4 2014/02/24 10:40:32 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Digraph.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Digraph.lua
index f0568d13ad9..5c48059a605 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Digraph.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Digraph.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model/Digraph.lua,v 1.7 2013/12/20 14:44:47 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Edge.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Edge.lua
index a91979d0ad5..87b06661e54 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Edge.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Edge.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model/Edge.lua,v 1.6 2013/12/20 14:44:47 tantau Exp $
+-- @release $Header$
---
@@ -60,7 +60,10 @@
-- by the algorithm. When the edge is rendered later on, this array
-- will be passed back to the display layer. The syntax is the same as
-- for the |declare_parameter_sequence| function, see
--- |InterfaceToAlgorithms|.
+-- |InterfaceToAlgorithms|.
+--
+-- @field animations An array of animations, see the |animations|
+-- field of the |Vertex| class for the syntax.
local Edge = {}
Edge.__index = Edge
@@ -94,6 +97,7 @@ function Edge.new(values)
new[k] = v
end
new.generated_options = new.generated_options or {}
+ new.animations = new.animations or {}
if not new.path then
local p = Path.new ()
p:appendMoveto(Edge.tailAnchorForEdgePath(new))
@@ -202,4 +206,4 @@ end
-- Done
-return Edge \ No newline at end of file
+return Edge
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Hyperedge.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Hyperedge.lua
index 54a373bf83f..3819e193689 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Hyperedge.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Hyperedge.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model/Hyperedge.lua,v 1.2 2013/05/23 20:01:27 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path.lua
index 07cd78d34e1..93cd44cc218 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model/Path.lua,v 1.3 2014/02/24 10:40:32 tantau Exp $
+-- @release $Header$
---
@@ -543,6 +543,10 @@ function Path:intersectionsWith(path)
local function intersect (i1, j1, i2, j2)
+ if i1 > j1 or i2 > j2 then
+ return
+ end
+
local bb1 = bb(i1, j1, memo1)
local bb2 = bb(i2, j2, memo2)
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path_arced.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path_arced.lua
index ace3825e350..92dd8ad87ac 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path_arced.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Path_arced.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model/Path_arced.lua,v 1.2 2015/05/08 10:23:50 tantau Exp $
+-- @release $Header$
local Path = require 'pgf.gd.model.Path'
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua
index f18aa43f450..c287181992f 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua,v 1.6 2013/12/20 14:44:47 tantau Exp $
+-- @release $Header$
---
@@ -22,7 +22,7 @@
-- be modified directly.
--
-- Note that a |Vertex| is an abstraction of \tikzname\ nodes; indeed
--- that objective is to ensure that, in principle, we can use them
+-- the objective is to ensure that, in principle, we can use them
-- independently of \TeX. For this reason, you will not find any
-- references to |tex| inside a |Vertex|; this information is only
-- available in the syntactic digraph.
@@ -91,6 +91,22 @@
--
-- @field options A table of options that contains user-defined options.
--
+-- @field animations An array of attribute animations for the
+-- node. When an algorithm adds entries to this array, the display
+-- layer should try to render these. The syntax is as follows: Each
+-- element in the array is a table with a field |attribute|, which must
+-- be a string like |"opacity"| or |"translate"|, a field |entries|,
+-- which must be an array to be explained in a moment, and field
+-- |options|, which must be a table of the same syntax as the
+-- |options| field. For the |entries| array, each element must be
+-- table with two field: |t| must be set to a number, representing a
+-- time in secondds, and |value|, which must be set to a value that
+-- the |attribute| should have at the given time. The entries and the
+-- options will then be interpreted as described in \pgfname's basic
+-- layer animation system, except that where a |\pgfpoint| is expected
+-- you provide a |Coordinate| and a where a path is expected you
+-- provide a |Path|.
+--
-- @field shape A string describing the shape of the node (like |rectangle|
-- or |circle|). Note, however, that this is more ``informative''; the
-- actual information that is used by the graph drawing system for
@@ -104,6 +120,13 @@
-- @field event The |Event| when this vertex was created (may be |nil|
-- if the vertex is not part of the syntactic digraph).
--
+-- @field incomings A table indexed by |Digraph| objects. For each
+-- digraph, the table entry is an array of all vertices from which
+-- there is an |Arc| to this vertex. This field is internal and may
+-- not only be accessed by the |Digraph| class.
+--
+-- @field outgoings Like |incomings|, but for outgoing arcs.
+--
local Vertex = {}
Vertex.__index = Vertex
@@ -137,16 +160,11 @@ local Storage = require "pgf.gd.lib.Storage"
-- \item[|path|] A |Path| object representing the vertex's hull.
-- \item[|anchors|] A table of anchors.
-- \item[|options|] An options table for the vertex.
+-- \item[|animations|] An array of generated animation attributes.
-- \item[|shape|] A string describing the shape. If not given, |"none"| is used.
-- \item[|kind|] A kind like |"node"| or |"dummy"|. If not given, |"dummy"| is used.
-- \end{description}
--
--- @field incomings A table indexed by |Digraph| objects. For each
--- digraph, the table entry is an array of all vertices from which
--- there is an |Arc| to this vertex. This field is internal and may
--- not only be accessed by the |Digraph| class.
--- @field outgoings Like |incomings|, but for outgoing arcs.
---
-- @return A newly allocated node.
--
function Vertex.new(values)
@@ -162,6 +180,7 @@ function Vertex.new(values)
new.kind = new.kind or "dummy"
new.pos = new.pos or Coordinate.new(0,0)
new.anchors = new.anchors or { center = Coordinate.new(0,0) }
+ new.animations = new.animations or {}
return setmetatable (new, Vertex)
end
@@ -274,4 +293,4 @@ end
-- Done
-return Vertex \ No newline at end of file
+return Vertex
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/library.lua
index 3bc491ec093..ad62faa0f3d 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/library.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/library.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model/library.lua,v 1.2 2013/04/04 20:43:45 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/ogdf.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/ogdf.lua
index aad6eb0a440..f7905f2418a 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/ogdf.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/ogdf.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/ogdf.lua,v 1.1 2012/12/17 23:53:11 tantau Exp $
+--- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/ogdf/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/ogdf/library.lua
index a06c732ed1d..f91c75a4d64 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/ogdf/library.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/ogdf/library.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/ogdf/library.lua,v 1.12 2013/10/09 19:47:00 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees.lua
index 72bb3e904ee..95689e6379b 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees.lua,v 1.1 2015/03/12 15:58:20 tantau Exp $
+--- @release $Header$
local pedigrees = {}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/Koerner2015.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/Koerner2015.lua
index 460aaaed905..df366a31687 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/Koerner2015.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/Koerner2015.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/Koerner2015.lua,v 1.1 2015/03/12 15:58:23 tantau Exp $
+-- @release $Header$
local Koerner2015 = {}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/library.lua
index 4e6000d038f..db3d4f9cf72 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/library.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/library.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/pedigrees/library.lua,v 1.1 2015/03/12 15:58:23 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics.lua
index 75a78f4f478..77c66de5b2d 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics.lua,v 1.1 2013/02/08 17:14:04 tantau Exp $
+--- @release $Header$
local phylogenetics = {}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/AuthorDefinedPhylogeny.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/AuthorDefinedPhylogeny.lua
index dc5dea45b0f..f1acbd71281 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/AuthorDefinedPhylogeny.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/AuthorDefinedPhylogeny.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/AuthorDefinedPhylogeny.lua,v 1.2 2013/03/20 17:16:38 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedMinimumEvolution.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedMinimumEvolution.lua
index fd0fb62b3ad..d2b64270796 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedMinimumEvolution.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedMinimumEvolution.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedMinimumEvolution.lua,v 1.1 2013/02/08 17:14:05 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedNearestNeighbourInterchange.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedNearestNeighbourInterchange.lua
index a4fbc0cc3b9..8077790224a 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedNearestNeighbourInterchange.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedNearestNeighbourInterchange.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/BalancedNearestNeighbourInterchange.lua,v 1.2 2013/03/20 17:16:38 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/DistanceMatrix.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/DistanceMatrix.lua
index 0bca7773212..d44f098161f 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/DistanceMatrix.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/DistanceMatrix.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/DistanceMatrix.lua,v 1.2 2013/12/20 14:44:47 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/Maeusle2012.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/Maeusle2012.lua
index ef0909a6d00..528110b57ea 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/Maeusle2012.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/Maeusle2012.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/Maeusle2012.lua,v 1.4 2013/05/23 20:01:29 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/PhylogeneticTree.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/PhylogeneticTree.lua
index 16356aa7cfa..f66f2553306 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/PhylogeneticTree.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/PhylogeneticTree.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/PhylogeneticTree.lua,v 1.2 2013/02/08 17:14:06 tantau Exp $
+-- @release $Header$
local PhylogeneticTree = {}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/SokalMichener1958.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/SokalMichener1958.lua
index c55a7a7467c..8be5c1d51e9 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/SokalMichener1958.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/SokalMichener1958.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/SokalMichener1958.lua,v 1.1 2013/02/08 17:14:06 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/library.lua
index 194e809ef2e..29183a57739 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/library.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/library.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/phylogenetics/library.lua,v 1.2 2013/04/04 20:43:45 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar.lua
new file mode 100644
index 00000000000..5d80de77cdd
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar.lua
@@ -0,0 +1,6 @@
+require "pgf"
+require "pgf.gd"
+
+pgf.gd.planar = {}
+
+return pgf.gd.planar
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/BoyerMyrvold2004.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/BoyerMyrvold2004.lua
new file mode 100644
index 00000000000..f30c940a921
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/BoyerMyrvold2004.lua
@@ -0,0 +1,678 @@
+
+--[[
+---Data structures---
+
+Vertices from the original ugraph are referred to as input vertices.
+The tables that contain vertex data relevant to the algorithm
+are referred to as vertices.
+A vertex table may have the following keys:
+
+-sign
+1 or -1, indicates whether this and all in the depth-first search
+following vertices must be considered flipped
+(i. e. adjacency lists reversed) in respect to the dfs parent
+
+-childlist
+A linked list containing all dfs children of the vertex whose virtual roots
+have not yet been merged into the vertex, sorted by lowpoint
+
+-adjlistlinks
+A table with two fields with keys 0 and 1, containing the two half edges
+of the vertex which lie on the external face of the graph
+(if the vertex lies on the external face).
+The half edge with key 0 lies in the 0-direction of the other half edge
+and vice-versa
+The two fields may hold the same half edge, if the vertex has degree one
+
+-pertinentroots
+A linked list containing all virtual roots of this vertex that are
+pertinent during the current step
+
+-inputvertex
+The input vertex that corresponds to the vertex
+
+-dfi
+The depth-first search index (number of the step in the dfs at which
+the vertex was discovered)
+
+-dfsparent
+The depth-first search parent (vertex from which the vertex was discovered
+first in the dfs)
+
+-leastancestor
+Dfi of the vertex with lowest dfi that can be reached using one back edge
+(non-tree edge)
+
+-lowpoint
+Dfi of the vertex with lowest dfi that can be reached using any number of
+tree edges plus one back edge
+
+
+A root vertex is a virtual vertex not contained in the original ugraph.
+The root vertex represents another vertex in a biconnected component (block)
+which is a child of the biconnected component the represented vertex is in.
+The only field that it has in common with other vertices is the
+adjacency list links array:
+
+-isroot
+always true, indicates that this vertex is a virtual root
+
+-rootparent
+The vertex which this root represents
+
+-rootchild
+The only dfs child of the original vertex which is contained in the
+root verticis biconnected component
+
+-adjlistlinks
+See adjlistlinks of a normal vertex
+
+
+A half edge is a table with the following fields:
+
+-links
+A table with two fields with keys 0 and 1, containing the neighboring
+half edges in the adjacency list of the vertex these edges originate from.
+
+-target
+The vertex the half edge leads to
+
+-twin
+The twin half edge which connects the two vertices in the opposite direction
+
+-shortcircuit
+True if the half edge was inserted in order to make a short circuit for the
+algorithm. The edge will be removed at the end.
+
+The BoyerMyrvold2004 class has the following fields:
+
+-inputgraph
+The original ugraph given to the algorithm
+
+-numvertices
+The number of vertices of the graph
+
+-vertices
+The vertex table with depth-first search indices as keys
+
+-verticesbyinputvertex
+The vertex table with input vertices as keys
+
+-verticesbylowpoint
+The vertex table with low points as keys
+
+-shortcircuitedges
+An array of all short circuit half edges
+(which may not be in the original graph and will be removed at the end)
+
+--]]
+
+local BM = {}
+require("pgf.gd.planar").BoyerMyrvold2004 = BM
+
+-- imports
+local Storage = require "pgf.gd.lib.Storage"
+local LinkedList = require "pgf.gd.planar.LinkedList"
+local Embedding = require "pgf.gd.planar.Embedding"
+
+-- create class properties
+BM.__index = BM
+
+function BM.new()
+ local t = {}
+ setmetatable(t, BM)
+ return t
+end
+
+-- initializes some data structures at the beginning
+-- takes the ugraph of the layout algorithm as input
+function BM:init(g)
+ self.inputgraph = g
+ self.numvertices = #g.vertices
+ self.vertices = {}
+ self.verticesbyinputvertex = Storage.new()
+ self.verticesbylowpoint = Storage.newTableStorage()
+ self.shortcircuitedges = {}
+ for _, inputvertex in ipairs(self.inputgraph.vertices) do
+ local vertex = {
+ sign = 1,
+ childlist = LinkedList.new(),
+ adjlistlinks = {},
+ pertinentroots = LinkedList.new(),
+ inputvertex = inputvertex,
+ }
+ setmetatable(vertex, Embedding.vertexmetatable)
+ self.verticesbyinputvertex[inputvertex] = vertex
+ end
+end
+
+--[[
+local function nilmax(a, b)
+ if a == nil then return b end
+ if b == nil then return a end
+ return math.max(a, b)
+end
+
+local function nilmin(a, b)
+ if a == nil then return b end
+ if b == nil then return a end
+ return math.min(a, b)
+end
+--]]
+
+-- the depth-first search of the preprocessing
+function BM:predfs(inputvertex, parent)
+ local dfi = #self.vertices + 1
+ local vertex = self.verticesbyinputvertex[inputvertex]
+ self.vertices[dfi] = vertex
+ -- set the dfs infos in the vertex
+ vertex.dfi = dfi
+ vertex.dfsparent = parent
+ vertex.leastancestor = dfi
+ vertex.lowpoint = dfi
+ -- find neighbors
+ for _, arc in ipairs(self.inputgraph:outgoing(inputvertex)) do
+ local ninputvertex = arc.head
+ assert(ninputvertex ~= inputvertex, "Self-loop detected!")
+ local nvertex = self.verticesbyinputvertex[ninputvertex]
+ if nvertex.dfi == nil then
+ -- new vertex discovered
+ self:predfs(ninputvertex, vertex) -- recursive call
+ vertex.lowpoint = math.min(vertex.lowpoint, nvertex.lowpoint)
+ elseif parent and ninputvertex ~= parent.inputvertex then
+ -- back edge found
+ vertex.leastancestor = math.min(vertex.leastancestor, nvertex.dfi)
+ vertex.lowpoint = math.min(vertex.lowpoint, nvertex.dfi)
+ end
+ end
+ -- put vertex into lowpoint sort bucket
+ table.insert(self.verticesbylowpoint[vertex.lowpoint], vertex)
+end
+
+-- the preprocessing at the beginning of the algorithm
+-- does the depth-first search and the bucket sort for the child lists
+function BM:preprocess()
+ -- make dfs starting at an arbitrary vertex
+ self:predfs(self.inputgraph.vertices[1])
+ -- create separated child lists with bucket sort
+ for i = 1, self.numvertices do
+ for _, vertex in ipairs(self.verticesbylowpoint[i]) do
+ if vertex.dfsparent then
+ vertex.childlistelement
+ = vertex.dfsparent.childlist:addback(vertex)
+ end
+ end
+ end
+end
+
+-- adds tree edges and the corresponding virtual root vertices
+-- of the currentvertex
+function BM:add_trivial_edges(vertex)
+ -- find all dfs children
+ for _, arc in ipairs(self.inputgraph:outgoing(vertex.inputvertex)) do
+ local nvertex = self.verticesbyinputvertex[arc.head]
+ if nvertex.dfsparent == vertex then
+ -- create root vertex
+ local rootvertex = {
+ isroot = true,
+ rootparent = vertex,
+ rootchild = nvertex,
+ adjlistlinks = {},
+ name = tostring(vertex) .. "^" .. tostring(nvertex)
+ }
+ setmetatable(rootvertex, Embedding.vertexmetatable)
+ nvertex.parentroot = rootvertex
+ -- create half edges
+ local halfedge1 = {target = nvertex, links = {}}
+ local halfedge2 = {target = rootvertex, links = {}}
+ halfedge1.twin = halfedge2
+ halfedge2.twin = halfedge1
+ -- create circular adjacency lists
+ halfedge1.links[0] = halfedge1
+ halfedge1.links[1] = halfedge1
+ halfedge2.links[0] = halfedge2
+ halfedge2.links[1] = halfedge2
+ -- create links to adjacency lists
+ rootvertex.adjlistlinks[0] = halfedge1
+ rootvertex.adjlistlinks[1] = halfedge1
+ nvertex.adjlistlinks[0] = halfedge2
+ nvertex.adjlistlinks[1] = halfedge2
+ end
+ end
+end
+
+-- for the external face vertex which was entered through link vin
+-- returns the successor on the external face and the link through
+-- which it was entered
+local function get_successor_on_external_face(vertex, vin)
+ local halfedge = vertex.adjlistlinks[1 - vin]
+ local svertex = halfedge.target
+ local sin
+ if vertex.adjlistlinks[0] == vertex.adjlistlinks[1] then
+ sin = vin
+ elseif svertex.adjlistlinks[0].twin == halfedge then
+ sin = 0
+ else
+ sin = 1
+ end
+ return svertex, sin
+end
+
+-- the "walkup", used to identify the pertinent subgraph,
+-- i. e. the subgraph that contains end points of backedges
+-- for one backedge this function will mark all virtual roots
+-- as pertinent that lie on the path between the backedge and the current vertex
+-- backvertex: a vertex that is an endpoint of a backedge to the current vertex
+-- currentvertex: the vertex of the current step
+-- returns a root vertex of the current step, if one was found
+local function walkup(backvertex, currentvertex)
+ local currentindex = currentvertex.dfi
+ -- set the backedgeflag
+ backvertex.backedgeindex = currentindex
+ -- initialize traversal variables for both directions
+ local x, xin, y, yin = backvertex, 1, backvertex, 0
+ while x ~= currentvertex do
+ if x.visited == currentindex or y.visited == currentindex then
+ -- we found a path that already has the pertinent roots marked
+ return nil
+ end
+ -- mark vertices as visited for later calls
+ x.visited = currentindex
+ y.visited = currentindex
+
+ -- check for rootvertex
+ local rootvertex
+ if x.isroot then
+ rootvertex = x
+ elseif y.isroot then
+ rootvertex = y
+ end
+ if rootvertex then
+ local rootchild = rootvertex.rootchild
+ local rootparent = rootvertex.rootparent
+ if rootvertex.rootparent == currentvertex then
+ -- we found the other end of the back edge
+ return rootvertex
+ elseif rootchild.lowpoint < currentindex then
+ -- the block we just traversed is externally active
+ rootvertex.pertinentrootselement
+ = rootparent.pertinentroots:addback(rootvertex)
+ else
+ -- the block we just traversed is internally active
+ rootvertex.pertinentrootselement
+ = rootparent.pertinentroots:addfront(rootvertex)
+ end
+ -- jump to parent block
+ x, xin, y, yin = rootvertex.rootparent, 1, rootvertex.rootparent, 0
+ else
+ -- just continue on the external face
+ x, xin = get_successor_on_external_face(x, xin)
+ y, yin = get_successor_on_external_face(y, yin)
+ end
+ end
+end
+
+-- inverts the adjacency of a vertex
+-- i. e. reverses the order of the adjacency list and flips the links
+local function invert_adjacency(vertex)
+ -- reverse the list
+ for halfedge in Embedding.adjacency_iterator(vertex.adjlistlinks[0]) do
+ halfedge.links[0], halfedge.links[1]
+ = halfedge.links[1], halfedge.links[0]
+ end
+ -- flip links
+ vertex.adjlistlinks[0], vertex.adjlistlinks[1]
+ = vertex.adjlistlinks[1], vertex.adjlistlinks[0]
+end
+
+-- merges two blocks by merging the virtual root of the child block
+-- into it's parent, while making sure the external face stays consistent
+-- by flipping the root block if needed
+-- mergeinfo contains four fields:
+-- root - the virtual root vertex
+-- parent - it's parent
+-- rout - the link of the root through which we have exited it
+-- during the walkdown
+-- pin - the link of the parent through which we have entered it
+-- during the walkdown
+local function mergeblocks(mergeinfo)
+ local root = mergeinfo.root
+ local parent = mergeinfo.parent
+ local rout = mergeinfo.rootout
+ local pin = mergeinfo.parentin
+ if pin == rout then
+ -- flip required
+ invert_adjacency(root)
+ root.rootchild.sign = -1
+ --rout = 1 - rout -- not needed
+ end
+
+ -- redirect edges of the root vertex
+ for halfedge in Embedding.adjacency_iterator(root.adjlistlinks[0]) do
+ halfedge.twin.target = parent
+ end
+
+ -- remove block from data structures
+ root.rootchild.parentroot = nil
+ parent.pertinentroots:remove(root.pertinentrootselement)
+ parent.childlist:remove(root.rootchild.childlistelement)
+
+ -- merge adjacency lists
+ parent.adjlistlinks[0].links[1] = root.adjlistlinks[1]
+ parent.adjlistlinks[1].links[0] = root.adjlistlinks[0]
+ root.adjlistlinks[0].links[1] = parent.adjlistlinks[1]
+ root.adjlistlinks[1].links[0] = parent.adjlistlinks[0]
+ parent.adjlistlinks[pin] = root.adjlistlinks[pin]
+end
+
+-- inserts a half edge pointing to "to" into the adjacency list of "from",
+-- replacing the link "linkindex"
+local function insert_half_edge(from, linkindex, to)
+ local halfedge = {target = to, links = {}}
+ halfedge.links[ linkindex] = from.adjlistlinks[ linkindex]
+ halfedge.links[1 - linkindex] = from.adjlistlinks[1 - linkindex]
+ from.adjlistlinks[ linkindex].links[1 - linkindex] = halfedge
+ from.adjlistlinks[1 - linkindex].links[ linkindex] = halfedge
+ from.adjlistlinks[linkindex] = halfedge
+ return halfedge
+end
+
+-- connect the vertices x and y through the links xout and yin
+-- if shortcircuit is true, the edge will be marked as a short circuit edge
+-- and removed at the end of the algorithm
+function BM:embed_edge(x, xout, y, yin, shortcircuit)
+ -- create half edges
+ local halfedgex = insert_half_edge(x, xout, y)
+ local halfedgey = insert_half_edge(y, yin, x)
+ halfedgex.twin = halfedgey
+ halfedgey.twin = halfedgex
+ -- short circuit handling
+ if shortcircuit then
+ halfedgex.shortcircuit = true
+ halfedgey.shortcircuit = true
+ table.insert(self.shortcircuitedges, halfedgex)
+ table.insert(self.shortcircuitedges, halfedgey)
+ end
+end
+
+-- returns true if the given vertex is pertinent at the current step
+local function pertinent(vertex, currentindex)
+ return vertex.backedgeindex == currentindex
+ or not vertex.pertinentroots:empty()
+end
+
+-- returns ttue if the given vertex is externally active at the current step
+local function externally_active(vertex, currentindex)
+ return vertex.leastancestor < currentindex
+ or (not vertex.childlist:empty()
+ and vertex.childlist:first().lowpoint < currentindex)
+end
+
+-- the "walkdown", which merges the pertinent subgraph and embeds
+-- back and short circuit edges
+-- childrootvertex - a root vertex of the current vertex
+-- which the walkdown will start at
+-- currentvertex - the vertex of the current step
+function BM:walkdown(childrootvertex, currentvertex)
+ local currentindex = currentvertex.dfi
+ local mergestack = {}
+ local numinsertededges = 0 -- to return the number for count check
+ -- two walkdowns into both directions
+ for vout = 0,1 do
+ -- initialize the traversal variables
+ local w, win = get_successor_on_external_face(childrootvertex, 1 - vout)
+ while w ~= childrootvertex do
+ if w.backedgeindex == currentindex then
+ -- we found a backedge endpoint
+ -- merge all pertinent roots we found
+ while #mergestack > 0 do
+ mergeblocks(table.remove(mergestack))
+ end
+ -- embed the back edge
+ self:embed_edge(childrootvertex, vout, w, win)
+ numinsertededges = numinsertededges + 1
+ w.backedgeindex = 0 -- this shouldn't be necessary
+ end
+ if not w.pertinentroots:empty() then
+ -- we found a pertinent vertex with child blocks
+ -- create merge info for the later merge
+ local mergeinfo = {}
+ mergeinfo.parent = w
+ mergeinfo.parentin = win
+ local rootvertex = w.pertinentroots:first()
+ mergeinfo.root = rootvertex
+ -- check both directions for active vertices
+ local x, xin = get_successor_on_external_face(rootvertex, 1)
+ local y, yin = get_successor_on_external_face(rootvertex, 0)
+ local xpertinent = pertinent(x, currentindex)
+ local xexternallyactive = externally_active(x, currentindex)
+ local ypertinent = pertinent(y, currentindex)
+ local yexternallyactive = externally_active(y, currentindex)
+ -- chose the direction with the best vertex
+ if xpertinent and not xexternallyactive then
+ w, win = x, xin
+ mergeinfo.rootout = 0
+ elseif ypertinent and not yexternallyactive then
+ w, win = y, yin
+ mergeinfo.rootout = 1
+ elseif xpertinent then
+ w, win = x, xin
+ mergeinfo.rootout = 0
+ else
+ w, win = y, yin
+ mergeinfo.rootout = 1
+ end
+ -- this is what the paper sais, but it might cause problems
+ -- not sure though...
+ --[[if w == x then
+ mergeinfo.rootout = 0
+ else
+ mergeinfo.rootout = 1
+ end--]]
+ table.insert(mergestack, mergeinfo)
+ elseif not pertinent(w, currentindex)
+ and not externally_active(w, currentindex) then
+ -- nothing to see here, just continue on the external face
+ w, win = get_successor_on_external_face(w, win)
+ else
+ -- this is a stopping vertex, walkdown will end here
+ -- paper puts this into the if,
+ -- but this should always be the case, i think
+ assert(childrootvertex.rootchild.lowpoint < currentindex)
+ if #mergestack == 0 then
+ -- we're in the block we started at, so we embed a back edge
+ self:embed_edge(childrootvertex, vout, w, win, true)
+ end
+ break
+ end
+ end
+ if #mergestack > 0 then
+ -- this means, there is a pertinent vertex blocked by stop vertices,
+ -- so the graph is not planar and we can skip the second walkdown
+ break
+ end
+ end
+ return numinsertededges
+end
+
+-- embeds the back edges for the current vertex
+-- walkup and walkdown are called from here
+-- returns true, if all back edges could be embedded
+function BM:add_back_edges(vertex)
+ local pertinentroots = {} -- not in the paper
+ local numbackedges = 0
+ -- find all back edges to vertices with lower dfi
+ for _, arc in ipairs(self.inputgraph:outgoing(vertex.inputvertex)) do
+ local nvertex = self.verticesbyinputvertex[arc.head]
+ if nvertex.dfi > vertex.dfi
+ and nvertex.dfsparent ~= vertex
+ and nvertex ~= vertex.dfsparent then
+ numbackedges = numbackedges + 1
+ -- do the walkup
+ local rootvertex = walkup(nvertex, vertex)
+ if rootvertex then
+ -- remember the root vertex the walkup found, so we don't
+ -- have to call the walkdown for all root vertices
+ -- (or even know what the root vertices are)
+ table.insert(pertinentroots, rootvertex)
+ end
+ end
+ end
+ -- for all root vertices the walkup found
+ local insertededges = 0
+ while #pertinentroots > 0 do
+ -- do the walkdown
+ insertededges = insertededges
+ + self:walkdown(table.remove(pertinentroots), vertex)
+ end
+ if insertededges ~= numbackedges then
+ -- not all back edges could be embedded -> graph is not planar
+ return false
+ end
+ return true
+end
+
+-- the depth-first search of the postprocessing
+-- flips the blocks according to the sign field
+function BM:postdfs(vertex, sign)
+ sign = sign or 1
+ local root = vertex.parentroot
+ if root then
+ sign = 1
+ else
+ sign = sign * vertex.sign
+ end
+
+ if sign == -1 then
+ -- number of flips is odd, so we need to flip here
+ invert_adjacency(vertex)
+ end
+
+ -- for all dfs children
+ for _, arc in ipairs(self.inputgraph:outgoing(vertex.inputvertex)) do
+ local nvertex = self.verticesbyinputvertex[arc.head]
+ if nvertex.dfsparent == vertex then
+ -- recursive call
+ self:postdfs(nvertex, sign)
+ end
+ end
+end
+
+-- the postprocessing at the end of the algorithm
+-- calls the post depth-first search,
+-- removes the short circuit edges from the adjacency lists,
+-- adjusts the links of the vertices,
+-- merges root vertices
+-- and cleans up the vertices
+function BM:postprocess()
+ -- flip components
+ self:postdfs(self.vertices[1])
+
+ -- unlink the short circuit edges
+ for _, halfedge in ipairs(self.shortcircuitedges) do
+ halfedge.links[0].links[1] = halfedge.links[1]
+ halfedge.links[1].links[0] = halfedge.links[0]
+ end
+
+ -- vertex loop
+ local rootvertices = {}
+ local edgetoface = {}
+ for _, vertex in ipairs(self.vertices) do
+ -- check for root vertex and save it
+ local root = vertex.parentroot
+ if root then
+ table.insert(rootvertices, root)
+ end
+
+ -- clean up links and create adjacency matrix
+ local link = vertex.adjlistlinks[0]
+ local adjmat = {}
+ vertex.adjmat = adjmat
+ if link then
+ -- make sure the link points to a half edge
+ -- that is no short circuit edge
+ while link.shortcircuit do
+ link = link.links[0]
+ end
+ -- create link
+ vertex.link = link
+
+ -- create adjacency matrix
+ for halfedge in Embedding.adjacency_iterator(link) do
+ setmetatable(halfedge, Embedding.halfedgemetatable)
+ local target = halfedge.target
+ if target.isroot then
+ target = target.rootparent
+ end
+ adjmat[target] = halfedge
+ end
+ end
+
+ -- clean up vertex
+ vertex.sign = nil
+ vertex.childlist = nil
+ vertex.adjlistlinks = nil
+ vertex.pertinentroots = nil
+ vertex.dfi = nil
+ vertex.dfsparent = nil
+ vertex.leastancestor = nil
+ vertex.lowpoint = nil
+ vertex.parentroot = nil
+ end
+
+ -- root vertex loop
+ for _, root in ipairs(rootvertices) do
+ -- make sure the links point to a half edges
+ -- that are no short circuit edge
+ local link = root.adjlistlinks[0]
+ while link.shortcircuit do
+ link = link.links[0]
+ end
+
+ -- merge into parent
+ local rootparent = root.rootparent
+ local parentlink = rootparent.link
+ local adjmat = rootparent.adjmat
+ for halfedge in Embedding.adjacency_iterator(link) do
+ setmetatable(halfedge, Embedding.halfedgemetatable)
+ halfedge.twin.target = rootparent
+ adjmat[halfedge.target] = halfedge
+ end
+ if parentlink == nil then
+ assert(rootparent.link == nil)
+ rootparent.link = link
+ else
+ -- merge adjacency lists
+ parentlink.links[0].links[1] = link
+ link.links[0].links[1] = parentlink
+ local tmp = link.links[0]
+ link.links[0] = parentlink.links[0]
+ parentlink.links[0] = tmp
+ end
+ end
+end
+
+-- the entry point of the algorithm
+-- returns the array of vertices
+-- the vertices now only contain the inputvertex field
+-- and a field named "link" which contains an arbitrary half edge
+-- from the respective adjacency list
+-- the adjacency lists are in a circular order in respect to the plane graph
+function BM:run()
+ self:preprocess()
+ -- main loop over all vertices from lowest dfi to highest
+ for i = self.numvertices, 1, -1 do
+ local vertex = self.vertices[i]
+ self:add_trivial_edges(vertex)
+ if not self:add_back_edges(vertex) then
+ -- graph not planar
+ return nil
+ end
+ end
+ self:postprocess()
+ local embedding = Embedding.new()
+ embedding.vertices = self.vertices
+ return embedding
+end
+
+return BM
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/Embedding.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/Embedding.lua
new file mode 100644
index 00000000000..50fc3672207
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/Embedding.lua
@@ -0,0 +1,787 @@
+local E = {}
+
+require("pgf.gd.planar").Embedding = E
+
+-- includes
+local LinkedList = require("pgf.gd.planar.LinkedList")
+
+E.vertexmetatable = {
+ __tostring = function(v)
+ if v.name then
+ return v.name
+ elseif v.inputvertex then
+ return v.inputvertex.name
+ else
+ return tostring(v)
+ end
+ end
+}
+
+E.halfedgemetatable = {
+ __tostring = function(e)
+ return tostring(e.twin.target)
+ .. " -> "
+ .. tostring(e.target)
+ end
+}
+
+-- create class properties
+E.__index = E
+
+function E.new()
+ local t = {
+ vertices = {},
+ }
+ setmetatable(t, E)
+ return t
+end
+
+function E:add_vertex(name, inputvertex, virtual)
+ virtual = virtual or nil
+ local vertex = {
+ adjmat = {},
+ name = name,
+ inputvertex = inputvertex,
+ virtual = virtual,
+ }
+ setmetatable(vertex, E.vertexmetatable)
+ table.insert(self.vertices, vertex)
+ return vertex
+end
+
+function E:add_edge(v1, v2, after1, after2, virtual)
+ assert(v1.link == nil or v1 == after1.twin.target)
+ assert(v2.link == nil or v2 == after2.twin.target)
+ assert(v1.adjmat[v2] == nil)
+ assert(v2.adjmat[v1] == nil)
+
+ virtual = virtual or nil
+
+ local halfedge1 = {
+ target = v2,
+ virtual = virtual,
+ links = {},
+ }
+ local halfedge2 = {
+ target = v1,
+ virtual = virtual,
+ links = {},
+ }
+ halfedge1.twin = halfedge2
+ halfedge2.twin = halfedge1
+
+ setmetatable(halfedge1, E.halfedgemetatable)
+ setmetatable(halfedge2, E.halfedgemetatable)
+
+ if v1.link == nil then
+ v1.link = halfedge1
+ halfedge1.links[0] = halfedge1
+ halfedge1.links[1] = halfedge1
+ else
+ halfedge1.links[0] = after1.links[0]
+ after1.links[0].links[1] = halfedge1
+ halfedge1.links[1] = after1
+ after1.links[0] = halfedge1
+ end
+
+ if v2.link == nil then
+ v2.link = halfedge2
+ halfedge2.links[0] = halfedge2
+ halfedge2.links[1] = halfedge2
+ else
+ halfedge2.links[0] = after2.links[0]
+ after2.links[0].links[1] = halfedge2
+ halfedge2.links[1] = after2
+ after2.links[0] = halfedge2
+ end
+
+ v1.adjmat[v2] = halfedge1
+ v2.adjmat[v1] = halfedge2
+
+ return halfedge1, halfedge2
+end
+
+function E:remove_virtual()
+ local virtuals = {}
+ for i, v in ipairs(self.vertices) do
+ if v.virtual then
+ table.insert(virtuals, i)
+ else
+ local start = v.link
+ local current = start
+ repeat
+ current = current.links[0]
+ if current.virtual then
+ current.links[0].links[1] = current.links[1]
+ current.links[1].links[0] = current.links[0]
+ v.adjmat[current.target] = nil
+ current.target.adjmat[v] = nil
+ end
+ until current == start
+ end
+ end
+ for i = #virtuals, 1, -1 do
+ self.vertices[virtuals[i]] = self.vertices[#self.vertices]
+ table.remove(self.vertices)
+ end
+end
+
+-- for the use in for-loops
+-- iterates over the adjacency list of a vertex
+-- given a half edge to start and a direction (0 or 1, default 0)
+function E.adjacency_iterator(halfedge, direction)
+ direction = direction or 0
+ local function next_edge(startedge, prevedge)
+ if prevedge == nil then
+ return startedge
+ else
+ local nextedge = prevedge.links[direction]
+ if nextedge ~= startedge then
+ return nextedge
+ else
+ return nil
+ end
+ end
+ end
+ return next_edge, halfedge, nil
+end
+
+function E.face_iterator(halfedge, direction)
+ direction = direction or 0
+ local function next_edge(startedge, prevedge)
+ if prevedge == nil then
+ return startedge
+ else
+ local nextedge = prevedge.twin.links[1 - direction]
+ if nextedge ~= startedge then
+ return nextedge
+ else
+ return nil
+ end
+ end
+ end
+ return next_edge, halfedge, nil
+end
+
+function E:triangulate()
+ local visited = {}
+ for _, vertex in ipairs(self.vertices) do
+ for start in E.adjacency_iterator(vertex.link) do
+ if not visited[start] then
+ local prev = start
+ local beforestart = start.links[0].twin
+ local current = start.twin.links[1]
+ local next = current.twin.links[1]
+ visited[start] = true
+ visited[current] = true
+ visited[next] = true
+ while next ~= beforestart do
+ local halfedge1, halfedge2
+ if vertex ~= current.target
+ and not vertex.adjmat[current.target] then
+ halfedge1, halfedge2 = self:add_edge(
+ vertex, current.target,
+ prev, next,
+ true
+ )
+
+ prev = halfedge1
+ current = next
+ next = next.twin.links[1]
+ elseif not prev.target.adjmat[next.target] then
+ halfedge1, halfedge2 = self:add_edge(
+ prev.target, next.target,
+ current, next.twin.links[1],
+ true
+ )
+
+ current = halfedge1
+ next = halfedge2.links[1]
+ else
+ local helper = next.twin.links[1]
+ halfedge1, halfedge2 = self:add_edge(
+ current.target, helper.target,
+ next, helper.twin.links[1],
+ true
+ )
+
+ next = halfedge1
+ end
+
+ visited[next] = true
+ visited[halfedge1] = true
+ visited[halfedge2] = true
+ end
+ end
+ end
+ end
+end
+
+function E:canonical_order(v1, v2, vn)
+ local n = #self.vertices
+ local order = { v1 }
+ local marks = { [v1] = "ordered", [v2] = 0 }
+ local visited = {}
+ local vk = v1
+ local candidates = LinkedList.new()
+ local listelements = {}
+ for k = 1, n-2 do
+ for halfedge in E.adjacency_iterator(vk.link) do
+ local vertex = halfedge.target
+ if vertex ~= vn then
+ local twin = halfedge.twin
+ visited[twin] = true
+ if marks[vertex] == nil then
+ marks[vertex] = "visited"
+ elseif marks[vertex] ~= "ordered" then
+ local neighbor1 = visited[twin.links[0]]
+ local neighbor2 = visited[twin.links[1]]
+ if marks[vertex] == "visited" then
+ if neighbor1 or neighbor2 then
+ marks[vertex] = 1
+ listelements[vertex] = candidates:addback(vertex)
+ else
+ marks[vertex] = 2
+ end
+ else
+ if neighbor1 == neighbor2 then
+ if neighbor1 and neighbor2 then
+ marks[vertex] = marks[vertex] - 1
+ else
+ marks[vertex] = marks[vertex] + 1
+ end
+ if marks[vertex] == 1 then
+ listelements[vertex]
+ = candidates:addback(vertex)
+ elseif listelements[vertex] then
+ candidates:remove(listelements[vertex])
+ listelements[vertex] = nil
+ end
+ end
+ end
+ end
+ end
+ end
+ vk = candidates:popfirst()
+ order[k+1] = vk
+ marks[vk] = "ordered"
+ end
+ order[n] = vn
+ return order
+end
+
+function E:get_biggest_face()
+ local number = 0
+ local edge
+ local visited = {}
+ for _, vertex in ipairs(self.vertices) do
+ for start in E.adjacency_iterator(vertex.link) do
+ local count = 0
+ if not visited[start] then
+ visited[start] = true
+ local current = start
+ repeat
+ count = count + 1
+ current = current.twin.links[1]
+ until current == start
+ if count > number then
+ number = count
+ edge = start
+ end
+ end
+ end
+ end
+ return edge, number
+end
+
+function E:surround_by_triangle(faceedge, facesize)
+ local divisor = 3
+ if facesize > 3 then
+ divisor = 4
+ end
+ local basenodes = math.floor(facesize / divisor)
+ local extranodes = facesize % divisor
+ local attachnodes = { basenodes, basenodes, basenodes }
+ if facesize > 3 then
+ attachnodes[2] = basenodes * 2
+ end
+ for i = 1,extranodes do
+ attachnodes[i] = attachnodes[i] + 1
+ end
+
+ local v = {
+ self:add_vertex("$v_1$", nil, true),
+ self:add_vertex("$v_n$", nil, true),
+ self:add_vertex("$v_2$", nil, true)
+ }
+ for i = 1,3 do
+ local currentv = v[i]
+ local nextv = v[i % 3 + 1]
+ self:add_edge(currentv, nextv, currentv.link, nextv.link, true)
+ end
+
+ local current = faceedge
+ local next = current.twin.links[1]
+ for i = 1,3 do
+ local vertex = v[i]
+ local otheredge = vertex.adjmat[v[i % 3 + 1]]
+ local previnserted = otheredge.links[1]
+ for count = 1, attachnodes[i] do
+ if not vertex.adjmat[current.target] then
+ previnserted, _ = self:add_edge(vertex, current.target,
+ previnserted, next,
+ true
+ )
+ end
+
+ current = next
+ next = next.twin.links[1]
+ end
+ if not vertex.adjmat[current.target] then
+ previnserted, _ = self:add_edge(
+ vertex, current.target,
+ previnserted, next,
+ true
+ )
+ current = previnserted
+ end
+ end
+ return v[1], v[3], v[2]
+end
+
+function E:improve()
+ local pairdata = {}
+ local inpair = {}
+ for i, v1 in ipairs(self.vertices) do
+ for j = i + 1, #self.vertices do
+ local v2 = self.vertices[j]
+ local pd = self:find_pair_components(v1, v2)
+ if pd then
+ inpair[v1] = true
+ inpair[v2] = true
+ table.insert(pairdata, pd)
+ end
+ end
+ if not inpair[v1] then
+ local pd = self:find_pair_components(v1, nil)
+ if pd then
+ inpair[v1] = true
+ table.insert(pairdata, pd)
+ end
+ end
+ end
+
+ local changed
+ local runs = 1
+ local edgepositions = {}
+ repeat
+ changed = false
+ for i, pd in ipairs(pairdata) do
+ self:improve_separation_pair(pd)
+ end
+ -- check for changes
+ for i, v in ipairs(self.vertices) do
+ local start = v.link
+ local current = start
+ local counter = 1
+ repeat
+ if counter ~= edgepositions[current] then
+ changed = true
+ edgepositions[current] = counter
+ end
+ counter = counter + 1
+ current = current.links[0]
+ until current == start
+ end
+ runs = runs + 1
+ until changed == false or runs > 100
+end
+
+function E:find_pair_components(v1, v2)
+ local visited = {}
+ local companchors = {}
+ local edgecomps = {}
+ local compvertices = {}
+ local islinear = {}
+ local edgeindices = {}
+
+ local pair = { v1, v2 }
+ local start = v1.link
+ local current = start
+ local edgeindex = 1
+ -- start searches from v1
+ repeat
+ edgeindices[current] = edgeindex
+ edgeindex = edgeindex + 1
+ if not edgecomps[current] then
+ local compindex = #companchors + 1
+ local ca, il
+ edgecomps[current] = compindex
+ compvertices[compindex] = {}
+ local target = current.target
+ if target == v2 then
+ edgecomps[current.twin] = compindex
+ ca = 3
+ il = true
+ else
+ ca, il = self:component_dfs(
+ target,
+ pair,
+ visited,
+ edgecomps,
+ compvertices[compindex],
+ compindex
+ )
+ end
+ companchors[compindex] = ca
+ islinear[compindex] = il
+ end
+ current = current.links[0]
+ until current == start
+
+ if v2 then
+ start = v2.link
+ current = start
+ local lastincomp = true
+ local edgeindex = 1
+ -- now find the remaining blocks at v2
+ repeat
+ edgeindices[current] = edgeindex
+ edgeindex = edgeindex + 1
+ if not edgecomps[current] then
+ local compindex = #companchors + 1
+ edgecomps[current] = compindex
+ compvertices[compindex] = {}
+ self:component_dfs(
+ current.target,
+ pair,
+ visited,
+ edgecomps,
+ compvertices[compindex],
+ compindex
+ )
+ companchors[compindex] = 2
+ end
+ current = current.links[0]
+ until current == start
+ end
+
+ -- init compedges, tricomps, twocomps
+ local tricomps = {}
+ local twocomps = {{}, {}}
+ for i, anchors in ipairs(companchors) do
+ if anchors == 3 then
+ table.insert(tricomps, i)
+ else
+ table.insert(twocomps[anchors], i)
+ end
+ end
+
+ local flipimmune = #tricomps == 2
+ and (islinear[tricomps[1]] or islinear[tricomps[2]])
+ if (#tricomps < 2 or flipimmune)
+ and (v2 ~= nil or #twocomps[1] < 2) then
+ return nil
+ end
+
+ -- order tri comps cyclic
+ local function sorter(a, b)
+ return #compvertices[a] < #compvertices[b]
+ end
+
+ table.sort(tricomps, sorter)
+
+ -- determine order of comps
+ local numtricomps = #tricomps
+ local comporder = { {}, {} }
+ local bottom = math.ceil(numtricomps / 2)
+ local top = bottom + 1
+ for i, comp in ipairs(tricomps) do
+ if i % 2 == 1 then
+ comporder[1][bottom] = comp
+ comporder[2][numtricomps - bottom + 1] = comp
+ bottom = bottom - 1
+ else
+ comporder[1][top] = comp
+ comporder[2][numtricomps - top + 1] = comp
+ top = top + 1
+ end
+ end
+
+ local pairdata = {
+ pair = pair,
+ companchors = companchors,
+ edgecomps = edgecomps,
+ edgeindices = edgeindices,
+ compvertices = compvertices,
+ tricomps = tricomps,
+ twocomps = twocomps,
+ comporder = comporder,
+ }
+ return pairdata
+end
+
+function E:component_dfs(v, pair, visited, edgecomps, compvertices, compindex)
+ visited[v] = true
+ local start = v.link
+ local current = start
+ local companchors = 1
+ local numedges = 0
+ local islinear = true
+ table.insert(compvertices, v)
+ repeat
+ numedges = numedges + 1
+ local target = current.target
+ if target == pair[1] or target == pair[2] then
+ edgecomps[current.twin] = compindex
+ if target == pair[2] then
+ companchors = 3
+ end
+ elseif not visited[target] then
+ local ca, il = self:component_dfs(
+ target,
+ pair,
+ visited,
+ edgecomps,
+ compvertices,
+ compindex
+ )
+ if ca == 3 then
+ companchors = 3
+ end
+ islinear = islinear and il
+ end
+ current = current.links[0]
+ until current == start
+ return companchors, islinear and numedges == 2
+end
+
+function E:improve_separation_pair(pairdata)
+ local pair = pairdata.pair
+ local companchors = pairdata.companchors
+ local edgecomps = pairdata.edgecomps
+ local edgeindices = pairdata.edgeindices
+ local compvertices = pairdata.compvertices
+ local tricomps = pairdata.tricomps
+ local twocomps = pairdata.twocomps
+ local comporder = pairdata.comporder
+ local v1 = pair[1]
+ local v2 = pair[2]
+
+ local compedges = {}
+ for i = 1, #companchors do
+ compedges[i] = {{}, {}}
+ end
+
+ local numtricomps = #tricomps
+ local numtwocomps = { #twocomps[1], #twocomps[2] }
+
+ -- find compedges
+ for i = 1, #pair do
+ -- first find an edge that is the first of a triconnected component
+ local start2
+ if v2 then
+ start = pair[i].link
+ current = start
+ local last
+ repeat
+ local comp = edgecomps[current]
+ if companchors[comp] == 3 then
+ if last == nil then
+ last = comp
+ elseif last ~= comp then
+ start2 = current
+ break
+ end
+ end
+ current = current.links[0]
+ until current == start
+ else
+ start2 = pair[i].link
+ end
+ -- now list the edges by components
+ current = start2
+ repeat
+ table.insert(compedges[edgecomps[current]][i], current)
+ current = current.links[0]
+ until current == start2
+ end
+
+ -- count edges on each side of tri comps
+ local edgecount = {}
+ for _, comp in ipairs(tricomps) do
+ edgecount[comp] = {}
+ for i = 1, #pair do
+ local count = 1
+ local current = compedges[comp][i][1]
+ local other = pair[3 - i]
+ while current.target ~= other do
+ count = count + 1
+ current = current.twin.links[0]
+ end
+ edgecount[comp][i] = count
+ end
+ end
+
+ -- determine which comps have to be flipped
+ local flips = {}
+ local numflips = 0
+ local allflipped = true
+ for i, comp in ipairs(comporder[1]) do
+ local side1, side2
+ if i > numtricomps / 2 then
+ side1 = edgecount[comp][1]
+ side2 = edgecount[comp][2]
+ else
+ side1 = edgecount[comp][2]
+ side2 = edgecount[comp][1]
+ end
+ if side1 > side2 then
+ numflips = numflips + 1
+ flips[comp] = true
+ elseif side1 < side2 then
+ allflipped = false
+ end
+ end
+
+ if allflipped then
+ for i, comp in ipairs(tricomps) do
+ flips[comp] = false
+ end
+ else
+ for i, comp in ipairs(tricomps) do
+ if flips[comp] then
+ for _, v in ipairs(compvertices[comp]) do
+ local start = v.link
+ local current = start
+ repeat
+ current.links[0], current.links[1]
+ = current.links[1], current.links[0]
+ current = current.links[1]
+ until current == start
+ end
+ end
+ end
+ end
+
+ -- order edges cyclic per component (one cycle for all tri comps)
+ for i = 1, #pair do
+ if v2 then
+ local co
+ if allflipped then
+ co = comporder[3 - i]
+ else
+ co = comporder[i]
+ end
+
+ local id = co[numtricomps]
+ lastedges = compedges[id][i]
+ if flips[id] then
+ lastedge = lastedges[1]
+ else
+ lastedge = lastedges[#lastedges]
+ end
+
+ -- tri comps
+ for _, id in ipairs(co) do
+ local edges = compedges[id][i]
+ local from
+ local to
+ local step
+ if flips[id] then
+ from = #edges
+ to = 1
+ step = -1
+ else
+ from = 1
+ to = #edges
+ step = 1
+ end
+ for k = from, to, step do
+ local edge = edges[k]
+ lastedge.links[0] = edge
+ edge.links[1] = lastedge
+ lastedge = edge
+ end
+ end
+ end
+
+ -- two comps
+ for _, id in ipairs(twocomps[i]) do
+ lastedges = compedges[id][i]
+ lastedge = lastedges[#lastedges]
+ for _, edge in ipairs(compedges[id][i]) do
+ lastedge.links[0] = edge
+ edge.links[1] = lastedge
+ lastedge = edge
+ end
+ end
+ end
+
+ -- now merge the cycles
+ for i = 1, #pair do
+ local outeredges = {}
+ -- find the biggest face of the tri comps
+ if v2 then
+ local biggestedge
+ local biggestsize
+ local biggestindex
+ local start = compedges[tricomps[1]][i][1]
+ local current = start
+ repeat
+ local size = self:get_face_size(current)
+ if not biggestedge or size > biggestsize
+ or (size == biggestsize
+ and edgeindices[current] > biggestindex) then
+ biggestedge = current
+ biggestsize = size
+ biggestindex = edgeindices[current]
+ end
+ current = current.links[0]
+ until current == start
+ outeredges[1] = biggestedge
+ end
+
+ -- now for every two comp
+ for _, id in ipairs(twocomps[i]) do
+ local biggestedge
+ local biggestsize
+ local biggestindex
+ local start = compedges[id][i][1]
+ local current = start
+ repeat
+ local size = self:get_face_size(current)
+ if not biggestedge or size > biggestsize
+ or (size == biggestsize
+ and edgeindices[current] > biggestindex) then
+ biggestedge = current
+ biggestsize = size
+ biggestindex = edgeindices[current]
+ end
+ current = current.links[0]
+ until current == start
+ table.insert(outeredges, biggestedge)
+ end
+
+ -- now merge all comps at the outer edges
+ local lastedge = outeredges[#outeredges].links[0]
+ for _, edge in ipairs(outeredges) do
+ local nextlastedge = edge.links[0]
+ lastedge.links[1] = edge
+ edge.links[0] = lastedge
+ lastedge = nextlastedge
+ end
+ end
+end
+
+function E:get_face_size(halfedge)
+ local size = 0
+ local current = halfedge
+ repeat
+ size = size + 1
+ current = current.twin.links[1]
+ until current == halfedge
+ return size
+end
+
+return E
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/LinkedList.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/LinkedList.lua
new file mode 100644
index 00000000000..99a23501858
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/LinkedList.lua
@@ -0,0 +1,88 @@
+local LinkedList = {}
+
+LinkedList.__index = LinkedList
+
+function LinkedList.new()
+ local list = {elements = {}}
+ setmetatable(list, LinkedList)
+ return list
+end
+
+function LinkedList:addback(payload)
+ if payload == nil then
+ error("Need a payload!", 2)
+ end
+ local element = { payload = payload }
+ if self.head then
+ local tail = self.head.prev
+ self.head.prev = element
+ tail.next = element
+ element.next = self.head
+ element.prev = tail
+ else
+ self.head = element
+ element.next = element
+ element.prev = element
+ end
+ self.elements[element] = true
+ return element
+end
+
+function LinkedList:addfront(payload)
+ self.head = self:addback(payload)
+ return self.head
+end
+
+function LinkedList:remove(element)
+ if self.elements[element] == nil then
+ error("Element not in list!", 2)
+ end
+ if self.head == element then
+ if element.next == element then
+ self.head = nil
+ else
+ self.head = element.next
+ end
+ end
+ element.prev.next = element.next
+ element.next.prev = element.prev
+ self.elements[element] = nil
+end
+
+function LinkedList:popfirst()
+ if self.head == nil then
+ return nil
+ end
+ local element = self.head
+ if element.next == element then
+ self.head = nil
+ else
+ self.head = element.next
+ element.next.prev = element.prev
+ element.prev.next = element.next
+ end
+ self.elements[element] = nil
+ return element.payload
+end
+
+function LinkedList:poplast()
+ if self.head == nil then
+ return nil
+ end
+ self.head = self.head.prev
+ return self:popfirst()
+end
+
+function LinkedList:first()
+ return self.head and self.head.payload
+end
+
+function LinkedList:last()
+ return self.head and self.head.prev.payload
+end
+
+function LinkedList:empty()
+ return self.head == nil
+end
+
+return LinkedList
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/List.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/List.lua
new file mode 100644
index 00000000000..564216a8c37
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/List.lua
@@ -0,0 +1,49 @@
+local List = {}
+
+List.__index = List
+
+function List.new()
+ local t = {first = 0, last = -1}
+ setmetatable(t, List)
+ return t
+end
+
+function List:pushleft(value)
+ local first = self.first - 1
+ self.first = first
+ self[first] = value
+end
+
+function List:pushright(value)
+ local last = self.last + 1
+ self.last = last
+ self[last] = value
+end
+
+function List:popleft()
+ local first = self.first
+ if first > self.last then error("List is empty") end
+ local value = self[first]
+ self[first] = nil
+ self.first = first + 1
+ return value
+end
+
+function List:popright()
+ local last = self.last
+ if self.first > last then error("List is empty") end
+ local value = self[last]
+ self[last] = nil
+ self.last = last - 1
+ return value
+end
+
+function List:size()
+ return self.last - self.first + 1
+end
+
+function List:empty()
+ return self.last < self.first
+end
+
+return List
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/PDP.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/PDP.lua
new file mode 100644
index 00000000000..fbf94a52502
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/PDP.lua
@@ -0,0 +1,576 @@
+
+local PDP = {}
+require("pgf.gd.planar").PDP = PDP
+
+-- Imports
+local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
+local Storage = require "pgf.gd.lib.Storage"
+local Coordinate = require "pgf.gd.model.Coordinate"
+local Path = require "pgf.gd.model.Path"
+---
+PDP.__index = PDP
+
+function PDP.new(ugraph, embedding,
+ delta, gamma, coolingfactor,
+ expiterations,
+ startrepexp, endrepexp,
+ startattexp, endattexp,
+ appthreshold, stretchthreshold,
+ stresscounterthreshold,
+ numdivisions)
+ local t = {
+ ugraph = ugraph,
+ embedding = embedding,
+ delta = delta ,
+ gamma = gamma,
+ coolingfactor = coolingfactor,
+ expiterations = expiterations,
+ startrepexp = startrepexp,
+ endrepexp = endrepexp,
+ startattexp = startattexp,
+ endattexp = endattexp,
+ appthreshold = appthreshold,
+ stretchthreshold = stretchthreshold,
+ stresscounterthreshold = stresscounterthreshold,
+ numdivisions = numdivisions,
+ posxs = {},
+ posys = {},
+ cvsxs = {},
+ cvsys = {},
+ embeddingedges = {},
+ edgeids = {},
+ numedgeids = 0,
+ vertexids = {},
+ numvertexids = 0,
+ vertexpairs1 = {},
+ vertexpairs2 = {},
+ pairconnected = {},
+ edgepairsvertex = {},
+ edgepairsedge = {},
+ edgevertex1 = {},
+ edgevertex2 = {},
+ edgedeprecated = {},
+ subdivisionedges = {},
+ subdivisionvertices = {},
+ temperature = 1,
+ }
+
+ setmetatable(t, PDP)
+ return t
+end
+
+function PDP:run()
+ self:normalize_size()
+ self:find_force_pairs()
+
+ local delta = self.delta
+ local gamma = self.gamma
+ local coolingfactor = self.coolingfactor
+ local expiterations = self.expiterations
+ local startrepexp = self.startrepexp
+ local endattexp = self.endattexp
+ local startattexp = self.startattexp
+ local endrepexp = self.endrepexp
+
+ local vertexpairs1 = self.vertexpairs1
+ local vertexpairs2 = self.vertexpairs2
+ local pairconnected = self.pairconnected
+ local edgepairsvertex = self.edgepairsvertex
+ local edgepairsedge = self.edgepairsedge
+ local edgevertex1 = self.edgevertex1
+ local edgevertex2 = self.edgevertex2
+ local edgedeprecated = self.edgedeprecated
+
+ local forcexs = {}
+ local forceys = {}
+ local posxs = self.posxs
+ local posys = self.posys
+ local cvsxs = self.cvsxs
+ local cvsys = self.cvsys
+ local numcvs = {}
+ for i, v in ipairs(self.embedding.vertices) do
+ cvsxs[i] = {}
+ cvsys[i] = {}
+ posxs[i] = v.inputvertex.pos.x
+ posys[i] = v.inputvertex.pos.y
+ end
+
+ local numorigvertices = self.numvertexids
+ local numorigedges = self.numedgeids
+ local numdivisions = self.numdivisions
+ local divdelta = delta / (numdivisions + 1)
+ local stresscounter = {}
+ for i = 1, self.numedgeids do
+ stresscounter[i] = 0
+ end
+
+ local appthreshold = self.appthreshold
+ local stretchthreshold = self.stretchthreshold
+ local stresscounterthreshold = self.stresscounterthreshold
+
+ for i = 1, numorigedges do
+ local iv1 = self.embedding.vertices[edgevertex1[i]].inputvertex
+ local iv2 = self.embedding.vertices[edgevertex2[i]].inputvertex
+ local arc = self.ugraph:arc(iv1, iv2)
+ --TODO subdivide edge if desired
+ --self:subdivide_edge(i)
+ end
+
+ -- main loop
+ local iteration = 0
+ repeat
+ iteration = iteration + 1
+ local temperature = self.temperature
+ local ratio = math.min(1, iteration / expiterations)
+ local repexp = startrepexp + (endrepexp - startrepexp) * ratio
+ local attexp = startattexp + (endattexp - startattexp) * ratio
+ for i = 1, self.numvertexids do
+ forcexs[i] = 0
+ forceys[i] = 0
+ numcvs[i] = 0
+ end
+ -- vertex-vertex forces
+ for i = 1, #vertexpairs1 do
+ local id1 = vertexpairs1[i]
+ local id2 = vertexpairs2[i]
+ local diffx = posxs[id2] - posxs[id1]
+ local diffy = posys[id2] - posys[id1]
+ local dist2 = diffx * diffx + diffy * diffy
+ local dist = math.sqrt(dist2)
+ local dirx = diffx / dist
+ local diry = diffy / dist
+ assert(dist ~= 0)
+
+ local useddelta = delta
+ local hasdivvertex = id1 > numorigvertices or id2 > numorigvertices
+
+ -- calculate attractive force
+ if pairconnected[i] then
+ if hasdivvertex then
+ useddelta = divdelta
+ end
+ local mag = (dist / useddelta) ^ attexp * useddelta
+ local fax = mag * dirx
+ local fay = mag * diry
+ forcexs[id1] = forcexs[id1] + fax
+ forceys[id1] = forceys[id1] + fay
+ forcexs[id2] = forcexs[id2] - fax
+ forceys[id2] = forceys[id2] - fay
+ elseif hasdivvertex then
+ useddelta = gamma
+ end
+
+ -- calculate repulsive force
+ local mag = (useddelta / dist) ^ repexp * useddelta
+ local frx = mag * dirx
+ local fry = mag * diry
+ forcexs[id1] = forcexs[id1] - frx
+ forceys[id1] = forceys[id1] - fry
+ forcexs[id2] = forcexs[id2] + frx
+ forceys[id2] = forceys[id2] + fry
+ end
+
+ -- edge-vertex forces and collisions
+ for i = 1, #edgepairsvertex do
+ local edgeid = edgepairsedge[i]
+ if not edgedeprecated[edgeid] then
+ local id1 = edgepairsvertex[i]
+ local id2 = edgevertex1[edgeid]
+ local id3 = edgevertex2[edgeid]
+ assert(id2 ~= id1 and id3 ~= id1)
+
+ local abx = posxs[id3] - posxs[id2]
+ local aby = posys[id3] - posys[id2]
+ local dab2 = abx * abx + aby * aby
+ local dab = math.sqrt(dab2)
+ assert(dab ~= 0)
+ local abnx = abx / dab
+ local abny = aby / dab
+ local avx = posxs[id1] - posxs[id2]
+ local avy = posys[id1] - posys[id2]
+ local daiv = abnx * avx + abny * avy
+ local ivx = posxs[id2] + abnx * daiv
+ local ivy = posys[id2] + abny * daiv
+ local vivx = ivx - posxs[id1]
+ local vivy = ivy - posys[id1]
+ local dviv2 = vivx * vivx + vivy * vivy
+ local dviv = math.sqrt(dviv2)
+ local afactor, bfactor = 1, 1
+ local cvx
+ local cvy
+ if daiv < 0 then
+ cvx = -avx / 2
+ cvy = -avy / 2
+ local norm2 = cvx * cvx + cvy * cvy
+ bfactor = 1 + (cvx * abx + cvy * aby) / norm2
+ elseif daiv > dab then
+ cvx = (abx - avx) / 2
+ cvy = (aby - avy) / 2
+ local norm2 = cvx * cvx + cvy * cvy
+ afactor = 1 - (cvx * abx + cvy * aby) / norm2
+ else
+ if edgeid < numorigedges
+ and dviv < gamma * appthreshold
+ and dab > delta * stretchthreshold then
+ stresscounter[edgeid] = stresscounter[edgeid] + 1
+ end
+ assert(dviv > 0)
+ cvx = vivx / 2
+ cvy = vivy / 2
+ -- calculate edge repulsive force
+ local dirx = -vivx / dviv
+ local diry = -vivy / dviv
+ local mag = (gamma / dviv) ^ repexp * gamma
+ local fex = mag * dirx
+ local fey = mag * diry
+ local abratio = daiv / dab
+ forcexs[id1] = forcexs[id1] + fex
+ forceys[id1] = forceys[id1] + fey
+ forcexs[id2] = forcexs[id2] - fex * (1 - abratio)
+ forceys[id2] = forceys[id2] - fey * (1 - abratio)
+ forcexs[id3] = forcexs[id3] - fex * abratio
+ forceys[id3] = forceys[id3] - fey * abratio
+ end
+ local nv = numcvs[id1] + 1
+ local na = numcvs[id2] + 1
+ local nb = numcvs[id3] + 1
+ numcvs[id1] = nv
+ numcvs[id2] = na
+ numcvs[id3] = nb
+ cvsxs[id1][nv] = cvx
+ cvsys[id1][nv] = cvy
+ cvsxs[id2][na] = -cvx * afactor
+ cvsys[id2][na] = -cvy * afactor
+ cvsxs[id3][nb] = -cvx * bfactor
+ cvsys[id3][nb] = -cvy * bfactor
+ end
+ end
+
+ -- clamp forces
+ local scalefactor = 1
+ local collision = false
+ for i = 1, self.numvertexids do
+ local forcex = forcexs[i]
+ local forcey = forceys[i]
+ forcex = forcex * temperature
+ forcey = forcey * temperature
+ forcexs[i] = forcex
+ forceys[i] = forcey
+ local forcenorm2 = forcex * forcex + forcey * forcey
+ local forcenorm = math.sqrt(forcenorm2)
+ scalefactor = math.min(scalefactor, delta * 3 * temperature / forcenorm)
+ local cvys = cvsys[i]
+ for j, cvx in ipairs(cvsxs[i]) do
+ local cvy = cvys[j]
+ local cvnorm2 = cvx * cvx + cvy * cvy
+ local cvnorm = math.sqrt(cvnorm2)
+ local projforcenorm = (cvx * forcex + cvy * forcey) / cvnorm
+ if projforcenorm > 0 then
+ local factor = cvnorm * 0.9 / projforcenorm
+ if factor < scalefactor then
+ scalefactor = factor
+ collision = true
+ end
+ end
+ end
+ end
+ local moved = false
+ for i = 1, self.numvertexids do
+ local forcex = forcexs[i] * scalefactor
+ local forcey = forceys[i] * scalefactor
+ posxs[i] = posxs[i] + forcex
+ posys[i] = posys[i] + forcey
+ local forcenorm2 = forcex * forcex + forcey * forcey
+ if forcenorm2 > 0.0001 * delta * delta then moved = true end
+ end
+
+ -- subdivide stressed edges
+ if numdivisions > 0 then
+ for i = 1, numorigedges do
+ if stresscounter[i] > stresscounterthreshold then
+ self:subdivide_edge(i)
+ stresscounter[i] = 0
+ end
+ end
+ end
+ self.temperature = self.temperature * coolingfactor
+ until not collision and not moved
+ print("\nfinished PDP after " .. iteration .. " iterations")
+
+ -- write the positions back
+ for i, v in ipairs(self.embedding.vertices) do
+ v.inputvertex.pos.x = posxs[i]
+ v.inputvertex.pos.y = posys[i]
+ end
+
+ -- route the edges
+ for i = 1, self.numedgeids do
+ if self.subdivisionvertices[i] then
+ local iv1 = self.embedding.vertices[self.edgevertex1[i]].inputvertex
+ local iv2 = self.embedding.vertices[self.edgevertex2[i]].inputvertex
+ local arc = self.ugraph:arc(iv1, iv2)
+ local p = Path.new()
+ p:appendMoveto(arc.tail.pos:clone())
+ for _, vid in ipairs(self.subdivisionvertices[i]) do
+ p:appendLineto(self.posxs[vid], self.posys[vid])
+ end
+ p:appendLineto(arc.head.pos:clone())
+ arc.path = p
+ end
+ end
+end
+
+function PDP:subdivide_edge(edgeid)
+ assert(self.subdivisionedges[edgeid] == nil)
+ local numdivisions = self.numdivisions
+ local subdivisionedges = {}
+ local subdivisionvertices = {}
+ local id1 = self.edgevertex1[edgeid]
+ local id2 = self.edgevertex2[edgeid]
+ local x1 = self.posxs[id1]
+ local y1 = self.posys[id1]
+ local x2 = self.posxs[id2]
+ local y2 = self.posys[id2]
+ local prevvertexid = id1
+ for i = 1, numdivisions do
+ -- create new edge and vertex
+ local newvertexid1 = self.numvertexids + i
+ table.insert(subdivisionvertices, newvertexid1)
+ self.posxs[newvertexid1] = (x1 * (numdivisions + 1 - i) + x2 * i)
+ / (numdivisions + 1)
+ self.posys[newvertexid1] = (y1 * (numdivisions + 1 - i) + y2 * i)
+ / (numdivisions + 1)
+ self.cvsxs[newvertexid1] = {}
+ self.cvsys[newvertexid1] = {}
+
+ local newedgeid = self.numedgeids + i
+ table.insert(subdivisionedges, newedgeid)
+ table.insert(self.edgevertex1, prevvertexid)
+ table.insert(self.edgevertex2, newvertexid1)
+ prevvertexid = newvertexid1
+
+ -- pair the new vertex
+ -- with first vertex of the edge being devided
+ table.insert(self.vertexpairs1, self.edgevertex1[edgeid])
+ table.insert(self.vertexpairs2, newvertexid1)
+ table.insert(self.pairconnected, i == 1)
+
+ -- with second vertex of the edge being devided
+ table.insert(self.vertexpairs1, self.edgevertex2[edgeid])
+ table.insert(self.vertexpairs2, newvertexid1)
+ table.insert(self.pairconnected, i == numdivisions)
+
+ -- with each other
+ for j = i + 1, numdivisions do
+ local newvertexid2 = self.numvertexids + j
+ table.insert(self.vertexpairs1, newvertexid1)
+ table.insert(self.vertexpairs2, newvertexid2)
+ table.insert(self.pairconnected, j == i + 1)
+ end
+
+ -- with new edges
+ -- before vertex
+ for j = 1, i - 1 do
+ local newedgeid = self.numedgeids + j
+ table.insert(self.edgepairsvertex, newvertexid1)
+ table.insert(self.edgepairsedge, newedgeid)
+ end
+ -- after vertex
+ for j = i + 2, numdivisions + 1 do
+ local newedgeid = self.numedgeids + j
+ table.insert(self.edgepairsvertex, newvertexid1)
+ table.insert(self.edgepairsedge, newedgeid)
+ end
+
+ -- pair the new edges with vertices of the edge being devided
+ if i > 1 then
+ table.insert(self.edgepairsvertex, id1)
+ table.insert(self.edgepairsedge, newedgeid)
+ end
+ table.insert(self.edgepairsvertex, id2)
+ table.insert(self.edgepairsedge, newedgeid)
+ end
+ -- create last edge
+ table.insert(subdivisionedges, self.numedgeids + numdivisions + 1)
+ table.insert(self.edgevertex1, prevvertexid)
+ table.insert(self.edgevertex2, id2)
+
+ -- pair last edge with first vertex of the edge being devided
+ table.insert(self.edgepairsvertex, id1)
+ table.insert(self.edgepairsedge, self.numedgeids + numdivisions + 1)
+
+ self.subdivisionedges[edgeid] = subdivisionedges
+ self.subdivisionvertices[edgeid] = subdivisionvertices
+
+ -- pair new edges and vertices with existing edges and vertices
+ local sameface = false
+ local start = self.embeddingedges[edgeid]
+ local twin = start.twin
+ local donevertices = { [start.target] = true, [twin.target] = true }
+ local doneedges = { [start] = true, [twin] = true }
+ local current = start.twin.links[1]
+ for twice = 1, 2 do
+ while current ~= start do
+ if current == twin then
+ sameface = true
+ end
+
+ -- pair edge with the new vertices
+ -- or pair subdivision of edge with new vertices and edges
+ if not doneedges[current] then
+ local currentedgeid = self.edgeids[current]
+ if self.subdivisionvertices[currentedgeid] then
+ for _, vid in ipairs(self.subdivisionvertices[currentedgeid]) do
+ for i = 1, numdivisions do
+ local newvertexid = self.numvertexids + i
+ table.insert(self.vertexpairs1, vid)
+ table.insert(self.vertexpairs2, newvertexid)
+ self.pairconnected[#self.vertexpairs1] = false
+ end
+ for i = 1, numdivisions + 1 do
+ local newedgeid = self.numedgeids + i
+ table.insert(self.edgepairsvertex, vid)
+ table.insert(self.edgepairsedge, newedgeid)
+ end
+ end
+ for _, eid in ipairs(self.subdivisionedges[currentedgeid]) do
+ for i = 1, numdivisions do
+ local newvertexid = self.numvertexids + i
+ table.insert(self.edgepairsvertex, newvertexid)
+ table.insert(self.edgepairsedge, eid)
+ end
+ end
+ else
+ for i = 1, numdivisions do
+ local newvertexid = self.numvertexids + i
+ table.insert(self.edgepairsvertex, newvertexid)
+ table.insert(self.edgepairsedge, currentedgeid)
+ end
+ end
+ doneedges[current] = true
+ end
+
+ -- pair target vertex with the new vertices and edges
+ local vertexid = self.vertexids[current.target]
+ if not donevertices[current.target] then
+ for i = 1, numdivisions do
+ local newvertexid = self.numvertexids + i
+ table.insert(self.vertexpairs1, vertexid)
+ table.insert(self.vertexpairs2, newvertexid)
+ self.pairconnected[#self.vertexpairs1] = false
+ end
+ for i = 1, numdivisions + 1 do
+ local newedgeid = self.numedgeids + i
+ table.insert(self.edgepairsvertex, vertexid)
+ table.insert(self.edgepairsedge, newedgeid)
+ end
+ end
+ current = current.twin.links[1]
+ end
+ start = self.embeddingedges[edgeid].twin
+ current = start.twin.links[1]
+ if sameface then
+ break
+ end
+ end
+
+ self.edgedeprecated[edgeid] = true
+ self.numvertexids = self.numvertexids + numdivisions
+ self.numedgeids = self.numedgeids + numdivisions + 1
+end
+
+function PDP:find_force_pairs()
+ local donevertices = {}
+ -- number all vertices
+ local vertexids = self.vertexids
+ for i, v in ipairs(self.embedding.vertices) do
+ vertexids[v] = i
+ end
+ self.numvertexids = #self.embedding.vertices
+
+ local edgeids = self.edgeids
+ local numedgeids = 0
+ -- number all edges
+ for _, v in ipairs(self.embedding.vertices) do
+ local id = vertexids[v]
+ local start = v.link
+ local current = start
+ repeat
+ local targetid = vertexids[current.target]
+ if edgeids[current] == nil then
+ table.insert(self.edgevertex1, id)
+ table.insert(self.edgevertex2, targetid)
+ numedgeids = numedgeids + 1
+ edgeids[current] = numedgeids
+ edgeids[current.twin] = numedgeids
+ self.embeddingedges[numedgeids] = current
+ end
+ current = current.links[0]
+ until current == start
+ end
+
+ -- find all force pairs
+ for _, v in ipairs(self.embedding.vertices) do
+ local id = vertexids[v]
+ donevertices[id] = true
+ local vertexset = {}
+ local edgeset = {}
+ local start = v.link
+ repeat
+ local targetid = vertexids[start.target]
+ if vertexset[targetid] == nil and not donevertices[targetid] then
+ table.insert(self.pairconnected, true)
+ table.insert(self.vertexpairs1, id)
+ table.insert(self.vertexpairs2, targetid)
+ vertexset[targetid] = true
+ end
+ local current = start.twin.links[1]
+ while current.target ~= v do
+ local targetid = vertexids[current.target]
+ if vertexset[targetid] == nil and not donevertices[targetid] then
+ table.insert(self.pairconnected, self.ugraph:arc(v.inputvertex, current.target.inputvertex) ~= nil)
+ table.insert(self.vertexpairs1, id)
+ table.insert(self.vertexpairs2, targetid)
+ vertexset[targetid] = true
+ end
+ if edgeset[current] == nil then
+ table.insert(self.edgepairsvertex, id)
+ table.insert(self.edgepairsedge, edgeids[current])
+ edgeset[current] = true
+ edgeset[current.twin] = true
+ end
+ current = current.twin.links[1]
+ end
+ start = start.links[0]
+ until start == v.link
+ end
+
+ self.numedgeids = numedgeids
+end
+
+function PDP:normalize_size()
+ local minx = math.huge
+ local maxx = -math.huge
+ local miny = math.huge
+ local maxy = -math.huge
+
+ for _, v in ipairs(self.ugraph.vertices) do
+ minx = math.min(minx, v.pos.x)
+ maxx = math.max(maxx, v.pos.x)
+ miny = math.min(miny, v.pos.y)
+ maxy = math.max(maxy, v.pos.y)
+ end
+
+ local area = (maxx - minx) * (maxy - miny)
+ local gridarea = #self.ugraph.vertices * self.delta * self.delta
+
+ local scale = math.sqrt(gridarea) / math.sqrt(area)
+
+ for _, v in ipairs(self.ugraph.vertices) do
+ v.pos = v.pos * scale
+ end
+end
+
+-- done
+
+return PDP
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/PlanarLayout.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/PlanarLayout.lua
new file mode 100644
index 00000000000..8796148de80
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/PlanarLayout.lua
@@ -0,0 +1,159 @@
+
+
+local PlanarLayout = {}
+require("pgf.gd.planar").PlanarLayout = PlanarLayout
+
+-- imports
+local Coordinate = require "pgf.gd.model.Coordinate"
+local Storage = require "pgf.gd.lib.Storage"
+local BoyerMyrvold = require "pgf.gd.planar.BoyerMyrvold2004"
+local ShiftMethod = require "pgf.gd.planar.ShiftMethod"
+local Embedding = require "pgf.gd.planar.Embedding"
+local PDP = require "pgf.gd.planar.PDP"
+local InterfaceToAlgorithms = require("pgf.gd.interface.InterfaceToAlgorithms")
+local createEdge = InterfaceToAlgorithms.createEdge
+local createVertex = InterfaceToAlgorithms.createVertex
+
+InterfaceToAlgorithms.declare {
+ key = "planar layout",
+ algorithm = PlanarLayout,
+ preconditions = {
+ connected = true,
+ loop_free = true,
+ simple = true,
+ },
+ postconditions = {
+ fixed = true,
+ },
+ summary = [["
+ The planar layout draws planar graphs without edge crossings.
+ "]],
+ documentation = [["
+ The planar layout is a pipeline of algorithms to produce
+ a crossings-free drawing of a planar graph.
+ First a combinatorical embedding of the graph is created using
+ the Algorithm from Boyer and Myrvold.
+ The combinatorical Embedding is then being improved by
+ by the Sort and Flip algorithm and triangulated afterwards.
+ To determine the actual node positions the shift method
+ by de Fraysseix, Pach and Pollack is used.
+ Finally the force based Planar Drawing Postprocessing improves the drawing.
+ "]],
+ examples = {
+ [["
+ \tikz \graph [nodes={draw, circle}] {
+ a -- {
+ b -- {
+ d -- i,
+ e,
+ f
+ },
+ c -- {
+ g,
+ h
+ }
+ },
+ f --[no span edge] a,
+ h --[no span edge] a,
+ i --[no span edge] g,
+ f --[no span edge] g,
+ c --[no span edge] d,
+ e --[no span edge] c
+ }
+ "]]
+ }
+}
+
+function PlanarLayout:run()
+ --local file = io.open("timing.txt", "a")
+
+ local options = self.digraph.options
+
+ -- get embedding
+ local bm = BoyerMyrvold.new()
+ bm:init(self.ugraph)
+ local embedding = bm:run()
+
+ assert(embedding, "Graph is not planar")
+
+ --local start = os.clock()
+ if options["use sf"] then
+ embedding:improve()
+ end
+
+ -- choose external face
+ local exedge, exsize = embedding:get_biggest_face()
+
+ -- surround graph with triangle
+ local v1, v2, vn = embedding:surround_by_triangle(exedge, exsize)
+
+ -- make maximal planar
+ embedding:triangulate()
+
+ if options["show virtual"] then
+ -- add virtual vertices to input graph
+ for _, vertex in ipairs(embedding.vertices) do
+ if vertex.virtual then
+ vertex.inputvertex = createVertex(self, {
+ name = nil,--vertex.name,
+ generated_options = {},
+ text = vertex.name
+ })
+ vertex.virtual = false
+ end
+ end
+
+ -- add virtual edges to input graph
+ for _, vertex in ipairs(embedding.vertices) do
+ for halfedge in Embedding.adjacency_iterator(vertex.link) do
+ if halfedge.virtual then
+ createEdge(
+ self,
+ vertex.inputvertex,
+ halfedge.target.inputvertex
+ )
+ end
+ halfedge.virtual = false
+ end
+ end
+ end
+
+ -- create canonical ordering
+ local order = embedding:canonical_order(v1, v2, vn)
+
+ local sm = ShiftMethod.new()
+ sm:init(order)
+ local gridpos = sm:run()
+
+ local gridspacing = options["grid spacing"]
+ for _, v in ipairs(order) do
+ if not v.virtual then
+ local iv = v.inputvertex
+ iv.pos.x = gridpos[v].x * gridspacing
+ iv.pos.y = gridpos[v].y * gridspacing
+ end
+ end
+
+ embedding:remove_virtual()
+
+ --start = os.clock()
+ if options["use pdp"] then
+ local pdp = PDP.new(
+ self.ugraph, embedding,
+ options["node distance"],
+ options["node distance"],
+ options["pdp cooling factor"],
+ options["exponent change iterations"],
+ options["start repulsive exponent"],
+ options["end repulsive exponent"],
+ options["start attractive exponent"],
+ options["end attractive exponent"],
+ options["edge approach threshold"],
+ options["edge stretch threshold"],
+ options["stress counter threshold"],
+ options["edge divisions"]
+ )
+ pdp:run()
+ end
+
+end
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/ShiftMethod.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/ShiftMethod.lua
new file mode 100644
index 00000000000..9716aa27e4a
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/ShiftMethod.lua
@@ -0,0 +1,128 @@
+local SM = {}
+require("pgf.gd.planar").ShiftMethod = SM
+
+-- imports
+local Embedding = require("pgf.gd.planar.Embedding")
+
+-- create class properties
+SM.__index = SM
+
+function SM.new()
+ local t = {}
+ setmetatable(t, SM)
+ return t
+end
+
+function SM:init(vertices)
+ self.vertices = vertices
+ self.xoff = {}
+ self.pos = {}
+ for _, v in ipairs(vertices) do
+ self.pos[v] = {}
+ end
+ self.left = {}
+ self.right = {}
+end
+
+function SM:run()
+ local v1 = self.vertices[1]
+ local v2 = self.vertices[2]
+ local v3 = self.vertices[3]
+
+ self.xoff[v1] = 0
+ self.pos[v1].y = 0
+ self.right[v1] = v3
+
+ self.xoff[v3] = 1
+ self.pos[v3].y = 1
+ self.right[v3] = v2
+
+ self.xoff[v2] = 1
+ self.pos[v2].y = 0
+
+ local n = #self.vertices
+ for k = 4, n do
+ local vk = self.vertices[k]
+ local wplink, wqlink, wp1qsum
+ if k ~= n then
+ wplink, wqlink, wp1qsum = self:get_attachments(vk)
+ else
+ wplink, wqlink, wp1qsum = self:get_last_attachments(vk, v1, v2)
+ end
+ local wp, wq = wplink.target, wqlink.target
+ local wp1 = wplink.links[0].target
+ local wq1 = wqlink.links[1 - 0].target
+ self.xoff[wp1] = self.xoff[wp1] + 1
+ self.xoff[wq] = self.xoff[wq] + 1
+ wp1qsum = wp1qsum + 2
+ self.xoff[vk] = (wp1qsum + self.pos[wq].y - self.pos[wp].y) / 2
+ self.pos[vk].y = (wp1qsum + self.pos[wq].y + self.pos[wp].y) / 2
+ -- = self.xoff[vk] + self.pos[wp].y ?
+ self.right[wp] = vk
+ if wp ~= wq1 then
+ self.left[vk] = wp1
+ self.right[wq1] = nil
+ self.xoff[wp1] = self.xoff[wp1] - self.xoff[vk]
+ end
+ self.right[vk] = wq
+ self.xoff[wq] = wp1qsum - self.xoff[vk]
+ end
+ self.pos[v1].x = 0
+ self:accumulate_offset(v1, 0)
+ return self.pos
+end
+
+function SM:get_attachments(vk)
+ local wplink, wqlink
+ local wp1qsum = 0
+ local start = vk.link
+ local startattach = self.xoff[start.target] ~= nil
+ local current = start.links[0]
+ local last = start
+ repeat
+ local currentattach = self.xoff[current.target] ~= nil
+ local lastattach = self.xoff[last.target] ~= nil
+ if currentattach ~= lastattach then
+ if currentattach then
+ wplink = current
+ else
+ wqlink = last
+ end
+ if currentattach == startattach and not startattach then
+ break
+ end
+ currentattach = lastattach
+ elseif currentattach then
+ wp1qsum = wp1qsum + self.xoff[current.target]
+ end
+ last = current
+ current = current.links[0]
+ until last == start
+ return wplink, wqlink, wp1qsum
+end
+
+function SM:get_last_attachments(vn, v1, v2)
+ local wplink, wqlink
+ local wp1qsum = 0
+ for halfedge in Embedding.adjacency_iterator(vn.link, ccwdir) do
+ local target = halfedge.target
+ if target == v1 then
+ wplink = halfedge
+ elseif target == v2 then
+ wqlink = halfedge
+ end
+ wp1qsum = wp1qsum + self.xoff[target]
+ end
+ return wplink, wqlink, wp1qsum
+end
+
+function SM:accumulate_offset(v, x)
+ x = x + self.xoff[v]
+ self.pos[v].x = x
+ local l = self.left[v]
+ local r = self.right[v]
+ if l then self:accumulate_offset(l, x) end
+ if r then self:accumulate_offset(r, x) end
+end
+
+return SM
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/library.lua
new file mode 100644
index 00000000000..68c46898e34
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/library.lua
@@ -0,0 +1,2 @@
+require "pgf.gd.planar.PlanarLayout"
+require "pgf.gd.planar.parameters"
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/parameters.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/parameters.lua
new file mode 100644
index 00000000000..9e18eb07246
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/planar/parameters.lua
@@ -0,0 +1,144 @@
+-- Imports
+local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare
+
+declare {
+ key = "use pdp",
+ type = "boolean",
+ initial = "true",
+
+ summary = [["
+ Whether or not to use the Planar Drawing Postprocessing
+ to improve the drawing.
+ "]]
+}
+
+declare {
+ key = "use sf",
+ type = "boolean",
+ initial = "true",
+
+ summary = [["
+ Whether or not to use the Sort and Flip Algorithm
+ to improve the combinatorical embedding.
+ "]]
+}
+
+declare {
+ key = "grid spacing",
+ type = "number",
+ initial = "10",
+
+ summary = [["
+ If the |use pdp| option is not set,
+ this sets the spacing of the grid used by the shift method.
+ A bigger grid spacing will result in a bigger drawing.
+ "]]
+}
+
+declare {
+ key = "pdp cooling factor",
+ type = "number",
+ initial = "0.98",
+
+ summary = [["
+ This sets the cooling factor used by the Planar Drawing Postprocessing.
+ A higher cooling factor can result in better quality of the drawing,
+ but will increase the run time of the algorithm.
+ "]]
+}
+
+declare {
+ key = "start repulsive exponent",
+ type = "number",
+ initial = "2",
+
+ summary = [["
+ Start value of the exponent used in the calculation of all repulsive forces in PDP
+ "]]
+}
+
+declare {
+ key = "end repulsive exponent",
+ type = "number",
+ initial = "2",
+
+ summary = [["
+ End value of the exponent used in the calculation of all repulsive forces in PDP.
+ "]]
+}
+
+declare {
+ key = "start attractive exponent",
+ type = "number",
+ initial = "2",
+
+ summary = [["
+ Start value of the exponent used in PDP's calculation of the attractive force between
+ nodes connected by an edge.
+ "]]
+}
+
+declare {
+ key = "end attractive exponent",
+ type = "number",
+ initial = "2",
+
+ summary = [["
+ End value of the exponent used in PDP's calculation of the attractive force between
+ nodes connected by an edge.
+ "]]
+}
+
+declare {
+ key = "exponent change iterations",
+ type = "number",
+ initial = "1",
+
+ summary = [["
+ The number of iterations over which to modify the force exponents.
+ In iteration one the exponents will have their start value and in iteration
+ |exponent change iterations| they will have their end value.
+ "]]
+}
+
+declare {
+ key = "edge approach threshold",
+ type = "number",
+ initial = "0.3",
+
+ summary = [["
+ The maximum ration between the actual and the desired node-edge distance
+ which is required to count an edge as stressed.
+ "]]
+}
+
+declare {
+ key = "edge stretch threshold",
+ type = "number",
+ initial = "1.5",
+
+ summary = [["
+ The minimum ration between the actual and the desired edge length
+ which is required to count an edge as stressed.
+ "]]
+}
+
+declare {
+ key = "stress counter threshold",
+ type = "number",
+ initial = "30",
+
+ summary = [["
+ The number of iterations an edge has to be under stress before it will be subdevided.
+ "]]
+}
+
+declare {
+ key = "edge divisions",
+ type = "number",
+ initial = "0",
+
+ summary = [["
+ The number of edges in which stressed edges will be subdivided.
+ "]]
+}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing.lua
index 0dd9659852e..77166c5cbf5 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/routing.lua,v 1.1 2014/02/24 10:40:32 tantau Exp $
+--- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/Hints.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/Hints.lua
index 46c337090f4..1f68bd99f5f 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/Hints.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/Hints.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/routing/Hints.lua,v 1.2 2015/05/18 17:01:16 tantau Exp $
+-- @release $Header$
---
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/NecklaceRouting.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/NecklaceRouting.lua
index 23a9d265923..9a99ea2275f 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/NecklaceRouting.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/NecklaceRouting.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/routing/NecklaceRouting.lua,v 1.1 2014/04/28 12:28:46 tantau Exp $
+-- @release $Header$
-- The class; it processes necklace hints.
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/library.lua
index 80364d11a39..17c959d6856 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/library.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/routing/library.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/routing/library.lua,v 1.1 2014/02/24 10:40:33 tantau Exp $
+-- @release $Header$
-- Imports
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/tools/make_gd_wrap.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/tools/make_gd_wrap.lua
index b433e73a652..b13dcb9abb4 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/tools/make_gd_wrap.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/tools/make_gd_wrap.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/tools/make_gd_wrap.lua,v 1.2 2013/01/01 17:10:09 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees.lua
index 9aff2aaf1d7..8c45e912dc7 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/trees.lua,v 1.1 2012/11/27 17:24:24 tantau Exp $
+--- @release $Header$
local trees = {}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/ChildSpec.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/ChildSpec.lua
index 272af54e55e..0b975fd3291 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/ChildSpec.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/ChildSpec.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/trees/ChildSpec.lua,v 1.4 2013/05/23 20:01:29 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/ReingoldTilford1981.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/ReingoldTilford1981.lua
index c808607385b..8eba23a2106 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/ReingoldTilford1981.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/ReingoldTilford1981.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/trees/ReingoldTilford1981.lua,v 1.11 2014/03/19 09:20:59 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/SpanningTreeComputation.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/SpanningTreeComputation.lua
index 24e9a69c385..791fb81e658 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/SpanningTreeComputation.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/SpanningTreeComputation.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/trees/SpanningTreeComputation.lua,v 1.7 2013/05/23 20:01:29 tantau Exp $
+-- @release $Header$
@@ -634,4 +634,4 @@ end
-- Done
-return SpanningTreeComputation \ No newline at end of file
+return SpanningTreeComputation
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/doc.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/doc.lua
index 09c35611723..753f386bb9e 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/doc.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/doc.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/trees/doc.lua,v 1.1 2014/03/19 09:20:59 tantau Exp $
+-- @release $Header$
local key = require 'pgf.gd.doc'.key
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/library.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/library.lua
index f34aee06792..b8e36982cfc 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/library.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/trees/library.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/trees/library.lua,v 1.2 2013/04/04 20:43:45 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/experimental/tikzlibrarygraphdrawing.evolving.code.tex b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/experimental/tikzlibrarygraphdrawing.evolving.code.tex
new file mode 100644
index 00000000000..9d9055dfe96
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/experimental/tikzlibrarygraphdrawing.evolving.code.tex
@@ -0,0 +1,21 @@
+% Copyright 2016 by Malte Skambath
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\usepgflibrary{graphdrawing}
+
+\usegdlibrary{evolving}
+
+\newcount\mycount
+\tikzgraphsset{
+ nodes = {supernode/.expanded=\tikzgraphnodename},
+ when/.code = {\pgfparsetime{#1}\mycount=\pgftimeresult pt\tikzgraphsset{name/.expanded=\the\mycount,snapshot/.expanded=\the\mycount}}
+}
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.circular.code.tex b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.circular.code.tex
index 9c017b5577d..61f2e4bed00 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.circular.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.circular.code.tex
@@ -8,9 +8,9 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.circular.code.tex,v 1.4 2012/11/20 23:34:18 tantau Exp $
+\ProvidesFileRCS{pgflibrarygraphdrawing.circular.code.tex}
\usegdlibrary{circular}
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex
index ad648c29402..385c9705953 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex
@@ -8,7 +8,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex,v 1.39 2015/06/08 21:58:24 tantau Exp $
+\ProvidesFileRCS{pgflibrarygraphdrawing.code.tex}
@@ -26,50 +26,50 @@
-%
+%
% All graph drawing keys normally live in the following namespace:
-% /graph drawing.
+% /graph drawing.
%
-\def\pgfgdset{\pgfqkeys{/graph drawing}}
+\def\pgfgdset{\pgfqkeys{/graph drawing}}%
% Setup a key
-%
+%
% #1 = key
-%
+%
% Description:
-%
+%
% An internal macro that sets up #1 as a graph drawing key.
-\def\pgfgd@callbackkey#1{
- \pgf@gd@setup@forwards{#1}
- \pgfutil@g@addto@macro\pgf@gd@forwards@list{\pgf@gd@setup@forwards{#1}}
-}
-\def\pgf@gd@setup@forwards#1{
+\def\pgfgd@callbackkey#1{%
+ \pgf@gd@setup@forwards{#1}%
+ \pgfutil@g@addto@macro\pgf@gd@forwards@list{\pgf@gd@setup@forwards{#1}}%
+}%
+\def\pgf@gd@setup@forwards#1{%
\let\pgf@temp\pgfutil@empty
- \foreach \pgf@gd@path in \pgf@gd@forwarding@list {
+ \foreach \pgf@gd@path in \pgf@gd@forwarding@list {%
\ifx\pgf@gd@path\pgfutil@empty\else%
\expandafter\pgfutil@g@addto@macro%
\expandafter\pgf@temp\expandafter{%
- \expandafter\pgfkeys\expandafter{\pgf@gd@path#1/.forward to=/graph drawing/#1}}
+ \expandafter\pgfkeys\expandafter{\pgf@gd@path#1/.forward to=/graph drawing/#1}}%
\fi%
}%
\pgf@temp
-}
+}%
\let\pgf@gd@forwards@list\pgfutil@empty
% Append to the forwarding list:
-%
+%
% #1 = paths to append to the forwarding list
-%
+%
% Description:
-%
+%
% Append the paths in #1 (with trailing slashes) to the forwarding
% list.
-%
+%
% If algorithms have already been declared, forwarding will also be
% setup for them (using a bit of magic...).
@@ -77,19 +77,19 @@
\let\pgf@gd@forwarding@list@orig\pgf@gd@forwarding@list
\def\pgf@gd@forwarding@list{#1}%
\pgf@gd@forwards@list%
- \expandafter\def\expandafter\pgf@gd@forwarding@list\expandafter{\pgf@gd@forwarding@list@orig,#1}
-}
+ \expandafter\def\expandafter\pgf@gd@forwarding@list\expandafter{\pgf@gd@forwarding@list@orig,#1}%
+}%
\let\pgf@gd@forwarding@list\pgfutil@empty
-%
-%
+%
+%
% Callbacks
-%
+%
% The following macros are called *from* the binding layer. You do not
% call them from the pgf layer.
-%
+%
%
@@ -109,7 +109,7 @@
% a large label.
%
% These graph drawing parameters are different from "usual" pgf
-% options: An alogrithmic parameter influenced the way the algorithm
+% options: An algorithmic parameter influenced the way the algorithm
% works, while usual options normally only influence how the result
% looks like. For instance, the fact that a node is red is not an
% graph drawing parameter (usually, at least), while the shape of a node
@@ -119,7 +119,7 @@
% (since only this layer "knows" which parameters there are). The
% binding to TeX will call the \pgfgddeclareparameter function
% internally.
-%
+%
% Specifying the set of graph drawing parameters for a given graph or
% node or edge works as follows: When the graph drawing engine is
% started for a graph (using \pgfgdbeginscope), a snapshot is taken of
@@ -132,8 +132,8 @@
\def\pgfgdcallbackdeclareparameter#1#2{%
\pgfkeysdef{/graph drawing/#1}{\pgf@gd@handle@parameter{#1}{#2}{##1}}%
- \pgfgd@callbackkey{#1}%
-}
+ \pgfgd@callbackkey{#1}%
+}%
\def\pgf@gd@handle@parameter#1#2#3{%
\def\pgf@temp{#3}%
\ifx\pgf@temp\pgfkeysnovalue@text%
@@ -146,18 +146,18 @@
local new, main = pgf.gd.interface.InterfaceToDisplay.pushOption('\pgfutil@luaescapestring{#1}',\pgfgdresult,\the\pgf@gd@parameter@stack@height)
tex.print(new..'\pgfutil@luaescapestring{\relax}')
if main then
- tex.print('\pgfutil@luaescapestring{\noexpand\pgfgdtriggerrequest}')
- end}%
+ tex.print('\pgfutil@luaescapestring{\noexpand\pgfgdtriggerrequest}')
+ end}%
}%
\newcount\pgf@gd@parameter@stack@height
-\def\pgfgdtriggerrequest{\pgfgdset{@request scope and layout}}
+\def\pgfgdtriggerrequest{\pgfgdset{@request scope and layout}}%
% Conversions are used to adapt the syntactic description of a
% parameter on the TikZ layer to the one expected by Lua. The set of
% permissible conversions is described in
-% InterfaceToAlgorithms.declareParameter.
+% InterfaceToAlgorithms.declareParameter.
\pgfgdset{
conversions/string/.code=\def\pgfgdresult{'\pgfutil@luaescapestring{\detokenize{#1}}'},
@@ -166,13 +166,14 @@
conversions/boolean/.code=\def\pgf@test{#1}\ifx\pgf@test\pgf@truetext\def\pgfgdresult{true}\else\ifx\pgf@test\pgfkeysnovalue@text\def\pgfgdresult{true}\else\def\pgfgdresult{false}\fi\fi,
conversions/number/.code=\pgfmathparse{#1}\let\pgfgdresult\pgfmathresult,
conversions/length/.code=\pgfmathparse{#1}\let\pgfgdresult\pgfmathresult,
+ conversions/time/.code=\pgfparsetime{#1}\let\pgfgdresult\pgftimeresult,
conversions/direction/.code=\pgf@lib@gd@grow@dir{#1}\let\pgfgdresult\pgfmathresult,
conversions/canvas coordinate/.code args={(#1pt,#2pt)}{\edef\pgfgdresult{pgf.gd.model.Coordinate.new(#1,#2)}},
% deprecated, will be removed:
conversions/coordinate/.code args={(#1pt,#2pt)}{\edef\pgfgdresult{{#1,#2}}}
-}
-\def\pgf@truetext{true}
-\def\pgfgd@niltext{nil}
+}%
+\def\pgf@truetext{true}%
+\def\pgfgd@niltext{nil}%
\def\pgf@lib@gd@grow@dir#1{%
\def\pgf@temp{#1}%
@@ -185,30 +186,30 @@
\pgfmathparse{#1}%
\fi
\fi
-}
+}%
-\def\pgf@orient@direction@down{-90}
-\def\pgf@orient@direction@up{90}
-\def\pgf@orient@direction@left{180}
-\def\pgf@orient@direction@right{0}
+\def\pgf@orient@direction@down{-90}%
+\def\pgf@orient@direction@up{90}%
+\def\pgf@orient@direction@left{180}%
+\def\pgf@orient@direction@right{0}%
-\def\pgf@orient@direction@south{-90}
-\def\pgf@orient@direction@north{90}
-\def\pgf@orient@direction@west{180}
-\def\pgf@orient@direction@east{0}
+\def\pgf@orient@direction@south{-90}%
+\def\pgf@orient@direction@north{90}%
+\def\pgf@orient@direction@west{180}%
+\def\pgf@orient@direction@east{0}%
-\expandafter\def\csname pgf@orient@direction@north east\endcsname{45}
-\expandafter\def\csname pgf@orient@direction@north west\endcsname{135}
-\expandafter\def\csname pgf@orient@direction@south east\endcsname{-45}
-\expandafter\def\csname pgf@orient@direction@south west\endcsname{-135}
+\expandafter\def\csname pgf@orient@direction@north east\endcsname{45}%
+\expandafter\def\csname pgf@orient@direction@north west\endcsname{135}%
+\expandafter\def\csname pgf@orient@direction@south east\endcsname{-45}%
+\expandafter\def\csname pgf@orient@direction@south west\endcsname{-135}%
-\expandafter\def\csname pgf@orient@direction@-\endcsname{0}
-\expandafter\def\csname pgf@orient@direction@|\endcsname{-90}
+\expandafter\def\csname pgf@orient@direction@-\endcsname{0}%
+\expandafter\def\csname pgf@orient@direction@|\endcsname{-90}%
-{
+{%
\catcode`\|=13
- \gdef\pgf@gd@lib@active@bar{|}
-}
+ \gdef\pgf@gd@lib@active@bar{|}%
+}%
@@ -220,7 +221,7 @@
% #2 = Layer
%
% Description:
-%
+%
% Executes /graph drawing/#1/begin rendering/.try
%
@@ -233,7 +234,7 @@
\unhbox\pgf@gd@postkind@box%
\fi%
\pgfgdset{/graph drawing/#1/begin rendering/.try}%
-}
+}%
% Callback for ending the rendering of a collection kind
%
@@ -241,47 +242,47 @@
% #2 = Layer
%
% Description:
-%
+%
% Executes /graph drawing/#1/end rendering/.try
%
\def\pgfgdcallbackrendercollectionkindstop#1#2{%
\pgfgdset{/graph drawing/#1/end rendering/.try}%
\egroup % close box
-}
+}%
-% Callback for rendering a collection
-%
+% Callback for rendering a collection
+%
% #1 = Kind
% #2 = Options
%
% Description:
-%
+%
% Executes /graph drawing/#1/render/.try={#2}
%
\def\pgfgdcallbackrendercollection#1#2{
\pgfgdset{/graph drawing/#1/render/.try={#2}}
-}
+}%
-% Graph events
-%
+% Graph events
+%
% Although a graph consists of nodes and edges, during the
% construction of the graph a lot of information concerning the
% structure of the graph is often available. For instance, as we
% specify a graph using the child-syntax, we do not only which edges
% are present, but we can implicitly specify an ordering on the
-% nodes. Even more, there is even information availble concerning
+% nodes. Even more, there is even information available concerning
% nodes that are not present at all: A child[missing] is not present
% as a node or an edge, but a tree drawing algorithm will want to know
% about this child nevertheless.
-%
+%
% In order to communicate such information to the graph drawing
% engine, "events" are used. As a graph is created, in addition to
% nodes and edges, "events" may happen. The events come in a
@@ -289,36 +290,36 @@
% each node and each edge, its index in the event sequence is
% stored, that is, it is stored how many events happened before the
% node or edge was created.
-%
+%
% Internally, an event consists of a name and, possibly, some
% parameters. When the parameter is created on the tikz level, it will
% be a string that is passed down to Lua. Internally created events
% will also have parameters that are objects.
-%
+%
% Two events are a bit special since they get special internal
% support: The begin and end events. The first signals that some kind
% of group has started; which is closed by the corresponding end
% event. The "kind" of group is indicated by the parameter of the
% begin event.
-%
-%
-%
+%
+%
+%
% Standard events are:
-%
+%
% For each node entered into a graph, a "node" event is automatically
% created internally with the parameter being the node. However, you
% can also create this event yourself. In this case, the parameter
% will be a string and will mean that the node is "virtual" or
% "missing", but space should be reserved for it, if possible (this is
% use, for instance, by certain tree layouts).
-%
+%
% For each edge entered into a graph, an "edge" event is automatically
% created, with the edge as the parameter. Again, an event with a
% string parameter corresponds to a "non-existing" node.
-%
+%
%
% Standard event groups are:
-%
+%
%
% The "descendants" event group include a set of nodes that, at least
% inside the specification, are descendants of the last node
@@ -326,68 +327,68 @@
% begin descendants
% ...
% end
-%
-%
+%
+%
% The "array" event group collects together some nodes in an array of
% nodes. This can be used, for instance, to specify matrices.
-%
+%
% begin array
% ...
-% end
+% end
% Create a new event
-%
+%
% #1 = event name (should be a valid lua identifier name)
% #2 = parameter (some text)
-%
+%
% Description:
-%
+%
% Adds a new event to the event sequence of the graph
\def\pgfgdevent#1#2{%
\directlua{pgf.gd.interface.InterfaceToDisplay.createEvent('\pgfutil@luaescapestring{#1}', '\pgfutil@luaescapestring{#2}')}%
-}
+}%
% Start an event group
-%
+%
% #1 = kind of event group
-%
+%
% Description:
-%
+%
% Creates a begin event with #1 as the parameter of the begin
% event.
\def\pgfgdbegineventgroup#1{%
\pgfgdevent{begin}{#1}%
-}
+}%
% End an event group
-%
+%
% Description:
-%
+%
% Creates an end event.
\def\pgfgdendeventgroup{%
\pgfgdevent{end}{}%
-}
+}%
% Creates an event group for the current TeX group
%
-% #1 = event group name
+% #1 = event group name
%
% Description:
-%
+%
% Issues a begin event for #1 and, using \aftergroup, adds an end
% event at the end of the current tex group.
\def\pgfgdeventgroup#1{%
\pgfgdbegineventgroup{#1}%
\aftergroup\pgfgdendeventgroup%
-}
+}%
@@ -401,7 +402,7 @@
%
% Callback method for \pgfpositionnodelater
-%
+%
% This function is called by \pgfnode whenever a node has been newly
% created inside a graph drawing scope. It will create a new vertex on
% the Lua layer.
@@ -421,10 +422,10 @@
\let\pgfsyssoftpath@curvetosupportatoken\pgf@gd@curvetosupportatoken%
\let\pgfsyssoftpath@closepathtoken\pgf@gd@closepathtoken%
\pgfpositionnodelaterpath%
- %
+ %
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
- %
+ %
{%
\pgf@process{\pgfpointanchor{\pgfpositionnodelatername}{center}}
\pgfsettransform{\csname pgf@sh@nt@\pgfpositionnodelatername\endcsname}%
@@ -450,14 +451,14 @@
center = require 'pgf.gd.model.Coordinate'.new(\pgf@sys@tonumber\pgf@x,\pgf@sys@tonumber\pgf@y)
}
)
- pgf.temp = nil
+ pgf.temp = nil
}
}%
-}
+}%
-\def\pgf@gd@movetotoken#1#2{\directlua{pgf.temp:appendMoveto(\Pgf@geT#1,\Pgf@geT#2)}}
-\def\pgf@gd@linetotoken#1#2{\directlua{pgf.temp:appendLineto(\Pgf@geT#1,\Pgf@geT#2)}}
+\def\pgf@gd@movetotoken#1#2{\directlua{pgf.temp:appendMoveto(\Pgf@geT#1,\Pgf@geT#2)}}%
+\def\pgf@gd@linetotoken#1#2{\directlua{pgf.temp:appendLineto(\Pgf@geT#1,\Pgf@geT#2)}}%
\def\pgf@gd@rectcornertoken#1#2#3#4#5{%
\directlua{%
local x,y,dx,dy=\Pgf@geT#1,\Pgf@geT#2,\Pgf@geT#4,\Pgf@geT#5
@@ -465,17 +466,17 @@
pgf.temp:appendLineto(x,y+dy)
pgf.temp:appendLineto(x+dx,y+dy)
pgf.temp:appendLineto(x+dx,y)
- pgf.temp:appendClosepath()%
+ pgf.temp:appendClosepath()%
}%
-}
-\def\pgf@gd@curvetosupportatoken#1#2#3#4#5#6#7#8{\directlua{pgf.temp:appendCurveto(\Pgf@geT#1,\Pgf@geT#2,\Pgf@geT#4,\Pgf@geT#5,\Pgf@geT#7,\Pgf@geT#8)}}
-\def\pgf@gd@closepathtoken#1#2{\directlua{pgf.temp:appendClosepath()}}
+}%
+\def\pgf@gd@curvetosupportatoken#1#2#3#4#5#6#7#8{\directlua{pgf.temp:appendCurveto(\Pgf@geT#1,\Pgf@geT#2,\Pgf@geT#4,\Pgf@geT#5,\Pgf@geT#7,\Pgf@geT#8)}}%
+\def\pgf@gd@closepathtoken#1#2{\directlua{pgf.temp:appendClosepath()}}%
% Set options for an already existing node
-%
+%
% #1 = node name
-%
+%
% These node parameters of #1 will be updated with the current values
% of the node parameters. The node #1 must previously have been passed
% to the gd engine. If some of the options have already been set for
@@ -485,13 +486,13 @@
\directlua{
pgf.gd.interface.InterfaceToDisplay.addToVertexOptions('\pgfutil@luaescapestring{#1}',\the\pgf@gd@parameter@stack@height)
}
-}
+}%
%
% A callback for rendering (finally positioning) a node
-%
+%
% #1 = name of the node
% #2 = x min of the bounding box
% #3 = x max of the bounding box
@@ -500,11 +501,12 @@
% #6 = desired x pos of the node
% #7 = desired y pos of the node
% #8 = box register number of the TeX node
+% #9 = animation code
%
% This callback will be called by the engine for every original node
% when it finally needs to placed at a final position.
-\def\pgfgdcallbackrendernode#1#2#3#4#5#6#7#8{%
+\def\pgfgdcallbackrendernode#1#2#3#4#5#6#7#8#9{%
{%
\def\pgfpositionnodelatername{#1}
\def\pgfpositionnodelaterminx{#2}
@@ -512,10 +514,24 @@
\def\pgfpositionnodelaterminy{#4}
\def\pgfpositionnodelatermaxy{#5}
\directlua{pgf.gd.interface.InterfaceCore.binding:retrieveBox(#8,\pgfpositionnodelaterbox)}
- \pgfpositionnodenow{\pgfqpoint{#6}{#7}}
+ \def\pgf@temp{#9}%
+ \ifx\pgf@temp\pgfutil@empty%
+ \pgfpositionnodenow{\pgfqpoint{#6}{#7}}%
+ \else%
+ \pgfset{every graphdrawing animation/.try}%
+ \pgfset{every graphdrawing node animation/.try}%
+ #9%
+ \pgfuseid{pgf@gd}%
+ \pgfidscope%
+ \pgfpositionnodenow{\pgfqpoint{#6}{#7}}%
+ \endpgfidscope%
+ \fi%
}%
-}
+}%
+\ifx\pgfanimateattribute\pgfutil@undefined
+ \def\pgfanimateattribute#1#2{\tikzerror{You need to say \string\usetikzlibrary{animations} for animated graphs}}%
+\fi
% Adds an edge to the graph
@@ -531,14 +547,14 @@
% Creating an edge means that you tell the graph drawing algorithm
% that #1 and #2 are connected. The "kind" of connection is indicated
% by #3, which may be one of the following:
-%
+%
% -> = a directed edge (also known as an arc) from #1 to #2
% -- = an undirected edge between #1 and #2
% <- = a directed edge from #2 to #1, but with the "additional hint"
% that this is a "backward" edge. A graph drawing algorithm may
% or may not take this hint into account
% <-> = a bi-directed edge between #1 and #2.
-%
+%
%
% The parameters #4 and #5 are a bit more tricky. When an edge between
% two vertices of a graph is created via \pgfgdedge, nothing is
@@ -547,31 +563,31 @@
% creating the actual drawing commands for the edge. Thus, the actual
% drawing of the edge is done only when the graph drawing algorithm is
% done (namely in the macro \pgfgdcallbackedge, see later).
-%
+%
% Because of this "delayed" drawing of edges, options that influence
% the edge must be retained until the moment when the edge is actually
% drawn. Parameters #4 and #5 store such options.
-%
+%
% Let us start with #4. This parameter should be set to a list of
% key-value pairs like
-%
+%
% /tikz/.cd, color=red, very thick, this edge must be vertical
-%
+%
% Some of these options may be of interest to the graph drawing
-% algorithm (like the last option) while others will
+% algorithm (like the last option) while others will
% only be important during the drawing of edge (like the first
% option). The options that are important for the graph drawing
% algorithm must be passed to the algorithm via setting keys that have
-% been declared using the handler .edge parameter (see
+% been declared using the handler .edge parameter (see
% above).
-%
+%
% The tricky part is that options that are of interest to the graph
% drawing algorithm must be executed *before* the algorithm starts,
% but the options as a whole are usually only executed during the
% drawing of the edges, which is *after* the algorithm has finished.
-%
+%
% To overcome this problem, the following happens:
-%
+%
% The options in #4 are executed "tentatively" inside
% \pgfgdedge. However, this execution is done in a "heavily guarded
% sandbox" where all effects of the options (like changing the
@@ -579,7 +595,7 @@
% the changes of the graph drawing edge parameters leave the
% sandbox. These parameters are then passed down to the graph drawing
% engine.
-%
+%
% Later, when the edge is drawn using \pgfgdcallbackedge, the options #4
% are available once more and then they are executed normally.
%
@@ -587,9 +603,9 @@
% preset. Thus, you typically need to start it with, say, /tikz/.cd.
%
%
-% The text in #5 is some "auxilliary" text that is simply stored away
+% The text in #5 is some "auxiliary" text that is simply stored away
% and later directly to \pgfgdcallbackedge. This is a curtesy to TikZ,
-% which can use it to store its node labels.
+% which can use it to store its node labels.
%
% Example:
%
@@ -616,10 +632,10 @@
\endpgfinterruptpath%
}}%
\endgroup%
-}
+}%
\let\pgfgdprepareedge=\pgfutil@empty
-\def\pgfgdaddprepareedgehook#1{\expandafter\def\expandafter\pgfgdprepareedge\expandafter{\pgfgdprepareedge#1}}
+\def\pgfgdaddprepareedgehook#1{\expandafter\def\expandafter\pgfgdprepareedge\expandafter{\pgfgdprepareedge#1}}%
\newif\ifpgf@gd@nodes@behind@edges
@@ -629,14 +645,14 @@
% Define a callback for rendering edges
%
% #1 = macro name
-%
+%
% Descriptions:
-%
+%
% This is a callback from the graph drawing engine. At the end of the
% creation of a graph, when the nodes have been positioned, this macro
% is called once for each edge. The macro should take the following
% parameters:
-%
+%
% #1 = from node, optionally followed by "." and the tail anchor
% #2 = to node, optionally followed by "." and the head anchor
% #3 = direction (<-, --, ->, or <->)
@@ -644,28 +660,38 @@
% #5 = aux text (typically edge nodes)
% #6 = algorithm-generated options
% #7 = bend information
+% #8 = animations
%
% The first five parameters are the original values that were passed
% down to the \pgfgdedge command.
-%
+%
% #6 contains options that have been "computed by the algorithm". For
% instance, an algorithm might have determined, say, flow capacities
% for edges and it might now wish to communicate this information back
% to the upper layers. These options should be executed with the path
% /graph drawing.
-%
+%
% #7 contains algorithmically-computed information concerning how the
% edge should bend. This will be a text like
% "--(10pt,20pt)--(30pt,40pt)" in tikz-syntax, using the path
% operations "--", "..controls" and "--cycle".
-%
+%
% By default, a simple line is drawn between the nodes. Usually, you
% will wish to install a more "fancy" callback, here.
-\def\pgfgdsetedgecallback#1{\let\pgfgdcallbackedge=#1}
+\def\pgfgdsetedgecallback#1{\let\pgfgdcallbackedge=#1}%
-\def\pgfgddefaultedgecallback#1#2#3#4#5#6#7{%
+\def\pgfgddefaultedgecallback#1#2#3#4#5#6#7#8{%
{%
+ \def\pgf@temp{#8}%
+ \ifx\pgf@temp\pgfutil@empty%
+ \else%
+ \pgfset{every graphdrawing animation/.try}%
+ \pgfset{every graphdrawing edge animation/.try}%
+ #8%
+ \pgfuseid{pgf@gd}%
+ \pgfidscope%
+ \fi%
\pgfscope
\pgfpathmoveto{
\pgfutil@in@.{#1}%
@@ -685,14 +711,18 @@
}
\pgfusepath{stroke}
\endpgfscope
+ \ifx\pgf@temp\pgfutil@empty%
+ \else%
+ \endpgfidscope%
+ \fi%
}
-}
+}%
-\pgfgdsetedgecallback{\pgfgddefaultedgecallback}
+\pgfgdsetedgecallback{\pgfgddefaultedgecallback}%
\def\pgf@gd@unravel#1.#2\relax{%
\pgfpointanchor{#1}{#2}%
-}
+}%
@@ -709,7 +739,7 @@
\catcode`\@=11\relax%
\setbox\pgf@gd@prekind@box=\box\pgfutil@voidb@x%
\setbox\pgf@gd@postkind@box=\box\pgfutil@voidb@x%
-}
+}%
\def\pgfgdcallbackendshipout{%
\box\pgf@gd@prekind@box%
\ifpgf@gd@nodes@behind@edges%
@@ -721,7 +751,7 @@
\fi%
\box\pgf@gd@postkind@box%
\endpgfscope
-}
+}%
\newbox\pgf@gd@node@box
\newbox\pgf@gd@edge@box
@@ -730,23 +760,23 @@
\def\pgfgdcallbackbeginnodeshipout{%
\setbox\pgf@gd@node@box=\hbox\bgroup%
-}
+}%
\def\pgfgdcallbackendnodeshipout{%
\egroup%
-}
+}%
\def\pgfgdcallbackbeginedgeshipout{%
\setbox\pgf@gd@edge@box=\hbox\bgroup%
-}
+}%
\def\pgfgdcallbackendedgeshipout{%
\egroup
-}
+}%
-% Generate a node
+% Generate a node
%
% This callback is called from the engine whenever an algorithm
% generates a new node internally.
@@ -764,14 +794,14 @@
\pgfkeys{#3}
\pgfnode{#2}{\pgfkeysvalueof{/graph drawing/generated
node/anchor}}{#4}{#1}{\pgfkeysvalueof{/graph drawing/generated
- node/use path}}
+ node/use path}}
}
-}
+}%
\pgfkeys{
/graph drawing/generated node/anchor/.initial=center,
/graph drawing/generated node/use path/.initial=\pgfusepath{}
-}
+}%
@@ -779,49 +809,49 @@
% Sublayouts
%
% Description: For a general introduction to (sub)layouts, see
-% Section~\ref{section-gd-sublayouts} in the manual.
-%
+% Section~\ref{section-gd-sublayouts} in the manual.
+%
\def\pgfgdbeginlayout{
\begingroup
\pgfgdlayoutscopeactivetrue
\advance\pgf@gd@parameter@stack@height by1\relax%
\directlua{pgf.gd.interface.InterfaceToDisplay.pushLayout(\the\pgf@gd@parameter@stack@height)}
-}
+}%
\def\pgfgdendlayout{
\endgroup%
-}
+}%
% Creates a subgraph node
-%
+%
% #1 = name
% #2 = node options
% #3 = node text
-%
+%
% Description:
-%
+%
% A subgraph node is a node that "surrounds" the nodes of a
% subgraph. The special property of a subgraph node opposed to a
% normal node is that it is created only after the subgraph has been
% laid out. However, the difference to a collection like "hyper" is
-% that the node is availble immediately as a normal node in the sense
+% that the node is available immediately as a normal node in the sense
% that you can connect edges to it.
-%
+%
% What happens internally is that subgraph nodes get "registered"
% immediately both on the pgf level and on the lua level, but the
% actual node is only created inside the layout pipeline using a
% callback. The actual node creation happens when the innermost layout
% in which the subgraph node is declared has finished.
-%
+%
% When you create a subgraph node using this macro, you also start a
% collection (of an internal kind) that stores the subgraph. All
% following nodes in the current TeX scope will become part of this
-% collection.
-%
+% collection.
+%
% See |InterfaceToDisplay.pushSubgraphVertex| for details.
\def\pgfgdsubgraphnode#1#2#3{%
@@ -839,45 +869,45 @@
})
}%
}
-}
+}%
\def\pgfgdsubgraphnodecontents#1{% helper function
\hbox to \pgfkeysvalueof{/graph drawing/subgraph bounding box width}{%
\vrule width0pt height\pgfkeysvalueof{/graph drawing/subgraph bounding box height}\hfil}%
-}
+}%
\pgfgdset{
subgraph point cloud/.initial=,
subgraph bounding box width/.initial=,
subgraph bounding box height/.initial=,
-}
+}%
-%
+%
% Requests
-%
+%
% Description:
-%
+%
% This key is used to ``request'' a graph drawing scope and a
% layout. The objective of this key is to make it easier for users and
% algorithm designers to control the slightly involved
% back-and-forth-calling between the different layers.
-%
+%
% This key does the following: When called inside a pgfpicture
% (otherwise, the call is "illegal"), it will call a call-back with
% two parameters. This callback will get passed some code that should
% be executed at the beginning of ``the next scope'' and some code
% that should be executed at the end of that scope.
-%
+%
% The code passed to the callbacks will have a different effect,
% depending on whether we are currently inside a layout scope or not
-% (if no graph drawing scope is open, we are
+% (if no graph drawing scope is open, we are
% not inside a layout). If we are not inside a layout scope (or if the
% layout scope has been interrupted), the code will issue a
% \pgfgdbeginscope command in the opening code and a corresponding
% scope ending command in the closing code. Next, the two code pieces
% always contain \pgfgdbeginlayout and \pgfgdendlayout.
-%
+%
% Note that the "@request scope and layout" key will not immediately
% trigger a layout scope to be created; rather, the TikZ callback will
% call it only at the beginning of the scope, which will be after
@@ -887,39 +917,39 @@
% *after* the "@request scope and layout" key since the actual opening
% of the scope happens only before the "..." part is parsed.
-\pgfgdset{@request scope and layout/.code=\pgfgd@requestcallback{\pgfgdbeginrequest}{\pgfgdendrequest}}
+\pgfgdset{@request scope and layout/.code=\pgfgd@requestcallback{\pgfgdbeginrequest}{\pgfgdendrequest}}%
\def\pgfgd@requestcallback#1#2{%
#1\def\pgf@gd@after@request{#2\egroup}\bgroup\aftergroup\pgf@gd@after@request%
-} % Default for basic layer
+}% Default for basic layer
\def\pgfgdbeginrequest{%
\ifpgfgdlayoutscopeactive%
\else%
\expandafter\pgfgdbeginscope%
\fi%
- \pgfgdbeginlayout%
-}
+ \pgfgdbeginlayout%
+}%
\def\pgfgdendrequest{%
\pgfgdendlayout%
\ifpgfgdlayoutscopeactive%
\else%
\expandafter\pgfgdendscope%
- \fi%
-}
+ \fi%
+}%
\newif\ifpgfgdlayoutscopeactive
% Set the request callback
-%
+%
% #1 = A macro
-%
+%
% Description:
-%
+%
% Sets the request callback as described in the "@request scope and
% layout" key.
-\def\pgfgdsetrequestcallback#1{\let\pgfgd@requestcallback#1}
+\def\pgfgdsetrequestcallback#1{\let\pgfgd@requestcallback#1}%
@@ -932,7 +962,7 @@
% Begins a new graph drawing scope
-%
+%
% Description:
%
% Inside a graph drawing scope, all pgf nodes that are newly created
@@ -943,7 +973,7 @@
% explicitly, but have styles and keys invoke it internally.
%
% Usage:
-%
+%
% \pgfgdset{algorithm=somealgorithm}
% \pgfgdbeginscope
% \pgfnode{rectangle}{center}{A}{A}{}
@@ -953,9 +983,9 @@
% \pgfgdedge{B}{C}{->}{}{}
% \pgfgdedge{C}{A}{->}{}{}
% \pgfgdendscope
-%
+%
% Naturally, users will typically use TikZ's somewhat simpler syntax: '
-%
+%
% \tikz \graph [some algorithm] { A -> B -> C -> A };
\def\pgfgdbeginscope{%
@@ -975,7 +1005,7 @@
% Kill transformations (will be added by the position now
% macros)
\pgftransformreset
-}
+}%
@@ -987,7 +1017,7 @@
% Ends a graph drawing scope
-%
+%
% Description:
%
% This macro invokes the selected graph drawing algorithm and
@@ -1006,13 +1036,13 @@
\directlua{
pgf.gd.interface.InterfaceToDisplay.resumeGraphDrawingCoroutine()
}%
- \pgfutil@repeat%
+ \pgfutil@repeat%
\endgroup%
% Late positioning has ended
\directlua{pgf.gd.interface.InterfaceToDisplay.renderGraph()}%
\directlua{pgf.gd.interface.InterfaceToDisplay.endGraphDrawingScope()}%
\endgroup%
-}
+}%
@@ -1020,18 +1050,18 @@
% Hook into graph specification
-%
+%
% #1 = code
-%
+%
% Description:
-%
+%
% Allows you to specify code that should be active while the graph
% drawing engine collects the information concerning the graph, but
% which should no longer be active when the graph is rendered.
\def\pgfgdaddspecificationhook#1{
\expandafter\def\expandafter\pgfgd@latecallback\expandafter{\pgfgd@latecallback#1}
-}
+}%
\let\pgfgd@latecallback\pgfutil@empty
@@ -1046,24 +1076,24 @@
% Include a graph drawing library file.
%
% #1 = List of names of library file.
-%
+%
% Description:
%
% This command includes a list of graph drawing library files. For
% each file X in the list, the file pgf.gd.X.lua is included using
-% |require|.
+% |require|.
%
% For the convenience of Context users, both round and square brackets
% are possible for the argument.
-%
+%
%
% Example:
%
% \usegdlibrary{trees}
% \usegdlibrary[force,circular]
-\def\usegdlibrary{\pgfutil@ifnextchar[{\use@gdlibrary}{\use@@gdlibrary}}%}
-\def\use@gdlibrary[#1]{\use@@gdlibrary{#1}}
+\def\usegdlibrary{\pgfutil@ifnextchar[{\use@gdlibrary}{\use@@gdlibrary}}%}%
+\def\use@gdlibrary[#1]{\use@@gdlibrary{#1}}%
\def\use@@gdlibrary#1{%
\edef\pgf@list{#1}%
\pgfutil@for\pgf@temp:=\pgf@list\do{%
@@ -1075,56 +1105,49 @@
end}
\fi
}
-}
+}%
-% In the following code: Does anyone know how to determine the
-% file-system separator in Lua? Or in TeX?
-{
- \catcode`\%=11
+% LaTeX uses kpathsea for file lookup while ConTeXt uses its
+% resolvers. Luckily, kpathsea is still accessible in ConTeXt in a
+% subtable kpse.original which we use if kpse.find_file is nil.
+{%
+\catcode`\%=11
\directlua{
- function pgf_lookup_and_require(name)
- local sep = '/'
- if string.find(os.getenv('PATH'),';') then
- sep = '\string\\'
- end
- local function lookup(name)
- local sub = name:gsub('%.',sep)
- local find_func = function (name, suffix)
- if resolvers then
- local n = resolvers.findfile (name, suffix)
- return (not (n == '')) and n or nil
- else
- return kpse.find_file(name,suffix)
+ function pgf_lookup_and_require(name)
+ local sep = package.config:sub(1,1)
+ local function lookup(name)
+ local sub = name:gsub('%.',sep)
+ local find_file = context and
+ resolvers.findfile or
+ kpse.find_file
+ if find_file(sub, 'lua') then
+ require(name)
+ elseif find_file(sub, 'clua') then
+ collectgarbage('stop')
+ require(name)
+ collectgarbage('restart')
+ else
+ return false
+ end
+ return true
end
- end
- if find_func(sub, 'lua') then
- require(name)
- elseif find_func(sub, 'clua') then
- collectgarbage('stop')
- require(name)
- collectgarbage('restart')
- else
- return false
- end
- return true
+ return
+ lookup('pgf.gd.' .. name .. '.library') or
+ lookup('pgf.gd.' .. name) or
+ lookup(name .. '.library') or
+ lookup(name)
end
- return
- lookup('pgf.gd.' .. name .. '.library') or
- lookup('pgf.gd.' .. name) or
- lookup(name .. '.library') or
- lookup(name)
- end
-}
}
+}%
%
% Ok, fire up the system by creating the binding!
%
\directlua{
- require 'pgf.gd.interface.InterfaceToDisplay'
+ require 'pgf.gd.interface.InterfaceToDisplay'
pgf.gd.interface.InterfaceToDisplay.bind(require 'pgf.gd.bindings.BindingToPGF')
-}
+}%
@@ -1133,10 +1156,10 @@
% that have a special meaning on the display layer.
%
-\pgfkeys{/graph drawing/nodes behind edges/.append code=\csname pgf@gd@nodes@behind@edges#1\endcsname}
-\pgfkeys{/graph drawing/nodes behind edges/.default=true}
+\pgfkeys{/graph drawing/nodes behind edges/.append code=\csname pgf@gd@nodes@behind@edges#1\endcsname}%
+\pgfkeys{/graph drawing/nodes behind edges/.default=true}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.examples.code.tex b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.examples.code.tex
index 4bfe4a839a3..c5c4997d627 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.examples.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.examples.code.tex
@@ -7,11 +7,11 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.examples.code.tex,v 1.2 2012/11/20 23:34:18 tantau Exp $
+\ProvidesFileRCS{pgflibrarygraphdrawing.examples.code.tex}
\usepgflibrary{graphdrawing}
\usegdlibrary{examples}
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.force.code.tex b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.force.code.tex
index 3950a9062e1..cd6851466a3 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.force.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.force.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.force.code.tex,v 1.7 2012/11/20 23:34:18 tantau Exp $
+\ProvidesFileRCS{pgflibrarygraphdrawing.force.code.tex}
@@ -34,23 +34,23 @@
%
initial step dimension/.graph parameter=number,
initial step dimension/.parameter initial=0,
- %
+ %
convergence tolerance/.graph parameter=number,
convergence tolerance/.parameter initial=0.01,
%
spring constant/.graph parameter=number,
spring constant/.parameter initial=0.01,
- %
+ %
approximate electric forces/.graph parameter=boolean,
approximate electric forces/.parameter initial=false,
approximate electric forces/.default=true,
- %
+ %
electric force order/.graph parameter=number,
electric force order/.parameter initial=1,
%
% Parameters related to the multilevel approach where the input graph
% is iteratively coarsened into graphs with fewer nodes, until either
- % the number of nodes is small enough or the number of nodes in the
+ % the number of nodes is small enough or the number of nodes in the
% could not be reduced by at least a user-defined ratio.
%
coarsen/.graph parameter=boolean,
@@ -103,10 +103,10 @@
algorithm=pgf.gd.force.SpringHu2006
}
-
+
%
% Spring-electrical algorithm based on the paper
-%
+%
% "Efficient, High-Quality Force-Directed Graph Drawing"
% Yifan Hu, 2006
%
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.layered.code.tex b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.layered.code.tex
index 37f28bc304a..794fff40275 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.layered.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.layered.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.layered.code.tex,v 1.5 2012/11/20 23:34:18 tantau Exp $
+\ProvidesFileRCS{pgflibrarygraphdrawing.layered.code.tex}
\usepgflibrary{graphdrawing}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.trees.code.tex b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.trees.code.tex
index 7d0a9ed35b0..10231f221ad 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.trees.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.trees.code.tex
@@ -8,7 +8,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.trees.code.tex,v 1.8 2012/11/20 23:34:18 tantau Exp $
+\ProvidesFileRCS{pgflibrarygraphdrawing.trees.code.tex}
\usepgflibrary{graphdrawing}
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex
index 3c3532b394d..0967f817d27 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex
@@ -8,16 +8,16 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex,v 1.20 2013/08/05 18:22:47 tantau Exp $
+\ProvidesFileRCS{tikzlibrarygraphdrawing.code.tex}
-\usepgflibrary{graphdrawing}
+\usepgflibrary{graphdrawing}%
-\def\tikz@lib@ensure@gd@loaded{}
+\def\tikz@lib@ensure@gd@loaded{}%
% Patch the level and sibling distances so that gd and plain tikz are
% in sync
-\tikzset{level distance=1cm, sibling distance=1cm}
+\tikzset{level distance=1cm, sibling distance=1cm}%
% Patch node distance because of its special syntax.
@@ -31,27 +31,27 @@
\else%
\tikz@gd@convert@and#1 and #1\pgf@stop%
\fi%
-}
-\def\tikz@gd@convert@and#1 and #2\pgf@stop{\pgfkeys{/graph drawing/node distance/orig={#1}}}
+}%
+\def\tikz@gd@convert@and#1 and #2\pgf@stop{\pgfkeys{/graph drawing/node distance/orig={#1}}}%
%
% Setup graph drawing for tikz
-%
+%
\def\tikz@gd@request@callback#1#2{%
\tikzset{
execute at begin scope={
- \tikzset{
+ \tikzset{
--/.style={arrows=-},
-!-/.style={draw=none,fill=none},
- }
+ }
\pgfgdsetedgecallback{\pgfgdtikzedgecallback}%
- %
+ %
% Setup for plain syntax
- %
+ %
\pgfgdaddspecificationhook{\tikz@lib@gd@spec@hook}%
#1
\let\tikzgdeventcallback\pgfgdevent%
@@ -62,27 +62,27 @@
#2%
}
}%
-}
+}%
\pgfgdsetrequestcallback\tikz@gd@request@callback
-\pgfgdappendtoforwardinglist{/tikz/,/tikz/graphs/}
+\pgfgdappendtoforwardinglist{/tikz/,/tikz/graphs/}%
\def\tikz@lib@gd@spec@hook{%
\tikzset{
edge macro=\tikz@gd@plain@edge@macro,
/tikz/at/.style={/graph drawing/desired at={##1}},
- %
+ %
% Setup for the tree syntax (do this late so that grow options
% are still valid after a layout has been chosen)
- %
+ %
/tikz/growth function=\relax,
/tikz/edge from parent macro=\tikz@gd@edge@from@parent@macro,
- %
- % Setup for the graphs syntax
- %
+ %
+ % Setup for the graphs syntax
+ %
/tikz/graphs/new ->/.code n args={4}{\pgfgdedge{##1}{##2}{->}{/tikz,##3}{##4}},
/tikz/graphs/new <-/.code n args={4}{\pgfgdedge{##1}{##2}{<-}{/tikz,##3}{##4}},
/tikz/graphs/new --/.code n args={4}{\pgfgdedge{##1}{##2}{--}{/tikz,##3}{##4}},
@@ -90,41 +90,58 @@
/tikz/graphs/new -!-/.code n args={4}{\pgfgdedge{##1}{##2}{-!-}{/tikz,##3}{##4}},
/tikz/graphs/placement/compute position/.code=,%
}
-}
+}%
\pgfgdaddprepareedgehook{
\tikz@enable@edge@quotes%
\let\tikz@transform=\pgfutil@empty%
\let\tikz@options=\pgfutil@empty%
\let\tikz@tonodes=\pgfutil@empty%
-}
+}%
\tikzset{
parent anchor/.forward to=/graph drawing/tail anchor,
child anchor/.forward to=/graph drawing/head anchor
-}
+}%
-\def\pgfgdtikzedgecallback#1#2#3#4#5#6#7{%
- \draw (#1)
- edge [to path={#7 \tikztonodes},#3,#4,/graph drawing/.cd,#6,/tikz/.cd]
- #5
- (#2);
-}
+\def\pgfgdtikzedgecallback#1#2#3#4#5#6#7#8{%
+ \def\pgf@temp{#8}%
+ \ifx\pgf@temp\pgfutil@empty%
+ \else%
+ \pgfscope%
+ \pgfset{every graphdrawing animation/.try}%
+ \pgfset{every graphdrawing edge animation/.try}%
+ #8%
+ \pgfuseid{pgf@gd}%
+ \pgfidscope%
+ \fi%
+ \begingroup
+ \draw (#1)
+ edge [to path={#7 \tikztonodes},#3,#4,/graph drawing/.cd,#6,/tikz/.cd]
+ #5
+ (#2);
+ \endgroup
+ \ifx\pgf@temp\pgfutil@empty%
+ \else%
+ \endpgfidscope%
+ \endpgfscope%
+ \fi%
+}%
\def\tikz@gd@edge@from@parent@macro#1#2{
[/utils/exec=\pgfgdedge{\tikzparentnode}{\tikzchildnode}{--}{/tikz,#1}{#2}]
-}
+}%
\def\tikz@gd@plain@edge@macro#1#2{
\pgfgdedge{\tikztostart}{\tikztotarget}{--}{/tikz,#1}{#2}
-}
+}%
-%
+%
% Conversions: Convert coordinates into pairs of values surrounded by
-% braces.
+% braces.
%
\pgfgdset{
@@ -140,7 +157,7 @@
\pgfmathsetmacro{\tikz@gd@temp@y}{\pgf@y}
\edef\pgfgdresult{pgf.gd.model.Coordinate.new(\tikz@gd@temp@x,\tikz@gd@temp@y)}
}
-}
+}%
@@ -150,11 +167,11 @@
\def\pgfgdcallbackcreatevertex#1#2#3#4{%
\node[every generated node/.try,name={#1},shape={#2},/graph drawing/.cd,#3]{#4};%
-}
+}%
-%
-% Subgraph handling
+%
+% Subgraph handling
%
% "General" text placement for subgraph nodes that works with all node
@@ -173,7 +190,7 @@
\vrule width0pt height.5\pgf@y depth.5\pgf@y\hfil}%
}%
},
-}
+}%
\def\tikz@lg@simple@contents@top#1{%
\def\pgfgdsubgraphnodecontents##1{%
@@ -190,13 +207,13 @@
\fi%
\fi%
\pgfmathparse{\pgfkeysvalueof{/tikz/subgraph text sep}}%
- \kern\pgfmathresult pt\relax%
+ \kern\pgfmathresult pt\relax%
\pgf@y=\pgfkeysvalueof{/graph drawing/subgraph bounding box height}\relax%
\hbox to \pgfkeysvalueof{/graph drawing/subgraph bounding box width}{%
\vrule width0pt height.5\pgf@y depth.5\pgf@y\hfil}%
}%
}%
-}
+}%
\def\tikz@lg@simple@contents@bottom#1{%
\def\pgfgdsubgraphnodecontents##1{%
@@ -205,7 +222,7 @@
\setbox0=\vbox{%
\hbox to \pgfkeysvalueof{/graph drawing/subgraph bounding box width}{\vrule width0pt height\pgf@y\hfil}%
\pgfmathparse{\pgfkeysvalueof{/tikz/subgraph text sep}}%
- \kern\pgfmathresult pt\relax%
+ \kern\pgfmathresult pt\relax%
\def\pgf@temp{##1}%
\ifx\pgf@temp\pgfutil@empty%
\else%
@@ -225,15 +242,15 @@
\box0\relax%
}%
}%
-}
+}%
-\tikzset{subgraph text top}
+\tikzset{subgraph text top}%
\tikzset{
subgraph nodes/.style={/tikz/every subgraph node/.style={#1}},
graphs/subgraph nodes/.style={/tikz/every subgraph node/.style={#1}},
graphs/@graph drawing setup/.style={/graph drawing/anchor at={(\tikz@lastx,\tikz@lasty)}}
-}
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.barcharts.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.barcharts.code.tex
index 7eb1b719329..da124ee8401 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.barcharts.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.barcharts.code.tex
@@ -7,9 +7,9 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.barcharts.code.tex,v 1.3 2008/11/12 23:39:37 tantau Exp $
+\ProvidesFileRCS{pgflibrarydatavisualization.barcharts.code.tex}
-\usepgfmodule{datavisualization}
+\usepgfmodule{datavisualization}%
%
@@ -18,22 +18,22 @@
\pgfooclass{candle stick visualizer}
-{
- \attribute attribute;
- \attribute offset;
- \attribute use path rise=\pgfsetfillcolor{white}\pgfusepath{fill,stroke};
- \attribute use path fall=\pgfsetfillcolor{black}\pgfusepath{fill,stroke};
- \attribute use path wick=\pgfusepath{stroke};
-
+{%
+ \attribute attribute;%
+ \attribute offset;%
+ \attribute use path rise=\pgfsetfillcolor{white}\pgfusepath{fill,stroke};%
+ \attribute use path fall=\pgfsetfillcolor{black}\pgfusepath{fill,stroke};%
+ \attribute use path wick=\pgfusepath{stroke};%
+
\method candle stick visualizer(#1) {
\pgfooeset{attribute}{#1}
\pgfoothis.set stick width(4pt)
- }
+ }%
\method default connects() {
\pgfoothis.get handle(\pgf@dv@me)
\pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,visualize,visualize datapoint signal)
- }
+ }%
\method set stick width(#1) {
\pgfmathparse{#1}
@@ -53,15 +53,15 @@
\pgf@y=\pgf@dv@lib@w\pgf@xa%
\edef\pgf@dv@lib@temp{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
\pgfoolet{offset}\pgf@dv@lib@temp
- }
+ }%
\method set use path rise(#1) {
\pgfooset{use path rise}{#1}
- }
+ }%
\method set use path fall(#1) {
\pgfooset{use path fall}{#1}
- }
+ }%
\method visualize() {
{
@@ -122,14 +122,14 @@
\else
\pgfoovalueof{use path fall}
\fi
- \end{pgfscope}
+ \end{pgfscope}%
\fi
}
- }
+ }%
\newif\ifpgf@dv@lib@cs@skip
\newif\ifpgf@dv@lib@rise
-}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.formats.functions.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.formats.functions.code.tex
index ae62fd31839..540901936fe 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.formats.functions.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.formats.functions.code.tex
@@ -7,9 +7,9 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.formats.functions.code.tex,v 1.4 2011/03/14 23:17:52 tantau Exp $
+\ProvidesFileRCS{pgflibrarydatavisualization.formats.functions.code.tex}
-\usepgfmodule{datavisualization}
+\usepgfmodule{datavisualization}%
@@ -36,27 +36,27 @@
%
% Additionally, the variables and functions stored in the keys
% /pgf/data/vars and /pgf/data/funcs will also be used, the format for
-% them is the same as above.
+% them is the same as above.
%
% The <name> is always the name of a (data point) attribute. Inside
% the <body> it can be accessed using the \value macro, which is
% defined locally, here.
%
-% Newlines are not importants, everything is gathered into a single
+% Newlines are not important, everything is gathered into a single
% line, the semicolons are used to detect the beginnings and ends of
% declarations.
%
% With everything setup in this way, for each variable, the variable
-% ranges throught the values between start and end, either with the
+% ranges through the values between start and end, either with the
% given step or the given number of samples. If neither is given, the
% current value of /pgf/data visualization/samples is used. If there
% are multiple variables, they all range over their respective
-% intervals independently. Thus, "var x = [0,1]; var y = [0:1];",
+% intervals independently. Thus, "var x = [0,1]; var y = [0:1];",
% assuming samples=25, gives you 625 data points.
%
% As the variables range over their respective values, the functions
% are evaluated using the function stored in /pgf/data/evaluator. By
-% default this is set to \pgfmathparse, but
+% default this is set to \pgfmathparse, but
% you can use a different parser, if you like.
%
% Example:
@@ -104,15 +104,15 @@
\expandafter\pgf@lib@dv@func@parse \pgf@lib@dv@collector\pgf@stop%
\let\value\pgf@lib@dv@getval
\pgf@lib@dv@parsed\pgfdatapoint\pgfutil@gobble\pgf@stop%
-}
+}%
\pgfkeys{
/pgf/data/vars/.initial=,
/pgf/data/funcs/.initial=,
/pgf/data/evaluator/.initial=\pgfmathparse,
- /pgf/data/samples/.initial=25}
+ /pgf/data/samples/.initial=25}%
-\def\pgf@lib@dv@getval#1{\pgfkeysvalueof{/data point/#1}}
+\def\pgf@lib@dv@getval#1{\pgfkeysvalueof{/data point/#1}}%
\def\pgf@lib@dv@func@parse{%
\pgfutil@ifnextchar\pgf@stop{% done
@@ -125,17 +125,17 @@
\pgf@lib@dv@func%
}%
}%
-}
+}%
\def\pgf@lib@dv@func func #1 =#2;{%
\expandafter\def\expandafter\pgf@lib@dv@parsed\expandafter{\pgf@lib@dv@parsed\pgf@lib@dv@eval@func{#1}{#2}}
\pgf@lib@dv@func@parse%
-}
-\def\pgf@lib@dv@var var #1 :{\pgfutil@ifnextchar\bgroup{\pgf@lib@dv@var@group{#1}}{\pgf@lib@dv@var@int{#1}}}
+}%
+\def\pgf@lib@dv@var var #1 :{\pgfutil@ifnextchar\bgroup{\pgf@lib@dv@var@group{#1}}{\pgf@lib@dv@var@int{#1}}}%
\def\pgf@lib@dv@var@group#1#2;{%
\expandafter\def\expandafter\pgf@lib@dv@parsed\expandafter{\pgf@lib@dv@parsed\pgf@lib@dv@group@var{#1}{#2}}%
\pgf@lib@dv@func@parse%
-}
+}%
\def\pgf@lib@dv@var@int#1#2[#3:#4]{%
\pgfutil@ifnextchar s{%
\pgf@lib@dv@samplesorsteps{#1}{#3}{#4}%
@@ -144,22 +144,22 @@
\pgf@lib@dv@parsed\pgf@lib@dv@samples@var{#1}{#3}{#4}{\pgfkeysvalueof{/pgf/data/samples}}}%
\expandafter\pgf@lib@dv@func@parse\pgfutil@gobble%
}
-}
+}%
\def\pgf@lib@dv@samplesorsteps#1#2#3s{%
\pgfutil@ifnextchar t{% step
\pgf@lib@dv@step{#1}{#2}{#3}%
}{% sample
\pgf@lib@dv@samples{#1}{#2}{#3}%
}%
-}
+}%
\def\pgf@lib@dv@step#1#2#3tep#4;{%
\expandafter\def\expandafter\pgf@lib@dv@parsed\expandafter{\pgf@lib@dv@parsed\pgf@lib@dv@step@var{#1}{#2}{#3}{#4}}%
\pgf@lib@dv@func@parse%
-}
+}%
\def\pgf@lib@dv@samples#1#2#3amples#4;{%
\expandafter\def\expandafter\pgf@lib@dv@parsed\expandafter{\pgf@lib@dv@parsed\pgf@lib@dv@samples@var{#1}{#2}{#3}{#4}}%
\pgf@lib@dv@func@parse%
-}
+}%
%
% Executer...
@@ -172,7 +172,7 @@
\pgfmathparse{\pgfmathresult/(#4-1)}%
\let\pgf@lib@dv@temp=\pgfmathresult%
\pgf@lib@dv@step@var{#1}{#2}{#3}{\pgf@lib@dv@temp}%
-}
+}%
\def\pgf@lib@dv@step@var#1#2#3#4#5\pgf@stop{%
{%
@@ -191,19 +191,19 @@
\pgfkeyslet{/data point/#1}{\pgfmathresult}%
\repeatpgfmathloop%%
}%
-}
+}%
\def\pgf@lib@dv@group@var#1#2#3\pgf@stop{%
\foreach \pgf@lib@dv@iterator in {#2} {%
\pgfkeyslet{/data point/#1}{\pgf@lib@dv@iterator}%
#3\pgf@stop%
}%
-}
+}%
\def\pgf@lib@dv@eval@func#1#2{%
\pgfkeysvalueof{/pgf/data/evaluator}{#2}%
- \pgfkeyslet{/data point/#1}{\pgfmathresult}%
-}
+ \pgfkeyslet{/data point/#1}{\pgfmathresult}%
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.polar.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.polar.code.tex
index 36e51541cee..f56ebe3e7f0 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.polar.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.polar.code.tex
@@ -7,35 +7,35 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/datavisualization/pgflibrarydatavisualization.polar.code.tex,v 1.4 2011/02/22 22:07:24 tantau Exp $
+\ProvidesFileRCS{pgflibrarydatavisualization.polar.code.tex}
-\usepgfmodule{datavisualization}
+\usepgfmodule{datavisualization}%
% This file defines code for doing plots involving polar
% coordinates. This includes not only standard polar plots, but also
-% pie charts.
+% pie charts.
\pgfooclass{polar transformer}
-{
- % Class plor mapper
+{%
+ % Class polar mapper
%
% A polar mapper is used to transform attributes given as (2d) polar
% coordinates to canvas coordinates. Note that no special ranges
% can be specified and that the angle must be given in degrees. You
% can, however, use a standard mapper to change these things.
-
- \attribute angle;
+
+ \attribute angle;%
% The attribute from which the angle is read.
-
- \attribute radius;
+
+ \attribute radius;%
% The attribute from which the radius is read.
-
- \attribute unit vector 0 degrees;
+
+ \attribute unit vector 0 degrees;%
% The unit vector 0 degrees
-
- \attribute unit vector 90 degrees;
+
+ \attribute unit vector 90 degrees;%
% The unit vector 90 degrees
@@ -52,7 +52,7 @@
\pgfooset{radius}{#2}
\pgfooset{unit vector 0 degrees}{#3}
\pgfooset{unit vector 90 degrees}{#4}
- }
+ }%
% Method
\method default connects() {
@@ -60,18 +60,18 @@
\pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,transform,transform datapoint signal)
\pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,path,path signal)
\pgfkeysvalueof{/pgf/data visualization/obj}.connect(\pgf@dv@me,direction,direction signal)
- }
+ }%
% Getters
\method get angle attribute(#1) {
\pgfooget{angle}{#1}
- }
+ }%
\method get radius attribute(#1) {
\pgfooget{radius}{#1}
- }
+ }%
+
-
% Slot
%
% This slot should be connected to the transform datapoint
@@ -105,10 +105,10 @@
\fi%
\fi%
\fi%
- }
+ }%
+
-
% Reaction to the path signal
%
% Here is what we do: When a pgfdvpathmoveto is done, the radius and
@@ -118,9 +118,9 @@
% the lineto is caught and replaced by an arc from the previous
% position to the new position.
- \attribute prev angle;
- \attribute prev radius;
-
+ \attribute prev angle;%
+ \attribute prev radius;%
+
\method path(#1) {%
\ifpgfdvhandled%
\else%
@@ -160,7 +160,7 @@
% No matter what, record the current position
\pgfooeset{prev angle}{\pgfkeysvalueof{/data point/\pgfoovalueof{angle}}}
\pgfooeset{prev radius}{\pgfkeysvalueof{/data point/\pgfoovalueof{radius}}}
- }
+ }%
% Method
%
@@ -191,10 +191,8 @@
\fi%
\fi%
\fi\fi%
- }
-}
+ }%
+}%
\endinput
-
-
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.footprints.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.footprints.code.tex
index 5cf633d0c59..369a0ecbd09 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.footprints.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.footprints.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
% Parameters
@@ -22,12 +22,12 @@
/pgf/decoration/foot angle/.initial=10,
% What animal?
/pgf/decoration/foot of/.initial=human,
-}
+}%
\pgfdeclaredecoration{footprints}{left}
-{
+{%
\state{left}[width=\pgfkeysvalueof{/pgf/decoration/stride length}/2,next state=right]
{
\pgftransformyshift{\pgfkeysvalueof{/pgf/decoration/foot sep}/2}
@@ -35,7 +35,7 @@
\pgftransformscale{\pgfmathresult}
\pgftransformrotate{\pgfkeysvalueof{/pgf/decoration/foot angle}}
\csname pgf@lib@foot@of@\pgfkeysvalueof{/pgf/decoration/foot of}\endcsname
- }
+ }%
\state{right}[width=\pgfkeysvalueof{/pgf/decoration/stride length}/2,next state=left]
{
\pgftransformyscale{-1}
@@ -44,23 +44,23 @@
\pgftransformscale{\pgfmathresult}
\pgftransformrotate{\pgfkeysvalueof{/pgf/decoration/foot angle}}
\csname pgf@lib@foot@of@\pgfkeysvalueof{/pgf/decoration/foot of}\endcsname
- }
-}
+ }%
+}%
-% Actual footprints.
+% Actual footprints.
%
% A footprint must be name \pgf@lib@foot@of@XXX, be a left foot and
% should fill a rectangle of (0,0) rectangle (1pt,1pt) (more or less)
-% and point right.
+% and point right.
%
\def\pgf@lib@foot@of@gnome{
% Coordinates from a Gnome logo on wikimedia commons. LGPL
% license... Unknown author.
- %
+ %
% Flip and rotate
\pgftransformcm{0}{-1}{-1}{0}{\pgfqpoint{1pt}{0.8pt}}
\pgftransformscale{0.83333}
@@ -68,23 +68,23 @@
\pgfpathcurveto{\pgfqpoint{.61466pt}{0pt}}{\pgfqpoint{.56851pt}{.35041pt}}{\pgfqpoint{.70691pt}{.35041pt}}
\pgfpathcurveto{\pgfqpoint{.84529pt}{.35041pt}}{\pgfqpoint{1.10671pt}{0pt}}{\pgfqpoint{.86068pt}{0pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.45217pt}{.30699pt}}
\pgfpathcurveto{\pgfqpoint{.52586pt}{.31149pt}}{\pgfqpoint{.60671pt}{.02577pt}}{\pgfqpoint{.46821pt}{.04374pt}}
\pgfpathcurveto{\pgfqpoint{.32976pt}{.06171pt}}{\pgfqpoint{.37845pt}{.30249pt}}{\pgfqpoint{.45217pt}{.30699pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.11445pt}{.48453pt}}
\pgfpathcurveto{\pgfqpoint{.16686pt}{.46146pt}}{\pgfqpoint{.1212pt}{.23581pt}}{\pgfqpoint{.03208pt}{.29735pt}}
\pgfpathcurveto{\pgfqpoint{-.057pt}{.3589pt}}{\pgfqpoint{.06204pt}{.50759pt}}{\pgfqpoint{.11445pt}{.48453pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.26212pt}{.36642pt}}
\pgfpathcurveto{\pgfqpoint{.32451pt}{.3537pt}}{\pgfqpoint{.32793pt}{.09778pt}}{\pgfqpoint{.21667pt}{.14369pt}}
\pgfpathcurveto{\pgfqpoint{.10539pt}{.18961pt}}{\pgfqpoint{.19978pt}{.37916pt}}{\pgfqpoint{.26212pt}{.36642pt}}
\pgfpathlineto{\pgfqpoint{.26212pt}{.36642pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.58791pt}{.93913pt}}
\pgfpathcurveto{\pgfqpoint{.59898pt}{1.02367pt}}{\pgfqpoint{.52589pt}{1.06542pt}}{\pgfqpoint{.45431pt}{1.01092pt}}
\pgfpathcurveto{\pgfqpoint{.22644pt}{.83743pt}}{\pgfqpoint{.8316pt}{.75088pt}}{\pgfqpoint{.79171pt}{.51386pt}}
@@ -94,7 +94,7 @@
\pgfpathcurveto{\pgfqpoint{.8358pt}{.82589pt}}{\pgfqpoint{.57867pt}{.8686pt}}{\pgfqpoint{.58791pt}{.93913pt}}
\pgfpathlineto{\pgfqpoint{.58791pt}{.93913pt}}
\pgfpathclose
-}
+}%
@@ -118,14 +118,14 @@
\pgfpathcurveto{\pgfqpoint{-3.4844pt}{2.9162pt}}{\pgfqpoint{-2.6164pt}{1.654pt}}{\pgfqpoint{-1.454pt}{1.3886pt}}
\pgfpathcurveto{\pgfqpoint{-1.0876pt}{1.305pt}}{\pgfqpoint{-1.0296pt}{1.3066pt}}{\pgfqpoint{-.886pt}{1.652pt}}
\pgfpathclose
-}
+}%
\expandafter\def\csname pgf@lib@foot@of@felis silvestris\endcsname{
% Coordinates derived from vector image created by Mark Wibrow, based
% on the forefoot of `felis silvestris' shown in
% Pearson, B. and Burton, J. A. (1980), `Wild Animals', Collins, 155.
- %
+ %
\pgftransformcm{0}{.1}{.1}{0}{\pgfqpoint{.48pt}{.5pt}}
\pgfpathmoveto{\pgfqpoint{2.7312pt}{-1.992pt}}
\pgfpathcurveto{\pgfqpoint{1.8716pt}{-1.4226pt}}{\pgfqpoint{2.1404pt}{.0436pt}}{\pgfqpoint{.9202pt}{.0436pt}}
@@ -151,30 +151,30 @@
\pgfpathcurveto{\pgfqpoint{2.8534pt}{.7868pt}}{\pgfqpoint{3.4658pt}{1.2838pt}}{\pgfqpoint{3.6872pt}{2.0152pt}}
\pgfpathcurveto{\pgfqpoint{3.9084pt}{2.7466pt}}{\pgfqpoint{3.655pt}{3.4358pt}}{\pgfqpoint{3.1212pt}{3.5542pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{-.6182pt}{5.0456pt}}
\pgfpathcurveto{\pgfqpoint{-1.2132pt}{5.0456pt}}{\pgfqpoint{-1.6956pt}{4.3104pt}}{\pgfqpoint{-1.6956pt}{3.4038pt}}
\pgfpathcurveto{\pgfqpoint{-1.6956pt}{2.4972pt}}{\pgfqpoint{-1.2132pt}{1.7618pt}}{\pgfqpoint{-.6182pt}{1.7618pt}}
\pgfpathcurveto{\pgfqpoint{-.0232pt}{1.7618pt}}{\pgfqpoint{.4592pt}{2.4972pt}}{\pgfqpoint{.4592pt}{3.4038pt}}
\pgfpathcurveto{\pgfqpoint{.4592pt}{4.3104pt}}{\pgfqpoint{-.0232pt}{5.0456pt}}{\pgfqpoint{-.6182pt}{5.0456pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{-4.1176pt}{1.8248pt}}
\pgfpathcurveto{\pgfqpoint{-4.6334pt}{1.7534pt}}{\pgfqpoint{-4.9806pt}{1.0312pt}}{\pgfqpoint{-4.8928pt}{.212pt}}
\pgfpathcurveto{\pgfqpoint{-4.8052pt}{-.6072pt}}{\pgfqpoint{-4.3158pt}{-1.2136pt}}{\pgfqpoint{-3.8pt}{-1.1422pt}}
\pgfpathcurveto{\pgfqpoint{-3.2842pt}{-1.0708pt}}{\pgfqpoint{-2.9372pt}{-.3486pt}}{\pgfqpoint{-3.0248pt}{.4706pt}}
\pgfpathcurveto{\pgfqpoint{-3.1126pt}{1.2898pt}}{\pgfqpoint{-3.6018pt}{1.8962pt}}{\pgfqpoint{-4.1176pt}{1.8248pt}}
\pgfpathclose
-}
+}%
\def\pgf@lib@foot@of@human{%
% Coordinates derived from vector image created by Mark Wibrow.
\pgftransformcm{0}{.5}{.5}{0}{\pgfqpoint{.48pt}{.2pt}}
- %
+ %
% Draw main part of foot.
- %
+ %
\pgfpathmoveto{\pgfqpoint{.20175pt}{-.72633pt}}
\pgfpathcurveto{\pgfqpoint{.16314pt}{-.88194pt}}{\pgfqpoint{.07386pt}{-1.0167pt}}{\pgfqpoint{-.08385pt}{-1.0167pt}}
\pgfpathcurveto{\pgfqpoint{-.24153pt}{-1.0167pt}}{\pgfqpoint{-.36942pt}{-.84897pt}}{\pgfqpoint{-.36942pt}{-.72633pt}}
@@ -189,7 +189,7 @@
\pgfpathclose
%
% Draw toe.s
- %
+ %
\pgfpathmoveto{\pgfqpoint{-.27138pt}{1.01451pt}}
\pgfpathcurveto{\pgfqpoint{-.21198pt}{1.01451pt}}{\pgfqpoint{-.1638pt}{.94509pt}}{\pgfqpoint{-.1638pt}{.8595pt}}
\pgfpathcurveto{\pgfqpoint{-.1638pt}{.77388pt}}{\pgfqpoint{-.21198pt}{.70446pt}}{\pgfqpoint{-.27138pt}{.70446pt}}
@@ -210,21 +210,21 @@
\pgfpathcurveto{\pgfqpoint{.0453pt}{.66699pt}}{\pgfqpoint{.02019pt}{.70602pt}}{\pgfqpoint{.0264pt}{.74874pt}}
\pgfpathcurveto{\pgfqpoint{.03261pt}{.79149pt}}{\pgfqpoint{.0678pt}{.82176pt}}{\pgfqpoint{.10497pt}{.81636pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.24054pt}{.70842pt}}
\pgfpathcurveto{\pgfqpoint{.27513pt}{.70842pt}}{\pgfqpoint{.30318pt}{.67686pt}}{\pgfqpoint{.30318pt}{.63795pt}}
\pgfpathcurveto{\pgfqpoint{.30318pt}{.59904pt}}{\pgfqpoint{.27513pt}{.56751pt}}{\pgfqpoint{.24054pt}{.56751pt}}
\pgfpathcurveto{\pgfqpoint{.20598pt}{.56751pt}}{\pgfqpoint{.17793pt}{.59904pt}}{\pgfqpoint{.17793pt}{.63795pt}}
\pgfpathcurveto{\pgfqpoint{.17793pt}{.67686pt}}{\pgfqpoint{.20598pt}{.70842pt}}{\pgfqpoint{.24054pt}{.70842pt}}
\pgfpathclose
- %
+ %
\pgfpathmoveto{\pgfqpoint{.35973pt}{.57501pt}}
\pgfpathcurveto{\pgfqpoint{.3918pt}{.57501pt}}{\pgfqpoint{.41781pt}{.54852pt}}{\pgfqpoint{.41781pt}{.51585pt}}
\pgfpathcurveto{\pgfqpoint{.41781pt}{.48318pt}}{\pgfqpoint{.3918pt}{.45669pt}}{\pgfqpoint{.35973pt}{.45669pt}}
\pgfpathcurveto{\pgfqpoint{.32769pt}{.45669pt}}{\pgfqpoint{.30168pt}{.48318pt}}{\pgfqpoint{.30168pt}{.51585pt}}
\pgfpathcurveto{\pgfqpoint{.30168pt}{.54852pt}}{\pgfqpoint{.32769pt}{.57501pt}}{\pgfqpoint{.35973pt}{.57501pt}}
\pgfpathclose
-}
+}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.fractals.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.fractals.code.tex
index 22c9d8d1b27..2327c770295 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.fractals.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.fractals.code.tex
@@ -7,12 +7,12 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
\pgfdeclaredecoration{Koch curve type 1}{init}
-{
+{%
\state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
{
\pgfpathlineto{\pgfpoint{.33333\pgfdecoratedinputsegmentremainingdistance}{0pt}}
@@ -20,11 +20,11 @@
\pgfpathlineto{\pgfpoint{.66666\pgfdecoratedinputsegmentremainingdistance}{.33333\pgfdecoratedinputsegmentremainingdistance}}
\pgfpathlineto{\pgfpoint{.66666\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
- }
-}
+ }%
+}%
\pgfdeclaredecoration{Koch curve type 2}{init}
-{
+{%
\state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
{
\pgfpathlineto{\pgfpoint{.25\pgfdecoratedinputsegmentremainingdistance}{0pt}}
@@ -35,31 +35,31 @@
\pgfpathlineto{\pgfpoint{.75\pgfdecoratedinputsegmentremainingdistance}{-.25\pgfdecoratedinputsegmentremainingdistance}}
\pgfpathlineto{\pgfpoint{.75\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
- }
-}
+ }%
+}%
\pgfdeclaredecoration{Koch snowflake}{init}
-{
+{%
\state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
{
\pgfpathlineto{\pgfpoint{.3333\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathlineto{\pgfpoint{.5\pgfdecoratedinputsegmentremainingdistance}{0.2886751347\pgfdecoratedinputsegmentremainingdistance}}
\pgfpathlineto{\pgfpoint{.6666\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
- }
-}
+ }%
+}%
\pgfdeclaredecoration{Cantor set}{init}
-{
+{%
\state{init}[width=\pgfdecoratedinputsegmentremainingdistance]
{
\pgfpathlineto{\pgfpoint{.3333\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathmoveto{\pgfpoint{.6666\pgfdecoratedinputsegmentremainingdistance}{0pt}}
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
- }
-}
+ }%
+}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex
index 546301c4d07..6a17dbe3c0a 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
% A marking decoration is used to add markings (which are just pgf
@@ -16,37 +16,37 @@
\pgfkeys{
/pgf/decoration/reset marks/.code=\let\pgf@lib@dec@mark@marks\pgfutil@empty,
/pgf/decoration/mark/.code=\pgf@lib@dec@parsemark#1\pgf@lib@dec@stop,
-}
+}%
\let\pgf@lib@dec@mark@marks=\pgfutil@empty
-\def\pgf@lib@dec@parsemark{\pgfutil@ifnextchar b{\pgf@lib@dec@parsebetween}{\pgf@lib@dec@parseat}}
+\def\pgf@lib@dec@parsemark{\pgfutil@ifnextchar b{\pgf@lib@dec@parsebetween}{\pgf@lib@dec@parseat}}%
\def\pgf@lib@dec@parseat at position#1with#2\pgf@lib@dec@stop{%
\expandafter\def\expandafter\pgf@lib@dec@mark@marks\expandafter{\pgf@lib@dec@mark@marks%
\pgf@lib@dec@domark{#1}{#2}%
}%
-}
+}%
\def\pgf@lib@dec@parsebetween between positions#1and#2step#3with#4\pgf@lib@dec@stop{%
\expandafter\def\expandafter\pgf@lib@dec@mark@marks\expandafter{\pgf@lib@dec@mark@marks%
\pgf@lib@dec@dobetweenmark{#1}{#2}{#3}{#4}%
}%
-}
+}%
\def\pgf@lib@dec@arrowhead#1#2{%
\pgftransformxscale{#1}
\pgfarrowdraw{#2}%
-}
+}%
\def\pgf@lib@dec@doarrowhead#1{%
\pgf@lib@dec@arrowhead{1}{#1}%
-}
+}%
\def\pgf@lib@dec@doarrowheadrev#1{%
\pgf@lib@dec@arrowhead{-1}{#1}%
-}
+}%
\pgfdeclaredecoration{markings}{init}
-{
+{%
\state{init}
[
width=0pt,
@@ -56,8 +56,8 @@
},
next state=pre
]
- {}
-
+ {}%
+
\state{pre}
[
width=0pt,
@@ -69,11 +69,11 @@
},
next state=skipper
]
- {}
+ {}%
\state{skipper}[width=\pgf@lib@dec@computed@width-\pgfdecoratedcompleteddistance-1sp,
- next state=\pgf@lib@dec@next@state]{}
-
+ next state=\pgf@lib@dec@next@state]{}%
+
\state{main}
[
width=1sp,
@@ -104,15 +104,15 @@
\else%
\pgfpathlineto{\pgfpointdecoratedpathlast}
\fi%
- }
-}
+ }%
+}%
\def\pgf@lib@dec@domark#1#2#3\pgf@lib@dec@mark@last{%
\def\pgf@lib@dec@mark@marks{#3}%
\pgf@lib@dec@parsenum{#1}%
\def\pgf@lib@dec@computed@action{#2}%
\def\pgf@lib@dec@next@state{main}%
-}
+}%
\def\pgf@lib@dec@dobetweenmark#1#2#3#4#5\pgf@lib@dec@mark@last{%
@@ -124,7 +124,7 @@
% Skip!
#5\pgf@lib@dec@mark@last%
\else%
- %
+ %
\pgf@lib@dec@parsenum{#3}%
\pgfmathparse{\pgf@lib@dec@mark@start+\pgf@lib@dec@computed@width}%
% Update entry in mark list
@@ -134,7 +134,7 @@
\def\pgf@lib@dec@computed@action{#4}%
\def\pgf@lib@dec@next@state{main}%
\fi%
-}
+}%
\def\pgf@lib@dec@parsenum#1{%
@@ -145,28 +145,28 @@
\else%
\pgfmathparse{\pgfmathresult pt}%
\fi%
- \else%
+ \else%
\ifdim\pgfmathresult pt<0pt\relax%
\pgfmathparse{\pgfdecoratedpathlength\pgfmathresult*\pgfdecoratedpathlength}%
\else%
\pgfmathparse{\pgfmathresult*\pgfdecoratedpathlength}%
\fi%
\fi%
- \edef\pgf@lib@dec@computed@width{\pgfmathresult pt}%
-}
+ \edef\pgf@lib@dec@computed@width{\pgfmathresult pt}%
+}%
\def\pgf@lib@dec@mark@last{%
\def\pgf@lib@dec@next@state{final}%
-}
+}%
%
% If you set the mark connection node inside a mark picture, the
-% output path will contain a line to this node
+% output path will contain a line to this node
%
\pgfkeys{/pgf/decoration/mark connection node/.store in=\pgf@lib@mark@node,
- /pgf/decoration/mark connection node=}
+ /pgf/decoration/mark connection node=}%
\def\pgf@lib@mark@connect@node{%
% Line to "left" end of the node
\pgfpathlineto{\pgfpointshapeborder{\pgf@lib@mark@node}{\pgfqpoint{-1pt}{0pt}}}
@@ -175,4 +175,4 @@
}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathmorphing.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathmorphing.code.tex
index a6052489796..3f628da582d 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathmorphing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathmorphing.code.tex
@@ -7,12 +7,12 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
%
% These decorations "morph" paths. That means that the
-% orginal characteristic of the path is kept and the number of
+% original characteristic of the path is kept and the number of
% subpaths remains the same -- only, the lines are slightly offset or
% changed by the decoration. For instance a line might be turned into
% a squiggly line or a snaking line or a bumping line.
@@ -28,31 +28,31 @@
% zigzag decoration.
%
-\pgfdeclaredecoration{zigzag}{up from center}{
+\pgfdeclaredecoration{zigzag}{up from center}{%
\state{up from center}[width=+.5\pgfdecorationsegmentlength, next state=big down]
{
\pgfpathlineto{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{big down}[switch if less than=+.5\pgfdecorationsegmentlength to center finish,
width=+.5\pgfdecorationsegmentlength,
next state=big up]
{
\pgfpathlineto{\pgfqpoint{.25\pgfdecorationsegmentlength}{-\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{big up}[switch if less than=+.5\pgfdecorationsegmentlength to center finish,
width=+.5\pgfdecorationsegmentlength,
next state=big down]
{
\pgfpathlineto{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{center finish}[width=0pt, next state=final]{
\pgfpathlineto{\pgfpointorigin}
- }
+ }%
\state{final}
{
\pgfpathlineto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -62,17 +62,17 @@
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
\pgfdeclaredecoration{saw}{initial}
-{
+{%
\state{initial}[auto end on length=+\pgfdecorationsegmentlength,
auto corner on length=+\pgfdecorationsegmentlength,
width=+\pgfdecorationsegmentlength]
{
\pgfpathlineto{\pgfqpoint{\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
\pgfpathlineto{\pgfqpoint{\pgfdecorationsegmentlength}{0pt}}
- }
+ }%
\state{final}
- {}
-}
+ {}%
+}%
@@ -84,10 +84,10 @@
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
\pgfdeclaredecoration{random steps}{start}
-{
- \state{start}[width=+0pt,next state=step,persistent precomputation=\pgfdecoratepathhascornerstrue]{}
+{%
+ \state{start}[width=+0pt,next state=step,persistent precomputation=\pgfdecoratepathhascornerstrue]{}%
\state{step}[auto end on length=1.5\pgfdecorationsegmentlength,
- auto corner on length=1.5\pgfdecorationsegmentlength,
+ auto corner on length=1.5\pgfdecorationsegmentlength,
width=+\pgfdecorationsegmentlength]
{
\pgfpathlineto{
@@ -95,29 +95,29 @@
{\pgfpoint{\pgfdecorationsegmentlength}{0pt}}
{\pgfpoint{rand*\pgfdecorationsegmentamplitude}{rand*\pgfdecorationsegmentamplitude}}
}
- }
+ }%
\state{final}
- {}
-}
+ {}%
+}%
% Meta-decoration line zigzag
-\pgfdeclaremetadecoration{straight zigzag}{line to}{
+\pgfdeclaremetadecoration{straight zigzag}{line to}{%
\state{line to}[width=\pgfmetadecorationsegmentlength, next state=zigzag]
{
\decoration{curveto}
- }
+ }%
\state{zigzag}[width=\pgfmetadecorationsegmentlength, next state=line to]
{
\decoration{zigzag}
- }
+ }%
\state{final}
{
\decoration{curveto}
- }
-}
+ }%
+}%
@@ -138,7 +138,7 @@
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentaspect
\pgfdeclaredecoration{bent}{bent}
-{
+{%
\state{bent}[width=+\pgfdecoratedinputsegmentremainingdistance]
{
\pgfpathcurveto
@@ -146,44 +146,44 @@
{\pgfpointadd{\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
{\pgfqpoint{-\pgfdecorationsegmentaspect\pgfdecoratedinputsegmentremainingdistance}{\pgfdecorationsegmentamplitude}}}
{\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
- }
+ }%
\state{final}
- {}
-}
+ {}%
+}%
% decoration snake
%
-% This decoration produces a hopefully optically pleasing squiggly snake.
+% This decoration produces a hopefully optically pleasing squiggly snake.
%
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
\pgfdeclaredecoration{snake}{initial}
-{
+{%
\state{initial}[switch if less than=+.625\pgfdecorationsegmentlength to final,
width=+.3125\pgfdecorationsegmentlength,
next state=down]
- {
+ {
\pgfpathcurveto
{\pgfqpoint{.125\pgfdecorationsegmentlength}{0pt}}
{\pgfqpoint{.1875\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
{\pgfqpoint{.3125\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{down}[switch if less than=+.8125\pgfdecorationsegmentlength to end down,
width=+.5\pgfdecorationsegmentlength,
next state=up]
{
\pgfpathcosine{\pgfqpoint{.25\pgfdecorationsegmentlength}{-1\pgfdecorationsegmentamplitude}}
\pgfpathsine{\pgfqpoint{.25\pgfdecorationsegmentlength}{-1\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{up}[switch if less than=+.8125\pgfdecorationsegmentlength to end up,
width=+.5\pgfdecorationsegmentlength,
next state=down]
{
\pgfpathcosine{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
\pgfpathsine{\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{end down}[width=+.3125\pgfdecorationsegmentlength,
next state=final]
{
@@ -191,7 +191,7 @@
{\pgfqpoint{.125\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
{\pgfqpoint{.1875\pgfdecorationsegmentlength}{0pt}}
{\pgfqpoint{.3125\pgfdecorationsegmentlength}{0pt}}
- }
+ }%
\state{end up}[width=+.3125\pgfdecorationsegmentlength,
next state=final]
{
@@ -199,12 +199,12 @@
{\pgfqpoint{.125\pgfdecorationsegmentlength}{-\pgfdecorationsegmentamplitude}}
{\pgfqpoint{.1875\pgfdecorationsegmentlength}{0pt}}
{\pgfqpoint{.3125\pgfdecorationsegmentlength}{0pt}}
- }
+ }%
\state{final}
{
\pgfpathlineto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
% coil decoration
@@ -212,7 +212,7 @@
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength,
\pgfdeclaredecoration{coil}{coil}
-{
+{%
\state{coil}[switch if less than=%
1.5\pgfdecorationsegmentlength+%
\pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude+%
@@ -235,7 +235,7 @@
{\pgfpoint@oncoil{0.445}{-1 }{10}}
{\pgfpoint@oncoil{0 }{-0.555}{11}}
{\pgfpoint@oncoil{0 }{ 0 }{12}}
- }
+ }%
\state{last}[width=.5\pgfdecorationsegmentlength+%
\pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude+%
\pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude,next state=final]
@@ -248,12 +248,12 @@
{\pgfpoint@oncoil{1.555}{ 1 }{4}}
{\pgfpoint@oncoil{2 }{ 0.555}{5}}
{\pgfpoint@oncoil{2 }{ 0 }{6}}
- }
+ }%
\state{final}
{
\pgfpathlineto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
\def\pgfpoint@oncoil#1#2#3{%
\pgf@x=#1\pgfdecorationsegmentamplitude%
@@ -261,7 +261,7 @@
\pgf@y=#2\pgfdecorationsegmentamplitude%
\pgf@xa=0.083333333333\pgfdecorationsegmentlength%
\advance\pgf@x by#3\pgf@xa%
-}
+}%
% bumps decoration
@@ -269,7 +269,7 @@
% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength
\pgfdeclaredecoration{bumps}{initial}
-{
+{%
\state{initial}[auto end on length=+.51\pgfdecorationsegmentlength,
auto corner on length=+.51\pgfdecorationsegmentlength,
width=+.5\pgfdecorationsegmentlength]
@@ -282,18 +282,13 @@
{\pgfqpoint{.38875\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}}
{\pgfqpoint{.5\pgfdecorationsegmentlength}{.5\pgfdecorationsegmentamplitude}}
{\pgfqpoint{.5\pgfdecorationsegmentlength}{0\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{final}
{
\pgfpathlineto{\pgfpointdecoratedpathlast}
- }
-}
-
-
-
-
-
+ }%
+}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex
index e618ac996cf..10f8371c470 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
%
@@ -34,19 +34,19 @@
% Parameters: \pgfdecorationsegmentlength, \pgfdecorationsegmentamplitude
\pgfdeclaredecoration{ticks}{ticks}
-{
+{%
\state{ticks}[width=+\pgfdecorationsegmentlength]
{
\pgfpathmoveto{\pgfqpoint{0pt}{\pgfdecorationsegmentamplitude}}
\pgfpathlineto{\pgfqpoint{0pt}{-\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{final}
{
\pgfpathmoveto{\pgfqpoint{0pt}{\pgfdecorationsegmentamplitude}}
\pgfpathlineto{\pgfqpoint{0pt}{-\pgfdecorationsegmentamplitude}}
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -55,9 +55,9 @@
% Parameters: \pgfdecorationsegmentangle, \pgfdecorationsegmentlength
\pgfdeclaredecoration{expanding waves}{initial}
-{
+{%
\state{initial}[width=+\pgfdecorationsegmentlength,next state=wave]
- {}
+ {}%
\state{wave}[switch if less than=+\pgfdecorationsegmentlength to last,
width=+\pgfdecorationsegmentlength]
@@ -67,7 +67,7 @@
{\pgfqpoint{-\pgfdecoratedcompleteddistance}{0pt}}%
{\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}}}%
\pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}%
- }
+ }%
\state{last}[width=+0pt,next state=final]
{
\pgfpathmoveto{
@@ -75,19 +75,19 @@
{\pgfqpoint{-\pgfdecoratedcompleteddistance}{0pt}}%
{\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}}}%
\pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}%
- }
+ }%
\state{final}
{
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
% waves decoration
\pgfdeclaredecoration{waves}{wave}
-{
+{%
\state{wave}[width=\pgfdecorationsegmentlength]
{
\pgftransformxshift{+\pgfdecorationsegmentlength}
@@ -96,12 +96,12 @@
{\pgfqpoint{-\pgfkeysvalueof{/pgf/decoration/start radius}}{0pt}}%
{\pgfpointpolar{\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}}}%
\pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{\pgfkeysvalueof{/pgf/decoration/start radius}}%
- }
+ }%
\state{final}
{
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -110,23 +110,23 @@
% Parameters: \pgfdecorationsegmentlength, \pgfdecorationsegmentamplitude, \pgfdecorationsegmentangle
\pgfdeclaredecoration{border}{tick}
-{
+{%
\state{tick}[switch if less than=+\pgfdecorationsegmentlength to last,
width=+\pgfdecorationsegmentlength]
{
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{last}[width=+\pgfdecorationsegmentamplitude,next state=final]
{
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecorationsegmentamplitude}}
- }
+ }%
\state{final}
{
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -138,78 +138,91 @@
% Parameters: \pgfdecorationsegmentamplitude
\pgfdeclaredecoration{brace}{brace}
-{
+{%
\state{brace}[width=+\pgfdecoratedremainingdistance,next state=final]
{
+ \pgf@yc=\pgfdecorationsegmentaspect\pgfdecoratedremainingdistance
+ \ifdim2\pgfdecorationsegmentamplitude>\pgf@yc
+ \pgf@yc=0.5\pgf@yc
+ \else
+ \pgf@yc=\pgfdecorationsegmentamplitude
+ \fi
+ \pgf@xc=\pgfdecorationsegmentaspect\pgfdecoratedremainingdistance
+ \advance\pgf@xc-\pgfdecoratedremainingdistance
+ \ifdim-2\pgfdecorationsegmentamplitude<\pgf@xc
+ \pgf@xc=-0.5\pgf@xc
+ \else
+ \pgf@xc=\pgfdecorationsegmentamplitude
+ \fi
\pgfpathmoveto{\pgfpointorigin}
\pgfpathcurveto
- {\pgfqpoint{.15\pgfdecorationsegmentamplitude}{.3\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.15\pgf@yc}{.3\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.5\pgf@yc}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{\pgf@yc}{.5\pgfdecorationsegmentamplitude}}
{
\pgftransformxshift{+\pgfdecorationsegmentaspect\pgfdecoratedremainingdistance}
- \pgfpathlineto{\pgfqpoint{-\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ \pgfpathlineto{\pgfqpoint{-\pgf@yc}{.5\pgfdecorationsegmentamplitude}}
\pgfpathcurveto
- {\pgfqpoint{-.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{-.15\pgfdecorationsegmentamplitude}{.7\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{0\pgfdecorationsegmentamplitude}{1\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{-.5\pgf@yc}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{-.15\pgf@yc}{.7\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{0\pgf@yc}{1\pgfdecorationsegmentamplitude}}
\pgfpathcurveto
- {\pgfqpoint{.15\pgfdecorationsegmentamplitude}{.7\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.15\pgf@xc}{.7\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{.5\pgf@xc}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{\pgf@xc}{.5\pgfdecorationsegmentamplitude}}
}
{
\pgftransformxshift{+\pgfdecoratedremainingdistance}
- \pgfpathlineto{\pgfqpoint{-\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
+ \pgfpathlineto{\pgfqpoint{-\pgf@xc}{.5\pgfdecorationsegmentamplitude}}
\pgfpathcurveto
- {\pgfqpoint{-.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}}
- {\pgfqpoint{-.15\pgfdecorationsegmentamplitude}{.3\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{-.5\pgf@xc}{.5\pgfdecorationsegmentamplitude}}
+ {\pgfqpoint{-.15\pgf@xc}{.3\pgfdecorationsegmentamplitude}}
{\pgfqpoint{0pt}{0pt}}
}
- }
+ }%
\state{final}
- {}
-}
+ {}%
+}%
% show path construction decoration
%
-\pgfdeclaredecoration{show path construction}{check for moveto}{
- \state{check for moveto}[width=0pt, next state=segment,
- persistent precomputation={%
- \begingroup%
- \pgf@lib@decoraions@installinputsegmentpoints%
- \ifx\pgfdecorationpreviousinputsegment\pgfdecorationinputsegmentmoveto%
- \pgfdecoratedinputsegmentmovetocode%
- \fi%
- \endgroup%
- }]{}
- \state{segment}[width=\pgfdecoratedinputsegmentremainingdistance, next state=check for moveto,
- persistent precomputation={%
- \begingroup%
- \pgf@lib@decoraions@installinputsegmentpoints%
- \csname pgfdecoratedinputsegment\pgfdecorationcurrentinputsegment code\endcsname%
- \endgroup%
- }]{}
- \state{final}{%
- \egroup%
- \begingroup%
- \pgf@lib@decoraions@installinputsegmentpoints%
- \csname pgfdecoratedinputsegment\pgfdecorationcurrentinputsegment code\endcsname%
- \endgroup%
- \bgroup%
- }
-}
+\pgfdeclaredecoration{show path construction}{check for moveto}{%
+ \state{check for moveto}[width=0pt, next state=segment,
+ persistent precomputation={%
+ \begingroup%
+ \pgf@lib@decoraions@installinputsegmentpoints%
+ \ifx\pgfdecorationpreviousinputsegment\pgfdecorationinputsegmentmoveto%
+ \pgfdecoratedinputsegmentmovetocode%
+ \fi%
+ \endgroup%
+ }]{}%
+ \state{segment}[width=\pgfdecoratedinputsegmentremainingdistance, next state=check for moveto,
+ persistent precomputation={%
+ \begingroup%
+ \pgf@lib@decoraions@installinputsegmentpoints%
+ \csname pgfdecoratedinputsegment\pgfdecorationcurrentinputsegment code\endcsname%
+ \endgroup%
+ }]{}%
+ \state{final}{%
+ \egroup%
+ \begingroup%
+ \pgf@lib@decoraions@installinputsegmentpoints%
+ \csname pgfdecoratedinputsegment\pgfdecorationcurrentinputsegment code\endcsname%
+ \endgroup%
+ \bgroup%
+ }%
+}%
\pgfkeys{
- /pgf/decoration/.cd,
- moveto code/.code=\def\pgfdecoratedinputsegmentmovetocode{#1},
- lineto code/.code=\def\pgfdecoratedinputsegmentlinetocode{#1},
- curveto code/.code=\def\pgfdecoratedinputsegmentcurvetocode{#1},
- closepath code/.code=\def\pgfdecoratedinputsegmentclosepathcode{#1}
-}
+ /pgf/decoration/.cd,
+ moveto code/.code=\def\pgfdecoratedinputsegmentmovetocode{#1},
+ lineto code/.code=\def\pgfdecoratedinputsegmentlinetocode{#1},
+ curveto code/.code=\def\pgfdecoratedinputsegmentcurvetocode{#1},
+ closepath code/.code=\def\pgfdecoratedinputsegmentclosepathcode{#1}
+}%
\let\pgfdecoratedinputsegmentmovetocode\pgfutil@empty%
\let\pgfdecoratedinputsegmentlinetocode\pgfutil@empty%
@@ -217,11 +230,11 @@
\let\pgfdecoratedinputsegmentclosepathcode\pgfutil@empty%
\def\pgf@lib@decoraions@installinputsegmentpoints{%
- \let\pgfpointdecoratedinputsegmentfirst\pgf@decorate@inputsegment@first%
- \let\pgfpointdecoratedinputsegmentlast\pgf@decorate@inputsegment@last%
- \let\pgfpointdecoratedinputsegmentsupporta\pgf@decorate@inputsegment@supporta%
- \let\pgfpointdecoratedinputsegmentsupportb\pgf@decorate@inputsegment@supportb%
-}
+ \let\pgfpointdecoratedinputsegmentfirst\pgf@decorate@inputsegment@first%
+ \let\pgfpointdecoratedinputsegmentlast\pgf@decorate@inputsegment@last%
+ \let\pgfpointdecoratedinputsegmentsupporta\pgf@decorate@inputsegment@supporta%
+ \let\pgfpointdecoratedinputsegmentsupportb\pgf@decorate@inputsegment@supportb%
+}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.shapes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.shapes.code.tex
index 8cf75a739bd..6b1571518b6 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.shapes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.shapes.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
% Options for shape decorations
@@ -44,9 +44,9 @@
shape start height=#1,
shape end height=#1
}
-}
+}%
-\def\pgf@lib@shapedecoration@sep{.25cm, between centers}
+\def\pgf@lib@shapedecoration@sep{.25cm, between centers}%
\newif\ifpgfshapedecorationsloped
\pgfshapedecorationslopedtrue
\newif\ifpgfshapedecorationscaled
@@ -57,13 +57,13 @@
% triangle decoration
\pgfdeclaredecoration{triangles}{init}
-{
+{%
\state{init}[width=+0pt,next state=triangle,persistent precomputation={
\pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start width}}
\edef\pgf@lib@dec@ssw{\pgfmathresult pt}
\pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start height}/2}
\edef\pgf@lib@dec@ssh{\pgfmathresult pt}
- }]{}
+ }]{}%
\state{triangle}[switch if less than=+\pgfdecorationsegmentlength to last,
width=+\pgfdecorationsegmentlength]
{
@@ -71,7 +71,7 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{0pt}}
\pgfpathlineto{\pgfqpoint{0pt}{-\pgf@lib@dec@ssh}}
\pgfpathclose
- }
+ }%
\state{last}[switch if less than=\pgf@lib@dec@ssw to skip,
width=\pgfdecoratedremainingdistance,next state=final]
{
@@ -79,14 +79,14 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{0pt}}
\pgfpathlineto{\pgfqpoint{0pt}{-\pgf@lib@dec@ssh}}
\pgfpathclose
- }
+ }%
\state{skip}[width=\pgfdecoratedremainingdistance]
- {}
+ {}%
\state{final}
{
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -94,13 +94,13 @@
% crosses decoration
\pgfdeclaredecoration{crosses}{init}
-{
+{%
\state{init}[width=+0pt,next state=crosses,persistent precomputation={
\pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start width}/2}
\edef\pgf@lib@dec@ssw{\pgfmathresult pt}
\pgfmathparse{\pgfkeysvalueof{/pgf/decoration/shape start height}/2}
\edef\pgf@lib@dec@ssh{\pgfmathresult pt}
- }]{}
+ }]{}%
\state{crosses}[switch if less than=+\pgfdecorationsegmentlength to last,
width=+\pgfdecorationsegmentlength]
{
@@ -108,18 +108,18 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
\pgfpathmoveto{\pgfqpoint{-\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{\pgf@lib@dec@ssh}}
- }
+ }%
\state{last}[width=+\pgfdecoratedremainingdistance]
{
\pgfpathmoveto{\pgfqpoint{-\pgf@lib@dec@ssw}{\pgf@lib@dec@ssh}}
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
\pgfpathmoveto{\pgfqpoint{-\pgf@lib@dec@ssw}{-\pgf@lib@dec@ssh}}
\pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{\pgf@lib@dec@ssh}}
- }
+ }%
\state{final}{
\pgfpathmoveto{\pgfpointdecoratedpathlast}
- }
-}
+ }%
+}%
@@ -128,14 +128,14 @@
% The shape background decoration
%
-% The shape background decoration adds repeated instances of
+% The shape background decoration adds repeated instances of
% the background path of a specified shape along the path. The shape
% must have been declared by \pgfdeclareshape. If a shape has
% specialized keys (e.g. the number of points on a star, or the apex
-% angle the isosceles triangle), these can be specified in the usual manner.
+% angle the isosceles triangle), these can be specified in the usual manner.
%
-% The sepatation between shapes in the path can be specified and can
-% be between the center of the shape or the border of the shape.
+% The separation between shapes in the path can be specified and can
+% be between the center of the shape or the border of the shape.
%
% The height and width of the shape can be independently or
% simultaneously scaled (linearly) along the path. It is also
@@ -148,52 +148,52 @@
\edef\pgf@lib@shapedecoration@initialise{0pt}%
\pgfdeclaredecoration{shape backgrounds}{initialise}
-{
+{%
\state{initialise}
[
width=+\pgf@lib@shapedecoration@initialise,
next state=shape,
persistent precomputation=
{
- %
+ %
% \egroup ends the group started by the automaton before executing
- % a decoration state. This prevents the need for (most) \global variables.
- %
- %
+ % a decoration state. This prevents the need for (most) \global variables.
+ %
+ %
% Check the shape exists.
- %
+ %
\pgfutil@ifundefined{pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}}{%
\pgferror{I do not know the shape `\pgfkeysvalueof{/pgf/decoration/shape}',
- so I cannot use it in a decoration. Check if its library been loaded or if you
+ so I cannot use it in a decoration. Check if its library been loaded or if you
simply mistyped the name}}{}%
- %
+ %
% Calculate a `default' path size.
- %
+ %
\pgfinterruptpath%
\pgfinterruptboundingbox%
\pgftransformreset%
\pgf@relevantforpicturesizetrue%
- %
+ %
% This size of this shape is unimportant, but it should
% be just large/small enough to avoid huge errors when
- % calculting the scaling factors later on.
- %
+ % calculating the scaling factors later on.
+ %
\pgfkeys{/pgf/inner sep=50pt, /pgf/minimum size=1pt}% Arbitrary lengths.
\setbox\pgfnodeparttextbox\hbox{}% Assume shape does nothing special if box is empty.
- \let\pgf@sh@savedmacros\pgfutil@empty%
+ \let\pgf@sh@savedmacros\pgfutil@empty%
\let\pgf@sh@savedpoints\pgfutil@empty%
\csname pgf@sh@s@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname%
\pgf@sh@savedpoints%
\pgf@sh@savedmacros%
- %
- % Save the macros and pionts.
- %
+ %
+ % Save the macros and points.
+ %
\expandafter\gdef\expandafter\pgf@lib@shapedecoration@points\expandafter{\pgf@sh@savedpoints}%
\expandafter\gdef\expandafter\pgf@lib@shapedecoration@macros\expandafter{\pgf@sh@savedmacros}%
- \csname pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname%
- %
+ \csname pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname%
+ %
% Save the dimensions of the shape path.
- %
+ %
\pgf@x\pgf@picmaxx%
\pgf@y\pgf@picmaxy%
\advance\pgf@x-\pgf@picminx%
@@ -204,52 +204,52 @@
}%
\endpgfinterruptboundingbox%
\endpgfinterruptpath%
- %
+ %
\edef\pgf@lib@shapedecoration@beforeshape{0pt}%
\edef\pgf@lib@shapedecoration@aftershape{0pt}%
- %
+ %
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/decoration/shape start width}}%
\edef\pgf@lib@shapedecoration@startwidth{\the\pgf@x}%
\edef\pgf@lib@shapedecoration@width{\the\pgf@x}%
\pgf@x-\pgf@x%
\pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/decoration/shape end width}}%
\edef\pgf@lib@shapedecoration@widthchange{\the\pgf@x}%
- %
+ %
\pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/decoration/shape start height}}%
\edef\pgf@lib@shapedecoration@initialheight{\the\pgf@y}%
\edef\pgf@lib@shapedecoration@height{\the\pgf@y}%
\pgf@y-\pgf@y%
\pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/decoration/shape end height}}%
\edef\pgf@lib@shapedecoration@heightchange{\the\pgf@y}%
- %
+ %
% Calculate the sep.
- %
+ %
\ifx\pgf@lib@shapedecoration@spread\pgfutil@empty%
- %
+ %
% Not spreading, so easy:
- %
+ %
\def\pgf@lib@shapedecoration@borderstext{between borders}%
\afterassignment\pgf@lib@shapedecoration@setkeyword%
\expandafter\pgf@x\pgf@lib@shapedecoration@sep,\pgf@stop%
\edef\pgf@lib@shapedecoration@sep{\the\pgf@x}%
\else%
- %
+ %
% Spreading (a bit of a nuiscence actually).
- %
+ %
\def\pgf@lib@shapedecoration@borderstext{by borders}%
\afterassignment\pgf@lib@shapedecoration@setkeyword%
\expandafter\c@pgf@counta\pgf@lib@shapedecoration@spread,\pgf@stop%
\ifpgf@lib@shapedecoration@betweenborders%
- %
+ %
% Ok. The required sep between borders is:
- %
+ %
% (r -(n-1)((a+b)/2))/(n-1)
- %
+ %
% r = decoration length (here, the remaining distance)
% a = initial width
% b = end width
% n = the number of shapes
- %
+ %
\ifnum\c@pgf@counta>1\relax%
\advance\c@pgf@counta-1\relax%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/decoration/shape start width}}%
@@ -263,11 +263,11 @@
\advance\pgf@x\pgfdecoratedremainingdistance%
\divide\pgf@x\c@pgf@counta%
\pgf@x.9999\pgf@x% Hackery to control some native TeX inaccuracies.
- %
+ %
% Unfortunately if the shape is scaled, and evenly spread by borders,
- % it is necessary to do something a bit different to control for
+ % it is necessary to do something a bit different to control for
% (most) inaccuracies.
- %
+ %
\ifpgfshapedecorationscaled%
\pgf@xa\pgf@lib@shapedecoration@widthchange\relax%
\divide\pgf@xa\c@pgf@counta%
@@ -285,9 +285,9 @@
\fi%
\fi%
\else%
- %
+ %
% Between centers.
- %
+ %
\pgf@x\pgfdecoratedremainingdistance%
\ifnum\c@pgf@counta>1\relax%
\advance\c@pgf@counta-1\relax%
@@ -305,7 +305,7 @@
\edef\pgf@lib@shapedecoration@sep{\the\pgf@x}%
\fi%
}]
- {}
+ {}%
\state{before shape}
[
width=\pgf@lib@shapedecoration@beforeshape-1sp,
@@ -315,50 +315,50 @@
\ifpgfshapedecorationscaled%
\ifpgf@lib@shapedecoration@betweenborders%
\ifx\pgf@lib@shapedecoration@spread\pgfutil@empty%
- %
+ %
% Not so straightforward. The required ratio is given by
- %
+ %
% R = (c+W/2)/(c+r-.5*w)
- %
+ %
% c = completed distance
% r = remaining distance
% W = initial width
% w = the change in width (i.e., end - start)
- %
+ %
\pgf@x\pgfdecoratedcompleteddistance%
\advance\pgf@x\pgfdecoratedremainingdistance%
\pgf@xa\pgf@lib@shapedecoration@startwidth\relax%
\pgf@xa.5\pgf@xa%
\advance\pgf@xa\pgfdecoratedcompleteddistance% c+W/2
- %
+ %
\pgf@xb\pgf@lib@shapedecoration@widthchange\relax%
\pgf@xb-.5\pgf@xb%
\advance\pgf@xb\pgf@x% c+r-.5*w
- %
+ %
\pgfmathdivide@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@xb}}%
\fi%
\else%
- %
- % Easy peasy. The required ratio is
- %
+ %
+ % Easy peasy. The required ratio is
+ %
% R = c / (c+r)
- %
+ %
\pgf@y\pgfdecoratedcompleteddistance%
\advance\pgf@y\pgfdecoratedremainingdistance%
\pgfmathdivide@{\pgfmath@tonumber{\pgfdecoratedcompleteddistance}}{\pgfmath@tonumber{\pgf@y}}%
\fi%
- %
+ %
% Get the new width.
- %
+ %
\ifx\pgf@lib@shapedecoration@spread\pgfutil@empty%
\pgf@x\pgf@lib@shapedecoration@widthchange\relax%
\pgf@x\pgfmathresult\pgf@x%
\advance\pgf@x\pgf@lib@shapedecoration@startwidth\relax%
\else%
\ifpgf@lib@shapedecoration@betweenborders%
- %
- % Specical case when decoration is scaled, and evenly spread by borders.
- %
+ %
+ % Special case when decoration is scaled, and evenly spread by borders.
+ %
\pgf@x\pgf@lib@shapedecoration@width\relax%
\advance\pgf@x\pgf@lib@shapedecoration@specialwidth\relax%
\pgf@xa\pgf@x%
@@ -372,15 +372,15 @@
\fi%
\fi%
\edef\pgf@lib@shapedecoration@width{\the\pgf@x}%
- %
+ %
% New height = R*h + H
- %
+ %
\pgf@y\pgf@lib@shapedecoration@heightchange\relax%
\pgf@y\pgfmathresult\pgf@y%
\advance\pgf@y\pgf@lib@shapedecoration@initialheight\relax%
\edef\pgf@lib@shapedecoration@height{\the\pgf@y}%
\fi%
- %
+ %
\ifpgf@lib@shapedecoration@betweenborders%
\pgf@x\pgf@lib@shapedecoration@width\relax%
\pgf@x.5\pgf@x%
@@ -389,16 +389,16 @@
\def\pgf@lib@shapedecoration@beforeshape{0pt}%
\fi%
}]
- {}
+ {}%
\state{shape}[width=+0sp,next state=after shape]
{
\ifpgfshapedecorationsloped%
\else%
\pgftransformrotate{-\pgfdecoratedangle}%
\fi%
- %
+ %
% Scale the path when it is actually drawn.
- %
+ %
\pgf@lib@shapedecoration@shapepathsize%
\pgfutil@tempdima\pgf@x%
\pgfutil@tempdimb\pgf@y%
@@ -406,14 +406,14 @@
\pgf@xb\pgfutil@tempdima%
\pgfmathdivide@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@xb}}%
\expandafter\pgftransformxscale\expandafter{\pgfmathresult}%
- %
+ %
\pgf@ya\pgf@lib@shapedecoration@height\relax%
\pgf@yb\pgfutil@tempdimb%
\pgfmathdivide@{\pgfmath@tonumber{\pgf@ya}}{\pgfmath@tonumber{\pgf@yb}}%
\expandafter\pgftransformyscale\expandafter{\pgfmathresult}%
- %
+ %
% Move to the center anchor.
- %
+ %
\pgf@lib@shapedecoration@points%
\pgf@lib@shapedecoration@macros%
\pgftransformshift{%
@@ -421,11 +421,11 @@
\pgf@x-\pgf@x%
\pgf@y-\pgf@y%
}%
- %
+ %
% And draw the shape path.
- %
+ %
\csname pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname%
- }
+ }%
\state{after shape}
[
width=\pgf@lib@shapedecoration@aftershape-1sp,
@@ -441,28 +441,28 @@
\fi%
}
]
- {}
+ {}%
\state{sep}[width=\pgf@lib@shapedecoration@sep,next state=before shape,
persistent precomputation=\def\pgf@lib@shapedecoration@beforeshape{0pt}]
- {}
+ {}%
\state{final}
{
\pgfpathmoveto{\pgfpointdecoratedpathlast}%
- }
-}
+ }%
+}%
\def\pgf@lib@shapedecoration@setkeyword,{%
\pgfutil@ifnextchar\pgf@stop{\def\pgf@temp{}\pgf@lib@@@shapedecoration@setkeyword}{\pgf@lib@@shapedecoration@setkeyword}%
-}
-\def\pgf@lib@@shapedecoration@setkeyword#1,{\def\pgf@temp{#1}\pgf@lib@@@shapedecoration@setkeyword}
+}%
+\def\pgf@lib@@shapedecoration@setkeyword#1,{\def\pgf@temp{#1}\pgf@lib@@@shapedecoration@setkeyword}%
\def\pgf@lib@@@shapedecoration@setkeyword\pgf@stop{%
\ifx\pgf@temp\pgf@lib@shapedecoration@borderstext%
\pgf@lib@shapedecoration@betweenborderstrue%
\else%
\pgf@lib@shapedecoration@betweenbordersfalse%
\fi%
-}
+}%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.text.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.text.code.tex
index b13f3ce0199..4d31c46fcfc 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.text.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.text.code.tex
@@ -7,138 +7,141 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgfmodule{decorations}
+\usepgfmodule{decorations}%
% Options for text decorations
\pgfkeys{
- /pgf/decoration/.cd,
- text/.store in=\pgfdecorationtext,%
- text color/.store in=\pgf@lib@decorationtextcolor,%
- text format delimiters/.code={\expandafter\pgfsetdecoratetextformatdelimiters#1},
- text align/.code={\pgfkeys{/pgf/decoration/text align/.cd,#1}},
- text align/.cd,
- align/.initial=left,
- left/.style={/pgf/decoration/text align/align=left},
- right/.style={/pgf/decoration/text align/align=right},
- center/.style={/pgf/decoration/text align/align=center},
- left indent/.initial=0pt,
- right indent/.initial=0pt,
- fit to path/.is if=pgf@lib@dec@text@fit,
- fit to path stretching spaces/.default=true,
- fit to path stretching spaces/.code={%
- \csname pgf@lib@dec@text@fit#1\endcsname%
- \csname pgf@lib@dec@text@stretch@spaces#1\endcsname%
- }%
-}
+ /pgf/decoration/.cd,
+ text/.store in=\pgfdecorationtext,%
+ text color/.store in=\pgf@lib@decorationtextcolor,%
+ text format delimiters/.code={\expandafter\pgfsetdecoratetextformatdelimiters#1},
+ text align/.code={\pgfkeys{/pgf/decoration/text align/.cd,#1}},
+ text align/.cd,
+ align/.initial=left,
+ left/.style={/pgf/decoration/text align/align=left},
+ right/.style={/pgf/decoration/text align/align=right},
+ center/.style={/pgf/decoration/text align/align=center},
+ left indent/.initial=0pt,
+ right indent/.initial=0pt,
+ fit to path/.is if=pgf@lib@dec@text@fit,
+ fit to path stretching spaces/.default=true,
+ fit to path stretching spaces/.code={%
+ \csname pgf@lib@dec@text@fit#1\endcsname%
+ \csname pgf@lib@dec@text@stretch@spaces#1\endcsname%
+ }%
+}%
\newif\ifpgf@lib@dec@text@scan@space
\newif\ifpgf@lib@dec@text@stretch@spaces
\newif\ifpgf@lib@dec@text@fit
-\def\pgf@lib@decorationtextcolor{black}
+\def\pgf@lib@decorationtextcolor{black}%
-\def\pgf@lib@dec@text@left@text{left}
-\def\pgf@lib@dec@text@right@text{right}
-\def\pgf@lib@dec@text@right@center{center}
+\def\pgf@lib@dec@text@left@text{left}%
+\def\pgf@lib@dec@text@right@text{right}%
+\def\pgf@lib@dec@text@right@center{center}%
% Decorates a path with a text. The path is removed during this
% process
-\pgfdeclaredecoration{text along path}{initial}{
-\state{initial}[width=+0pt, next state=left indent,
- persistent precomputation={%
- \edef\pgf@lib@dec@text@indent@left{\pgfkeysvalueof{/pgf/decoration/text align/left indent}}%
- \edef\pgf@lib@dec@text@indent@right{\pgfkeysvalueof{/pgf/decoration/text align/right indent}}%
- \edef\pgf@lib@dec@text@align{\pgfkeysvalueof{/pgf/decoration/text align/align}}%
- \pgfdecoratedremainingdistance=\pgfdecoratedpathlength%
- \advance\pgfdecoratedremainingdistance by-\pgf@lib@dec@text@indent@right\relax%
- \edef\pgfdecoratedpathlength{\the\pgfdecoratedremainingdistance}%
- \pgf@lib@dec@text@getwidth%
- \pgf@x=\pgf@lib@dec@text@width\relax%
- \pgf@y=\pgfdecoratedremainingdistance%
- \ifpgf@lib@dec@text@fit%
- \advance\pgf@y by-\pgf@lib@dec@text@indent@left\relax%
- \advance\pgf@y by-\pgf@x%
- \ifpgf@lib@dec@text@stretch@spaces%
- \def\pgf@lib@dec@text@character@shift{0pt}%
- \divide\pgf@y by\pgf@lib@dec@space@count\relax%
- \edef\pgf@lib@dec@text@space@shift{\the\pgf@y}%
- \else%
- \c@pgf@counta=\pgf@lib@dec@character@count\relax%
- \advance\c@pgf@counta by-1\relax%
- \divide\pgf@y by\c@pgf@counta\relax%
- \edef\pgf@lib@dec@text@character@shift{\the\pgf@y}%
- \def\pgf@lib@dec@text@space@shift{0pt}%
- \fi%
- \ifdim\pgf@y<0pt\relax%
- \pgf@lib@dec@text@fitfalse%
- \pgf@lib@dec@text@stretch@spacesfalse%
- \def\pgf@lib@dec@text@character@shift{0pt}%
- \def\pgf@lib@dec@text@space@shift{0pt}%
- \fi%
- \else%
- \def\pgf@lib@dec@text@character@shift{0pt}%
- \def\pgf@lib@dec@text@space@shift{0pt}%
- \ifx\pgf@lib@dec@text@align\pgf@lib@dec@text@left@text%
- \else%
- \ifx\pgf@lib@dec@text@align\pgf@lib@dec@text@right@text%
- \advance\pgf@y by-\pgf@x%
- \edef\pgf@lib@dec@text@indent@left{\the\pgf@y}%
- \else%
- \advance\pgf@y by-\pgf@x%
- \advance\pgf@y by-\pgf@lib@dec@text@indent@left\relax%
- \pgf@y=0.5\pgf@y%
- \advance\pgf@y by\pgf@lib@dec@text@indent@left\relax%
- \edef\pgf@lib@dec@text@indent@left{\the\pgf@y}%
- \fi%
- \fi%
- \fi%
- \let\pgfdecorationrestoftext=\pgfdecorationtext%
- }]{}
-\state{left indent}[width=+\pgf@lib@dec@text@indent@left, next state=scan]{}
+\pgfdeclaredecoration{text along path}{initial}{%
+ \state{initial}[
+ width=+0pt, next state=left indent,
+ persistent precomputation={%
+ \edef\pgf@lib@dec@text@indent@left{\pgfkeysvalueof{/pgf/decoration/text align/left indent}}%
+ \edef\pgf@lib@dec@text@indent@right{\pgfkeysvalueof{/pgf/decoration/text align/right indent}}%
+ \edef\pgf@lib@dec@text@align{\pgfkeysvalueof{/pgf/decoration/text align/align}}%
+ \pgfdecoratedremainingdistance=\pgfdecoratedpathlength%
+ \advance\pgfdecoratedremainingdistance by-\pgf@lib@dec@text@indent@right\relax%
+ \edef\pgfdecoratedpathlength{\the\pgfdecoratedremainingdistance}%
+ \pgf@lib@dec@text@getwidth%
+ \pgf@x=\pgf@lib@dec@text@width\relax%
+ \pgf@y=\pgfdecoratedremainingdistance%
+ \ifpgf@lib@dec@text@fit%
+ \advance\pgf@y by-\pgf@lib@dec@text@indent@left\relax%
+ \advance\pgf@y by-\pgf@x%
+ \ifpgf@lib@dec@text@stretch@spaces%
+ \def\pgf@lib@dec@text@character@shift{0pt}%
+ \divide\pgf@y by\pgf@lib@dec@space@count\relax%
+ \edef\pgf@lib@dec@text@space@shift{\the\pgf@y}%
+ \else%
+ \c@pgf@counta=\pgf@lib@dec@character@count\relax%
+ \advance\c@pgf@counta by-1\relax%
+ \divide\pgf@y by\c@pgf@counta\relax%
+ \edef\pgf@lib@dec@text@character@shift{\the\pgf@y}%
+ \def\pgf@lib@dec@text@space@shift{0pt}%
+ \fi%
+ \ifdim\pgf@y<0pt\relax%
+ \pgf@lib@dec@text@fitfalse%
+ \pgf@lib@dec@text@stretch@spacesfalse%
+ \def\pgf@lib@dec@text@character@shift{0pt}%
+ \def\pgf@lib@dec@text@space@shift{0pt}%
+ \fi%
+ \else%
+ \def\pgf@lib@dec@text@character@shift{0pt}%
+ \def\pgf@lib@dec@text@space@shift{0pt}%
+ \ifx\pgf@lib@dec@text@align\pgf@lib@dec@text@left@text%
+ \else%
+ \ifx\pgf@lib@dec@text@align\pgf@lib@dec@text@right@text%
+ \advance\pgf@y by-\pgf@x%
+ \edef\pgf@lib@dec@text@indent@left{\the\pgf@y}%
+ \else%
+ \advance\pgf@y by-\pgf@x%
+ \advance\pgf@y by-\pgf@lib@dec@text@indent@left\relax%
+ \pgf@y=0.5\pgf@y%
+ \advance\pgf@y by\pgf@lib@dec@text@indent@left\relax%
+ \edef\pgf@lib@dec@text@indent@left{\the\pgf@y}%
+ \fi%
+ \fi%
+ \fi%
+ \let\pgfdecorationrestoftext=\pgfdecorationtext%
+ }]{}%
+\state{left indent}[width=+\pgf@lib@dec@text@indent@left, next state=scan]{}%
%
-\state{scan}[width=+0pt, next state=before typeset,
- persistent precomputation={
- \pgf@lib@dec@text@scanchar%
- \ifvoid\pgf@lib@dec@text@box%
- \setbox\pgf@lib@dec@text@box\hbox{}%
- \wd\pgf@lib@dec@text@box16383pt\relax%
- \fi%
- }]{}
+\state{scan}[
+ width=+0pt,
+ next state=before typeset,
+ persistent precomputation={
+ \pgf@lib@dec@text@scanchar%
+ \ifvoid\pgf@lib@dec@text@box%
+ \setbox\pgf@lib@dec@text@box\hbox{}%
+ \wd\pgf@lib@dec@text@box16383pt\relax%
+ \fi%
+}]{}%
%
-\state{before typeset}[width=+.5\wd\pgf@lib@dec@text@box, next state=typeset]{}
+\state{before typeset}[width=+.5\wd\pgf@lib@dec@text@box, next state=typeset]{}%
%
\state{typeset}[width=+0pt, next state=after typeset]
{%
\pgftransformxshift{+-.5\wd\pgf@lib@dec@text@box}%
\setbox\pgf@hbox\hbox{\copy\pgf@lib@dec@text@box}%
\pgfqboxsynced\pgf@hbox%
-}
+}%
\state{after typeset}[width=+.5\wd\pgf@lib@dec@text@box, next state=shift,
- persistent precomputation={%
- \ifpgf@lib@dec@text@fit%
- \ifpgf@lib@dec@text@stretch@spaces%
- \ifpgf@lib@dec@text@scan@space%
- \let\pgf@lib@dec@text@shift=\pgf@lib@dec@text@space@shift%
- \else%
- \def\pgf@lib@dec@text@shift{0pt}%
- \fi%
- \else%
- \let\pgf@lib@dec@text@shift=\pgf@lib@dec@text@character@shift%
- \fi%
- \else%
- \def\pgf@lib@dec@text@shift{0pt}%
- \fi%
- }]{}
-\state{shift}[width=+\pgf@lib@dec@text@shift, next state=scan]{}
-\state{final}{}
-}
+ persistent precomputation={%
+ \ifpgf@lib@dec@text@fit%
+ \ifpgf@lib@dec@text@stretch@spaces%
+ \ifpgf@lib@dec@text@scan@space%
+ \let\pgf@lib@dec@text@shift=\pgf@lib@dec@text@space@shift%
+ \else%
+ \def\pgf@lib@dec@text@shift{0pt}%
+ \fi%
+ \else%
+ \let\pgf@lib@dec@text@shift=\pgf@lib@dec@text@character@shift%
+ \fi%
+ \else%
+ \def\pgf@lib@dec@text@shift{0pt}%
+ \fi%
+ }]{}%
+\state{shift}[width=+\pgf@lib@dec@text@shift, next state=scan]{}%
+\state{final}{}%
+}%
% \pgfsetdecoratetextformatdelimiters
-%
+%
% Set the delimiters for formatting in the text decoration.
% NB: Catcodes for delimiters should be 11 or 12.
%
@@ -153,18 +156,18 @@
% \def\pgfdecoratetext{The [\it]very[+\color{green}]green[] sprouts.}
%
\def\pgfsetdecoratetextformatdelimiters#1#2{%
- \def\pgf@lib@dec@text@formatchar{#1}%
- \def\pgf@test{#2}%
- \ifx\pgf@test\pgfutil@empty%
- \def\pgf@lib@dec@text@collectformat##1#1{%
- \pgf@lib@dec@text@@collectformat##1\pgf@stop}%
- \else%
- \def\pgf@lib@dec@text@collectformat##1#2{%
- \pgf@lib@dec@text@@collectformat##1\pgf@stop}%
- \fi%
-}
-
-\pgfsetdecoratetextformatdelimiters{|}{}
+ \def\pgf@lib@dec@text@formatchar{#1}%
+ \def\pgf@test{#2}%
+ \ifx\pgf@test\pgfutil@empty%
+ \def\pgf@lib@dec@text@collectformat##1#1{%
+ \pgf@lib@dec@text@@collectformat##1\pgf@stop}%
+ \else%
+ \def\pgf@lib@dec@text@collectformat##1#2{%
+ \pgf@lib@dec@text@@collectformat##1\pgf@stop}%
+ \fi%
+}%
+
+\pgfsetdecoratetextformatdelimiters{|}{}%
\newbox\pgf@lib@dec@text@box
\newif\ifpgf@lib@decorate@textmathmode
@@ -174,174 +177,181 @@
\let\pgf@lib@dec@text@format=\pgfutil@empty
\def\pgf@lib@dec@text@scanchar{%
- \pgf@lib@dec@text@scan@spacefalse%
- \ifx\pgfdecorationrestoftext\pgfutil@empty%
- \let\pgf@lib@dec@text@char\pgfutil@empty%
- \setbox\pgf@lib@dec@text@box\box\pgfutil@voidb@x%
- \let\pgf@next\relax%
- \else%
- \let\pgf@next\pgf@lib@dec@text@@scanchar%
- \fi%
- \pgf@next}
-
+ \pgf@lib@dec@text@scan@spacefalse%
+ \ifx\pgfdecorationrestoftext\pgfutil@empty%
+ \let\pgf@lib@dec@text@char\pgfutil@empty%
+ \setbox\pgf@lib@dec@text@box\box\pgfutil@voidb@x%
+ \let\pgf@next\relax%
+ \else\ifx\pgfdecorationrestoftext\pgf@lib@dec@mathshift%
+ \ifpgf@lib@decorate@textmathmode%
+ \pgf@lib@decorate@textmathmodefalse%
+ \fi%
+ \let\pgf@lib@dec@text@char\pgfutil@empty%
+ \setbox\pgf@lib@dec@text@box\box\pgfutil@voidb@x%
+ \let\pgf@next\relax%
+ \else
+ \let\pgf@next\pgf@lib@dec@text@@scanchar%
+ \fi\fi%
+ \pgf@next}%
+
\def\pgf@lib@dec@text@@scanchar{%
- \expandafter\pgf@lib@dec@text@@@scanchar\pgfdecorationrestoftext\pgf@stop}
+ \expandafter\pgf@lib@dec@text@@@scanchar\pgfdecorationrestoftext\pgf@stop}%
\def\pgf@lib@dec@text@@@scanchar{%
- \futurelet\pgf@lib@dec@lettoken%
- \pgf@lib@dec@text@@@@scanchar}
-
+ \futurelet\pgf@lib@dec@lettoken%
+ \pgf@lib@dec@text@@@@scanchar}%
+
\def\pgf@lib@dec@text@@@@scanchar{%
- \ifx\pgf@lib@dec@lettoken\pgfutil@sptoken%
- \let\pgf@next\pgf@lib@dec@text@insertspace%
- \else%
- \let\pgf@next\pgf@lib@dec@text@@@@@scanchar%
- \fi%
- \pgf@next}
+ \ifx\pgf@lib@dec@lettoken\pgfutil@sptoken%
+ \let\pgf@next\pgf@lib@dec@text@insertspace%
+ \else%
+ \let\pgf@next\pgf@lib@dec@text@@@@@scanchar%
+ \fi%
+ \pgf@next}%
\def\pgf@lib@dec@text@@@@@scanchar{%
- \pgfutil@ifnextchar\bgroup{\pgf@lib@dec@text@collectgroup}%
- {\pgf@lib@dec@text@@@@@@scanchar}}
-
+ \pgfutil@ifnextchar\bgroup{\pgf@lib@dec@text@collectgroup}%
+ {\pgf@lib@dec@text@@@@@@scanchar}}%
+
\def\pgf@lib@dec@text@collectgroup#1{%
- \def\pgf@lib@dec@text@char{#1}%
- \pgf@lib@dec@text@collectrestoftext}
-
+ \def\pgf@lib@dec@text@char{#1}%
+ \pgf@lib@dec@text@collectrestoftext}%
+
\def\pgf@lib@dec@text@@@@@@scanchar#1{%
- \ifx#1\pgf@stop%
- \pgf@lib@dec@text@box\box\pgfutil@voidb@x%
- \let\pgf@next\pgf@lib@dec@text@endoftext%
- \else%
- \def\pgf@lib@dec@text@char{#1}%
- \ifx#1\space%
- \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
- \else%
- \ifx#1\ %
- \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
- \else%
- \ifx\pgf@lib@dec@text@char\pgf@lib@dec@text@formatchar%
- \let\pgf@next\pgf@lib@dec@text@collectformat%
- \else%
- \expandafter\ifcat\noexpand#1\relax%
- \let\pgf@next\pgf@lib@dec@text@expandcs%
- \else%
- \ifnum\catcode`#1=3\relax%
- \ifpgf@lib@decorate@textmathmode%
- \pgf@lib@decorate@textmathmodefalse%
- \else%
- \pgf@lib@decorate@textmathmodetrue%
- \fi%
- \let\pgf@next\pgf@lib@dec@text@@@scanchar%
- \else%
- \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \pgf@next%
-}
+ \ifx#1\pgf@stop%
+ \pgf@lib@dec@text@box\box\pgfutil@voidb@x%
+ \let\pgf@next\pgf@lib@dec@text@endoftext%
+ \else%
+ \def\pgf@lib@dec@text@char{#1}%
+ \ifx#1\space%
+ \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
+ \else%
+ \ifx#1\ %
+ \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
+ \else%
+ \ifx\pgf@lib@dec@text@char\pgf@lib@dec@text@formatchar%
+ \let\pgf@next\pgf@lib@dec@text@collectformat%
+ \else%
+ \expandafter\ifcat\noexpand#1\relax%
+ \let\pgf@next\pgf@lib@dec@text@expandcs%
+ \else%
+ \ifnum\catcode`#1=3\relax%
+ \ifpgf@lib@decorate@textmathmode%
+ \pgf@lib@decorate@textmathmodefalse%
+ \else%
+ \pgf@lib@decorate@textmathmodetrue%
+ \fi%
+ \let\pgf@next\pgf@lib@dec@text@@@scanchar%
+ \else%
+ \let\pgf@next\pgf@lib@dec@text@collectrestoftext%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \pgf@next%
+}%
\def\pgf@lib@dec@text@@collectformat{%
- \pgfutil@ifnextchar+{\pgf@lib@dec@text@addtoformat}{\pgf@lib@dec@text@setformat}}
-
+ \pgfutil@ifnextchar+{\pgf@lib@dec@text@addtoformat}{\pgf@lib@dec@text@setformat}}%
+
\def\pgf@lib@dec@text@setformat#1\pgf@stop{%
- \def\pgf@lib@dec@text@format{#1}%
- \pgf@lib@dec@text@@@scanchar%
-}
+ \def\pgf@lib@dec@text@format{#1}%
+ \pgf@lib@dec@text@@@scanchar%
+}%
\def\pgf@lib@dec@text@addtoformat+#1\pgf@stop{%
- \expandafter\def\expandafter\pgf@lib@dec@text@format\expandafter{\pgf@lib@dec@text@format#1}%
- \pgf@lib@dec@text@@@scanchar%
-}
+ \expandafter\def\expandafter\pgf@lib@dec@text@format\expandafter{\pgf@lib@dec@text@format#1}%
+ \pgf@lib@dec@text@@@scanchar%
+}%
\def\pgf@lib@dec@text@insertspace{%
- \pgf@lib@dec@text@scan@spacetrue%
- \pgfutil@ifnextchar\bgroup{\pgf@lib@dec@text@@insertspacegrp}%
- {\pgf@lib@dec@text@@insertspace}}
-
+ \pgf@lib@dec@text@scan@spacetrue%
+ \pgfutil@ifnextchar\bgroup{\pgf@lib@dec@text@@insertspacegrp}%
+ {\pgf@lib@dec@text@@insertspace}}%
+
\def\pgf@lib@dec@text@@insertspacegrp#1{%
- \pgf@lib@dec@text@@@@@@scanchar\space{#1}}
-
+ \pgf@lib@dec@text@@@@@@scanchar\space{#1}}%
+
\def\pgf@lib@dec@text@@insertspace#1{%
- \pgf@lib@dec@text@@@@@@scanchar\space#1}
-
+ \pgf@lib@dec@text@@@@@@scanchar\space#1}%
+
\def\pgf@lib@dec@text@expandcs{%
- \expandafter\expandafter\expandafter\pgf@lib@dec@text@@@@@scanchar%
- \pgf@lib@dec@text@char}
+ \expandafter\expandafter\expandafter\pgf@lib@dec@text@@@@@scanchar%
+ \pgf@lib@dec@text@char}%
\def\pgf@lib@dec@text@endoftext{%
- \let\pgfdecoraterestoftext\pgfutil@empty%
- \let\pgf@lib@dec@text@char\pgfutil@empty%
-}
+ \let\pgfdecorationrestoftext\pgfutil@empty%
+ \let\pgf@lib@dec@text@char\pgfutil@empty%
+}%
\def\pgf@lib@dec@text@collectrestoftext{%
- \pgf@lib@dec@text@dobox%
- \futurelet\pgf@lib@dec@text@lettoken%
- \pgf@lib@dec@text@@collectrestoftext}
+ \pgf@lib@dec@text@dobox%
+ \futurelet\pgf@lib@dec@text@lettoken%
+ \pgf@lib@dec@text@@collectrestoftext}%
\def\pgf@lib@dec@text@@collectrestoftext{%
- \ifx\bgroup\pgf@lib@dec@text@lettoken%
- \let\pgf@next\pgf@lib@dec@text@@@collectrestoftextgrp%
- \else%
- \let\pgf@next\pgf@lib@dec@text@@@collectrestoftext%
- \fi%
- \pgf@next}
-
+ \ifx\bgroup\pgf@lib@dec@text@lettoken%
+ \let\pgf@next\pgf@lib@dec@text@@@collectrestoftextgrp%
+ \else%
+ \let\pgf@next\pgf@lib@dec@text@@@collectrestoftext%
+ \fi%
+ \pgf@next}%
+
\def\pgf@lib@dec@text@@@collectrestoftextgrp#1#2\pgf@stop{\def\pgfdecorationrestoftext{{#1}#2}%
-}
+}%
-\def\pgf@lib@dec@text@@@collectrestoftext#1\pgf@stop{\def\pgfdecorationrestoftext{#1}}
+\def\pgf@lib@dec@text@@@collectrestoftext#1\pgf@stop{\def\pgfdecorationrestoftext{#1}}%
{%
- \catcode`\$3 %
- \gdef\pgf@lib@dec@mathshift{$}%
- \catcode`\$9 $% For editors with annoying syntax highlighting.
+ \catcode`\$3 %
+ \gdef\pgf@lib@dec@mathshift{$}%
+ \catcode`\$9 $% For editors with annoying syntax highlighting.
}%
\def\pgf@lib@dec@text@dobox{%
- \setbox\pgf@lib@dec@text@box\hbox{%
- \pgfinterruptpicture%
- \begingroup%
- \pgfsetcolor{\pgf@lib@decorationtextcolor}%
- \ifpgf@lib@decorate@textmathmode\pgf@lib@dec@mathshift\fi%
- \pgf@lib@dec@text@format\relax%
- \pgf@lib@dec@text@char%
- \ifpgf@lib@decorate@textmathmode\pgf@lib@dec@mathshift\fi%
- \endgroup%
- \endpgfinterruptpicture%
- }%
-}
+ \setbox\pgf@lib@dec@text@box\hbox{%
+ \pgfinterruptpicture%
+ \begingroup%
+ \pgfsetcolor{\pgf@lib@decorationtextcolor}%
+ \ifpgf@lib@decorate@textmathmode\pgf@lib@dec@mathshift\fi%
+ \pgf@lib@dec@text@format\relax%
+ \pgf@lib@dec@text@char%
+ \ifpgf@lib@decorate@textmathmode\pgf@lib@dec@mathshift\fi%
+ \endgroup%
+ \endpgfinterruptpicture%
+ }%
+}%
\def\pgf@lib@dec@text@getwidth{%
- \begingroup%
- \let\c@pgf@lib@dec@characters=\c@pgf@counta%
- \let\c@pgf@lib@dec@spaces=\c@pgf@countb%
- \let\pgfdecorationrestoftext=\pgfdecorationtext%
- \c@pgf@lib@dec@spaces=0\relax%
- \c@pgf@lib@dec@characters=0\relax%
- \pgfmathloop%
- \pgf@lib@dec@text@scanchar%
- \ifvoid\pgf@lib@dec@text@box%
- \else%
- \setbox\pgf@hbox=\hbox{{%
- \unhbox\pgf@hbox%
- \unhbox\pgf@lib@dec@text@box%
- }}%
- \advance\c@pgf@lib@dec@characters by1\relax%
- \ifpgf@lib@dec@text@scan@space%
- \advance\c@pgf@lib@dec@spaces by1\relax%
- \fi%
- \repeatpgfmathloop%
- \global\pgf@x=\the\wd\pgf@hbox%
- \xdef\pgf@lib@dec@temp{\the\c@pgf@lib@dec@characters}%
- \xdef\pgf@lib@dec@@temp{\the\c@pgf@lib@dec@spaces}%
- \endgroup%
- \edef\pgf@lib@dec@text@width{\the\pgf@x}%
- \let\pgf@lib@dec@character@count=\pgf@lib@dec@temp%
- \let\pgf@lib@dec@space@count=\pgf@lib@dec@@temp%
-}
-
-
-
-\endinput \ No newline at end of file
+ \begingroup%
+ \let\c@pgf@lib@dec@characters=\c@pgf@counta%
+ \let\c@pgf@lib@dec@spaces=\c@pgf@countb%
+ \let\pgfdecorationrestoftext=\pgfdecorationtext%
+ \c@pgf@lib@dec@spaces=0\relax%
+ \c@pgf@lib@dec@characters=0\relax%
+ \pgfmathloop%
+ \pgf@lib@dec@text@scanchar%
+ \ifvoid\pgf@lib@dec@text@box%
+ \else%
+ \setbox\pgf@hbox=\hbox{{%
+ \unhbox\pgf@hbox%
+ \unhbox\pgf@lib@dec@text@box%
+ }}%
+ \advance\c@pgf@lib@dec@characters by1\relax%
+ \ifpgf@lib@dec@text@scan@space%
+ \advance\c@pgf@lib@dec@spaces by1\relax%
+ \fi%
+ \repeatpgfmathloop%
+ \global\pgf@x=\the\wd\pgf@hbox%
+ \xdef\pgf@lib@dec@temp{\the\c@pgf@lib@dec@characters}%
+ \xdef\pgf@lib@dec@@temp{\the\c@pgf@lib@dec@spaces}%
+ \endgroup%
+ \edef\pgf@lib@dec@text@width{\the\pgf@x}%
+ \let\pgf@lib@dec@character@count=\pgf@lib@dec@temp%
+ \let\pgf@lib@dec@space@count=\pgf@lib@dec@@temp%
+}%
+
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgf/luamath/functions.lua b/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgf/luamath/functions.lua
index 8fc963d8b9e..3eecaf99c0a 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgf/luamath/functions.lua
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgf/luamath/functions.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more details.
--
--- $Id: functions.lua,v 1.3 2015/05/10 20:34:13 cfeuersaenger Exp $
+-- $Id$
--
local pgfluamathfunctions = pgfluamathfunctions or {}
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgf/luamath/parser.lua b/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgf/luamath/parser.lua
index 55066b45aad..30eff2e6992 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgf/luamath/parser.lua
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgf/luamath/parser.lua
@@ -8,7 +8,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more details.
--
--- $Id: parser.lua,v 1.1 2014/12/27 14:11:49 cfeuersaenger Exp $
+-- $Id$
--
-- usage:
--
@@ -48,7 +48,7 @@ local integer_pattern = S("+-")^-1 * positive_integer_pattern
local positive_integer_or_decimal_pattern = positive_integer_pattern * ( P(".") * one_digit_pattern^0)^-1 +
(P(".") * one_digit_pattern^1)
local integer_or_decimal_pattern = S("+-")^-1 * positive_integer_or_decimal_pattern
-local fpu_pattern = R"15" * P"Y" * positive_integer_or_decimal_pattern * P"e" * P("-")^-1 * R("09")^1 * P"]"
+local fpu_pattern = R"05" * P"Y" * positive_integer_or_decimal_pattern * P"e" * S("+-")^-1 * R("09")^1 * P"]"
local unbounded_pattern = P"inf" + P"INF" + P"nan" + P"NaN" + P"Inf"
local number_pattern = C(unbounded_pattern + fpu_pattern + integer_or_decimal_pattern * (S"eE" * integer_pattern + C(tex_unit))^-1)
@@ -77,7 +77,8 @@ local comma_pattern = P(",") * space_pattern
----------------
local TermOp = C(S("+-")) * space_pattern
-local RelationalOp = C( P"==" + P"!=" + P"<=" + P">=" + P"<" + P">" ) * space_pattern
+local EqualityOp = C( P"==" + P"!=" ) * space_pattern
+local RelationalOp = C( P"<=" + P">=" + P"<" + P">" ) * space_pattern
local FactorOp = C(S("*/")) * space_pattern
-- Grammar
@@ -141,6 +142,9 @@ local prefix_operator_pattern = (prefix_operator * space_pattern * Cg(Prefix) )
-- apparently, we need to distinghuish between <expr> ! and <expr> != <expr2>:
local postfix_operator = C( S"r!" - P"!=" ) + C(P"^") * space_pattern * pow_exponent
+pgfluamathfunctions.functionMustBeEvaluatedInTeX = function()
+ error("The function in this context cannot be evaluated by LUA because it depends on TeX macros.")
+end
local ternary_eval = pgfluamathfunctions.ifthenelse
@@ -170,11 +174,18 @@ local function postfix_eval(prefix, op, arg)
return result
end
-local function relational_eval(v1, op, v2)
+local function equality_eval(v1, op, v2)
local fct
if (op == "==") then fct = pgfluamathfunctions.equal
elseif (op == "!=") then fct = pgfluamathfunctions.notequal
- elseif (op == "<") then fct = pgfluamathfunctions.less
+ else
+ error("This function must not be invoked for operator "..op)
+ end
+ return fct(v1,v2)
+end
+local function relational_eval(v1, op, v2)
+ local fct
+ if (op == "<") then fct = pgfluamathfunctions.less
elseif (op == ">") then fct = pgfluamathfunctions.greater
elseif (op == ">=") then fct = pgfluamathfunctions.notless
elseif (op == "<=") then fct = pgfluamathfunctions.notgreater
@@ -264,6 +275,7 @@ local initialRule = V"initial"
local Summand = V"Summand"
local Relational = V"Relational"
+local Equality = V"Equality"
local LogicalOr = V"LogicalOr"
local LogicalAnd = V"LogicalAnd"
@@ -299,11 +311,11 @@ local G = P{ "initialRule",
initialRule = space_pattern* Exp * -1;
-- ternary operator (or chained ternary operators):
-- FIXME : is this chaining a good idea!?
- Exp = Cf( Relational * Cg(P"?" * space_pattern * Relational * P":" *space_pattern * Relational )^0, ternary_eval) ;
- -- FIXME : do we really allow something like " 1 == 1 != 2" ? I would prefer (1==1) != 2 !?
- Relational = Cf(LogicalOr * Cg(RelationalOp * LogicalOr)^0, relational_eval);
+ Exp = Cf( LogicalOr * Cg(P"?" * space_pattern * LogicalOr * P":" *space_pattern * LogicalOr )^0, ternary_eval) ;
LogicalOr = Cf(LogicalAnd * (P"||" * space_pattern * LogicalAnd)^0, pgfluamathfunctions.orPGF);
- LogicalAnd = Cf(Summand * (P"&&" * space_pattern * Summand)^0, pgfluamathfunctions.andPGF);
+ LogicalAnd = Cf(Equality * (P"&&" * space_pattern * Equality)^0, pgfluamathfunctions.andPGF);
+ Equality = Cf(Relational * Cg(EqualityOp * Relational)^0, equality_eval);
+ Relational = Cf(Summand * Cg(RelationalOp * Summand)^0, relational_eval);
Summand = Cf(Term * Cg(TermOp * Term)^0, eval) ;
Term = Cf(Prefix * Cg(FactorOp * Prefix)^0, eval);
Prefix = prefix_operator_pattern + Postfix;
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgflibraryluamath.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgflibraryluamath.code.tex
index 1d7a5227dd6..c559a0cc1ba 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgflibraryluamath.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/luamath/pgflibraryluamath.code.tex
@@ -8,7 +8,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
%
-% $Id: pgflibraryluamath.code.tex,v 1.20 2015/06/05 06:23:21 cfeuersaenger Exp $
+% $Id$
%
%
% This is a library for a LUA math parser and LUA math operations.
@@ -76,49 +76,70 @@
% Patch some configuration macros such that the modifications are
% available in LUA as well:
\pgfkeys{
- /pgf/trig format/deg/.add code={}{\directlua{pgfluamathfunctions.setTrigFormat("deg")}\aftergroup\pgfmath@settrigformat},
- /pgf/trig format/rad/.add code={}{\directlua{pgfluamathfunctions.setTrigFormat("rad")}\aftergroup\pgfmath@settrigformat},
+ /pgf/trig format/deg/.add code={}{\directlua{pgfluamathfunctions.setTrigFormat("deg")}\aftergroup\pgfmath@settrigformat},
+ /pgf/trig format/rad/.add code={}{\directlua{pgfluamathfunctions.setTrigFormat("rad")}\aftergroup\pgfmath@settrigformat},
}
% ... and reactivate the key:
\pgfmathiftrigonometricusesdeg{%
- \pgfkeys{/pgf/trig format/deg}%
+ \pgfkeys{/pgf/trig format/deg}%
}{%
- \pgfkeys{/pgf/trig format/rad}%
+ \pgfkeys{/pgf/trig format/rad}%
}%
% re-activates the current trig format. This is important after a TeX
% group has been closed.
\def\pgfmath@settrigformat{%
- \pgfmathiftrigonometricusesdeg{%
- \directlua{pgfluamathfunctions.setTrigFormat("deg")}%
- }{%
- \directlua{pgfluamathfunctions.setTrigFormat("rad")}%
- }%
+ \pgfmathiftrigonometricusesdeg{%
+ \directlua{pgfluamathfunctions.setTrigFormat("deg")}%
+ }{%
+ \directlua{pgfluamathfunctions.setTrigFormat("rad")}%
+ }%
}%
\let\pgfmathsetseed@pgfbasic = \pgfmathsetseed
\def\pgfmathsetseed#1{%
- \pgfmathsetseed@pgfbasic{#1}%
- \directlua{pgfluamathfunctions.setRandomSeed(pgfluamathfunctions.tonumber("\pgfmathresult"))}%
+ \pgfmathsetseed@pgfbasic{#1}%
+ \directlua{pgfluamathfunctions.setRandomSeed(pgfluamathfunctions.tonumber("\pgfmathresult"))}%
}%
% Patch 'declare function' such that it communicates the function
% directly to LUA.
\let\pgfmathnotifynewdeclarefunction@orig=\pgfmathnotifynewdeclarefunction
\def\pgfmathnotifynewdeclarefunction#1#2#3{%
- \pgfmathnotifynewdeclarefunction@orig{#1}{#2}{#3}%
- \directlua{pgfluamathparser.pushLocalExpressionFunction(%
- "\pgfutil@luaescapestring{#1}",%
- #2,%
- "\pgfutil@luaescapestring{#3}")}%
- %
- % ensure that the local function is removed at the end of the
- % scope. To this end, we maintain a stack on the LUA side.
- \aftergroup\pgfluamathparse@pop@local@function
+ \pgfmathnotifynewdeclarefunction@orig{#1}{#2}{#3}%
+ %
+ % we have to check if '#3' contains control sequences.
+ % this is highly tricky as it may contain '#1'...
+ \begingroup
+ \toks0={#3}%
+ \xdef\pgf@marshal@glob{\the\toks0 }%
+ \endgroup
+ \pgfutil@command@to@string\pgf@marshal@glob\pgf@marshal
+ \expandafter\pgfutilifcontainsmacro\expandafter{\pgf@marshal}{%
+ \def\pgf@temp{1}%
+ }{%
+ \def\pgf@temp{0}%
+ }%
+ \if1\pgf@temp
+ % let lua produce an error when evaluating this function -- we cannot possibly expand the macro to its current state:
+ \directlua{pgfluamathparser.pushLocalExpressionFunction(%
+ "\pgfutil@luaescapestring{#1}",%
+ #2,%
+ "functionMustBeEvaluatedInTeX")}%
+ \else
+ \directlua{pgfluamathparser.pushLocalExpressionFunction(%
+ "\pgfutil@luaescapestring{#1}",%
+ #2,%
+ "\pgfutil@luaescapestring{#3}")}%
+ \fi
+ %
+ % ensure that the local function is removed at the end of the
+ % scope. To this end, we maintain a stack on the LUA side.
+ \aftergroup\pgfluamathparse@pop@local@function
}%
\def\pgfluamathparse@pop@local@function{%
- \directlua{pgfluamathparser.popLocalExpressionFunction()}%
+ \directlua{pgfluamathparser.popLocalExpressionFunction()}%
}%
% End of luatex stuff
@@ -147,7 +168,7 @@
% LUA (defined only in TeX)
% - some special cases which simply haven't been added to the LUA
% parser (yet).
-% At the time of this writing, this includes
+% At the time of this writing, this includes
% -- arrays created via '{}' and indexed with '[]'
% -- strings with "<str>"
% -- 'scalar' function
@@ -163,13 +184,13 @@
\pgfluamath@checkuninstallcmd%
\pgfluamath@install%
\pgfluamathcomputationactivetrue
- \fi}
+ \fi}%
\def\pgfluamath@makecomputationinactive{%
\ifpgfluamathcomputationactive
\pgfluamath@uninstall%
\pgfluamathcomputationactivefalse
- \fi}
+ \fi}%
\let\pgfluamath@pgfmathparse\pgfmathparse
\def\pgfluamath@makeparseractive{%
@@ -177,14 +198,18 @@
\else
\let\pgfluamath@pgfmathparse\pgfmathparse
\let\pgfmathparse\pgfluamathparse
+ \let\pgfmath@iftrue=\pgfmathluamath@iftrue
\pgfluamathparseractivetrue
- \fi}
+ \fi}%
+
+\let\pgfmath@iftrue@basic=\pgfmath@iftrue
\def\pgfluamath@makeparserinactive{%
\ifpgfluamathparseractive
\let\pgfmathparse\pgfluamath@pgfmathparse
+ \let\pgfmath@iftrue=\pgfmath@iftrue@basic
\pgfluamathparseractivefalse
- \fi}
+ \fi}%
\pgfqkeys{/pgf}{%
% Enable lua-side computation of \pgfmathresult
@@ -223,23 +248,23 @@
luamath library}%
\fi
},
- luamath/output format/.is choice,
- luamath/output format/fixed/.code= {\def\pgfluamath@outputformat@choice{0}},
- % returns results for use in the FPU
- luamath/output format/float/.code= {\def\pgfluamath@outputformat@choice{1}},
- luamath/output format/fixed,
- % this is merely useful for debugging purposes, I guess.
- luamath/show error message/.is if=pgfluamathshowerrormessage,
- luamath/enable TeX fallback/.is choice,
- luamath/enable TeX fallback/true/.code={\pgfluamathenableTeXfallbacktrue\pgfluamathshowerrormessagefalse},
- luamath/enable TeX fallback/false/.code={\pgfluamathenableTeXfallbackfalse\pgfluamathshowerrormessagetrue},
- luamath/enable TeX fallback/.default=true,
- luamath/enable TeX fallback=true,
-}
+ luamath/output format/.is choice,
+ luamath/output format/fixed/.code= {\def\pgfluamath@outputformat@choice{0}},
+ % returns results for use in the FPU
+ luamath/output format/float/.code= {\def\pgfluamath@outputformat@choice{1}},
+ luamath/output format/fixed,
+ % this is merely useful for debugging purposes, I guess.
+ luamath/show error message/.is if=pgfluamathshowerrormessage,
+ luamath/enable TeX fallback/.is choice,
+ luamath/enable TeX fallback/true/.code={\pgfluamathenableTeXfallbacktrue\pgfluamathshowerrormessagefalse},
+ luamath/enable TeX fallback/false/.code={\pgfluamathenableTeXfallbackfalse\pgfluamathshowerrormessagetrue},
+ luamath/enable TeX fallback/.default=true,
+ luamath/enable TeX fallback=true,
+}%
\def\pgfluamath@uninstall@appendcmd#1{%
\expandafter\gdef\expandafter\pgfluamath@uninstall\expandafter{%
- \pgfluamath@uninstall #1}}
+ \pgfluamath@uninstall #1}}%
% If the uninstall command is already assembled, it will skip the
% uninstall assemblation.
@@ -252,7 +277,7 @@
\def\pgfluamath@uninstall@appendcmd##1{}%
\def\pgfluamath@prepareuninstallcmd##1{}%
}%
-}
+}%
% This assembles an uninstall command globally ON FIRST USAGE.
% See \pgfmathfloat@plots@checkuninstallcmd
@@ -262,18 +287,19 @@
\expandafter\gdef\expandafter\pgfluamath@uninstall\expandafter{%
\pgfluamath@uninstall
\expandafter\let\expandafter#1\csname pgfluamath@backup@\string#1\endcsname}%
-}
+}%
\def\pgfluamath@install@function#1=#2{%
\pgfluamath@prepareuninstallcmd{#1}%
\let#1=#2%
-}
+}%
\def\pgfluamath@install{%
\pgfluamath@install@function\pgfmathadd@=\pgfluamathadd@%
\pgfluamath@install@function\pgfmathsubtract@=\pgfluamathsubtract@%
\pgfluamath@install@function\pgfmathneg@=\pgfluamathneg@%
\pgfluamath@install@function\pgfmathmultiply@=\pgfluamathmultiply@%
+ \pgfmathfloat@install\pgfmath@iftrue=\pgfmathluamath@iftrue%
\pgfluamath@install@function\pgfmathdivide@=\pgfluamathdivide@%
% \pgfluamath@install@function\pgfmathdiv@=\pgfluamathdiv@%
\pgfluamath@install@function\pgfmathfactorial@=\pgfluamathfactorial@%
@@ -349,87 +375,106 @@
% \pgfluamath@install@function@unimplemented{notequal}%
\pgfluamath@install@function\pgfmathreciprocal=\pgfluamathreciprocal%
\pgfluamath@install@function\pgfpointnormalised=\pgfluamathpointnormalised
-}
+}%
\def\pgfluamathgetresult#1{%
- \edef\pgfmathresult{\pgfutil@directlua{tex.print(-1,#1)}}}
+ \edef\pgfmathresult{\pgfutil@directlua{tex.print(-1,#1)}}}%
+
+\def\pgfmathluamath@iftrue{%
+ \if 0\pgfluamath@outputformat@choice
+ \let\pgfmathluamath@@iftrue@v=\pgfluamathone
+ \else
+ \let\pgfmathluamath@@iftrue@v=\pgfluamathfloatone
+ \fi
+ \pgfmathluamath@iftrue@
+}%
+\def\pgfluamathone{1.0}%
+\def\pgfluamathfloatone{1Y1.0e+00]}%
+\def\pgfmathluamath@iftrue@#1#2{%
+ \ifx\pgfmathresult\pgfmathluamath@@iftrue@v
+ \def\pgfmath@next{#1}%
+ \else
+ \def\pgfmath@next{#2}%
+ \fi
+ \pgfmath@next
+}%
\def\pgfluamathpi@{%
- \pgfluamathgetresult{pgfluamathfunctions.pi()}}
+ \pgfluamathgetresult{pgfluamathfunctions.pi()}}%
\def\pgfluamathe@{%
- \pgfluamathgetresult{pgfluamathfunctions.e()}}
+ \pgfluamathgetresult{pgfluamathfunctions.e()}}%
\def\pgfluamathadd@#1#2{%
- \pgfluamathgetresult{pgfluamathfunctions.add(#1,#2)}}
+ \pgfluamathgetresult{pgfluamathfunctions.add(#1,#2)}}%
\def\pgfluamathsubtract@#1#2{%
- \pgfluamathgetresult{pgfluamathfunctions.substract(#1,#2)}}
+ \pgfluamathgetresult{pgfluamathfunctions.substract(#1,#2)}}%
\def\pgfluamathneg@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.neg(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.neg(#1)}}%
\def\pgfluamathmultiply@#1#2{%
- \pgfluamathgetresult{pgfluamathfunctions.multiply(#1,#2)}}
+ \pgfluamathgetresult{pgfluamathfunctions.multiply(#1,#2)}}%
\def\pgfluamathdivide@#1#2{%
- \pgfluamathgetresult{pgfluamathfunctions.divide(#1,#2)}}
+ \pgfluamathgetresult{pgfluamathfunctions.divide(#1,#2)}}%
\def\pgfluamathabs@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.abs(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.abs(#1)}}%
\def\pgfluamathround@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.round(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.round(#1)}}%
\def\pgfluamathfloor@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.floor(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.floor(#1)}}%
\def\pgfluamathceil@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.ceil(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.ceil(#1)}}%
\def\pgfluamathgcd@#1#2{%
- \pgfluamathgetresult{pgfluamathfunctions.gcd(#1,#2)}}
+ \pgfluamathgetresult{pgfluamathfunctions.gcd(#1,#2)}}%
\def\pgfluamathisprime@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.isprime(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.isprime(#1)}}%
\def\pgfluamathmax@#1{%
\pgfluamathgetresult{%
- math.max(pgfluamathfunctions.split_braces_to_explist("#1"))}}
+ math.max(pgfluamathfunctions.split_braces_to_explist("#1"))}}%
\def\pgfluamathmin@#1{%
\pgfluamathgetresult{%
- math.min(pgfluamathfunctions.split_braces_to_explist("#1"))}}
+ math.min(pgfluamathfunctions.split_braces_to_explist("#1"))}}%
\def\pgfluamathsin@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.Sin(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.Sin(#1)}}%
\def\pgfluamathcos@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.Cos(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.Cos(#1)}}%
\def\pgfluamathtan@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.Tan(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.Tan(#1)}}%
\def\pgfluamathmod@#1#2{%
- \pgfluamathgetresult{pgfluamathfunctions.mod(#1,#2)}}
+ \pgfluamathgetresult{pgfluamathfunctions.mod(#1,#2)}}%
\def\pgfluamathMod@#1#2{%
- \pgfluamathgetresult{pgfluamathfunctions.Mod(#1,#2)}}
+ \pgfluamathgetresult{pgfluamathfunctions.Mod(#1,#2)}}%
\def\pgfluamathrad@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.rad(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.rad(#1)}}%
\def\pgfluamathdeg@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.deg(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.deg(#1)}}%
\def\pgfluamathatan@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.aTan(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.aTan(#1)}}%
\def\pgfluamathatantwo@#1#2{%
- \pgfluamathgetresult{pgfluamathfunctions.aTan2(#1,#2)}}
+ \pgfluamathgetresult{pgfluamathfunctions.aTan2(#1,#2)}}%
\def\pgfluamathasin@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.aSin(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.aSin(#1)}}%
\def\pgfluamathacos@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.aCos(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.aCos(#1)}}%
\def\pgfluamathcot@#1{%
- \pgfluamathgetresult{1/pgfluamathfunctions.Tan(#1)}}
+ \pgfluamathgetresult{1/pgfluamathfunctions.Tan(#1)}}%
\def\pgfluamathsec@#1{%
- \pgfluamathgetresult{1/pgfluamathfunctions.Cos(#1)}}
+ \pgfluamathgetresult{1/pgfluamathfunctions.Cos(#1)}}%
\def\pgfluamathcosec@#1{%
- \pgfluamathgetresult{1/pgfluamathfunctions.Sin(#1)}}
+ \pgfluamathgetresult{1/pgfluamathfunctions.Sin(#1)}}%
\def\pgfluamathexp@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.exp(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.exp(#1)}}%
\def\pgfluamathln@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.log(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.log(#1)}}%
\def\pgfluamathlogten@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.log10(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.log10(#1)}}%
\def\pgfluamathsqrt@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.sqrt(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.sqrt(#1)}}%
\def\pgfluamathrnd@{%
- \pgfluamathgetresult{pgfluamathfunctions.rnd()}}
+ \pgfluamathgetresult{pgfluamathfunctions.rnd()}}%
\def\pgfluamathrand@{%
- \pgfluamathgetresult{pgfluamathfunctions.rand(-1,1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.rand(-1,1)}}%
\def\pgfluamathfactorial@#1{%
- \pgfluamathgetresult{pgfluamathfunctions.factorial(#1)}}
+ \pgfluamathgetresult{pgfluamathfunctions.factorial(#1)}}%
\def\pgfluamathreciprocal#1{%
- \pgfluamathgetresult{1/#1}}
+ \pgfluamathgetresult{1/#1}}%
% \pgfluamath@install@function\pgfmath@pi=\pgfluamathpi@%
% \pgfluamath@install@function\pgfmathpi=\pgfluamathpi@%
% \pgfluamath@install@function\pgfmathe@=\pgfluamathe@%
@@ -463,7 +508,7 @@
\pgfutil@directlua{%
pgfluamathfunctions.pointnormalised(%
\pgf@sys@tonumber{\pgf@x},\pgf@sys@tonumber{\pgf@y})}%
- \ignorespaces}
+ \ignorespaces}%
% Parser
@@ -478,7 +523,7 @@
% LUA (defined only in TeX)
% - some special cases which simply haven't been added to the LUA
% parser (yet).
-% At the time of this writing, this includes
+% At the time of this writing, this includes
% -- arrays created via '{}' and indexed with '[]'
% -- strings with "<str>"
% -- 'scalar' function
@@ -497,17 +542,17 @@
\def\pgfluamathparse#1{%
\pgfluamathusedTeXfallbackfalse
\pgfutil@directlua{pgfluamathparser.texCallParser(
- "\pgfutil@luaescapestring{#1}",
- \pgfluamath@outputformat@choice,
- \ifpgfluamathshowerrormessage true\else false\fi)%
+ "\pgfutil@luaescapestring{#1}",
+ \pgfluamath@outputformat@choice,
+ \ifpgfluamathshowerrormessage true\else false\fi)%
}%
\ifx\pgfmathresult\pgfutil@empty
- \ifpgfluamathenableTeXfallback
- \pgfluamathusedTeXfallbacktrue
- \pgfluamath@pgfmathparse{#1}%
- \fi
+ \ifpgfluamathenableTeXfallback
+ \pgfluamathusedTeXfallbacktrue
+ \pgfluamath@pgfmathparse{#1}%
+ \fi
\fi
-}
+}%
\catcode`\"=\pgfliblua@oldcatcodedoublequote
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex
index 9c4a48aeaca..92d2f1e6864 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryarrows.code.tex,v 1.16 2013/09/23 18:04:35 tantau Exp $
+\ProvidesFileRCS{pgflibraryarrows.code.tex}
% A square bracket shaped arrow
@@ -32,10 +32,10 @@
\pgfpathlineto{\pgfqpoint{0pt}{\pgfutil@tempdima}}
\pgfpathlineto{\pgfqpoint{-.5\pgfutil@tempdimb}{\pgfutil@tempdima}}
\pgfusepathqstroke
-}
-\pgfdeclarearrow{name=[-], means=square bracket}
+}%
+\pgfdeclarearrow{name=[-], means=square bracket}%
-\pgfarrowsdeclarereversed{]}{[}{[}{]}
+\pgfarrowsdeclarereversed{]}{[}{[}{]}%
% A round bracket shaped arrow
@@ -60,9 +60,9 @@
{\pgfqpoint{.25\pgfutil@tempdima}{.5\pgfutil@tempdima}}
{\pgfqpoint{-.5\pgfutil@tempdima}{\pgfutil@tempdima}}
\pgfusepathqstroke
-}
+}%
-\pgfarrowsdeclarereversed{)}{(}{(}{)}
+\pgfarrowsdeclarereversed{)}{(}{(}{)}%
@@ -88,9 +88,9 @@
\pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0\pgfutil@tempdima}}
\pgfpathlineto{\pgfqpoint{-5.5\pgfutil@tempdima}{6\pgfutil@tempdima}}
\pgfusepathqstroke
-}
+}%
-\pgfarrowsdeclarereversed{angle 90 reversed}{angle 90 reversed}{angle 90}{angle 90}
+\pgfarrowsdeclarereversed{angle 90 reversed}{angle 90 reversed}{angle 90}{angle 90}%
\pgfarrowsdeclare{angle 60}{angle 60}
@@ -112,9 +112,9 @@
\pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}
\pgfpathlineto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-150}{9\pgfutil@tempdima}}}
\pgfusepathqstroke
-}
+}%
-\pgfarrowsdeclarereversed{angle 60 reversed}{angle 60 reversed}{angle 60}{angle 60}
+\pgfarrowsdeclarereversed{angle 60 reversed}{angle 60 reversed}{angle 60}{angle 60}%
@@ -137,9 +137,9 @@
\pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0\pgfutil@tempdima}}
\pgfpathlineto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-157}{10\pgfutil@tempdima}}}
\pgfusepathqstroke
-}
+}%
-\pgfarrowsdeclarereversed{angle 45 reversed}{angle 45 reversed}{angle 45}{angle 45}
+\pgfarrowsdeclarereversed{angle 45 reversed}{angle 45 reversed}{angle 45}{angle 45}%
@@ -160,7 +160,7 @@
\pgfsetdash{}{+0pt}
\pgfpathcircle{\pgfqpoint{-3\pgfutil@tempdima}{0pt}}{+4.5\pgfutil@tempdima}
\pgfusepathqfillstroke
-}
+}%
% An open dot shaped arrow
@@ -179,7 +179,7 @@
\pgfsetdash{}{+0pt}
\pgfpathcircle{\pgfqpoint{4.5\pgfutil@tempdima}{0bp}}{4.5\pgfutil@tempdima}
\pgfusepathqstroke
-}
+}%
@@ -205,7 +205,7 @@
\pgfpathlineto{\pgfqpoint{-6\pgfutil@tempdima}{-4\pgfutil@tempdima}}
\pgfpathclose
\pgfusepathqfillstroke
-}
+}%
\pgfarrowsdeclare{open diamond}{open diamond}%{{-.5bp}{14.5bp}}
{
@@ -226,7 +226,7 @@
\pgfpathlineto{\pgfqpoint{7\pgfutil@tempdima}{-4\pgfutil@tempdima}}
\pgfpathclose
\pgfusepathqstroke
-}
+}%
% A square shaped arrow
@@ -250,7 +250,7 @@
\pgfpathlineto{\pgfqpoint{1\arrowsize}{-4\arrowsize}}
\pgfpathclose
\pgfusepathqfillstroke
-}
+}%
% A open square shaped arrow
\pgfarrowsdeclare{open square}{open square}%{{-.5bp}{8.5bp}}
@@ -273,7 +273,7 @@
\pgfpathlineto{\pgfqpoint{8\arrowsize}{-4\arrowsize}}
\pgfpathclose
\pgfusepathqstroke
-}
+}%
@@ -298,9 +298,9 @@
\pgfpathlineto{\pgfqpoint{-5.5\pgfutil@tempdima}{6\pgfutil@tempdima}}
\pgfpathclose
\pgfusepathqfillstroke
-}
+}%
-\pgfarrowsdeclarereversed{triangle 90 reversed}{triangle 90 reversed}{triangle 90}{triangle 90}
+\pgfarrowsdeclarereversed{triangle 90 reversed}{triangle 90 reversed}{triangle 90}{triangle 90}%
\pgfarrowsdeclare{triangle 60}{triangle 60}
@@ -322,9 +322,9 @@
\pgfpathlineto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-150}{9\pgfutil@tempdima}}}
\pgfpathclose
\pgfusepathqfillstroke
-}
+}%
-\pgfarrowsdeclarereversed{triangle 60 reversed}{triangle 60 reversed}{triangle 60}{triangle 60}
+\pgfarrowsdeclarereversed{triangle 60 reversed}{triangle 60 reversed}{triangle 60}{triangle 60}%
@@ -348,9 +348,9 @@
\pgfpathlineto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-157}{10\pgfutil@tempdima}}}
\pgfpathclose
\pgfusepathqfillstroke
-}
+}%
-\pgfarrowsdeclarereversed{triangle 45 reversed}{triangle 45 reversed}{triangle 45}{triangle 45}
+\pgfarrowsdeclarereversed{triangle 45 reversed}{triangle 45 reversed}{triangle 45}{triangle 45}%
@@ -373,9 +373,9 @@
\pgfpathlineto{\pgfqpoint{0\pgfutil@tempdima}{6\pgfutil@tempdima}}
\pgfpathclose
\pgfusepathqstroke
-}
+}%
-\pgfarrowsdeclare{open triangle 90 reversed}{open triangle 90 reversed}
+\pgfarrowsdeclare{open triangle 90 reversed}{open triangle 90 reversed}%
{
\pgfutil@tempdima=0.5pt%
\advance\pgfutil@tempdima by.25\pgflinewidth%
@@ -393,7 +393,7 @@
\pgfpathlineto{\pgfqpoint{6\pgfutil@tempdima}{6\pgfutil@tempdima}}
\pgfpathclose
\pgfusepathqstroke
-}
+}%
@@ -415,7 +415,7 @@
\pgfpathlineto{\pgfpointadd{\pgfqpoint{7.794\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-150}{9\pgfutil@tempdima}}}
\pgfpathclose
\pgfusepathqstroke
-}
+}%
@@ -437,7 +437,7 @@
\pgfpathlineto{\pgfqpointpolar{-30}{9\pgfutil@tempdima}}
\pgfpathclose
\pgfusepathqstroke
-}
+}%
@@ -459,7 +459,7 @@
\pgfpathlineto{\pgfpointadd{\pgfqpoint{9.205\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-157}{10\pgfutil@tempdima}}}
\pgfpathclose
\pgfusepathqstroke
-}
+}%
@@ -481,11 +481,11 @@
\pgfpathlineto{\pgfqpointpolar{-23}{10\pgfutil@tempdima}}
\pgfpathclose
\pgfusepathqstroke
-}
+}%
-% A less fleshy variant of LaTeX's orginal arrow type
+% A less fleshy variant of LaTeX's ordinal arrow type
\pgfarrowsdeclare{latex'}{latex'}
{
@@ -512,9 +512,9 @@
{\pgfqpoint{6\pgfutil@tempdima}{0\pgfutil@tempdima}}
\pgfpathclose
\pgfusepathqfill
-}
+}%
-\pgfarrowsdeclarereversed{latex' reversed}{latex' reversed}{latex'}{latex'}
+\pgfarrowsdeclarereversed{latex' reversed}{latex' reversed}{latex'}{latex'}%
% A rounded variant of the stealth arrow
@@ -548,9 +548,9 @@
{\pgfqpoint{2\pgfutil@tempdima}{0\pgfutil@tempdima}}
\pgfpathclose
\pgfusepathqfillstroke
-}
+}%
-\pgfarrowsdeclarereversed{stealth' reversed}{stealth' reversed}{stealth'}{stealth'}
+\pgfarrowsdeclarereversed{stealth' reversed}{stealth' reversed}{stealth'}{stealth'}%
@@ -583,7 +583,7 @@
{\pgfqpoint{0.5\pgfutil@tempdima}{-0.125\pgflinewidth}}
\pgfpathlineto{\pgfqpoint{0pt}{-0.125\pgflinewidth}}
\pgfusepathqstroke
-}
+}%
\pgfarrowsdeclare{right to}{right to}
@@ -613,7 +613,7 @@
{\pgfqpoint{0.5\pgfutil@tempdima}{0.125\pgflinewidth}}
\pgfpathlineto{\pgfqpoint{0pt}{0.125\pgflinewidth}}
\pgfusepathqstroke
-}
+}%
@@ -645,7 +645,7 @@
\pgfpathcurveto{\pgfqpoint{3.5\pgfutil@tempdima}{2.5\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{0.25\pgfutil@tempdima}}{\pgfqpoint{0pt}{-0.125\pgflinewidth}}
}
\pgfusepathqstroke%
-}
+}%
\pgfarrowsdeclare{right to reversed}{right to reversed}
{
@@ -673,7 +673,7 @@
\pgfpathcurveto{\pgfqpoint{3.5\pgfutil@tempdima}{-2.5\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{-0.25\pgfutil@tempdima}}{\pgfqpoint{0pt}{0.125\pgflinewidth}}
}
\pgfusepathqstroke%
-}
+}%
@@ -697,9 +697,9 @@
\pgfpathcurveto{\pgfqpoint{2.415\pgfutil@tempdima}{0\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{1.665\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{3\pgfutil@tempdima}}
\pgfpathcurveto{\pgfqpoint{3.75\pgfutil@tempdima}{4.665\pgfutil@tempdima}}{\pgfqpoint{2.415\pgfutil@tempdima}{6\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{6\pgfutil@tempdima}}
\pgfusepathqstroke%
-}
+}%
-\pgfarrowsdeclarereversed{left hook reversed}{left hook reversed}{left hook}{left hook}
+\pgfarrowsdeclarereversed{left hook reversed}{left hook reversed}{left hook}{left hook}%
@@ -723,9 +723,9 @@
\pgfpathcurveto{\pgfqpoint{2.415\pgfutil@tempdima}{0\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{-1.665\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{-3\pgfutil@tempdima}}
\pgfpathcurveto{\pgfqpoint{3.75\pgfutil@tempdima}{-4.665\pgfutil@tempdima}}{\pgfqpoint{2.415\pgfutil@tempdima}{-6\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{-6\pgfutil@tempdima}}
\pgfusepathqstroke%
-}
+}%
-\pgfarrowsdeclarereversed{right hook reversed}{right hook reversed}{right hook}{right hook}
+\pgfarrowsdeclarereversed{right hook reversed}{right hook reversed}{right hook}{right hook}%
% Hooks in both directions
@@ -751,9 +751,9 @@
\pgfpathcurveto{\pgfqpoint{2.415\pgfutil@tempdima}{0\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{-1.665\pgfutil@tempdima}}{\pgfqpoint{3.75\pgfutil@tempdima}{-3\pgfutil@tempdima}}
\pgfpathcurveto{\pgfqpoint{3.75\pgfutil@tempdima}{-4.665\pgfutil@tempdima}}{\pgfqpoint{2.415\pgfutil@tempdima}{-6\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{-6\pgfutil@tempdima}}
\pgfusepathqstroke%
-}
+}%
-\pgfarrowsdeclarereversed{hooks reversed}{hooks reversed}{hooks}{hooks}
+\pgfarrowsdeclarereversed{hooks reversed}{hooks reversed}{hooks}{hooks}%
% An arrow that looks like a serif of the computer modern font
@@ -778,15 +778,15 @@
\pgfpathcurveto
{\pgfqpoint{-.04\pgflinewidth}{.5\pgfutil@tempdima}}
{\pgfqpoint{-.04\pgflinewidth}{-.5\pgfutil@tempdima}}
- {\pgfqpoint{0pt}{-1.95\pgfutil@tempdima}}
- \pgfpathlineto{\pgfqpoint{-.375\pgfutil@tempdima}{-1.95\pgfutil@tempdima}}
+ {\pgfqpoint{0pt}{-1.95\pgfutil@tempdima}}
+ \pgfpathlineto{\pgfqpoint{-.375\pgfutil@tempdima}{-1.95\pgfutil@tempdima}}
\pgfpathcurveto
{\pgfqpoint{-.375\pgfutil@tempdima}{-.7\pgflinewidth}}
{\pgfqpoint{-.375\pgfutil@tempdima}{-.5\pgflinewidth}}
{\pgfqpoint{-.75\pgfutil@tempdima}{-.5\pgflinewidth}}
\pgfpathclose
\pgfusepathqfill
-}
+}%
@@ -800,7 +800,7 @@
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfqpoint{0.5\pgflinewidth}{0pt}}
\pgfusepathqstroke
-}
+}%
% Butt cap
@@ -813,7 +813,7 @@
\pgfpathmoveto{\pgfqpoint{-.1\pgflinewidth}{0pt}}
\pgfpathlineto{\pgfqpoint{0.5\pgflinewidth}{0pt}}
\pgfusepathqstroke
-}
+}%
@@ -829,7 +829,7 @@
\pgfpathlineto{\pgfqpoint{-.1\pgflinewidth}{-0.5\pgflinewidth}}
\pgfpathclose
\pgfusepathqfill
-}
+}%
% reversed 90 degrees cap
@@ -844,7 +844,7 @@
\pgfpathlineto{\pgfqpoint{0.5\pgflinewidth}{0\pgflinewidth}}
\pgfpathclose
\pgfusepathqfill
-}
+}%
@@ -867,7 +867,7 @@
\pgfpathlineto{\pgfqpoint{1.5\pgflinewidth}{0\pgflinewidth}}
\pgfpathclose
\pgfusepathqfill
-}
+}%
\pgfarrowsdeclare{fast cap reversed}{fast cap reversed}
@@ -887,7 +887,7 @@
\pgfpathlineto{\pgfqpoint{1\pgflinewidth}{0\pgflinewidth}}
\pgfpathclose
\pgfusepathqfill
-}
+}%
@@ -929,7 +929,7 @@
{\pgfpoint{-.75\pgfutil@tempdima}{-1.25\pgfutil@tempdima}}
{\pgfpoint{-1.4\pgfutil@tempdima}{-2.65\pgfutil@tempdima}}
\pgfusepathqstroke
-}
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex
index 80b2573a0c4..af509c1af64 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex
@@ -7,14 +7,14 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryarrows.meta.code.tex,v 1.13 2015/05/13 21:19:11 cfeuersaenger Exp $
+\ProvidesFileRCS{pgflibraryarrows.meta.code.tex}
-%
-%
-% Meta keys
-%
+%
+%
+% Meta keys
+%
%
@@ -67,7 +67,7 @@
angle'/.code={
\pgfarrowsaddtolateoptions{\pgfarrows@angle@setup@prime{#1}}%
},
- %
+ %
line cap/.is choice,
line cap/butt/.code=\pgfarrowsaddtooptions{\pgfarrowroundcapfalse},
line cap/round/.code=\pgfarrowsaddtooptions{\pgfarrowroundcaptrue},
@@ -76,14 +76,10 @@
line join/round/.code=\pgfarrowsaddtooptions{\pgfarrowroundjointrue},
round/.style={line cap=round,line join=round},
sharp/.style={line cap=butt,line join=miter},
-}
-
-
-
-
+}%
%
%
-% Classificaiton of arrow tips:
+% Classification of arrow tips:
%
%
% Barbs
@@ -93,7 +89,7 @@
% typically going backward. They cannot be filled, only stroked
%
% A special case are the arrows mimicking the tip at the end of a
-% \rightarrow command.
+% \rightarrow command.
%
%
% Geometric
@@ -151,7 +147,7 @@
\pgf@xa\pgf@temp@quot\pgfarrowlinewidth% xa is extra harpoon miter
% Set ends
\ifpgfarrowroundjoin
- \pgfarrowssettipend{\pgfarrowlength\advance\pgf@x by.5\pgfarrowlinewidth}
+ \pgfarrowssettipend{\pgfarrowlength\advance\pgf@x by.5\pgfarrowlinewidth}
\else
\pgfarrowssettipend{\pgfarrowlength\advance\pgf@x by\pgf@xc\ifpgfarrowharpoon\advance\pgf@x by\pgf@xa\fi}
\fi
@@ -205,12 +201,11 @@
\ifpgfarrowroundjoin j\fi%
\ifpgfarrowroundcap c\fi%
},
-}
-
-
-
+}%
+%
+%
% Hooks are barbs that consist of an arc going forward from the line
-% end and curving back by a given angle speficied using the |arc|
+% end and curving back by a given angle specified using the |arc|
% key.
\pgfkeys{
@@ -219,9 +214,9 @@
\pgfmathparse{#1}%
\expandafter\pgfarrowsaddtooptions\expandafter{\expandafter\def\expandafter\pgfarrowarc\expandafter{\pgfmathresult}}
}
-}
+}%
-\def\pgfarrowarc{180}
+\def\pgfarrowarc{180}%
\pgfdeclarearrow{
name = Hooks,
@@ -247,7 +242,7 @@
\pgfarrowsupperhullpoint{-\pgfarrowlength}{.25\pgfarrowwidth}
\else
\pgfarrowsupperhullpoint{\ifpgfarrowroundcap-.5\pgfarrowlinewidth\else0pt\fi}{.25\pgfarrowwidth}
- \pgfarrowsupperhullpoint{\ifpgfarrowroundcap-.5\pgfarrowlinewidth\else0pt\fi}{.5\pgfarrowwidth}
+ \pgfarrowsupperhullpoint{\ifpgfarrowroundcap-.5\pgfarrowlinewidth\else0pt\fi}{.5\pgfarrowwidth}
\fi
\fi
% Adjust width and length: Take line thickness into account:
@@ -261,9 +256,9 @@
% There are four different intervals for the values of
% \pgfarrowsarc that give rise to four different settings of tip
% ends and so on:
- %
- % Case 1: 0 <= Angle < 90
- %
+ %
+ % Case 1: 0 <= Angle < 90
+ %
\ifdim\pgfarrowarc pt<90pt%
% Tip end is given by sin(pgfarrowarc)*length
\pgfmathsin@{\pgfarrowarc}
@@ -280,7 +275,7 @@
\else
\ifpgfarrowroundcap\pgfarrowssetbackend{-.5\pgfarrowlinewidth}\fi%
\fi%
- \else%
+ \else%
\pgfarrowssettipend{\pgfarrowlength\advance\pgf@x by.5\pgfarrowlinewidth}%
\pgfarrowssetbackend{-\pgfarrowlength\advance\pgf@x by-.5\pgfarrowlinewidth}%
\fi\fi\fi%
@@ -289,14 +284,14 @@
\else%
\ifpgfarrowharpoon
\pgfarrowssetlineend{0pt}
- \else
+ \else
\pgfarrowssetlineend{.25\pgfarrowlinewidth}
\fi
\fi
% Adjust arc:
\pgf@x\pgfarrowarc pt%
\advance\pgf@x by-90pt%
- \edef\pgfarrowarc{\pgf@sys@tonumber\pgf@x}%
+ \edef\pgfarrowarc{\pgf@sys@tonumber\pgf@x}%
% The following are needed in the code:
\pgfarrowssavethe\pgfarrowlinewidth
\pgfarrowssavethe\pgfarrowlength
@@ -332,7 +327,7 @@
\ifpgfarrowroundjoin j\fi%
\ifpgfarrowroundcap c\fi%
},
-}
+}%
\pgfdeclarearrow{
@@ -363,7 +358,7 @@
\ifdim\pgfarrowarc pt>90pt
\ifdim\pgfarrowarc pt<120pt
\pgfarrowsupperhullpoint{\pgfmathresultx\pgfarrowlength}{.5\pgfarrowwidth}
- \else
+ \else
\pgfarrowsupperhullpoint{-.5\pgfarrowlength}{.5\pgfarrowwidth}
\ifdim\pgfarrowarc pt>150pt
\pgfarrowsupperhullpoint{-\pgfarrowlength}{.25\pgfarrowwidth}
@@ -377,7 +372,7 @@
\ifpgfarrowharpoon
\pgfutil@tempswatrue
\fi
- \ifpgfutil@tempswa
+ \ifpgfutil@tempswa
\pgf@xa.5\pgfarrowwidth\advance\pgf@xa by-\pgfarrowlinewidth%
\pgf@ya\pgfarrowlength\advance\pgf@ya by-\pgfarrowlinewidth%
\pgfarrowsupperhullpoint{\pgfmathresultx\pgf@ya}{\pgfmathresulty\pgf@xa}
@@ -435,7 +430,7 @@
\ifpgfarrowroundcap c\fi%
\ifpgfarrowroundjoin j\fi%
},
-}
+}%
@@ -451,7 +446,7 @@
},
bending mode=polar,
setup code = {
- % Two useful numbers...
+ % Two useful numbers...
\pgfutil@tempswafalse%
\pgfutil@tempswbfalse%
\pgfutil@tempdima\pgfarrowlength\advance\pgfutil@tempdima by-\pgfarrowinset\ifdim\pgfutil@tempdima<.5\pgfarrowlinewidth\pgfutil@tempdima.5\pgfarrowlinewidth\pgfutil@tempswatrue\fi%
@@ -519,7 +514,7 @@
\ifpgfarrowroundjoin j\fi%
\ifpgfarrowroundcap c\fi%
},
-}
+}%
% Math barbs that resemble \rightarrow in different fonts:
@@ -528,7 +523,7 @@
% The original default arrow head used in TikZ. It is modeled on an
% old version of the \rightarrow head of the *old* Computer Modern
-% fonts.
+% fonts.
\pgfdeclarearrow{
name = Classical TikZ Rightarrow,
@@ -538,7 +533,7 @@
line width = 0pt 0.8 1,
round
},
- setup code =
+ setup code =
{
\ifpgfarrowharpoon\pgfarrowroundjointrue\fi
% inner length:
@@ -585,11 +580,11 @@
\pgfarrowsupperhullpoint{-.5\pgfarrowlinewidth}{.5\pgfutil@tempdimb\advance\pgf@y by.5\pgfarrowlinewidth}%
% Lower end:
\ifpgfarrowharpoon
- \pgfarrowshullpoint{\pgfutil@tempdima\advance\pgf@x by-\pgflinewidth}{-.5\pgflinewidth}%
+ \pgfarrowshullpoint{\pgfutil@tempdima\advance\pgf@x by-\pgflinewidth}{-.5\pgflinewidth}%
\pgfarrowshullpoint{-.5\pgfarrowlinewidth}{.5\pgfutil@tempdimb\advance\pgf@y by-.5\pgflinewidth}%
\fi
},
- drawing code =
+ drawing code =
{
\pgfsetdash{}{+0pt}
\edef\pgf@orig@linewidth{\the\pgflinewidth}
@@ -605,7 +600,7 @@
\pgfpathcurveto
{\pgfqpoint{0.066666\pgfutil@tempdima}{0.3125\pgfutil@tempdimb}}
{\pgfqpoint{.8\pgfutil@tempdima}{0.03125\pgfutil@tempdimb}}
- {\pgfqpoint{\pgfutil@tempdima}{0pt}}
+ {\pgfqpoint{\pgfutil@tempdima}{0pt}}
\pgfpathcurveto
{\pgfqpoint{.8\pgfutil@tempdima}{-.03125\pgfutil@tempdimb}}
{\pgfqpoint{0.066666\pgfutil@tempdima}{-.3125\pgfutil@tempdimb}}
@@ -622,7 +617,7 @@
\ifpgfarrowroundjoin j\fi%
\ifpgfarrowroundcap c\fi%
},
-}
+}%
\def\pgf@arrows@old@tikz@harpoon{
\ifpgfarrowreversed
@@ -640,7 +635,7 @@
{\pgfqpoint{0.8\pgfutil@tempdima\advance\pgf@x by-.5\pgflinewidth}{-0.125\pgflinewidth}}
\pgfusepathqstroke
\fi
-}
+}%
\def\pgf@arrows@old@tikz@harpoon@reversed{
\pgfpathcurveto
{\pgfqpoint{0.066666\pgfutil@tempdima}{0.3125\pgfutil@tempdimb}}
@@ -658,7 +653,7 @@
\pgfpathmoveto{\pgfqpoint{\pgfutil@tempdima\advance\pgf@x by0.6\pgflinewidth}{0pt}}
\pgfpathlineto{\pgfqpoint{\pgfutil@tempdima}{0pt}}
\pgfusepathqstroke
-}
+}%
% An approximation to the new (past 1992) Computer Modern math arrow
@@ -673,7 +668,7 @@
line width = 0pt 1 1,
round
},
- setup code =
+ setup code =
{
% inner length:
\pgfutil@tempdima\pgfarrowlength
@@ -720,11 +715,11 @@
\pgfarrowsupperhullpoint{-\pgfutil@tempdima\advance\pgf@x by-.5\pgfarrowlinewidth}{.5\pgfutil@tempdimb\advance\pgf@y by.5\pgfarrowlinewidth}%
% Lower end:
\ifpgfarrowharpoon
- \pgfarrowshullpoint{-\pgfarrowlinewidth}{-.5\pgfarrowlinewidth}%
+ \pgfarrowshullpoint{-\pgfarrowlinewidth}{-.5\pgfarrowlinewidth}%
\pgfarrowshullpoint{-\pgfutil@tempdima\advance\pgf@x by-.5\pgfarrowlinewidth}{.5\pgfutil@tempdimb\advance\pgf@y by-.5\pgfarrowlinewidth}%
\fi
},
- drawing code =
+ drawing code =
{
\pgfsetdash{}{+0pt}
\ifpgfarrowroundcap\pgfsetroundcap\else\pgfsetbuttcap\fi
@@ -739,7 +734,7 @@
\ifpgfarrowharpoon
\pgfpathlineto
{\pgfqpoint{\ifpgfarrowreversed.5\else-\fi\pgfarrowlinewidth}{0pt}}
- \else
+ \else
\pgfpathcurveto
{\pgfqpoint{-0.41019\pgfutil@tempdima}{-0.05833333\pgfutil@tempdimb}}
{\pgfqpoint{-0.81731\pgfutil@tempdima}{-.2\pgfutil@tempdimb}}
@@ -756,7 +751,7 @@
\ifpgfarrowroundjoin j\fi%
\ifpgfarrowroundcap c\fi%
},
-}
+}%
@@ -796,20 +791,20 @@
\pgfusepathqstroke
},
parameters = {\the\pgfarrowlength}
-}
+}%
%
%
-% Geomatric arrow tips
+% Geometric arrow tips
%
%
% Generic "latex-like" arrow tip. This is the basic arrow tip used in
-% latex's picture environment. You can configure its length and width.
+% latex's picture environment. You can configure its length and width.
\pgfdeclarearrow{
name = Latex,
@@ -852,7 +847,7 @@
\pgfarrowssetlineend{0pt}
\fi
\ifpgfarrowroundjoin
- \pgfarrowssettipend{\pgfutil@tempdima\advance\pgf@x by.5\pgfarrowlinewidth}
+ \pgfarrowssettipend{\pgfutil@tempdima\advance\pgf@x by.5\pgfarrowlinewidth}
\else
\pgfarrowssettipend{\pgfarrowlength\advance\pgf@x by-.5\pgfarrowlinewidth\ifpgfarrowharpoon\advance\pgf@x by1.5\pgf@xa\fi}
\fi
@@ -882,7 +877,7 @@
{\pgfqpoint{0pt}{\pgfutil@tempdimb}}
\ifpgfarrowharpoon
\pgfpathlineto {\pgfpointorigin}
- \else
+ \else
\pgfpathlineto {\pgfqpoint{0pt}{-\pgfutil@tempdimb}}
\pgfpathcurveto {\pgfqpoint{.337381\pgfutil@tempdima}{-.519480\pgfutil@tempdimb}}
{\pgfqpoint{.877192\pgfutil@tempdima}{-.077922\pgfutil@tempdimb}}
@@ -899,7 +894,7 @@
\ifpgfarrowopen o\fi%
\ifpgfarrowroundjoin j\fi%
},
-}
+}%
@@ -960,7 +955,7 @@
\advance\pgf@x by1pt%
\pgfmathsqrt@{\pgf@sys@tonumber\pgf@x}%
\pgf@yc\pgfmathresult\pgfarrowlinewidth% yc is inset miter
- \pgf@yc.5\pgf@yc%
+ \pgf@yc.5\pgf@yc%
% Inner length (pgfutil@tempdima) is now arrowlength - front miter - back miter
\pgfutil@tempdima\pgfarrowlength%
\advance\pgfutil@tempdima by-\pgf@xc%
@@ -969,7 +964,7 @@
\advance\pgfutil@tempdimb by-\pgf@yb%
% harpoon miter correction
\ifpgfarrowroundjoin
- \pgfarrowssetbackend{\pgf@ya\advance\pgf@x by-.5\pgfarrowlinewidth}
+ \pgfarrowssetbackend{\pgf@ya\advance\pgf@x by-.5\pgfarrowlinewidth}
\else
\pgfarrowssetbackend{0pt}
\fi
@@ -987,7 +982,7 @@
\fi
\fi
\ifpgfarrowroundjoin
- \pgfarrowssettipend{\pgfutil@tempdima\advance\pgf@x by\pgf@ya\advance\pgf@x by.5\pgfarrowlinewidth}
+ \pgfarrowssettipend{\pgfutil@tempdima\advance\pgf@x by\pgf@ya\advance\pgf@x by.5\pgfarrowlinewidth}
\else
\pgfarrowssettipend{\pgfarrowlength\ifpgfarrowharpoon\advance\pgf@x by\pgf@xa\fi}
\fi
@@ -1027,7 +1022,7 @@
\ifpgfarrowopen o\fi%
\ifpgfarrowroundjoin j\fi%
},
-}
+}%
@@ -1037,7 +1032,7 @@
name = Kite,
defaults = {
length = +3.6pt +5.4,
- width' = +0pt +0.5,
+ width' = +0pt +0.5,
inset' = +0pt 0.25,
line width = +0pt 1 1,
},
@@ -1108,7 +1103,7 @@
\advance\pgfutil@tempdimb by\pgf@yb%
% Set back end
\ifpgfarrowroundjoin
- \pgfarrowssetbackend{\pgf@ya\advance\pgf@x by-.5\pgfarrowlinewidth}
+ \pgfarrowssetbackend{\pgf@ya\advance\pgf@x by-.5\pgfarrowlinewidth}
\else
\pgfarrowssetbackend{0pt}
\fi
@@ -1119,7 +1114,7 @@
\pgfarrowssetlineend{\pgf@yc\advance\pgf@x by\pgflinewidth\advance\pgf@x by-\pgfarrowlinewidth}
\fi
\ifpgfarrowroundjoin
- \pgfarrowssettipend{\pgfutil@tempdima\advance\pgf@x by.5\pgfarrowlinewidth}
+ \pgfarrowssettipend{\pgfutil@tempdima\advance\pgf@x by.5\pgfarrowlinewidth}
\else
\pgfarrowssettipend{\pgfarrowlength\ifpgfarrowharpoon\advance\pgf@x by\pgf@xa\fi}
\fi
@@ -1158,7 +1153,7 @@
\ifpgfarrowopen o\fi%
\ifpgfarrowroundjoin j\fi%
},
-}
+}%
@@ -1213,7 +1208,7 @@
\ifpgfarrowopen o\fi%
\ifpgfarrowroundjoin j\fi%
},
-}
+}%
% A simple rectangle shape
@@ -1283,7 +1278,7 @@
\ifpgfarrowopen o\fi%
\ifpgfarrowroundjoin j\fi%
},
-}
+}%
% Round cap
@@ -1332,7 +1327,7 @@
\pgfusepathqfill
},
parameters = {\the\pgfarrowlength}
-}
+}%
@@ -1359,7 +1354,7 @@
\pgfusepathqfill
},
parameters = {\the\pgfarrowlength}
-}
+}%
@@ -1375,7 +1370,7 @@
\edef\pgf@marshal{\noexpand\pgfarrowsaddtooptions{\noexpand\pgfarrowslinewidthdependent{+0pt}{\pgf@sys@tonumber\pgf@x}{0}\pgfarrowlength\pgf@x}}
\pgf@marshal
}
-}
+}%
\pgfdeclarearrow{
@@ -1420,7 +1415,7 @@
\pgfusepathqfill
},
parameters = {\the\pgfarrowlength}
-}
+}%
@@ -1451,7 +1446,7 @@
\pgfusepathqfill
},
parameters = {\the\pgfarrowlength,\the\pgfarrowinset}
-}
+}%
\pgfdeclarearrow{
@@ -1492,7 +1487,7 @@
\pgfusepathqfill
},
parameters = {\the\pgfarrowlength,\the\pgfarrowinset}
-}
+}%
@@ -1510,12 +1505,12 @@
\pgfmathparse{#1}%
\expandafter\pgf@lib@meta@strip@dot\pgfmathresult.\relax%
}
-}
+}%
\def\pgf@lib@meta@strip@dot#1.#2\relax{%
\pgfarrowsaddtooptions{\def\pgfarrown{#1}}%
-}
+}%
-\def\pgfarrown{4}
+\def\pgfarrown{4}%
\pgfdeclarearrow{
name = Rays,
@@ -1531,7 +1526,7 @@
\pgf@xa\pgfarrow@inc pt%
\ifodd\pgfarrown\pgf@ya.25\pgf@xa\else\pgf@ya.5\pgf@xa\fi%
\pgfmathsincos@{\pgf@sys@tonumber\pgf@ya}%
- \pgf@x.5\pgfarrowlength%
+ \pgf@x.5\pgfarrowlength%
\pgf@xa\pgfmathresultx\pgf@x%
\ifpgfarrowroundcap
\advance\pgf@xa by.5\pgfarrowlinewidth
@@ -1542,7 +1537,7 @@
\fi%
\pgfarrowssettipend{\pgf@xa}
\pgfarrowssetbackend{-\pgf@xa}
- % Hull is alwyas 8-point hull, except for tip
+ % Hull is always 8-point hull, except for tip
% The following are needed in the code:
\pgfarrowsupperhullpoint{\pgf@xa}{.25\pgfarrowwidth}
\pgfarrowsupperhullpoint{.25\pgfarrowlength}{.5\pgfarrowwidth\ifpgfarrowroundcap\advance\pgf@y by.5\pgfarrowlinewidth\fi}
@@ -1575,7 +1570,7 @@
\pgfpathlineto{\pgfpointorigin}
\ifpgfarrowharpoon\ifdim\pgf@ya>\pgf@xa\else{\pgfsettransform\pgf@temp@trans\pgfpathlineto{\pgfqpoint{-.5\pgflinewidth}{0pt}}}\fi\fi
\advance\pgf@ya by\pgf@xa\relax%
- \pgfutil@repeat%
+ \pgfutil@repeat%
}
\pgfusepathqstroke
},
@@ -1587,7 +1582,7 @@
\ifpgfarrowharpoon h\fi%
\ifpgfarrowroundcap c\fi%
}
-}
+}%
@@ -1604,7 +1599,7 @@
Bar /.tip = {Tee Barb[length=+0pt]},
Bracket /.tip = {Tee Barb[inset'=+0pt +1,length=+0.75pt +1]},
Parenthesis /.tip = {Arc Barb[arc=+120,length=+1.725pt +2.3]}
-}
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.spaced.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.spaced.code.tex
index b6d1728363d..166ed875333 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.spaced.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.spaced.code.tex
@@ -7,10 +7,10 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryarrows.spaced.code.tex,v 1.3 2013/09/23 18:04:36 tantau Exp $
+\ProvidesFileRCS{pgflibraryarrows.spaced.code.tex}
-\usepgflibrary{arrows}
+\usepgflibrary{arrows}%
% This library offers "spaced" versions of existing arrows, where a
@@ -21,71 +21,71 @@
% original name of the arrow.
-\pgfarrowsdeclarecombine*{spaced to}{spaced to}{to}{to}{space}{space}
-\pgfarrowsdeclarecombine*{spaced to reversed}{spaced to reversed}{to reversed}{to reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced implies}{spaced implies}{implies}{implies}{space}{space}
-\pgfarrowsdeclarecombine*{spaced latex}{spaced latex}{latex}{latex}{space}{space}
-\pgfarrowsdeclarecombine*{spaced latex reversed}{spaced latex reversed}{latex reversed}{latex reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced latex'}{spaced latex'}{latex'}{latex'}{space}{space}
-\pgfarrowsdeclarecombine*{spaced latex' reversed}{spaced latex' reversed}{latex' reversed}{latex' reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced stealth}{spaced stealth}{stealth}{stealth}{space}{space}
-\pgfarrowsdeclarecombine*{spaced stealth reversed}{spaced stealth reversed}{stealth reversed}{stealth reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced stealth'}{spaced stealth'}{stealth'}{stealth'}{space}{space}
-\pgfarrowsdeclarecombine*{spaced stealth' reversed}{spaced stealth' reversed}{stealth' reversed}{stealth' reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced triangle 90}{spaced triangle 90}{triangle 90}{triangle 90}{space}{space}
-\pgfarrowsdeclarecombine*{spaced triangle 90 reversed}{spaced triangle 90 reversed}{triangle 90 reversed}{triangle 90 reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced triangle 60}{spaced triangle 60}{triangle 60}{triangle 60}{space}{space}
-\pgfarrowsdeclarecombine*{spaced triangle 60 reversed}{spaced triangle 60 reversed}{triangle 60 reversed}{triangle 60 reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced triangle 45}{spaced triangle 45}{triangle 45}{triangle 45}{space}{space}
-\pgfarrowsdeclarecombine*{spaced triangle 45 reversed}{spaced triangle 45 reversed}{triangle 45 reversed}{triangle 45 reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced open triangle 90}{spaced open triangle 90}{open triangle 90}{open triangle 90}{space}{space}
-\pgfarrowsdeclarecombine*{spaced open triangle 90 reversed}{spaced open triangle 90 reversed}{open triangle 90 reversed}{open triangle 90 reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced open triangle 60}{spaced open triangle 60}{open triangle 60}{open triangle 60}{space}{space}
-\pgfarrowsdeclarecombine*{spaced open triangle 60 reversed}{spaced open triangle 60 reversed}{open triangle 60 reversed}{open triangle 60 reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced open triangle 45}{spaced open triangle 45}{open triangle 45}{open triangle 45}{space}{space}
-\pgfarrowsdeclarecombine*{spaced open triangle 45 reversed}{spaced open triangle 45 reversed}{open triangle 45 reversed}{open triangle 45 reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced angle 90}{spaced angle 90}{angle 90}{angle 90}{space}{space}
-\pgfarrowsdeclarecombine*{spaced angle 90 reversed}{spaced angle 90 reversed}{angle 90 reversed}{angle 90 reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced angle 60}{spaced angle 60}{angle 60}{angle 60}{space}{space}
-\pgfarrowsdeclarecombine*{spaced angle 60 reversed}{spaced angle 60 reversed}{angle 60 reversed}{angle 60 reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced angle 45}{spaced angle 45}{angle 45}{angle 45}{space}{space}
-\pgfarrowsdeclarecombine*{spaced angle 45 reversed}{spaced angle 45 reversed}{angle 45 reversed}{angle 45 reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced hooks}{spaced hooks}{hooks}{hooks}{space}{space}
-\pgfarrowsdeclarecombine*{spaced hooks reversed}{spaced hooks reversed}{hooks reversed}{hooks reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced o}{spaced o}{o}{o}{space}{space}
-\pgfarrowsdeclarecombine*{spaced *}{spaced *}{*}{*}{space}{space}
-\pgfarrowsdeclarecombine*{spaced diamond}{spaced diamond}{diamond}{diamond}{space}{space}
-\pgfarrowsdeclarecombine*{spaced open diamond}{spaced open diamond}{open diamond}{open diamond}{space}{space}
-\pgfarrowsdeclarecombine*{spaced square}{spaced square}{square}{square}{space}{space}
-\pgfarrowsdeclarecombine*{spaced open square}{spaced open square}{open square}{open square}{space}{space}
-\pgfarrowsdeclarecombine*{spaced serif cm}{spaced serif cm}{serif cm}{serif cm}{space}{space}
-\pgfarrowsdeclarecombine*{spaced left to}{spaced left to}{left to}{left to}{space}{space}
-\pgfarrowsdeclarecombine*{spaced left to reversed}{spaced left to reversed}{left to reversed}{left to reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced right to}{spaced right to}{right to}{right to}{space}{space}
-\pgfarrowsdeclarecombine*{spaced right to reversed}{spaced right to reversed}{right to reversed}{right to reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced left hook}{spaced left hook}{left hook}{left hook}{space}{space}
-\pgfarrowsdeclarecombine*{spaced left hook reversed}{spaced left hook reversed}{left hook reversed}{left hook reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced right hook}{spaced right hook}{right hook}{right hook}{space}{space}
-\pgfarrowsdeclarecombine*{spaced right hook reversed}{spaced right hook reversed}{right hook reversed}{right hook reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced round cap}{spaced round cap}{round cap}{round cap}{space}{space}
-\pgfarrowsdeclarecombine*{spaced butt cap}{spaced butt cap}{butt cap}{butt cap}{space}{space}
-\pgfarrowsdeclarecombine*{spaced triangle 90 cap}{spaced triangle 90 cap}{triangle 90 cap}{triangle 90 cap}{space}{space}
-\pgfarrowsdeclarecombine*{spaced triangle 90 cap reversed}{spaced triangle 90 cap reversed}{triangle 90 cap reversed}{triangle 90 cap reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced fast cap}{spaced fast cap}{fast cap}{fast cap}{space}{space}
-\pgfarrowsdeclarecombine*{spaced fast cap reversed}{spaced fast cap reversed}{fast cap reversed}{fast cap reversed}{space}{space}
-\pgfarrowsdeclarecombine*{spaced (}{spaced )}{(}{)}{space}{space}
-\pgfarrowsdeclarecombine*{spaced )}{spaced (}{)}{(}{space}{space}
-\pgfarrowsdeclarecombine*{spaced |}{spaced |}{|}{|}{space}{space}
+\pgfarrowsdeclarecombine*{spaced to}{spaced to}{to}{to}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced to reversed}{spaced to reversed}{to reversed}{to reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced implies}{spaced implies}{implies}{implies}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced latex}{spaced latex}{latex}{latex}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced latex reversed}{spaced latex reversed}{latex reversed}{latex reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced latex'}{spaced latex'}{latex'}{latex'}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced latex' reversed}{spaced latex' reversed}{latex' reversed}{latex' reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced stealth}{spaced stealth}{stealth}{stealth}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced stealth reversed}{spaced stealth reversed}{stealth reversed}{stealth reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced stealth'}{spaced stealth'}{stealth'}{stealth'}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced stealth' reversed}{spaced stealth' reversed}{stealth' reversed}{stealth' reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced triangle 90}{spaced triangle 90}{triangle 90}{triangle 90}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced triangle 90 reversed}{spaced triangle 90 reversed}{triangle 90 reversed}{triangle 90 reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced triangle 60}{spaced triangle 60}{triangle 60}{triangle 60}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced triangle 60 reversed}{spaced triangle 60 reversed}{triangle 60 reversed}{triangle 60 reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced triangle 45}{spaced triangle 45}{triangle 45}{triangle 45}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced triangle 45 reversed}{spaced triangle 45 reversed}{triangle 45 reversed}{triangle 45 reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced open triangle 90}{spaced open triangle 90}{open triangle 90}{open triangle 90}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced open triangle 90 reversed}{spaced open triangle 90 reversed}{open triangle 90 reversed}{open triangle 90 reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced open triangle 60}{spaced open triangle 60}{open triangle 60}{open triangle 60}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced open triangle 60 reversed}{spaced open triangle 60 reversed}{open triangle 60 reversed}{open triangle 60 reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced open triangle 45}{spaced open triangle 45}{open triangle 45}{open triangle 45}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced open triangle 45 reversed}{spaced open triangle 45 reversed}{open triangle 45 reversed}{open triangle 45 reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced angle 90}{spaced angle 90}{angle 90}{angle 90}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced angle 90 reversed}{spaced angle 90 reversed}{angle 90 reversed}{angle 90 reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced angle 60}{spaced angle 60}{angle 60}{angle 60}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced angle 60 reversed}{spaced angle 60 reversed}{angle 60 reversed}{angle 60 reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced angle 45}{spaced angle 45}{angle 45}{angle 45}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced angle 45 reversed}{spaced angle 45 reversed}{angle 45 reversed}{angle 45 reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced hooks}{spaced hooks}{hooks}{hooks}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced hooks reversed}{spaced hooks reversed}{hooks reversed}{hooks reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced o}{spaced o}{o}{o}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced *}{spaced *}{*}{*}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced diamond}{spaced diamond}{diamond}{diamond}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced open diamond}{spaced open diamond}{open diamond}{open diamond}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced square}{spaced square}{square}{square}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced open square}{spaced open square}{open square}{open square}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced serif cm}{spaced serif cm}{serif cm}{serif cm}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced left to}{spaced left to}{left to}{left to}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced left to reversed}{spaced left to reversed}{left to reversed}{left to reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced right to}{spaced right to}{right to}{right to}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced right to reversed}{spaced right to reversed}{right to reversed}{right to reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced left hook}{spaced left hook}{left hook}{left hook}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced left hook reversed}{spaced left hook reversed}{left hook reversed}{left hook reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced right hook}{spaced right hook}{right hook}{right hook}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced right hook reversed}{spaced right hook reversed}{right hook reversed}{right hook reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced round cap}{spaced round cap}{round cap}{round cap}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced butt cap}{spaced butt cap}{butt cap}{butt cap}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced triangle 90 cap}{spaced triangle 90 cap}{triangle 90 cap}{triangle 90 cap}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced triangle 90 cap reversed}{spaced triangle 90 cap reversed}{triangle 90 cap reversed}{triangle 90 cap reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced fast cap}{spaced fast cap}{fast cap}{fast cap}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced fast cap reversed}{spaced fast cap reversed}{fast cap reversed}{fast cap reversed}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced (}{spaced )}{(}{)}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced )}{spaced (}{)}{(}{space}{space}%
+\pgfarrowsdeclarecombine*{spaced |}{spaced |}{|}{|}{space}{space}%
\pgfdeclarearrow{
name = spaced [-spaced ],
means = square bracket[].space
-}
+}%
\pgfdeclarearrow{
name = spaced ]-spaced [,
means = square bracket[reversed].space
-}
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarycurvilinear.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarycurvilinear.code.tex
index 2ae9eb00e5a..42217aadf30 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarycurvilinear.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarycurvilinear.code.tex
@@ -7,11 +7,11 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarycurvilinear.code.tex,v 1.4 2015/05/14 14:43:05 cfeuersaenger Exp $
+\ProvidesFileRCS{pgflibrarycurvilinear.code.tex}
%
% This file defines commands for computing points in curvilinear
-% coordinate systems.
+% coordinate systems.
%
@@ -24,7 +24,7 @@
% precomputations are done; subsequent calls to
% \pgfpointcurvilinearxxx based on this Bezier curve will be
% relatively quick.
-%
+%
@@ -51,7 +51,7 @@
% speed against precision. Also note that the results will only be
% best near the start of the curve and may be far off near the end if
% that end is degenerate (second control point very near to end
-% point).
+% point).
%
% Example:
%
@@ -60,7 +60,7 @@
% {\pgfpoint{5.5mm}{10mm}}
% {\pgfpoint{10mm}{5.5mm}}
% {\pgfpoint{10mm}{0mm}} % nearly a quarter circle
-% \pgfpointcurvilinearbezierorthogonal{5mm}{5mm}
+% \pgfpointcurvilinearbezierorthogonal{5mm}{5mm}
% % should be 5mm along the circle, put at
% % distance 15mm from the origin (5mm from the circle line).
@@ -145,7 +145,7 @@
\let\pgf@curvilinear@comp@d\pgf@curvilinear@comp@d@initial%
\let\pgf@curvilinear@comp@e\pgf@curvilinear@comp@e@initial%
\let\pgf@curvilinear@point\pgf@curvilinear@curve@point%
-}
+}%
\newdimen\pgf@curvilinear@time@a
\newdimen\pgf@curvilinear@length@a
\newdimen\pgf@curvilinear@length@b
@@ -158,10 +158,10 @@
\let\pgf@curvilinear@quot@a\pgfmathresult%
\let\pgf@curvilinear@comp@a\pgf@curvilinear@comp@a@cont%
\pgf@curvilinear@comp@a@cont%
-}
+}%
\def\pgf@curvilinear@comp@a@cont{%
\pgf@x\pgf@curvilinear@quot@a\pgf@x%
-}
+}%
\def\pgf@curvilinear@comp@b@initial{%
\pgf@y=\pgf@curvilinear@length@b%
@@ -174,11 +174,11 @@
\edef\pgf@curvilinear@correct@b{\pgf@sys@tonumber\pgf@y}%
\let\pgf@curvilinear@comp@b\pgf@curvilinear@comp@b@cont%
\pgf@curvilinear@comp@b@cont%
-}
+}%
\def\pgf@curvilinear@comp@b@cont{%
\pgf@x\pgf@curvilinear@quot@b\pgf@x%
\advance\pgf@x by\pgf@curvilinear@correct@b pt%
-}
+}%
\def\pgf@curvilinear@comp@c@initial{%
\pgf@y=\pgf@curvilinear@length@c%
@@ -192,11 +192,11 @@
\edef\pgf@curvilinear@correct@c{\pgf@sys@tonumber\pgf@y}%
\let\pgf@curvilinear@comp@c\pgf@curvilinear@comp@c@cont%
\pgf@curvilinear@comp@c@cont%
-}
+}%
\def\pgf@curvilinear@comp@c@cont{%
\pgf@x\pgf@curvilinear@quot@c\pgf@x%
\advance\pgf@x by\pgf@curvilinear@correct@c pt%
-}
+}%
\def\pgf@curvilinear@comp@d@initial{%
\pgf@y=\pgf@curvilinear@length@d%
@@ -210,11 +210,11 @@
\edef\pgf@curvilinear@correct@d{\pgf@sys@tonumber\pgf@y}%
\let\pgf@curvilinear@comp@d\pgf@curvilinear@comp@d@cont%
\pgf@curvilinear@comp@d@cont%
-}
+}%
\def\pgf@curvilinear@comp@d@cont{%
\pgf@x\pgf@curvilinear@quot@d\pgf@x%
\advance\pgf@x by\pgf@curvilinear@correct@d pt%
-}
+}%
\def\pgf@curvilinear@comp@e@initial{%
\pgfmathmultiply@{8}{\pgf@sys@tonumber\pgf@curvilinear@time@a}%
@@ -222,20 +222,20 @@
\let\pgf@curvilinear@quot@e\pgfmathresult%
\let\pgf@curvilinear@comp@e\pgf@curvilinear@comp@e@cont%
\pgf@curvilinear@comp@e@cont%
-}
+}%
\def\pgf@curvilinear@comp@e@cont{%
\pgf@x\pgf@curvilinear@quot@e\pgf@x%
-}
+}%
% Convert a distance into a time
-%
+%
% #1 = a distance
-%
+%
% Description:
%
% After having called \pgfsetcurvilinearbeziercurve, you can use this
-% macro to convert a distance into a time along the curve set in that
+% macro to convert a distance into a time along the curve set in that
% command. The result will be stored in \pgf@x. It will only be
% reasonably precise for small nonnegative #1 (in particular, #1
% should not be more than about half the length of the curve).
@@ -255,7 +255,7 @@
\else%
\pgf@curvilinear@comp@e%
\fi\fi%
-}
+}%
@@ -279,7 +279,7 @@
%
% In addition to setting \pgf@x and \pgf@y, \pgf@xa/ya will be set to
% a tangent along the curve at the given point and \pgf@xb/yb to a
-% tanget orthogonal to the curve.
+% tangent orthogonal to the curve.
\def\pgfpointcurvilinearbezierorthogonal#1#2{%
\pgfmathsetmacro\pgf@curvilinear@yfactor{#2}%
@@ -296,7 +296,7 @@
\pgf@y\pgf@curvilinear@yfactor\pgf@y%
\advance\pgf@x by\pgf@xc%
\advance\pgf@y by\pgf@yc%
-}
+}%
\def\pgf@diff@curvi@ac{%
\pgf@curvilinear@line@a%
@@ -313,7 +313,7 @@
\fi\fi\fi\fi%
\pgf@xb-\pgf@xb%
\pgf@yb-\pgf@yb%
-}
+}%
@@ -330,13 +330,13 @@
% we compute that point at distance d along the Bezier curve B. Let
% B(d) be this point. Then, we rotate this point around the start of
% the curve (B(0)) by r degrees.
-%
+%
% As an example, consider a triangle with one tip at the origin and
% the other tips as (4cm,3cm) and (4cm,-3cm). Then this triangle would be
% transformed as follows: We take the first 5cm of the Bezier curve
% and rotate it by roughly 37 degrees to the left and by 37 degrees to
% the right.
-%
+%
% Note that this command is pretty expensive.
\def\pgfpointcurvilinearbezierpolar#1#2{%
@@ -373,7 +373,7 @@
}%
\pgf@curvilinear@line@a%
}%
-}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex
index 39fca783437..8d25f73b37d 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex
@@ -7,51 +7,51 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryfadings.code.tex,v 1.3 2008/02/07 19:25:41 tantau Exp $
+\ProvidesFileRCS{pgflibraryfadings.code.tex}
% Axial fadings
\pgfdeclarehorizontalshading{pgf@lib@fade@east}{100bp}
{color(0bp)=(pgftransparent!0); color(25bp)=(pgftransparent!0);
- color(75bp)=(pgftransparent!100); color(100bp)=(pgftransparent!100)}
+ color(75bp)=(pgftransparent!100); color(100bp)=(pgftransparent!100)}%
\pgfdeclarehorizontalshading{pgf@lib@fade@west}{100bp}
{color(0bp)=(pgftransparent!100); color(25bp)=(pgftransparent!100);
- color(75bp)=(pgftransparent!0); color(100bp)=(pgftransparent!0)}
+ color(75bp)=(pgftransparent!0); color(100bp)=(pgftransparent!0)}%
\pgfdeclareverticalshading{pgf@lib@fade@north}{100bp}
{color(0bp)=(pgftransparent!0); color(25bp)=(pgftransparent!0);
- color(75bp)=(pgftransparent!100); color(100bp)=(pgftransparent!100)}
+ color(75bp)=(pgftransparent!100); color(100bp)=(pgftransparent!100)}%
\pgfdeclareverticalshading{pgf@lib@fade@south}{100bp}
{color(0bp)=(pgftransparent!100); color(25bp)=(pgftransparent!100);
- color(75bp)=(pgftransparent!0); color(100bp)=(pgftransparent!0)}
+ color(75bp)=(pgftransparent!0); color(100bp)=(pgftransparent!0)}%
-\pgfdeclarefading{east}{\pgfuseshading{pgf@lib@fade@east}}
-\pgfdeclarefading{west}{\pgfuseshading{pgf@lib@fade@west}}
-\pgfdeclarefading{north}{\pgfuseshading{pgf@lib@fade@north}}
-\pgfdeclarefading{south}{\pgfuseshading{pgf@lib@fade@south}}
+\pgfdeclarefading{east}{\pgfuseshading{pgf@lib@fade@east}}%
+\pgfdeclarefading{west}{\pgfuseshading{pgf@lib@fade@west}}%
+\pgfdeclarefading{north}{\pgfuseshading{pgf@lib@fade@north}}%
+\pgfdeclarefading{south}{\pgfuseshading{pgf@lib@fade@south}}%
% Circular fadings
\pgfdeclareradialshading{tikz@lib@fade@circle@10}{\pgfpointorigin}{
color(0pt)=(pgftransparent!0); color(22.5bp)=(pgftransparent!0);
- color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}
-\pgfdeclarefading{circle with fuzzy edge 10 percent}{\pgfuseshading{tikz@lib@fade@circle@10}}
+ color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}%
+\pgfdeclarefading{circle with fuzzy edge 10 percent}{\pgfuseshading{tikz@lib@fade@circle@10}}%
\pgfdeclareradialshading{tikz@lib@fade@circle@15}{\pgfpointorigin}{
color(0pt)=(pgftransparent!0); color(21.25bp)=(pgftransparent!0);
- color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}
-\pgfdeclarefading{circle with fuzzy edge 15 percent}{\pgfuseshading{tikz@lib@fade@circle@15}}
+ color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}%
+\pgfdeclarefading{circle with fuzzy edge 15 percent}{\pgfuseshading{tikz@lib@fade@circle@15}}%
\pgfdeclareradialshading{tikz@lib@fade@circle@20}{\pgfpointorigin}{
color(0pt)=(pgftransparent!0); color(20bp)=(pgftransparent!0);
- color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}
-\pgfdeclarefading{circle with fuzzy edge 20 percent}{\pgfuseshading{tikz@lib@fade@circle@20}}
+ color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}%
+\pgfdeclarefading{circle with fuzzy edge 20 percent}{\pgfuseshading{tikz@lib@fade@circle@20}}%
\pgfdeclareradialshading{tikz@lib@fade@fuzzy@15}{\pgfpointorigin}{
color(0pt)=(pgftransparent!100); color(21.25bp)=(pgftransparent!100); color(23.125bp)=(pgftransparent!0);
- color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}
-\pgfdeclarefading{fuzzy ring 15 percent}{\pgfuseshading{tikz@lib@fade@fuzzy@15}}
+ color(25bp)=(pgftransparent!100); color(50bp)=(pgftransparent!100)}%
+\pgfdeclarefading{fuzzy ring 15 percent}{\pgfuseshading{tikz@lib@fade@fuzzy@15}}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfixedpointarithmetic.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfixedpointarithmetic.code.tex
index 50a7521f826..b860192f45c 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfixedpointarithmetic.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfixedpointarithmetic.code.tex
@@ -9,131 +9,132 @@
\pgfkeys{/pgf/.cd,
- fixed point arithmetic/.code={%
- \pgfmathfp@plots@install%
- \pgfmathfp@parser@install%
- \let\pgfmathparse=\pgfmathfpparse%
- \pgfkeys{/pgf/fixed point/.cd, #1}%
- },%
- fixed point/.cd,
- scale results/.code={%
- \pgfmathfpparse{#1}%
- \let\pgfmathfpscale=\pgfmathresult%
- }%
-}
-
-\def\pgfmathfpscale{1}
+ fixed point arithmetic/.code={%
+ \pgfmathfp@plots@install%
+ \pgfmathfp@parser@install%
+ \let\pgfmathparse=\pgfmathfpparse%
+ \pgfkeys{/pgf/fixed point/.cd, #1}%
+ },%
+ fixed point/.cd,
+ scale results/.code={%
+ \pgfmathfpparse{#1}%
+ \let\pgfmathfpscale=\pgfmathresult%
+ }%
+}%
+
+\def\pgfmathfpscale{1}%
\def\pgfmathfpparse{%
- \begingroup%
- \let\pgfmathpostparse=\relax%
- \pgfmath@catcodes%
- \pgfmath@quickparsefalse%
- \pgfmathfpparse@}
+ \begingroup%
+ \let\pgfmathpostparse=\relax%
+ \pgfmath@catcodes%
+ \pgfmath@quickparsefalse%
+ \pgfmathfpparse@}%
\def\pgfmathfpparse@#1{%
- \edef\pgfmathfp@expression{#1}%
- \expandafter\pgfmathfpparse@@\pgfmathfp@expression\pgfmathfp@}
+ \edef\pgfmathfp@expression{#1}%
+ \expandafter\pgfmathfpparse@@\pgfmathfp@expression\pgfmathfp@}%
-\def\pgfmathfp@char@asterisk{*}
+\def\pgfmathfp@char@asterisk{*}%
\def\pgfmathfpparse@@#1#2\pgfmathfp@{%
- \def\pgfmathfp@test{#1}%
- \ifx\pgfmathfp@test\pgfmathfp@char@asterisk%
- \edef\pgfmathfp@expression{\pgfmathfpscale#1#2}%
- \else%
- \edef\pgfmathfp@expression{#1#2}%
- \fi%
- \expandafter\pgfmathparse@\expandafter{\pgfmathfp@expression}%
- % \endgroup provided by \pgfpathmarse@end
-}
+ \def\pgfmathfp@test{#1}%
+ \ifx\pgfmathfp@test\pgfmathfp@char@asterisk%
+ \edef\pgfmathfp@expression{\pgfmathfpscale#1#2}%
+ \else%
+ \edef\pgfmathfp@expression{#1#2}%
+ \fi%
+ \expandafter\pgfmathparse@\expandafter{\pgfmathfp@expression}%
+ % \endgroup provided by \pgfpathmarse@end
+}%
% Crude handling of file plots
%
\pgfkeys{/pgf/fixed point/.cd,
scale file plot x/.code=\pgfmathfpparse{#1}\edef\pgfmathfpplotscalex{\pgfmathresult*},
scale file plot y/.code=\pgfmathfpparse{#1}\edef\pgfmathfpplotscaley{\pgfmathresult*},
- scale file plot z/.code=\pgfmathfpparse{#1}\edef\pgfmathfpplotscalez{\pgfmathresult*}
-}
+ scale file plot z/.code=\pgfmathfpparse{#1}\edef\pgfmathfpplotscalez{\pgfmathresult*},
+}%
\def\pgfmathfp@plots@install{%
- \let\pgfmathfpplotscalex=\pgfutil@empty
- \let\pgfmathfpplotscaley=\pgfutil@empty
- \let\pgfmathfpplotscalez=\pgfutil@empty
- \let\pgf@parsexyline=\pgfmathfp@parsexyline%
- \let\pgf@parsexyzline=\pgfmathfp@parsexyzline%
-}
+ \let\pgfmathfpplotscalex=\pgfutil@empty
+ \let\pgfmathfpplotscaley=\pgfutil@empty
+ \let\pgfmathfpplotscalez=\pgfutil@empty
+ \let\pgf@parsexyline=\pgfmathfp@parsexyline%
+ \let\pgf@parsexyzline=\pgfmathfp@parsexyzline%
+}%
\def\pgfmathfp@parsexyline#1 #2 #3\pgf@stop{%
- \edef\pgfmathfp@marshal{%
- \noexpand\pgfplotstreampoint{\noexpand\pgfpointxy{\pgfmathfpplotscalex#1}{\pgfmathfpplotscaley#2}}%
- }%
- \pgfmathfp@marshal%
-}
+ \edef\pgfmathfp@marshal{%
+ \noexpand\pgfplotstreampoint{\noexpand\pgfpointxy{\pgfmathfpplotscalex#1}{\pgfmathfpplotscaley#2}}%
+ }%
+ \pgfmathfp@marshal%
+}%
\def\pgfmathfp@parsexyzline#1 #2 #3 #4\pgf@stop{%
- \edef\pgfmathfp@marshal{%
- \noexpand\pgfplotstreampoint{%
- \noexpand\pgfpointxyz{\pgfmathfpplotscalex#1}{\pgfmathfpplotscaley#2}{\pgfmathfpplotscalez#3}%
- }%
- }%
- \pgfmathfp@marshal%
-}
-
-%
+ \edef\pgfmathfp@marshal{%
+ \noexpand\pgfplotstreampoint{%
+ \noexpand\pgfpointxyz{\pgfmathfpplotscalex#1}{\pgfmathfpplotscaley#2}{\pgfmathfpplotscalez#3}%
+ }%
+ }%
+ \pgfmathfp@marshal%
+}%
+
+%
\def\pgfmathfp@parser@install{%
- %
- \expandafter\ifx\csname FP@version\endcsname\relax%
- \pgferror{You need to say `\string\usepackage{fp}' to use %
- fixed point arithmetic}%
- \else%
- %
- % Don't want messages.
- %
- \FPmessagesfalse%
- \FPdebugfalse%
- %
- % Install float commands...
- %
- \let\pgfmathadd@=\pgfmathfpadd@%
- \let\pgfmathsubtract@=\pgfmathfpsubtract@%
- \let\pgfmathmultiply@=\pgfmathfpmultiply@%
- \let\pgfmathdivide@=\pgfmathfpdivide@%
- \let\pgfmathabs@=\pgfmathfpabs@%
- \let\pgfmathround@=\pgfmathfpround@%
- \let\pgfmathfloor@=\pgfmathfpfloor@%
- \let\pgfmathceil@=\pgfmathfpceil@%
- \let\pgfmathmod@=\pgfmathfpmod@%
- \let\pgfmathmax@=\pgfmathfpmax@%
- \let\pgfmathmin@=\pgfmathfpmin@%
- \let\pgfmathsin@=\pgfmathfpsin@%
- \let\pgfmathcos@=\pgfmathfpcos@%
- \let\pgfmathtan@=\pgfmathfptan@%
- \let\pgfmathdeg@=\pgfmathfpdeg@%
- \let\pgfmathrad@=\pgfmathfprad@%
- \let\pgfmathatan@=\pgfmathfpatan@%
- \let\pgfmathasin@=\pgfmathfpasin@%
- \let\pgfmathacos@=\pgfmathfpacos@%
- \let\pgfmathcot@=\pgfmathfpcot@%
- \let\pgfmathsec@=\pgfmathfpsec@%
- \let\pgfmathcosec@=\pgfmathfpcosec@%
- \let\pgfmathpow@=\pgfmathfppow@%
- \let\pgfmathexp@=\pgfmathfpexp@%
- \let\pgfmathln@=\pgfmathfpln@%
- \let\pgfmathsqrt@=\pgfmathfpsqrt@%
- \let\pgfmath@pi=\pgfmathfppi@%
- \let\pgfmathveclen@=\pgfmathfpveclen@%
- \let\pgfmathe@=\pgfmathfpe@%
- %
- \let\pgfmathlessthan@=\pgfmathfplessthan@%
- \let\pgfmathgreaterthan@=\pgfmathfpgreaterthan@%
- \let\pgfmathequalto@=\pgfmathfpequalto@%
- %
- \let\pgfmathrnd=\pgfmathfprnd%
- \let\pgfmathrand=\pgfmathfprand%
- \let\pgfmathsetseed=\pgfmathfpsetseed%
- %
- \let\pgfmathscientific=\pgfmathfpscientific%
- \fi%
+ %
+ \expandafter\ifx\csname FP@version\endcsname\relax%
+ \pgferror{You need to say `\string\usepackage{fp}' to use %
+ fixed point arithmetic}%
+ \else%
+ %
+ % Don't want messages.
+ %
+ \FPmessagesfalse%
+ \FPdebugfalse%
+ %
+ % Install float commands...
+ %
+ \let\pgfmathadd@=\pgfmathfpadd@%
+ \let\pgfmathsubtract@=\pgfmathfpsubtract@%
+ \let\pgfmathmultiply@=\pgfmathfpmultiply@%
+ \let\pgfmathdivide@=\pgfmathfpdivide@%
+ \let\pgfmathabs@=\pgfmathfpabs@%
+ \let\pgfmathneg@=\pgfmathfpneg@%
+ \let\pgfmathround@=\pgfmathfpround@%
+ \let\pgfmathfloor@=\pgfmathfpfloor@%
+ \let\pgfmathceil@=\pgfmathfpceil@%
+ \let\pgfmathmod@=\pgfmathfpmod@%
+ \let\pgfmathmax@=\pgfmathfpmax@%
+ \let\pgfmathmin@=\pgfmathfpmin@%
+ \let\pgfmathsin@=\pgfmathfpsin@%
+ \let\pgfmathcos@=\pgfmathfpcos@%
+ \let\pgfmathtan@=\pgfmathfptan@%
+ \let\pgfmathdeg@=\pgfmathfpdeg@%
+ \let\pgfmathrad@=\pgfmathfprad@%
+ \let\pgfmathatan@=\pgfmathfpatan@%
+ \let\pgfmathasin@=\pgfmathfpasin@%
+ \let\pgfmathacos@=\pgfmathfpacos@%
+ \let\pgfmathcot@=\pgfmathfpcot@%
+ \let\pgfmathsec@=\pgfmathfpsec@%
+ \let\pgfmathcosec@=\pgfmathfpcosec@%
+ \let\pgfmathpow@=\pgfmathfppow@%
+ \let\pgfmathexp@=\pgfmathfpexp@%
+ \let\pgfmathln@=\pgfmathfpln@%
+ \let\pgfmathsqrt@=\pgfmathfpsqrt@%
+ \let\pgfmath@pi=\pgfmathfppi@%
+ \let\pgfmathveclen@=\pgfmathfpveclen@%
+ \let\pgfmathe@=\pgfmathfpe@%
+ %
+ \let\pgfmathlessthan@=\pgfmathfplessthan@%
+ \let\pgfmathgreaterthan@=\pgfmathfpgreaterthan@%
+ \let\pgfmathequalto@=\pgfmathfpequalto@%
+ %
+ \let\pgfmathrnd=\pgfmathfprnd%
+ \let\pgfmathrand=\pgfmathfprand%
+ \let\pgfmathsetseed=\pgfmathfpsetseed%
+ %
+ \let\pgfmathscientific=\pgfmathfpscientific%
+ \fi%
}%
\def\pgfmathfpe@{let\pgfmathresult=\FPe}%
@@ -143,495 +144,513 @@
% Scientific notation.
\def\pgfmathfpscientific#1#2{%
- \begingroup%
- \FPpow\pgfmathresult{10}{#2}\unskip% Needed.
- \FPmul\pgfmathresult{#1}{\pgfmathresult}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPpow\pgfmathresult{10}{#2}\unskip% Needed.
+ \FPmul\pgfmathresult{#1}{\pgfmathresult}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% Comparison stuff...
% lessthan
%
\def\pgfmathfplessthan#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfplessthan@{\pgfmathresult}{\pgfmath@result}%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfplessthan@{\pgfmathresult}{\pgfmath@result}%
+}%
\def\pgfmathfplessthan@#1#2{%
- \begingroup%
- \FPiflt{#1}{#2}%
- \def\pgfmathresult{1.0}%
- \else%
- \def\pgfmathresult{0.0}%
- \fi%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPiflt{#1}{#2}%
+ \def\pgfmathresult{1.0}%
+ \else%
+ \def\pgfmathresult{0.0}%
+ \fi%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% greaterthan
%
\def\pgfmathfpgreaterthan#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfpgreaterthan@{\pgfmathresult}{\pgfmath@result}%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfpgreaterthan@{\pgfmathresult}{\pgfmath@result}%
+}%
\def\pgfmathfpgreaterthan@#1#2{%
- \begingroup%
- \FPifgt{#1}{#2}%
- \def\pgfmathresult{1.0}%
- \else%
- \def\pgfmathresult{0.0}%
- \fi%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPifgt{#1}{#2}%
+ \def\pgfmathresult{1.0}%
+ \else%
+ \def\pgfmathresult{0.0}%
+ \fi%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% equalto
%
\def\pgfmathfpequalto#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfpequalto@{\pgfmathresult}{\pgfmath@result}%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfpequalto@{\pgfmathresult}{\pgfmath@result}%
+}%
\def\pgfmathfpequalto@#1#2{%
- \begingroup%
- \FPifeq{#1}{#2}%
- \def\pgfmathresult{1.0}%
- \else%
- \def\pgfmathresult{0.0}%
- \fi%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
-
-
+ \begingroup%
+ \FPifeq{#1}{#2}%
+ \def\pgfmathresult{1.0}%
+ \else%
+ \def\pgfmathresult{0.0}%
+ \fi%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
+
+
% Basic arithmetic stuff...
% add
%
\def\pgfmathfpadd#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfpadd@{\pgfmathresult}{\pgfmath@result}%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfpadd@{\pgfmathresult}{\pgfmath@result}%
+}%
\def\pgfmathfpadd@#1#2{%
- \begingroup%
- \FPadd\pgfmathresult{#1}{#2}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPadd\pgfmathresult{#1}{#2}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% subtract
%
\def\pgfmathfpsubtract#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfpsubtract@{\pgfmathresult}{\pgfmath@result}%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfpsubtract@{\pgfmathresult}{\pgfmath@result}%
+}%
\def\pgfmathfpsubtract@#1#2{%
- \begingroup%
- \FPsub\pgfmathresult{#1}{#2}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPsub\pgfmathresult{#1}{#2}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% multiply
%
\def\pgfmathfpmultiply#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfpmultiply@{\pgfmathresult}{\pgfmath@result}%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfpmultiply@{\pgfmathresult}{\pgfmath@result}%
+}%
\def\pgfmathfpmultiply@#1#2{%
- \begingroup%
- \FPmul\pgfmathresult{#1}{#2}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPmul\pgfmathresult{#1}{#2}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% divide
%
\def\pgfmathfpdivide#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfpdivide@{\pgfmathresult}{\pgfmath@result}%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfpdivide@{\pgfmathresult}{\pgfmath@result}%
+}%
\def\pgfmathfpdivide@#1#2{%
- \begingroup%
- \FPdiv\pgfmathresult{#1}{#2}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPdiv\pgfmathresult{#1}{#2}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% abs
%
\def\pgfmathfpabs#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpabs@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpabs@{\pgfmathresult}%
+}%
\def\pgfmathfpabs@#1{%
- \begingroup%
- \FPabs\pgfmathresult{#1}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPabs\pgfmathresult{#1}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
+
+% neg
+%
+\def\pgfmathfpneg#1{%
+ \pgfmathfpparse{#1}%
+ \pgfmathfpneg@{\pgfmathresult}%
+}%
+\def\pgfmathfpneg@#1{%
+ \begingroup%
+ \FPneg\pgfmathresult{#1}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup%
+}%
% round
%
\def\pgfmathfpround#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpround@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpround@{\pgfmathresult}%
+}%
\def\pgfmathfpround@#1{%
- \begingroup%
- \FPround\pgfmathresult{#1}{0}%
- \edef\pgfmathresult{\pgfmathresult.0}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPround\pgfmathresult{#1}{0}%
+ \edef\pgfmathresult{\pgfmathresult.0}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% floor
%
\def\pgfmathfpfloor#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpfloor@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpfloor@{\pgfmathresult}%
+}%
\def\pgfmathfpfloor@#1{%
- \begingroup%
- \FPtrunc\pgfmathresult{#1}{0}%
- \FPifneg{#1}%
- \FPsub\pgfmathresult{\pgfmathresult}{1}%
- \fi%
- \edef\pgfmathresult{\pgfmathresult.0}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPtrunc\pgfmathresult{#1}{0}%
+ \FPifneg{#1}%
+ \FPsub\pgfmathresult{\pgfmathresult}{1}%
+ \fi%
+ \edef\pgfmathresult{\pgfmathresult.0}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% ceil
%
\def\pgfmathfpceil#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpceil@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpceil@{\pgfmathresult}%
+}%
\def\pgfmathfpceil@#1{%
- \begingroup%
- \FPtrunc\pgfmathresult{#1}{0}%
- \FPifpos{#1}%
- \FPadd\pgfmathresult{\pgfmathresult}{1}%
- \fi%
- \edef\pgfmathresult{\pgfmathresult.0}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPtrunc\pgfmathresult{#1}{0}%
+ \FPifpos{#1}%
+ \FPadd\pgfmathresult{\pgfmathresult}{1}%
+ \fi%
+ \edef\pgfmathresult{\pgfmathresult.0}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% mod
%
\def\pgfmathfpmod#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfpmod@{\pgfmathresult}{\pgfmath@result}%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfpmod@{\pgfmathresult}{\pgfmath@result}%
+}%
\def\pgfmathfpmod@#1#2{%
- \begingroup%
- \FPdiv\pgfmathresult{#1}{#2}%
- \FPtrunc\pgfmathresult{\pgfmathresult}{0}%
- \FPmul\pgfmathresult{\pgfmathresult}{#2}%
- \FPsub\pgfmathresult{#1}{\pgfmathresult}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPdiv\pgfmathresult{#1}{#2}%
+ \FPtrunc\pgfmathresult{\pgfmathresult}{0}%
+ \FPmul\pgfmathresult{\pgfmathresult}{#2}%
+ \FPsub\pgfmathresult{#1}{\pgfmathresult}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% max
%
\def\pgfmathfpmax#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfpmax@{\pgfmathresult}{\pgfmath@result}%
-}
-\def\pgfmathfpmax@#1#2{%
- \begingroup%
- \FPifgt{#1}{#2}%
- \def\pgfmathresult{#1}%
- \else%
- \def\pgfmathresult{#2}%
- \fi%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfpmax@@{\pgfmathresult}{\pgfmath@result}%
+}%
+\def\pgfmathfpmax@#1{%
+ \pgfmathfpmax@@#1%
+}%
+\def\pgfmathfpmax@@#1#2{%
+ \begingroup%
+ \FPifgt{#1}{#2}%
+ \def\pgfmathresult{#1}%
+ \else%
+ \def\pgfmathresult{#2}%
+ \fi%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% min
%
\def\pgfmathfpmin#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfpmin@{\pgfmathresult}{\pgfmath@result}%
-}
-\def\pgfmathfpmin@#1#2{%
- \begingroup%
- \FPiflt{#1}{#2}%
- \def\pgfmathresult{#1}%
- \else%
- \def\pgfmathresult{#2}%
- \fi%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfpmin@@{\pgfmathresult}{\pgfmath@result}%
+}%
+\def\pgfmathfpmin@#1{%
+ \pgfmathfpmin@@#1%
+}%
+\def\pgfmathfpmin@@#1#2{%
+ \begingroup%
+ \FPiflt{#1}{#2}%
+ \def\pgfmathresult{#1}%
+ \else%
+ \def\pgfmathresult{#2}%
+ \fi%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% Functions...
% pow
%
\def\pgfmathfppow#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfppow@{\pgfmathresult}{\pgfmath@result}%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfppow@{\pgfmathresult}{\pgfmath@result}%
+}%
\def\pgfmathfppow@#1#2{%
- \begingroup%
- \FPpow\pgfmathresult{#1}{#2}\unskip%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPpow\pgfmathresult{#1}{#2}\unskip%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% exp
%
\def\pgfmathfpexp#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpexp@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpexp@{\pgfmathresult}%
+}%
\def\pgfmathfpexp@#1{%
- \begingroup%
- \FPexp\pgfmathresult{#1}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPexp\pgfmathresult{#1}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% ln
%
\def\pgfmathfpln#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpln@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpln@{\pgfmathresult}%
+}%
\def\pgfmathfpln@#1{%
- \begingroup%
- \FPln\pgfmathresult{#1}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPln\pgfmathresult{#1}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% sqrt
%
\def\pgfmathfpsqrt#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpsqrt@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpsqrt@{\pgfmathresult}%
+}%
\def\pgfmathfpsqrt@#1{%
- \begingroup%
- \FProot\pgfmathresult{#1}{2}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FProot\pgfmathresult{#1}{2}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% veclen
%
\def\pgfmathfpveclen#1#2{%
- \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
- \pgfmathfpparse{#1}%
- \pgfmathfpveclen@{\pgfmathresult}{\pgfmath@result}%
-}
+ \pgfmathfpparse{#2}\let\pgfmath@result=\pgfmathresult%
+ \pgfmathfpparse{#1}%
+ \pgfmathfpveclen@{\pgfmathresult}{\pgfmath@result}%
+}%
\def\pgfmathfpveclen@#1#2{%
- \begingroup%
- \FPmul\pgfmath@result{#1}{#1}%
- \FPmul\pgfmath@@result{#2}{#2}%
- \FPadd\pgfmathresult{\pgfmath@result}{\pgfmath@@result}%
- \FProot\pgfmathresult{\pgfmathresult}{2}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPmul\pgfmath@result{#1}{#1}%
+ \FPmul\pgfmath@@result{#2}{#2}%
+ \FPadd\pgfmathresult{\pgfmath@result}{\pgfmath@@result}%
+ \FProot\pgfmathresult{\pgfmathresult}{2}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% Trigonometric stuff...
% sin
%
\def\pgfmathfpsin#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpsin@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpsin@{\pgfmathresult}%
+}%
\def\pgfmathfpsin@#1{%
- \begingroup%
- \FPmul\pgfmathresult{#1}{0.017453292519943295}%
- \FPsin\pgfmathresult{\pgfmathresult}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPmul\pgfmathresult{#1}{0.017453292519943295}%
+ \FPsin\pgfmathresult{\pgfmathresult}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% cos
%
\def\pgfmathfpcos#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpcos@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpcos@{\pgfmathresult}%
+}%
\def\pgfmathfpcos@#1{%
- \begingroup%
- \FPmul\pgfmathresult{#1}{0.017453292519943295}%
- \FPcos\pgfmathresult{\pgfmathresult}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPmul\pgfmathresult{#1}{0.017453292519943295}%
+ \FPcos\pgfmathresult{\pgfmathresult}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% tan
%
\def\pgfmathfptan#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfptan@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfptan@{\pgfmathresult}%
+}%
\def\pgfmathfptan@#1{%
- \begingroup%
- \FPmul\pgfmathresult{#1}{0.017453292519943295}%
- \FPtan\pgfmathresult{\pgfmathresult}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPmul\pgfmathresult{#1}{0.017453292519943295}%
+ \FPtan\pgfmathresult{\pgfmathresult}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% acos
%
\def\pgfmathfpacos#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpacos@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpacos@{\pgfmathresult}%
+}%
\def\pgfmathfpacos@#1{%
- \begingroup%
- \FParccos\pgfmathresult{#1}%
- \FPmul\pgfmathresult{\pgfmathresult}{57.295779513082320885}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FParccos\pgfmathresult{#1}%
+ \FPmul\pgfmathresult{\pgfmathresult}{57.295779513082320885}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% asin
%
\def\pgfmathfpasin#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpasin@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpasin@{\pgfmathresult}%
+}%
\def\pgfmathfpasin@#1{%
- \begingroup%
- \FParcsin\pgfmathresult{#1}%
- \FPmul\pgfmathresult{\pgfmathresult}{57.295779513082320885}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FParcsin\pgfmathresult{#1}%
+ \FPmul\pgfmathresult{\pgfmathresult}{57.295779513082320885}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% atan
%
\def\pgfmathfpatan#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpatan@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpatan@{\pgfmathresult}%
+}%
\def\pgfmathfpatan@#1{%
- \begingroup%
- \FParctan\pgfmathresult{#1}%
- \FPmul\pgfmathresult{\pgfmathresult}{57.295779513082320885}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FParctan\pgfmathresult{#1}%
+ \FPmul\pgfmathresult{\pgfmathresult}{57.295779513082320885}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% cot
%
\def\pgfmathfpcot#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpcot@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpcot@{\pgfmathresult}%
+}%
\def\pgfmathfpcot@#1{%
- \begingroup%
- \FPmul\pgfmathresult{#1}{0.017453292519943295}%
- \FPcot\pgfmathresult{\pgfmathresult}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPmul\pgfmathresult{#1}{0.017453292519943295}%
+ \FPcot\pgfmathresult{\pgfmathresult}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% sec
%
\def\pgfmathfpsec#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpsec@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpsec@{\pgfmathresult}%
+}%
\def\pgfmathfpsec@#1{%
- \begingroup%
- \FPmul\pgfmathresult{#1}{0.017453292519943295}%
- \FPcos\pgfmathresult{\pgfmathresult}%
- \FPdiv\pgfmathresult{1}{\pgfmathresult}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPmul\pgfmathresult{#1}{0.017453292519943295}%
+ \FPcos\pgfmathresult{\pgfmathresult}%
+ \FPdiv\pgfmathresult{1}{\pgfmathresult}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% cosec
%
\def\pgfmathfpcosec#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpcosec@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpcosec@{\pgfmathresult}%
+}%
\def\pgfmathfpcosec@#1{%
- \begingroup%
- \FPmul\pgfmathresult{#1}{0.017453292519943295}%
- \FPsin\pgfmathresult{\pgfmathresult}%
- \FPdiv\pgfmathresult{1}{\pgfmathresult}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPmul\pgfmathresult{#1}{0.017453292519943295}%
+ \FPsin\pgfmathresult{\pgfmathresult}%
+ \FPdiv\pgfmathresult{1}{\pgfmathresult}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% deg
%
\def\pgfmathfpdeg#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfpdeg@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfpdeg@{\pgfmathresult}%
+}%
\def\pgfmathfpdeg@#1{%
- \begingroup%
- \FPmul\pgfmathresult{#1}{57.295779513082320885}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPmul\pgfmathresult{#1}{57.295779513082320885}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% rad
%
\def\pgfmathfprad#1{%
- \pgfmathfpparse{#1}%
- \pgfmathfprad@{\pgfmathresult}%
-}
+ \pgfmathfpparse{#1}%
+ \pgfmathfprad@{\pgfmathresult}%
+}%
\def\pgfmathfprad@#1{%
- \begingroup%
- \FPmul\pgfmathresult{#1}{0.01745329251994325}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPmul\pgfmathresult{#1}{0.01745329251994325}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% Random stuff...
\def\pgfmathfpsetseed#1{%
- \pgfmathfpparse{#1}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \FPseed\pgfmathresult\relax\pgfmath@%
-}
+ \pgfmathfpparse{#1}%
+ \afterassignment\pgfmath@gobbletilpgfmath@%
+ \FPseed\pgfmathresult\relax\pgfmath@%
+}%
% rnd
%
\def\pgfmathfprnd{%
- \begingroup%
- \FPrandom\pgfmathresult%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
+ \begingroup%
+ \FPrandom\pgfmathresult%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
% rand
%
\def\pgfmathfprand{%
- \begingroup%
- \FPrandom\pgfmathresult%
- \FPmul\pgfmathresult{2}{\pgfmathresult}%
- \FPsub\pgfmathresult{\pgfmathresult}{1}%
- \pgfmath@smuggleone\pgfmathresult%
- \endgroup%
-}
-
+ \begingroup%
+ \FPrandom\pgfmathresult%
+ \FPmul\pgfmathresult{2}{\pgfmathresult}%
+ \FPsub\pgfmathresult{\pgfmathresult}{1}%
+ \pgfmath@smuggleone\pgfmathresult%
+ \endgroup%
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfpu.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfpu.code.tex
index 00ce27705f8..d976f99205e 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfpu.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfpu.code.tex
@@ -13,114 +13,125 @@
% public macro which invokes '#1' if the fpu is installed and ready and '#2'
% otherwise.
\def\pgflibraryfpuifactive#1#2{%
- \ifpgfmathfloatparseactive
- #1%
- \else
- #2%
- \fi
+ \ifpgfmathfloatparseactive
+ #1%
+ \else
+ #2%
+ \fi
}%
\pgfqkeys{/pgf}{
- % enable the FPU parser if it is not yet active
- %
- % It will be deactivated after the current TeX group
- fpu/.is choice,
- fpu/true/.code={%
- \ifpgfmathfloatparseactive
- \else
- \pgfutil@ifundefined{pgfmathdeclarefunction}{%
- % Ohoh - we are running on a TeX distribution with
- % PGF 2.00 which doesn't have the new math engine.
- % I can provide special treatment here, provided that
- % all float commands are still able to run (that means
- % more information needs to be copied from the pgf cvs
- % to pgf 2.00 - for example pgfmathfloat.code.tex).
- %
- % I employ this to work with pgfplots and pgf 2.00
- % using all new features.
- \pgfmathfloat@parser@install@pgf@two@null@null%
- }{%
- \pgfmathfloat@parser@install%
- }%
- \pgfmathfloatparseactivetrue
- % improve compatibility with Marks FP library:
- \pgfkeysalso{/pgf/fixed point arithmetic/.prefix style={/pgf/fpu=false}}%
- \fi
- },%
- fpu/false/.code={%
- \ifpgfmathfloatparseactive
- \pgfmathfloat@uninstall%
- \pgfmathfloatparseactivefalse
- \fi
- },%
- fpu/.default=true,
- % Use this to introduce a result scaling.
- % Every expression in which the prefix '*' occurs
- % will be multiplied with the result and converted to fixed point
- % representation.
- fpu/scale results/.code={%
- \ifpgfmathfloatparseactive
- \pgfmathparse{#1}%
- \else
- \pgfmathfloatparsenumber{#1}%
- \fi
- \let\pgfmathfloatscale=\pgfmathresult%
- },%
- % determines the output format of each complete expression parsing
- % process. If 'scale results' is active, 'fixed' is assumed
- % automatically.
- fpu/output format/.is choice,
- fpu/output format/float/.code= {\let\pgfmathfloatparse@output=\relax},
- fpu/output format/sci/.code= {\def\pgfmathfloatparse@output{\pgfmathfloattosci@{\pgfmathresult}}},
- fpu/output format/fixed/.code= {\def\pgfmathfloatparse@output{\pgfmathfloattofixed@{\pgfmathresult}}},
- fpu/output format/float,
- fpu/rel thresh/.code={%
- \pgfmathfloatparsenumber{#1}%
- \let\pgfmathfloat@relthresh=\pgfmathresult
- },
- fpu/rel thresh=1e-4,
-}
+ % enable the FPU parser if it is not yet active
+ %
+ % It will be deactivated after the current TeX group
+ fpu/.is choice,
+ fpu/true/.code={%
+ \ifpgfmathfloatparseactive
+ \else
+ \pgfutil@ifundefined{pgfmathdeclarefunction}{%
+ % Ohoh - we are running on a TeX distribution with
+ % PGF 2.00 which doesn't have the new math engine.
+ % I can provide special treatment here, provided that
+ % all float commands are still able to run (that means
+ % more information needs to be copied from the pgf cvs
+ % to pgf 2.00 - for example pgfmathfloat.code.tex).
+ %
+ % I employ this to work with pgfplots and pgf 2.00
+ % using all new features.
+ \pgfmathfloat@parser@install@pgf@two@null@null%
+ }{%
+ \pgfmathfloat@parser@install%
+ }%
+ \pgfmathfloatparseactivetrue
+ % improve compatibility with Marks FP library:
+ \pgfkeysalso{/pgf/fixed point arithmetic/.prefix style={/pgf/fpu=false}}%
+ \fi
+ },%
+ fpu/false/.code={%
+ \ifpgfmathfloatparseactive
+ \pgfmathfloat@uninstall%
+ \pgfmathfloatparseactivefalse
+ \fi
+ },%
+ fpu/.default=true,
+ % Use this to introduce a result scaling.
+ % Every expression in which the prefix '*' occurs
+ % will be multiplied with the result and converted to fixed point
+ % representation.
+ fpu/scale results/.code={%
+ \ifpgfmathfloatparseactive
+ \pgfmathparse{#1}%
+ \else
+ \pgfmathfloatparsenumber{#1}%
+ \fi
+ \let\pgfmathfloatscale=\pgfmathresult%
+ },%
+ % determines the output format of each complete expression parsing
+ % process. If 'scale results' is active, 'fixed' is assumed
+ % automatically.
+ fpu/output format/.is choice,
+ fpu/output format/float/.code= {%
+ \def\pgfmathfloatparse@output@choice{Y}%
+ \let\pgfmathfloatparse@output=\relax
+ },
+ fpu/output format/sci/.code= {%
+ \def\pgfmathfloatparse@output@choice{S}%
+ \def\pgfmathfloatparse@output{\pgfmathfloattosci@{\pgfmathresult}}%
+ },
+ fpu/output format/fixed/.code= {%
+ \def\pgfmathfloatparse@output@choice{F}%
+ \def\pgfmathfloatparse@output{\pgfmathfloattofixed@{\pgfmathresult}}%
+ },
+ fpu/output format/float,
+ fpu/rel thresh/.code={%
+ \pgfmathfloatparsenumber{#1}%
+ \let\pgfmathfloat@relthresh=\pgfmathresult
+ },
+ fpu/rel thresh=1e-4,
+}%
\pgfmathfloatcreate{1}{1.0}{0}\let\pgfmathfloatscale=\pgfmathresult
+\let\pgfmathfloatone=\pgfmathresult
+
% This is the replacement parser invocation.
% It does two things which are different to \pgfmathparse:
-% 1. it disables any dimension dependand scalings,
+% 1. it disables any dimension dependent scalings,
% 2. it implements the 'scale results' feature.
\def\pgfmathfloatparse{%
- \begingroup%
- % disable any dimension-dependant scalings:
- \let\pgfmathpostparse=\relax%
- \pgfmath@catcodes%
- \pgfmath@quickparsefalse%
- \pgfmathfloatparse@}
+ \begingroup%
+ % disable any dimension-dependant scalings:
+ \let\pgfmathpostparse=\relax%
+ \pgfmath@catcodes%
+ \pgfmath@quickparsefalse%
+ \pgfmathfloatparse@}%
% for pgf 2.00 :
\def\pgfmathfloatparse@pgf@two@null@null{%
- \pgfmath@quickparsefalse%
- \pgfmathfloatparse@}
+ \pgfmath@quickparsefalse%
+ \pgfmathfloatparse@}%
\def\pgfmathfloatparse@#1{%
- \edef\pgfmathfloat@expression{#1}%
- \expandafter\pgfmathfloatparse@@\pgfmathfloat@expression\pgfmathfloat@
- \ifpgfmathfloat@scaleactive
- \expandafter\pgfmathfloatmultiply@\expandafter{\pgfmathresult}{\pgfmathfloatscale}
- \pgfmathfloattofixed{\pgfmathresult}%
- \else
- \pgfmathfloatparse@output
- \fi
-}
-
-\def\pgfmathfloat@char@asterisk{*}
+ \edef\pgfmathfloat@expression{#1}%
+ \expandafter\pgfmathfloatparse@@\pgfmathfloat@expression\pgfmathfloat@
+ \ifpgfmathfloat@scaleactive
+ \expandafter\pgfmathfloatmultiply@\expandafter{\pgfmathresult}{\pgfmathfloatscale}
+ \pgfmathfloattofixed{\pgfmathresult}%
+ \else
+ \pgfmathfloatparse@output
+ \fi
+}%
+
+\def\pgfmathfloat@char@asterisk{*}%
\def\pgfmathfloatparse@@#1#2\pgfmathfloat@{%
- \def\pgfmathfloat@test{#1}%
- \ifx\pgfmathfloat@test\pgfmathfloat@char@asterisk%
- \def\pgfmathfloat@expression{#2}%
- \pgfmathfloat@scaleactivetrue
- \fi%
- \expandafter\pgfmathparse@\expandafter{\pgfmathfloat@expression}%
- % \endgroup provided by \pgfpathmarse@end
-}
+ \def\pgfmathfloat@test{#1}%
+ \ifx\pgfmathfloat@test\pgfmathfloat@char@asterisk%
+ \def\pgfmathfloat@expression{#2}%
+ \pgfmathfloat@scaleactivetrue
+ \fi%
+ \expandafter\pgfmathparse@\expandafter{\pgfmathfloat@expression}%
+ % \endgroup provided by \pgfpathmarse@end
+}%
% Crude handling of file plots
%
@@ -128,268 +139,308 @@
scale file plot x/.code=\pgfmathfloatparse{#1}\edef\pgfmathfloatplotscalex{\pgfmathresult*},
scale file plot y/.code=\pgfmathfloatparse{#1}\edef\pgfmathfloatplotscaley{\pgfmathresult*},
scale file plot z/.code=\pgfmathfloatparse{#1}\edef\pgfmathfloatplotscalez{\pgfmathresult*}
-}
+}%
\def\pgfmathfloat@uninstall@appendcmd#1{%
- \expandafter\gdef\expandafter\pgfmathfloat@uninstall\expandafter{\pgfmathfloat@uninstall #1}%
+ \expandafter\gdef\expandafter\pgfmathfloat@uninstall\expandafter{\pgfmathfloat@uninstall #1}%
}%
% If the uninstall command is already assembled, it will skip the
% uninstall assemblation.
\def\pgfmathfloat@plots@checkuninstallcmd{%
- \pgfutil@ifundefined{pgfmathfloat@uninstall}{%
- \global\let\pgfmathfloat@uninstall=\pgfutil@empty
- }{%
- % We already HAVE an uninstall command (prepared globally).
- % So: don't waste time assembling one!
- \def\pgfmathfloat@uninstall@appendcmd##1{}%
- \def\pgfmathfloat@prepareuninstallcmd##1{}%
- }%
+ \pgfutil@ifundefined{pgfmathfloat@uninstall}{%
+ \global\let\pgfmathfloat@uninstall=\pgfutil@empty
+ }{%
+ % We already HAVE an uninstall command (prepared globally).
+ % So: don't waste time assembling one!
+ \def\pgfmathfloat@uninstall@appendcmd##1{}%
+ \def\pgfmathfloat@prepareuninstallcmd##1{}%
+ }%
}%
% This assembles an uninstall command globally ON FIRST USAGE.
% See \pgfmathfloat@plots@checkuninstallcmd
\def\pgfmathfloat@prepareuninstallcmd#1{%
- % and store backup information (globally - I don't want to do that
- % all the time when the FPU is used!):
- \expandafter\global\expandafter\let\csname pgfmathfloat@backup@\string#1\endcsname=#1%
- \expandafter\gdef\expandafter\pgfmathfloat@uninstall\expandafter{\pgfmathfloat@uninstall
- \expandafter\let\expandafter#1\csname pgfmathfloat@backup@\string#1\endcsname%
- }%
-}
+ % and store backup information (globally - I don't want to do that
+ % all the time when the FPU is used!):
+ \expandafter\global\expandafter\let\csname pgfmathfloat@backup@\string#1\endcsname=#1%
+ \expandafter\gdef\expandafter\pgfmathfloat@uninstall\expandafter{\pgfmathfloat@uninstall
+ \expandafter\let\expandafter#1\csname pgfmathfloat@backup@\string#1\endcsname%
+ }%
+}%
\def\pgfmathfloat@install#1=#2{%
- \pgfmathfloat@prepareuninstallcmd{#1}%
- \let#1=#2%
-}
+ \pgfmathfloat@prepareuninstallcmd{#1}%
+ \let#1=#2%
+}%
\def\pgfmathfloat@install@csname#1#2{%
- \expandafter\pgfmathfloat@prepareuninstallcmd\csname #1\endcsname%
- \pgfutil@namelet{#1}{#2}%
-}
+ \expandafter\pgfmathfloat@prepareuninstallcmd\csname #1\endcsname%
+ \pgfutil@namelet{#1}{#2}%
+}%
\def\pgfmathfloat@install@unimplemented#1{%
- \expandafter\pgfmathfloat@prepareuninstallcmd\csname pgfmath@#1@\endcsname%
- \expandafter\def\csname pgfmath#1@\endcsname##1{\pgfmathfloat@notimplemented{#1}}%
-}
+ \expandafter\pgfmathfloat@prepareuninstallcmd\csname pgfmath#1@\endcsname%
+ \expandafter\def\csname pgfmath#1@\endcsname##1{\pgfmathfloat@notimplemented{#1}}%
+}%
\def\pgfmathfloat@plots@install{%
- \let\pgfmathfloatplotscalex=\pgfutil@empty
- \let\pgfmathfloatplotscaley=\pgfutil@empty
- \let\pgfmathfloatplotscalez=\pgfutil@empty
- \pgfmathfloat@install\pgf@parsexyline=\pgfmathfloat@parsexyline%
- \pgfmathfloat@install\pgf@parsexyzline=\pgfmathfloat@parsexyzline%
-}
+ \let\pgfmathfloatplotscalex=\pgfutil@empty
+ \let\pgfmathfloatplotscaley=\pgfutil@empty
+ \let\pgfmathfloatplotscalez=\pgfutil@empty
+ \pgfmathfloat@install\pgf@parsexyline=\pgfmathfloat@parsexyline%
+ \pgfmathfloat@install\pgf@parsexyzline=\pgfmathfloat@parsexyzline%
+}%
\def\pgfmathfloat@parsexyline#1 #2 #3\pgf@stop{%
- \edef\pgfmathfloat@marshal{%
- \noexpand\pgfplotstreampoint{\noexpand\pgfpointxy{\pgfmathfloatplotscalex#1}{\pgfmathfloatplotscaley#2}}%
- }%
- \pgfmathfloat@marshal%
-}
+ \edef\pgfmathfloat@marshal{%
+ \noexpand\pgfplotstreampoint{\noexpand\pgfpointxy{\pgfmathfloatplotscalex#1}{\pgfmathfloatplotscaley#2}}%
+ }%
+ \pgfmathfloat@marshal%
+}%
\def\pgfmathfloat@parsexyzline#1 #2 #3 #4\pgf@stop{%
\edef\pgfmathfloat@marshal{%
- \noexpand\pgfplotstreampoint{%
- \noexpand\pgfpointxyz{\pgfmathfloatplotscalex#1}{\pgfmathfloatplotscaley#2}{\pgfmathfloatplotscalez#3}%
- }%
- }%
- \pgfmathfloat@marshal%
-}
-
-%
+ \noexpand\pgfplotstreampoint{%
+ \noexpand\pgfpointxyz{\pgfmathfloatplotscalex#1}{\pgfmathfloatplotscaley#2}{\pgfmathfloatplotscalez#3}%
+ }%
+ }%
+ \pgfmathfloat@marshal%
+}%
+
+%
\def\pgfmathfloat@parser@install@functions{%
- % Install float commands...
- %
- \pgfmathfloat@install\pgfmathadd@=\pgfmathfloatadd@%
- \pgfmathfloat@install\pgfmathsubtract@=\pgfmathfloatsubtract@%
- \pgfmathfloat@install\pgfmathneg@=\pgfmathfloatneg@%
- \pgfmathfloat@install\pgfmathmultiply@=\pgfmathfloatmultiply@%
- \pgfmathfloat@install\pgfmathdivide@=\pgfmathfloatdivide@%
- \pgfmathfloat@install\pgfmathabs@=\pgfmathfloatabs@%
- \pgfmathfloat@install\pgfmathsign@=\pgfmathfloatsign@%
- \pgfmathfloat@install\pgfmathround@=\pgfmathfloatround@%
- \pgfmathfloat@install\pgfmathfloor@=\pgfmathfloatfloor@%
- \pgfmathfloat@install\pgfmathceil@=\pgfmathfloatceil@
- \pgfmathfloat@install\pgfmathint@=\pgfmathfloatint@
- \pgfmathfloat@install\pgfmathmod@=\pgfmathfloatmod@%
- \pgfmathfloat@install\pgfmathmax@=\pgfmathfloatmax@%
- \pgfmathfloat@install\pgfmathmin@=\pgfmathfloatmin@%
- \pgfmathfloat@install\pgfmathsin@=\pgfmathfloatsin@%
- \pgfmathfloat@install\pgfmathcos@=\pgfmathfloatcos@%
- \pgfmathfloat@install\pgfmathtan@=\pgfmathfloattan@%
- \pgfmathfloat@install\pgfmathdeg@=\pgfmathfloatdeg@%
- \pgfmathfloat@install\pgfmathrad@=\pgfmathfloatrad@%
- \pgfmathfloat@install\pgfmathatan@=\pgfmathfloatatan@%
- \pgfmathfloat@install\pgfmathasin@=\pgfmathfloatasin@%
- \pgfmathfloat@install\pgfmathacos@=\pgfmathfloatacos@%
- \pgfmathfloat@install\pgfmathcot@=\pgfmathfloatcot@%
- \pgfmathfloat@install\pgfmathsec@=\pgfmathfloatsec@%
- \pgfmathfloat@install\pgfmathcosec@=\pgfmathfloatcosec@%
- \pgfmathfloat@install\pgfmathexp@=\pgfmathfloatexp@%
- \pgfmathfloat@install\pgfmathln@=\pgfmathfloatln@%
- \pgfmathfloat@install@csname{pgfmathlog10@}{pgfmathfloatlog10@}%
- \pgfmathfloat@install@csname{pgfmathlog2@}{pgfmathfloatlog2@}%
- \pgfmathfloat@install\pgfmathsqrt@=\pgfmathfloatsqrt@%
- \pgfmathfloat@install\pgfmath@pi=\pgfmathfloatpi@%
- \pgfmathfloat@install\pgfmathpi=\pgfmathfloatpi@%
- \pgfmathfloat@install\pgfmathe@=\pgfmathfloate@%
- \pgfmathfloat@install\pgfmathe=\pgfmathfloate@%
- \pgfmathfloat@install\pgfmathlessthan@=\pgfmathfloatlessthan@%
- \pgfmathfloat@install\pgfmathnotless@=\pgfmathfloatnotless@%
- \pgfmathfloat@install\pgfmathnotgreater@=\pgfmathfloatnotgreater@%
- \pgfmathfloat@install\pgfmathless@=\pgfmathfloatlessthan@%
- \pgfmathfloat@install\pgfmathgreaterthan@=\pgfmathfloatgreaterthan@%
- \pgfmathfloat@install\pgfmathgreater@=\pgfmathfloatgreaterthan@%
- \pgfmathfloat@install\pgfmathifthenelse@=\pgfmathfloatifthenelse@%
- \pgfmathfloat@install\pgfmathequal@=\pgfmathfloatequal@%
- \pgfmathfloat@install\pgfmathequalto@=\pgfmathfloatequal@%
- \pgfmathfloat@install\pgfmathnotequal@=\pgfmathfloatnotequal@%
- \pgfmathfloat@install\pgfmathnotequalto@=\pgfmathfloatnotequal@%
- \pgfmathfloat@install\pgfmathpow@=\pgfmathfloatpow@
- \pgfmathfloat@install\pgfmathrand@=\pgfmathfloatrand@
- \pgfmathfloat@install\pgfmathrand=\pgfmathfloatrand@
- \pgfmathfloat@install\pgfmathrnd@=\pgfmathfloatrnd@
- \pgfmathfloat@install\pgfmathrnd=\pgfmathfloatrnd@
- \pgfmathfloat@install\pgfmathtrue@=\pgfmathfloattrue@
- \pgfmathfloat@install\pgfmathfalse@=\pgfmathfloatfalse@
- \pgfmathfloat@install\pgfmathnot@=\pgfmathfloatnot@
- \pgfmathfloat@install\pgfmathhex@=\pgfmathfloathex@
- \pgfmathfloat@install\pgfmathHex@=\pgfmathfloatHex@
- \pgfmathfloat@install\pgfmathoct@=\pgfmathfloatoct@
- \pgfmathfloat@install\pgfmathbin@=\pgfmathfloatbin@
- \pgfmathfloat@install\pgfmathand@=\pgfmathfloatand@
- \pgfmathfloat@install\pgfmathor@=\pgfmathfloator@
- \pgfmathfloat@install\pgfmathfactorial@=\pgfmathfloatfactorial@
- \pgfmathfloat@install\pgfmathveclen@=\pgfmathfloatveclen@
- \pgfmathfloat@install\pgfmathcosh@=\pgfmathfloatcosh@
- \pgfmathfloat@install\pgfmathsinh@=\pgfmathfloatsinh@
- \pgfmathfloat@install\pgfmathtanh@=\pgfmathfloattanh@
- \expandafter\pgfmathfloat@install\csname pgfmathatan2@\endcsname=\pgfmathfloatatantwo@
- \pgfmathfloat@install@unimplemented{frac}%
- \pgfmathfloat@install@unimplemented{random}%
- \pgfmathfloat@install@unimplemented{setseed}%
- \pgfmathfloat@install@unimplemented{Mod}%
- \pgfmathfloat@install@unimplemented{real}%
-% \pgfmathfloat@install@unimplemented{height}%
- %
- %
- \pgfmathfloat@install\pgfmathscientific=\pgfmathfloatscientific%
-}
+ % Install float commands...
+ %
+ \pgfmathfloat@install\pgfmathadd@=\pgfmathfloatadd@%
+ \pgfmathfloat@install\pgfmathsubtract@=\pgfmathfloatsubtract@%
+ \pgfmathfloat@install\pgfmathneg@=\pgfmathfloatneg@%
+ \pgfmathfloat@install\pgfmathmultiply@=\pgfmathfloatmultiply@%
+ \pgfmathfloat@install\pgfmathdivide@=\pgfmathfloatdivide@%
+ \pgfmathfloat@install\pgfmathabs@=\pgfmathfloatabs@%
+ \pgfmathfloat@install\pgfmathsign@=\pgfmathfloatsign@%
+ \pgfmathfloat@install\pgfmathround@=\pgfmathfloatround@%
+ \pgfmathfloat@install\pgfmathfloor@=\pgfmathfloatfloor@%
+ \pgfmathfloat@install\pgfmathceil@=\pgfmathfloatceil@
+ \pgfmathfloat@install\pgfmathint@=\pgfmathfloatint@
+ \pgfmathfloat@install\pgfmathmod@=\pgfmathfloatmod@%
+ \pgfmathfloat@install\pgfmathmax@=\pgfmathfloatmax@%
+ \pgfmathfloat@install\pgfmathmin@=\pgfmathfloatmin@%
+ \pgfmathfloat@install\pgfmathsin@=\pgfmathfloatsin@%
+ \pgfmathfloat@install\pgfmathcos@=\pgfmathfloatcos@%
+ \pgfmathfloat@install\pgfmathtan@=\pgfmathfloattan@%
+ \pgfmathfloat@install\pgfmathdeg@=\pgfmathfloatdeg@%
+ \pgfmathfloat@install\pgfmathrad@=\pgfmathfloatrad@%
+ \pgfmathfloat@install\pgfmathatan@=\pgfmathfloatatan@%
+ \pgfmathfloat@install\pgfmathasin@=\pgfmathfloatasin@%
+ \pgfmathfloat@install\pgfmathacos@=\pgfmathfloatacos@%
+ \pgfmathfloat@install\pgfmathcot@=\pgfmathfloatcot@%
+ \pgfmathfloat@install\pgfmathsec@=\pgfmathfloatsec@%
+ \pgfmathfloat@install\pgfmathcosec@=\pgfmathfloatcosec@%
+ \pgfmathfloat@install\pgfmathexp@=\pgfmathfloatexp@%
+ \pgfmathfloat@install\pgfmathln@=\pgfmathfloatln@%
+ \pgfmathfloat@install@csname{pgfmathlog10@}{pgfmathfloatlog10@}%
+ \pgfmathfloat@install@csname{pgfmathlog2@}{pgfmathfloatlog2@}%
+ \pgfmathfloat@install\pgfmathsqrt@=\pgfmathfloatsqrt@%
+ \pgfmathfloat@install\pgfmath@pi=\pgfmathfloatpi@%
+ \pgfmathfloat@install\pgfmathpi=\pgfmathfloatpi@%
+ \pgfmathfloat@install\pgfmathe@=\pgfmathfloate@%
+ \pgfmathfloat@install\pgfmathe=\pgfmathfloate@%
+ \pgfmathfloat@install\pgfmathlessthan@=\pgfmathfloatlessthan@%
+ \pgfmathfloat@install\pgfmathnotless@=\pgfmathfloatnotless@%
+ \pgfmathfloat@install\pgfmathnotgreater@=\pgfmathfloatnotgreater@%
+ \pgfmathfloat@install\pgfmathless@=\pgfmathfloatlessthan@%
+ \pgfmathfloat@install\pgfmathgreaterthan@=\pgfmathfloatgreaterthan@%
+ \pgfmathfloat@install\pgfmathgreater@=\pgfmathfloatgreaterthan@%
+ \pgfmathfloat@install\pgfmathifthenelse@=\pgfmathfloatifthenelse@%
+ \pgfmathfloat@install\pgfmathequal@=\pgfmathfloatequal@%
+ \pgfmathfloat@install\pgfmathequalto@=\pgfmathfloatequal@%
+ \pgfmathfloat@install\pgfmathnotequal@=\pgfmathfloatnotequal@%
+ \pgfmathfloat@install\pgfmathnotequalto@=\pgfmathfloatnotequal@%
+ \pgfmathfloat@install\pgfmathpow@=\pgfmathfloatpow@
+ \pgfmathfloat@install\pgfmathrand@=\pgfmathfloatrand@
+ \pgfmathfloat@install\pgfmathrand=\pgfmathfloatrand@
+ \pgfmathfloat@install\pgfmathrnd@=\pgfmathfloatrnd@
+ \pgfmathfloat@install\pgfmathrnd=\pgfmathfloatrnd@
+ \pgfmathfloat@install\pgfmathtrue@=\pgfmathfloattrue@
+ \pgfmathfloat@install\pgfmathfalse@=\pgfmathfloatfalse@
+ \pgfmathfloat@install\pgfmathnot@=\pgfmathfloatnot@
+ \pgfmathfloat@install\pgfmathhex@=\pgfmathfloathex@
+ \pgfmathfloat@install\pgfmathHex@=\pgfmathfloatHex@
+ \pgfmathfloat@install\pgfmathoct@=\pgfmathfloatoct@
+ \pgfmathfloat@install\pgfmathbin@=\pgfmathfloatbin@
+ \pgfmathfloat@install\pgfmathand@=\pgfmathfloatand@
+ \pgfmathfloat@install\pgfmathor@=\pgfmathfloator@
+ \pgfmathfloat@install\pgfmathfactorial@=\pgfmathfloatfactorial@
+ \pgfmathfloat@install\pgfmathveclen@=\pgfmathfloatveclen@
+ \pgfmathfloat@install\pgfmathcosh@=\pgfmathfloatcosh@
+ \pgfmathfloat@install\pgfmathsinh@=\pgfmathfloatsinh@
+ \pgfmathfloat@install\pgfmathtanh@=\pgfmathfloattanh@
+ \pgfmathfloat@install\pgfmath@iftrue=\pgfmathfloat@iftrue%
+ \expandafter\pgfmathfloat@install\csname pgfmathatan2@\endcsname=\pgfmathfloatatantwo@
+ \pgfmathfloat@install@unimplemented{isprime}%
+ \pgfmathfloat@install@unimplemented{iseven}%
+ \pgfmathfloat@install@unimplemented{isodd}%
+ \pgfmathfloat@install@unimplemented{gcd}%
+ \pgfmathfloat@install@unimplemented{frac}%
+ \pgfmathfloat@install@unimplemented{random}%
+ \pgfmathfloat@install@unimplemented{setseed}%
+ \pgfmathfloat@install@unimplemented{Mod}%
+ \pgfmathfloat@install@unimplemented{div}%
+ \pgfmathfloat@install@unimplemented{real}%
+% \pgfmathfloat@install@unimplemented{height}%
+ %
+ %
+ \pgfmathfloat@install\pgfmathscientific=\pgfmathfloatscientific%
+}%
+
+\def\pgfmathfloat@iftrue{%
+ \if Y\pgfmathfloatparse@output@choice
+ \let\pgfmathfloat@@iftrue@v=\pgfmathfloatone
+ \let\pgfmathfloat@@iftrue@next=\pgfmathfloat@iftrue@
+ \else
+ \if S\pgfmathfloatparse@output@choice
+ \def\pgfmathfloat@@iftrue@v{1.0e0}%
+ \let\pgfmathfloat@@iftrue@next=\pgfmathfloat@iftrue@
+ \else
+ \def\pgfmath@next{\pgfutilifstartswith{1.0}}%
+ \expandafter\pgfmath@next\expandafter{\pgfmathresult}{%
+ \ifdim\pgfmathresult pt=1.0pt %
+ \let\pgfmathfloat@@iftrue@next=\pgfutil@firstoftwo
+ \else
+ \let\pgfmathfloat@@iftrue@next=\pgfutil@secondoftwo
+ \fi
+ }{%
+ \let\pgfmathfloat@@iftrue@next=\pgfutil@secondoftwo
+ }%
+ \fi
+ \fi
+ \pgfmathfloat@@iftrue@next%
+}%
+\def\pgfmathfloat@iftrue@{%
+ \ifx\pgfmathresult\pgfmathfloat@@iftrue@v
+ \let\pgfmath@next=\pgfutil@firstoftwo
+ \else
+ \let\pgfmath@next=\pgfutil@secondoftwo
+ \fi
+ \pgfmath@next%
+}%
\def\pgfmathfloat@parser@install{%
- \pgfmathfloat@plots@checkuninstallcmd
- \pgfmathfloat@plots@install%
- \pgfmathfloat@parser@install@functions
- %
- %
- %
- % The following methods actually enable the parser to work with
- % the internal floating point number representation.
- %
- % The idea is as follows:
- % 1. Every operand must be given in internal float representation.
- % 2. The internal float repr can be distinguished by a normal
- % number. This is accomplished by introducing a new "exponent"
- % token.
- % 3. The stack-push-operation checks whether the argument is a
- % float. If not, it is parsed properly before pushing it.
- \pgfmath@tokens@make{exponent}{\pgfmathfloat@POSTFLAGSCHAR}%
- \pgfmathfloat@uninstall@appendcmd{%
- \expandafter\let\csname pgfmath@token@exponent@\pgfmathfloat@POSTFLAGSCHAR\endcsname=\relax
- }%
- \let\pgfmath@basic@parse@exponent=\pgfmath@parse@exponent%
- \let\pgfmath@basic@stack@push@operand=\pgfmath@stack@push@operand
- \pgfmathfloat@install\pgfmath@stack@push@operand=\pgfmathfloat@stack@push@operand
- \pgfmathfloat@install\pgfmath@parse@exponent=\pgfmathfloat@parse@float@or@exponent
- %
- \pgfmathfloat@install\pgfmathparse=\pgfmathfloatparse%
- %\pgfmathfloat@install\pgfmathparse@trynumber@token=\pgfmathfloat@parse@trynumber@token
- \pgfmathfloat@install\pgfmathparse@expression@is@number=\pgfmathfloat@parse@expression@is@number
+ \pgfmathfloat@plots@checkuninstallcmd
+ \pgfmathfloat@plots@install%
+ \pgfmathfloat@parser@install@functions
+ %
+ %
+ %
+ % The following methods actually enable the parser to work with
+ % the internal floating point number representation.
+ %
+ % The idea is as follows:
+ % 1. Every operand must be given in internal float representation.
+ % 2. The internal float repr can be distinguished by a normal
+ % number. This is accomplished by introducing a new "exponent"
+ % token.
+ % 3. The stack-push-operation checks whether the argument is a
+ % float. If not, it is parsed properly before pushing it.
+ \pgfmath@tokens@make{exponent}{\pgfmathfloat@POSTFLAGSCHAR}%
+ \pgfmathfloat@uninstall@appendcmd{%
+ \expandafter\let\csname pgfmath@token@exponent@\pgfmathfloat@POSTFLAGSCHAR\endcsname=\relax
+ }%
+ \let\pgfmath@basic@parse@exponent=\pgfmath@parse@exponent%
+ \let\pgfmath@basic@stack@push@operand=\pgfmath@stack@push@operand
+ \pgfmathfloat@install\pgfmath@stack@push@operand=\pgfmathfloat@stack@push@operand
+ \pgfmathfloat@install\pgfmath@parse@exponent=\pgfmathfloat@parse@float@or@exponent
+ %
+ \pgfmathfloat@install\pgfmathparse=\pgfmathfloatparse%
+ %\pgfmathfloat@install\pgfmathparse@trynumber@token=\pgfmathfloat@parse@trynumber@token
+ \pgfmathfloat@install\pgfmathparse@expression@is@number=\pgfmathfloat@parse@expression@is@number
}%
% This here might bring speed improvements... if implemented
% correctly.
-% However, this heuristics might fail in cases like "1+1" vs "1e+1" ...
+% However, this heuristics might fail in cases like "1+1" vs "1e+1" ...
%\def\pgfmathfloat@parse@trynumber@token{numericfpu}
%\pgfmath@tokens@make{numericfpu}{eE+-Y.0123456789}
\def\pgfmathfloat@parse@expression@is@number{%
- \pgfmathfloatparsenumber{\pgfmath@expression}%
+ \pgfmathfloatparsenumber{\pgfmath@expression}%
\pgfmath@smuggleone\pgfmathresult%
\endgroup
\ignorespaces
}%
\def\pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG#1{%
- \edef\pgfmathfloat@loc@TMPa{%
- \noexpand\def\expandafter\noexpand\csname pgfmath@parsefunction@#1\endcsname{%
- \noexpand\let\noexpand\pgfmath@parsepostgroup\expandafter\noexpand\csname pgfmath@parsefunction@#1@\endcsname%
- \noexpand\expandafter\noexpand\pgfmath@parse@}%
- \noexpand\def\expandafter\noexpand\csname pgfmath@parsefunction@#1@\endcsname{%
- \noexpand\expandafter\expandafter\noexpand\csname pgfmath#1@\endcsname\noexpand\expandafter{\noexpand\pgfmathresult}%
- \noexpand\pgfmath@postfunction%
- }%
- }%
- \pgfmathfloat@loc@TMPa
+ \edef\pgfmathfloat@loc@TMPa{%
+ \noexpand\def\expandafter\noexpand\csname pgfmath@parsefunction@#1\endcsname{%
+ \noexpand\let\noexpand\pgfmath@parsepostgroup\expandafter\noexpand\csname pgfmath@parsefunction@#1@\endcsname%
+ \noexpand\expandafter\noexpand\pgfmath@parse@}%
+ \noexpand\def\expandafter\noexpand\csname pgfmath@parsefunction@#1@\endcsname{%
+ \noexpand\expandafter\expandafter\noexpand\csname pgfmath#1@\endcsname\noexpand\expandafter{\noexpand\pgfmathresult}%
+ \noexpand\pgfmath@postfunction%
+ }%
+ }%
+ \pgfmathfloat@loc@TMPa
}%
\def\pgfmathfloat@parser@install@pgf@two@null@null{%
- \pgfmathfloat@plots@checkuninstallcmd
- \pgfmathfloat@plots@install%
- \pgfmathfloat@parser@install@functions
- \let\pgfmathrand@=\pgfmath@basic@rand@
- \let\pgfmathrnd@=\pgfmath@basic@rnd@
- \pgfmathfloat@install\pgfmathmax@=\pgfmathfloatmaxtwo%
- \pgfmathfloat@install\pgfmathmin@=\pgfmathfloatmintwo%
- \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{factorial}%
- \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{hex}%
- \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{bin}%
- \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{oct}%
- \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{tanh}%
- \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{sinh}%
- \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{cosh}%
- %
- % The following methods actually enable the parser to work with
- % the internal floating point number representation.
- %
- % The idea is as follows:
- % 1. Every operand must be given in internal float representation.
- % 2. The internal float repr can be distinguished by a normal
- % number. This is accomplished by introducing a new "exponent"
- % token.
- % 3. The stack-push-operation checks whether the argument is a
- % float. If not, it is parsed properly before pushing it.
- \let\pgfmath@basic@parsedecimalpoint=\pgfmath@parsedecimalpoint%
- \let\pgfmath@basic@stack@push@operand=\pgfmath@stackpushoperand
- \pgfmathfloat@install\pgfmath@stackpushoperand=\pgfmathfloat@stack@push@operand
- \pgfmathfloat@install\pgfmath@parsedecimalpoint=\pgfmathfloat@parsedecimalpoint@pgf@two@null@null
- \pgfmathfloat@install\pgfmath@endparse=\pgfmathfloat@endparse@pgf@two@null@null
- \pgfmathfloat@install\pgfmath@endparsegroup=\pgfmathfloat@endparsegroup@pgf@two@null@null
- \pgfmathfloat@install\pgfmath@postfunction=\pgfmathfloat@postfunction@pgf@two@null@null
- \pgfmathfloat@install\pgfmath@@parseoperandgroup=\pgfmathfloat@@parseoperandgroup
- %
- \pgfmathfloat@install\pgfmathparse=\pgfmathfloatparse@pgf@two@null@null%
+ \pgfmathfloat@plots@checkuninstallcmd
+ \pgfmathfloat@plots@install%
+ \pgfmathfloat@parser@install@functions
+ \let\pgfmathrand@=\pgfmath@basic@rand@
+ \let\pgfmathrnd@=\pgfmath@basic@rnd@
+ \pgfmathfloat@install\pgfmathmax@=\pgfmathfloatmaxtwo%
+ \pgfmathfloat@install\pgfmathmin@=\pgfmathfloatmintwo%
+ \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{factorial}%
+ \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{hex}%
+ \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{bin}%
+ \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{oct}%
+ \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{tanh}%
+ \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{sinh}%
+ \pgfmathfloat@defineadapter@for@pgf@two@null@null@ONEARG{cosh}%
+ %
+ % The following methods actually enable the parser to work with
+ % the internal floating point number representation.
+ %
+ % The idea is as follows:
+ % 1. Every operand must be given in internal float representation.
+ % 2. The internal float repr can be distinguished by a normal
+ % number. This is accomplished by introducing a new "exponent"
+ % token.
+ % 3. The stack-push-operation checks whether the argument is a
+ % float. If not, it is parsed properly before pushing it.
+ \let\pgfmath@basic@parsedecimalpoint=\pgfmath@parsedecimalpoint%
+ \let\pgfmath@basic@stack@push@operand=\pgfmath@stackpushoperand
+ \pgfmathfloat@install\pgfmath@stackpushoperand=\pgfmathfloat@stack@push@operand
+ \pgfmathfloat@install\pgfmath@parsedecimalpoint=\pgfmathfloat@parsedecimalpoint@pgf@two@null@null
+ \pgfmathfloat@install\pgfmath@endparse=\pgfmathfloat@endparse@pgf@two@null@null
+ \pgfmathfloat@install\pgfmath@endparsegroup=\pgfmathfloat@endparsegroup@pgf@two@null@null
+ \pgfmathfloat@install\pgfmath@postfunction=\pgfmathfloat@postfunction@pgf@two@null@null
+ \pgfmathfloat@install\pgfmath@@parseoperandgroup=\pgfmathfloat@@parseoperandgroup
+ %
+ \pgfmathfloat@install\pgfmathparse=\pgfmathfloatparse@pgf@two@null@null%
}%
\pgfutil@ifundefined{pgfmathdeclarefunction}{%
- % BACKWARDS COMPATIBILITY: We have PGF 2.00 :
- \def\pgfmathdeclarepseudoconstant#1#2{%
- \begingroup
- \toks0=\expandafter{\csname pgfmath#1@\endcsname}%
- \toks1={\pgfmath@postfunction}%
- \xdef\pgfmathfloat@glob@TMP{\the\toks0 \the\toks1 }%
- \xdef\pgfmathfloat@glob@TMPb{\the\toks0 }%
- \endgroup
- \expandafter\let\csname pgfmath@parsefunction@#1\endcsname=\pgfmathfloat@glob@TMP
- \expandafter\let\csname pgfmath#1\endcsname=\pgfmathfloat@glob@TMPb
- \expandafter\def\csname pgfmath#1@\endcsname{#2}%
- }%
- \let\pgfmathredeclarepseudoconstant=\pgfmathdeclarepseudoconstant
+ % BACKWARDS COMPATIBILITY: We have PGF 2.00 :
+ \def\pgfmathdeclarepseudoconstant#1#2{%
+ \begingroup
+ \toks0=\expandafter{\csname pgfmath#1@\endcsname}%
+ \toks1={\pgfmath@postfunction}%
+ \xdef\pgfmathfloat@glob@TMP{\the\toks0 \the\toks1 }%
+ \xdef\pgfmathfloat@glob@TMPb{\the\toks0 }%
+ \endgroup
+ \expandafter\let\csname pgfmath@parsefunction@#1\endcsname=\pgfmathfloat@glob@TMP
+ \expandafter\let\csname pgfmath#1\endcsname=\pgfmathfloat@glob@TMPb
+ \expandafter\def\csname pgfmath#1@\endcsname{#2}%
+ }%
+ \let\pgfmathredeclarepseudoconstant=\pgfmathdeclarepseudoconstant
}{%
- \pgfutil@ifundefined{pgfmathdeclarepseudoconstant}{%
- \def\pgfmathdeclarepseudoconstant#1#2{\pgfmathdeclarefunction*{#1}{0}{#2}}
- }{}%
+ \pgfutil@ifundefined{pgfmathdeclarepseudoconstant}{%
+ \def\pgfmathdeclarepseudoconstant#1#2{\pgfmathdeclarefunction*{#1}{0}{#2}}
+ }{}%
}%
-\pgfmathdeclarepseudoconstant{inf}{\def\pgfmathresult{inf}}
-\pgfmathdeclarepseudoconstant{infty}{\def\pgfmathresult{inf}}
-\pgfmathdeclarepseudoconstant{nan}{\def\pgfmathresult{nan}}
-\pgfmathdeclarepseudoconstant{NaN}{\def\pgfmathresult{nan}}
+\pgfmathdeclarepseudoconstant{inf}{\def\pgfmathresult{inf}}%
+\pgfmathdeclarepseudoconstant{INF}{\def\pgfmathresult{inf}}%
+\pgfmathdeclarepseudoconstant{Inf}{\def\pgfmathresult{inf}}%
+\pgfmathdeclarepseudoconstant{infty}{\def\pgfmathresult{inf}}%
+\pgfmathdeclarepseudoconstant{nan}{\def\pgfmathresult{nan}}%
+\pgfmathdeclarepseudoconstant{NaN}{\def\pgfmathresult{nan}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -400,54 +451,54 @@
% for pgf2.00 :
\def\pgfmathfloat@parsedecimalpoint@pgf@two@null@null#1{%
- \expandafter\ifx\pgfmathfloat@POSTFLAGSCHAR#1% check whether it is a float
- \let\pgfmath@next=\pgfmathfloat@return@float@pgf@two@null@null%
- \else
- \def\pgfmath@next{\pgfmath@basic@parsedecimalpoint#1}%
- \fi
- \pgfmath@next
-}
+ \expandafter\ifx\pgfmathfloat@POSTFLAGSCHAR#1% check whether it is a float
+ \let\pgfmath@next=\pgfmathfloat@return@float@pgf@two@null@null%
+ \else
+ \def\pgfmath@next{\pgfmath@basic@parsedecimalpoint#1}%
+ \fi
+ \pgfmath@next
+}%
% for pgf2.00:
\def\pgfmathfloat@return@float@pgf@two@null@null#1]{%
- \edef\pgfmathresult{\the\c@pgfmath@parsecounta\pgfmathfloat@POSTFLAGSCHAR#1]}%
- \let\pgfmath@resulttemp=\pgfmathresult
- \pgfmath@parseoperator%
+ \edef\pgfmathresult{\the\c@pgfmath@parsecounta\pgfmathfloat@POSTFLAGSCHAR#1]}%
+ \let\pgfmath@resulttemp=\pgfmathresult
+ \pgfmath@parseoperator%
}%
% for pgf2.00:
\def\pgfmathfloat@endparse@pgf@two@null@null#1\pgfmath@empty{%
\pgfmath@processalloperations%
\pgfmath@stackpop{\pgfmathresult}%
- % delete the final unit scalings
+ % delete the final unit scalings
\pgfmath@smuggleone{\pgfmathresult}%
\endgroup%
\ignorespaces%
-}
+}%
% for pgf2.00:
\def\pgfmathfloat@endparsegroup@pgf@two@null@null{%
- \pgfmath@processalloperations%
- \pgfmath@stackpop{\pgfmathresult}%
- % eliminated register usage here...
- \pgfmath@smuggleone{\pgfmathresult}%
- \endgroup%
- \pgfmath@parsepostgroup%
-}
+ \pgfmath@processalloperations%
+ \pgfmath@stackpop{\pgfmathresult}%
+ % eliminated register usage here...
+ \pgfmath@smuggleone{\pgfmathresult}%
+ \endgroup%
+ \pgfmath@parsepostgroup%
+}%
% for pgf2.00:
\def\pgfmathfloat@postfunction@pgf@two@null@null{%
- \let\pgfmath@parsepostgroup\pgfmath@parseoperator%
- \ifnum\pgfmath@sign1<0
- \pgfmathfloatneg@{\pgfmathresult}%
- \let\pgfmath@sign\pgfutil@empty
- \fi
- \pgfmath@parseoperator}
+ \let\pgfmath@parsepostgroup\pgfmath@parseoperator%
+ \ifnum\pgfmath@sign1<0
+ \pgfmathfloatneg@{\pgfmathresult}%
+ \let\pgfmath@sign\pgfutil@empty
+ \fi
+ \pgfmath@parseoperator}%
% for pgf2.00:
\def\pgfmathfloat@@parseoperandgroup{%
- \let\pgfmath@postparsegroup\pgfmath@parseoperator%
- \ifnum\pgfmath@sign1<0
- \pgfmathfloatneg@{\pgfmathresult}%
- \let\pgfmath@sign\pgfutil@empty
- \fi
- \pgfmath@parseoperator%
-}
+ \let\pgfmath@postparsegroup\pgfmath@parseoperator%
+ \ifnum\pgfmath@sign1<0
+ \pgfmathfloatneg@{\pgfmathresult}%
+ \let\pgfmath@sign\pgfutil@empty
+ \fi
+ \pgfmath@parseoperator%
+}%
@@ -456,71 +507,71 @@
% PRECONDITION:
% either
-% <number>e
-% ^
-% -> read the exponent.
+% <number>e
+% ^
+% -> read the exponent.
% or
% <sign>\pgfmathfloat@POSTFLAGSCHAR
% ^
% -> we have a parsed floating point number -> read it.
\def\pgfmathfloat@parse@float@or@exponent{%
- \if\pgfmath@token \pgfmathfloat@POSTFLAGSCHAR%
- % Ok, we actually HAVE a pre-parsed floating point number!
- % Return it.
- \expandafter\pgfmathfloat@return@float\expandafter\pgfmath@token@next
- \else
- % We have a standard number in scientific format. Parse it.
- \expandafter\pgfmath@basic@parse@exponent
- \fi
+ \if\pgfmath@token \pgfmathfloat@POSTFLAGSCHAR%
+ % Ok, we actually HAVE a pre-parsed floating point number!
+ % Return it.
+ \expandafter\pgfmathfloat@return@float\expandafter\pgfmath@token@next
+ \else
+ % We have a standard number in scientific format. Parse it.
+ \expandafter\pgfmath@basic@parse@exponent
+ \fi
}%
\def\pgfmathfloat@return@float#1]{%
- \edef\pgfmathresult{\pgfmath@number \pgfmathfloat@POSTFLAGSCHAR#1]}%
- \expandafter\pgfmath@basic@stack@push@operand\expandafter{\pgfmathresult}%
- \pgfmath@parse@@operator%
+ \edef\pgfmathresult{\pgfmath@number \pgfmathfloat@POSTFLAGSCHAR#1]}%
+ \expandafter\pgfmath@basic@stack@push@operand\expandafter{\pgfmathresult}%
+ \pgfmath@parse@@operator%
}%
% This extends the functionality of the basic level operand stack: it
% assures every element on the stack is a float.
\def\pgfmathfloat@stack@push@operand#1{%
- \pgfutil@ifnextchar\bgroup{%
- \let\pgfmathfloat@stack@push@operand@list@=\pgfutil@empty
- \pgfmathfloat@stack@push@operand@list
- }{%
- \pgfmathfloat@stack@push@operand@single
- }%
- #1\relax
+ \pgfutil@ifnextchar\bgroup{%
+ \let\pgfmathfloat@stack@push@operand@list@=\pgfutil@empty
+ \pgfmathfloat@stack@push@operand@list
+ }{%
+ \pgfmathfloat@stack@push@operand@single
+ }%
+ #1\relax
}%
\def\pgfmathfloat@stack@push@operand@single#1\relax{%
- \expandafter\pgfutil@in@\pgfmathfloat@POSTFLAGSCHAR{#1}%
- \ifpgfutil@in@
- \pgfmath@basic@stack@push@operand{#1}%
- \else
- \pgfmathfloatparsenumber{#1}%
- \expandafter\pgfmath@basic@stack@push@operand\expandafter{\pgfmathresult}%
- \fi
+ \expandafter\pgfutil@in@\pgfmathfloat@POSTFLAGSCHAR{#1}%
+ \ifpgfutil@in@
+ \pgfmath@basic@stack@push@operand{#1}%
+ \else
+ \pgfmathfloatparsenumber{#1}%
+ \expandafter\pgfmath@basic@stack@push@operand\expandafter{\pgfmathresult}%
+ \fi
}%
\def\pgfmathfloat@stack@push@operand@GOBBLE#1\relax{}%
\def\pgfmathfloat@stack@push@operand@list#1{%
- \expandafter\pgfutil@in@ \pgfmathfloat@POSTFLAGSCHAR{#1}%
- \ifpgfutil@in@
- \expandafter\def\expandafter\pgfmathfloat@stack@push@operand@list@\expandafter{%
- \pgfmathfloat@stack@push@operand@list@{#1}%
- }%
- \else
- \pgfmathfloatparsenumber{#1}%
- \begingroup
- \toks0=\expandafter{\pgfmathfloat@stack@push@operand@list@}%
- \toks1=\expandafter{\pgfmathresult}%
- \xdef\pgfmathfloat@glob@TMP{\the\toks0 {\the\toks1}}%
- \endgroup
- \let\pgfmathfloat@stack@push@operand@list@=\pgfmathfloat@glob@TMP
- \fi
- \pgfutil@ifnextchar\relax{%
- \expandafter\pgfmath@basic@stack@push@operand\expandafter{\pgfmathfloat@stack@push@operand@list@}%
- \pgfmathfloat@stack@push@operand@GOBBLE
- }{%
- \pgfmathfloat@stack@push@operand@list
- }%
+ \expandafter\pgfutil@in@ \pgfmathfloat@POSTFLAGSCHAR{#1}%
+ \ifpgfutil@in@
+ \expandafter\def\expandafter\pgfmathfloat@stack@push@operand@list@\expandafter{%
+ \pgfmathfloat@stack@push@operand@list@{#1}%
+ }%
+ \else
+ \pgfmathfloatparsenumber{#1}%
+ \begingroup
+ \toks0=\expandafter{\pgfmathfloat@stack@push@operand@list@}%
+ \toks1=\expandafter{\pgfmathresult}%
+ \xdef\pgfmathfloat@glob@TMP{\the\toks0 {\the\toks1}}%
+ \endgroup
+ \let\pgfmathfloat@stack@push@operand@list@=\pgfmathfloat@glob@TMP
+ \fi
+ \pgfutil@ifnextchar\relax{%
+ \expandafter\pgfmath@basic@stack@push@operand\expandafter{\pgfmathfloat@stack@push@operand@list@}%
+ \pgfmathfloat@stack@push@operand@GOBBLE
+ }{%
+ \pgfmathfloat@stack@push@operand@list
+ }%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -582,200 +633,200 @@
\let\pgfmath@basic@false@=\pgfmathfalse@
\def\pgfmathfloatscientific#1#2{%
- \edef\pgfmathresult{#1e#2}%
- \expandafter\pgfmathfloatparsenumber\expandafter{\pgfmathresult}%
-}
+ \edef\pgfmathresult{#1e#2}%
+ \expandafter\pgfmathfloatparsenumber\expandafter{\pgfmathresult}%
+}%
% Compares #1 with #2 and sets \pgfmathresult either to 1.0 or 0.0.
-%
+%
% It also sets the boolean \ifpgfmathfloatcomparison (globally).
\def\pgfmathfloatlessthan@#1#2{%
%\def\pgfmathfloatlessthan#1#2#3\and#4#5#6{%
- \global\pgfmathfloatcomparisonfalse
- \begingroup
- \edef\pgfmathfloat@loc@TMPa{#1}%
- \edef\pgfmathfloat@loc@TMPb{#2}%
- \expandafter\pgfmathfloat@decompose\pgfmathfloat@loc@TMPa\relax\pgfmathfloat@a@S\pgfmathfloat@a@M\pgfmathfloat@a@E
- \expandafter\pgfmathfloat@decompose\pgfmathfloat@loc@TMPb\relax\pgfmathfloat@b@S\pgfmathfloat@b@M\pgfmathfloat@b@E
- \ifcase\pgfmathfloat@a@S
- % x = 0 -> (x<y <=> y >0)
- \ifcase\pgfmathfloat@b@S
- % y = 0
- \or% y > 0
- \global\pgfmathfloatcomparisontrue
- \or% y < 0
- \or% y = nan
- \or% y = + infty
- \global\pgfmathfloatcomparisontrue
- \or% y = -infty
- \fi
- \or
- % x > 0 -> (x<y <=> ( y > 0 && |x| < |y|) )
- \ifcase\pgfmathfloat@b@S
- % y = 0
- \or% y>0:
- \pgfmathfloatlessthan@positive
- \or% y < 0
- \or% y = nan
- \or% y = + infty
- \global\pgfmathfloatcomparisontrue
- \or% y = -infty
- \fi
- \or
- % x < 0 -> (x<y <=> (y >= 0 || |x| > |y|) )
- \ifcase\pgfmathfloat@b@S
- % y = 0
- \global\pgfmathfloatcomparisontrue
- \or%y > 0
- \global\pgfmathfloatcomparisontrue
- \or% 'y<0':
- \pgfmathfloatgreaterthan@positive
- \or% y = nan
- \or% y = + infty
- \global\pgfmathfloatcomparisontrue
- \or% y = -infty
- \fi
- \or
- % x = nan.
- \or
- % x = +infty
- \or
- % x = -infty
- \ifnum\pgfmathfloat@b@S=3
- \else
- \global\pgfmathfloatcomparisontrue
- \fi
- \fi
- \endgroup
- \ifpgfmathfloatcomparison
- \def\pgfmathresult{1.0}%
- \else
- \def\pgfmathresult{0.0}%
- \fi
-}
+ \global\pgfmathfloatcomparisonfalse
+ \begingroup
+ \edef\pgfmathfloat@loc@TMPa{#1}%
+ \edef\pgfmathfloat@loc@TMPb{#2}%
+ \expandafter\pgfmathfloat@decompose\pgfmathfloat@loc@TMPa\relax\pgfmathfloat@a@S\pgfmathfloat@a@M\pgfmathfloat@a@E
+ \expandafter\pgfmathfloat@decompose\pgfmathfloat@loc@TMPb\relax\pgfmathfloat@b@S\pgfmathfloat@b@M\pgfmathfloat@b@E
+ \ifcase\pgfmathfloat@a@S
+ % x = 0 -> (x<y <=> y >0)
+ \ifcase\pgfmathfloat@b@S
+ % y = 0
+ \or% y > 0
+ \global\pgfmathfloatcomparisontrue
+ \or% y < 0
+ \or% y = nan
+ \or% y = + infty
+ \global\pgfmathfloatcomparisontrue
+ \or% y = -infty
+ \fi
+ \or
+ % x > 0 -> (x<y <=> ( y > 0 && |x| < |y|) )
+ \ifcase\pgfmathfloat@b@S
+ % y = 0
+ \or% y>0:
+ \pgfmathfloatlessthan@positive
+ \or% y < 0
+ \or% y = nan
+ \or% y = + infty
+ \global\pgfmathfloatcomparisontrue
+ \or% y = -infty
+ \fi
+ \or
+ % x < 0 -> (x<y <=> (y >= 0 || |x| > |y|) )
+ \ifcase\pgfmathfloat@b@S
+ % y = 0
+ \global\pgfmathfloatcomparisontrue
+ \or%y > 0
+ \global\pgfmathfloatcomparisontrue
+ \or% 'y<0':
+ \pgfmathfloatgreaterthan@positive
+ \or% y = nan
+ \or% y = + infty
+ \global\pgfmathfloatcomparisontrue
+ \or% y = -infty
+ \fi
+ \or
+ % x = nan.
+ \or
+ % x = +infty
+ \or
+ % x = -infty
+ \ifnum\pgfmathfloat@b@S=3
+ \else
+ \global\pgfmathfloatcomparisontrue
+ \fi
+ \fi
+ \endgroup
+ \ifpgfmathfloatcomparison
+ \def\pgfmathresult{1.0}%
+ \else
+ \def\pgfmathresult{0.0}%
+ \fi
+}%
\let\pgfmathfloatlessthan=\pgfmathfloatlessthan@
\let\pgfmathfloatless@=\pgfmathfloatlessthan@
-% ! (#1 < #2) <=> (#1 >= #2)
+% ! (#1 < #2) <=> (#1 >= #2)
\def\pgfmathfloatnotless@#1#2{%
- \pgfmathfloatless@{#1}{#2}%
- \ifpgfmathfloatcomparison
- \def\pgfmathresult{0.0}%
- \else
- \def\pgfmathresult{1.0}%
- \fi
-}%
-% ! (#1 > #2) <=> (#1 <= #2)
+ \pgfmathfloatless@{#1}{#2}%
+ \ifpgfmathfloatcomparison
+ \def\pgfmathresult{0.0}%
+ \else
+ \def\pgfmathresult{1.0}%
+ \fi
+}%
+% ! (#1 > #2) <=> (#1 <= #2)
\def\pgfmathfloatnotgreater@#1#2{%
- \pgfmathfloatless@{#2}{#1}%
- \ifpgfmathfloatcomparison
- \def\pgfmathresult{0.0}%
- \else
- \def\pgfmathresult{1.0}%
- \fi
+ \pgfmathfloatless@{#2}{#1}%
+ \ifpgfmathfloatcomparison
+ \def\pgfmathresult{0.0}%
+ \else
+ \def\pgfmathresult{1.0}%
+ \fi
}%
% compares \pgfmathfloat@a@[SME] < \pgfmathfloat@b@[SME]
\def\pgfmathfloatlessthan@positive{%
- \ifnum\pgfmathfloat@a@E<\pgfmathfloat@b@E
- \global\pgfmathfloatcomparisontrue
- \else
- \ifnum\pgfmathfloat@a@E=\pgfmathfloat@b@E
- \ifdim\pgfmathfloat@a@M<\pgfmathfloat@b@M
- \global\pgfmathfloatcomparisontrue
- \fi
- \fi
- \fi
-}
+ \ifnum\pgfmathfloat@a@E<\pgfmathfloat@b@E
+ \global\pgfmathfloatcomparisontrue
+ \else
+ \ifnum\pgfmathfloat@a@E=\pgfmathfloat@b@E
+ \ifdim\pgfmathfloat@a@M<\pgfmathfloat@b@M
+ \global\pgfmathfloatcomparisontrue
+ \fi
+ \fi
+ \fi
+}%
% compares \pgfmathfloat@a@[SME] > \pgfmathfloat@b@[SME]
\def\pgfmathfloatgreaterthan@positive{%
- \ifnum\pgfmathfloat@a@E>\pgfmathfloat@b@E
- \global\pgfmathfloatcomparisontrue
- \else
- \ifnum\pgfmathfloat@a@E=\pgfmathfloat@b@E
- \ifdim\pgfmathfloat@a@M>\pgfmathfloat@b@M
- \global\pgfmathfloatcomparisontrue
- \fi
- \fi
- \fi
-}
-
-
-\def\pgfmathfloatgreaterthan@#1#2{\pgfmathfloatlessthan@{#2}{#1}}
+ \ifnum\pgfmathfloat@a@E>\pgfmathfloat@b@E
+ \global\pgfmathfloatcomparisontrue
+ \else
+ \ifnum\pgfmathfloat@a@E=\pgfmathfloat@b@E
+ \ifdim\pgfmathfloat@a@M>\pgfmathfloat@b@M
+ \global\pgfmathfloatcomparisontrue
+ \fi
+ \fi
+ \fi
+}%
+
+
+\def\pgfmathfloatgreaterthan@#1#2{\pgfmathfloatlessthan@{#2}{#1}}%
\let\pgfmathfloatgreaterthan=\pgfmathfloatgreaterthan@
\let\pgfmathfloatgreater@=\pgfmathfloatgreaterthan@
\def\pgfmathfloatmax@#1{%
- \begingroup
- \pgfmathfloatcreate{2}{1.0}{2147483644}%
- \let\pgfmathmaxsofar=\pgfmathresult
- \pgfmathfloatmax@@#1{}%
+ \begingroup
+ \pgfmathfloatcreate{2}{1.0}{2147483644}%
+ \let\pgfmathmaxsofar=\pgfmathresult
+ \pgfmathfloatmax@@#1{}%
}%
\def\pgfmathfloatmax@@#1{%
- \def\pgfmath@temp{#1}%
- \ifx\pgfmath@temp\pgfmath@empty%
- \expandafter\pgfmathfloatmax@@@%
- \else%
- \pgfmathfloatlessthan{\pgfmathmaxsofar}{#1}%
- \ifpgfmathfloatcomparison
- \edef\pgfmathmaxsofar{#1}%
- \fi
- \expandafter\pgfmathfloatmax@@%
- \fi%
+ \def\pgfmath@temp{#1}%
+ \ifx\pgfmath@temp\pgfmath@empty%
+ \expandafter\pgfmathfloatmax@@@%
+ \else%
+ \pgfmathfloatlessthan{\pgfmathmaxsofar}{#1}%
+ \ifpgfmathfloatcomparison
+ \edef\pgfmathmaxsofar{#1}%
+ \fi
+ \expandafter\pgfmathfloatmax@@%
+ \fi%
}%
\def\pgfmathfloatmax@@@{%
- \let\pgfmathresult=\pgfmathmaxsofar
- \pgfmath@smuggleone{\pgfmathresult}%
- \endgroup
+ \let\pgfmathresult=\pgfmathmaxsofar
+ \pgfmath@smuggleone{\pgfmathresult}%
+ \endgroup
}%
\def\pgfmathfloatmin@#1{%
- \begingroup
- \pgfmathfloatcreate{1}{1.0}{2147483644}%
- \let\pgfmathminsofar=\pgfmathresult
- \pgfmathfloatmin@@#1{}%
+ \begingroup
+ \pgfmathfloatcreate{1}{1.0}{2147483644}%
+ \let\pgfmathminsofar=\pgfmathresult
+ \pgfmathfloatmin@@#1{}%
}%
\def\pgfmathfloatmin@@#1{%
- \def\pgfmath@temp{#1}%
- \ifx\pgfmath@temp\pgfmath@empty%
- \expandafter\pgfmathfloatmin@@@%
- \else%
- \pgfmathfloatlessthan{#1}{\pgfmathminsofar}%
- \ifpgfmathfloatcomparison
- \edef\pgfmathminsofar{#1}%
- \fi
- \expandafter\pgfmathfloatmin@@%
- \fi%
+ \def\pgfmath@temp{#1}%
+ \ifx\pgfmath@temp\pgfmath@empty%
+ \expandafter\pgfmathfloatmin@@@%
+ \else%
+ \pgfmathfloatlessthan{#1}{\pgfmathminsofar}%
+ \ifpgfmathfloatcomparison
+ \edef\pgfmathminsofar{#1}%
+ \fi
+ \expandafter\pgfmathfloatmin@@%
+ \fi%
}%
\def\pgfmathfloatmin@@@{%
- \let\pgfmathresult=\pgfmathminsofar
- \pgfmath@smuggleone{\pgfmathresult}%
- \endgroup
+ \let\pgfmathresult=\pgfmathminsofar
+ \pgfmath@smuggleone{\pgfmathresult}%
+ \endgroup
}%
\def\pgfmathfloatmaxtwo#1#2{%
- \pgfmathfloatlessthan{#1}{#2}%
- \ifpgfmathfloatcomparison
- \edef\pgfmathresult{#2}%
- \else
- \edef\pgfmathresult{#1}%
- \fi
-}
+ \pgfmathfloatlessthan{#1}{#2}%
+ \ifpgfmathfloatcomparison
+ \edef\pgfmathresult{#2}%
+ \else
+ \edef\pgfmathresult{#1}%
+ \fi
+}%
\let\pgfmathfloatmax=\pgfmathfloatmaxtwo
\def\pgfmathfloatmintwo#1#2{%
- \pgfmathfloatlessthan{#1}{#2}%
- \ifpgfmathfloatcomparison
- \edef\pgfmathresult{#1}%
- \else
- \edef\pgfmathresult{#2}%
- \fi
-}
+ \pgfmathfloatlessthan{#1}{#2}%
+ \ifpgfmathfloatcomparison
+ \edef\pgfmathresult{#1}%
+ \else
+ \edef\pgfmathresult{#2}%
+ \fi
+}%
\let\pgfmathfloatmin=\pgfmathfloatmintwo
-% Renormalizes #1 to extended precision mantisse, meaning
+% Renormalizes #1 to extended precision mantissa, meaning
% 100 <= m < 1000
% instead of 1 <= m < 10.
-%
+%
% The 'extended precision' means we have higher accuracy when we apply pgfmath operations to mantissas.
%
% The input argument is expected to be a normalized floating point number; the output argument is a non-normalized floating point number (well, normalized to extended precision).
@@ -788,30 +839,30 @@
% \pgfmathfloattoextentedprecision@a. It also provides exponent and
% sign of #1 in output arguments and may be used to increase speed.
\def\pgfmathfloattoextentedprecision#1{%
- \begingroup
- \pgfmathfloattoextentedprecision@a{#1}%
- \pgfmathfloatcreate{\pgfmathfloat@a@S}{\pgfmathresult}{\pgfmathfloat@a@E}%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \pgfmathfloattoextentedprecision@a{#1}%
+ \pgfmathfloatcreate{\pgfmathfloat@a@S}{\pgfmathresult}{\pgfmathfloat@a@E}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\def\pgfmathfloattoextentedprecision@@zero#1\pgfmathfloat@EOI{%
- \edef\pgfmathresult{#1}%
+ \edef\pgfmathresult{#1}%
}%
\def\pgfmathfloattoextentedprecision@@one#1.#2#3\pgfmathfloat@EOI{%
- \edef\pgfmathresult{#1#2.#3}%
+ \edef\pgfmathresult{#1#2.#3}%
}%
\def\pgfmathfloattoextentedprecision@@two#1.#2#3#4\pgfmathfloat@EOI{%
- \edef\pgfmathresult{#1#2#3.#4}%
+ \edef\pgfmathresult{#1#2#3.#4}%
}%
\def\pgfmathfloattoextentedprecision@@three#1.#2#3#4#5\pgfmathfloat@EOI{%
- \edef\pgfmathresult{#1#2#3#4.#5}%
+ \edef\pgfmathresult{#1#2#3#4.#5}%
}%
% Sets extended precision to 10^#1.
%
% The different choices are
-%
+%
% - 0: normalization 0 <= m < 1 (disable extended precision)
% - 1: normalization 10 <= m < 100
% - 2: normalization 100 <= m < 1000 (default)
@@ -821,19 +872,19 @@
%
% This setting applies to \pgfmathfloattoextentedprecision and friends.
\def\pgfmathfloatsetextprecision#1{%
- \ifcase#1\relax
- \let\pgfmathfloattoextentedprecision@@=\pgfmathfloattoextentedprecision@@zero
- \def\pgfmathfloatextprec@shift{0}%
- \or
- \let\pgfmathfloattoextentedprecision@@=\pgfmathfloattoextentedprecision@@one
- \def\pgfmathfloatextprec@shift{1}%
- \or
- \let\pgfmathfloattoextentedprecision@@=\pgfmathfloattoextentedprecision@@two
- \def\pgfmathfloatextprec@shift{2}%
- \else
- \let\pgfmathfloattoextentedprecision@@=\pgfmathfloattoextentedprecision@@three
- \def\pgfmathfloatextprec@shift{3}%
- \fi
+ \ifcase#1\relax
+ \let\pgfmathfloattoextentedprecision@@=\pgfmathfloattoextentedprecision@@zero
+ \def\pgfmathfloatextprec@shift{0}%
+ \or
+ \let\pgfmathfloattoextentedprecision@@=\pgfmathfloattoextentedprecision@@one
+ \def\pgfmathfloatextprec@shift{1}%
+ \or
+ \let\pgfmathfloattoextentedprecision@@=\pgfmathfloattoextentedprecision@@two
+ \def\pgfmathfloatextprec@shift{2}%
+ \else
+ \let\pgfmathfloattoextentedprecision@@=\pgfmathfloattoextentedprecision@@three
+ \def\pgfmathfloatextprec@shift{3}%
+ \fi
}%
\pgfmathfloatsetextprecision{2}%
@@ -842,143 +893,143 @@
%
% INPUT:
% #1 normalized floating point number. Maybe a macro (it will be expanded ONCE)
-%
+%
% OUTPUT:
-% - \pgfmathresult : the mantisse in extended precision
+% - \pgfmathresult : the mantissa in extended precision
% - \pgfmathfloat@a@S : the sign of #1
% - \pgfmathfloat@a@E : the exponent of #1, adjusted for extended precision
% - \pgfmathfloat@a@Mtok : undefined (its contents will be destroyed.
%
\def\pgfmathfloattoextentedprecision@a#1{%
- \edef\pgfmathresult{#1}%
- \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \ifnum\pgfmathfloat@a@S<3
- \advance\pgfmathfloat@a@E by-\pgfmathfloatextprec@shift\relax% compensate for shift
- \expandafter\pgfmathfloattoextentedprecision@@\the\pgfmathfloat@a@Mtok 000\pgfmathfloat@EOI
- \fi
+ \edef\pgfmathresult{#1}%
+ \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \ifnum\pgfmathfloat@a@S<3
+ \advance\pgfmathfloat@a@E by-\pgfmathfloatextprec@shift\relax% compensate for shift
+ \expandafter\pgfmathfloattoextentedprecision@@\the\pgfmathfloat@a@Mtok 000\pgfmathfloat@EOI
+ \fi
}%
% Similar to \pgfmathfloattoextentedprecision@a, this one here fills the '@b' registers.
\def\pgfmathfloattoextentedprecision@b#1{%
- \edef\pgfmathresult{#1}%
- \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@b@S\pgfmathfloat@a@Mtok\pgfmathfloat@b@E
- \ifnum\pgfmathfloat@b@S<3
- \advance\pgfmathfloat@b@E by-\pgfmathfloatextprec@shift\relax
- \expandafter\pgfmathfloattoextentedprecision@@\the\pgfmathfloat@a@Mtok 00\pgfmathfloat@EOI
- \fi
+ \edef\pgfmathresult{#1}%
+ \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@b@S\pgfmathfloat@a@Mtok\pgfmathfloat@b@E
+ \ifnum\pgfmathfloat@b@S<3
+ \advance\pgfmathfloat@b@E by-\pgfmathfloatextprec@shift\relax
+ \expandafter\pgfmathfloattoextentedprecision@@\the\pgfmathfloat@a@Mtok 00\pgfmathfloat@EOI
+ \fi
}%
% Addition of two floating point numbers using 8 significant digits.
\def\pgfmathfloatadd@#1#2{%
- \begingroup
- %
- % renormalize argument to 100 <= m < 1000 for extended accuracy:
- \pgfmathfloattoextentedprecision@a{#1}%
- \let\pgfmathfloat@arga=\pgfmathresult
- %
- \pgfmathfloattoextentedprecision@b{#2}%
- \let\pgfmathfloat@argb=\pgfmathresult
- %
- \pgfmathfloatcomparisontrue% re-use this boolean here to handle special cases.
- \ifcase\pgfmathfloat@a@S
- \edef\pgfmathresult{#2}%
- \pgfmathfloatcomparisonfalse
- \or
- \or
- \edef\pgfmathfloat@arga{-\pgfmathfloat@arga}%
- \else
- \pgfmathfloatcomparisonfalse
- \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{0.0}{0}%
- \fi
- \ifcase\pgfmathfloat@b@S
- \edef\pgfmathresult{#1}%
- \pgfmathfloatcomparisonfalse
- \or
- \or
- \edef\pgfmathfloat@argb{-\pgfmathfloat@argb}%
- \else
- \pgfmathfloatcomparisonfalse
- \pgfmathfloatcreate{\the\pgfmathfloat@b@S}{0.0}{0}%
- \fi
- \ifpgfmathfloatcomparison
- % Shift lesser mantisse to fit the larger one:
- \ifnum\pgfmathfloat@a@E<\pgfmathfloat@b@E
- \pgfmathfloatadd@shift{\pgfmathfloat@arga}{\pgfmathfloat@a@E}{\pgfmathfloat@b@E}%
- \else
- \pgfmathfloatadd@shift{\pgfmathfloat@argb}{\pgfmathfloat@b@E}{\pgfmathfloat@a@E}%
- \fi
- % add them!
- \pgfmath@basic@add@{\pgfmathfloat@arga}{\pgfmathfloat@argb}%
- % renormalize sum. This is the only part were an expensive routine comes into play:
- \edef\pgfmathresult{\pgfmathresult e\the\pgfmathfloat@a@E}%
- \expandafter\pgfmathfloatqparsenumber\expandafter{\pgfmathresult}%
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ %
+ % renormalize argument to 100 <= m < 1000 for extended accuracy:
+ \pgfmathfloattoextentedprecision@a{#1}%
+ \let\pgfmathfloat@arga=\pgfmathresult
+ %
+ \pgfmathfloattoextentedprecision@b{#2}%
+ \let\pgfmathfloat@argb=\pgfmathresult
+ %
+ \pgfmathfloatcomparisontrue% re-use this boolean here to handle special cases.
+ \ifcase\pgfmathfloat@a@S
+ \edef\pgfmathresult{#2}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \or
+ \edef\pgfmathfloat@arga{-\pgfmathfloat@arga}%
+ \else
+ \pgfmathfloatcomparisonfalse
+ \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{0.0}{0}%
+ \fi
+ \ifcase\pgfmathfloat@b@S
+ \edef\pgfmathresult{#1}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \or
+ \edef\pgfmathfloat@argb{-\pgfmathfloat@argb}%
+ \else
+ \pgfmathfloatcomparisonfalse
+ \pgfmathfloatcreate{\the\pgfmathfloat@b@S}{0.0}{0}%
+ \fi
+ \ifpgfmathfloatcomparison
+ % Shift lesser mantisse to fit the larger one:
+ \ifnum\pgfmathfloat@a@E<\pgfmathfloat@b@E
+ \pgfmathfloatadd@shift{\pgfmathfloat@arga}{\pgfmathfloat@a@E}{\pgfmathfloat@b@E}%
+ \else
+ \pgfmathfloatadd@shift{\pgfmathfloat@argb}{\pgfmathfloat@b@E}{\pgfmathfloat@a@E}%
+ \fi
+ % add them!
+ \pgfmath@basic@add@{\pgfmathfloat@arga}{\pgfmathfloat@argb}%
+ % renormalize sum. This is the only part were an expensive routine comes into play:
+ \edef\pgfmathresult{\pgfmathresult e\the\pgfmathfloat@a@E}%
+ \expandafter\pgfmathfloatqparsenumber\expandafter{\pgfmathresult}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
% #1= floating point number
% #2= TeX code to execute if #1 == 0
% #3= TeX code to execute if #1 != 0
\def\pgfmathfloatifzero#1#2#3{%
- \pgfmathfloatgetflagstomacro{#1}\pgfmathfloat@loc@TMPa
- \if\pgfmathfloat@loc@TMPa0 #2\else#3\fi
+ \pgfmathfloatgetflagstomacro{#1}\pgfmathfloat@loc@TMPa
+ \if\pgfmathfloat@loc@TMPa0 #2\else#3\fi
}%
\def\pgfmathfloatiffinite#1#2#3{%
- \pgfmathfloatgetflagstomacro{#1}\pgfmathfloatiffinite@
- \ifnum\pgfmathfloatiffinite@>2 #3\else #2\fi
+ \pgfmathfloatgetflagstomacro{#1}\pgfmathfloatiffinite@
+ \ifnum\pgfmathfloatiffinite@>2 #3\else #2\fi
}%
\def\pgfmathfloatifthenelse@#1#2#3{%
- \pgfmathfloatifflags{#1}{0}{%
- \edef\pgfmathresult{#3}%%
- }{%
- \edef\pgfmathresult{#2}%
- }%
-}
+ \pgfmathfloatifflags{#1}{0}{%
+ \edef\pgfmathresult{#3}%%
+ }{%
+ \edef\pgfmathresult{#2}%
+ }%
+}%
\def\pgfmathfloatequal@#1#2{%
- \pgfmathfloatifapproxequalrel{#1}{#2}{%
- \def\pgfmathresult{1}%
- \pgfmathfloatcomparisontrue
- }{%
- \def\pgfmathresult{0}%
- \pgfmathfloatcomparisonfalse
- }%
-}
+ \pgfmathfloatifapproxequalrel{#1}{#2}{%
+ \def\pgfmathresult{1}%
+ \pgfmathfloatcomparisontrue
+ }{%
+ \def\pgfmathresult{0}%
+ \pgfmathfloatcomparisonfalse
+ }%
+}%
\let\pgfmathfloatequalto@=\pgfmathfloatequal@
\def\pgfmathfloatnotequal@#1#2{%
- \pgfmathfloatifapproxequalrel{#1}{#2}{%
- \def\pgfmathresult{0}%
- \pgfmathfloatcomparisonfalse
- }{%
- \def\pgfmathresult{1}%
- \pgfmathfloatcomparisontrue
- }%
-}
+ \pgfmathfloatifapproxequalrel{#1}{#2}{%
+ \def\pgfmathresult{0}%
+ \pgfmathfloatcomparisonfalse
+ }{%
+ \def\pgfmathresult{1}%
+ \pgfmathfloatcomparisontrue
+ }%
+}%
\let\pgfmathfloatnotequalto@=\pgfmathfloatnotequal@
% Computes the relative error between #1 and #2 (assuming #2 != 0) and
% invokes #3 if the relative error is below `/pgf/fpu/rel thresh' and
% #4 if that is not the case.
\long\def\pgfmathfloatifapproxequalrel#1#2#3#4{%
- \begingroup
- \pgfmathfloatparsenumber{#1}%
- \let\pgfmathfloatarga=\pgfmathresult
- \pgfmathfloatparsenumber{#2}%
- \let\pgfmathfloatargb=\pgfmathresult
- \pgfmathfloatrelerror@\pgfmathfloatarga\pgfmathfloatargb
- \let\pgfmathfloatarga=\pgfmathresult
- \pgfmathfloatlessthan@\pgfmathfloatarga\pgfmathfloat@relthresh
- \ifpgfmathfloatcomparison
- \def\pgfmathfloat@loc@TMPa{#3}%
- \else
- \def\pgfmathfloat@loc@TMPa{#4}%
- \fi
- \expandafter\endgroup
- \pgfmathfloat@loc@TMPa
+ \begingroup
+ \pgfmathfloatparsenumber{#1}%
+ \let\pgfmathfloatarga=\pgfmathresult
+ \pgfmathfloatparsenumber{#2}%
+ \let\pgfmathfloatargb=\pgfmathresult
+ \pgfmathfloatrelerror@\pgfmathfloatarga\pgfmathfloatargb
+ \let\pgfmathfloatarga=\pgfmathresult
+ \pgfmathfloatlessthan@\pgfmathfloatarga\pgfmathfloat@relthresh
+ \ifpgfmathfloatcomparison
+ \def\pgfmathfloat@loc@TMPa{#3}%
+ \else
+ \def\pgfmathfloat@loc@TMPa{#4}%
+ \fi
+ \expandafter\endgroup
+ \pgfmathfloat@loc@TMPa
}%
% Invokes code '#3' if the flags of the floating point number '#1'
@@ -993,227 +1044,227 @@
% \pgfmathfloatifflags{\pgfmathresult}{-}{It's negative!}{It's not negative!}%
% it also supports #2=u which means 'unbounded'
\def\pgfmathfloatifflags#1#2#3#4{%
- \if#2-%
- \pgfmathfloatifflags{#1}{2}{#3}{#4}%
- \else
- \if#2+%
- \pgfmathfloatifflags{#1}{1}{#3}{#4}%
- \else
- \pgfmathfloatgetflagstomacro{#1}\pgfmathfloat@loc@TMPa
- \if#2u%
- \ifnum\pgfmathfloat@loc@TMPa>2
- #3\relax
- \else
- #4\relax
- \fi
- \else
- \if\pgfmathfloat@loc@TMPa#2%
- #3\relax
- \else
- #4\relax
- \fi
- \fi
- \fi
- \fi
-}%
-
-% #1=mantisse which needs to be shifted (with smaller exponent)
+ \if#2-%
+ \pgfmathfloatifflags{#1}{2}{#3}{#4}%
+ \else
+ \if#2+%
+ \pgfmathfloatifflags{#1}{1}{#3}{#4}%
+ \else
+ \pgfmathfloatgetflagstomacro{#1}\pgfmathfloat@loc@TMPa
+ \if#2u%
+ \ifnum\pgfmathfloat@loc@TMPa>2
+ #3\relax
+ \else
+ #4\relax
+ \fi
+ \else
+ \if\pgfmathfloat@loc@TMPa#2%
+ #3\relax
+ \else
+ #4\relax
+ \fi
+ \fi
+ \fi
+ \fi
+}%
+
+% #1=mantissa which needs to be shifted (with smaller exponent)
% #2=smaller exponent
% #3=larger exponent
-%
+%
% ATTENTION: this helper method DESTROYS contents of \pgfmathfloat@a@S.
\def\pgfmathfloatadd@shift#1#2#3{%
- \pgf@xa=#1 pt%
- \pgfmathfloat@a@S=#3\relax
- \advance\pgfmathfloat@a@S by-#2\relax
- \ifcase\pgfmathfloat@a@S
- \or
- \divide\pgf@xa by10\relax
- \or
- \divide\pgf@xa by100\relax
- \or
- \divide\pgf@xa by1000\relax
- \or
- \divide\pgf@xa by10000\relax
- \or
- \divide\pgf@xa by10000\relax
- \divide\pgf@xa by10\relax
- \or
- \divide\pgf@xa by10000\relax
- \divide\pgf@xa by100\relax
- \or
- \divide\pgf@xa by10000\relax
- \divide\pgf@xa by1000\relax
- \or
- \divide\pgf@xa by10000\relax
- \divide\pgf@xa by10000\relax
- \else
- \pgf@xa=0pt%
- \fi
- #2=#3\relax
- \edef#1{\pgf@sys@tonumber\pgf@xa}%
-}
+ \pgf@xa=#1 pt%
+ \pgfmathfloat@a@S=#3\relax
+ \advance\pgfmathfloat@a@S by-#2\relax
+ \ifcase\pgfmathfloat@a@S
+ \or
+ \divide\pgf@xa by10\relax
+ \or
+ \divide\pgf@xa by100\relax
+ \or
+ \divide\pgf@xa by1000\relax
+ \or
+ \divide\pgf@xa by10000\relax
+ \or
+ \divide\pgf@xa by10000\relax
+ \divide\pgf@xa by10\relax
+ \or
+ \divide\pgf@xa by10000\relax
+ \divide\pgf@xa by100\relax
+ \or
+ \divide\pgf@xa by10000\relax
+ \divide\pgf@xa by1000\relax
+ \or
+ \divide\pgf@xa by10000\relax
+ \divide\pgf@xa by10000\relax
+ \else
+ \pgf@xa=0pt%
+ \fi
+ #2=#3\relax
+ \edef#1{\pgf@sys@tonumber\pgf@xa}%
+}%
\let\pgfmathfloatadd=\pgfmathfloatadd@
% Subtracts two floating point numbers.
\def\pgfmathfloatsubtract@#1#2{%
- \begingroup
- \edef\pgfmathresult{#2}%
- \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@b@S\pgfmathfloat@a@Mtok\pgfmathfloat@b@E
- \ifcase\pgfmathfloat@b@S
- \edef\pgfmathresult{#1}%
- \or
- \pgfmathfloatcreate{2}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@b@E}%
- \let\pgfmathfloatsub@arg=\pgfmathresult
- \pgfmathfloatadd@{#1}{\pgfmathfloatsub@arg}%
- \or
- \pgfmathfloatcreate{1}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@b@E}%
- \let\pgfmathfloatsub@arg=\pgfmathresult
- \pgfmathfloatadd@{#1}{\pgfmathfloatsub@arg}%
- \else
- \pgfmathfloatcreate{\the\pgfmathfloat@b@S}{0.0}{0}%
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \edef\pgfmathresult{#2}%
+ \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@b@S\pgfmathfloat@a@Mtok\pgfmathfloat@b@E
+ \ifcase\pgfmathfloat@b@S
+ \edef\pgfmathresult{#1}%
+ \or
+ \pgfmathfloatcreate{2}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@b@E}%
+ \let\pgfmathfloatsub@arg=\pgfmathresult
+ \pgfmathfloatadd@{#1}{\pgfmathfloatsub@arg}%
+ \or
+ \pgfmathfloatcreate{1}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@b@E}%
+ \let\pgfmathfloatsub@arg=\pgfmathresult
+ \pgfmathfloatadd@{#1}{\pgfmathfloatsub@arg}%
+ \else
+ \pgfmathfloatcreate{\the\pgfmathfloat@b@S}{0.0}{0}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\let\pgfmathfloatsubtract=\pgfmathfloatsubtract@
% Scales a floating point number #1 with a fixed point number #2 using pgfmathmultiply.
-%
+%
% Use this method if #2 is small number.
\def\pgfmathfloatmultiplyfixed@#1#2{%
- \begingroup
- %
- % renormalize argument to 100 <= m < 1000 for extended accuracy:
- \pgfmathfloattoextentedprecision@a{#1}%
- \let\pgfmathfloat@arga=\pgfmathresult
- %
- \pgfmathfloatcomparisontrue% re-use this boolean here to handle special cases.
- \ifcase\pgfmathfloat@a@S
- \edef\pgfmathresult{#1}%
- \pgfmathfloatcomparisonfalse
- \or
- \or
- \edef\pgfmathfloat@arga{-\pgfmathfloat@arga}%
- \else
- \pgfmathfloatcomparisonfalse
- \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{0.0}{0}%
- \fi
- \ifpgfmathfloatcomparison
- \pgfmath@basic@multiply@{\pgfmathfloat@arga}{#2}%
- % renormalize product. This is the only part were an expensive routine comes into play:
- \edef\pgfmathresult{\pgfmathresult e\the\pgfmathfloat@a@E}%
- \expandafter\pgfmathfloatqparsenumber\expandafter{\pgfmathresult}%
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ %
+ % renormalize argument to 100 <= m < 1000 for extended accuracy:
+ \pgfmathfloattoextentedprecision@a{#1}%
+ \let\pgfmathfloat@arga=\pgfmathresult
+ %
+ \pgfmathfloatcomparisontrue% re-use this boolean here to handle special cases.
+ \ifcase\pgfmathfloat@a@S
+ \edef\pgfmathresult{#1}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \or
+ \edef\pgfmathfloat@arga{-\pgfmathfloat@arga}%
+ \else
+ \pgfmathfloatcomparisonfalse
+ \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{0.0}{0}%
+ \fi
+ \ifpgfmathfloatcomparison
+ \pgfmath@basic@multiply@{\pgfmathfloat@arga}{#2}%
+ % renormalize product. This is the only part were an expensive routine comes into play:
+ \edef\pgfmathresult{\pgfmathresult e\the\pgfmathfloat@a@E}%
+ \expandafter\pgfmathfloatqparsenumber\expandafter{\pgfmathresult}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\let\pgfmathfloatmultiplyfixed=\pgfmathfloatmultiplyfixed@
\def\pgfmathfloatmultiply@#1#2{%
- \begingroup
- \pgfmathfloatsetextprecision{1}%
- \pgfmathfloattoextentedprecision@a{#1}%
- \let\pgfmathfloat@arga=\pgfmathresult
- %
- \pgfmathfloattoextentedprecision@b{#2}%
- \let\pgfmathfloat@argb=\pgfmathresult
- %
- \pgfmathfloatcomparisontrue% re-use this boolean here to handle special cases.
- \ifcase\pgfmathfloat@a@S
- % 0
- \pgfmathfloatcreate{0}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or% +
- \ifcase\pgfmathfloat@b@S
- \pgfmathfloatcreate{0}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \def\pgfmathresult@S{1}%
- \or
- \def\pgfmathresult@S{2}%
- \else
- \expandafter\pgfmathfloatcreate\the\pgfmathfloat@b@S{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \fi
- \or% -
- \ifcase\pgfmathfloat@b@S
- \pgfmathfloatcreate{0}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \def\pgfmathresult@S{2}%
- \or
- \def\pgfmathresult@S{1}%
- \or
- \pgfmathfloatcreate{3}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{5}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{4}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \fi
- \or% nan
- \pgfmathfloatcreate{3}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or% +infty
- \ifcase\pgfmathfloat@b@S
- \pgfmathfloatcreate{0}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{4}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{5}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{3}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{4}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{5}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \fi
- \or% -infty
- \ifcase\pgfmathfloat@b@S
- \pgfmathfloatcreate{0}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{5}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{4}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{3}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{5}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{4}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \fi
- \fi
- \ifpgfmathfloatcomparison
- \pgfmath@basic@multiply@{\pgfmathfloat@arga}{\pgfmathfloat@argb}%
- \advance\pgfmathfloat@a@E by\pgfmathfloat@b@E
- % renormalize sum. This is the only part were an expensive routine comes into play:
- \edef\pgfmathresult{\pgfmathresult e\the\pgfmathfloat@a@E}%
- \expandafter\pgfmathfloatqparsenumber\expandafter{\pgfmathresult}%
- \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \pgfmathfloatcreate{\pgfmathresult@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \pgfmathfloatsetextprecision{1}%
+ \pgfmathfloattoextentedprecision@a{#1}%
+ \let\pgfmathfloat@arga=\pgfmathresult
+ %
+ \pgfmathfloattoextentedprecision@b{#2}%
+ \let\pgfmathfloat@argb=\pgfmathresult
+ %
+ \pgfmathfloatcomparisontrue% re-use this boolean here to handle special cases.
+ \ifcase\pgfmathfloat@a@S
+ % 0
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or% +
+ \ifcase\pgfmathfloat@b@S
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \def\pgfmathresult@S{1}%
+ \or
+ \def\pgfmathresult@S{2}%
+ \else
+ \expandafter\pgfmathfloatcreate\the\pgfmathfloat@b@S{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \fi
+ \or% -
+ \ifcase\pgfmathfloat@b@S
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \def\pgfmathresult@S{2}%
+ \or
+ \def\pgfmathresult@S{1}%
+ \or
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{5}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{4}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \fi
+ \or% nan
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or% +infty
+ \ifcase\pgfmathfloat@b@S
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{4}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{5}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{4}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{5}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \fi
+ \or% -infty
+ \ifcase\pgfmathfloat@b@S
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{5}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{4}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{5}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{4}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \fi
+ \fi
+ \ifpgfmathfloatcomparison
+ \pgfmath@basic@multiply@{\pgfmathfloat@arga}{\pgfmathfloat@argb}%
+ \advance\pgfmathfloat@a@E by\pgfmathfloat@b@E
+ % renormalize sum. This is the only part were an expensive routine comes into play:
+ \edef\pgfmathresult{\pgfmathresult e\the\pgfmathfloat@a@E}%
+ \expandafter\pgfmathfloatqparsenumber\expandafter{\pgfmathresult}%
+ \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \pgfmathfloatcreate{\pgfmathresult@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\let\pgfmathfloatmultiply=\pgfmathfloatmultiply@
@@ -1221,237 +1272,290 @@
%
% It employs the basic math engine internally to divide mantissas.
\def\pgfmathfloatdivide@#1#2{%
- \begingroup
- \pgfmathfloatsetextprecision{1}% is not too important, I think. After all, 0.1 <= #1/#2 < 10 or so due to normalization (no matter, which)
- \edef\pgfmathfloat@arga{#1}%
- \pgfmathfloattoextentedprecision@a{\pgfmathfloat@arga}%
- \let\pgfmathfloat@arga=\pgfmathresult
- %
- \edef\pgfmathfloat@argb{#2}%
- \pgfmathfloattoextentedprecision@b{\pgfmathfloat@argb}%
- \let\pgfmathfloat@argb=\pgfmathresult
- %
- \pgfmathfloatcomparisontrue% re-use this boolean here to handle special cases.
- \ifcase\pgfmathfloat@a@S
- % 0
- \pgfmathfloatcreate{0}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or% +
- \ifcase\pgfmathfloat@b@S
- \pgfmathfloatcreate{4}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \def\pgfmathresult@S{1}%
- \or
- \def\pgfmathresult@S{2}%
- \or
- \pgfmathfloatcreate{3}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \else
- \pgfmathfloatcreate{0}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \fi
- \or% -
- \ifcase\pgfmathfloat@b@S
- \pgfmathfloatcreate{5}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \def\pgfmathresult@S{2}%
- \or
- \def\pgfmathresult@S{1}%
- \or
- \pgfmathfloatcreate{3}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \else
- \pgfmathfloatcreate{0}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \fi
- \or% nan
- \pgfmathfloatcreate{3}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or% +infty
- \ifcase\pgfmathfloat@b@S
- \pgfmathfloatcreate{4}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{4}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{5}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{3}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{4}{0.0}{0}% what is inf/inf ?
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{5}{0.0}{0}% or inf/-inf ?
- \pgfmathfloatcomparisonfalse
- \fi
- \or% -infty
- \ifcase\pgfmathfloat@b@S
- \pgfmathfloatcreate{5}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{5}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{4}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{3}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{5}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \or
- \pgfmathfloatcreate{4}{0.0}{0}%
- \pgfmathfloatcomparisonfalse
- \fi
- \fi
- \ifpgfmathfloatcomparison
- \pgfmath@basic@divide@{\pgfmathfloat@arga}{\pgfmathfloat@argb}%
- \advance\pgfmathfloat@a@E by-\pgfmathfloat@b@E
- % renormalize. This is the only part were an expensive float routine comes into play:
- \edef\pgfmathresult{\pgfmathresult e\the\pgfmathfloat@a@E}%
- \expandafter\pgfmathfloatqparsenumber\expandafter{\pgfmathresult}%
- % And re-insert the proper sign:
- \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \pgfmathfloatcreate{\pgfmathresult@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \pgfmathfloatsetextprecision{1}% is not too important, I think. After all, 0.1 <= #1/#2 < 10 or so due to normalization (no matter, which)
+ \edef\pgfmathfloat@arga{#1}%
+ \pgfmathfloattoextentedprecision@a{\pgfmathfloat@arga}%
+ \let\pgfmathfloat@arga=\pgfmathresult
+ %
+ \edef\pgfmathfloat@argb{#2}%
+ \pgfmathfloattoextentedprecision@b{\pgfmathfloat@argb}%
+ \let\pgfmathfloat@argb=\pgfmathresult
+ %
+ \pgfmathfloatcomparisontrue% re-use this boolean here to handle special cases.
+ \ifcase\pgfmathfloat@a@S
+ % 0
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or% +
+ \ifcase\pgfmathfloat@b@S
+ \pgfmathfloatcreate{4}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \def\pgfmathresult@S{1}%
+ \or
+ \def\pgfmathresult@S{2}%
+ \or
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \else
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \fi
+ \or% -
+ \ifcase\pgfmathfloat@b@S
+ \pgfmathfloatcreate{5}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \def\pgfmathresult@S{2}%
+ \or
+ \def\pgfmathresult@S{1}%
+ \or
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \else
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \fi
+ \or% nan
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or% +infty
+ \ifcase\pgfmathfloat@b@S
+ \pgfmathfloatcreate{4}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{4}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{5}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{4}{0.0}{0}% what is inf/inf ?
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{5}{0.0}{0}% or inf/-inf ?
+ \pgfmathfloatcomparisonfalse
+ \fi
+ \or% -infty
+ \ifcase\pgfmathfloat@b@S
+ \pgfmathfloatcreate{5}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{5}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{4}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{5}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \or
+ \pgfmathfloatcreate{4}{0.0}{0}%
+ \pgfmathfloatcomparisonfalse
+ \fi
+ \fi
+ \ifpgfmathfloatcomparison
+ \pgfmath@basic@divide@{\pgfmathfloat@arga}{\pgfmathfloat@argb}%
+ \advance\pgfmathfloat@a@E by-\pgfmathfloat@b@E
+ % renormalize. This is the only part were an expensive float routine comes into play:
+ \edef\pgfmathresult{\pgfmathresult e\the\pgfmathfloat@a@E}%
+ \expandafter\pgfmathfloatqparsenumber\expandafter{\pgfmathresult}%
+ % And re-insert the proper sign:
+ \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \pgfmathfloatcreate{\pgfmathresult@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\let\pgfmathfloatdivide=\pgfmathfloatdivide@
\def\pgfmathfloatreciprocal@#1{%
- \begingroup
- % FIXME optimize
- \edef\pgfmathfloat@loc@TMPa{#1}%
- \pgfmathfloatcreate{1}{1.0}{0}%
- \pgfmathfloatdivide@{\pgfmathresult}{\pgfmathfloat@loc@TMPa}%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ % FIXME optimize
+ \edef\pgfmathfloat@loc@TMPa{#1}%
+ \pgfmathfloatcreate{1}{1.0}{0}%
+ \pgfmathfloatdivide@{\pgfmathresult}{\pgfmathfloat@loc@TMPa}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
% Computes sqrt(#1) in floating point arithmetics.
%
% It employs sqrt( m * 10^e ) = sqrt(m) * sqrt(10^e).
\def\pgfmathfloatsqrt@#1{%
- \begingroup
- \pgfmathfloatsetextprecision{3}%
- \edef\pgfmathfloat@arga{#1}%
- \pgfmathfloattoextentedprecision@a{\pgfmathfloat@arga}%
- \let\pgfmathfloat@arga=\pgfmathresult
- %
- \ifcase\pgfmathfloat@a@S
- % 0
- \pgfmathfloatcreate{0}{0.0}{0}%
- \or% +
- \pgfmath@basic@sqrt@{\pgfmathfloat@arga}%
- \ifodd\pgfmathfloat@a@E
- \ifnum\pgfmathfloat@a@E>0
- \expandafter\pgfmath@basic@multiply@\expandafter{\pgfmathresult}{3.16227766}% * sqrt(10)
- \else
- \expandafter\pgfmath@basic@multiply@\expandafter{\pgfmathresult}{0.316227766}% * sqrt(0.1)
- \fi
- \fi
- \divide\pgfmathfloat@a@E by2 % sqrt(10^e) = 10^{e/2} (see above for odd e)
- % renormalize sum. This is the only part were an expensive routine comes into play:
- \edef\pgfmathfloat@arga{\pgfmathresult e\the\pgfmathfloat@a@E}%
- \pgfmathfloatqparsenumber{\pgfmathfloat@arga}%
- \or% -
- \pgfmathfloatcreate{3}{0.0}{0}%
- \or% nan
- \pgfmathfloatcreate{3}{0.0}{0}%
- \or% +infty
- \pgfmathfloatcreate{4}{0.0}{0}%
- \or% -infty
- \pgfmathfloatcreate{3}{0.0}{0}%
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \pgfmathfloatsetextprecision{3}%
+ \edef\pgfmathfloat@arga{#1}%
+ \pgfmathfloattoextentedprecision@a{\pgfmathfloat@arga}%
+ \let\pgfmathfloat@arga=\pgfmathresult
+ %
+ \ifcase\pgfmathfloat@a@S
+ % 0
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \or% +
+ \pgfmath@basic@sqrt@{\pgfmathfloat@arga}%
+ \ifodd\pgfmathfloat@a@E
+ \ifnum\pgfmathfloat@a@E>0
+ \expandafter\pgfmath@basic@multiply@\expandafter{\pgfmathresult}{3.16227766}% * sqrt(10)
+ \else
+ \expandafter\pgfmath@basic@multiply@\expandafter{\pgfmathresult}{0.316227766}% * sqrt(0.1)
+ \fi
+ \fi
+ \divide\pgfmathfloat@a@E by2 % sqrt(10^e) = 10^{e/2} (see above for odd e)
+ % renormalize sum. This is the only part were an expensive routine comes into play:
+ \edef\pgfmathfloat@arga{\pgfmathresult e\the\pgfmathfloat@a@E}%
+ \pgfmathfloatqparsenumber{\pgfmathfloat@arga}%
+ \or% -
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \or% nan
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \or% +infty
+ \pgfmathfloatcreate{4}{0.0}{0}%
+ \or% -infty
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\let\pgfmathfloatsqrt=\pgfmathfloatsqrt@
% Returns the integer part of the floating point number #1.
%
-% The result is returned as floating point as well.
+% The result is returned as floating point as well.
%
% This operation is not limited to TeX's range of count registers (it
% works symbolly)
%
% @see \pgfmathfloattoint
+% POSTCONDITION: \pgfmathresult contains the result and
+% \pgfmathfloatintwasnoop=1 if there was nothing to do
+% \pgfmathfloatintwasnoop=0 if there where non-zero digits after the period
+% \pgfmathfloatintwasnoop=2 if there where digits after the period. The digits will be stored in \pgfmathfloatintremainder in this case.
\def\pgfmathfloatint@#1{%
- \begingroup
- \edef\pgfmathresult{#1}%
- \expandafter\pgfmathfloat@decompose@tok\pgfmathresult\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \ifcase\pgfmathfloat@a@S
- % 0: nothing to do.
- \or% +
- \expandafter\pgfmathfloatint@@\the\pgfmathfloat@a@Mtok\pgfmathfloat@EOI
- \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
- \or% -
- \expandafter\pgfmathfloatint@@\the\pgfmathfloat@a@Mtok\pgfmathfloat@EOI
- \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
- \else
- % nothing to do
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \edef\pgfmathfloatint@input{#1}%
+ \expandafter\pgfmathfloat@decompose@tok\pgfmathfloatint@input\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \gdef\pgfmathfloatintwasnoop{1}%
+ \gdef\pgfmathfloatintremainder{}%
+ \ifcase\pgfmathfloat@a@S
+ % 0: nothing to do.
+ \or% +
+ \expandafter\pgfmathfloatint@@\the\pgfmathfloat@a@Mtok\pgfmathfloat@EOI
+ \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
+ \or% -
+ \expandafter\pgfmathfloatint@@\the\pgfmathfloat@a@Mtok\pgfmathfloat@EOI
+ \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
+ \else
+ % nothing to do
+ \fi
+ %\message{ XXXXX int(\pgfmathfloatint@input) = \pgfmathresult -> was no op = \pgfmathfloatintwasnoop\space (remainder \pgfmathfloatintremainder)^^J}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\def\pgfmathfloatint@@#1.{%
- \ifnum\pgfmathfloat@a@E<0
- \pgfmathfloat@a@S=0
- \pgfmathfloat@a@Mtok={0.0}%
- \pgfmathfloat@a@E=0
- \expandafter\pgfmathfloatint@@loop@gobble
- \else
- \pgfmathfloat@a@Mtok={#1.}%
- \pgfmathfloat@b@E=\pgfmathfloat@a@E
- \expandafter\pgfmathfloatint@@loop
- \fi
+ \ifnum\pgfmathfloat@a@E<0
+ \pgfmathfloat@a@S=0
+ \pgfmathfloat@a@Mtok={0.0}%
+ \pgfmathfloat@a@E=0
+ \gdef\pgfmathfloatintwasnoop{0}%
+ \expandafter\pgfmathfloatint@@loop@gobble
+ \else
+ \pgfmathfloat@a@Mtok={#1.}%
+ \pgfmathfloat@b@E=\pgfmathfloat@a@E
+ \expandafter\pgfmathfloatint@@loop
+ \fi
}%
\def\pgfmathfloatint@@loop#1{%
- \def\pgfmathfloatint@@loop@{#1}%
- \ifx\pgfmathfloatint@@loop@\pgfmathfloat@EOI
- \let\pgfmathfloatint@@loop@next=\relax
- \else
- \ifnum\pgfmathfloat@b@E=0
- \let\pgfmathfloatint@@loop@next=\pgfmathfloatint@@loop@gobble
- \else
- \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok#1}%
- \advance\pgfmathfloat@b@E by-1
- \let\pgfmathfloatint@@loop@next=\pgfmathfloatint@@loop
- \fi
- \fi
- \pgfmathfloatint@@loop@next
-}%
-\def\pgfmathfloatint@@loop@gobble#1\pgfmathfloat@EOI{}%
+ \def\pgfmathfloatint@@loop@{#1}%
+ \ifx\pgfmathfloatint@@loop@\pgfmathfloat@EOI
+ \gdef\pgfmathfloatintwasnoop{1}%
+ \let\pgfmathfloatint@@loop@next=\relax
+ \else
+ \ifnum\pgfmathfloat@b@E=0
+ \def\pgfmathfloatint@@loop@next{\pgfmathfloatint@@loop@gobble#1}%
+ \else
+ \pgfmathfloat@a@Mtok=\expandafter{\the\pgfmathfloat@a@Mtok#1}%
+ \advance\pgfmathfloat@b@E by-1
+ \let\pgfmathfloatint@@loop@next=\pgfmathfloatint@@loop
+ \fi
+ \fi
+ \pgfmathfloatint@@loop@next
+}%
+\def\pgfmathfloatint@@loop@gobble#1\pgfmathfloat@EOI{%
+ \if0\pgfmathfloatintwasnoop
+ \else
+ \gdef\pgfmathfloatintwasnoop{2}%
+ \gdef\pgfmathfloatintremainder{#1}%
+ \fi
+}%
\let\pgfmathfloatint=\pgfmathfloatint@
\def\pgfmathfloatfloor#1{%
- \edef\pgfmathfloat@loc@TMPa{#1}%
- \pgfmathfloatcreate{2}{5.0}{-1}% -0.5
- \let\pgfmathfloat@loc@TMPb=\pgfmathresult
- \pgfmathfloatadd@{\pgfmathfloat@loc@TMPa}{\pgfmathfloat@loc@TMPb}%
- \expandafter\pgfmathfloatround@\expandafter{\pgfmathresult}%
-}
+ \edef\pgfmath@orig{#1}%
+ \pgfmathfloatint@{#1}%
+ \pgfmathfloatifflags{\pgfmath@orig}{2}{%
+ \let\pgfmath@trunc=\pgfmathresult
+ \ifcase\pgfmathfloatintwasnoop\relax
+ % ah - we stripped something! Round DOWN
+ \pgfmathfloatcreate{2}{1.0}{0}% -1
+ \expandafter\pgfmathfloatadd@\expandafter{\pgfmathresult}{\pgfmath@trunc}%
+ \or
+ % was no-op
+ \let\pgfmathresult=\pgfmath@trunc
+ \else
+ % ok, we have to inspect the remainder:
+ \pgfmathfloatparsenumber{0.\pgfmathfloatintremainder}%
+ \pgfmathfloatifflags{\pgfmathresult}{1}{%
+ % ah - we stripped a non-zero remainder! Round DOWN
+ \pgfmathfloatcreate{2}{1.0}{0}% -1
+ \expandafter\pgfmathfloatadd@\expandafter{\pgfmathresult}{\pgfmath@trunc}%
+ }{%
+ % was no-op
+ \let\pgfmathresult=\pgfmath@trunc
+ }%
+ \fi
+ }{}%
+}%
\let\pgfmathfloatfloor@=\pgfmathfloatfloor
\def\pgfmathfloatceil#1{%
- \edef\pgfmathfloat@loc@TMPa{#1}%
- \pgfmathfloatcreate{1}{5.0}{-1}% +0.5
- \let\pgfmathfloat@loc@TMPb=\pgfmathresult
- \pgfmathfloatadd@{\pgfmathfloat@loc@TMPa}{\pgfmathfloat@loc@TMPb}%
- \expandafter\pgfmathfloatround@\expandafter{\pgfmathresult}%
-}
+ \edef\pgfmath@orig{#1}%
+ \pgfmathfloatint@{#1}%
+ \pgfmathfloatifflags{\pgfmath@orig}{1}{%
+ \let\pgfmath@trunc=\pgfmathresult
+ \ifcase\pgfmathfloatintwasnoop\relax
+ % ah - we stripped something! Round UP
+ \pgfmathfloatcreate{1}{1.0}{0}% +1
+ \expandafter\pgfmathfloatadd@\expandafter{\pgfmathresult}{\pgfmath@trunc}%
+ \or
+ % was no-op
+ \let\pgfmathresult=\pgfmath@trunc
+ \else
+ % ok, we have to inspect the remainder:
+ \pgfmathfloatparsenumber{0.\pgfmathfloatintremainder}%
+ \pgfmathfloatifflags{\pgfmathresult}{1}{%
+ % ah - we stripped a non-zero remainder! Round UP
+ \pgfmathfloatcreate{1}{1.0}{0}% +1
+ \expandafter\pgfmathfloatadd@\expandafter{\pgfmathresult}{\pgfmath@trunc}%
+ }{%
+ % was no-op
+ \let\pgfmathresult=\pgfmath@trunc
+ }%
+ \fi
+ }{}%
+}%
\let\pgfmathfloatceil@=\pgfmathfloatceil
\def\pgfmathfloat@notimplemented#1{%
- \pgfmath@error{Sorry, the operation '#1' has not yet been implemented in the floating point unit :-(}{}%
- \pgfmathfloatcreate{0}{0.0}{0}%
+ \pgfmath@error{Sorry, the operation '#1' has not yet been implemented in the floating point unit}{}%
+ \pgfmathfloatcreate{0}{0.0}{0}%
}%
% Divides or multiplies the input number by 10^#4 using an arithmetic
@@ -1465,150 +1569,161 @@
% \pgfmathfloatshift{11e3}{4}%
% -> pgfmathresult = 11e7
\def\pgfmathfloatshift@#1#2{%
- \begingroup
- \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \advance\pgfmathfloat@a@E by#2\relax
- \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
-}
+ \begingroup
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \advance\pgfmathfloat@a@E by#2\relax
+ \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}%
\let\pgfmathfloatshift=\pgfmathfloatshift@
% Defines \pgfmathresult to be |#1|, the absolute value of the
% normalized floating point number #1.
\def\pgfmathfloatabs@#1{%
- \begingroup
- \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \ifcase\pgfmathfloat@a@S
- % 0: do nothing.
- \or
- % +: ok, is positive.
- \or
- % -: multiply with -1:
- \pgfmathfloat@a@S=1
- \or
- % nan: do nothing.
- \or
- % +infty: ok.
- \or
- % -infty: multiply with -1:
- \pgfmathfloat@a@S=4
- \fi
- \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \ifcase\pgfmathfloat@a@S
+ % 0: do nothing.
+ \or
+ % +: ok, is positive.
+ \or
+ % -: multiply with -1:
+ \pgfmathfloat@a@S=1
+ \or
+ % nan: do nothing.
+ \or
+ % +infty: ok.
+ \or
+ % -infty: multiply with -1:
+ \pgfmathfloat@a@S=4
+ \fi
+ \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
%
% Defines \pgfmathresult to be sign(#1)
\def\pgfmathfloatsign@#1{%
- \begingroup
- \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \ifcase\pgfmathfloat@a@S
- % 0:
- \pgfmathfloatcreate{0}{0.0}{0}%
- \or
- % +: ok, is positive.
- \pgfmathfloatcreate{1}{1.0}{0}%
- \or
- % -:
- \pgfmathfloatcreate{2}{1.0}{0}%
- \or
- % nan: do nothing.
- \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
- \or
- % +infty:.
- \pgfmathfloatcreate{1}{1.0}{0}%
- \or
- % -infty:
- \pgfmathfloatcreate{2}{1.0}{0}%
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \ifcase\pgfmathfloat@a@S
+ % 0:
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \or
+ % +: ok, is positive.
+ \pgfmathfloatcreate{1}{1.0}{0}%
+ \or
+ % -:
+ \pgfmathfloatcreate{2}{1.0}{0}%
+ \or
+ % nan: do nothing.
+ \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
+ \or
+ % +infty:.
+ \pgfmathfloatcreate{1}{1.0}{0}%
+ \or
+ % -infty:
+ \pgfmathfloatcreate{2}{1.0}{0}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\let\pgfmathfloatsign=\pgfmathfloatsign@
% Computes the absolute error |#1 - #2| into \pgfmathresult.
\def\pgfmathfloatabserror@#1#2{%
- \pgfmathfloatsubtract@{#1}{#2}%
- \pgfmathfloatabs@{\pgfmathresult}%
+ \pgfmathfloatsubtract@{#1}{#2}%
+ \pgfmathfloatabs@{\pgfmathresult}%
}%
\let\pgfmathfloatabserror=\pgfmathfloatabserror@
% Computes the relative error |#1 - #2|/|#2| into \pgfmathresult,
% assuming #2 != 0.
\def\pgfmathfloatrelerror@#1#2{%
- \pgfmathfloatsubtract@{#1}{#2}%
- \let\pgfmathfloat@subtract=\pgfmathresult
- \pgfmathfloatifflags{#2}{0}{%
- \let\pgfmathresult=\pgfmathfloat@subtract
- }{%
- \pgfmathfloatdivide@{\pgfmathfloat@subtract}{#2}%
- }%
- \pgfmathfloatabs@{\pgfmathresult}%
+ \pgfmathfloatsubtract@{#1}{#2}%
+ \let\pgfmathfloat@subtract=\pgfmathresult
+ \pgfmathfloatifflags{#2}{0}{%
+ \let\pgfmathresult=\pgfmathfloat@subtract
+ }{%
+ \pgfmathfloatdivide@{\pgfmathfloat@subtract}{#2}%
+ }%
+ \pgfmathfloatabs@{\pgfmathresult}%
}%
\let\pgfmathfloatrelerror=\pgfmathfloatrelerror@
% Computes \pgfmathresult = #1 mod #2 using truncated division.
%
\def\pgfmathfloatmod@#1#2{%
- \begingroup
- \pgfmathfloatdivide@{#1}{#2}%
- \pgfmathfloatint@{\pgfmathresult}%
- \let\pgfmathfloat@loc@TMPa=\pgfmathresult
- \pgfmathfloatmultiply@{\pgfmathfloat@loc@TMPa}{#2}%
- \let\pgfmathfloat@loc@TMPb=\pgfmathresult
- \pgfmathfloatsubtract@{#1}{\pgfmathfloat@loc@TMPb}%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
-}
+ \begingroup
+ \pgfmathfloattoint{#1}%
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \pgfmathfloattoint{#2}%
+ \let\pgfmathfloat@loc@TMPb=\pgfmathresult
+ \c@pgfmath@counta=\pgfmathfloat@loc@TMPa\relax
+ \divide\c@pgfmath@counta by\pgfmathfloat@loc@TMPb\relax
+ \expandafter\pgfmathfloatparsenumber\expandafter{\the\c@pgfmath@counta}%
+ %
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \pgfmathfloatmultiply@{\pgfmathfloat@loc@TMPa}{#2}%
+ \let\pgfmathfloat@loc@TMPb=\pgfmathresult
+ \pgfmathfloatsubtract@{#1}{\pgfmathfloat@loc@TMPb}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}%
\let\pgfmathfloatmod=\pgfmathfloatmod@
% A modification of \pgfmathfloatmod@ where #3 = 1/#2 is already
% known. This may be faster.
\def\pgfmathfloatmodknowsinverse@#1#2#3{%
- \begingroup
- \pgfmathfloatmultiply@{#1}{#3}%
- \pgfmathfloatint@{\pgfmathresult}%
- \let\pgfmathfloat@loc@TMPa=\pgfmathresult
- \pgfmathfloatmultiply@{\pgfmathfloat@loc@TMPa}{#2}%
- \let\pgfmathfloat@loc@TMPb=\pgfmathresult
- \pgfmathfloatsubtract@{#1}{\pgfmathfloat@loc@TMPb}%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
-}
+ \pgfmathfloatmod@{#1}{#2}%
+ %--------------------------------------------------
+ % \begingroup
+ % % FIXME : is this function correct? \pgfmathfloatmod had a
+ % % rounding flaw...
+ % \pgfmathfloatmultiply@{#1}{#3}%
+ % \pgfmathfloatint@{\pgfmathresult}%
+ % \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ % \pgfmathfloatmultiply@{\pgfmathfloat@loc@TMPa}{#2}%
+ % \let\pgfmathfloat@loc@TMPb=\pgfmathresult
+ % \pgfmathfloatsubtract@{#1}{\pgfmathfloat@loc@TMPb}%
+ % \pgfmath@smuggleone\pgfmathresult
+ % \endgroup
+ %--------------------------------------------------
+}%
\let\pgfmathfloatmodknowsinverse=\pgfmathfloatmodknowsinverse@
\def\pgfmathfloatpi@{%
- \pgfmathfloatcreate{1}{3.14159265358979}{0}%
+ \pgfmathfloatcreate{1}{3.14159265358979}{0}%
}%
\let\pgfmathfloatpi=\pgfmathfloatpi@
\def\pgfmathfloate@{%
- \pgfmathfloatcreate{1}{2.71828182845905}{0}%
-}
+ \pgfmathfloatcreate{1}{2.71828182845905}{0}%
+}%
\let\pgfmathfloate=\pgfmathfloate@
% Converts #1 from radians to degrees.
\def\pgfmathfloatdeg@#1{%
- \expandafter\ifx\csname pgfmfltdeg@factor\endcsname\relax
- % Lazy evaluation:
- \pgfmathfloatcreate{1}{5.72957795130823}{1}%
- \global\let\pgfmfltdeg@factor=\pgfmathresult
- \fi
- \pgfmathfloatmultiply@{#1}\pgfmfltdeg@factor%
-}
+ \expandafter\ifx\csname pgfmfltdeg@factor\endcsname\relax
+ % Lazy evaluation:
+ \pgfmathfloatcreate{1}{5.72957795130823}{1}%
+ \global\let\pgfmfltdeg@factor=\pgfmathresult
+ \fi
+ \pgfmathfloatmultiply@{#1}\pgfmfltdeg@factor%
+}%
\let\pgfmathfloatdeg=\pgfmathfloatdeg@
% Converts #1 from degree to radians.
\def\pgfmathfloatrad@#1{%
- \expandafter\ifx\csname pgfmfltrad@factor\endcsname\relax
- % Lazy evaluation:
- \pgfmathfloatcreate{1}{1.74532925199433}{-2}%
- \global\let\pgfmfltrad@factor=\pgfmathresult
- \fi
- \pgfmathfloatmultiply@{#1}\pgfmfltrad@factor%
-}
+ \expandafter\ifx\csname pgfmfltrad@factor\endcsname\relax
+ % Lazy evaluation:
+ \pgfmathfloatcreate{1}{1.74532925199433}{-2}%
+ \global\let\pgfmfltrad@factor=\pgfmathresult
+ \fi
+ \pgfmathfloatmultiply@{#1}\pgfmfltrad@factor%
+}%
\let\pgfmathfloatrad=\pgfmathfloatrad@
% Computes #1(#2) where #1 is a trigonometric function, i.e.
@@ -1616,167 +1731,167 @@
%
% #1 is a one-argument macro which assigns \pgfmathresult.
\def\pgfmathfloatTRIG@#1#2{%
- \if0\pgfmath@trig@format@choice
- % trig format=deg
- \expandafter\ifx\csname pgfmathfloatTRIG@NUM\endcsname\relax%
- % Lazy evaluation:
- \pgfmathfloatcreate{1}{3.6}{2}%
- \global\let\pgfmathfloatTRIG@NUM=\pgfmathresult
- \pgfmathfloatcreate{1}{2.77777777777778}{-3}%
- \global\let\pgfmathfloatTRIG@NUM@INV=\pgfmathresult
- \fi
- \pgfmathfloatmodknowsinverse@{#2}{\pgfmathfloatTRIG@NUM}{\pgfmathfloatTRIG@NUM@INV}%
- \else
- % trig format=rad
- \expandafter\ifx\csname pgfmathfloatTRIG@rad@NUM\endcsname\relax%
- % Lazy evaluation:
- \pgfmathfloatcreate{1}{6.28318530717959}{0}%
- \global\let\pgfmathfloatTRIG@rad@NUM=\pgfmathresult
- \pgfmathfloatcreate{1}{1.59154943091895}{-1}%
- \global\let\pgfmathfloatTRIG@rad@NUM@INV=\pgfmathresult
- \fi
- \pgfmathfloatmodknowsinverse@{#2}{\pgfmathfloatTRIG@rad@NUM}{\pgfmathfloatTRIG@rad@NUM@INV}%
- \fi
- \pgfmathfloattofixed@{\pgfmathresult}%
- \expandafter#1\expandafter{\pgfmathresult}%
- \pgfmathfloatparsenumber{\pgfmathresult}%
-}%
-
-\def\pgfmathfloatsin@#1{\pgfmathfloatTRIG@\pgfmath@basic@sin@{#1}}
+ \if0\pgfmath@trig@format@choice
+ % trig format=deg
+ \expandafter\ifx\csname pgfmathfloatTRIG@NUM\endcsname\relax%
+ % Lazy evaluation:
+ \pgfmathfloatcreate{1}{3.6}{2}%
+ \global\let\pgfmathfloatTRIG@NUM=\pgfmathresult
+ \pgfmathfloatcreate{1}{2.77777777777778}{-3}%
+ \global\let\pgfmathfloatTRIG@NUM@INV=\pgfmathresult
+ \fi
+ \pgfmathfloatmodknowsinverse@{#2}{\pgfmathfloatTRIG@NUM}{\pgfmathfloatTRIG@NUM@INV}%
+ \else
+ % trig format=rad
+ \expandafter\ifx\csname pgfmathfloatTRIG@rad@NUM\endcsname\relax%
+ % Lazy evaluation:
+ \pgfmathfloatcreate{1}{6.28318530717959}{0}%
+ \global\let\pgfmathfloatTRIG@rad@NUM=\pgfmathresult
+ \pgfmathfloatcreate{1}{1.59154943091895}{-1}%
+ \global\let\pgfmathfloatTRIG@rad@NUM@INV=\pgfmathresult
+ \fi
+ \pgfmathfloatmodknowsinverse@{#2}{\pgfmathfloatTRIG@rad@NUM}{\pgfmathfloatTRIG@rad@NUM@INV}%
+ \fi
+ \pgfmathfloattofixed@{\pgfmathresult}%
+ \expandafter#1\expandafter{\pgfmathresult}%
+ \pgfmathfloatparsenumber{\pgfmathresult}%
+}%
+
+\def\pgfmathfloatsin@#1{\pgfmathfloatTRIG@\pgfmath@basic@sin@{#1}}%
\let\pgfmathfloatsin=\pgfmathfloatsin@
-\def\pgfmathfloatcos@#1{\pgfmathfloatTRIG@\pgfmath@basic@cos@{#1}}
+\def\pgfmathfloatcos@#1{\pgfmathfloatTRIG@\pgfmath@basic@cos@{#1}}%
\let\pgfmathfloatcos=\pgfmathfloatcos@
\def\pgfmathfloattan@#1{%
- % compute sin(#1) / cos(#1)
- \begingroup
- \pgfmathfloatcos@{#1}%
- \let\pgfmathfloat@loc@TMPa=\pgfmathresult
- \pgfmathfloatsin@{#1}%
- \expandafter\pgfmathfloatdivide@\expandafter{\pgfmathresult}{\pgfmathfloat@loc@TMPa}%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
-}
+ % compute sin(#1) / cos(#1)
+ \begingroup
+ \pgfmathfloatcos@{#1}%
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \pgfmathfloatsin@{#1}%
+ \expandafter\pgfmathfloatdivide@\expandafter{\pgfmathresult}{\pgfmathfloat@loc@TMPa}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}%
\let\pgfmathfloattan=\pgfmathfloattan@
\def\pgfmathfloatcot@#1{%
- % compute cos(#1) / sin(#1)
- \begingroup
- \pgfmathfloatsin@{#1}%
- \let\pgfmathfloat@loc@TMPa=\pgfmathresult
- \pgfmathfloatcos@{#1}%
- \expandafter\pgfmathfloatdivide@\expandafter{\pgfmathresult}{\pgfmathfloat@loc@TMPa}%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ % compute cos(#1) / sin(#1)
+ \begingroup
+ \pgfmathfloatsin@{#1}%
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \pgfmathfloatcos@{#1}%
+ \expandafter\pgfmathfloatdivide@\expandafter{\pgfmathresult}{\pgfmathfloat@loc@TMPa}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\let\pgfmathfloatcot=\pgfmathfloatcot@
\def\pgfmathfloatatan@#1{%
- \begingroup
- \expandafter\ifx\csname pgfmathfloatatan@TMP\endcsname\relax%
- \pgfmathfloatcreate{1}{1.6}{4}%
- \global\let\pgfmathfloatatan@TMP=\pgfmathresult
- \pgfmathfloatcreate{2}{1.6}{4}%
- \global\let\pgfmathfloatatan@TMPB=\pgfmathresult
- \fi
- \pgfmathfloatgreaterthan@{#1}{\pgfmathfloatatan@TMP}%
- \ifpgfmathfloatcomparison
- \pgfmathiftrigonometricusesdeg{%
- \pgfmathfloatcreate{1}{9.0}{1}%
- }{%
- \pgfmathfloatcreate{1}{1.570796326794}{0}%
- }%
- \else
- \pgfmathfloatlessthan{#1}{\pgfmathfloatatan@TMPB}%
- \ifpgfmathfloatcomparison
- \pgfmathiftrigonometricusesdeg{%
- \pgfmathfloatcreate{2}{9.0}{1}%
- }{%
- \pgfmathfloatcreate{2}{1.570796326794}{0}%
- }%
- \else
- \pgfmathfloattofixed@{#1}%
- \expandafter\pgfmath@basic@atan@\expandafter{\pgfmathresult}%
- \pgfmathfloatparsenumber{\pgfmathresult}%
- \fi
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \expandafter\ifx\csname pgfmathfloatatan@TMP\endcsname\relax%
+ \pgfmathfloatcreate{1}{1.6}{4}%
+ \global\let\pgfmathfloatatan@TMP=\pgfmathresult
+ \pgfmathfloatcreate{2}{1.6}{4}%
+ \global\let\pgfmathfloatatan@TMPB=\pgfmathresult
+ \fi
+ \pgfmathfloatgreaterthan@{#1}{\pgfmathfloatatan@TMP}%
+ \ifpgfmathfloatcomparison
+ \pgfmathiftrigonometricusesdeg{%
+ \pgfmathfloatcreate{1}{9.0}{1}%
+ }{%
+ \pgfmathfloatcreate{1}{1.570796326794}{0}%
+ }%
+ \else
+ \pgfmathfloatlessthan{#1}{\pgfmathfloatatan@TMPB}%
+ \ifpgfmathfloatcomparison
+ \pgfmathiftrigonometricusesdeg{%
+ \pgfmathfloatcreate{2}{9.0}{1}%
+ }{%
+ \pgfmathfloatcreate{2}{1.570796326794}{0}%
+ }%
+ \else
+ \pgfmathfloattofixed@{#1}%
+ \expandafter\pgfmath@basic@atan@\expandafter{\pgfmathresult}%
+ \pgfmathfloatparsenumber{\pgfmathresult}%
+ \fi
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\let\pgfmathfloatatan=\pgfmathfloatatan@
\def\pgfmathfloatatantwo#1#2{%
% Note: first parameter is y (!), second is x (!)
\begingroup%
- \let\pgfmath@trig@format@choice@@=\pgfmath@trig@format@choice
- \def\pgfmath@trig@format@choice{0}%
- %
- \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \expandafter\pgfmathfloat@decompose#2\relax\pgfmathfloat@b@S\pgfmathfloat@b@M\pgfmathfloat@b@E
- \ifnum\pgfmathfloat@a@S=0
- % ok, #1 = 0. Substitute by 1e-16 such that the next \ifnum catches it:
- \pgfmathfloat@a@E=-16 %
- \fi
- %
- \ifnum\pgfmathfloat@a@E<-3 %
- \ifnum\pgfmathfloat@b@S=2 %
- % #2 < 0
- \pgfmathfloatcreate{1}{1.8}{2}% +180
- \else
- \ifnum\pgfmathfloat@b@S=1 %
- % #2 >0
- \pgfmathfloatcreate{0}{0.0}{0}%
- \else
- % + or - 90, just use the sign of #1:
- \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{9.0}{1}%
- \fi
- \fi
+ \let\pgfmath@trig@format@choice@@=\pgfmath@trig@format@choice
+ \def\pgfmath@trig@format@choice{0}%
+ %
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \expandafter\pgfmathfloat@decompose#2\relax\pgfmathfloat@b@S\pgfmathfloat@b@M\pgfmathfloat@b@E
+ \ifnum\pgfmathfloat@a@S=0
+ % ok, #1 = 0. Substitute by 1e-16 such that the next \ifnum catches it:
+ \pgfmathfloat@a@E=-16 %
+ \fi
+ %
+ \ifnum\pgfmathfloat@a@E<-3 %
+ \ifnum\pgfmathfloat@b@S=2 %
+ % #2 < 0
+ \pgfmathfloatcreate{1}{1.8}{2}% +180
+ \else
+ \ifnum\pgfmathfloat@b@S=1 %
+ % #2 >0
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \else
+ % + or - 90, just use the sign of #1:
+ \pgfmathfloatcreate{\the\pgfmathfloat@a@S}{9.0}{1}%
+ \fi
+ \fi
\else%
\pgfmathfloatabs@{#1}\let\pgfmath@tempa\pgfmathresult%
\pgfmathfloatabs@{#2}\let\pgfmath@tempb\pgfmathresult%
- \pgfmathfloatgreaterthan@{\pgfmath@tempa}{\pgfmath@tempb}%
- \ifpgfmathfloatcomparison
+ \pgfmathfloatgreaterthan@{\pgfmath@tempa}{\pgfmath@tempb}%
+ \ifpgfmathfloatcomparison
\pgfmathfloatdivide@{#2}{\pgfmath@tempa}%
\expandafter\pgfmathfloatatan@\expandafter{\pgfmathresult}%
- \let\pgfmath@tempa=\pgfmathresult
- \pgfmathfloatcreate{1}{9.0}{1}%
- \let\pgfmath@tempb=\pgfmathresult
- \pgfmathfloatsubtract@{\pgfmath@tempb}{\pgfmath@tempa}%
+ \let\pgfmath@tempa=\pgfmathresult
+ \pgfmathfloatcreate{1}{9.0}{1}%
+ \let\pgfmath@tempb=\pgfmathresult
+ \pgfmathfloatsubtract@{\pgfmath@tempb}{\pgfmath@tempa}%
\else%
\pgfmathfloatdivide@{\pgfmath@tempa}{#2}%
\expandafter\pgfmathfloatatan@\expandafter{\pgfmathresult}%
- \expandafter\pgfmathfloatifflags\expandafter{\pgfmathresult}{2}{%
- \let\pgfmath@tempa=\pgfmathresult
- \pgfmathfloatcreate{1}{1.8}{2}%
- \let\pgfmath@tempb=\pgfmathresult
- \pgfmathfloatadd@{\pgfmath@tempa}{\pgfmath@tempb}%
- }{}%
+ \expandafter\pgfmathfloatifflags\expandafter{\pgfmathresult}{2}{%
+ \let\pgfmath@tempa=\pgfmathresult
+ \pgfmathfloatcreate{1}{1.8}{2}%
+ \let\pgfmath@tempb=\pgfmathresult
+ \pgfmathfloatadd@{\pgfmath@tempa}{\pgfmath@tempb}%
+ }{}%
\fi%
- %
- \pgfmathfloatifflags{#1}{-}{%
- % #1 < 0:
- \pgfmathfloatmultiplyfixed@{\pgfmathresult}{-1}%
- }{}%
+ %
+ \pgfmathfloatifflags{#1}{-}{%
+ % #1 < 0:
+ \pgfmathfloatmultiplyfixed@{\pgfmathresult}{-1}%
+ }{}%
\fi%
- \if1\pgfmath@trig@format@choice@@
- % trig format=rad
- \pgfmathfloat@scale@deg@to@rad\pgfmathresult
- \fi
+ \if1\pgfmath@trig@format@choice@@
+ % trig format=rad
+ \pgfmathfloat@scale@deg@to@rad\pgfmathresult
+ \fi
\pgfmath@smuggleone\pgfmathresult%
- \endgroup%
+ \endgroup%
}%
\let\pgfmathfloatatantwo@=\pgfmathfloatatantwo
\expandafter\let\csname pgfmathfloatatan2\endcsname=\pgfmathfloatatantwo
\expandafter\let\csname pgfmathfloatatan2@\endcsname=\pgfmathfloatatantwo@
\def\pgfmathfloat@scale@deg@to@rad#1{%
- \edef\pgfmathfloat@loc@TMPb{#1}%
- \pgfmathfloatcreate{1}{1.74532925199433}{-2}% = pi / 180
- \pgfmathfloatmultiply@{\pgfmathresult}{\pgfmathfloat@loc@TMPb}%
+ \edef\pgfmathfloat@loc@TMPb{#1}%
+ \pgfmathfloatcreate{1}{1.74532925199433}{-2}% = pi / 180
+ \pgfmathfloatmultiply@{\pgfmathresult}{\pgfmathfloat@loc@TMPb}%
}%
-\def\pgfmathfloatsec@#1{\pgfmathfloatTRIG@\pgfmath@basic@cos@{#1}\pgfmathfloatreciprocal@{\pgfmathresult}}
+\def\pgfmathfloatsec@#1{\pgfmathfloatTRIG@\pgfmath@basic@cos@{#1}\pgfmathfloatreciprocal@{\pgfmathresult}}%
\let\pgfmathfloatsec=\pgfmathfloatsec@
-\def\pgfmathfloatcosec@#1{\pgfmathfloatTRIG@\pgfmath@basic@sin@{#1}\pgfmathfloatreciprocal@{\pgfmathresult}}
+\def\pgfmathfloatcosec@#1{\pgfmathfloatTRIG@\pgfmath@basic@sin@{#1}\pgfmathfloatreciprocal@{\pgfmathresult}}%
\let\pgfmathfloatcosec=\pgfmathfloatcosec@
% Expands #2 using \edef and invokes #1 with the resulting string.
@@ -1788,33 +1903,33 @@
% will invoke
% \pgfmathexp@{7.9}
\def\pgfmathlog@invoke@expanded#1#2{%
- \edef\pgfmath@resulttemp{#2}%
- \expandafter#1\pgfmath@resulttemp
-}
+ \edef\pgfmath@resulttemp{#2}%
+ \expandafter#1\pgfmath@resulttemp
+}%
\def\pgfmathfloatln@#1{%
- \pgfmathlog@float{#1}%
- \ifx\pgfmathresult\pgfutil@empty
- \pgfmathfloatcreate{3}{0.0}{0}%
- \else
- \pgfmathfloatparsenumber{\pgfmathresult}%
- \fi
-}
+ \pgfmathlog@float{#1}%
+ \ifx\pgfmathresult\pgfutil@empty
+ \pgfmathfloatcreate{3}{0.0}{0}%
+ \else
+ \pgfmathfloatparsenumber{\pgfmathresult}%
+ \fi
+}%
\let\pgfmathfloatln=\pgfmathfloatln@
\expandafter\def\csname pgfmathfloatlog10@\endcsname#1{%
- \pgfmathfloatln@{#1}%
- \let\pgfmathfloat@log@e=\pgfmathresult
- \pgfmathfloatcreate{1}{4.34294481903252}{-1}% 1/ln(10)
- \pgfmathfloatmultiply@{\pgfmathresult}{\pgfmathfloat@log@e}%
+ \pgfmathfloatln@{#1}%
+ \let\pgfmathfloat@log@e=\pgfmathresult
+ \pgfmathfloatcreate{1}{4.34294481903252}{-1}% 1/ln(10)
+ \pgfmathfloatmultiply@{\pgfmathresult}{\pgfmathfloat@log@e}%
}%
\pgfutil@namelet{pgfmathfloatlog10}{pgfmathfloatlog10@}%
\expandafter\def\csname pgfmathfloatlog2@\endcsname#1{%
- \pgfmathfloatln@{#1}%
- \let\pgfmathfloat@log@e=\pgfmathresult
- \pgfmathfloatcreate{1}{1.44269504088896}{0}% 1/ln(2)
- \pgfmathfloatmultiply@{\pgfmathresult}{\pgfmathfloat@log@e}%
+ \pgfmathfloatln@{#1}%
+ \let\pgfmathfloat@log@e=\pgfmathresult
+ \pgfmathfloatcreate{1}{1.44269504088896}{0}% 1/ln(2)
+ \pgfmathfloatmultiply@{\pgfmathresult}{\pgfmathfloat@log@e}%
}%
\pgfutil@namelet{pgfmathfloatlog2}{pgfmathfloatlog2@}%
@@ -1827,7 +1942,7 @@
%
% This allows numbers such at 10000000 or 5.23e-10 to be represented
% properly, although TeX-registers would produce overflow/underflow
-% errors in these cases.
+% errors in these cases.
%
% The natural logarithm is computed using log(X*10^Y) = log(X) + log(10)*Y
%
@@ -1837,315 +1952,315 @@
% 2. it returns the result as fixed point number
% Use \pgfmathln@ instead!
\def\pgfmathlog@#1{%
- \pgfmathfloatparsenumber{#1}%
- \pgfmathlog@float{\pgfmathresult}%
-}
+ \pgfmathfloatparsenumber{#1}%
+ \pgfmathlog@float{\pgfmathresult}%
+}%
\let\pgfmathlog=\pgfmathlog@
\def\pgfmathlog@float#1{%
- \begingroup%
- % compute #1 = M*10^E with normalised mantisse M = [+-]*[1-9].XXXXX
- \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \ifnum\pgfmathfloat@a@S=1
- % Now, compute log(#1) = log(M) + E*log(10)
- \expandafter\pgfmath@basic@ln@\expandafter{\the\pgfmathfloat@a@Mtok}%
- \pgfmathfloat@b@M=\pgfmathresult pt%
- \pgfmathfloat@a@M=2.302585pt% = log(10)
- \multiply\pgfmathfloat@a@M by\pgfmathfloat@a@E\relax
- \advance\pgfmathfloat@b@M by\pgfmathfloat@a@M
- \edef\pgfmathresult{\pgf@sys@tonumber{\pgfmathfloat@b@M}}%
- \else
- \let\pgfmathresult=\pgfutil@empty%
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup%
-}
+ \begingroup%
+ % compute #1 = M*10^E with normalised mantissa M = [+-]*[1-9].XXXXX
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \ifnum\pgfmathfloat@a@S=1
+ % Now, compute log(#1) = log(M) + E*log(10)
+ \expandafter\pgfmath@basic@ln@\expandafter{\the\pgfmathfloat@a@Mtok}%
+ \pgfmathfloat@b@M=\pgfmathresult pt%
+ \pgfmathfloat@a@M=2.302585pt% = log(10)
+ \multiply\pgfmathfloat@a@M by\pgfmathfloat@a@E\relax
+ \advance\pgfmathfloat@b@M by\pgfmathfloat@a@M
+ \edef\pgfmathresult{\pgf@sys@tonumber{\pgfmathfloat@b@M}}%
+ \else
+ \let\pgfmathresult=\pgfutil@empty%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup%
+}%
% Computes exp(#1) in floating point.
%
-% The algorithm employs the identity
+% The algorithm employs the identity
% exp(x) = exp(x - log(10^k) + log(10^k)
% = 10^k exp( x - k*log 10 )
-% with k choosen such that exp( x - k*log10) can be computed with the
+% with k chosen such that exp( x - k*log10) can be computed with the
% basic level math engine.
%
% The precision (relative error) is between 10^{-4} and 10^{-6}. For
% #1 = 700, it is even 10^{-3}. I will need to improve that someday.
\def\pgfmathfloatexp@#1{%
- \begingroup
- \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \ifcase\pgfmathfloat@a@S
- % #1 = 0:
- \pgfmathfloatcreate{1}{1.0}{0}%
- \or% #1 > 0
- \pgfmathfloatexp@@{#1}%
- \or% #1 < 0
- \pgfmathfloatexp@@{#1}%
- \else
- \edef\pgfmathresult{#1}%
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \ifcase\pgfmathfloat@a@S
+ % #1 = 0:
+ \pgfmathfloatcreate{1}{1.0}{0}%
+ \or% #1 > 0
+ \pgfmathfloatexp@@{#1}%
+ \or% #1 < 0
+ \pgfmathfloatexp@@{#1}%
+ \else
+ \edef\pgfmathresult{#1}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\def\pgfmathfloatexp@@#1{%
- % Employ the identity
- % exp(x) = exp(x - log(10^k) + log(10^k)) = 10^k exp( x - k *log(10))
- %
- % I'd like to have x - k*log(10) <= 1
- % => compute k := int( (x - 1) * 1/log(10) )
- % that should suffice since \pgfmathexp@ should be
- % accurate enough for those numbers.
- %
- % please note that we can do all this in TeX registers.
- % exp(700) is almost the maximum of double precision
- % anyway, and exp(16000) is certainly the largest we will
- % ever need.
- \pgfmathfloattofixed@{#1}%
- \pgf@xa=\pgfmathresult pt
- \pgf@xa=0.434294481\pgf@xa\relax
- \edef\pgfmathfloat@loc@TMPa{\pgf@sys@tonumber{\pgf@xa}}%
- \expandafter\pgfmathfloatexp@@toint\pgfmathfloat@loc@TMPa\relax
- \pgf@xa=2.302585092pt
- \multiply\pgf@xa by-\pgfmathfloat@k\relax
- \advance\pgf@xa by\pgfmathresult pt
- \edef\pgfmathfloat@loc@TMPa{\pgf@sys@tonumber{\pgf@xa}}%
+ % Employ the identity
+ % exp(x) = exp(x - log(10^k) + log(10^k)) = 10^k exp( x - k *log(10))
+ %
+ % I'd like to have x - k*log(10) <= 1
+ % => compute k := int( (x - 1) * 1/log(10) )
+ % that should suffice since \pgfmathexp@ should be
+ % accurate enough for those numbers.
+ %
+ % please note that we can do all this in TeX registers.
+ % exp(700) is almost the maximum of double precision
+ % anyway, and exp(16000) is certainly the largest we will
+ % ever need.
+ \pgfmathfloattofixed@{#1}%
+ \pgf@xa=\pgfmathresult pt
+ \pgf@xa=0.434294481\pgf@xa\relax
+ \edef\pgfmathfloat@loc@TMPa{\pgf@sys@tonumber{\pgf@xa}}%
+ \expandafter\pgfmathfloatexp@@toint\pgfmathfloat@loc@TMPa\relax
+ \pgf@xa=2.302585092pt
+ \multiply\pgf@xa by-\pgfmathfloat@k\relax
+ \advance\pgf@xa by\pgfmathresult pt
+ \edef\pgfmathfloat@loc@TMPa{\pgf@sys@tonumber{\pgf@xa}}%
%\message{computing exp(\pgfmathresult) = 10^\pgfmathfloat@k * exp(\pgfmathfloat@loc@TMPa)...}%
- \pgfmath@basic@exp@{\pgfmathfloat@loc@TMPa}%
- \let\pgfmathfloat@loc@TMPa=\pgfmathresult
- \pgfmathfloatparsenumber{\pgfmathfloat@loc@TMPa}%
- \let\pgfmathfloat@loc@TMPa=\pgfmathresult
- \pgfmathfloatshift@{\pgfmathfloat@loc@TMPa}{\pgfmathfloat@k}%
-}
+ \pgfmath@basic@exp@{\pgfmathfloat@loc@TMPa}%
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \pgfmathfloatparsenumber{\pgfmathfloat@loc@TMPa}%
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \pgfmathfloatshift@{\pgfmathfloat@loc@TMPa}{\pgfmathfloat@k}%
+}%
% determine 'k'. This is a heuristics. The exponential series
% converges best for |x| <= 1. However, the fixed point arithmetics
% for tex results in best results for large |x|. Well, I'll need to
% tune this here.
\def\pgfmathfloatexp@@toint#1.#2\relax{%
- \c@pgf@counta=#1\relax
- \ifnum\c@pgf@counta<0
+ \c@pgf@counta=#1\relax
+ \ifnum\c@pgf@counta<0
\advance\c@pgf@counta by-1 % FIXME . this is a test for optimizations.
- \c@pgf@countb=#2\relax
- \ifnum\c@pgf@countb>0
- \advance\c@pgf@counta by-1
- \fi
- \fi
- \edef\pgfmathfloat@k{\the\c@pgf@counta}%
+ \c@pgf@countb=#2\relax
+ \ifnum\c@pgf@countb>0
+ \advance\c@pgf@counta by-1
+ \fi
+ \fi
+ \edef\pgfmathfloat@k{\the\c@pgf@counta}%
}%
\let\pgfmathfloatexp=\pgfmathfloatexp@
\def\pgfmathfloatround@#1{%
- \begingroup
- \pgfkeysvalueof{/pgf/number format/precision/.@cmd}0\pgfeov
- \pgfmathfloattofixed{#1}%
- \pgfmathroundto{\pgfmathresult}%
- \pgfmathfloatparsenumber{\pgfmathresult}%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \pgfkeysvalueof{/pgf/number format/precision/.@cmd}0\pgfeov
+ \pgfmathfloattofixed{#1}%
+ \pgfmathroundto{\pgfmathresult}%
+ \pgfmathfloatparsenumber{\pgfmathresult}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\def\pgfmathfloatneg@#1{%
- \begingroup
- \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \ifcase\pgfmathfloat@a@S\relax
- % 0:
- \edef\pgfmathresult{#1}%
- \or
- % +:
- \pgfmathfloatcreate{2}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
- \or
- % -:
- \pgfmathfloatcreate{1}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
- \or
- % nan:
- \edef\pgfmathresult{#1}%
- \or
- % +infty:
- \pgfmathfloatcreate{5}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
- \or
- % -infty:
- \pgfmathfloatcreate{4}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \expandafter\pgfmathfloat@decompose@tok#1\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \ifcase\pgfmathfloat@a@S\relax
+ % 0:
+ \edef\pgfmathresult{#1}%
+ \or
+ % +:
+ \pgfmathfloatcreate{2}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
+ \or
+ % -:
+ \pgfmathfloatcreate{1}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
+ \or
+ % nan:
+ \edef\pgfmathresult{#1}%
+ \or
+ % +infty:
+ \pgfmathfloatcreate{5}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
+ \or
+ % -infty:
+ \pgfmathfloatcreate{4}{\the\pgfmathfloat@a@Mtok}{\the\pgfmathfloat@a@E}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\def\pgfmathfloatpow@#1#2{%
- \begingroup%
- \expandafter\pgfmathfloat@decompose@tok#2\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
- \ifcase\pgfmathfloat@a@S\relax
- % #1 ^ 0 = 1
- \pgfmathfloatcreate{1}{1.0}{0}%
- \or
- % #2 > 0
- \pgfmathfloatpow@@{#1}{#2}%
- \or
- % #2 < 0
- \pgfmathfloatpow@@{#1}{#2}%
- \or
- % #2 = nan
- \edef\pgfmathresult{#2}%
- \or
- % #2 = inf
- \edef\pgfmathresult{#2}%
- \or
- % #2 = -inf
- \pgfmathfloatcreate{0}{0.0}{0}%
- \fi
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup%
+ \expandafter\pgfmathfloat@decompose@tok#2\relax\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
+ \ifcase\pgfmathfloat@a@S\relax
+ % #1 ^ 0 = 1
+ \pgfmathfloatcreate{1}{1.0}{0}%
+ \or
+ % #2 > 0
+ \pgfmathfloatpow@@{#1}{#2}%
+ \or
+ % #2 < 0
+ \pgfmathfloatpow@@{#1}{#2}%
+ \or
+ % #2 = nan
+ \edef\pgfmathresult{#2}%
+ \or
+ % #2 = inf
+ \edef\pgfmathresult{#2}%
+ \or
+ % #2 = -inf
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
% computes #1^#2
% PRECONDITIONS
% - #2 is positive.
\def\pgfmathfloatpow@@#1#2{%
- \pgfmathfloattofixed@{#2}%
- \afterassignment\pgfmath@x%
- \expandafter\c@pgfmath@counta\pgfmathresult pt\relax%
- \ifdim\pgfmath@x=0pt %
- % loop "manually"; we have an integer exponent!
- \ifnum\c@pgfmath@counta<0
- \pgfmathfloatreciprocal@{#1}%
- \let\pgfmathfloat@loc@TMPa=\pgfmathresult
- \c@pgfmath@counta=-\c@pgfmath@counta
- \else
- \edef\pgfmathfloat@loc@TMPa{#1}%
- \fi
- \pgfmathfloatcreate{1}{1.0}{0}%
- \let\pgfmathfloat@loc@TMPb=\pgfmathresult
- \pgfmathloop
- \ifnum\c@pgfmath@counta>0\relax%
- \ifodd\c@pgfmath@counta%
- \pgfmathfloatmultiply@{\pgfmathfloat@loc@TMPb}{\pgfmathfloat@loc@TMPa}%
- \let\pgfmathfloat@loc@TMPb=\pgfmathresult
- \fi
- \ifnum\c@pgfmath@counta>1\relax%
- \pgfmathfloatmultiply@{\pgfmathfloat@loc@TMPa}{\pgfmathfloat@loc@TMPa}%
- \let\pgfmathfloat@loc@TMPa=\pgfmathresult
- \fi%
- \divide\c@pgfmath@counta by2\relax%
- \repeatpgfmathloop%
- \else
- \pgfmathfloatgetflags{#1}\c@pgfmath@counta
- \ifnum0=\c@pgfmath@counta
- % ah: 0^x
- \pgfmathfloatgetflags{#2}\c@pgfmath@counta
- \ifnum0=\c@pgfmath@counta
- % ah: 0^0
- \pgfmathfloatcreate{1}{1.0}{0}%
- \else
- % ah: 0^x with x!=0:
- \pgfmathfloatcreate{0}{0.0}{0}%
- \fi
- \else
- % employ #1^#2 = exp( #2 * ln(#1) )
- \pgfmathfloatln@{#1}%
- \let\pgfmathfloat@loc@TMPa=\pgfmathresult
- \edef\pgfmathfloat@loc@TMPb{#2}%
- \pgfmathfloatmultiply@{\pgfmathfloat@loc@TMPa}{\pgfmathfloat@loc@TMPb}%
- \pgfmathfloatexp@{\pgfmathresult}%
- \fi
- \fi
-}
+ \pgfmathfloattofixed@{#2}%
+ \afterassignment\pgfmath@x%
+ \expandafter\c@pgfmath@counta\pgfmathresult pt\relax%
+ \ifdim\pgfmath@x=0pt %
+ % loop "manually"; we have an integer exponent!
+ \ifnum\c@pgfmath@counta<0
+ \pgfmathfloatreciprocal@{#1}%
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \c@pgfmath@counta=-\c@pgfmath@counta
+ \else
+ \edef\pgfmathfloat@loc@TMPa{#1}%
+ \fi
+ \pgfmathfloatcreate{1}{1.0}{0}%
+ \let\pgfmathfloat@loc@TMPb=\pgfmathresult
+ \pgfmathloop
+ \ifnum\c@pgfmath@counta>0\relax%
+ \ifodd\c@pgfmath@counta%
+ \pgfmathfloatmultiply@{\pgfmathfloat@loc@TMPb}{\pgfmathfloat@loc@TMPa}%
+ \let\pgfmathfloat@loc@TMPb=\pgfmathresult
+ \fi
+ \ifnum\c@pgfmath@counta>1\relax%
+ \pgfmathfloatmultiply@{\pgfmathfloat@loc@TMPa}{\pgfmathfloat@loc@TMPa}%
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \fi%
+ \divide\c@pgfmath@counta by2\relax%
+ \repeatpgfmathloop%
+ \else
+ \pgfmathfloatgetflags{#1}\c@pgfmath@counta
+ \ifnum0=\c@pgfmath@counta
+ % ah: 0^x
+ \pgfmathfloatgetflags{#2}\c@pgfmath@counta
+ \ifnum0=\c@pgfmath@counta
+ % ah: 0^0
+ \pgfmathfloatcreate{1}{1.0}{0}%
+ \else
+ % ah: 0^x with x!=0:
+ \pgfmathfloatcreate{0}{0.0}{0}%
+ \fi
+ \else
+ % employ #1^#2 = exp( #2 * ln(#1) )
+ \pgfmathfloatln@{#1}%
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \edef\pgfmathfloat@loc@TMPb{#2}%
+ \pgfmathfloatmultiply@{\pgfmathfloat@loc@TMPa}{\pgfmathfloat@loc@TMPb}%
+ \pgfmathfloatexp@{\pgfmathresult}%
+ \fi
+ \fi
+}%
\def\pgfmathfloat@definemethodfrombasic@NOARG#1{%
- \pgfutil@ifundefined{pgfmath@basic@#1@}{%
- \pgfutil@namelet{pgfmath@basic@#1@}{pgfmath#1@}%
- }{}%
- \edef\pgfmathfloat@glob@TMP{%
- \expandafter\noexpand\csname pgfmath@basic@#1@\endcsname
- \noexpand\pgfmathfloatparsenumber{\noexpand\pgfmathresult}%
- }%
- \expandafter\let\csname pgfmathfloat#1@\endcsname=\pgfmathfloat@glob@TMP%
- \expandafter\let\csname pgfmathfloat#1\endcsname=\pgfmathfloat@glob@TMP%
+ \pgfutil@ifundefined{pgfmath@basic@#1@}{%
+ \pgfutil@namelet{pgfmath@basic@#1@}{pgfmath#1@}%
+ }{}%
+ \edef\pgfmathfloat@glob@TMP{%
+ \expandafter\noexpand\csname pgfmath@basic@#1@\endcsname
+ \noexpand\pgfmathfloatparsenumber{\noexpand\pgfmathresult}%
+ }%
+ \expandafter\let\csname pgfmathfloat#1@\endcsname=\pgfmathfloat@glob@TMP%
+ \expandafter\let\csname pgfmathfloat#1\endcsname=\pgfmathfloat@glob@TMP%
}%
\def\pgfmathfloat@definemethodfrombasic@ONEARG#1{%
- \pgfutil@ifundefined{pgfmath@basic@#1@}{%
- \pgfutil@namelet{pgfmath@basic@#1@}{pgfmath#1@}%
- }{}%
- \edef\pgfmathfloat@glob@TMP##1{%
- \noexpand\pgfmathfloattofixed{##1}%
- \noexpand\expandafter
- \expandafter\noexpand\csname pgfmath@basic@#1@\endcsname\noexpand\expandafter%
- {\noexpand\pgfmathresult}%
- \noexpand\pgfmathfloatparsenumber{\noexpand\pgfmathresult}%
- }%
- \expandafter\let\csname pgfmathfloat#1@\endcsname=\pgfmathfloat@glob@TMP%
- \expandafter\let\csname pgfmathfloat#1\endcsname=\pgfmathfloat@glob@TMP%
+ \pgfutil@ifundefined{pgfmath@basic@#1@}{%
+ \pgfutil@namelet{pgfmath@basic@#1@}{pgfmath#1@}%
+ }{}%
+ \edef\pgfmathfloat@glob@TMP##1{%
+ \noexpand\pgfmathfloattofixed{##1}%
+ \noexpand\expandafter
+ \expandafter\noexpand\csname pgfmath@basic@#1@\endcsname\noexpand\expandafter%
+ {\noexpand\pgfmathresult}%
+ \noexpand\pgfmathfloatparsenumber{\noexpand\pgfmathresult}%
+ }%
+ \expandafter\let\csname pgfmathfloat#1@\endcsname=\pgfmathfloat@glob@TMP%
+ \expandafter\let\csname pgfmathfloat#1\endcsname=\pgfmathfloat@glob@TMP%
}%
\def\pgfmathfloat@definemethodfrombasic@TWOARGS#1{%
- \pgfutil@ifundefined{pgfmath@basic@#1@}{%
- \pgfutil@namelet{pgfmath@basic@#1@}{pgfmath#1@}%
- }{}%
- \edef\pgfmathfloat@glob@TMP##1##2{%
- \noexpand\pgfmathfloattofixed{##2}%
- \noexpand\let\noexpand\pgfmathfloat@loc@TMPa=\noexpand\pgfmathresult
- \noexpand\pgfmathfloattofixed{##1}%
- \noexpand\expandafter
- \expandafter\noexpand\csname pgfmath@basic@#1@\endcsname\noexpand\expandafter%
- {\noexpand\pgfmathresult}{\noexpand\pgfmathfloat@loc@TMPa}%
- \noexpand\pgfmathfloatparsenumber{\noexpand\pgfmathresult}%
- }%
- \expandafter\let\csname pgfmathfloat#1@\endcsname=\pgfmathfloat@glob@TMP%
- \expandafter\let\csname pgfmathfloat#1\endcsname=\pgfmathfloat@glob@TMP%
-}%
-\pgfmathfloat@definemethodfrombasic@NOARG{rand}
-\pgfmathfloat@definemethodfrombasic@NOARG{rnd}
-\pgfmathfloat@definemethodfrombasic@NOARG{false}
-\pgfmathfloat@definemethodfrombasic@NOARG{true}
-% arcsin, arccos
-\pgfmathfloat@definemethodfrombasic@ONEARG{asin}
-\pgfmathfloat@definemethodfrombasic@ONEARG{acos}
-\pgfmathfloat@definemethodfrombasic@ONEARG{not}
-\pgfmathfloat@definemethodfrombasic@ONEARG{hex}
-\pgfmathfloat@definemethodfrombasic@ONEARG{Hex}
-\pgfmathfloat@definemethodfrombasic@ONEARG{oct}
-\pgfmathfloat@definemethodfrombasic@ONEARG{bin}
-\pgfmathfloat@definemethodfrombasic@TWOARGS{and}
-\pgfmathfloat@definemethodfrombasic@TWOARGS{or}
+ \pgfutil@ifundefined{pgfmath@basic@#1@}{%
+ \pgfutil@namelet{pgfmath@basic@#1@}{pgfmath#1@}%
+ }{}%
+ \edef\pgfmathfloat@glob@TMP##1##2{%
+ \noexpand\pgfmathfloattofixed{##2}%
+ \noexpand\let\noexpand\pgfmathfloat@loc@TMPa=\noexpand\pgfmathresult
+ \noexpand\pgfmathfloattofixed{##1}%
+ \noexpand\expandafter
+ \expandafter\noexpand\csname pgfmath@basic@#1@\endcsname\noexpand\expandafter%
+ {\noexpand\pgfmathresult}{\noexpand\pgfmathfloat@loc@TMPa}%
+ \noexpand\pgfmathfloatparsenumber{\noexpand\pgfmathresult}%
+ }%
+ \expandafter\let\csname pgfmathfloat#1@\endcsname=\pgfmathfloat@glob@TMP%
+ \expandafter\let\csname pgfmathfloat#1\endcsname=\pgfmathfloat@glob@TMP%
+}%
+\pgfmathfloat@definemethodfrombasic@NOARG{rand}%
+\pgfmathfloat@definemethodfrombasic@NOARG{rnd}%
+\pgfmathfloat@definemethodfrombasic@NOARG{false}%
+\pgfmathfloat@definemethodfrombasic@NOARG{true}%
+% arcsin, arccos
+\pgfmathfloat@definemethodfrombasic@ONEARG{asin}%
+\pgfmathfloat@definemethodfrombasic@ONEARG{acos}%
+\pgfmathfloat@definemethodfrombasic@ONEARG{not}%
+\pgfmathfloat@definemethodfrombasic@ONEARG{hex}%
+\pgfmathfloat@definemethodfrombasic@ONEARG{Hex}%
+\pgfmathfloat@definemethodfrombasic@ONEARG{oct}%
+\pgfmathfloat@definemethodfrombasic@ONEARG{bin}%
+\pgfmathfloat@definemethodfrombasic@TWOARGS{and}%
+\pgfmathfloat@definemethodfrombasic@TWOARGS{or}%
\pgfutil@ifundefined{pgfmathdeclarefunction}{%
- % special treatment: \pgfmathrand@ was not properly defined for pgf 2.00:
- \let\pgfmath@basic@rand=\pgfmathrand
- \let\pgfmath@basic@rand@=\pgfmathrand@
- \def\pgfmathfloatrand@{%
- \pgfmath@basic@rand
- \pgfmathfloatparsenumber{\pgfmathresult}%
- }%
- \let\pgfmathfloatrand=\pgfmathfloatrand@%
- %
- % special treatment: \pgfmathrnd@ was not properly defined for pgf 2.00:
- \let\pgfmath@basic@rnd=\pgfmathrnd
- \let\pgfmath@basic@rnd@=\pgfmathrnd@
- \def\pgfmathfloatrnd@{%
- \pgfmath@basic@rnd
- \pgfmathfloatparsenumber{\pgfmathresult}%
- }%
- \let\pgfmathfloatrnd=\pgfmathfloatrnd@%
-}{}
+ % special treatment: \pgfmathrand@ was not properly defined for pgf 2.00:
+ \let\pgfmath@basic@rand=\pgfmathrand
+ \let\pgfmath@basic@rand@=\pgfmathrand@
+ \def\pgfmathfloatrand@{%
+ \pgfmath@basic@rand
+ \pgfmathfloatparsenumber{\pgfmathresult}%
+ }%
+ \let\pgfmathfloatrand=\pgfmathfloatrand@%
+ %
+ % special treatment: \pgfmathrnd@ was not properly defined for pgf 2.00:
+ \let\pgfmath@basic@rnd=\pgfmathrnd
+ \let\pgfmath@basic@rnd@=\pgfmathrnd@
+ \def\pgfmathfloatrnd@{%
+ \pgfmath@basic@rnd
+ \pgfmathfloatparsenumber{\pgfmathresult}%
+ }%
+ \let\pgfmathfloatrnd=\pgfmathfloatrnd@%
+}{}%
% Implements the factorial of '#1'.
% This does only work if '#1 < 2^32'.
\def\pgfmathfloatfactorial@#1{%
- \begingroup
- \pgfmathfloattofixed{#1}%
- % collect integer part into a 32 bit register:
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgfmath@counta\pgfmathresult\relax\pgfmath@%
- \pgfmathfloatcreate{1}{1.0}{0}%
- \let\pgfmathfloat@loc@TMPa=\pgfmathresult
- \pgfmathloop
- \ifnum\c@pgfmath@counta<2 %
- \else
- \expandafter\pgfmathfloatparsenumber\expandafter{\the\c@pgfmath@counta}%
- \expandafter\pgfmathfloatmultiply@\expandafter{\pgfmathresult}{\pgfmathfloat@loc@TMPa}%
- \let\pgfmathfloat@loc@TMPa=\pgfmathresult
- \advance\c@pgfmath@counta by-1\relax%
- \repeatpgfmathloop
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \pgfmathfloattofixed{#1}%
+ % collect integer part into a 32 bit register:
+ \afterassignment\pgfmath@gobbletilpgfmath@%
+ \expandafter\c@pgfmath@counta\pgfmathresult\relax\pgfmath@%
+ \pgfmathfloatcreate{1}{1.0}{0}%
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \pgfmathloop
+ \ifnum\c@pgfmath@counta<2 %
+ \else
+ \expandafter\pgfmathfloatparsenumber\expandafter{\the\c@pgfmath@counta}%
+ \expandafter\pgfmathfloatmultiply@\expandafter{\pgfmathresult}{\pgfmathfloat@loc@TMPa}%
+ \let\pgfmathfloat@loc@TMPa=\pgfmathresult
+ \advance\c@pgfmath@counta by-1\relax%
+ \repeatpgfmathloop
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
% Implements the vector length of a 2D vector.
@@ -2153,60 +2268,60 @@
% ATTENTION: this does NOT use the improved code of the basic layer!
% It simply computed sqrt( #1^2 + #2^2 )!
\def\pgfmathfloatveclen@#1#2{%
- \begingroup
- \edef\pgfmathfloat@@a{#1}%
- \pgfmathfloatmultiply@{\pgfmathfloat@@a}{\pgfmathfloat@@a}%
- \let\pgfmathfloat@@a=\pgfmathresult
- %
- \edef\pgfmathfloat@@b{#2}%
- \pgfmathfloatmultiply@{\pgfmathfloat@@b}{\pgfmathfloat@@b}%
- \let\pgfmathfloat@@b=\pgfmathresult
- %
- \pgfmathfloatadd@{\pgfmathfloat@@a}{\pgfmathfloat@@b}%
- \pgfmathfloatsqrt@{\pgfmathresult}%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \edef\pgfmathfloat@@a{#1}%
+ \pgfmathfloatmultiply@{\pgfmathfloat@@a}{\pgfmathfloat@@a}%
+ \let\pgfmathfloat@@a=\pgfmathresult
+ %
+ \edef\pgfmathfloat@@b{#2}%
+ \pgfmathfloatmultiply@{\pgfmathfloat@@b}{\pgfmathfloat@@b}%
+ \let\pgfmathfloat@@b=\pgfmathresult
+ %
+ \pgfmathfloatadd@{\pgfmathfloat@@a}{\pgfmathfloat@@b}%
+ \pgfmathfloatsqrt@{\pgfmathresult}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\def\pgfmathfloatcosh@#1{%
- \begingroup
- \pgfmathfloatexp@{#1}%
- \let\pgfmathfloat@@a=\pgfmathresult
- %
- \pgfmathfloatneg@{#1}%
- \pgfmathfloatexp@{\pgfmathresult}%
- %
- \pgfmathfloatadd@{\pgfmathresult}{\pgfmathfloat@@a}%
- \expandafter\pgfmathfloatmultiplyfixed@\expandafter{\pgfmathresult}{0.5}%
- %
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \pgfmathfloatexp@{#1}%
+ \let\pgfmathfloat@@a=\pgfmathresult
+ %
+ \pgfmathfloatneg@{#1}%
+ \pgfmathfloatexp@{\pgfmathresult}%
+ %
+ \pgfmathfloatadd@{\pgfmathresult}{\pgfmathfloat@@a}%
+ \expandafter\pgfmathfloatmultiplyfixed@\expandafter{\pgfmathresult}{0.5}%
+ %
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\def\pgfmathfloatsinh@#1{%
- \begingroup
- \pgfmathfloatexp@{#1}%
- \let\pgfmathfloat@@a=\pgfmathresult
- %
- \pgfmathfloatneg@{#1}%
- \pgfmathfloatexp@{\pgfmathresult}%
- %
- \pgfmathfloatsubtract@{\pgfmathfloat@@a}{\pgfmathresult}%
- \expandafter\pgfmathfloatmultiplyfixed@\expandafter{\pgfmathresult}{0.5}%
- %
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \pgfmathfloatexp@{#1}%
+ \let\pgfmathfloat@@a=\pgfmathresult
+ %
+ \pgfmathfloatneg@{#1}%
+ \pgfmathfloatexp@{\pgfmathresult}%
+ %
+ \pgfmathfloatsubtract@{\pgfmathfloat@@a}{\pgfmathresult}%
+ \expandafter\pgfmathfloatmultiplyfixed@\expandafter{\pgfmathresult}{0.5}%
+ %
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\def\pgfmathfloattanh@#1{%
- \begingroup
- \pgfmathfloatsinh@{#1}%
- \let\pgfmathfloat@@a=\pgfmathresult
- %
- \pgfmathfloatcosh@{#1}%
- \let\pgfmathfloat@@b=\pgfmathresult
- %
- \pgfmathfloatdivide@{\pgfmathfloat@@a}{\pgfmathfloat@@b}%
- %
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \pgfmathfloatsinh@{#1}%
+ \let\pgfmathfloat@@a=\pgfmathresult
+ %
+ \pgfmathfloatcosh@{#1}%
+ \let\pgfmathfloat@@b=\pgfmathresult
+ %
+ \pgfmathfloatdivide@{\pgfmathfloat@@a}{\pgfmathfloat@@b}%
+ %
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex
index 41c0d1cdc19..7de4a2b9e97 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryintersections.code.tex
@@ -11,7 +11,7 @@
% Experimentally, it performed well while computing ~12 intersections of two
% plots, each with 600 samples. It failed when the number of samples exceeded 700.
-\usepgflibrary{fpu}
+\usepgflibrary{fpu}%
\newcount\pgf@intersect@solutions
@@ -19,28 +19,28 @@
\newif\ifpgf@intersect@sort@by@second@path
\def\pgfintersectionsortbyfirstpath{%
- \pgf@intersect@sorttrue%
- \pgf@intersect@sort@by@second@pathfalse%
-}
+ \pgf@intersect@sorttrue%
+ \pgf@intersect@sort@by@second@pathfalse%
+}%
\def\pgfintersectionsortbysecondpath{%
- \pgf@intersect@sorttrue%
- \pgf@intersect@sort@by@second@pathtrue%
-}
+ \pgf@intersect@sorttrue%
+ \pgf@intersect@sort@by@second@pathtrue%
+}%
% #1: the index. It starts at 1 and ends with \pgfintersectionsolutions (inclusive).
% Invalid values will implicitly result in the origin.
\def\pgfpointintersectionsolution#1{%
- \ifnum#1<1\relax%
- \pgfpoint@intersect@solution@orgin%
- \else%
- \ifnum#1>\pgfintersectionsolutions\relax%
- \pgfpoint@intersect@solution@orgin%
- \else%
- \csname pgfpoint@intersect@solution@#1\endcsname%
- \fi%
- \fi%
-}
+ \ifnum#1<1\relax%
+ \pgfpoint@intersect@solution@orgin%
+ \else%
+ \ifnum#1>\pgfintersectionsolutions\relax%
+ \pgfpoint@intersect@solution@orgin%
+ \else%
+ \csname pgfpoint@intersect@solution@#1\endcsname%
+ \fi%
+ \fi%
+}%
% Gets the segment indices of solution #1.
%
@@ -51,27 +51,27 @@
% Example: \pgfintersectiongetsolutionsegmentindices{0}{\first}{\second}
%
% -> \first may be 0 if point #0 is in the 0'th segment
-% -> \second may be 42 if point #0 is in the 42'th segment
+% -> \second may be 42 if point #0 is in the 42'th segment
%
% The "segment index" is actually close to the "time" of the solution.
% If a solution is at "time" 42.2, it will have segment index 42.
\def\pgfintersectiongetsolutionsegmentindices#1#2#3{%
- \ifnum#1<1\relax%
- \let#2=\pgfutil@empty
- \let#3=\pgfutil@empty
- \else%
- \ifnum#1>\pgfintersectionsolutions\relax%
- \let#2=\pgfutil@empty
- \let#3=\pgfutil@empty
- \else%
- \def\pgf@temp##1##2##3##4{%
- \edef#2{##1}%
- \edef#3{##2}%
- }%
- \expandafter\let\expandafter\pgf@tempb\csname pgf@intersect@solution@props@#1\endcsname
- \expandafter\pgf@temp\pgf@tempb
- \fi%
- \fi%
+ \ifnum#1<1\relax%
+ \let#2=\pgfutil@empty
+ \let#3=\pgfutil@empty
+ \else%
+ \ifnum#1>\pgfintersectionsolutions\relax%
+ \let#2=\pgfutil@empty
+ \let#3=\pgfutil@empty
+ \else%
+ \def\pgf@temp##1##2##3##4{%
+ \edef#2{##1}%
+ \edef#3{##2}%
+ }%
+ \expandafter\let\expandafter\pgf@tempb\csname pgf@intersect@solution@props@#1\endcsname
+ \expandafter\pgf@temp\pgf@tempb
+ \fi%
+ \fi%
}%
% Gets the time indices of solution #1.
@@ -96,37 +96,37 @@
% \pgfintersectiongetsolutionsegmentindices (which is a
% "coarse-grained" time).
\def\pgfintersectiongetsolutiontimes#1#2#3{%
- \ifnum#1<1\relax%
- \let#2=\pgfutil@empty
- \let#3=\pgfutil@empty
- \else%
- \ifnum#1>\pgfintersectionsolutions\relax%
- \let#2=\pgfutil@empty
- \let#3=\pgfutil@empty
- \else%
- \def\pgf@temp##1##2##3##4{%
- \edef#2{##3}%
- \edef#3{##4}%
- %
- % check for fallback to segment indices:
- \ifx#2\pgfutil@empty \edef#2{##1}\fi
- \ifx#3\pgfutil@empty \edef#3{##2}\fi
- }%
- \expandafter\let\expandafter\pgf@tempb\csname pgf@intersect@solution@props@#1\endcsname
- \expandafter\pgf@temp\pgf@tempb
- \fi%
- \fi%
+ \ifnum#1<1\relax%
+ \let#2=\pgfutil@empty
+ \let#3=\pgfutil@empty
+ \else%
+ \ifnum#1>\pgfintersectionsolutions\relax%
+ \let#2=\pgfutil@empty
+ \let#3=\pgfutil@empty
+ \else%
+ \def\pgf@temp##1##2##3##4{%
+ \edef#2{##3}%
+ \edef#3{##4}%
+ %
+ % check for fallback to segment indices:
+ \ifx#2\pgfutil@empty \edef#2{##1}\fi
+ \ifx#3\pgfutil@empty \edef#3{##2}\fi
+ }%
+ \expandafter\let\expandafter\pgf@tempb\csname pgf@intersect@solution@props@#1\endcsname
+ \expandafter\pgf@temp\pgf@tempb
+ \fi%
+ \fi%
}%
\def\pgfpoint@intersect@solution@orgin{%
- \begingroup%
- \pgftransforminvert%
- \pgfpointorigin%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
- \global\pgf@x=\pgf@x%
- \global\pgf@y=\pgf@y%
- \endgroup%
-}
+ \begingroup%
+ \pgftransforminvert%
+ \pgfpointorigin%
+ \pgf@pos@transform@glob
+ \global\pgf@x=\pgf@x%
+ \global\pgf@y=\pgf@y%
+ \endgroup%
+}%
% #1 code which assigns the first path using \pgfsetpath.
% #2 code which assigns the second path using \pgfsetpath.
@@ -134,262 +134,262 @@
% On output, the points, their properties, and the number of points are set.
% Use \pgfintersectionsolutions which expands to the number of intersections
\long\def\pgfintersectionofpaths#1#2{%
- \begingroup%
- \pgfinterruptpath%
- #1%
- \pgfgetpath\pgf@intersect@path@a%
- \global\let\pgf@intersect@path@temp=\pgf@intersect@path@a%
- \endpgfinterruptpath%
- \endgroup%
- \let\pgf@intersect@path@a=\pgf@intersect@path@temp%
- %
- \begingroup%
- \pgfinterruptpath%
- #2%
- \pgfgetpath\pgf@intersect@path@b%
- \global\let\pgf@intersect@path@temp=\pgf@intersect@path@b%
- \endpgfinterruptpath%
- \endgroup%
- \let\pgf@intersect@path@b=\pgf@intersect@path@temp%
- %
- \pgf@intersect@solutions=0\relax%
- \pgf@intersect@path@reset@a
- %
- \ifpgf@intersect@sort@by@second@path%
- \let\pgf@intersect@temp=\pgf@intersect@path@a%
- \let\pgf@intersect@path@a=\pgf@intersect@path@b%
- \let\pgf@intersect@path@b=\pgf@intersect@temp%
- \fi%
- %
- \pgfprocessround\pgf@intersect@path@a\pgf@intersect@path@a%
- \pgfprocessround\pgf@intersect@path@b\pgf@intersect@path@b%
- %
- \let\pgf@intersect@token@after=\pgf@intersect@path@process@a%
- \expandafter\pgf@intersectionofpaths\pgf@intersect@path@a\pgf@stop%
- \edef\pgfintersectionsolutions{\the\pgf@intersect@solutions}%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\pgfintersectionsolutions\relax%
- \else%
- \pgfutil@namelet{pgfpoint@intersect@solution@\pgfmathcounter}%
- {pgfpoint@g@intersect@solution@\pgfmathcounter}%
- \edef\pgf@marshal{\noexpand\pgf@intersection@set@properties{\csname pgfpoint@g@intersect@solution@\pgfmathcounter @props\endcsname}}%
- \pgf@marshal
- \ifpgf@intersect@sort%
- \pgfutil@namelet{pgf@intersect@solution@\pgfmathcounter @time@a}%
- {pgf@g@intersect@solution@\pgfmathcounter @time@a}%
- \fi%
- \repeatpgfmathloop%
- \ifpgf@intersect@sort%
- \pgfintersectionsolutionsortbytime%
- \fi%
-}
+ \begingroup%
+ \pgfinterruptpath%
+ #1%
+ \pgfgetpath\pgf@intersect@path@a%
+ \global\let\pgf@intersect@path@temp=\pgf@intersect@path@a%
+ \endpgfinterruptpath%
+ \endgroup%
+ \let\pgf@intersect@path@a=\pgf@intersect@path@temp%
+ %
+ \begingroup%
+ \pgfinterruptpath%
+ #2%
+ \pgfgetpath\pgf@intersect@path@b%
+ \global\let\pgf@intersect@path@temp=\pgf@intersect@path@b%
+ \endpgfinterruptpath%
+ \endgroup%
+ \let\pgf@intersect@path@b=\pgf@intersect@path@temp%
+ %
+ \pgf@intersect@solutions=0\relax%
+ \pgf@intersect@path@reset@a
+ %
+ \ifpgf@intersect@sort@by@second@path%
+ \let\pgf@intersect@temp=\pgf@intersect@path@a%
+ \let\pgf@intersect@path@a=\pgf@intersect@path@b%
+ \let\pgf@intersect@path@b=\pgf@intersect@temp%
+ \fi%
+ %
+ \pgfprocessround\pgf@intersect@path@a\pgf@intersect@path@a%
+ \pgfprocessround\pgf@intersect@path@b\pgf@intersect@path@b%
+ %
+ \let\pgf@intersect@token@after=\pgf@intersect@path@process@a%
+ \expandafter\pgf@intersectionofpaths\pgf@intersect@path@a\pgf@stop%
+ \edef\pgfintersectionsolutions{\the\pgf@intersect@solutions}%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgfintersectionsolutions\relax%
+ \else%
+ \pgfutil@namelet{pgfpoint@intersect@solution@\pgfmathcounter}%
+ {pgfpoint@g@intersect@solution@\pgfmathcounter}%
+ \edef\pgf@marshal{\noexpand\pgf@intersection@set@properties{\csname pgfpoint@g@intersect@solution@\pgfmathcounter @props\endcsname}}%
+ \pgf@marshal
+ \ifpgf@intersect@sort%
+ \pgfutil@namelet{pgf@intersect@solution@\pgfmathcounter @time@a}%
+ {pgf@g@intersect@solution@\pgfmathcounter @time@a}%
+ \fi%
+ \repeatpgfmathloop%
+ \ifpgf@intersect@sort%
+ \pgfintersectionsolutionsortbytime%
+ \fi%
+}%
\def\pgf@intersection@set@properties#1{%
- \pgfutil@namedef{pgf@intersect@solution@props@\pgfmathcounter}{#1}%
+ \pgfutil@namedef{pgf@intersect@solution@props@\pgfmathcounter}{#1}%
}%
% #1 a global name prefix to store properties.
\def\pgf@intersection@store@properties#1{%
- % we store the time offsets as well and make them available programmatically:
- % note that \pgf@intersect@time@a and \pgf@intersect@time@b may be empty.
- %
- % However, \pgf@intersect@time@offset and
- % \pgf@intersect@time@offset@b are *always* valid. In fact,they
- % resemble a part of the time: it holds
- % 0 <= \pgf@intersect@time@a < 1
- % and \pgf@intersect@time@offset > 0.
- %
- % If we have an intersection in segment 42 of path A,
- % \pgf@intersect@time@offset will be 42. The time inside of that
- % segment is given as number in the interval [0,1]. If it is 0.3,
- % the total time will be 42.3 and that number will be stored as
- % \pgf@intersect@time@a.
- %
- \expandafter\xdef\csname #1@props\endcsname{{\pgf@intersect@time@offset}{\pgf@intersect@time@offset@b}{\pgf@intersect@time@a}{\pgf@intersect@time@b}}%
-}
+ % we store the time offsets as well and make them available programmatically:
+ % note that \pgf@intersect@time@a and \pgf@intersect@time@b may be empty.
+ %
+ % However, \pgf@intersect@time@offset and
+ % \pgf@intersect@time@offset@b are *always* valid. In fact,they
+ % resemble a part of the time: it holds
+ % 0 <= \pgf@intersect@time@a < 1
+ % and \pgf@intersect@time@offset > 0.
+ %
+ % If we have an intersection in segment 42 of path A,
+ % \pgf@intersect@time@offset will be 42. The time inside of that
+ % segment is given as number in the interval [0,1]. If it is 0.3,
+ % the total time will be 42.3 and that number will be stored as
+ % \pgf@intersect@time@a.
+ %
+ \expandafter\xdef\csname #1@props\endcsname{{\pgf@intersect@time@offset}{\pgf@intersect@time@offset@b}{\pgf@intersect@time@a}{\pgf@intersect@time@b}}%
+}%
\def\pgf@intersectionofpaths#1{%
- \ifx#1\pgf@stop%
- \let\pgf@intersect@next=\relax%
- \else%
- \ifx#1\pgfsyssoftpath@movetotoken%
- \let\pgf@intersect@next=\pgf@intersect@token@moveto%
- \else%
- \ifx#1\pgfsyssoftpath@linetotoken%
- \let\pgf@intersect@next=\pgf@intersect@token@lineto%
- \else%
- \ifx#1\pgfsyssoftpath@closepathtoken%
- \let\pgf@intersect@next=\pgf@intersect@token@lineto%
- \else%
- \ifx#1\pgfsyssoftpath@curvetosupportatoken%
- \let\pgf@intersect@next=\pgf@intersect@token@curveto%
- \else%
- \ifx#1\pgfsyssoftpath@rectcornertoken%
- \let\pgf@intersect@next=\pgf@intersect@token@rect%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \pgf@intersect@next}
+ \ifx#1\pgf@stop%
+ \let\pgf@intersect@next=\relax%
+ \else%
+ \ifx#1\pgfsyssoftpath@movetotoken%
+ \let\pgf@intersect@next=\pgf@intersect@token@moveto%
+ \else%
+ \ifx#1\pgfsyssoftpath@linetotoken%
+ \let\pgf@intersect@next=\pgf@intersect@token@lineto%
+ \else%
+ \ifx#1\pgfsyssoftpath@closepathtoken%
+ \let\pgf@intersect@next=\pgf@intersect@token@lineto%
+ \else%
+ \ifx#1\pgfsyssoftpath@curvetosupportatoken%
+ \let\pgf@intersect@next=\pgf@intersect@token@curveto%
+ \else%
+ \ifx#1\pgfsyssoftpath@rectcornertoken%
+ \let\pgf@intersect@next=\pgf@intersect@token@rect%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \pgf@intersect@next}%
\def\pgf@intersect@token@moveto#1#2{%
- \def\pgfpoint@intersect@start{\pgfqpoint{#1}{#2}}%
- \pgf@intersectionofpaths%
-}
+ \def\pgfpoint@intersect@start{\pgfqpoint{#1}{#2}}%
+ \pgf@intersectionofpaths%
+}%
\def\pgf@intersect@token@lineto#1#2{%
- \def\pgfpoint@intersect@end{\pgfqpoint{#1}{#2}}%
- \def\pgf@intersect@type{line}%
- \pgf@intersect@token@after%
-}
+ \def\pgfpoint@intersect@end{\pgfqpoint{#1}{#2}}%
+ \def\pgf@intersect@type{line}%
+ \pgf@intersect@token@after%
+}%
\def\pgf@intersect@token@curveto#1#2\pgfsyssoftpath@curvetosupportbtoken#3#4\pgfsyssoftpath@curvetotoken#5#6{%
- \def\pgfpoint@intersect@firstsupport{\pgfqpoint{#1}{#2}}%
- \def\pgfpoint@intersect@secondsupport{\pgfqpoint{#3}{#4}}%
- \def\pgfpoint@intersect@end{\pgfqpoint{#5}{#6}}%
- \def\pgf@intersect@type{curve}%
- \pgf@intersect@token@after%
-}
+ \def\pgfpoint@intersect@firstsupport{\pgfqpoint{#1}{#2}}%
+ \def\pgfpoint@intersect@secondsupport{\pgfqpoint{#3}{#4}}%
+ \def\pgfpoint@intersect@end{\pgfqpoint{#5}{#6}}%
+ \def\pgf@intersect@type{curve}%
+ \pgf@intersect@token@after%
+}%
\def\pgf@intersect@token@rect#1#2\pgfsyssoftpath@rectsizetoken#3#4{%
- \pgf@xa=#1\relax%
- \advance\pgf@xa by#3\relax%
- \pgf@ya=#2\relax%
- \advance\pgf@ya by#4\relax%
- \edef\pgf@marshal{%
- \noexpand\pgfsyssoftpath@movetotoken{#1}{#2}%
- \noexpand\pgfsyssoftpath@linetotoken{#1}{\the\pgf@ya}%
- \noexpand\pgfsyssoftpath@linetotoken{\the\pgf@xa}{\the\pgf@ya}%
- \noexpand\pgfsyssoftpath@linetotoken{\the\pgf@xa}{#2}%
- \noexpand\pgfsyssoftpath@closepathtoken{#1}{#2}%
- }%
- \expandafter\pgf@intersectionofpaths\pgf@marshal%
-}
+ \pgf@xa=#1\relax%
+ \advance\pgf@xa by#3\relax%
+ \pgf@ya=#2\relax%
+ \advance\pgf@ya by#4\relax%
+ \edef\pgf@marshal{%
+ \noexpand\pgfsyssoftpath@movetotoken{#1}{#2}%
+ \noexpand\pgfsyssoftpath@linetotoken{#1}{\the\pgf@ya}%
+ \noexpand\pgfsyssoftpath@linetotoken{\the\pgf@xa}{\the\pgf@ya}%
+ \noexpand\pgfsyssoftpath@linetotoken{\the\pgf@xa}{#2}%
+ \noexpand\pgfsyssoftpath@closepathtoken{#1}{#2}%
+ }%
+ \expandafter\pgf@intersectionofpaths\pgf@marshal%
+}%
\def\pgf@intersect@path@process@a{%
- \pgf@intersect@path@getpoints@a%
- \let\pgf@intersect@token@after=\pgf@intersect@path@process@b%
- \pgf@intersect@path@reset@b
- \expandafter\pgf@intersectionofpaths\pgf@intersect@path@b\pgf@stop%
- \let\pgfpoint@intersect@start=\pgfpoint@intersect@end@a%
- \let\pgf@intersect@token@after=\pgf@intersect@path@process@a%
- \c@pgf@counta=\pgf@intersect@time@offset\relax%
- \advance\c@pgf@counta by1\relax%
- \edef\pgf@intersect@time@offset{\the\c@pgf@counta}%
- \pgf@intersectionofpaths%
-}
+ \pgf@intersect@path@getpoints@a%
+ \let\pgf@intersect@token@after=\pgf@intersect@path@process@b%
+ \pgf@intersect@path@reset@b
+ \expandafter\pgf@intersectionofpaths\pgf@intersect@path@b\pgf@stop%
+ \let\pgfpoint@intersect@start=\pgfpoint@intersect@end@a%
+ \let\pgf@intersect@token@after=\pgf@intersect@path@process@a%
+ \c@pgf@counta=\pgf@intersect@time@offset\relax%
+ \advance\c@pgf@counta by1\relax%
+ \edef\pgf@intersect@time@offset{\the\c@pgf@counta}%
+ \pgf@intersectionofpaths%
+}%
\def\pgf@intersect@path@reset@a{%
- \def\pgf@intersect@time@offset{0}%
- \def\pgf@intersect@time@a{}%
+ \def\pgf@intersect@time@offset{0}%
+ \def\pgf@intersect@time@a{}%
}%
\def\pgf@intersect@path@reset@b{%
- \def\pgf@intersect@time@offset@b{0}%
- \def\pgf@intersect@time@b{}%
+ \def\pgf@intersect@time@offset@b{0}%
+ \def\pgf@intersect@time@b{}%
}%
\def\pgf@intersect@path@getpoints@a{%
- \let\pgfpoint@intersect@start@a=\pgfpoint@intersect@start%
- \let\pgfpoint@intersect@end@a=\pgfpoint@intersect@end%
- \let\pgfpoint@intersect@firstsupport@a=\pgfpoint@intersect@firstsupport%
- \let\pgfpoint@intersect@secondsupport@a=\pgfpoint@intersect@secondsupport%
- \let\pgf@intersect@type@a=\pgf@intersect@type%
-}
+ \let\pgfpoint@intersect@start@a=\pgfpoint@intersect@start%
+ \let\pgfpoint@intersect@end@a=\pgfpoint@intersect@end%
+ \let\pgfpoint@intersect@firstsupport@a=\pgfpoint@intersect@firstsupport%
+ \let\pgfpoint@intersect@secondsupport@a=\pgfpoint@intersect@secondsupport%
+ \let\pgf@intersect@type@a=\pgf@intersect@type%
+}%
\def\pgf@intersect@path@process@b{%
- \pgf@intersect@path@getpoints@b%
- \csname pgf@intersect@\pgf@intersect@type@a @and@\pgf@intersect@type@b\endcsname%
- \let\pgfpoint@intersect@start=\pgfpoint@intersect@end@b%
- \c@pgf@counta=\pgf@intersect@time@offset@b\relax%
- \advance\c@pgf@counta by1\relax%
- \edef\pgf@intersect@time@offset@b{\the\c@pgf@counta}%
- \pgf@intersectionofpaths}
+ \pgf@intersect@path@getpoints@b%
+ \csname pgf@intersect@\pgf@intersect@type@a @and@\pgf@intersect@type@b\endcsname%
+ \let\pgfpoint@intersect@start=\pgfpoint@intersect@end@b%
+ \c@pgf@counta=\pgf@intersect@time@offset@b\relax%
+ \advance\c@pgf@counta by1\relax%
+ \edef\pgf@intersect@time@offset@b{\the\c@pgf@counta}%
+ \pgf@intersectionofpaths}%
\def\pgf@intersect@path@getpoints@b{%
- \let\pgfpoint@intersect@start@b=\pgfpoint@intersect@start%
- \let\pgfpoint@intersect@end@b=\pgfpoint@intersect@end%
- \let\pgfpoint@intersect@firstsupport@b=\pgfpoint@intersect@firstsupport%
- \let\pgfpoint@intersect@secondsupport@b=\pgfpoint@intersect@secondsupport%
- \let\pgf@intersect@type@b=\pgf@intersect@type%
-}
+ \let\pgfpoint@intersect@start@b=\pgfpoint@intersect@start%
+ \let\pgfpoint@intersect@end@b=\pgfpoint@intersect@end%
+ \let\pgfpoint@intersect@firstsupport@b=\pgfpoint@intersect@firstsupport%
+ \let\pgfpoint@intersect@secondsupport@b=\pgfpoint@intersect@secondsupport%
+ \let\pgf@intersect@type@b=\pgf@intersect@type%
+}%
\def\pgf@intersect@line@and@line{%
- \pgf@intersectionoflines{\pgfpoint@intersect@start@a}{\pgfpoint@intersect@end@a}%
- {\pgfpoint@intersect@start@b}{\pgfpoint@intersect@end@b}%
+ \pgf@intersectionoflines{\pgfpoint@intersect@start@a}{\pgfpoint@intersect@end@a}%
+ {\pgfpoint@intersect@start@b}{\pgfpoint@intersect@end@b}%
}%
\def\pgf@intersect@line@and@curve{%
- \pgf@intersectionoflineandcurve%
- {\pgf@process{\pgfpoint@intersect@start@a}}{\pgf@process{\pgfpoint@intersect@end@a}}%
- {\pgf@process{\pgfpoint@intersect@start@b}}{\pgf@process{\pgfpoint@intersect@firstsupport@b}}%
- {\pgf@process{\pgfpoint@intersect@secondsupport@b}}{\pgf@process{\pgfpoint@intersect@end@b}}%
-}
+ \pgf@intersectionoflineandcurve%
+ {\pgf@process{\pgfpoint@intersect@start@a}}{\pgf@process{\pgfpoint@intersect@end@a}}%
+ {\pgf@process{\pgfpoint@intersect@start@b}}{\pgf@process{\pgfpoint@intersect@firstsupport@b}}%
+ {\pgf@process{\pgfpoint@intersect@secondsupport@b}}{\pgf@process{\pgfpoint@intersect@end@b}}%
+}%
\def\pgf@intersect@curve@and@line{%
- \pgf@intersectionofcurveandline%
- {\pgf@process{\pgfpoint@intersect@start@a}}{\pgf@process{\pgfpoint@intersect@firstsupport@a}}%
- {\pgf@process{\pgfpoint@intersect@secondsupport@a}}{\pgf@process{\pgfpoint@intersect@end@a}}%
- {\pgf@process{\pgfpoint@intersect@start@b}}{\pgf@process{\pgfpoint@intersect@end@b}}%
-}
+ \pgf@intersectionofcurveandline%
+ {\pgf@process{\pgfpoint@intersect@start@a}}{\pgf@process{\pgfpoint@intersect@firstsupport@a}}%
+ {\pgf@process{\pgfpoint@intersect@secondsupport@a}}{\pgf@process{\pgfpoint@intersect@end@a}}%
+ {\pgf@process{\pgfpoint@intersect@start@b}}{\pgf@process{\pgfpoint@intersect@end@b}}%
+}%
\def\pgf@intersect@curve@and@curve{%
- \pgf@intersectionofcurves%
- {\pgf@process{\pgfpoint@intersect@start@a}}{\pgf@process{\pgfpoint@intersect@firstsupport@a}}%
- {\pgf@process{\pgfpoint@intersect@secondsupport@a}}{\pgf@process{\pgfpoint@intersect@end@a}}%
- {\pgf@process{\pgfpoint@intersect@start@b}}{\pgf@process{\pgfpoint@intersect@firstsupport@b}}%
- {\pgf@process{\pgfpoint@intersect@secondsupport@b}}{\pgf@process{\pgfpoint@intersect@end@b}}%
-}
+ \pgf@intersectionofcurves%
+ {\pgf@process{\pgfpoint@intersect@start@a}}{\pgf@process{\pgfpoint@intersect@firstsupport@a}}%
+ {\pgf@process{\pgfpoint@intersect@secondsupport@a}}{\pgf@process{\pgfpoint@intersect@end@a}}%
+ {\pgf@process{\pgfpoint@intersect@start@b}}{\pgf@process{\pgfpoint@intersect@firstsupport@b}}%
+ {\pgf@process{\pgfpoint@intersect@secondsupport@b}}{\pgf@process{\pgfpoint@intersect@end@b}}%
+}%
\def\pgfintersectionoflines#1#2#3#4{%
- \pgf@intersect@solutions=0\relax%
- \pgf@intersectionoflines{#1}{#2}{#3}{#4}%
-}
+ \pgf@intersect@solutions=0\relax%
+ \pgf@intersectionoflines{#1}{#2}{#3}{#4}%
+}%
\def\pgf@intersectionoflines#1#2#3#4{%
- \pgf@iflinesintersect{#1}{#2}{#3}{#4}%
- {%
- \pgfextract@process\pgf@intersect@solution@candidate{%
- \pgfpointintersectionoflines{\pgfpoint@intersect@start@a}{\pgfpoint@intersect@end@a}%
- {\pgfpoint@intersect@start@b}{\pgfpoint@intersect@end@b}%
- }%
- \pgf@ifsolution@duplicate{\pgf@intersect@solution@candidate}{%
- % ah - we a duplicate. Apparently, we have a hit on an
- % endpoint.
- }{%
- \global\advance\pgf@intersect@solutions by1\relax%
- \expandafter\global\expandafter\let\csname pgfpoint@g@intersect@solution@\the\pgf@intersect@solutions\endcsname=\pgf@intersect@solution@candidate
- \ifpgf@intersect@sort%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- \pgf@process{\pgfpointdiff{\pgfpoint@intersect@start@a}{\pgfpoint@intersect@end@a}}%
- \edef\pgf@marshal{%
- \noexpand\pgfmathveclen@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@ya}}%
- }%
- \pgf@marshal%
- \let\pgf@intersect@length@a=\pgfmathresult%
- \pgf@process{\pgfpointdiff{\pgfpoint@intersect@start@a}{\pgfqpoint{\pgf@xc}{\pgf@yc}}}%
- \edef\pgf@marshal{%
- \noexpand\pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
- }%
- \pgf@marshal%
- \pgfmathdivide@{\pgfmathresult}{\pgf@intersect@length@a}%
- \pgf@x=\pgfmathresult pt\relax%
- \advance\pgf@x by\pgf@intersect@time@offset pt\relax%
- \edef\pgf@intersect@time@a{\pgfmath@tonumber{\pgf@x}}%
- \expandafter\global\expandafter\let\csname pgf@g@intersect@solution@\the\pgf@intersect@solutions @time@a\endcsname=
- \pgf@intersect@time@a
- \else
- \let\pgf@intersect@time@a=\pgfutil@empty
- \fi%
- \let\pgf@intersect@time@b=\pgfutil@empty
- \pgf@intersection@store@properties{pgfpoint@g@intersect@solution@\the\pgf@intersect@solutions}%
- }%
- %
- }{}%
-}
+ \pgf@iflinesintersect{#1}{#2}{#3}{#4}%
+ {%
+ \pgfextract@process\pgf@intersect@solution@candidate{%
+ \pgfpointintersectionoflines{\pgfpoint@intersect@start@a}{\pgfpoint@intersect@end@a}%
+ {\pgfpoint@intersect@start@b}{\pgfpoint@intersect@end@b}%
+ }%
+ \pgf@ifsolution@duplicate{\pgf@intersect@solution@candidate}{%
+ % ah - we a duplicate. Apparently, we have a hit on an
+ % endpoint.
+ }{%
+ \global\advance\pgf@intersect@solutions by1\relax%
+ \expandafter\global\expandafter\let\csname pgfpoint@g@intersect@solution@\the\pgf@intersect@solutions\endcsname=\pgf@intersect@solution@candidate
+ \ifpgf@intersect@sort%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \pgf@process{\pgfpointdiff{\pgfpoint@intersect@start@a}{\pgfpoint@intersect@end@a}}%
+ \edef\pgf@marshal{%
+ \noexpand\pgfmathveclen@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@ya}}%
+ }%
+ \pgf@marshal%
+ \let\pgf@intersect@length@a=\pgfmathresult%
+ \pgf@process{\pgfpointdiff{\pgfpoint@intersect@start@a}{\pgfqpoint{\pgf@xc}{\pgf@yc}}}%
+ \edef\pgf@marshal{%
+ \noexpand\pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ }%
+ \pgf@marshal%
+ \pgfmathdivide@{\pgfmathresult}{\pgf@intersect@length@a}%
+ \pgf@x=\pgfmathresult pt\relax%
+ \advance\pgf@x by\pgf@intersect@time@offset pt\relax%
+ \edef\pgf@intersect@time@a{\pgfmath@tonumber{\pgf@x}}%
+ \expandafter\global\expandafter\let\csname pgf@g@intersect@solution@\the\pgf@intersect@solutions @time@a\endcsname=
+ \pgf@intersect@time@a
+ \else
+ \let\pgf@intersect@time@a=\pgfutil@empty
+ \fi%
+ \let\pgf@intersect@time@b=\pgfutil@empty
+ \pgf@intersection@store@properties{pgfpoint@g@intersect@solution@\the\pgf@intersect@solutions}%
+ }%
+ %
+ }{}%
+}%
% Test if two lines L1 and L2 intersect.
%
@@ -410,395 +410,395 @@
%
% t = |x4-x3 x3-x1| / |x4-x3 x2-x1|
% |y4-y3 y3-y1| |y4-y3 y2-y1|
-%
+%
% with 0<=s,t<=1
-%
+%
% s and t do not need to be calculated:
%
% Let s = A / C and t = B / C
-%
+%
% Then 0<=s<=1 if !(C=0) && ((A=0) || ((A>0) && !(C<A)) || ((A<0) && !(C>A)))
% 0<=t<=1 if !(C=0) && ((B=0) || ((B>0) && !(C<B)) || ((B<0) && !(C>B)))
-%
+%
\newif\ifpgf@s
\newif\ifpgf@t
\def\pgfiflinesintersect#1#2#3#4{%
- \begingroup%
- \pgf@iflinesintersect{\pgf@process{#1}}{\pgf@process{#2}}{\pgf@process{#3}}{\pgf@process{#4}}%
- {\aftergroup\pgfutil@firstoftwo}{\aftergroup\pgfutil@secondoftwo}%
- \endgroup%
-}
+ \begingroup%
+ \pgf@iflinesintersect{\pgf@process{#1}}{\pgf@process{#2}}{\pgf@process{#3}}{\pgf@process{#4}}%
+ {\aftergroup\pgfutil@firstoftwo}{\aftergroup\pgfutil@secondoftwo}%
+ \endgroup%
+}%
\def\pgf@iflinesintersect#1#2#3#4{%
- #4\relax%
- \pgf@xc=\pgf@x%
- \pgf@yc=\pgf@y%
- #3\relax%
- \advance\pgf@xc by-\pgf@x%
- \advance\pgf@yc by-\pgf@y%
- \pgf@xb=\pgf@x%
- \pgf@yb=\pgf@y%
- #2\relax%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- #1\relax%
- \advance\pgf@xa by-\pgf@x%
- \advance\pgf@ya by-\pgf@y%
- \advance\pgf@xb by-\pgf@x%
- \advance\pgf@yb by-\pgf@y%
- %
- % xc = x4-x3; yc=y4-y3;
- % xb = x3-x1; yb=y3-y1;
- % xa = x2-x1; ya=y2-y1;
- %
- %
- % Normalise a little. 16384 may not be a robust choice.
- %
- \c@pgf@counta=\pgf@xa\divide\c@pgf@counta by16384\relax%
- \c@pgf@countb=\pgf@xb\divide\c@pgf@countb by16384\relax%
- \c@pgf@countc=\pgf@ya\divide\c@pgf@countc by16384\relax%
- \c@pgf@countd=\pgf@yb\divide\c@pgf@countd by16384\relax%
- \multiply\c@pgf@counta by\c@pgf@countd%
- \multiply\c@pgf@countc by\c@pgf@countb%
- \advance\c@pgf@counta by-\c@pgf@countc%
- \pgfutil@tempcnta=\c@pgf@counta%
- %
- \c@pgf@counta=\pgf@xc\divide\c@pgf@counta by16384\relax%
- \c@pgf@countc=\pgf@yc\divide\c@pgf@countc by16384\relax%
- \multiply\c@pgf@countd by\c@pgf@counta%
- \multiply\c@pgf@countb by\c@pgf@countc%
- \advance\c@pgf@countd by-\c@pgf@countb%
- \pgfutil@tempcntb=\c@pgf@countd%
- %
- \c@pgf@countb=\pgf@xa\divide\c@pgf@countb by16384\relax%
- \c@pgf@countd=\pgf@ya\divide\c@pgf@countd by16384\relax%
- \multiply\c@pgf@counta by\c@pgf@countd%
- \multiply\c@pgf@countc by\c@pgf@countb%
- \advance\c@pgf@counta by-\c@pgf@countc%
- %
- \pgf@sfalse%
- \pgf@tfalse%
- \ifnum\c@pgf@counta=0\relax%
- \else%
- \ifnum\pgfutil@tempcnta=0\relax%
- \pgf@strue%
- \else%
- \ifnum\pgfutil@tempcnta>0\relax%
- \ifnum\c@pgf@counta<\pgfutil@tempcnta%
- \else%
- \pgf@strue%
- \fi%
- \else%
- \ifnum\c@pgf@counta>\pgfutil@tempcnta%
- \else%
- \pgf@strue%
- \fi%
- \fi%
- \fi%
- \ifnum\pgfutil@tempcntb=0\relax%
- \pgf@ttrue%
- \else%
- \ifnum\pgfutil@tempcntb>0\relax%
- \ifnum\c@pgf@counta<\pgfutil@tempcntb%
- \else%
- \pgf@ttrue%
- \fi%
- \else%
- \ifnum\c@pgf@counta>\pgfutil@tempcntb%
- \else%
- \pgf@ttrue%
- \fi%
- \fi%
- \fi%
- \fi%
- \let\pgf@intersect@next=\pgfutil@secondoftwo%
- \ifpgf@s%
- \ifpgf@t%
- \let\pgf@intersect@next=\pgfutil@firstoftwo%
- \fi%
- \fi%
- \pgf@intersect@next%
-}
+ #4\relax%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ #3\relax%
+ \advance\pgf@xc by-\pgf@x%
+ \advance\pgf@yc by-\pgf@y%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ #2\relax%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ #1\relax%
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ \advance\pgf@xb by-\pgf@x%
+ \advance\pgf@yb by-\pgf@y%
+ %
+ % xc = x4-x3; yc=y4-y3;
+ % xb = x3-x1; yb=y3-y1;
+ % xa = x2-x1; ya=y2-y1;
+ %
+ %
+ % Normalise a little. 16384 may not be a robust choice.
+ %
+ \c@pgf@counta=\pgf@xa\divide\c@pgf@counta by16384\relax%
+ \c@pgf@countb=\pgf@xb\divide\c@pgf@countb by16384\relax%
+ \c@pgf@countc=\pgf@ya\divide\c@pgf@countc by16384\relax%
+ \c@pgf@countd=\pgf@yb\divide\c@pgf@countd by16384\relax%
+ \multiply\c@pgf@counta by\c@pgf@countd%
+ \multiply\c@pgf@countc by\c@pgf@countb%
+ \advance\c@pgf@counta by-\c@pgf@countc%
+ \pgfutil@tempcnta=\c@pgf@counta%
+ %
+ \c@pgf@counta=\pgf@xc\divide\c@pgf@counta by16384\relax%
+ \c@pgf@countc=\pgf@yc\divide\c@pgf@countc by16384\relax%
+ \multiply\c@pgf@countd by\c@pgf@counta%
+ \multiply\c@pgf@countb by\c@pgf@countc%
+ \advance\c@pgf@countd by-\c@pgf@countb%
+ \pgfutil@tempcntb=\c@pgf@countd%
+ %
+ \c@pgf@countb=\pgf@xa\divide\c@pgf@countb by16384\relax%
+ \c@pgf@countd=\pgf@ya\divide\c@pgf@countd by16384\relax%
+ \multiply\c@pgf@counta by\c@pgf@countd%
+ \multiply\c@pgf@countc by\c@pgf@countb%
+ \advance\c@pgf@counta by-\c@pgf@countc%
+ %
+ \pgf@sfalse%
+ \pgf@tfalse%
+ \ifnum\c@pgf@counta=0\relax%
+ \else%
+ \ifnum\pgfutil@tempcnta=0\relax%
+ \pgf@strue%
+ \else%
+ \ifnum\pgfutil@tempcnta>0\relax%
+ \ifnum\c@pgf@counta<\pgfutil@tempcnta%
+ \else%
+ \pgf@strue%
+ \fi%
+ \else%
+ \ifnum\c@pgf@counta>\pgfutil@tempcnta%
+ \else%
+ \pgf@strue%
+ \fi%
+ \fi%
+ \fi%
+ \ifnum\pgfutil@tempcntb=0\relax%
+ \pgf@ttrue%
+ \else%
+ \ifnum\pgfutil@tempcntb>0\relax%
+ \ifnum\c@pgf@counta<\pgfutil@tempcntb%
+ \else%
+ \pgf@ttrue%
+ \fi%
+ \else%
+ \ifnum\c@pgf@counta>\pgfutil@tempcntb%
+ \else%
+ \pgf@ttrue%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \let\pgf@intersect@next=\pgfutil@secondoftwo%
+ \ifpgf@s%
+ \ifpgf@t%
+ \let\pgf@intersect@next=\pgfutil@firstoftwo%
+ \fi%
+ \fi%
+ \pgf@intersect@next%
+}%
\def\pgfintersectionoflineandcurve#1#2#3#4#5#6{%
- \pgf@intersect@solutions=0\relax%
- \pgf@intersectionoflineandcurve{#1}{#2}{#3}{#4}{#5}{#6}%
-}
+ \pgf@intersect@solutions=0\relax%
+ \pgf@intersectionoflineandcurve{#1}{#2}{#3}{#4}{#5}{#6}%
+}%
\def\pgf@intersectionoflineandcurve#1#2#3#4#5#6{%
- \pgf@intersectionofcurves%
- {\pgf@process{#1}}%
- {%
- \pgf@process{%
- \pgfpointadd{#1\relax\pgf@x=0.666666\pgf@x\pgf@y=0.666666\pgf@y}%
- {#2\relax\pgf@x=0.333333\pgf@x\pgf@y=0.333333\pgf@y}%
- }%
- }%
- {%
- \pgf@process{%
- \pgfpointadd{#1\relax\pgf@x=0.333333\pgf@x\pgf@y=0.333333\pgf@y}%
- {#2\relax\pgf@x=0.666666\pgf@x\pgf@y=0.666666\pgf@y}%
- }%
- }%
- {\pgf@process{#2}}%
- {\pgf@process{#3}}%
- {\pgf@process{#4}}%
- {\pgf@process{#5}}%
- {\pgf@process{#6}}%
+ \pgf@intersectionofcurves%
+ {\pgf@process{#1}}%
+ {%
+ \pgf@process{%
+ \pgfpointadd{#1\relax\pgf@x=0.666666\pgf@x\pgf@y=0.666666\pgf@y}%
+ {#2\relax\pgf@x=0.333333\pgf@x\pgf@y=0.333333\pgf@y}%
+ }%
+ }%
+ {%
+ \pgf@process{%
+ \pgfpointadd{#1\relax\pgf@x=0.333333\pgf@x\pgf@y=0.333333\pgf@y}%
+ {#2\relax\pgf@x=0.666666\pgf@x\pgf@y=0.666666\pgf@y}%
+ }%
+ }%
+ {\pgf@process{#2}}%
+ {\pgf@process{#3}}%
+ {\pgf@process{#4}}%
+ {\pgf@process{#5}}%
+ {\pgf@process{#6}}%
}%
\def\pgf@intersectionofcurveandline#1#2#3#4#5#6{%
- \pgf@intersectionofcurves%
- {\pgf@process{#1}}%
- {\pgf@process{#2}}%
- {\pgf@process{#3}}%
- {\pgf@process{#4}}%
- {\pgf@process{#5}}%
- {%
- \pgf@process{%
- \pgfpointadd{#5\relax\pgf@x=0.666666\pgf@x\pgf@y=0.666666\pgf@y}%
- {#6\relax\pgf@x=0.333333\pgf@x\pgf@y=0.333333\pgf@y}%
- }%
- }%
- {%
- \pgf@process{%
- \pgfpointadd{#5\relax\pgf@x=0.333333\pgf@x\pgf@y=0.333333\pgf@y}%
- {#6\relax\pgf@x=0.666666\pgf@x\pgf@y=0.666666\pgf@y}%
- }%
- }%
- {\pgf@process{#6}}%
+ \pgf@intersectionofcurves%
+ {\pgf@process{#1}}%
+ {\pgf@process{#2}}%
+ {\pgf@process{#3}}%
+ {\pgf@process{#4}}%
+ {\pgf@process{#5}}%
+ {%
+ \pgf@process{%
+ \pgfpointadd{#5\relax\pgf@x=0.666666\pgf@x\pgf@y=0.666666\pgf@y}%
+ {#6\relax\pgf@x=0.333333\pgf@x\pgf@y=0.333333\pgf@y}%
+ }%
+ }%
+ {%
+ \pgf@process{%
+ \pgfpointadd{#5\relax\pgf@x=0.333333\pgf@x\pgf@y=0.333333\pgf@y}%
+ {#6\relax\pgf@x=0.666666\pgf@x\pgf@y=0.666666\pgf@y}%
+ }%
+ }%
+ {\pgf@process{#6}}%
}%
-\def\pgfintersectiontolerance{0.1pt}
-\def\pgfintersectiontolerancefactor{0.1}
+\def\pgfintersectiontolerance{0.1pt}%
+\def\pgfintersectiontolerancefactor{0.1}%
% Find the intersections of two bezier curves.
-%
+%
% #1 - #4 = curve 1.
% #5 - #8 = curve 2.
% #9 = the solution number.
%
-% There is no guarantee of ordering of solutions. If there are
+% There is no guarantee of ordering of solutions. If there are
% no solutions, the origin is returned.
%
\def\pgfpointintersectionofcurves#1#2#3#4#5#6#7#8#9{%
- \pgf@intersect@solutions=0\relax%
- \pgf@intersectionofcurves%
- {\pgf@process{#1}}{\pgf@process{#2}}{\pgf@process{#3}}{\pgf@process{#4}}%
- {\pgf@process{#5}}{\pgf@process{#6}}{\pgf@process{#7}}{\pgf@process{#8}}%
- \pgfpointintersectionsolution{#9}%
-}
+ \pgf@intersect@solutions=0\relax%
+ \pgf@intersectionofcurves%
+ {\pgf@process{#1}}{\pgf@process{#2}}{\pgf@process{#3}}{\pgf@process{#4}}%
+ {\pgf@process{#5}}{\pgf@process{#6}}{\pgf@process{#7}}{\pgf@process{#8}}%
+ \pgfpointintersectionsolution{#9}%
+}%
% Return any intersection points of two curves C1 and C2.
% No order can be guaranteed for the solutions.
%
-% #1, #2, #3, #4 - the points on C1
+% #1, #2, #3, #4 - the points on C1
% #5, #6, #7, #8 - the points on C2
%
% Returns:
%
% \pgf@intersect@solutions - the number of solutions.
-% \pgfpointintersectionsolution{<S>} - the point for soultion S.
+% \pgfpointintersectionsolution{<S>} - the point for solution S.
%
% (Sort of) use:
%
-% intersection(C1,C2)
-% S = {};
-% intersection'(C1,C2);
-% return S;
-%
-% intersection'(C1,C2)
-% B1 = boundingbox(C1);
-% B2 = boundingbox(C2);
-% if intersect(B1,B2)
-% if (B1.width < q) and (B1.height < q) and
+% intersection(C1,C2)
+% S = {};
+% intersection'(C1,C2);
+% return S;
+%
+% intersection'(C1,C2)
+% B1 = boundingbox(C1);
+% B2 = boundingbox(C2);
+% if intersect(B1,B2)
+% if (B1.width < q) and (B1.height < q) and
% (B2.width < q) and (B2.height < q)
-% S = S + {average_of_all_points(B1,B2)}; \\ is there a better choice?
-% else
-% Q = subdivideLeft(C1);
-% R = subdivideRight(C1);
-% intersection'(C2,Q);
-% intersection'(C2,R);
+% S = S + {average_of_all_points(B1,B2)}; \\ is there a better choice?
+% else
+% Q = subdivideLeft(C1);
+% R = subdivideRight(C1);
+% intersection'(C2,Q);
+% intersection'(C2,R);
%
% where q is a small value (tolerance).
%
\def\pgfintersectionofcurves#1#2#3#4#5#6#7#8{%
- \pgf@intersect@solutions=0\relax%
- \pgf@intersectionofcurves%
- {\pgf@process{#1}}{\pgf@process{#2}}{\pgf@process{#3}}{\pgf@process{#4}}%
- {\pgf@process{#5}}{\pgf@process{#6}}{\pgf@process{#7}}{\pgf@process{#8}}%
+ \pgf@intersect@solutions=0\relax%
+ \pgf@intersectionofcurves%
+ {\pgf@process{#1}}{\pgf@process{#2}}{\pgf@process{#3}}{\pgf@process{#4}}%
+ {\pgf@process{#5}}{\pgf@process{#6}}{\pgf@process{#7}}{\pgf@process{#8}}%
}%
\def\pgf@intersectionofcurves#1#2#3#4#5#6#7#8{%
- \begingroup%
- \dimendef\pgf@time@a=2\relax%
- \dimendef\pgf@time@aa=4\relax%
- \dimendef\pgf@time@b=6\relax%
- \dimendef\pgf@time@bb=8\relax%
- \pgf@time@a=0pt\relax%
- \pgf@time@aa=1pt\relax%
- \pgf@time@b=0pt\relax%
- \pgf@time@bb=1pt\relax%
- \let\pgf@intersect@subdivide@curve=\pgf@intersect@subdivide@curve@b%
- \let\pgf@curve@subdivde@after=\pgf@@intersectionofcurves%
- \pgf@@intersectionofcurves{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
- \endgroup%
-}
+ \begingroup%
+ \dimendef\pgf@time@a=2\relax%
+ \dimendef\pgf@time@aa=4\relax%
+ \dimendef\pgf@time@b=6\relax%
+ \dimendef\pgf@time@bb=8\relax%
+ \pgf@time@a=0pt\relax%
+ \pgf@time@aa=1pt\relax%
+ \pgf@time@b=0pt\relax%
+ \pgf@time@bb=1pt\relax%
+ \let\pgf@intersect@subdivide@curve=\pgf@intersect@subdivide@curve@b%
+ \let\pgf@curve@subdivde@after=\pgf@@intersectionofcurves%
+ \pgf@@intersectionofcurves{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
+ \endgroup%
+}%
\def\pgf@@intersectionofcurves#1#2#3#4#5#6#7#8{%
- \pgf@intersect@boundingbox@reset%
- \pgf@intersect@boundingbox@update{#1}%
- \pgf@intersect@boundingbox@update{#2}%
- \pgf@intersect@boundingbox@update{#3}%
- \pgf@intersect@boundingbox@update{#4}%
- % (\pgf@xa, \pgf@ya) is lower-left
- % (\pgf@xb, \pgf@yb) is upper-right
- \edef\pgf@intersect@boundingbox@b{%
- \noexpand\pgf@x=\the\pgf@xa%
- \noexpand\pgf@y=\the\pgf@ya%
- \noexpand\pgf@xa=\the\pgf@xb%
- \noexpand\pgf@ya=\the\pgf@yb%
- }%
- \pgf@intersect@boundingbox@reset%
- \pgf@intersect@boundingbox@update{#5}%
- \pgf@intersect@boundingbox@update{#6}%
- \pgf@intersect@boundingbox@update{#7}%
- \pgf@intersect@boundingbox@update{#8}%
- \edef\pgf@intersect@boundingbox@a{%
- \noexpand\pgf@xb=\the\pgf@xa%
- \noexpand\pgf@yb=\the\pgf@ya%
- \noexpand\pgf@xc=\the\pgf@xb%
- \noexpand\pgf@yc=\the\pgf@yb%
- }%
- \pgf@intersect@boundingbox@a%
- \pgf@intersect@boundingbox@b%
- % check if the two bounding boxes overlap:
- \ifdim\pgf@xa<\pgf@xb%
- \else%
- \ifdim\pgf@x>\pgf@xc%
- \else%
- \ifdim\pgf@ya<\pgf@yb%
- \else%
- \ifdim\pgf@y>\pgf@yc%
- \else%
- % compute DIFFERENCE vectors:
- \advance\pgf@xc by-\pgf@xb%
- \advance\pgf@yc by-\pgf@yb%
- \advance\pgf@xa by-\pgf@x%
- \advance\pgf@ya by-\pgf@y%
- \let\pgf@intersect@subdivde=\relax%
- % check if both difference vectors are point wise
- % less than tolerance (i.e. |v|_infty < eps ).
- % That means that both bounding boxes are "small enough"
- \ifdim\pgf@xc<\pgfintersectiontolerance\relax%
- \ifdim\pgf@xa<\pgfintersectiontolerance\relax%
- \ifdim\pgf@yc<\pgfintersectiontolerance\relax%
- \ifdim\pgf@ya<\pgfintersectiontolerance\relax%
- \pgfextract@process\pgf@intersect@solution@candidate{%
- % set (x,y) = mean(the 4 points of the two bounding boxes):
- \pgf@intersect@boundingbox@a%
- \pgf@intersect@boundingbox@b%
- \pgf@x=0.25\pgf@x%
- \advance\pgf@x by0.25\pgf@xa%
- \advance\pgf@x by0.25\pgf@xb%
- \advance\pgf@x by0.25\pgf@xc%
- \pgf@y=0.25\pgf@y%
- \advance\pgf@y by0.25\pgf@ya%
- \advance\pgf@y by0.25\pgf@yb%
- \advance\pgf@y by0.25\pgf@yc%
- }%
- % We must avoid duplicate solutions.
- \let\pgf@intersect@subdivde=\pgf@stop%
- \pgf@ifsolution@duplicate\pgf@intersect@solution@candidate{}%
- {%
- \global\advance\pgf@intersect@solutions by1\relax%
- \begingroup
- \advance\pgf@time@a by\pgf@time@aa%
- \divide\pgf@time@a by2\relax%
- \advance\pgf@time@a by\pgf@intersect@time@offset pt\relax%
- \edef\pgf@intersect@time@a{\pgfmath@tonumber{\pgf@time@a}}%
- %
- \advance\pgf@time@b by\pgf@time@bb%
- \divide\pgf@time@b by2\relax%
- \advance\pgf@time@b by\pgf@intersect@time@offset@b pt\relax%
- \edef\pgf@intersect@time@b{\pgfmath@tonumber{\pgf@time@b}}%
- %
- \pgf@intersection@store@properties{pgfpoint@g@intersect@solution@\the\pgf@intersect@solutions}%
- \expandafter\global\expandafter\let%
- \csname pgfpoint@g@intersect@solution@\the\pgf@intersect@solutions\endcsname=%
- \pgf@intersect@solution@candidate%
- \ifpgf@intersect@sort%
- \expandafter\xdef%
- \csname pgf@g@intersect@solution@\the\pgf@intersect@solutions @time@a\endcsname%
- {\pgf@intersect@time@a}%
- \fi%
- \endgroup
- }%
- \fi%
- \fi%
- \fi%
- \fi%
- \ifx\pgf@intersect@subdivde\pgf@stop%
- \else%
- \pgf@intersect@subdivide@curve{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
-}
+ \pgf@intersect@boundingbox@reset%
+ \pgf@intersect@boundingbox@update{#1}%
+ \pgf@intersect@boundingbox@update{#2}%
+ \pgf@intersect@boundingbox@update{#3}%
+ \pgf@intersect@boundingbox@update{#4}%
+ % (\pgf@xa, \pgf@ya) is lower-left
+ % (\pgf@xb, \pgf@yb) is upper-right
+ \edef\pgf@intersect@boundingbox@b{%
+ \noexpand\pgf@x=\the\pgf@xa%
+ \noexpand\pgf@y=\the\pgf@ya%
+ \noexpand\pgf@xa=\the\pgf@xb%
+ \noexpand\pgf@ya=\the\pgf@yb%
+ }%
+ \pgf@intersect@boundingbox@reset%
+ \pgf@intersect@boundingbox@update{#5}%
+ \pgf@intersect@boundingbox@update{#6}%
+ \pgf@intersect@boundingbox@update{#7}%
+ \pgf@intersect@boundingbox@update{#8}%
+ \edef\pgf@intersect@boundingbox@a{%
+ \noexpand\pgf@xb=\the\pgf@xa%
+ \noexpand\pgf@yb=\the\pgf@ya%
+ \noexpand\pgf@xc=\the\pgf@xb%
+ \noexpand\pgf@yc=\the\pgf@yb%
+ }%
+ \pgf@intersect@boundingbox@a%
+ \pgf@intersect@boundingbox@b%
+ % check if the two bounding boxes overlap:
+ \ifdim\pgf@xa<\pgf@xb%
+ \else%
+ \ifdim\pgf@x>\pgf@xc%
+ \else%
+ \ifdim\pgf@ya<\pgf@yb%
+ \else%
+ \ifdim\pgf@y>\pgf@yc%
+ \else%
+ % compute DIFFERENCE vectors:
+ \advance\pgf@xc by-\pgf@xb%
+ \advance\pgf@yc by-\pgf@yb%
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ \let\pgf@intersect@subdivde=\relax%
+ % check if both difference vectors are point wise
+ % less than tolerance (i.e. |v|_infty < eps ).
+ % That means that both bounding boxes are "small enough"
+ \ifdim\pgf@xc<\pgfintersectiontolerance\relax%
+ \ifdim\pgf@xa<\pgfintersectiontolerance\relax%
+ \ifdim\pgf@yc<\pgfintersectiontolerance\relax%
+ \ifdim\pgf@ya<\pgfintersectiontolerance\relax%
+ \pgfextract@process\pgf@intersect@solution@candidate{%
+ % set (x,y) = mean(the 4 points of the two bounding boxes):
+ \pgf@intersect@boundingbox@a%
+ \pgf@intersect@boundingbox@b%
+ \pgf@x=0.25\pgf@x%
+ \advance\pgf@x by0.25\pgf@xa%
+ \advance\pgf@x by0.25\pgf@xb%
+ \advance\pgf@x by0.25\pgf@xc%
+ \pgf@y=0.25\pgf@y%
+ \advance\pgf@y by0.25\pgf@ya%
+ \advance\pgf@y by0.25\pgf@yb%
+ \advance\pgf@y by0.25\pgf@yc%
+ }%
+ % We must avoid duplicate solutions.
+ \let\pgf@intersect@subdivde=\pgf@stop%
+ \pgf@ifsolution@duplicate\pgf@intersect@solution@candidate{}%
+ {%
+ \global\advance\pgf@intersect@solutions by1\relax%
+ \begingroup
+ \advance\pgf@time@a by\pgf@time@aa%
+ \divide\pgf@time@a by2\relax%
+ \advance\pgf@time@a by\pgf@intersect@time@offset pt\relax%
+ \edef\pgf@intersect@time@a{\pgfmath@tonumber{\pgf@time@a}}%
+ %
+ \advance\pgf@time@b by\pgf@time@bb%
+ \divide\pgf@time@b by2\relax%
+ \advance\pgf@time@b by\pgf@intersect@time@offset@b pt\relax%
+ \edef\pgf@intersect@time@b{\pgfmath@tonumber{\pgf@time@b}}%
+ %
+ \pgf@intersection@store@properties{pgfpoint@g@intersect@solution@\the\pgf@intersect@solutions}%
+ \expandafter\global\expandafter\let%
+ \csname pgfpoint@g@intersect@solution@\the\pgf@intersect@solutions\endcsname=%
+ \pgf@intersect@solution@candidate%
+ \ifpgf@intersect@sort%
+ \expandafter\xdef%
+ \csname pgf@g@intersect@solution@\the\pgf@intersect@solutions @time@a\endcsname%
+ {\pgf@intersect@time@a}%
+ \fi%
+ \endgroup
+ }%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \ifx\pgf@intersect@subdivde\pgf@stop%
+ \else%
+ \pgf@intersect@subdivide@curve{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+}%
\def\pgf@intersect@subdivide@curve@b#1#2#3#4#5#6#7#8{%
- \begingroup%
- \advance\pgf@time@bb by\pgf@time@b\relax%
- \divide\pgf@time@bb by2\relax%
- \let\pgf@intersect@subdivide@curve=\pgf@intersect@subdivide@curve@a%
- \pgf@curve@subdivide@left{#5}{#6}{#7}{#8}{#1}{#2}{#3}{#4}%
- \endgroup%
- \begingroup%
- \advance\pgf@time@b by\pgf@time@bb\relax%
- \divide\pgf@time@b by2\relax%
- \let\pgf@intersect@subdivide@curve=\pgf@intersect@subdivide@curve@a%
- \pgf@curve@subdivide@right{#5}{#6}{#7}{#8}{#1}{#2}{#3}{#4}%
- \endgroup%
-}
+ \begingroup%
+ \advance\pgf@time@bb by\pgf@time@b\relax%
+ \divide\pgf@time@bb by2\relax%
+ \let\pgf@intersect@subdivide@curve=\pgf@intersect@subdivide@curve@a%
+ \pgf@curve@subdivide@left{#5}{#6}{#7}{#8}{#1}{#2}{#3}{#4}%
+ \endgroup%
+ \begingroup%
+ \advance\pgf@time@b by\pgf@time@bb\relax%
+ \divide\pgf@time@b by2\relax%
+ \let\pgf@intersect@subdivide@curve=\pgf@intersect@subdivide@curve@a%
+ \pgf@curve@subdivide@right{#5}{#6}{#7}{#8}{#1}{#2}{#3}{#4}%
+ \endgroup%
+}%
\def\pgf@intersect@subdivide@curve@a#1#2#3#4#5#6#7#8{%
- \begingroup%
- \advance\pgf@time@aa by\pgf@time@a\relax%
- \divide\pgf@time@aa by2\relax%
- \let\pgf@intersect@subdivide@curve=\pgf@intersect@subdivide@curve@b%
- \pgf@curve@subdivide@left{#5}{#6}{#7}{#8}{#1}{#2}{#3}{#4}%
- \endgroup%
- \begingroup%
- \advance\pgf@time@a by\pgf@time@aa\relax%
- \divide\pgf@time@a by2\relax%
- \let\pgf@intersect@subdivide@curve=\pgf@intersect@subdivide@curve@b%
- \pgf@curve@subdivide@right{#5}{#6}{#7}{#8}{#1}{#2}{#3}{#4}%
- \endgroup%
-}
+ \begingroup%
+ \advance\pgf@time@aa by\pgf@time@a\relax%
+ \divide\pgf@time@aa by2\relax%
+ \let\pgf@intersect@subdivide@curve=\pgf@intersect@subdivide@curve@b%
+ \pgf@curve@subdivide@left{#5}{#6}{#7}{#8}{#1}{#2}{#3}{#4}%
+ \endgroup%
+ \begingroup%
+ \advance\pgf@time@a by\pgf@time@aa\relax%
+ \divide\pgf@time@a by2\relax%
+ \let\pgf@intersect@subdivide@curve=\pgf@intersect@subdivide@curve@b%
+ \pgf@curve@subdivide@right{#5}{#6}{#7}{#8}{#1}{#2}{#3}{#4}%
+ \endgroup%
+}%
\def\pgf@intersect@boundingbox@reset{%
- \pgf@xa=16000pt\relax%
- \pgf@ya=16000pt\relax%
- \pgf@xb=-16000pt\relax%
- \pgf@yb=-16000pt\relax%
-}
+ \pgf@xa=16000pt\relax%
+ \pgf@ya=16000pt\relax%
+ \pgf@xb=-16000pt\relax%
+ \pgf@yb=-16000pt\relax%
+}%
\def\pgf@intersect@boundingbox@update#1{%
- #1\relax%
- \ifdim\pgf@x<\pgf@xa\pgf@xa=\pgf@x\fi%
- \ifdim\pgf@y<\pgf@ya\pgf@ya=\pgf@y\fi%
- \ifdim\pgf@x>\pgf@xb\pgf@xb=\pgf@x\fi%
- \ifdim\pgf@y>\pgf@yb\pgf@yb=\pgf@y\fi%
-}
+ #1\relax%
+ \ifdim\pgf@x<\pgf@xa\pgf@xa=\pgf@x\fi%
+ \ifdim\pgf@y<\pgf@ya\pgf@ya=\pgf@y\fi%
+ \ifdim\pgf@x>\pgf@xb\pgf@xb=\pgf@x\fi%
+ \ifdim\pgf@y>\pgf@yb\pgf@yb=\pgf@y\fi%
+}%
% The following subroutines are part of a conversion from pgfbasic
% math to FPU. This transition is necessary due to the restricted
@@ -810,114 +810,114 @@
% The following routines constitute the "adapter":
\def\pgf@float@adapter@setxy{%
- \pgfmathfloatparsenumber{\pgf@sys@tonumber\pgf@x}\let\pgf@fpu@x=\pgfmathresult
- \pgfmathfloatparsenumber{\pgf@sys@tonumber\pgf@y}\let\pgf@fpu@y=\pgfmathresult
+ \pgfmathfloatparsenumber{\pgf@sys@tonumber\pgf@x}\let\pgf@fpu@x=\pgfmathresult
+ \pgfmathfloatparsenumber{\pgf@sys@tonumber\pgf@y}\let\pgf@fpu@y=\pgfmathresult
}%
\def\pgf@float@adapter@mult#1=#2*#3{%
- \pgfmathfloatmultiplyfixed@{#3}{#2}%
- \let#1=\pgfmathresult
+ \pgfmathfloatmultiplyfixed@{#3}{#2}%
+ \let#1=\pgfmathresult
}%
\def\pgf@float@adapter@advance#1by#2*#3{%
- \pgfmathfloatmultiplyfixed@{#3}{#2}%
- \let\pgfutil@temp=\pgfmathresult
- \pgfmathfloatadd@{#1}{\pgfutil@temp}%
- \let#1=\pgfmathresult
+ \pgfmathfloatmultiplyfixed@{#3}{#2}%
+ \let\pgfutil@temp=\pgfmathresult
+ \pgfmathfloatadd@{#1}{\pgfutil@temp}%
+ \let#1=\pgfmathresult
}%
\def\pgf@float@adapter@tostring#1{%
- \pgfmathfloattofixed{#1}\edef#1{\pgfmathresult pt }%
+ \pgfmathfloattofixed{#1}\edef#1{\pgfmathresult pt }%
}%
\def\pgf@curve@subdivide@left#1#2#3#4{%
- %
- % The left curve (from t=0 to t=.5)
- %
- \begingroup
- #1\relax%
- \pgfutil@tempdima=\pgf@x%
- \pgfutil@tempdimb=\pgf@y%
- \pgf@float@adapter@setxy
- \pgf@float@adapter@mult\pgf@fpu@xa=.5*\pgf@fpu@x \pgf@float@adapter@mult\pgf@fpu@ya=.5*\pgf@fpu@y%
- \pgf@float@adapter@mult\pgf@fpu@xb=.25*\pgf@fpu@x \pgf@float@adapter@mult\pgf@fpu@yb=.25*\pgf@fpu@y%
- \pgf@float@adapter@mult\pgf@fpu@xc=.125*\pgf@fpu@x\pgf@float@adapter@mult\pgf@fpu@yc=.125*\pgf@fpu@y%
- #2\relax%
- \pgf@float@adapter@setxy
- \pgf@float@adapter@advance\pgf@fpu@xa by.5*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@ya by.5*\pgf@fpu@y%
- \pgf@float@adapter@advance\pgf@fpu@xb by.5*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yb by.5*\pgf@fpu@y%
- \pgf@float@adapter@advance\pgf@fpu@xc by.375*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yc by.375*\pgf@fpu@y%
- #3\relax%
- \pgf@float@adapter@setxy
- \pgf@float@adapter@advance\pgf@fpu@xb by.25*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yb by.25*\pgf@fpu@y%
- \pgf@float@adapter@advance\pgf@fpu@xc by.375*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yc by.375*\pgf@fpu@y%
- #4\relax%
- \pgf@float@adapter@setxy
- \pgf@float@adapter@advance\pgf@fpu@xc by.125*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yc by.125*\pgf@fpu@y%
- %
- \pgf@float@adapter@tostring\pgf@fpu@xa
- \pgf@float@adapter@tostring\pgf@fpu@ya
- \pgf@float@adapter@tostring\pgf@fpu@xb
- \pgf@float@adapter@tostring\pgf@fpu@yb
- \pgf@float@adapter@tostring\pgf@fpu@xc
- \pgf@float@adapter@tostring\pgf@fpu@yc
- \edef\pgf@marshal{%
- \noexpand\pgf@curve@subdivde@after%
- {\noexpand\pgf@x=\the\pgfutil@tempdima\noexpand\pgf@y=\the\pgfutil@tempdimb}%
- {\noexpand\pgf@x=\pgf@fpu@xa\noexpand\pgf@y=\pgf@fpu@ya}%
- {\noexpand\pgf@x=\pgf@fpu@xb\noexpand\pgf@y=\pgf@fpu@yb}
- {\noexpand\pgf@x=\pgf@fpu@xc\noexpand\pgf@y=\pgf@fpu@yc}%
- }%
- \expandafter
- \endgroup
- \pgf@marshal%
-}
+ %
+ % The left curve (from t=0 to t=.5)
+ %
+ \begingroup
+ #1\relax%
+ \pgfutil@tempdima=\pgf@x%
+ \pgfutil@tempdimb=\pgf@y%
+ \pgf@float@adapter@setxy
+ \pgf@float@adapter@mult\pgf@fpu@xa=.5*\pgf@fpu@x \pgf@float@adapter@mult\pgf@fpu@ya=.5*\pgf@fpu@y%
+ \pgf@float@adapter@mult\pgf@fpu@xb=.25*\pgf@fpu@x \pgf@float@adapter@mult\pgf@fpu@yb=.25*\pgf@fpu@y%
+ \pgf@float@adapter@mult\pgf@fpu@xc=.125*\pgf@fpu@x\pgf@float@adapter@mult\pgf@fpu@yc=.125*\pgf@fpu@y%
+ #2\relax%
+ \pgf@float@adapter@setxy
+ \pgf@float@adapter@advance\pgf@fpu@xa by.5*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@ya by.5*\pgf@fpu@y%
+ \pgf@float@adapter@advance\pgf@fpu@xb by.5*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yb by.5*\pgf@fpu@y%
+ \pgf@float@adapter@advance\pgf@fpu@xc by.375*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yc by.375*\pgf@fpu@y%
+ #3\relax%
+ \pgf@float@adapter@setxy
+ \pgf@float@adapter@advance\pgf@fpu@xb by.25*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yb by.25*\pgf@fpu@y%
+ \pgf@float@adapter@advance\pgf@fpu@xc by.375*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yc by.375*\pgf@fpu@y%
+ #4\relax%
+ \pgf@float@adapter@setxy
+ \pgf@float@adapter@advance\pgf@fpu@xc by.125*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yc by.125*\pgf@fpu@y%
+ %
+ \pgf@float@adapter@tostring\pgf@fpu@xa
+ \pgf@float@adapter@tostring\pgf@fpu@ya
+ \pgf@float@adapter@tostring\pgf@fpu@xb
+ \pgf@float@adapter@tostring\pgf@fpu@yb
+ \pgf@float@adapter@tostring\pgf@fpu@xc
+ \pgf@float@adapter@tostring\pgf@fpu@yc
+ \edef\pgf@marshal{%
+ \noexpand\pgf@curve@subdivde@after%
+ {\noexpand\pgf@x=\the\pgfutil@tempdima\noexpand\pgf@y=\the\pgfutil@tempdimb}%
+ {\noexpand\pgf@x=\pgf@fpu@xa\noexpand\pgf@y=\pgf@fpu@ya}%
+ {\noexpand\pgf@x=\pgf@fpu@xb\noexpand\pgf@y=\pgf@fpu@yb}
+ {\noexpand\pgf@x=\pgf@fpu@xc\noexpand\pgf@y=\pgf@fpu@yc}%
+ }%
+ \expandafter
+ \endgroup
+ \pgf@marshal%
+}%
\def\pgf@curve@subdivide@right#1#2#3#4{%
- %
- % The right curve (from t=0.5 to t=1)
- %
- \begingroup
- #1\relax%
- \pgf@float@adapter@setxy
- \pgf@float@adapter@mult\pgf@float@tmpa=.125*\pgf@fpu@x\pgf@float@adapter@mult\pgf@float@tmpb=.125*\pgf@fpu@y%
- #2\relax%
- \pgf@float@adapter@setxy
- \pgf@float@adapter@advance\pgf@float@tmpa by.375*\pgf@fpu@x\pgf@float@adapter@advance\pgf@float@tmpb by.375*\pgf@fpu@y%
- \pgf@float@adapter@mult\pgf@fpu@xa=.25*\pgf@fpu@x\pgf@float@adapter@mult\pgf@fpu@ya=.25*\pgf@fpu@y%
- #3\relax%
- \pgf@float@adapter@setxy
- \pgf@float@adapter@advance\pgf@float@tmpa by.375*\pgf@fpu@x\pgf@float@adapter@advance\pgf@float@tmpb by.375*\pgf@fpu@y%
- \pgf@float@adapter@advance\pgf@fpu@xa by.5*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@ya by.5*\pgf@fpu@y%
- \pgf@float@adapter@mult\pgf@fpu@xb=.5*\pgf@fpu@x\pgf@float@adapter@mult\pgf@fpu@yb=.5*\pgf@fpu@y%
- #4\relax%
- \pgf@float@adapter@setxy
- \pgf@float@adapter@advance\pgf@float@tmpa by.125*\pgf@fpu@x\pgf@float@adapter@advance\pgf@float@tmpb by.125*\pgf@fpu@y%
- \pgf@float@adapter@advance\pgf@fpu@xa by.25*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@ya by.25*\pgf@fpu@y%
- \pgf@float@adapter@advance\pgf@fpu@xb by.5*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yb by.5*\pgf@fpu@y%
- \let\pgf@fpu@xc=\pgf@fpu@x\let\pgf@fpu@yc=\pgf@fpu@y%
- %
- \pgf@float@adapter@tostring\pgf@float@tmpa
- \pgf@float@adapter@tostring\pgf@float@tmpb
- \pgf@float@adapter@tostring\pgf@fpu@xa
- \pgf@float@adapter@tostring\pgf@fpu@ya
- \pgf@float@adapter@tostring\pgf@fpu@xb
- \pgf@float@adapter@tostring\pgf@fpu@yb
- \pgf@float@adapter@tostring\pgf@fpu@xc
- \pgf@float@adapter@tostring\pgf@fpu@yc
- \edef\pgf@marshal{%
- \noexpand\pgf@curve@subdivde@after%
- {\noexpand\pgf@x=\pgf@float@tmpa\noexpand\pgf@y=\pgf@float@tmpb}%
- {\noexpand\pgf@x=\pgf@fpu@xa\noexpand\pgf@y=\pgf@fpu@ya}
- {\noexpand\pgf@x=\pgf@fpu@xb\noexpand\pgf@y=\pgf@fpu@yb}
- {\noexpand\pgf@x=\pgf@fpu@xc\noexpand\pgf@y=\pgf@fpu@yc}%
- }%
- \expandafter
- \endgroup
- \pgf@marshal%
-}
+ %
+ % The right curve (from t=0.5 to t=1)
+ %
+ \begingroup
+ #1\relax%
+ \pgf@float@adapter@setxy
+ \pgf@float@adapter@mult\pgf@float@tmpa=.125*\pgf@fpu@x\pgf@float@adapter@mult\pgf@float@tmpb=.125*\pgf@fpu@y%
+ #2\relax%
+ \pgf@float@adapter@setxy
+ \pgf@float@adapter@advance\pgf@float@tmpa by.375*\pgf@fpu@x\pgf@float@adapter@advance\pgf@float@tmpb by.375*\pgf@fpu@y%
+ \pgf@float@adapter@mult\pgf@fpu@xa=.25*\pgf@fpu@x\pgf@float@adapter@mult\pgf@fpu@ya=.25*\pgf@fpu@y%
+ #3\relax%
+ \pgf@float@adapter@setxy
+ \pgf@float@adapter@advance\pgf@float@tmpa by.375*\pgf@fpu@x\pgf@float@adapter@advance\pgf@float@tmpb by.375*\pgf@fpu@y%
+ \pgf@float@adapter@advance\pgf@fpu@xa by.5*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@ya by.5*\pgf@fpu@y%
+ \pgf@float@adapter@mult\pgf@fpu@xb=.5*\pgf@fpu@x\pgf@float@adapter@mult\pgf@fpu@yb=.5*\pgf@fpu@y%
+ #4\relax%
+ \pgf@float@adapter@setxy
+ \pgf@float@adapter@advance\pgf@float@tmpa by.125*\pgf@fpu@x\pgf@float@adapter@advance\pgf@float@tmpb by.125*\pgf@fpu@y%
+ \pgf@float@adapter@advance\pgf@fpu@xa by.25*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@ya by.25*\pgf@fpu@y%
+ \pgf@float@adapter@advance\pgf@fpu@xb by.5*\pgf@fpu@x\pgf@float@adapter@advance\pgf@fpu@yb by.5*\pgf@fpu@y%
+ \let\pgf@fpu@xc=\pgf@fpu@x\let\pgf@fpu@yc=\pgf@fpu@y%
+ %
+ \pgf@float@adapter@tostring\pgf@float@tmpa
+ \pgf@float@adapter@tostring\pgf@float@tmpb
+ \pgf@float@adapter@tostring\pgf@fpu@xa
+ \pgf@float@adapter@tostring\pgf@fpu@ya
+ \pgf@float@adapter@tostring\pgf@fpu@xb
+ \pgf@float@adapter@tostring\pgf@fpu@yb
+ \pgf@float@adapter@tostring\pgf@fpu@xc
+ \pgf@float@adapter@tostring\pgf@fpu@yc
+ \edef\pgf@marshal{%
+ \noexpand\pgf@curve@subdivde@after%
+ {\noexpand\pgf@x=\pgf@float@tmpa\noexpand\pgf@y=\pgf@float@tmpb}%
+ {\noexpand\pgf@x=\pgf@fpu@xa\noexpand\pgf@y=\pgf@fpu@ya}
+ {\noexpand\pgf@x=\pgf@fpu@xb\noexpand\pgf@y=\pgf@fpu@yb}
+ {\noexpand\pgf@x=\pgf@fpu@xc\noexpand\pgf@y=\pgf@fpu@yc}%
+ }%
+ \expandafter
+ \endgroup
+ \pgf@marshal%
+}%
% A solution S1 is considered a duplicate of S2, if
-%
+%
% |x1 - x2|f < q and |y1 - y2|f < q
%
% where q is a small value (tolerance).
@@ -925,32 +925,32 @@
% #1 - the solution.
%
\def\pgf@ifsolution@duplicate#1{%
- #1%
- \pgf@xa=\pgf@x%
- \pgf@ya=\pgf@y%
- \let\pgf@intersect@next=\pgfutil@secondoftwo%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\pgf@intersect@solutions\relax%
- \else%
- \pgf@ifsolution@duplicate@{\pgfmathcounter}%
- \repeatpgfmathloop%
- \pgf@intersect@next%
-}
+ #1%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \let\pgf@intersect@next=\pgfutil@secondoftwo%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@intersect@solutions\relax%
+ \else%
+ \pgf@ifsolution@duplicate@{\pgfmathcounter}%
+ \repeatpgfmathloop%
+ \pgf@intersect@next%
+}%
\def\pgf@ifsolution@duplicate@#1{%
- \pgf@process{\csname pgfpoint@g@intersect@solution@#1\endcsname}%
- \advance\pgf@x by-\pgf@xa%
- \advance\pgf@y by-\pgf@ya%
- \ifdim\pgf@x<0pt\relax\pgf@x=-\pgf@x\fi%
- \ifdim\pgf@y<0pt\relax\pgf@y=-\pgf@y\fi%
- %
- \pgf@x=\pgfintersectiontolerancefactor\pgf@x%
- \pgf@y=\pgfintersectiontolerancefactor\pgf@y%
- \ifdim\pgf@x<\pgfintersectiontolerance\relax%
- \ifdim\pgf@y<\pgfintersectiontolerance\relax%
- \let\pgf@intersect@next=\pgfutil@firstoftwo%
- \fi%
- \fi%
+ \pgf@process{\csname pgfpoint@g@intersect@solution@#1\endcsname}%
+ \advance\pgf@x by-\pgf@xa%
+ \advance\pgf@y by-\pgf@ya%
+ \ifdim\pgf@x<0pt\relax\pgf@x=-\pgf@x\fi%
+ \ifdim\pgf@y<0pt\relax\pgf@y=-\pgf@y\fi%
+ %
+ \pgf@x=\pgfintersectiontolerancefactor\pgf@x%
+ \pgf@y=\pgfintersectiontolerancefactor\pgf@y%
+ \ifdim\pgf@x<\pgfintersectiontolerance\relax%
+ \ifdim\pgf@y<\pgfintersectiontolerance\relax%
+ \let\pgf@intersect@next=\pgfutil@firstoftwo%
+ \fi%
+ \fi%
}%
\newif\ifpgf@intersect@solutions@sortfinish
@@ -958,35 +958,35 @@
% Sort solutions according to their time index.
%
\def\pgfintersectionsolutionsortbytime{%
- \pgf@intersect@solutions@sortfinishtrue%
- \pgfmathloop%
- \ifnum\pgfmathcounter<\pgfintersectionsolutions\relax%
- \pgfutil@tempcnta=\pgfmathcounter%
- \advance\pgfutil@tempcnta by1\relax%
- \ifdim\csname pgf@intersect@solution@\pgfmathcounter @time@a\endcsname pt>%
- \csname pgf@intersect@solution@\the\pgfutil@tempcnta @time@a\endcsname pt\relax%
- \pgf@intersect@solutions@sortfinishfalse%
- %
- \pgfintersectionsolutionsortbytime@swap{pgfpoint@intersect@solution@\pgfmathcounter}%
- {pgfpoint@intersect@solution@\the\pgfutil@tempcnta}%
- %
- \pgfintersectionsolutionsortbytime@swap{pgf@intersect@solution@\pgfmathcounter @time@a}%
- {pgf@intersect@solution@\the\pgfutil@tempcnta @time@a}%
- %
- \pgfintersectionsolutionsortbytime@swap{pgf@intersect@solution@props@\pgfmathcounter}%
- {pgf@intersect@solution@props@\the\pgfutil@tempcnta}%
- \fi%
- \repeatpgfmathloop%
- \ifpgf@intersect@solutions@sortfinish%
- \else%
- \expandafter\pgfintersectionsolutionsortbytime%
- \fi%
-}
+ \pgf@intersect@solutions@sortfinishtrue%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter<\pgfintersectionsolutions\relax%
+ \pgfutil@tempcnta=\pgfmathcounter%
+ \advance\pgfutil@tempcnta by1\relax%
+ \ifdim\csname pgf@intersect@solution@\pgfmathcounter @time@a\endcsname pt>%
+ \csname pgf@intersect@solution@\the\pgfutil@tempcnta @time@a\endcsname pt\relax%
+ \pgf@intersect@solutions@sortfinishfalse%
+ %
+ \pgfintersectionsolutionsortbytime@swap{pgfpoint@intersect@solution@\pgfmathcounter}%
+ {pgfpoint@intersect@solution@\the\pgfutil@tempcnta}%
+ %
+ \pgfintersectionsolutionsortbytime@swap{pgf@intersect@solution@\pgfmathcounter @time@a}%
+ {pgf@intersect@solution@\the\pgfutil@tempcnta @time@a}%
+ %
+ \pgfintersectionsolutionsortbytime@swap{pgf@intersect@solution@props@\pgfmathcounter}%
+ {pgf@intersect@solution@props@\the\pgfutil@tempcnta}%
+ \fi%
+ \repeatpgfmathloop%
+ \ifpgf@intersect@solutions@sortfinish%
+ \else%
+ \expandafter\pgfintersectionsolutionsortbytime%
+ \fi%
+}%
\def\pgfintersectionsolutionsortbytime@swap#1#2{%
- \pgfutil@namelet{pgf@intersect@temp}{#1}%
- \pgfutil@namelet{#1}{#2}%
- \pgfutil@namelet{#2}{pgf@intersect@temp}%
+ \pgfutil@namelet{pgf@intersect@temp}{#1}%
+ \pgfutil@namelet{#1}{#2}%
+ \pgfutil@namelet{#2}{pgf@intersect@temp}%
}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarylindenmayersystems.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarylindenmayersystems.code.tex
index ab6a067835e..bec0c855cda 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarylindenmayersystems.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarylindenmayersystems.code.tex
@@ -14,210 +14,216 @@
\newif\ifpgf@lsystem@randomize@angle
\pgfkeys{/pgf/lindenmayer system/.cd,%
- step/.code={\pgfmathsetlength\pgflsystemstep{#1}},%
- randomize step percent/.code={%
- \pgfmathparse{#1}%
- \let\pgflsystemrandomizesteppercent=\pgfmathresult%
- \ifdim\pgfmathresult pt=0pt\relax%
- \pgf@lsystem@randomize@stepfalse%
- \else%
- \pgf@lsystem@randomize@steptrue%
- \fi%
- },%
- left angle/.code={\pgfmathparse{#1}\let\pgflsystemleftangle=\pgfmathresult},%
- right angle/.code={\pgfmathparse{#1}\let\pgflsystemrightangle=\pgfmathresult},%
- angle/.style={/pgf/lindenmayer system/left angle=#1, /pgf/lindenmayer system/right angle=#1},%
- randomize angle percent/.code={%
- \pgfmathparse{#1}%
- \let\pgflsystemrandomizeanglepercent=\pgfmathresult%
- \ifdim\pgfmathresult pt=0pt\relax%
- \pgf@lsystem@randomize@anglefalse%
- \else%
- \pgf@lsystem@randomize@angletrue%
- \fi%
- }%
-}
+ step/.code={\pgfmathsetlength\pgflsystemstep{#1}},%
+ randomize step percent/.code={%
+ \pgfmathparse{#1}%
+ \let\pgflsystemrandomizesteppercent=\pgfmathresult%
+ \ifdim\pgfmathresult pt=0pt\relax%
+ \pgf@lsystem@randomize@stepfalse%
+ \else%
+ \pgf@lsystem@randomize@steptrue%
+ \fi%
+ },%
+ left angle/.code={\pgfmathparse{#1}\let\pgflsystemleftangle=\pgfmathresult},%
+ right angle/.code={\pgfmathparse{#1}\let\pgflsystemrightangle=\pgfmathresult},%
+ angle/.style={/pgf/lindenmayer system/left angle=#1, /pgf/lindenmayer system/right angle=#1},%
+ randomize angle percent/.code={%
+ \pgfmathparse{#1}%
+ \let\pgflsystemrandomizeanglepercent=\pgfmathresult%
+ \ifdim\pgfmathresult pt=0pt\relax%
+ \pgf@lsystem@randomize@anglefalse%
+ \else%
+ \pgf@lsystem@randomize@angletrue%
+ \fi%
+ }%
+}%
\pgfkeys{/pgf/lindenmayer system/.cd,
- step=5pt,%
- randomize step percent=0,%
- angle=90,%
- randomize angle percent=0%
-}
+ step=5pt,%
+ randomize step percent=0,%
+ angle=90,%
+ randomize angle percent=0%
+}%
\long\def\pgfdeclarelindenmayersystem#1#2{%
- \pgfutil@ifundefined{pgf@lsystem@#1}%
- {%
- \begingroup%
- \edef\pgf@lsystem@name{#1}%
- \expandafter\global\expandafter\let\csname pgf@lsystem@#1\endcsname=\pgf@lsystem@name%
- \let\symbol=\pgf@lsystem@symbol%
- \let\rule=\pgf@lsystem@rule%
- #2%
- \endgroup%
- }%
- {\pgferror{Lindenmayer system `#1' is already defined}}%
-}
+ \pgfutil@ifundefined{pgf@lsystem@#1}%
+ {%
+ \begingroup%
+ \edef\pgf@lsystem@name{#1}%
+ \expandafter\global\expandafter\let\csname pgf@lsystem@#1\endcsname=\pgf@lsystem@name%
+ \let\symbol=\pgf@lsystem@symbol%
+ \let\rule=\pgf@lsystem@rule%
+ #2%
+ \endgroup%
+ }%
+ {\pgferror{Lindenmayer system `#1' is already defined}}%
+}%
\def\pgf@lsystem@symbol#1#2{%
- \expandafter\gdef\csname pgf@lsystem@\pgf@lsystem@name @symbol@#1\endcsname{#2}%
-}
+ \expandafter\gdef\csname pgf@lsystem@\pgf@lsystem@name @symbol@#1\endcsname{#2}%
+}%
-\def\pgf@lsystem@rule#1{\expandafter\pgf@lsystem@rule@#1\pgf@stop}
-\def\pgf@lsystem@rule@#1{\def\pgf@lsystem@rule@head{#1}\pgf@lsystem@rule@@}
+\def\pgf@lsystem@rule#1{\expandafter\pgf@lsystem@rule@#1\pgf@stop}%
+\def\pgf@lsystem@rule@#1{\def\pgf@lsystem@rule@head{#1}\pgf@lsystem@rule@@}%
\def\pgf@lsystem@rule@@#1->{% Now some `fooling around' to deal with unwanted spaces.
- \let\pgf@lsystem@rule@body=\pgfutil@empty%
- \pgfutil@ifnextchar x{\pgf@lsystem@rule@@@}{\pgf@lsystem@rule@@@}}
+ \let\pgf@lsystem@rule@body=\pgfutil@empty%
+ \pgfutil@ifnextchar x{\pgf@lsystem@rule@@@}{\pgf@lsystem@rule@@@}}%
\def\pgf@lsystem@rule@@@#1{%
- \ifx#1\pgf@stop%
- \expandafter\global\expandafter\let%
- \csname pgf@lsystem@\pgf@lsystem@name @rule@\pgf@lsystem@rule@head\endcsname=\pgf@lsystem@rule@body%
- \else%
- \edef\pgf@lsystem@rule@body{\pgf@lsystem@rule@body#1}%
- \expandafter\pgf@lsystem@rule@@@%
- \fi%
-}
+ \ifx#1\pgf@stop%
+ \expandafter\global\expandafter\let%
+ \csname pgf@lsystem@\pgf@lsystem@name @rule@\pgf@lsystem@rule@head\endcsname=\pgf@lsystem@rule@body%
+ \else%
+ \edef\pgf@lsystem@rule@body{\pgf@lsystem@rule@body#1}%
+ \expandafter\pgf@lsystem@rule@@@%
+ \fi%
+}%
\def\pgflindenmayersystem#1#2#3{%
- \begingroup%
- \edef\pgf@lsystem@name{#1}%
- \edef\pgf@lsystem@axiom{#2}%
- \pgfmathtruncatemacro\pgf@lsystem@order{#3}%
- %
- \let\pgf@lsystem@current@symbol=\relax%
- %
- \c@pgf@lsystem@iteration=0\relax%
- %
- \ifnum\pgf@lsystem@order=0\relax%
- \expandafter\pgf@lsystem@draw\pgf@lsystem@axiom\pgf@stop
- \let\pgf@lsystem@next=\pgf@lsystem@end%
- \else%
- \let\pgf@lsystem@next=\pgf@lsystem@run%
- \fi%
- \expandafter\pgf@lsystem@next\pgf@lsystem@axiom\pgf@lsystem@stop%
-}
+ \begingroup%
+ \edef\pgf@lsystem@name{#1}%
+ \edef\pgf@lsystem@axiom{#2}%
+ \pgfmathtruncatemacro\pgf@lsystem@order{#3}%
+ %
+ \let\pgf@lsystem@current@symbol=\relax%
+ %
+ \c@pgf@lsystem@iteration=0\relax%
+ %
+ \ifnum\pgf@lsystem@order=0\relax%
+ \expandafter\pgf@lsystem@draw\pgf@lsystem@axiom\pgf@stop
+ \let\pgf@lsystem@next=\pgf@lsystem@end%
+ \else%
+ \let\pgf@lsystem@next=\pgf@lsystem@run%
+ \fi%
+ \expandafter\pgf@lsystem@next\pgf@lsystem@axiom\pgf@lsystem@stop%
+}%
\def\pgf@lsystem@run#1{%
- \ifx#1\pgf@lsystem@stop%
- \def\pgf@lsystem@token{\pgf@lsystem@stop}%
- \let\pgf@lsystem@next=\pgf@lsystem@end%
- \else%
- \ifx#1\pgf@stop%
- \advance\c@pgf@lsystem@iteration by-1\relax%
- \let\pgf@system@token=\pgfutil@empty%
- \let\pgf@lsystem@next=\pgf@lsystem@run%
- \else%
- % Does #1 appear on the RHS of a rule...?
- \expandafter\let\expandafter\pgf@lsystem@token\expandafter=%
- \csname pgf@lsystem@\pgf@lsystem@name @rule@#1\endcsname%
- \ifx\pgf@lsystem@token\relax%
- % ...nope. So draw it straight away.
- \pgf@lsystem@draw#1\pgf@stop%
- \let\pgf@lsystem@token=\pgfutil@empty%
- \else%
- % ...yep. So, if the order has been reached draw the LHS
- % immediately. Otherwise add the LHS to the token stream
- % and continue.
- \advance\c@pgf@lsystem@iteration by1\relax%
- \ifnum\c@pgf@lsystem@iteration=\pgf@lsystem@order%
- \expandafter\pgf@lsystem@draw\pgf@lsystem@token \pgf@stop%
- \advance\c@pgf@lsystem@iteration by-1\relax%
- \let\pgf@lsystem@token=\pgfutil@empty%
- \else%
- \expandafter\def\expandafter\pgf@lsystem@token\expandafter{\pgf@lsystem@token \pgf@stop}%
- \fi%
- \fi%
- \let\pgf@lsystem@next=\pgf@lsystem@run%
- \fi%
- \fi%
- \expandafter\pgf@lsystem@next\pgf@lsystem@token}
-
-\def\pgf@lsystem@end#1\pgf@lsystem@stop{\endgroup}
+ \ifx#1\pgf@lsystem@stop%
+ \def\pgf@lsystem@token{\pgf@lsystem@stop}%
+ \let\pgf@lsystem@next=\pgf@lsystem@end%
+ \else%
+ \ifx#1\pgf@stop%
+ \advance\c@pgf@lsystem@iteration by-1\relax%
+ \let\pgf@system@token=\pgfutil@empty%
+ \let\pgf@lsystem@next=\pgf@lsystem@run%
+ \else%
+ % Does #1 appear on the RHS of a rule...?
+ \expandafter\let\expandafter\pgf@lsystem@token\expandafter=%
+ \csname pgf@lsystem@\pgf@lsystem@name @rule@#1\endcsname%
+ \ifx\pgf@lsystem@token\relax%
+ % ...nope. So draw it straight away.
+ \pgf@lsystem@draw#1\pgf@stop%
+ \let\pgf@lsystem@token=\pgfutil@empty%
+ \else%
+ % ...yep. So, if the order has been reached draw the LHS
+ % immediately. Otherwise add the LHS to the token stream
+ % and continue.
+ \advance\c@pgf@lsystem@iteration by1\relax%
+ \ifnum\c@pgf@lsystem@iteration=\pgf@lsystem@order%
+ \expandafter\pgf@lsystem@draw\pgf@lsystem@token \pgf@stop%
+ \advance\c@pgf@lsystem@iteration by-1\relax%
+ \let\pgf@lsystem@token=\pgfutil@empty%
+ \else%
+ \expandafter\def\expandafter\pgf@lsystem@token\expandafter{\pgf@lsystem@token \pgf@stop}%
+ \fi%
+ \fi%
+ \let\pgf@lsystem@next=\pgf@lsystem@run%
+ \fi%
+ \fi%
+ \expandafter\pgf@lsystem@next\pgf@lsystem@token}%
+
+\def\pgf@lsystem@end#1\pgf@lsystem@stop{\endgroup}%
\def\pgf@lsystem@draw#1{%
- \ifx#1\pgf@stop%
- \let\pgf@lsystem@next=\relax%
- \else%
- \expandafter\let\expandafter\pgf@lsystem@current@symbol\expandafter=%
- \csname pgf@lsystem@\pgf@lsystem@name @symbol@#1\endcsname%
- \ifx\pgf@lsystem@current@symbol\relax% Try a default symbol.
- \expandafter\let\expandafter\pgf@lsystem@current@symbol\expandafter=%
- \csname pgf@lsystem@symbol@default@#1\endcsname%
- \fi%
- \let\pgf@lsystem@next=\pgf@lsystem@@draw%
- \fi%
- \pgf@lsystem@next}
+ \ifx#1\pgf@stop%
+ \let\pgf@lsystem@next=\relax%
+ \else%
+ \expandafter\let\expandafter\pgf@lsystem@current@symbol\expandafter=%
+ \csname pgf@lsystem@\pgf@lsystem@name @symbol@#1\endcsname%
+ \ifx\pgf@lsystem@current@symbol\relax% Try a default symbol.
+ \expandafter\let\expandafter\pgf@lsystem@current@symbol\expandafter=%
+ \csname pgf@lsystem@symbol@default@#1\endcsname%
+ \fi%
+ \let\pgf@lsystem@next=\pgf@lsystem@@draw%
+ \fi%
+ \pgf@lsystem@next}%
\def\pgf@lsystem@@draw{%
- \edef\pgflsystemcurrentstep{\the\pgflsystemstep}%
- \let\pgflsystemcurrentrightangle=\pgflsystemrightangle%
- \let\pgflsystemcurrentrightangle=\pgflsystemleftangle%
- \pgf@lsystem@current@symbol%
- \pgf@lsystem@draw}
-
-\expandafter\def\csname pgf@lsystem@symbol@default@F\endcsname{\pgflsystemdrawforward}
-\expandafter\def\csname pgf@lsystem@symbol@default@f\endcsname{\pgflsystemmoveforward}
-\expandafter\def\csname pgf@lsystem@symbol@default@+\endcsname{\pgflsystemturnleft}
-\expandafter\def\csname pgf@lsystem@symbol@default@-\endcsname{\pgflsystemturnright}
-\expandafter\def\csname pgf@lsystem@symbol@default@[\endcsname{\pgflsystemsavestate}
-\expandafter\def\csname pgf@lsystem@symbol@default@]\endcsname{\pgflsystemrestorestate}
+ \edef\pgflsystemcurrentstep{\the\pgflsystemstep}%
+ \let\pgflsystemcurrentrightangle=\pgflsystemrightangle%
+ \let\pgflsystemcurrentrightangle=\pgflsystemleftangle%
+ \pgf@lsystem@current@symbol%
+ \pgf@lsystem@draw}%
+
+\expandafter\def\csname
+pgf@lsystem@symbol@default@F\endcsname{\pgflsystemdrawforward}%
+\expandafter\def\csname
+pgf@lsystem@symbol@default@f\endcsname{\pgflsystemmoveforward}%
+\expandafter\def\csname
+pgf@lsystem@symbol@default@+\endcsname{\pgflsystemturnleft}%
+\expandafter\def\csname
+pgf@lsystem@symbol@default@-\endcsname{\pgflsystemturnright}%
+\expandafter\def\csname
+pgf@lsystem@symbol@default@[\endcsname{\pgflsystemsavestate}%
+\expandafter\def\csname
+pgf@lsystem@symbol@default@]\endcsname{\pgflsystemrestorestate}%
\def\pgflsystemradonmizestep{%
- \ifpgf@lsystem@randomize@step%
- \pgfmathrand%
- \pgf@x=\pgflsystemrandomizesteppercent pt\relax%
- \pgf@x=\pgfmathresult\pgf@x%
- \divide\pgf@x by20\relax%
- \advance\pgf@x by\pgflsystemstep\relax%
- \edef\pgflsystemcurrentstep{\the\pgf@x}%
- \else%
- \edef\pgflsystemcurrentstep{\the\pgflsystemstep}%
- \fi%
-}
+ \ifpgf@lsystem@randomize@step%
+ \pgfmathrand%
+ \pgf@x=\pgflsystemrandomizesteppercent pt\relax%
+ \pgf@x=\pgfmathresult\pgf@x%
+ \divide\pgf@x by20\relax%
+ \advance\pgf@x by\pgflsystemstep\relax%
+ \edef\pgflsystemcurrentstep{\the\pgf@x}%
+ \else%
+ \edef\pgflsystemcurrentstep{\the\pgflsystemstep}%
+ \fi%
+}%
\def\pgflsystemdrawforward{%
- \pgflsystemradonmizestep
- \pgftransformxshift{+\pgflsystemcurrentstep}%
- \pgfpathlineto{\pgfpointorigin}}
+ \pgflsystemradonmizestep
+ \pgftransformxshift{+\pgflsystemcurrentstep}%
+ \pgfpathlineto{\pgfpointorigin}}%
\def\pgflsystemmoveforward{%
- \pgflsystemradonmizestep
- \pgftransformxshift{+\pgflsystemcurrentstep}%
- \pgfpathmoveto{\pgfpointorigin}}
+ \pgflsystemradonmizestep
+ \pgftransformxshift{+\pgflsystemcurrentstep}%
+ \pgfpathmoveto{\pgfpointorigin}}%
\def\pgflsystemranomizerightangle{%
- \ifpgf@lsystem@randomize@angle%
- \pgf@x=\pgflsystemrandomizeanglepercent pt\relax%
- \divide\pgf@x by20\relax%
- \pgfmathrand%
- \pgf@x=\pgfmathresult\pgf@x%
- \advance\pgf@x by\pgflsystemrightangle pt\relax%
- \edef\pgflsystemcurrentrightangle{\pgfmath@tonumber{\pgf@x}}%
- \else%
- \let\pgflsystemcurrentrightangle=\pgflsystemrightangle%
- \fi%
-}
+ \ifpgf@lsystem@randomize@angle%
+ \pgf@x=\pgflsystemrandomizeanglepercent pt\relax%
+ \divide\pgf@x by20\relax%
+ \pgfmathrand%
+ \pgf@x=\pgfmathresult\pgf@x%
+ \advance\pgf@x by\pgflsystemrightangle pt\relax%
+ \edef\pgflsystemcurrentrightangle{\pgfmath@tonumber{\pgf@x}}%
+ \else%
+ \let\pgflsystemcurrentrightangle=\pgflsystemrightangle%
+ \fi%
+}%
\def\pgflsystemranomizeleftangle{%
- \ifpgf@lsystem@randomize@angle%
- \pgf@x=\pgflsystemrandomizeanglepercent pt\relax%
- \divide\pgf@x by20\relax%
- \pgfmathrand%
- \pgf@x=\pgfmathresult\pgf@x%
- \advance\pgf@x by\pgflsystemleftangle pt\relax%
- \edef\pgflsystemcurrentleftangle{\pgfmath@tonumber{\pgf@x}}%
- \else%
- \let\pgflsystemcurrentleftangle=\pgflsystemleftangle%
- \fi%
-}
+ \ifpgf@lsystem@randomize@angle%
+ \pgf@x=\pgflsystemrandomizeanglepercent pt\relax%
+ \divide\pgf@x by20\relax%
+ \pgfmathrand%
+ \pgf@x=\pgfmathresult\pgf@x%
+ \advance\pgf@x by\pgflsystemleftangle pt\relax%
+ \edef\pgflsystemcurrentleftangle{\pgfmath@tonumber{\pgf@x}}%
+ \else%
+ \let\pgflsystemcurrentleftangle=\pgflsystemleftangle%
+ \fi%
+}%
\def\pgflsystemturnright{%
- \pgflsystemranomizerightangle
- \pgftransformrotate{-\pgflsystemcurrentrightangle}}
+ \pgflsystemranomizerightangle
+ \pgftransformrotate{-\pgflsystemcurrentrightangle}}%
\def\pgflsystemturnleft{%
- \pgflsystemranomizeleftangle
- \pgftransformrotate{\pgflsystemcurrentleftangle}}
+ \pgflsystemranomizeleftangle
+ \pgftransformrotate{\pgflsystemcurrentleftangle}}%
-\def\pgflsystemsavestate{\begingroup}
-\def\pgflsystemrestorestate{\endgroup\pgfpathmoveto{\pgfpointorigin}}
+\def\pgflsystemsavestate{\begingroup}%
+\def\pgflsystemrestorestate{\endgroup\pgfpathmoveto{\pgfpointorigin}}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex
index acfc3fa7b2e..908d7490030 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex
@@ -7,80 +7,80 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarypatterns.code.tex,v 1.13 2008/03/03 13:52:35 tantau Exp $
+\ProvidesFileRCS{pgflibrarypatterns.code.tex}
% Lines in different directions
\pgfdeclarepatternformonly{horizontal lines}{\pgfpointorigin}{\pgfqpoint{100pt}{1pt}}{\pgfqpoint{100pt}{3pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{0pt}{0.5pt}}
- \pgfpathlineto{\pgfqpoint{100pt}{0.5pt}}
- \pgfusepath{stroke}
-}
+{%
+ \pgfsetlinewidth{0.4pt}%
+ \pgfpathmoveto{\pgfqpoint{0pt}{0.5pt}}%
+ \pgfpathlineto{\pgfqpoint{100pt}{0.5pt}}%
+ \pgfusepath{stroke}%
+}%
\pgfdeclarepatternformonly{vertical lines}{\pgfpointorigin}{\pgfqpoint{1pt}{100pt}}{\pgfqpoint{3pt}{100pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{0.5pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{0.5pt}{100pt}}
- \pgfusepath{stroke}
-}
+{%
+ \pgfsetlinewidth{0.4pt}%
+ \pgfpathmoveto{\pgfqpoint{0.5pt}{0pt}}%
+ \pgfpathlineto{\pgfqpoint{0.5pt}{100pt}}%
+ \pgfusepath{stroke}%
+}%
\pgfdeclarepatternformonly{north east lines}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{4pt}{4pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{3.1pt}{3.1pt}}
- \pgfusepath{stroke}
-}
+{%
+ \pgfsetlinewidth{0.4pt}%
+ \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}%
+ \pgfpathlineto{\pgfqpoint{3.1pt}{3.1pt}}%
+ \pgfusepath{stroke}%
+}%
\pgfdeclarepatternformonly{north west lines}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{4pt}{4pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{0pt}{3pt}}
- \pgfpathlineto{\pgfqpoint{3.1pt}{-0.1pt}}
- \pgfusepath{stroke}
-}
+{%
+ \pgfsetlinewidth{0.4pt}%
+ \pgfpathmoveto{\pgfqpoint{0pt}{3pt}}%
+ \pgfpathlineto{\pgfqpoint{3.1pt}{-0.1pt}}%
+ \pgfusepath{stroke}%
+}%
% Crossed lines in different directions
\pgfdeclarepatternformonly{grid}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{4pt}{4pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{0pt}{3.1pt}}
- \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{3.1pt}{0pt}}
- \pgfusepath{stroke}
-}
+{%
+ \pgfsetlinewidth{0.4pt}%
+ \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}%
+ \pgfpathlineto{\pgfqpoint{0pt}{3.1pt}}%
+ \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}%
+ \pgfpathlineto{\pgfqpoint{3.1pt}{0pt}}%
+ \pgfusepath{stroke}%
+}%
\pgfdeclarepatternformonly{crosshatch}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{4pt}{4pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfsetlinewidth{0.4pt}
- \pgfpathmoveto{\pgfqpoint{3.1pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{0pt}{3.1pt}}
- \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
- \pgfpathlineto{\pgfqpoint{3.1pt}{3.1pt}}
- \pgfusepath{stroke}
-}
+{%
+ \pgfsetlinewidth{0.4pt}%
+ \pgfpathmoveto{\pgfqpoint{3.1pt}{0pt}}%
+ \pgfpathlineto{\pgfqpoint{0pt}{3.1pt}}%
+ \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}%
+ \pgfpathlineto{\pgfqpoint{3.1pt}{3.1pt}}%
+ \pgfusepath{stroke}%
+}%
% Dotted regions
\pgfdeclarepatternformonly{dots}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{1pt}{1pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfpathcircle{\pgfqpoint{0pt}{0pt}}{.5pt}
- \pgfusepath{fill}
-}
+{%
+ \pgfpathcircle{\pgfqpoint{0pt}{0pt}}{.5pt}%
+ \pgfusepath{fill}%
+}%
\pgfdeclarepatternformonly{crosshatch dots}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{2.5pt}{2.5pt}}{\pgfqpoint{3pt}{3pt}}%
-{
- \pgfpathcircle{\pgfqpoint{0pt}{0pt}}{.5pt}
- \pgfpathcircle{\pgfqpoint{1.5pt}{1.5pt}}{.5pt}
- \pgfusepath{fill}
-}
+{%
+ \pgfpathcircle{\pgfqpoint{0pt}{0pt}}{.5pt}%
+ \pgfpathcircle{\pgfqpoint{1.5pt}{1.5pt}}{.5pt}%
+ \pgfusepath{fill}%
+}%
@@ -88,61 +88,61 @@
% Star shaped patterns
\pgfdeclarepatternformonly{fivepointed stars}{\pgfpointorigin}{\pgfqpoint{3mm}{3mm}}{\pgfqpoint{3mm}{3mm}}%
-{
- \pgftransformshift{\pgfqpoint{1mm}{1mm}}
- \pgfpathmoveto{\pgfqpointpolar{18}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{162}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{306}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{90}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{234}{1mm}}
- \pgfpathclose%
- \pgfusepath{fill}
-}
+{%
+ \pgftransformshift{\pgfqpoint{1mm}{1mm}}%
+ \pgfpathmoveto{\pgfqpointpolar{18}{1mm}}%
+ \pgfpathlineto{\pgfqpointpolar{162}{1mm}}%
+ \pgfpathlineto{\pgfqpointpolar{306}{1mm}}%
+ \pgfpathlineto{\pgfqpointpolar{90}{1mm}}%
+ \pgfpathlineto{\pgfqpointpolar{234}{1mm}}%
+ \pgfpathclose%%
+ \pgfusepath{fill}%
+}%
\pgfdeclarepatternformonly{sixpointed stars}{\pgfpointorigin}{\pgfqpoint{3mm}{3mm}}{\pgfqpoint{3mm}{3mm}}%
-{
- \pgftransformshift{\pgfqpoint{1mm}{1mm}}
- \pgfpathmoveto{\pgfqpointpolar{30}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{150}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{270}{1mm}}
+{%
+ \pgftransformshift{\pgfqpoint{1mm}{1mm}}%
+ \pgfpathmoveto{\pgfqpointpolar{30}{1mm}}%
+ \pgfpathlineto{\pgfqpointpolar{150}{1mm}}%
+ \pgfpathlineto{\pgfqpointpolar{270}{1mm}}%
\pgfpathclose%
- \pgfpathmoveto{\pgfqpointpolar{-30}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{-270}{1mm}}
- \pgfpathlineto{\pgfqpointpolar{-150}{1mm}}
+ \pgfpathmoveto{\pgfqpointpolar{-30}{1mm}}%
+ \pgfpathlineto{\pgfqpointpolar{-270}{1mm}}%
+ \pgfpathlineto{\pgfqpointpolar{-150}{1mm}}%
\pgfpathclose%
- \pgfsetnonzerorule
- \pgfusepath{fill}
-}
+ \pgfsetnonzerorule%
+ \pgfusepath{fill}%
+}%
% Bricks
\pgfdeclarepatternformonly{bricks}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{5mm}{5mm}}{\pgfqpoint{4mm}{4mm}}%
-{
- \pgfsetlinewidth{0.8pt}
- \pgfpathmoveto{\pgfqpoint{0mm}{1mm}}
- \pgfpathlineto{\pgfqpoint{4mm}{1mm}}
- \pgfpathmoveto{\pgfqpoint{0mm}{3mm}}
- \pgfpathlineto{\pgfqpoint{4mm}{3mm}}
- \pgfpathmoveto{\pgfqpoint{1mm}{0mm}}
- \pgfpathlineto{\pgfqpoint{1mm}{1mm}}
- \pgfpathmoveto{\pgfqpoint{3mm}{1mm}}
- \pgfpathlineto{\pgfqpoint{3mm}{3mm}}
- \pgfpathmoveto{\pgfqpoint{1mm}{3mm}}
- \pgfpathlineto{\pgfqpoint{1mm}{4mm}}
- \pgfusepath{stroke}
-}
+{%
+ \pgfsetlinewidth{0.8pt}%
+ \pgfpathmoveto{\pgfqpoint{0mm}{1mm}}%
+ \pgfpathlineto{\pgfqpoint{4mm}{1mm}}%
+ \pgfpathmoveto{\pgfqpoint{0mm}{3mm}}%
+ \pgfpathlineto{\pgfqpoint{4mm}{3mm}}%
+ \pgfpathmoveto{\pgfqpoint{1mm}{0mm}}%
+ \pgfpathlineto{\pgfqpoint{1mm}{1mm}}%
+ \pgfpathmoveto{\pgfqpoint{3mm}{1mm}}%
+ \pgfpathlineto{\pgfqpoint{3mm}{3mm}}%
+ \pgfpathmoveto{\pgfqpoint{1mm}{3mm}}%
+ \pgfpathlineto{\pgfqpoint{1mm}{4mm}}%
+ \pgfusepath{stroke}%
+}%
% Checkerboards
\pgfdeclarepatternformonly{checkerboard}{\pgfpointorigin}{\pgfqpoint{4mm}{4mm}}{\pgfqpoint{4mm}{4mm}}%
-{
- \pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{2mm}{2mm}}
- \pgfpathrectangle{\pgfqpoint{2mm}{2mm}}{\pgfqpoint{2mm}{2mm}}
- \pgfusepath{fill}
-}
+{%
+ \pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{2mm}{2mm}}%
+ \pgfpathrectangle{\pgfqpoint{2mm}{2mm}}{\pgfqpoint{2mm}{2mm}}%
+ \pgfusepath{fill}%
+}%
@@ -150,117 +150,115 @@
\pgfdeclarepatterninherentlycolored{checkerboard light gray}
{\pgfpointorigin}{\pgfqpoint{4mm}{4mm}}{\pgfqpoint{4mm}{4mm}}%
-{
- \pgfsetfillcolor{black!10}
+{%
+% \pgfsetfillcolor{black!10}
\pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{4.1mm}{4.1mm}}% make
% slightly larger to ensure that tiles
% are really solid
- \pgfusepath{fill}
- \pgfsetfillcolor{black!20}
- \pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{2mm}{2mm}}
- \pgfpathrectangle{\pgfqpoint{2mm}{2mm}}{\pgfqpoint{2mm}{2mm}}
- \pgfusepath{fill}
-}
+ \pgfusepath{fill}%
+ \pgfsetfillcolor{black!20}%
+ \pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{2mm}{2mm}}%
+ \pgfpathrectangle{\pgfqpoint{2mm}{2mm}}{\pgfqpoint{2mm}{2mm}}%
+ \pgfusepath{fill}%
+}%
\pgfdeclarepatterninherentlycolored{horizontal lines light gray}
{\pgfpointorigin}{\pgfpoint{100pt}{4pt}}
{\pgfpoint{100pt}{4pt}}
-{
- \pgfsetfillcolor{black!10}
- \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{100pt}{2.5pt}}
- \pgfusepath{fill}
- \pgfsetfillcolor{black!15}
- \pgfpathrectangle{\pgfpoint{0pt}{2pt}}{\pgfpoint{100pt}{2.5pt}}
- \pgfusepath{fill}
-}
+{%
+ \pgfsetfillcolor{black!10}%
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{100pt}{2.5pt}}%
+ \pgfusepath{fill}%
+ \pgfsetfillcolor{black!15}%
+ \pgfpathrectangle{\pgfpoint{0pt}{2pt}}{\pgfpoint{100pt}{2.5pt}}%
+ \pgfusepath{fill}%
+}%
\pgfdeclarepatterninherentlycolored{horizontal lines gray}
{\pgfpointorigin}{\pgfpoint{100pt}{4pt}}
{\pgfpoint{100pt}{4pt}}
-{
- \pgfsetfillcolor{black!30}
- \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{100pt}{2.5pt}}
- \pgfusepath{fill}
- \pgfsetfillcolor{black!35}
- \pgfpathrectangle{\pgfpoint{0pt}{2pt}}{\pgfpoint{100pt}{2.5pt}}
- \pgfusepath{fill}
-}
+{%
+ \pgfsetfillcolor{black!30}%
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{100pt}{2.5pt}}%
+ \pgfusepath{fill}%
+ \pgfsetfillcolor{black!35}%
+ \pgfpathrectangle{\pgfpoint{0pt}{2pt}}{\pgfpoint{100pt}{2.5pt}}%
+ \pgfusepath{fill}%
+}%
\pgfdeclarepatterninherentlycolored{horizontal lines dark gray}
{\pgfpointorigin}{\pgfpoint{100pt}{4pt}}
{\pgfpoint{100pt}{4pt}}
-{
- \pgfsetfillcolor{black!90}
- \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{100pt}{2.5pt}}
- \pgfusepath{fill}
- \pgfsetfillcolor{black!85}
- \pgfpathrectangle{\pgfpoint{0pt}{2pt}}{\pgfpoint{100pt}{2.5pt}}
- \pgfusepath{fill}
-}
+{%
+ \pgfsetfillcolor{black!90}%
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{100pt}{2.5pt}}%
+ \pgfusepath{fill}%
+ \pgfsetfillcolor{black!85}%
+ \pgfpathrectangle{\pgfpoint{0pt}{2pt}}{\pgfpoint{100pt}{2.5pt}}%
+ \pgfusepath{fill}%
+}%
\pgfdeclarepatterninherentlycolored{horizontal lines light blue}
{\pgfpointorigin}{\pgfpoint{100pt}{4pt}}
{\pgfpoint{100pt}{4pt}}
-{
- \pgfsetfillcolor{blue!10}
- \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{100pt}{2.5pt}}
- \pgfusepath{fill}
- \pgfsetfillcolor{blue!15}
- \pgfpathrectangle{\pgfpoint{0pt}{2pt}}{\pgfpoint{100pt}{2.5pt}}
- \pgfusepath{fill}
-}
+{%
+ \pgfsetfillcolor{blue!10}%
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{100pt}{2.5pt}}%
+ \pgfusepath{fill}%
+ \pgfsetfillcolor{blue!15}%
+ \pgfpathrectangle{\pgfpoint{0pt}{2pt}}{\pgfpoint{100pt}{2.5pt}}%
+ \pgfusepath{fill}%
+}%
\pgfdeclarepatterninherentlycolored{horizontal lines dark blue}
{\pgfpointorigin}{\pgfpoint{100pt}{4pt}}
{\pgfpoint{100pt}{4pt}}
-{
- \pgfsetfillcolor{blue!90}
- \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{100pt}{2.5pt}}
- \pgfusepath{fill}
- \pgfsetfillcolor{blue!85}
- \pgfpathrectangle{\pgfpoint{0pt}{2pt}}{\pgfpoint{100pt}{2.5pt}}
- \pgfusepath{fill}
-}
+{%
+ \pgfsetfillcolor{blue!90}%
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{100pt}{2.5pt}}%
+ \pgfusepath{fill}%
+ \pgfsetfillcolor{blue!85}%
+ \pgfpathrectangle{\pgfpoint{0pt}{2pt}}{\pgfpoint{100pt}{2.5pt}}%
+ \pgfusepath{fill}%
+}%
\pgfdeclarepatterninherentlycolored{crosshatch dots gray}
{\pgfpointorigin}{\pgfpoint{8pt}{8pt}}
{\pgfpoint{8pt}{8pt}}
-{
- \pgfsetfillcolor{black!20}
- \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{8pt}{8pt}}
- \pgfusepath{fill}
- \pgfsetfillcolor{black!10}
- \pgfpathcircle{\pgfpoint{2pt}{1.75pt}}{1pt}
- \pgfpathcircle{\pgfpoint{6pt}{5.75pt}}{1pt}
- \pgfusepath{fill}
- \pgfsetfillcolor{black!70}
- \pgfpathcircle{\pgfpoint{2pt}{2.25pt}}{1pt}
- \pgfpathcircle{\pgfpoint{6pt}{6.25pt}}{1pt}
- \pgfusepath{fill}
-}
-
-\pgfutil@definecolor{pgf@lightsteelblue}{rgb}{0.6875,0.765625,0.8671875}
-\pgfutil@colorlet{pgf@darklightsteelblue}{black!50!pgf@lightsteelblue}
+{%
+ \pgfsetfillcolor{black!20}%
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{8pt}{8pt}}%
+ \pgfusepath{fill}%
+ \pgfsetfillcolor{black!10}%
+ \pgfpathcircle{\pgfpoint{2pt}{1.75pt}}{1pt}%
+ \pgfpathcircle{\pgfpoint{6pt}{5.75pt}}{1pt}%
+ \pgfusepath{fill}%
+ \pgfsetfillcolor{black!70}%
+ \pgfpathcircle{\pgfpoint{2pt}{2.25pt}}{1pt}%
+ \pgfpathcircle{\pgfpoint{6pt}{6.25pt}}{1pt}%
+ \pgfusepath{fill}%
+}%
+
+\pgfutil@definecolor{pgf@lightsteelblue}{rgb}{0.6875,0.765625,0.8671875}%
+\pgfutil@colorlet{pgf@darklightsteelblue}{black!50!pgf@lightsteelblue}%
\pgfdeclarepatterninherentlycolored{crosshatch dots light steel blue}
{\pgfpointorigin}{\pgfpoint{8pt}{8pt}}
{\pgfpoint{8pt}{8pt}}
-{
- \pgfsetfillcolor{pgf@lightsteelblue}
- \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{8pt}{8pt}}
- \pgfusepath{fill}
- \pgfsetfillcolor{pgf@darklightsteelblue!10}
- \pgfpathcircle{\pgfpoint{2pt}{1.75pt}}{1pt}
- \pgfpathcircle{\pgfpoint{6pt}{5.75pt}}{1pt}
- \pgfusepath{fill}
- \pgfsetfillcolor{pgf@darklightsteelblue!70}
- \pgfpathcircle{\pgfpoint{2pt}{2.25pt}}{1pt}
- \pgfpathcircle{\pgfpoint{6pt}{6.25pt}}{1pt}
- \pgfusepath{fill}
-}
-
-
+{%
+ \pgfsetfillcolor{pgf@lightsteelblue}%
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{8pt}{8pt}}%
+ \pgfusepath{fill}%
+ \pgfsetfillcolor{pgf@darklightsteelblue!10}%
+ \pgfpathcircle{\pgfpoint{2pt}{1.75pt}}{1pt}%
+ \pgfpathcircle{\pgfpoint{6pt}{5.75pt}}{1pt}%
+ \pgfusepath{fill}%
+ \pgfsetfillcolor{pgf@darklightsteelblue!70}%
+ \pgfpathcircle{\pgfpoint{2pt}{2.25pt}}{1pt}%
+ \pgfpathcircle{\pgfpoint{6pt}{6.25pt}}{1pt}%
+ \pgfusepath{fill}%
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.meta.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.meta.code.tex
index 467fa1fee46..d3a381524ae 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.meta.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.meta.code.tex
@@ -7,8 +7,8 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\def\pgf@pat@type@uncolored{0}
-\def\pgf@pat@type@colored{1}
+\def\pgf@pat@type@uncolored{0}%
+\def\pgf@pat@type@colored{1}%
\newif\ifpgf@pat@makepatternimmutable
\pgfkeys{/pgf/patterns/.cd,
@@ -43,29 +43,29 @@
top right=\pgfpointorigin,
tile size=\pgfpointorigin,
tile transformation=,
- code=,
+ code=,
set up code=,
-}
+}%
-\def\pgf@pat@name@prefix{pgf@pattern@name@meta@}
+\def\pgf@pat@name@prefix{pgf@pattern@name@meta@}%
\def\pgfifpatternundefined#1{%
\pgfutil@ifundefined{\pgf@pat@name@prefix#1}%
-}
+}%
\def\pgf@pat@adddef@to@macro#1#2{%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter#1%
\expandafter\expandafter\expandafter{\expandafter#1\expandafter%
\def\expandafter#2\expandafter{#2}}%
-}
+}%
\def\pgf@pat@addto@macro#1#2{%
\expandafter\def\expandafter#1\expandafter{#1#2}}%
\def\pgf@pat@process#1{%
\pgf@process{#1}%
-}
+}%
\def\pgf@pat@doifnotempty#1{%
\ifx#1\pgfutil@empty%
@@ -74,12 +74,12 @@
\let\pgf@pat@next=#1%
\fi%
\pgf@pat@next%
-}
+}%
-\def\pgf@pat@processtransformations#1{#1}
+\def\pgf@pat@processtransformations#1{#1}%
\def\pgf@pat@processpoint#1{%
\pgf@process{#1}%
-}
+}%
\def\pgfdeclarepattern#1{%
@@ -89,7 +89,7 @@
\pgfkeys{/pgf/patterns/.cd, #1}%
\pgf@declarepattern%
\endgroup%
-}
+}%
\def\pgf@declarepattern{%
\pgfifpatternundefined{\pgf@pat@name}{%
\ifx\pgf@pat@parameters\pgfutil@empty%
@@ -97,7 +97,7 @@
\pgf@pat@declare%
\edef\pgf@marshal{%
\noexpand\pgf@pat@addto@macro\noexpand\pgf@pat@options{,number ..=\pgf@pattern@number}}%
- \pgf@marshal%
+ \pgf@marshal%
\fi%
% It is a bit inefficient that all the options for
% immutable patterns are saved when only the type
@@ -106,7 +106,7 @@
}{%
\pgferror{Pattern `\pgf@pat@name' already defined}%
}%
-}
+}%
\let\pgf@pat@declarebefore=\pgfutil@empty
\let\pgf@pat@declareafter=\pgfutil@empty
\let\pgf@pat@codebefore=\pgfutil@empty
@@ -133,7 +133,7 @@
\pgf@pat@doifnotempty\pgf@pat@codebefore
\pgf@pat@code%
\pgf@pat@doifnotempty\pgf@pat@codeafter%
- \pgfsys@endscope%
+ \pgfsys@endscope%
\endpgfinterruptboundingbox%
\pgfsysprotocol@getcurrentprotocol\pgf@pattern@code%
\global\let\pgf@pattern@code=\pgf@pattern@code%
@@ -153,7 +153,7 @@
\pgf@pat@processtransformations\pgf@pat@transformation%
\pgfgettransformentries\aa\ab\ba\bb\shiftx\shifty%
\global\edef\pgf@pattern@matrix{{\aa}{\ab}{\ba}{\bb}{\shiftx}{\shifty}}%
- \endgroup%
+ \endgroup%
% Now, build a name for the pattern
\pgfutil@tempcnta=\pgf@pattern@number\relax%
\advance\pgfutil@tempcnta by1\relax%
@@ -163,39 +163,39 @@
{\the\pgf@xa}{\the\pgf@ya}{\the\pgf@xb}{\the\pgf@yb}{\the\pgf@xc}{\the\pgf@yc}\pgf@pattern@matrix{\pgf@pattern@code}{\pgf@pat@type}}%
}%
\pgf@marshal%
- \pgfsysprotocol@setcurrentprotocol\pgf@pattern@temp%
- }
+ \pgfsysprotocol@setcurrentprotocol\pgf@pattern@temp%
+}%
\def\pgf@pat@checkname#1{%
- \pgf@pat@@checkname#1[]\pgf@patstop}
+ \pgf@pat@@checkname#1[]\pgf@patstop}%
\def\pgf@pat@@checkname#1[#2]#3\pgf@patstop{%
\def\pgf@pat@onlinename{#1}%
\def\pgf@pat@onlineoptions{#2}%
-}
+}%
\def\pgf@pat@unravel#1/{%
- \pgfutil@ifnextchar\pgf@stop{\def\pgf@pat@unravelled{#1}}{\pgf@pat@unravel}}
+ \pgfutil@ifnextchar\pgf@stop{\def\pgf@pat@unravelled{#1}}{\pgf@pat@unravel}}%
\pgfkeys{/handlers/.pattern/.code={%
\expandafter\expandafter\expandafter\pgf@pat@unravel\pgfkeyscurrentpath/\pgf@stop%
\pgfpatternalias{#1}{\pgf@pat@unravelled}%
-}}
+}}%
\def\pgfpatternalias#1#2{%
\begingroup%
\pgf@pat@checkname{#1}%
\expandafter\let\expandafter\pgf@pat@options\expandafter=%
\csname\pgf@pat@name@prefix\pgf@pat@onlinename\endcsname%
- \pgf@pat@macroaskeys{/pgf/patterns/.cd}{\pgf@pat@options}%
+ \pgf@pat@macroaskeys{/pgf/patterns/.cd}{\pgf@pat@options}%
\pgfutil@toks@\expandafter{\pgf@pat@onlineoptions}%
\edef\pgf@pat@tmp{append to defaults={\the\pgfutil@toks@}}%
\expandafter\pgf@pat@addto@macro\expandafter\pgf@pat@options\expandafter{\expandafter,\pgf@pat@tmp}%
\pgf@pat@addto@macro\pgf@pat@options{,name=#2}%
\expandafter\global\expandafter\let\csname\pgf@pat@name@prefix#2\endcsname=\pgf@pat@options%
\endgroup%
-}
+}%
\let\pgfsetfillpattern@old=\pgfsetfillpattern
@@ -204,7 +204,7 @@
\pgfutil@toks@\expandafter{#2}%
\edef\pgf@marshal{\noexpand\pgfkeys{#1, \the\pgfutil@toks@}}%
\pgf@marshal%
-}
+}%
\def\pgfsetfillpattern#1#2{%
\pgf@pat@checkname{#1}%
\pgfutil@ifundefined{\pgf@pat@name@prefix\pgf@pat@onlinename}{%
@@ -246,7 +246,7 @@
\pgfsys@setpatterncolored{\pgf@pat@number}%
\fi%
}%
-}
+}%
\def\pgf@pat@setpatternuncolored#1#2{%
\pgfutil@colorlet{pgf@tempcolor}{#2}%
@@ -254,10 +254,10 @@
\pgfutil@extractcolorspec{pgf@tempcolor}{\pgf@tempcolor}%
\expandafter\pgfutil@convertcolorspec\pgf@tempcolor{rgb}{\pgf@rgbcolor}%
\expandafter\pgf@pat@set@fill@patternuncolored\pgf@rgbcolor\relax{#1}%
-}
+}%
\def\pgf@pat@set@fill@patternuncolored#1,#2,#3\relax#4{%
\pgfsys@setpatternuncolored{#4}{#1}{#2}{#3}%
-}
+}%
%%% Local Variables:
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
index 38ccd94d0b9..3f0fc8d268d 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryplothandlers.code.tex,v 1.20 2013/08/31 13:02:59 ludewich Exp $
+\ProvidesFileRCS{pgflibraryplothandlers.code.tex}
% This handler converts each plot stream command into a curveto
@@ -25,13 +25,13 @@
point macro=\pgf@plot@curveto@handler@initial,
jump macro=\pgf@plot@smooth@next@moveto,
end macro=\pgf@plot@curveto@handler@finish
-}
+}%
\def\pgf@plot@smooth@next@moveto{%
\pgf@plot@curveto@handler@finish%
\global\pgf@plot@startedfalse%
\global\let\pgf@plotstreampoint\pgf@plot@curveto@handler@initial%
-}
+}%
\def\pgf@plot@curveto@handler@initial#1{%
\pgf@process{#1}%
@@ -41,14 +41,14 @@
\xdef\pgf@plot@curveto@first{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
\global\let\pgf@plot@curveto@first@support=\pgf@plot@curveto@first%
\global\let\pgf@plotstreampoint=\pgf@plot@curveto@handler@second%
-}
+}%
\def\pgf@plot@curveto@handler@second#1{%
\pgf@process{#1}%
\xdef\pgf@plot@curveto@second{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
\global\let\pgf@plotstreampoint=\pgf@plot@curveto@handler@third%
\global\pgf@plot@startedtrue%
-}
+}%
\def\pgf@plot@curveto@handler@third#1{%
\pgf@process{#1}%
@@ -79,20 +79,20 @@
\global\let\pgf@plot@curveto@first=\pgf@plot@curveto@second%
\global\let\pgf@plot@curveto@second=\pgf@plot@curveto@current%
\xdef\pgf@plot@curveto@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
-}
+}%
\def\pgf@plot@curveto@handler@finish{%
\ifpgf@plot@started%
\pgfpathcurveto{\pgf@plot@curveto@first@support}{\pgf@plot@curveto@second}{\pgf@plot@curveto@second}%
\fi%
-}
+}%
% This commands sets the tension for smoothing of plots.
%
% #1 = tension of curves. A value of 1 will yield a circle when the
% control points are at quarters of a circle. A smaller value
-% will result in a tighter curve. Default is 0.5.
+% will result in a tighter curve. Default is 0.5.
%
% Example:
%
@@ -101,8 +101,8 @@
\def\pgfsetplottension#1{%
\pgf@x=#1pt\relax%
\pgf@x=0.2775\pgf@x\relax%
- \edef\pgf@plottension{\pgf@sys@tonumber\pgf@x}}
-\pgfsetplottension{0.5}
+ \edef\pgf@plottension{\pgf@sys@tonumber\pgf@x}}%
+\pgfsetplottension{0.5}%
% This handler converts the plot stream command into a curveto
@@ -118,13 +118,13 @@
point macro=\pgf@plot@closedcurve@handler@initial,
end macro=\pgf@plot@closedcurve@handler@finish,
jump macro=\pgf@plot@closedsmooth@next@moveto
-}
+}%
\def\pgf@plot@closedsmooth@next@moveto{%
\pgf@plot@closedcurve@handler@finish%
\global\pgf@plot@startedfalse%
\global\let\pgf@plotstreampoint\pgf@plot@closedcurve@handler@initial%
-}
+}%
\def\pgf@plot@closedcurve@handler@initial#1{%
\pgf@process{#1}%
@@ -133,14 +133,14 @@
\xdef\pgf@plot@closedcurve@initial{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
\global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@second%
\global\pgf@plot@startedfalse%
-}
+}%
\def\pgf@plot@closedcurve@handler@second#1{%
\pgf@process{#1}%
\xdef\pgf@plot@closedcurve@after@initial{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
{\pgfpathmoveto{}}%
\global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@third%
-}
+}%
\def\pgf@plot@closedcurve@handler@third#1{%
\global\pgf@plot@startedtrue%
@@ -170,7 +170,7 @@
\xdef\pgf@plot@closedcurve@after@initial@presupport{\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}%
\xdef\pgf@plot@closedcurve@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
\global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@fourth%
-}
+}%
\def\pgf@plot@closedcurve@handler@fourth#1{%
\pgf@process{#1}%
@@ -201,7 +201,7 @@
\global\let\pgf@plot@closedcurve@first=\pgf@plot@closedcurve@second%
\global\let\pgf@plot@closedcurve@second=\pgf@plot@closedcurve@current%
\xdef\pgf@plot@closedcurve@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}%
-}
+}%
\def\pgf@plot@closedcurve@handler@finish{%
\ifpgf@plot@started
@@ -266,7 +266,7 @@
{\pgf@marshal}%
\pgfpathclose%
\fi%
-}
+}%
@@ -274,7 +274,7 @@
% This handler converts each point in a stream into a line from the
% $y$-axis to the given points coordinate, resulting in a
-% ``comb.''
+% ``comb.''
%
% Example:
%
@@ -285,7 +285,7 @@
start macro=\pgfplotxzerolevelstreamstart,
point macro=\pgf@plot@xcomb@handler,
end macro=\pgfplotxzerolevelstreamend,
-}
+}%
\def\pgf@plot@xcomb@handler#1{%
\pgf@process{#1}%
@@ -297,12 +297,12 @@
\pgf@yb=\pgf@x
\pgfpathmoveto{\pgfqpoint{\pgf@yb}{\pgf@ya}}%
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
-}
+}%
% This handler converts each point in a stream into a line from the
% $x$-axis straight up to the given points coordinate, resulting in a
-% ``comb.''
+% ``comb.''
%
% Example:
%
@@ -313,7 +313,7 @@
start macro=\pgfplotyzerolevelstreamstart,
point macro=\pgf@plot@ycomb@handler,
end macro=\pgfplotyzerolevelstreamend
-}
+}%
\def\pgf@plot@ycomb@handler#1{%
\pgf@process{#1}%
@@ -325,23 +325,23 @@
\pgf@yb=\pgf@x
\pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@yb}}%
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
-}
+}%
% PGF Bar or comb plots usually draw something from zero to the current plot's coordinate.
-%
+%
% The 'zero' offset can be changed using an input stream.
%
% There are two such streams which can be configured independently.
% The first one returns "zeros" for coordinate x, the second one
% returns "zeros" for coordinate y.
-%
+%
% \pgfplotxzerolevelstreamstart
% \pgfplotxzerolevelstreamnext % assigns \pgf@x globally
% \pgfplotxzerolevelstreamnext
% \pgfplotxzerolevelstreamnext
% \pgfplotxzerolevelstreamend
%
-% and
+% and
% \pgfplotyzerolevelstreamstart
% \pgfplotyzerolevelstreamnext % assigns \pgf@x globally
% \pgfplotyzerolevelstreamend
@@ -351,43 +351,43 @@
\def\pgfplotxzerolevelstreamnext{\pgf@plotxzerolevelstreamnext}
\def\pgfplotyzerolevelstreamstart{\pgf@plotyzerolevelstreamstart}%
\def\pgfplotyzerolevelstreamend{\pgf@plotyzerolevelstreamend}%
-\def\pgfplotyzerolevelstreamnext{\pgf@plotyzerolevelstreamnext}
+\def\pgfplotyzerolevelstreamnext{\pgf@plotyzerolevelstreamnext}%
% This zero level stream always returns '#1' (a dimension).
\def\pgfplotxzerolevelstreamconstant#1{%
- \edef\pgfplotxzerolevelstreamconstant@val{#1}%
- \def\pgf@plotxzerolevelstreamstart{%
- \global\let\pgf@plotxzerolevelstreamend=\relax
- \gdef\pgf@plotxzerolevelstreamnext{\global\pgf@x=\pgfplotxzerolevelstreamconstant@val\relax}%
- }%
+ \edef\pgfplotxzerolevelstreamconstant@val{#1}%
+ \def\pgf@plotxzerolevelstreamstart{%
+ \global\let\pgf@plotxzerolevelstreamend=\relax
+ \gdef\pgf@plotxzerolevelstreamnext{\global\pgf@x=\pgfplotxzerolevelstreamconstant@val\relax}%
+ }%
}%
\pgfplotxzerolevelstreamconstant{0pt}%
% This zero level stream always returns '#1'.
\def\pgfplotyzerolevelstreamconstant#1{%
- \edef\pgfplotyzerolevelstreamconstant@val{#1}%
- \def\pgf@plotyzerolevelstreamstart{%
- \global\let\pgf@plotyzerolevelstreamend=\relax
- \gdef\pgf@plotyzerolevelstreamnext{\global\pgf@x=\pgfplotyzerolevelstreamconstant@val\relax}%
- }%
+ \edef\pgfplotyzerolevelstreamconstant@val{#1}%
+ \def\pgf@plotyzerolevelstreamstart{%
+ \global\let\pgf@plotyzerolevelstreamend=\relax
+ \gdef\pgf@plotyzerolevelstreamnext{\global\pgf@x=\pgfplotyzerolevelstreamconstant@val\relax}%
+ }%
}%
\pgfplotyzerolevelstreamconstant{0pt}%
-\def\pgfplotbarwidth{\pgfkeysvalueof{/pgf/bar width}}
-\def\pgfplotbarshift{\pgfkeysvalueof{/pgf/bar shift}}
+\def\pgfplotbarwidth{\pgfkeysvalueof{/pgf/bar width}}%
+\def\pgfplotbarshift{\pgfkeysvalueof{/pgf/bar shift}}%
\pgfqkeys{/pgf}{%
- bar width/.initial=10pt,
- bar shift/.initial=0pt,
- bar interval width/.initial=1,
- bar interval shift/.initial=0.5,
- %
- % hook which is executed right before a new bar is begun.
- at begin bar/.initial=,
- % hook which is executed right after a bar path has been finished.
- % In this context, the bar's path has not been used.
- at end bar/.initial=,
-}
+ bar width/.initial=10pt,
+ bar shift/.initial=0pt,
+ bar interval width/.initial=1,
+ bar interval shift/.initial=0.5,
+ %
+ % hook which is executed right before a new bar is begun.
+ at begin bar/.initial=,
+ % hook which is executed right after a bar path has been finished.
+ % In this context, the bar's path has not been used.
+ at end bar/.initial=,
+}%
% This handler places a rectangle at each point in the plot stream, a
% rectangle which touches the x-axis at one end and the current point
@@ -412,7 +412,7 @@
},
end macro=\pgfplotyzerolevelstreamend,
point macro=\pgf@plot@ybar@handler
-}
+}%
\def\pgf@plot@ybar@handler#1{%
\pgfkeysvalueof{/pgf/at begin bar}%
@@ -428,10 +428,10 @@
\pgf@yb=\pgf@x
\advance\pgf@ya by-\pgf@yb
\pgfpathrectangle
- {\pgfqpoint{\pgf@xc}{\pgf@yb}}%
- {\pgfqpoint{\pgf@xb}{\pgf@ya}}%
+ {\pgfqpoint{\pgf@xc}{\pgf@yb}}%
+ {\pgfqpoint{\pgf@xb}{\pgf@ya}}%
\pgfkeysvalueof{/pgf/at end bar}%
-}
+}%
% This handler places a rectangle at each point in the plot stream, a
% rectangle which touches the y-axis at one end and the current point
@@ -455,7 +455,7 @@
},
end macro=\pgfplotxzerolevelstreamend,
point macro=\pgf@plot@xbar@handler
-}
+}%
\def\pgf@plot@xbar@handler#1{%
\pgfkeysvalueof{/pgf/at begin bar}%
@@ -471,23 +471,23 @@
\pgf@yb=\pgf@x
\advance\pgf@ya by-\pgf@yb
\pgfpathrectangle
- {\pgfqpoint{\pgf@yb}{\pgf@xc}}%
- {\pgfqpoint{\pgf@ya}{\pgf@xb}}%
+ {\pgfqpoint{\pgf@yb}{\pgf@xc}}%
+ {\pgfqpoint{\pgf@ya}{\pgf@xb}}%
\pgfkeysvalueof{/pgf/at end bar}%
-}
+}%
% This handler is a variant of \pgfplothandlerybar which works with
% intervals instead of points.
-%
+%
% Bars are drawn between successive input coordinates and the width is
% determined relatively to the interval length.
%
% It looks like this:
%
-% |---| |-----|
-% | | | |
-% | | | |
-% | | | |
+% |---| |-----|
+% | | | |
+% | | | |
+% | | | |
% (X)------(X)-----------(X)
%
% where (X) denotes the x-axis offsets of input coordinates.
@@ -519,14 +519,14 @@
},
end macro=\pgfplotyzerolevelstreamend,
point macro=\pgf@plot@ybarinterval@handler@first
-}
+}%
\def\pgf@plot@ybarinterval@handler@first#1{%
\pgf@process{#1}%
\xdef\pgf@plot@barinterval@intervalstart{\the\pgf@x}%
\xdef\pgf@plot@barinterval@bar{\the\pgf@y}%
\global\let\pgf@plotstreampoint=\pgf@plot@ybarinterval@handler%
-}
+}%
\def\pgf@plot@ybarinterval@handler#1{%
\pgfkeysvalueof{/pgf/at begin bar}%
\pgf@process{#1}%
@@ -545,10 +545,10 @@
\pgf@yb=\pgf@x
\advance\pgf@ya by-\pgf@yb
\pgfpathrectangle
- {\pgfqpoint{\pgf@xc}{\pgf@yb}}%
- {\pgfqpoint{\pgf@xb}{\pgf@ya}}%
+ {\pgfqpoint{\pgf@xc}{\pgf@yb}}%
+ {\pgfqpoint{\pgf@xb}{\pgf@ya}}%
\pgfkeysvalueof{/pgf/at end bar}%
-}
+}%
% Like \pgfplothandlerybarinterval but for xbar.
\pgfdeclareplothandler{\pgfplothandlerxbarinterval}{}{%
@@ -561,14 +561,14 @@
},
end macro=\pgfplotxzerolevelstreamend,
point macro=\pgf@plot@xbarinterval@handler@first
-}
+}%
\def\pgf@plot@xbarinterval@handler@first#1{%
\pgf@process{#1}%
\xdef\pgf@plot@barinterval@intervalstart{\the\pgf@y}%
\xdef\pgf@plot@barinterval@bar{\the\pgf@x}%
\global\let\pgf@plotstreampoint=\pgf@plot@xbarinterval@handler%
-}
+}%
\def\pgf@plot@xbarinterval@handler#1{%
\pgfkeysvalueof{/pgf/at begin bar}%
\pgf@process{#1}%
@@ -587,10 +587,10 @@
\pgf@yb=\pgf@x
\advance\pgf@ya by-\pgf@yb
\pgfpathrectangle
- {\pgfqpoint{\pgf@yb}{\pgf@xc}}%
- {\pgfqpoint{\pgf@ya}{\pgf@xb}}%
+ {\pgfqpoint{\pgf@yb}{\pgf@xc}}%
+ {\pgfqpoint{\pgf@ya}{\pgf@xb}}%
\pgfkeysvalueof{/pgf/at end bar}%
-}
+}%
% This handler is very similar to \pgfplothandlerlineto, but it
@@ -609,14 +609,14 @@
\pgfdeclareplothandler{\pgfplothandlerconstantlineto}{}{%
point macro=\pgf@plot@const@line@handler
-}
+}%
\def\pgf@plot@const@line@handler#1{%
\pgf@process{#1}%
\xdef\pgf@plot@const@line@handler@last{\the\pgf@y}%
\pgf@plot@first@action{}%
\global\let\pgf@plotstreampoint=\pgf@plot@const@line@handler@@%
-}
+}%
\def\pgf@plot@const@line@handler@@#1{%
\pgf@process{#1}%
\pgf@xa=\pgf@x
@@ -625,11 +625,11 @@
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}}%
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
\xdef\pgf@plot@const@line@handler@last{\the\pgf@ya}%
-}
+}%
% A variant of \pgfplothandlerconstantlineto which places its mark on
% the right line ends.
-%
+%
% |---x
% ---x |
% |--x
@@ -642,14 +642,14 @@
\pgfdeclareplothandler{\pgfplothandlerconstantlinetomarkright}{}{%
point macro=\pgf@plot@const@line@mark@right@handler
-}
+}%
\def\pgf@plot@const@line@mark@right@handler#1{%
\pgf@process{#1}%
\xdef\pgf@plot@const@line@handler@last{\the\pgf@x}%
\pgf@plot@first@action{}%
\global\let\pgf@plotstreampoint=\pgf@plot@const@line@mark@right@handler@@%
-}
+}%
\def\pgf@plot@const@line@mark@right@handler@@#1{%
\pgf@process{#1}%
\pgf@xa=\pgf@x
@@ -658,7 +658,7 @@
\pgfpathlineto{\pgfqpoint{\pgf@yb}{\pgf@ya}}%
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
\xdef\pgf@plot@const@line@handler@last{\the\pgf@xa}%
-}
+}%
% A variant of \pgfplothandlerconstantlineto which places its mark on
% the middle of the line segment.
@@ -676,14 +676,14 @@
\pgfdeclareplothandler{\pgfplothandlerconstantlinetomarkmid}{}{%
point macro=\pgf@plot@const@line@mark@mid@handler
-}
+}%
\def\pgf@plot@const@line@mark@mid@handler#1{%
\pgf@process{#1}%
\xdef\pgf@plot@const@line@handler@last{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}%
\pgf@plot@first@action{}%
\global\let\pgf@plotstreampoint=\pgf@plot@const@line@mark@mid@handler@@%
-}
+}%
\def\pgf@plot@const@line@mark@mid@handler@@#1{%
\pgf@process{#1}%
\pgf@xa=\pgf@x
@@ -695,7 +695,7 @@
\pgfpathlineto{\pgfqpoint{\pgf@xc}{\pgf@ya}}%
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
\xdef\pgf@plot@const@line@handler@last{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}%
-}
+}%
% This handler is in fact a variant of \pgfplothandlerconstantlineto,
% but it does not draw vertical lines. It produces a sequence of
@@ -703,7 +703,7 @@
% each right end:
%
% ---x
-% ---x
+% ---x
% ---x
% --x
%
@@ -714,14 +714,14 @@
\pgfdeclareplothandler{\pgfplothandlerjumpmarkright}{}{%
point macro=\pgf@plot@jumpmarkright@handler
-}
+}%
\def\pgf@plot@jumpmarkright@handler#1{%
\pgf@process{#1}%
\xdef\pgf@plot@const@line@handler@last{\the\pgf@x}%
\pgf@plot@first@action{}%
\global\let\pgf@plotstreampoint=\pgf@plot@jumpmarkright@handler@@%
-}
+}%
\def\pgf@plot@jumpmarkright@handler@@#1{%
\pgf@process{#1}%
\pgf@xa=\pgf@x
@@ -730,7 +730,7 @@
\pgfpathmoveto{\pgfqpoint{\pgf@yb}{\pgf@ya}}%
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
\xdef\pgf@plot@const@line@handler@last{\the\pgf@xa}%
-}
+}%
% This handler is in fact a variant of \pgfplothandlerconstantlineto,
% but it does not draw vertical lines. It produces a sequence of
@@ -738,7 +738,7 @@
% each left end:
%
% x---
-% x---
+% x---
% x---
% x--
%
@@ -749,13 +749,13 @@
\pgfdeclareplothandler{\pgfplothandlerjumpmarkleft}{}{%
point macro=\pgf@plot@jumpmarkleft@handler
-}
+}%
\def\pgf@plot@jumpmarkleft@handler#1{%
\pgf@process{#1}%
\xdef\pgf@plot@const@line@handler@last{\the\pgf@y}%
\pgf@plot@first@action{}%
\global\let\pgf@plotstreampoint=\pgf@plot@jumpmarkleft@handler@@%
-}
+}%
\def\pgf@plot@jumpmarkleft@handler@@#1{%
\pgf@process{#1}%
\pgf@xa=\pgf@x
@@ -764,7 +764,7 @@
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}}%
\pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
\xdef\pgf@plot@const@line@handler@last{\the\pgf@ya}%
-}
+}%
% This handler is in fact a variant of
% \pgfplothandlerconstantlinetomarkmid,
@@ -772,8 +772,8 @@
% line-to and move-to operations such that plot marks are placed like
%
% ----x
-%
-% --x--
+%
+% --x--
% --x----
% x--
%
@@ -784,14 +784,14 @@
\pgfdeclareplothandler{\pgfplothandlerjumpmarkmid}{}{%
point macro=\pgf@plot@jump@mark@mid@handler
-}
+}%
\def\pgf@plot@jump@mark@mid@handler#1{%
\pgf@process{#1}%
\xdef\pgf@plot@const@line@handler@last{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}%
\pgf@plot@first@action{}%
\global\let\pgf@plotstreampoint=\pgf@plot@jump@mark@mid@handler@@%
-}
+}%
\def\pgf@plot@jump@mark@mid@handler@@#1{%
\pgf@process{#1}%
\pgf@xa=\pgf@x
@@ -803,7 +803,7 @@
\pgfpathmoveto{\pgfqpoint{\pgf@xc}{\pgf@ya}}%
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
\xdef\pgf@plot@const@line@handler@last{\global\pgf@x=\the\pgf@x\space\global\pgf@y=\the\pgf@y\space}%
-}
+}%
% This handler converts each point in a stream into a line from the
@@ -816,7 +816,7 @@
\pgfdeclareplothandler{\pgfplothandlerpolarcomb}{}{%
point macro=\pgf@plot@polarcomb@handler
-}
+}%
\def\pgf@plot@polarcomb@handler#1{%
\pgf@process{#1}%
@@ -824,12 +824,12 @@
\pgf@ya=\pgf@y%
\pgfpathmoveto{\pgfpointorigin}%
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
-}
+}%
-% This handler draws a given mark at each point.
+% This handler draws a given mark at each point.
%
% #1 = some code to be executed at each point (with the coordinate
% system translated to that point).
@@ -853,15 +853,15 @@
\global\advance\pgf@plot@mark@count by-\pgf@plot@mark@phase\relax%
},
point macro=\pgf@plot@mark@handler
-}
+}%
\newcount\pgf@plot@mark@count
-\def\pgf@plot@mark@phase{0}
+\def\pgf@plot@mark@phase{0}%
\def\pgf@plot@mark@handler#1{%
\global\advance\pgf@plot@mark@count by1\relax%
{\pgftransformshift{#1}\pgf@plot@mark}%
-}
+}%
% Set the repeat count for marks. For example, if 3 is given as a
@@ -873,12 +873,12 @@
%
% \pgfsetplotmarkrepeat{2}
-\def\pgfsetplotmarkrepeat#1{\def\pgf@plot@mark@repeat{#1}}
-\pgfsetplotmarkrepeat{1}
+\def\pgfsetplotmarkrepeat#1{\def\pgf@plot@mark@repeat{#1}}%
+\pgfsetplotmarkrepeat{1}%
-% Set the phase for marks. For example, if 3 is the repeat and 3 is
-% the phase, already the first point will be marked.
+% Set the phase for marks. For example, if 3 is the repeat and 3 is
+% the phase, already the first point will be marked.
%
% #1 = the index of the first point that should be marked.
%
@@ -886,8 +886,8 @@
%
% \pgfsetplotmarkphase{3}
-\def\pgfsetplotmarkphase#1{\def\pgf@plot@mark@phase{#1}}
-\pgfsetplotmarkphase{1}
+\def\pgfsetplotmarkphase#1{\def\pgf@plot@mark@phase{#1}}%
+\pgfsetplotmarkphase{1}%
@@ -918,7 +918,7 @@
\global\advance\pgf@plot@mark@count by-\pgf@plot@mark@phase\relax%
},
point macro=\pgf@plot@mark@handler
-}
+}%
% \def\pgfplothandlermarklisted#1#2{%
% \let\pgf@plot@mark@list=\pgfutil@empty%
@@ -928,7 +928,7 @@
% \edef\pgf@marshal{\noexpand\pgfutil@in@{(\the\pgf@plot@mark@count)}{\pgf@plot@mark@list}}%
% \pgf@marshal%
% \ifpgfutil@in@#1\fi}%
-% }
+% }%
% Define a new plot mark for use with \pgfplotmark.
@@ -940,7 +940,7 @@
%
% \pgfdeclareplotmark{*}{\pgfpathcircle{\pgfpointorigin}{2pt}\pgfusepathqfill}
-\def\pgfdeclareplotmark#1#2{\expandafter\def\csname pgf@plot@mark@#1\endcsname{#2}}
+\def\pgfdeclareplotmark#1#2{\expandafter\def\csname pgf@plot@mark@#1\endcsname{#2}}%
% Set the size of plot marks. For circles, this will be the radius,
@@ -950,7 +950,7 @@
%
% \pgfsetplotmarksize{1pt}
-\def\pgfsetplotmarksize#1{\pgfmathsetlength\pgfplotmarksize{#1}}
+\def\pgfsetplotmarksize#1{\pgfmathsetlength\pgfplotmarksize{#1}}%
\newdimen\pgfplotmarksize
\pgfplotmarksize=2pt
@@ -964,7 +964,7 @@
%
% \pgfuseplotmark{*}
-\def\pgfuseplotmark#1{\csname pgf@plot@mark@#1\endcsname}
+\def\pgfuseplotmark#1{\csname pgf@plot@mark@#1\endcsname}%
% A stroke-filled circle mark
@@ -973,38 +973,38 @@
{%
\pgfpathellipse{\pgfpointorigin}{\pgfqpoint{\pgfplotmarksize}{0sp}}{\pgfqpoint{0sp}{\pgfplotmarksize}}%
\pgfusepathqfillstroke
-}
+}%
% A plus-sign like mark
\pgfdeclareplotmark{+}
{%
- \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}}
- \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}
- \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}
+ \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
+ \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
+ \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
+ \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
\pgfusepathqstroke
-}
+}%
% An x-shaped mark
\pgfdeclareplotmark{x}
{%
- \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}
- \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}
- \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}
+ \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}%
+ \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}%
+ \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}%
+ \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}%
\pgfusepathqstroke
-}
+}%
% See pgflibraryplotmarks for more plot marks
-% This handler turns creates a series of straight line segements
+% This handler turns creates a series of straight line segments
% between consecutive points, but leaving /pgf/gap around stream point
% space.
%
@@ -1013,16 +1013,16 @@
% \pgfplothandlergaplineto
% \pgfplotxyfile{mytable}
-\pgfkeys{/pgf/gap around stream point/.initial=1.5pt}
+\pgfkeys{/pgf/gap around stream point/.initial=1.5pt}%
\pgfdeclareplothandler{\pgfplothandlergaplineto}{}{%
point macro=\pgf@plot@gap@lineto@handler@initial,
jump macro=\pgf@plot@gap@next@moveto
-}
+}%
\def\pgf@plot@gap@next@moveto{%
\global\let\pgf@plotstreampoint=\pgf@plot@gap@lineto@handler@initial%
-}
+}%
\def\pgf@plot@gap@lineto@handler@initial#1{%
\pgf@process{#1}%
@@ -1030,7 +1030,7 @@
\pgf@ya=\pgf@y%
\xdef\pgf@plot@gap@lineto@last{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
\global\let\pgf@plotstreampoint=\pgf@plot@gap@lineto@handler%
-}
+}%
\def\pgf@plot@gap@lineto@handler#1{%
% Ok, compute normalized line vector
@@ -1046,7 +1046,7 @@
\pgfpathlineto{\pgfpointadd{\pgfpointscale{\pgfkeysvalueof{/pgf/gap
around stream point}}{\pgfqpoint{-\pgf@xc}{-\pgf@yc}}}{\pgf@plot@gap@lineto@next}}%
\global\let\pgf@plot@gap@lineto@last=\pgf@plot@gap@lineto@next%
-}
+}%
@@ -1065,13 +1065,13 @@
jump macro=\pgf@plot@gapcycle@next@moveto,
end macro=\pgf@plot@gap@cycle@handler@finish,
start={\global\let\pgf@plot@gap@cycle@first\relax}
-}
+}%
\def\pgf@plot@gapcycle@next@moveto{%
\pgf@plot@gap@cycle@handler@finish%
\global\let\pgf@plot@gap@cycle@first=\relax%
\global\let\pgf@plotstreampoint=\pgf@plot@gap@cycle@handler@initial%
-}
+}%
\def\pgf@plot@gap@cycle@handler@initial#1{%
\pgf@process{#1}%
@@ -1080,7 +1080,7 @@
\xdef\pgf@plot@gap@cycle@last{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}%
\global\let\pgf@plot@gap@cycle@first=\pgf@plot@gap@cycle@last%
\global\let\pgf@plotstreampoint=\pgf@plot@gap@cycle@handler%
-}
+}%
\def\pgf@plot@gap@cycle@handler#1{%
% Ok, compute normalized line vector
@@ -1096,14 +1096,14 @@
\pgfpathlineto{\pgfpointadd{\pgfpointscale{\pgfkeysvalueof{/pgf/gap
around stream point}}{\pgfqpoint{-\pgf@xc}{-\pgf@yc}}}{\pgf@plot@gap@cycle@next}}%
\global\let\pgf@plot@gap@cycle@last=\pgf@plot@gap@cycle@next%
-}
+}%
\def\pgf@plot@gap@cycle@handler@finish{%
\ifx\pgf@plot@gap@cycle@first\relax%
\else
\pgf@plot@gap@cycle@handler{\pgf@plot@gap@cycle@first}%
\fi
-}
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex
index b64138dabf3..24bc7b8de72 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryplotmarks.code.tex,v 1.14 2015/08/03 10:04:36 cfeuersaenger Exp $
+\ProvidesFileRCS{pgflibraryplotmarks.code.tex}
% A stroked circle mark
@@ -16,7 +16,7 @@
{%
\pgfpathellipse{\pgfpointorigin}{\pgfqpoint{\pgfplotmarksize}{0sp}}{\pgfqpoint{0sp}{\pgfplotmarksize}}%
\pgfusepathqstroke
-}
+}%
% A Mercedes-line star
@@ -30,7 +30,7 @@
\pgfpathmoveto{\pgfqpointpolar{-150}{\pgfplotmarksize}}%
\pgfpathlineto{\pgfpointorigin}%
\pgfusepathqstroke
-}
+}%
\pgfdeclareplotmark{Mercedes star flipped}
{%
@@ -41,7 +41,7 @@
\pgfpathmoveto{\pgfqpointpolar{150}{\pgfplotmarksize}}%
\pgfpathlineto{\pgfpointorigin}%
\pgfusepathqstroke
-}
+}%
@@ -57,7 +57,7 @@
\pgfpathmoveto{\pgfqpointpolar{-30}{\pgfplotmarksize}}%
\pgfpathlineto{\pgfqpointpolar{-210}{\pgfplotmarksize}}%
\pgfusepathqstroke
-}
+}%
% A five-pointed star mark
@@ -70,7 +70,7 @@
\pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}}%
\pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}}%
\pgfusepathqstroke
-}
+}%
% An 10-pointed star mark
@@ -83,7 +83,7 @@
\pgfpathmoveto{\pgfqpointpolar{234}{-\pgfplotmarksize}}\pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}}%
\pgfpathmoveto{\pgfqpointpolar{162}{-\pgfplotmarksize}}\pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}}%
\pgfusepathqstroke
-}
+}%
% An \oplus mark
@@ -96,7 +96,7 @@
\pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
\pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
\pgfusepathqstroke
-}
+}%
\pgfdeclareplotmark{oplus*}
{%
@@ -106,7 +106,7 @@
\pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
\pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
\pgfusepathqfillstroke
-}
+}%
% An \otimes mark
@@ -119,7 +119,7 @@
\pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}%
\pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}%
\pgfusepathqstroke
-}
+}%
\pgfdeclareplotmark{otimes*}
{%
@@ -129,7 +129,7 @@
\pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}%
\pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}%
\pgfusepathqfillstroke
-}
+}%
% A vertical bar mark
@@ -139,7 +139,7 @@
\pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
\pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
\pgfusepathqstroke
-}
+}%
@@ -150,7 +150,7 @@
\pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
\pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
\pgfusepathqstroke
-}
+}%
% A square stroked mark
@@ -159,7 +159,7 @@
{%
\pgfpathrectangle{\pgfqpoint{-\pgfplotmarksize}{-\pgfplotmarksize}}{\pgfqpoint{2\pgfplotmarksize}{2\pgfplotmarksize}}%
\pgfusepathqstroke
-}
+}%
% A square stroked-filled mark
@@ -167,7 +167,7 @@
{%
\pgfpathrectangle{\pgfqpoint{-\pgfplotmarksize}{-\pgfplotmarksize}}{\pgfqpoint{2\pgfplotmarksize}{2\pgfplotmarksize}}%
\pgfusepathqfillstroke
-}
+}%
% A triangle mark
@@ -179,7 +179,7 @@
\pgfpathlineto{\pgfqpointpolar{-150}{\pgfplotmarksize}}%
\pgfpathclose
\pgfusepathqstroke
-}
+}%
% A stroke-filled triangle mark
@@ -191,7 +191,7 @@
\pgfpathlineto{\pgfqpointpolar{-150}{\pgfplotmarksize}}%
\pgfpathclose
\pgfusepathqfillstroke
-}
+}%
@@ -205,7 +205,7 @@
\pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}}%
\pgfpathclose
\pgfusepathqstroke
-}
+}%
% A stroke-filled diamond-shaped mark
@@ -218,7 +218,7 @@
\pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}}%
\pgfpathclose
\pgfusepathqfillstroke
-}
+}%
@@ -233,7 +233,7 @@
\pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}}%
\pgfpathclose
\pgfusepathqstroke
-}
+}%
% A stroke-filled pentagon-shaped mark
@@ -246,7 +246,7 @@
\pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}}%
\pgfpathclose
\pgfusepathqfillstroke
-}
+}%
\newif\ifpgfmarktext@usetikznode
\pgfkeys{
@@ -254,7 +254,7 @@
/pgf/text mark style/.initial=,
/pgf/text mark as node/.is if=pgfmarktext@usetikznode,
/pgf/text mark as node/.default=true,
- %
+ %
% backw. compat: the extra search path confuses the '.unknown'
% handlers, so this here is deprecated:
/pgf/text mark/style/.style={/pgf/text mark style={#1}},%
@@ -270,17 +270,17 @@
\else
\expandafter\pgftext\expandafter[\pgfmarktext@style]{\pgfmarktext@}%
\fi
-}
+}%
-\pgfkeysdef{/pgf/mark color}{\def\pgf@mark@color{#1}}
+\pgfkeysdef{/pgf/mark color}{\def\pgf@mark@color{#1}}%
\let\pgf@mark@color\pgfutil@empty
\def\pgf@set@mark@color{%
- \ifx\pgf@mark@color\pgfutil@empty
- \pgfsys@color@rgb@fill{1}{1}{1}%
- \else
- \pgfsetfillcolor{\pgf@mark@color}%
- \fi
+ \ifx\pgf@mark@color\pgfutil@empty
+ \pgfsys@color@rgb@fill{1}{1}{1}%
+ \else
+ \pgfsetfillcolor{\pgf@mark@color}%
+ \fi
}%
\def\pgf@mark@color@none{none}%
@@ -289,44 +289,44 @@
% created by Tomek
\pgfdeclareplotmark{halfcircle}{%
- \ifx\pgf@mark@color@none\pgf@mark@color
- \else
- \pgfscope
- \pgf@set@mark@color
- \pgfpathmoveto
- {\pgfqpoint{-\pgfplotmarksize}{0pt}}%
- \pgfpatharc{180}{360}{\pgfplotmarksize}%
- \pgfusepathqfill
- \endpgfscope%
- \fi
- \pgfpathmoveto
- {\pgfqpoint{-\pgfplotmarksize}{0pt}}%
- \pgfpathlineto
- {\pgfqpoint{\pgfplotmarksize}{0pt}}%
- \pgfpathcircle{\pgfpointorigin}%
- {\pgfplotmarksize}%
- \pgfusepathqstroke
-}
+ \ifx\pgf@mark@color@none\pgf@mark@color
+ \else
+ \pgfscope
+ \pgf@set@mark@color
+ \pgfpathmoveto
+ {\pgfqpoint{-\pgfplotmarksize}{0pt}}%
+ \pgfpatharc{180}{360}{\pgfplotmarksize}%
+ \pgfusepathqfill
+ \endpgfscope%
+ \fi
+ \pgfpathmoveto
+ {\pgfqpoint{-\pgfplotmarksize}{0pt}}%
+ \pgfpathlineto
+ {\pgfqpoint{\pgfplotmarksize}{0pt}}%
+ \pgfpathcircle{\pgfpointorigin}%
+ {\pgfplotmarksize}%
+ \pgfusepathqstroke
+}%
\pgfdeclareplotmark{halfcircle*}{%
\pgfpathmoveto
{\pgfqpoint{\pgfplotmarksize}{0pt}}%
\pgfpatharc{0}{180}{\pgfplotmarksize}%
\pgfpathclose
\pgfusepathqfill
- \ifx\pgf@mark@color@none\pgf@mark@color
- \else
- \pgfscope
- \pgf@set@mark@color
- \pgfpathmoveto
- {\pgfqpoint{-\pgfplotmarksize}{0pt}}%
- \pgfpatharc{180}{360}{\pgfplotmarksize}%
- \pgfusepathqfill
- \endpgfscope%
- \fi
- \pgfpathcircle{\pgfpointorigin}%
- {\pgfplotmarksize}%
- \pgfusepathqstroke
-}
+ \ifx\pgf@mark@color@none\pgf@mark@color
+ \else
+ \pgfscope
+ \pgf@set@mark@color
+ \pgfpathmoveto
+ {\pgfqpoint{-\pgfplotmarksize}{0pt}}%
+ \pgfpatharc{180}{360}{\pgfplotmarksize}%
+ \pgfusepathqfill
+ \endpgfscope%
+ \fi
+ \pgfpathcircle{\pgfpointorigin}%
+ {\pgfplotmarksize}%
+ \pgfusepathqstroke
+}%
% A half-down-filled and half-up-filled-white diamond-shaped mark
% created by Magnus Tewes
@@ -338,13 +338,13 @@
\pgfusepathqfill
\ifx\pgf@mark@color@none\pgf@mark@color
\else
- \pgfscope
- \pgf@set@mark@color
- \pgfpathmoveto{\pgfqpoint{.75\pgfplotmarksize}{0pt}}%
- \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
- \pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}}%
- \pgfusepathqfill
- \endpgfscope
+ \pgfscope
+ \pgf@set@mark@color
+ \pgfpathmoveto{\pgfqpoint{.75\pgfplotmarksize}{0pt}}%
+ \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
+ \pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}}%
+ \pgfusepathqfill
+ \endpgfscope
\fi
\pgfpathmoveto{\pgfqpoint{.75\pgfplotmarksize}{0pt}}%
\pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
@@ -352,7 +352,7 @@
\pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
\pgfpathclose
\pgfusepathqstroke
-}
+}%
% A half-down-filled and half-up-filled-white tilted-squared-shaped mark
% created by Magnus Tewes
@@ -364,13 +364,13 @@
\pgfusepathqfill
\ifx\pgf@mark@color@none\pgf@mark@color
\else
- \pgfscope
- \pgf@set@mark@color
- \pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
- \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
- \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
- \pgfusepathqfill
- \endpgfscope
+ \pgfscope
+ \pgf@set@mark@color
+ \pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
+ \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
+ \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
+ \pgfusepathqfill
+ \endpgfscope
\fi
\pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
\pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
@@ -378,7 +378,7 @@
\pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
\pgfpathclose
\pgfusepathqstroke
-}
+}%
% A half-right-filled and half-up-filled-white tilted-squared-shaped mark
% created by Magnus Tewes
@@ -390,13 +390,13 @@
\pgfusepathqfill
\ifx\pgf@mark@color@none\pgf@mark@color
\else
- \pgfscope
- \pgf@set@mark@color
- \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
- \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
- \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
- \pgfusepathqfill
- \endpgfscope
+ \pgfscope
+ \pgf@set@mark@color
+ \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
+ \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
+ \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
+ \pgfusepathqfill
+ \endpgfscope
\fi
\pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
\pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
@@ -404,7 +404,7 @@
\pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
\pgfpathclose
\pgfusepathqstroke
-}
+}%
% A half-left-filled and half-up-filled-white tilted-squared-shaped mark
% created by Magnus Tewes
@@ -416,13 +416,13 @@
\pgfusepathqfill
\ifx\pgf@mark@color@none\pgf@mark@color
\else
- \pgfscope
- \pgf@set@mark@color
- \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
- \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
- \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
- \pgfusepathqfill
- \endpgfscope
+ \pgfscope
+ \pgf@set@mark@color
+ \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
+ \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
+ \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
+ \pgfusepathqfill
+ \endpgfscope
\fi
\pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
\pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
@@ -430,7 +430,7 @@
\pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
\pgfpathclose
\pgfusepathqstroke
-}
+}%
% A stroke-filled heart-shaped mark
@@ -447,7 +447,7 @@
\pgfpathcurveto{\pgfqpoint{.5\pgfplotmarksize}{-1.165\pgfplotmarksize}}{\pgfqpoint{0pt}{-1.66\pgfplotmarksize}}{\pgfqpoint{0pt}{-1.75\pgfplotmarksize}}%
\pgfpathclose
\pgfusepathqfillstroke
-}
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryprofiler.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryprofiler.code.tex
index ea1f469abe8..fe98a5f3f2e 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryprofiler.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryprofiler.code.tex
@@ -1,19 +1,19 @@
%--------------------------------------------
%
% TeX profiling library
-%
+%
% Copyright 2010 by Christian Feuersänger.
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
-%
+%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
-%
+%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
@@ -31,38 +31,38 @@
\else
% Raise an error
\pgferror{%
- Library 'profiler' can only be used with pdftex Rev. >= 1.671
+ Library 'profiler' can only be used with pdftex Rev. >= 1.671
because it needs the \string\pdfelapsedtime\space command or
with luatex}%
\global\let\pgfutil@pdfelapsedtime=\c@pgf@counta
\fi}{%
% We run pdftex. That's ok.
- \let\pgfutil@pdfelapsedtime\pdfelapsedtime}
+ \let\pgfutil@pdfelapsedtime\pdfelapsedtime}%
% Defines a new profiler entry named `#1'.
%
% This allocates a set of counters.
\def\pgfprofilenew#1{%
- \pgfutil@ifundefined{c@pgfprofile@elapsedtotal@#1}{%
- \expandafter\gdef\csname c@pgfprofile@elapsedtotal@#1\endcsname{0}%
- \expandafter\gdef\csname c@pgfprofile@elapsedself@#1\endcsname{0}%
- \expandafter\gdef\csname c@pgfprofile@numinvocations@#1\endcsname{0}%
- \expandafter\gdef\csname c@pgfprofile@subtractforself@#1\endcsname{0}%
- \expandafter\gdef\csname c@pgfprofile@semaphor@#1\endcsname{0}%
- \expandafter\gdef\csname c@pgfprofile@elapsed@at@start@#1\endcsname{0}%
- \pgfprofile@all@registered@list@add{#1}%
- }{%
- % it is already defined and registered. Shouldn't hurt, might
- % even be a good feature.
- }%
+ \pgfutil@ifundefined{c@pgfprofile@elapsedtotal@#1}{%
+ \expandafter\gdef\csname c@pgfprofile@elapsedtotal@#1\endcsname{0}%
+ \expandafter\gdef\csname c@pgfprofile@elapsedself@#1\endcsname{0}%
+ \expandafter\gdef\csname c@pgfprofile@numinvocations@#1\endcsname{0}%
+ \expandafter\gdef\csname c@pgfprofile@subtractforself@#1\endcsname{0}%
+ \expandafter\gdef\csname c@pgfprofile@semaphor@#1\endcsname{0}%
+ \expandafter\gdef\csname c@pgfprofile@elapsed@at@start@#1\endcsname{0}%
+ \pgfprofile@all@registered@list@add{#1}%
+ }{%
+ % it is already defined and registered. Shouldn't hurt, might
+ % even be a good feature.
+ }%
}%
\def\pgfprofile@TeX@DIALECT@toenvironment@begin#1{\csname #1\endcsname}%
\def\pgfprofile@TeX@DIALECT@toenvironment@end#1{\csname end#1\endcsname}%
\def\pgfprofile@@to@pgfretval#1{%
- \expandafter\let\expandafter\pgfretval#1%
+ \expandafter\let\expandafter\pgfretval#1%
}%
% Defines a new profiler entry for the environment `#1'.
@@ -77,33 +77,33 @@
% \pgfprofilenewforenvironment[<profiler entry name>]{<environment name>}
\def\pgfprofilenewforenvironment{\pgfutil@ifnextchar[{\pgfprofilenewforenvironment@}{\pgfprofilenewforenvironment@[]}}%
\def\pgfprofilenewforenvironment@[#1]#2{%
- \expandafter\pgfprofile@@to@pgfretval\pgfprofile@TeX@DIALECT@toenvironment@begin{#2}%
- \ifx\pgfretval\relax
- \pgferror{\string\pgfprofilenewforenvironment{#2} doesn't work: the environment `#2' is (not yet?) known or not known in this context}{}%
- \else
- \expandafter\global\expandafter\let\csname pgfprofile@orig@begin@#2\endcsname=\pgfretval
- \expandafter\pgfprofile@@to@pgfretval\pgfprofile@TeX@DIALECT@toenvironment@end{#2}%
- \expandafter\global\expandafter\let\csname pgfprofile@orig@end@#2\endcsname=\pgfretval
- %
- \def\pgfprofile@temp{#1}%
- \ifx\pgfprofile@temp\pgfutil@empty
- \pgfprofilenewforenvironment@@{\pgfprofileenv #2}{#2}%
- \else
- \pgfprofilenewforenvironment@@{#1}{#2}%
- \fi
- \fi
+ \expandafter\pgfprofile@@to@pgfretval\pgfprofile@TeX@DIALECT@toenvironment@begin{#2}%
+ \ifx\pgfretval\relax
+ \pgferror{\string\pgfprofilenewforenvironment{#2} doesn't work: the environment `#2' is (not yet?) known or not known in this context}{}%
+ \else
+ \expandafter\global\expandafter\let\csname pgfprofile@orig@begin@#2\endcsname=\pgfretval
+ \expandafter\pgfprofile@@to@pgfretval\pgfprofile@TeX@DIALECT@toenvironment@end{#2}%
+ \expandafter\global\expandafter\let\csname pgfprofile@orig@end@#2\endcsname=\pgfretval
+ %
+ \def\pgfprofile@temp{#1}%
+ \ifx\pgfprofile@temp\pgfutil@empty
+ \pgfprofilenewforenvironment@@{\pgfprofileenv #2}{#2}%
+ \else
+ \pgfprofilenewforenvironment@@{#1}{#2}%
+ \fi
+ \fi
}%
\def\pgfprofilenewforenvironment@@#1#2{%
- \pgfprofilenew{#1}%
- \expandafter\expandafter\expandafter\gdef\pgfprofile@TeX@DIALECT@toenvironment@begin{#2}{%
- \pgfprofilestart{#1}%
- \csname pgfprofile@orig@begin@#2\endcsname
- }%
- \expandafter\expandafter\expandafter\gdef\pgfprofile@TeX@DIALECT@toenvironment@end{#2}{%
- \csname pgfprofile@orig@end@#2\endcsname
- \pgfprofileend{#1}%
- }%
-}
+ \pgfprofilenew{#1}%
+ \expandafter\expandafter\expandafter\gdef\pgfprofile@TeX@DIALECT@toenvironment@begin{#2}{%
+ \pgfprofilestart{#1}%
+ \csname pgfprofile@orig@begin@#2\endcsname
+ }%
+ \expandafter\expandafter\expandafter\gdef\pgfprofile@TeX@DIALECT@toenvironment@end{#2}{%
+ \csname pgfprofile@orig@end@#2\endcsname
+ \pgfprofileend{#1}%
+ }%
+}%
\def\pgfprofilecs{<CS>}%
@@ -113,10 +113,10 @@
%
% This calls \pgfprofilenew and enhances the control sequence with
% support for timings.
-%
+%
% #1: the control sequence (with backslash!)
% #2: the number of arguments (see below).
-%
+%
% The following commands are supported:
% - commands which take one (optional) argument in square brackets,
% - commands which take one (optional) argument in square brackets
@@ -124,32 +124,32 @@
% curly braces (use an empty argument for '#2' in this case),
% - commands which take one (optional) argument in square brackets
% and *exactly* #2 arguments afterwards.
-\def\pgfprofilenewforcommand{\pgfutil@ifnextchar[{\pgfprofilenewforcommand@}{\pgfprofilenewforcommand@[]}}
+\def\pgfprofilenewforcommand{\pgfutil@ifnextchar[{\pgfprofilenewforcommand@}{\pgfprofilenewforcommand@[]}}%
\def\pgfprofilenewforcommand@[#1]#2#3{%
- \def\pgfprofile@temp{#3}%
- \ifx\pgfprofile@temp\pgfutil@empty
- \pgfprofilenewforcommandpattern[#1]{#2}{<autocheck>}{}%
- \else
- \ifcase#3\relax
- \pgfprofilenewforcommandpattern[#1]{#2}{}{}%
- \or
- \pgfprofilenewforcommandpattern[#1]{#2}{##1}{{##1}}%
- \or
- \pgfprofilenewforcommandpattern[#1]{#2}{##1##2}{{##1}{##2}}%
- \or
- \pgfprofilenewforcommandpattern[#1]{#2}{##1##2##3}{{##1}{##2}{##3}}%
- \or
- \pgfprofilenewforcommandpattern[#1]{#2}{##1##2##3##4}{{##1}{##2}{##3}{##4}}%
- \or
- \pgfprofilenewforcommandpattern[#1]{#2}{##1##2##3##4##5}{{##1}{##2}{##3}{##4}{##5}}%
- \or
- \pgfprofilenewforcommandpattern[#1]{#2}{##1##2##3##4##5##6}{{##1}{##2}{##3}{##4}{##5}{##6}}%
- \or
- \pgfprofilenewforcommandpattern[#1]{#2}{##1##2##3##4##5##6##7}{{##1}{##2}{##3}{##4}{##5}{##6}{##7}}%
- \else
- \pgferror{library 'profiler' can't replace control sequences with '#3' arguments automatically, sorry.}{}%
- \fi
- \fi
+ \def\pgfprofile@temp{#3}%
+ \ifx\pgfprofile@temp\pgfutil@empty
+ \pgfprofilenewforcommandpattern[#1]{#2}{<autocheck>}{}%
+ \else
+ \ifcase#3\relax
+ \pgfprofilenewforcommandpattern[#1]{#2}{}{}%
+ \or
+ \pgfprofilenewforcommandpattern[#1]{#2}{##1}{{##1}}%
+ \or
+ \pgfprofilenewforcommandpattern[#1]{#2}{##1##2}{{##1}{##2}}%
+ \or
+ \pgfprofilenewforcommandpattern[#1]{#2}{##1##2##3}{{##1}{##2}{##3}}%
+ \or
+ \pgfprofilenewforcommandpattern[#1]{#2}{##1##2##3##4}{{##1}{##2}{##3}{##4}}%
+ \or
+ \pgfprofilenewforcommandpattern[#1]{#2}{##1##2##3##4##5}{{##1}{##2}{##3}{##4}{##5}}%
+ \or
+ \pgfprofilenewforcommandpattern[#1]{#2}{##1##2##3##4##5##6}{{##1}{##2}{##3}{##4}{##5}{##6}}%
+ \or
+ \pgfprofilenewforcommandpattern[#1]{#2}{##1##2##3##4##5##6##7}{{##1}{##2}{##3}{##4}{##5}{##6}{##7}}%
+ \else
+ \pgferror{library 'profiler' can't replace control sequences with '#3' arguments automatically, sorry.}{}%
+ \fi
+ \fi
}%
% \pgfprofilenewforcommandpattern[<profile entry name>]{<\CS>}{<definition pattern>}{<invocation pattern>}
@@ -159,137 +159,137 @@
%
% \def\mymacro##1\to##2\in##3{ .... }
% \pgfprofilenewforcommandpattern{\mymacro}{##1\to##2\in##3}{{##1}\to{##2}\in{##3}}
-\def\pgfprofilenewforcommandpattern{\pgfutil@ifnextchar[{\pgfprofilenewforcommandpattern@}{\pgfprofilenewforcommandpattern@[]}}
+\def\pgfprofilenewforcommandpattern{\pgfutil@ifnextchar[{\pgfprofilenewforcommandpattern@}{\pgfprofilenewforcommandpattern@[]}}%
\def\pgfprofilenewforcommandpattern@[#1]#2#3#4{%
- \def\pgfprofile@known{1}%
- \ifx#2\undefined
- \def\pgfprofile@known{0}%
- \else
- \ifx#2\relax
- \def\pgfprofile@known{0}%
- \fi
- \fi
- \if\pgfprofile@known0%
- \pgferror{\string\pgfprofilenewforcommandpattern{\string#2} doesn't work: the command `\string#2' is (not yet?) known or not known in this context}%
- \else
- \begingroup
- \pgfprofile@cs@to@name{#2}%
- \let\pgfprofilenew@cmdname=\pgfretval
- %
- \def\pgfprofile@temp{#1}%
- \ifx\pgfprofile@temp\pgfutil@empty
- \edef\pgfprofilenew@profilerentryname{\pgfprofilecs\pgfprofilenew@cmdname}%
- \else
- \edef\pgfprofilenew@profilerentryname{#1}%
- \fi
- \expandafter\global\expandafter\let\csname pgfprofile@name@for@\pgfprofilenew@cmdname\endcsname=\pgfprofilenew@profilerentryname
- \pgfprofilenew{\pgfprofilenew@profilerentryname}%
- \expandafter\gdef\csname b@pgfprofile@show@\pgfprofilenew@profilerentryname\endcsname{0}%
- %
- \expandafter\global\expandafter\let\csname pgfprofile@orig@\pgfprofilenew@cmdname\endcsname=#2%
- \toks0={#3}%
- \edef\pgfprofile@temp{\the\toks0}%%
- \def\pgfprofile@tempb{<autocheck>}%
- \ifx\pgfprofile@temp\pgfprofile@tempb
- \expandafter\global\expandafter\let\csname pgfprofile@repl@\pgfprofilenew@cmdname\endcsname=\pgfprofileinvokecommand@uptoonearg
- \else
- \expandafter\gdef\csname pgfprofile@repl@\pgfprofilenew@cmdname\endcsname#3{%
- \pgfprofile@invokeorig{#4}%
- }%
- \fi
- \xdef#2{\noexpand\pgfprofileinvokecommand{\pgfprofilenew@cmdname}}%
- \endgroup
- \fi
+ \def\pgfprofile@known{1}%
+ \ifx#2\undefined
+ \def\pgfprofile@known{0}%
+ \else
+ \ifx#2\relax
+ \def\pgfprofile@known{0}%
+ \fi
+ \fi
+ \if\pgfprofile@known0%
+ \pgferror{\string\pgfprofilenewforcommandpattern{\string#2} doesn't work: the command `\string#2' is (not yet?) known or not known in this context}%
+ \else
+ \begingroup
+ \pgfprofile@cs@to@name{#2}%
+ \let\pgfprofilenew@cmdname=\pgfretval
+ %
+ \def\pgfprofile@temp{#1}%
+ \ifx\pgfprofile@temp\pgfutil@empty
+ \edef\pgfprofilenew@profilerentryname{\pgfprofilecs\pgfprofilenew@cmdname}%
+ \else
+ \edef\pgfprofilenew@profilerentryname{#1}%
+ \fi
+ \expandafter\global\expandafter\let\csname pgfprofile@name@for@\pgfprofilenew@cmdname\endcsname=\pgfprofilenew@profilerentryname
+ \pgfprofilenew{\pgfprofilenew@profilerentryname}%
+ \expandafter\gdef\csname b@pgfprofile@show@\pgfprofilenew@profilerentryname\endcsname{0}%
+ %
+ \expandafter\global\expandafter\let\csname pgfprofile@orig@\pgfprofilenew@cmdname\endcsname=#2%
+ \toks0={#3}%
+ \edef\pgfprofile@temp{\the\toks0}%%
+ \def\pgfprofile@tempb{<autocheck>}%
+ \ifx\pgfprofile@temp\pgfprofile@tempb
+ \expandafter\global\expandafter\let\csname pgfprofile@repl@\pgfprofilenew@cmdname\endcsname=\pgfprofileinvokecommand@uptoonearg
+ \else
+ \expandafter\gdef\csname pgfprofile@repl@\pgfprofilenew@cmdname\endcsname#3{%
+ \pgfprofile@invokeorig{#4}%
+ }%
+ \fi
+ \xdef#2{\noexpand\pgfprofileinvokecommand{\pgfprofilenew@cmdname}}%
+ \endgroup
+ \fi
}%
\def\pgfprofileshowinvocationsfor#1{%
- \pgfutil@ifundefined{b@pgfprofile@show@#1}{%
- \pgferror{\string\pgfprofileshowinvocationsfor{#1} doesn't work: the argument is no profiler entry}%
- }{%
- \expandafter\gdef\csname b@pgfprofile@show@#1\endcsname{1}%
- \expandafter\gdef\csname b@pgfprofile@show@edef@#1\endcsname{0}%
- }%
+ \pgfutil@ifundefined{b@pgfprofile@show@#1}{%
+ \pgferror{\string\pgfprofileshowinvocationsfor{#1} doesn't work: the argument is no profiler entry}%
+ }{%
+ \expandafter\gdef\csname b@pgfprofile@show@#1\endcsname{1}%
+ \expandafter\gdef\csname b@pgfprofile@show@edef@#1\endcsname{0}%
+ }%
}%
\def\pgfprofileshowinvocationsexpandedfor#1{%
- \pgfutil@ifundefined{b@pgfprofile@show@#1}{%
- \pgferror{\string\pgfprofileshowinvocationsfor{#1} doesn't work: the argument is no profiler entry}%
- }{%
- \expandafter\gdef\csname b@pgfprofile@show@#1\endcsname{1}%
- \expandafter\gdef\csname b@pgfprofile@show@edef@#1\endcsname{1}%
- }%
+ \pgfutil@ifundefined{b@pgfprofile@show@#1}{%
+ \pgferror{\string\pgfprofileshowinvocationsfor{#1} doesn't work: the argument is no profiler entry}%
+ }{%
+ \expandafter\gdef\csname b@pgfprofile@show@#1\endcsname{1}%
+ \expandafter\gdef\csname b@pgfprofile@show@edef@#1\endcsname{1}%
+ }%
}%
-\def\pgfprofile@no@optional@arg@text{<noarg>}
+\def\pgfprofile@no@optional@arg@text{<noarg>}%
\def\pgfprofileinvokecommand#1{%
- \pgfutil@ifnextchar[{\pgfprofileinvokecommand@{#1}}{\pgfprofileinvokecommand@{#1}[<noarg>]}%
+ \pgfutil@ifnextchar[{\pgfprofileinvokecommand@{#1}}{\pgfprofileinvokecommand@{#1}[<noarg>]}%
}%
\def\pgfprofileinvokecommand@#1[#2]{%
- \def\pgfprofileinvokecommand@cs{#1}%
- \def\pgfprofileinvokecommand@optarg{#2}%
- \edef\pgfprofileinvokecommand@profilerentryname{\csname pgfprofile@name@for@#1\endcsname}%
- \csname pgfprofile@repl@#1\endcsname%
+ \def\pgfprofileinvokecommand@cs{#1}%
+ \def\pgfprofileinvokecommand@optarg{#2}%
+ \edef\pgfprofileinvokecommand@profilerentryname{\csname pgfprofile@name@for@#1\endcsname}%
+ \csname pgfprofile@repl@#1\endcsname%
}%
% #1 contains ALL arguments, including any braces.
\def\pgfprofile@invokeorig#1{%
- % re-insert the control sequence name and the optional argument:
- % this wasn't possible directly.
- \begingroup
- \toks1=\expandafter{\pgfprofileinvokecommand@optarg}%
- \toks2={#1}%
- \toks3=\expandafter{\csname pgfprofile@orig@\pgfprofileinvokecommand@cs\endcsname}%
- %
- \ifx\pgfprofileinvokecommand@optarg\pgfprofile@no@optional@arg@text
- % no [] argument after original command:
- \xdef\pgfprofile@invokeorig@doitfinally{\the\toks3 \the\toks2 }%%
- \else
- \xdef\pgfprofile@invokeorig@doitfinally{\the\toks3[\the\toks1]\the\toks2 }%
- \fi
- \if1\csname b@pgfprofile@show@\pgfprofileinvokecommand@profilerentryname\endcsname
- \pgfprofile@orig@show
- \fi
- \endgroup
- \edef\pgfprofile@temp{{\pgfprofileinvokecommand@cs}{\pgfprofileinvokecommand@profilerentryname}}%
- \expandafter\pgfprofile@invokeorig@\pgfprofile@temp%
+ % re-insert the control sequence name and the optional argument:
+ % this wasn't possible directly.
+ \begingroup
+ \toks1=\expandafter{\pgfprofileinvokecommand@optarg}%
+ \toks2={#1}%
+ \toks3=\expandafter{\csname pgfprofile@orig@\pgfprofileinvokecommand@cs\endcsname}%
+ %
+ \ifx\pgfprofileinvokecommand@optarg\pgfprofile@no@optional@arg@text
+ % no [] argument after original command:
+ \xdef\pgfprofile@invokeorig@doitfinally{\the\toks3 \the\toks2 }%%
+ \else
+ \xdef\pgfprofile@invokeorig@doitfinally{\the\toks3[\the\toks1]\the\toks2 }%
+ \fi
+ \if1\csname b@pgfprofile@show@\pgfprofileinvokecommand@profilerentryname\endcsname
+ \pgfprofile@orig@show
+ \fi
+ \endgroup
+ \edef\pgfprofile@temp{{\pgfprofileinvokecommand@cs}{\pgfprofileinvokecommand@profilerentryname}}%
+ \expandafter\pgfprofile@invokeorig@\pgfprofile@temp%
}%
\def\pgfprofile@orig@show{%
- \toks4=\expandafter{\csname\pgfprofileinvokecommand@cs\endcsname}%
- \ifx\pgfprofileinvokecommand@optarg\pgfprofile@no@optional@arg@text
- \def\pgfprofile@orig@show@args{\the\toks2 }%
- \else
- \def\pgfprofile@orig@show@args{[\the\toks1] \the\toks2 }%
- \fi
- \if1\csname b@pgfprofile@show@edef@\pgfprofileinvokecommand@profilerentryname\endcsname
- \edef\pgfprofile@orig@show@args{\pgfprofile@orig@show@args}%
- \edef\pgfprofile@orig@show@args{\pgfprofile@orig@show@args}%
- \fi
- \immediate\write16{pgflibraryprofiler: calling
- \#\csname c@pgfprofile@numinvocations@\pgfprofileinvokecommand@profilerentryname\endcsname\space
- (\the\toks4 \pgfprofile@orig@show@args)}%
+ \toks4=\expandafter{\csname\pgfprofileinvokecommand@cs\endcsname}%
+ \ifx\pgfprofileinvokecommand@optarg\pgfprofile@no@optional@arg@text
+ \def\pgfprofile@orig@show@args{\the\toks2 }%
+ \else
+ \def\pgfprofile@orig@show@args{[\the\toks1] \the\toks2 }%
+ \fi
+ \if1\csname b@pgfprofile@show@edef@\pgfprofileinvokecommand@profilerentryname\endcsname
+ \edef\pgfprofile@orig@show@args{\pgfprofile@orig@show@args}%
+ \edef\pgfprofile@orig@show@args{\pgfprofile@orig@show@args}%
+ \fi
+ \pgf@typeout{pgflibraryprofiler: calling
+ \#\csname c@pgfprofile@numinvocations@\pgfprofileinvokecommand@profilerentryname\endcsname\space
+ (\the\toks4 \pgfprofile@orig@show@args)}%
}%
% #1: control sequence name (without backslash)
% #2: profiler entry name
\def\pgfprofile@invokeorig@#1#2{%
- % this check should avoid save stack impact
- \pgfprofileifisrunning{#2}{%
- \pgfprofile@invokeorig@doitfinally%
- }{%
- \pgfprofilestart{#2}%
- \pgfprofile@invokeorig@doitfinally%
- \pgfprofileend{#2}%
- }%
+ % this check should avoid save stack impact
+ \pgfprofileifisrunning{#2}{%
+ \pgfprofile@invokeorig@doitfinally%
+ }{%
+ \pgfprofilestart{#2}%
+ \pgfprofile@invokeorig@doitfinally%
+ \pgfprofileend{#2}%
+ }%
}%
\def\pgfprofileinvokecommand@uptoonearg{%
- \pgfutil@ifnextchar\bgroup{\pgfprofileinvokecommand@onearg}{\pgfprofileinvokecommand@noarg}%
+ \pgfutil@ifnextchar\bgroup{\pgfprofileinvokecommand@onearg}{\pgfprofileinvokecommand@noarg}%
}%
\def\pgfprofileinvokecommand@onearg#1{%
- \pgfprofile@invokeorig{{#1}}%
+ \pgfprofile@invokeorig{{#1}}%
}%
\def\pgfprofileinvokecommand@noarg{%
- \pgfprofile@invokeorig{}%
+ \pgfprofile@invokeorig{}%
}%
@@ -302,51 +302,51 @@
% result in the same result as if just one \pgfprofilestart command
% has been issued.
\def\pgfprofilestart#1{%
- \pgfprofileifisrunning{#1}{%
- \relax
- }{%
- \expandafter\xdef\csname c@pgfprofile@elapsed@at@start@#1\endcsname{\the\pgfutil@pdfelapsedtime}%
- \expandafter\gdef\csname c@pgfprofile@subtractforself@#1\endcsname{0}%
- \pgfprofile@advance{c@pgfprofile@numinvocations@#1}{1}%
- \pgfprofilestackpush{#1}%
- }%
- \pgfprofile@advance{c@pgfprofile@semaphor@#1}{1}%
+ \pgfprofileifisrunning{#1}{%
+ \relax
+ }{%
+ \expandafter\xdef\csname c@pgfprofile@elapsed@at@start@#1\endcsname{\the\pgfutil@pdfelapsedtime}%
+ \expandafter\gdef\csname c@pgfprofile@subtractforself@#1\endcsname{0}%
+ \pgfprofile@advance{c@pgfprofile@numinvocations@#1}{1}%
+ \pgfprofilestackpush{#1}%
+ }%
+ \pgfprofile@advance{c@pgfprofile@semaphor@#1}{1}%
}%
% Stops / Interrupts timing of the profiler entry named `#1'.
\def\pgfprofileend#1{%
- \pgfprofile@advance{c@pgfprofile@semaphor@#1}{-1}%
- \pgfprofileifisrunning{#1}{%
- \relax
- }{%
- \begingroup
- \c@pgf@countb=\pgfutil@pdfelapsedtime\relax
- \advance\c@pgf@countb by-\csname c@pgfprofile@elapsed@at@start@#1\endcsname\relax
- %
- \pgfprofilestackpop\pgfretval
- \edef\pgfprofile@temp{#1}%
- \ifx\pgfprofile@temp\pgfretval
- \else
- \immediate\write16{pgflibraryprofiler WARNING: possible error in self time computation...}%
- \fi
- \pgfprofilestackifempty{%
- \relax
- }{%
- \pgfprofilestacktop\pgfretval
- \pgfprofile@advance{c@pgfprofile@subtractforself@\pgfretval}{\c@pgf@countb}%
- }%
- %
- \pgfprofile@advance{c@pgfprofile@elapsedtotal@#1}{\c@pgf@countb}%
- \advance\c@pgf@countb by-\csname c@pgfprofile@subtractforself@#1\endcsname\relax
- \pgfprofile@advance{c@pgfprofile@elapsedself@#1}{\c@pgf@countb}%
- \endgroup
- }%
+ \pgfprofile@advance{c@pgfprofile@semaphor@#1}{-1}%
+ \pgfprofileifisrunning{#1}{%
+ \relax
+ }{%
+ \begingroup
+ \c@pgf@countb=\pgfutil@pdfelapsedtime\relax
+ \advance\c@pgf@countb by-\csname c@pgfprofile@elapsed@at@start@#1\endcsname\relax
+ %
+ \pgfprofilestackpop\pgfretval
+ \edef\pgfprofile@temp{#1}%
+ \ifx\pgfprofile@temp\pgfretval
+ \else
+ \pgf@typeout{pgflibraryprofiler WARNING: possible error in self time computation...}%
+ \fi
+ \pgfprofilestackifempty{%
+ \relax
+ }{%
+ \pgfprofilestacktop\pgfretval
+ \pgfprofile@advance{c@pgfprofile@subtractforself@\pgfretval}{\c@pgf@countb}%
+ }%
+ %
+ \pgfprofile@advance{c@pgfprofile@elapsedtotal@#1}{\c@pgf@countb}%
+ \advance\c@pgf@countb by-\csname c@pgfprofile@subtractforself@#1\endcsname\relax
+ \pgfprofile@advance{c@pgfprofile@elapsedself@#1}{\c@pgf@countb}%
+ \endgroup
+ }%
}%
% invokes '#2' if '#1' is currently running and '#3' if not.
\def\pgfprofileifisrunning#1#2#3{%
- \ifnum\csname c@pgfprofile@semaphor@#1\endcsname=0 \def\pgfprofileifisrunning@next{#3}\else \def\pgfprofileifisrunning@next{#2}\fi
- \pgfprofileifisrunning@next
+ \ifnum\csname c@pgfprofile@semaphor@#1\endcsname=0 \def\pgfprofileifisrunning@next{#3}\else \def\pgfprofileifisrunning@next{#2}\fi
+ \pgfprofileifisrunning@next
}%
% Sets the profiler entry whose total time is used to compute all
@@ -355,50 +355,50 @@
% Stops all running timings and postprocesses them.
\def\pgfprofilepostprocess{%
- \begingroup
- %
- % prepare files.
- \c@pgf@countb=\time
- \divide\c@pgf@countb by60
- \c@pgf@countd=\c@pgf@countb
- \multiply\c@pgf@countd by60
- \c@pgf@countc=\time
- \advance\c@pgf@countc by-\c@pgf@countd
- \immediate\openout\w@pgf@writea=\jobname.profiler.\the\year-\pgfprofiletotwodigitstr\month-\pgfprofiletotwodigitstr\day_\pgfprofiletotwodigitstr\c@pgf@countb h_\pgfprofiletotwodigitstr\c@pgf@countc m.dat
- \immediate\write\w@pgf@writea{%
- \pgfprofile@percent relative values are measured against the totaltime of `\pgfprofile@rel'.%
- }%
- \immediate\write16{pgflibraryprofiler: relative values are measured against the totaltime of `\pgfprofile@rel'.}%
- \immediate\write\w@pgf@writea{%
- profilerentry\pgfprofile@TAB
- totaltime[s]\pgfprofile@TAB
- totaltime[percent]\pgfprofile@TAB
- selftime[s]\pgfprofile@TAB
- selftime[percent]\pgfprofile@TAB
- numinvocations\pgfprofile@TAB}%
- %
- %
- % compute main time and prepare computation of relative times:
- \pgfprofileifisrunning{\pgfprofile@rel}{%
- \pgfprofileend{\pgfprofile@rel}%
- }{}%
- \pgf@xa=\csname c@pgfprofile@elapsedtotal@\pgfprofile@rel\endcsname sp
- \edef\pgfprofiletotaltime{\pgf@sys@tonumber\pgf@xa}%
- \pgfmathreciprocal@{\pgfprofiletotaltime}%
- \let\pgfprofiletotaltime@inv=\pgfmathresult
- %
- % postprocess each of them:
- \pgfprofile@all@registered@list@foreach{%
- \pgfprofileifisrunning{##1}{%
- \pgfprofileend{##1}%
- }{}%
- \pgfprofilepostprocess@single{##1}%
- }%
- \immediate\write\w@pgf@writea{%
- \pgfprofile@percent\space vim: ts=40 nowrap nostartofline
- }%
- \immediate\closeout\w@pgf@writea
- \endgroup
+ \begingroup
+ %
+ % prepare files.
+ \c@pgf@countb=\time
+ \divide\c@pgf@countb by60
+ \c@pgf@countd=\c@pgf@countb
+ \multiply\c@pgf@countd by60
+ \c@pgf@countc=\time
+ \advance\c@pgf@countc by-\c@pgf@countd
+ \immediate\openout\w@pgf@writea=\jobname.profiler.\the\year-\pgfprofiletotwodigitstr\month-\pgfprofiletotwodigitstr\day_\pgfprofiletotwodigitstr\c@pgf@countb h_\pgfprofiletotwodigitstr\c@pgf@countc m.dat
+ \immediate\write\w@pgf@writea{%
+ \pgfprofile@percent relative values are measured against the totaltime of `\pgfprofile@rel'.%
+ }%
+ \pgf@typeout{pgflibraryprofiler: relative values are measured against the totaltime of `\pgfprofile@rel'.}%
+ \immediate\write\w@pgf@writea{%
+ profilerentry\pgfprofile@TAB
+ totaltime[s]\pgfprofile@TAB
+ totaltime[percent]\pgfprofile@TAB
+ selftime[s]\pgfprofile@TAB
+ selftime[percent]\pgfprofile@TAB
+ numinvocations\pgfprofile@TAB}%
+ %
+ %
+ % compute main time and prepare computation of relative times:
+ \pgfprofileifisrunning{\pgfprofile@rel}{%
+ \pgfprofileend{\pgfprofile@rel}%
+ }{}%
+ \pgf@xa=\csname c@pgfprofile@elapsedtotal@\pgfprofile@rel\endcsname sp
+ \edef\pgfprofiletotaltime{\pgf@sys@tonumber\pgf@xa}%
+ \pgfmathreciprocal@{\pgfprofiletotaltime}%
+ \let\pgfprofiletotaltime@inv=\pgfmathresult
+ %
+ % postprocess each of them:
+ \pgfprofile@all@registered@list@foreach{%
+ \pgfprofileifisrunning{##1}{%
+ \pgfprofileend{##1}%
+ }{}%
+ \pgfprofilepostprocess@single{##1}%
+ }%
+ \immediate\write\w@pgf@writea{%
+ \pgfprofile@percent\space vim: ts=40 nowrap nostartofline
+ }%
+ \immediate\closeout\w@pgf@writea
+ \endgroup
}%
{%
@@ -415,116 +415,116 @@
\catcode`\%=12 \gdef\pgfprofile@percent{%}}
\def\pgfprofilepostprocess@single#1{%
- \begingroup
- \pgf@xa=\csname c@pgfprofile@elapsedtotal@#1\endcsname sp
- \pgf@xb=\csname c@pgfprofile@elapsedself@#1\endcsname sp
- \pgf@ya=\pgfprofiletotaltime@inv\pgf@xa
- \pgf@yb=\pgfprofiletotaltime@inv\pgf@xb
- \multiply\pgf@ya by100
- \multiply\pgf@yb by100
- \edef\pgfprofilecur@total{\pgf@sys@tonumber\pgf@xa}%
- \edef\pgfprofilecur@self{\pgf@sys@tonumber\pgf@xb}%
- \edef\pgfprofilecur@total@rel{\pgf@sys@tonumber\pgf@ya}%
- \edef\pgfprofilecur@self@rel{\pgf@sys@tonumber\pgf@yb}%
- \immediate\write16{
- pgflibraryprofiler(#1)
- \pgfprofile@lbrace
- total time=\pgfprofilecur@total sec; (\pgfprofilecur@total@rel\pgfprofile@percent)
- self time=\pgfprofilecur@self sec; (\pgfprofilecur@self@rel\pgfprofile@percent)
- invocations=\csname c@pgfprofile@numinvocations@#1\endcsname;
- \pgfprofile@rbrace
- }%
- \immediate\write\w@pgf@writea{%
- #1\pgfprofile@TAB
- \pgfprofilecur@total\pgfprofile@TAB
- \pgfprofilecur@total@rel\pgfprofile@TAB
- \pgfprofilecur@self\pgfprofile@TAB
- \pgfprofilecur@self@rel\pgfprofile@TAB
- \csname c@pgfprofile@numinvocations@#1\endcsname\pgfprofile@TAB
- }%
- \endgroup
+ \begingroup
+ \pgf@xa=\csname c@pgfprofile@elapsedtotal@#1\endcsname sp
+ \pgf@xb=\csname c@pgfprofile@elapsedself@#1\endcsname sp
+ \pgf@ya=\pgfprofiletotaltime@inv\pgf@xa
+ \pgf@yb=\pgfprofiletotaltime@inv\pgf@xb
+ \multiply\pgf@ya by100
+ \multiply\pgf@yb by100
+ \edef\pgfprofilecur@total{\pgf@sys@tonumber\pgf@xa}%
+ \edef\pgfprofilecur@self{\pgf@sys@tonumber\pgf@xb}%
+ \edef\pgfprofilecur@total@rel{\pgf@sys@tonumber\pgf@ya}%
+ \edef\pgfprofilecur@self@rel{\pgf@sys@tonumber\pgf@yb}%
+ \pgf@typeout{
+ pgflibraryprofiler(#1)
+ \pgfprofile@lbrace
+ total time=\pgfprofilecur@total sec; (\pgfprofilecur@total@rel\pgfprofile@percent)
+ self time=\pgfprofilecur@self sec; (\pgfprofilecur@self@rel\pgfprofile@percent)
+ invocations=\csname c@pgfprofile@numinvocations@#1\endcsname;
+ \pgfprofile@rbrace
+ }%
+ \immediate\write\w@pgf@writea{%
+ #1\pgfprofile@TAB
+ \pgfprofilecur@total\pgfprofile@TAB
+ \pgfprofilecur@total@rel\pgfprofile@TAB
+ \pgfprofilecur@self\pgfprofile@TAB
+ \pgfprofilecur@self@rel\pgfprofile@TAB
+ \csname c@pgfprofile@numinvocations@#1\endcsname\pgfprofile@TAB
+ }%
+ \endgroup
}%
% Invokes '#2' for each element of the command separated list '#1'.
% the current list element is available as '#1' inside of '#2'.
\long\def\pgfprofileforeachentryinCSV#1#2{%
- \long\def\pgfprofileinvokeforeach@@##1{#2}%
- \pgfprofileforeachentryinCSVisterminated@loop#1,\pgfeov
+ \long\def\pgfprofileinvokeforeach@@##1{#2}%
+ \pgfprofileforeachentryinCSVisterminated@loop#1,\pgfeov
}%
\long\def\pgfprofileforeachentryinCSVisterminated@loop{%
- \pgfutil@ifnextchar\pgfeov{\pgfutil@gobble}{\pgfprofileforeachentryinCSV@next}%
+ \pgfutil@ifnextchar\pgfeov{\pgfutil@gobble}{\pgfprofileforeachentryinCSV@next}%
}%
\long\def\pgfprofileforeachentryinCSV@next#1,{%
- \pgfprofileinvokeforeach@@{#1}%
- \pgfprofileforeachentryinCSVisterminated@loop%
+ \pgfprofileinvokeforeach@@{#1}%
+ \pgfprofileforeachentryinCSVisterminated@loop%
}%
-\xdef\pgfprofile@all@registered@list{}
-\xdef\pgfprofile@currently@running@list{}
+\xdef\pgfprofile@all@registered@list{}%
+\xdef\pgfprofile@currently@running@list{}%
\def\pgfprofile@all@registered@list@add#1{%
- \ifx\pgfprofile@all@registered@list\pgfutil@empty
- \xdef\pgfprofile@all@registered@list{#1}%
- \else
- \xdef\pgfprofile@all@registered@list{\pgfprofile@all@registered@list,#1}%
- \fi
+ \ifx\pgfprofile@all@registered@list\pgfutil@empty
+ \xdef\pgfprofile@all@registered@list{#1}%
+ \else
+ \xdef\pgfprofile@all@registered@list{\pgfprofile@all@registered@list,#1}%
+ \fi
}%
\def\pgfprofile@all@registered@list@foreach#1{%
- \expandafter\pgfprofileforeachentryinCSV\expandafter{\pgfprofile@all@registered@list}{#1}%
+ \expandafter\pgfprofileforeachentryinCSV\expandafter{\pgfprofile@all@registered@list}{#1}%
}%
\def\pgfprofile@advance#1#2{%
- \begingroup
- \c@pgf@counta=\csname #1\endcsname\relax
- \advance\c@pgf@counta by#2\relax
- \expandafter\xdef\csname #1\endcsname{\the\c@pgf@counta}%
- \endgroup
+ \begingroup
+ \c@pgf@counta=\csname #1\endcsname\relax
+ \advance\c@pgf@counta by#2\relax
+ \expandafter\xdef\csname #1\endcsname{\the\c@pgf@counta}%
+ \endgroup
}%
\def\pgfprofile@cs@to@name@#1#2\relax{\def\pgfretval{#2}}
% defines '\pgfretval' to be the control sequences name of '#1' *without* the backslash.
\def\pgfprofile@cs@to@name#1{%
- \expandafter\pgfprofile@cs@to@name@\string#1\relax
+ \expandafter\pgfprofile@cs@to@name@\string#1\relax
}%
\newcount\c@pgfprofile@stacktop
\c@pgfprofile@stacktop=-1
\def\pgfprofilestackpush#1{%
- \global\advance\c@pgfprofile@stacktop by1
- \expandafter\xdef\csname pgfprofile@stack@\the\c@pgfprofile@stacktop\endcsname{#1}%
+ \global\advance\c@pgfprofile@stacktop by1
+ \expandafter\xdef\csname pgfprofile@stack@\the\c@pgfprofile@stacktop\endcsname{#1}%
}%
% pops the current stack top to macro #1
\def\pgfprofilestackpop#1{%
- \pgfprofilestacktop#1%
- \global\advance\c@pgfprofile@stacktop by-1
+ \pgfprofilestacktop#1%
+ \global\advance\c@pgfprofile@stacktop by-1
}%
% returns the stack's top to macro #1
\def\pgfprofilestacktop#1{%
- \expandafter\let\expandafter#1\csname pgfprofile@stack@\the\c@pgfprofile@stacktop\endcsname
+ \expandafter\let\expandafter#1\csname pgfprofile@stack@\the\c@pgfprofile@stacktop\endcsname
}%
\def\pgfprofilestackifempty#1#2{%
- \ifnum\c@pgfprofile@stacktop<0 #1\else #2\fi
+ \ifnum\c@pgfprofile@stacktop<0 #1\else #2\fi
}%
-\def\pgfprofiletotwodigitstr#1{\ifnum#1<10 0\the#1\else\the#1\fi}
+\def\pgfprofiletotwodigitstr#1{\ifnum#1<10 0\the#1\else\the#1\fi}%
-\pgfprofilenew{main job}
-\pgfprofilestart{main job}
+\pgfprofilenew{main job}%
+\pgfprofilestart{main job}%
\expandafter\xdef\csname c@pgfprofile@elapsed@at@start@main job\endcsname{0}%
-\pgfprofilesetrel{main job}
+\pgfprofilesetrel{main job}%
\pgfutil@ifundefined{AtEndDocument}{%
- % no latex. ok.
+ % no latex. ok.
}{%
- % do latex specific stuff:
- \pgfprofilenew{preamble}
- \pgfprofilestart{preamble}
- \expandafter\xdef\csname c@pgfprofile@elapsed@at@start@preamble\endcsname{0}%
- \AtBeginDocument{\pgfprofileend{preamble}}%
- %
- \AtEndDocument{\pgfprofilepostprocess}%
+ % do latex specific stuff:
+ \pgfprofilenew{preamble}
+ \pgfprofilestart{preamble}
+ \expandafter\xdef\csname c@pgfprofile@elapsed@at@start@preamble\endcsname{0}%
+ \AtBeginDocument{\pgfprofileend{preamble}}%
+ %
+ \AtEndDocument{\pgfprofilepostprocess}%
}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshadings.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshadings.code.tex
index 285f6d21772..22aa92ffb35 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshadings.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshadings.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshadings.code.tex,v 1.2 2008/10/29 23:06:34 tantau Exp $
+\ProvidesFileRCS{pgflibraryshadings.code.tex}
%
@@ -20,7 +20,7 @@
{}
{ % x y
2 copy % ... x y x y
- 2 copy abs exch abs add 0.0001 ge
+ 2 copy abs exch abs add 0.0001 ge
{atan 360.0 div} % ... x y heading; heading being in
%the interval [0, 1.0]
{ pop } % silently deal with error: return
@@ -58,7 +58,7 @@
1 index mul % Q P i H' S V T
7 2 roll % V T Q P i H' S
pop pop % V T Q P i
- %%%
+ %%%
% end of BLOCK B. The rest is just stack manipulation
dup 0.5 le % TEST II [ i == 0 ]
{ % BLOCK C [ take stack to V T P ]
@@ -92,7 +92,7 @@
ifelse % for III
}
ifelse % for II
-}
+}%
\pgfdeclarefunctionalshading{color wheel black center}
{\pgfpoint{-50bp}{-50bp}}
@@ -100,7 +100,7 @@
{}
{ % x y
2 copy % ... x y x y
- 2 copy abs exch abs add 0.0001 ge
+ 2 copy abs exch abs add 0.0001 ge
{atan 360.0 div} % ... x y heading; heading being in
%the interval [0, 1.0]
{ pop } % silently deal with error: return
@@ -138,7 +138,7 @@
1 index mul % Q P i H' S V T
7 2 roll % V T Q P i H' S
pop pop % V T Q P i
- %%%
+ %%%
% end of BLOCK B. The rest is just stack manipulation
dup 0.5 le % TEST II [ i == 0 ]
{ % BLOCK C [ take stack to V T P ]
@@ -172,20 +172,20 @@
ifelse % for III
}
ifelse % for II
-}
+}%
\pgfdeclarefunctionalshading{color wheel}
{\pgfpoint{-50bp}{-50bp}}
{\pgfpoint{50bp}{50bp}}
{}
{ % x y
- 2 copy abs exch abs add 0.0001 ge
+ 2 copy abs exch abs add 0.0001 ge
{atan 360.0 div} % ... x y heading; heading being in
%the interval [0, 1.0]
{ pop } % silently deal with error: return
% arbitrary heading of zero for origin
ifelse % because we will use it for 'Hue'
- 1.0 1.0 % ... H S V
+ 1.0 1.0 % ... H S V
% C version to use as model:
% H' = H * 6
% i = floor(H')
@@ -208,7 +208,7 @@
1 index mul % Q P i H' S V T
7 2 roll % V T Q P i H' S
pop pop % V T Q P i
- %%%
+ %%%
% end of BLOCK B. The rest is just stack manipulation
dup 0.5 le % TEST II [ i == 0 ]
{ % BLOCK C [ take stack to V T P ]
@@ -242,17 +242,17 @@
ifelse % for III
}
ifelse % for II
-}
+}%
%
% A bilinear interpolation.
%
-\colorlet{lower left}{white}
-\colorlet{lower right}{white}
-\colorlet{upper left}{white}
-\colorlet{upper right}{white}
+\colorlet{lower left}{white}%
+\colorlet{lower right}{white}%
+\colorlet{upper left}{white}%
+\colorlet{upper right}{white}%
\pgfdeclarefunctionalshading[lower left,lower right,upper left,upper right]{bilinear interpolation}
{\pgfpointorigin}
@@ -264,13 +264,13 @@
25 sub 50 div exch 25 sub 50 div 2 copy % Calculate y/100 x/100.
% 100 div exch 100 div 2 copy % Calculate y/100 x/100.
neg 1 add exch neg 1 add % Calculate 1-y/100 1-x/100.
- 3 1 roll 2 copy exch 5 2 roll 6 copy 6 copy % Set up stack.
+ 3 1 roll 2 copy exch 5 2 roll 6 copy 6 copy % Set up stack.
\pgf@lib@shadings@llred mul exch \pgf@lib@shadings@lrred mul add mul % Process red component.
4 1 roll
\pgf@lib@shadings@urred mul exch \pgf@lib@shadings@ulred mul add mul
add
13 1 roll
- \pgf@lib@shadings@llgreen mul exch \pgf@lib@shadings@lrgreen mul add mul % Process green component.
+ \pgf@lib@shadings@llgreen mul exch \pgf@lib@shadings@lrgreen mul add mul % Process green component.
4 1 roll
\pgf@lib@shadings@urgreen mul exch \pgf@lib@shadings@ulgreen mul add mul
add
@@ -279,7 +279,7 @@
4 1 roll
\pgf@lib@shadings@urblue mul exch \pgf@lib@shadings@ulblue mul add mul
add
-}
+}%
%
@@ -293,7 +293,7 @@
12.5 div exch 12.5 div exch
1 index 1 index
% Stack: c_r c_i z_r z_i
- % Formula: z' = z^2 + c = (z_r + i z_i)^2 + c_r + i c_i
+ % Formula: z' = z^2 + c = (z_r + i z_i)^2 + c_r + i c_i
% = (z_r^2 - z_i^2 + c_r) + i (2 z_r z_i + c_i)
%
% First iteration
@@ -402,8 +402,8 @@
} { pop pop 1000.0 1000.0 } ifelse
% Compute distance
dup mul exch
- dup mul
+ dup mul
add sqrt
dup 4 1 roll
2 gt { pop pop 2.0 exch div 1.0 exch sub dup dup} {pop pop 0.0 0.0 0.0} ifelse
-}
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex
index 90f26eb7211..f964dca2751 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex
@@ -7,10 +7,10 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarysnakes.code.tex,v 1.25 2013/07/15 12:05:34 tantau Exp $
+\ProvidesFileRCS{pgflibrarysnakes.code.tex}
-\pgfwarning{Snakes have been superseded by decorations. Use the decoration libraries instead of the snakes library}
+\pgfwarning{Snakes have been superseded by decorations. Use the decoration libraries instead of the snakes library}%
-\usepgflibrary{decorations.pathmorphing,decorations.pathreplacing,decorations.shapes}
+\usepgflibrary{decorations.pathmorphing,decorations.pathreplacing,decorations.shapes}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysvg.path.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysvg.path.code.tex
index a385cf199f5..59ea0915460 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysvg.path.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysvg.path.code.tex
@@ -7,10 +7,10 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarysvg.path.code.tex,v 1.7 2013/09/23 18:04:36 tantau Exp $
+\ProvidesFileRCS{pgflibrarysvg.path.code.tex}
-\usepgfmodule{parser}
+\usepgfmodule{parser}%
@@ -25,7 +25,7 @@
% issues a sequences of appropriate \pgfpath commands for this
% path. For a description of the compressed svg path syntax, see a
% book on svg.
-%
+%
% The notion of a pixel used by svg makes no sense in pgf (actually
% it does not really make sense in svg either, but never mind), and
% instead of pixels "pt" is used as the basic unit. Use coordinate
@@ -34,13 +34,13 @@
% Example:
%
% \pgfpathsvg{M10 20 L 30-20 0 1}
-%
+%
% % this has the same effect as
-%
+%
% \pgfpathmoveto{\pgfpoint{10pt}{20pt}}
% \pgfpathlineto{\pgfpint{30pt}{-20pt}}
% \pgfpathlineto{\pgfpint{0pt}{1pt}}
-%
+%
\def\pgfpathsvg#1{%
\let\pgf@lib@svg@finish@prev\relax%
@@ -52,7 +52,7 @@
\pgf@lib@svg@last@y\pgf@y%
\let\pgf@lib@svg@num=\pgfutil@empty%
\pgfparserparse{svgpath}#1"%
-}
+}%
@@ -72,12 +72,12 @@
% previous control points. This is done in the following two
% variables. If they are empty, there was no previous control point of
% the desired kind, in which case the specification prescribes that
-% the start point is used.
+% the start point is used.
-\def\pgf@lib@svg@clear@bezier@quad{
+\def\pgf@lib@svg@clear@bezier@quad{%
\let\pgf@lib@svg@bezier@last=\pgfutil@empty
\let\pgf@lib@svg@quad@last=\pgfutil@empty
-}
+}%
\pgf@lib@svg@clear@bezier@quad
%
@@ -90,7 +90,7 @@
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@moveto}
-}
+}%
\def\pgf@lib@svg@moveto{%
\pgf@lib@svg@clear@bezier@quad%
@@ -98,7 +98,7 @@
\pgf@lib@svg@last@y=\pgf@lib@svg@get@num{1}pt%
\pgfpathmoveto{\pgfqpoint{\pgf@lib@svg@last@x}{\pgf@lib@svg@last@y}}%
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@lineto}
-}
+}%
% Handle a relative moveto:
@@ -107,7 +107,7 @@
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@moveto@rel}
-}
+}%
\def\pgf@lib@svg@moveto@rel{%
\pgf@lib@svg@clear@bezier@quad%
@@ -115,7 +115,7 @@
\advance\pgf@lib@svg@last@y by\pgf@lib@svg@get@num{1}pt%
\pgfpathmoveto{\pgfqpoint{\pgf@lib@svg@last@x}{\pgf@lib@svg@last@y}}%
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@lineto@rel}
-}
+}%
% Handle a lineto:
@@ -124,7 +124,7 @@
{
\pgf@lib@svg@finish@prev%
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@lineto}
-}
+}%
\def\pgf@lib@svg@lineto{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -135,7 +135,7 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@svg@last@x}{\pgf@lib@svg@last@y}}%
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@lineto}%
\fi
-}
+}%
% Handle a relative lineto:
@@ -144,7 +144,7 @@
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@lineto@rel}
-}
+}%
\def\pgf@lib@svg@lineto@rel{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -155,7 +155,7 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@svg@last@x}{\pgf@lib@svg@last@y}}%
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@lineto@rel}%
\fi
-}
+}%
% Handle a closepath:
@@ -163,12 +163,12 @@
\pgfparserdef{svgpath}{all}{the letter Z}
{
\pgf@lib@svg@closepath
-}
+}%
\pgfparserdef{svgpath}{all}{the letter z}
{
\pgf@lib@svg@closepath
-}
+}%
\def\pgf@lib@svg@closepath{
\pgf@lib@svg@finish@prev
@@ -176,12 +176,12 @@
\let\pgf@lib@svg@finish@prev=\relax
\pgf@lib@svg@clear@bezier@quad%
\pgfparserswitch{initial}%
-}
+}%
% Ignore spaces if no other rules says differently:
-\pgfparserdef{svgpath}{all}{blank space \space}{}
+\pgfparserdef{svgpath}{all}{blank space \space}{}%
@@ -192,7 +192,7 @@
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{1}{\pgf@lib@svg@hlineto}
-}
+}%
\def\pgf@lib@svg@hlineto{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -202,13 +202,13 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@svg@last@x}{\pgf@lib@svg@last@y}}%
\pgf@lib@svg@read@nums{1}{\pgf@lib@svg@hlineto}
\fi
-}
+}%
\pgfparserdef{svgpath}{all}{the letter h}
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{1}{\pgf@lib@svg@hlineto@rel}
-}
+}%
\def\pgf@lib@svg@hlineto@rel{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -218,7 +218,7 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@svg@last@x}{\pgf@lib@svg@last@y}}%
\pgf@lib@svg@read@nums{1}{\pgf@lib@svg@hlineto@rel}
\fi
-}
+}%
% Handle a horizontal lineto:
@@ -227,7 +227,7 @@
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{1}{\pgf@lib@svg@vlineto}
-}
+}%
\def\pgf@lib@svg@vlineto{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -237,13 +237,13 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@svg@last@x}{\pgf@lib@svg@last@y}}%
\pgf@lib@svg@read@nums{1}{\pgf@lib@svg@vlineto}
\fi
-}
+}%
\pgfparserdef{svgpath}{all}{the letter v}
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{1}{\pgf@lib@svg@vlineto@rel}
-}
+}%
\def\pgf@lib@svg@vlineto@rel{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -253,7 +253,7 @@
\pgfpathlineto{\pgfqpoint{\pgf@lib@svg@last@x}{\pgf@lib@svg@last@y}}%
\pgf@lib@svg@read@nums{1}{\pgf@lib@svg@vlineto@rel}
\fi
-}
+}%
@@ -264,7 +264,7 @@
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{6}{\pgf@lib@svg@curveto}
-}
+}%
\def\pgf@lib@svg@curveto{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -283,14 +283,14 @@
% Go on
\pgf@lib@svg@read@nums{6}{\pgf@lib@svg@curveto}
\fi
-}
+}%
\pgfparserdef{svgpath}{all}{the letter c}
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{6}{\pgf@lib@svg@curveto@rel}
-}
+}%
\def\pgf@lib@svg@curveto@rel{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -308,7 +308,7 @@
\advance\pgf@lib@svg@last@y by\pgf@lib@svg@get@num{5}pt%
\pgf@lib@svg@read@nums{6}{\pgf@lib@svg@curveto@rel}
\fi
-}
+}%
@@ -318,7 +318,7 @@
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{4}{\pgf@lib@svg@curveto@smooth}
-}
+}%
\def\pgf@lib@svg@curveto@smooth{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -351,14 +351,14 @@
% Go on
\pgf@lib@svg@read@nums{4}{\pgf@lib@svg@curveto@smooth}
\fi
-}
+}%
\pgfparserdef{svgpath}{all}{the letter s}
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{4}{\pgf@lib@svg@curveto@rel@smooth}
-}
+}%
\def\pgf@lib@svg@curveto@rel@smooth{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -383,7 +383,7 @@
{\pgfpointadd{\pgfqpoint{\pgf@lib@svg@last@x}{\pgf@lib@svg@last@y}}{\pgfqpoint{\pgf@lib@svg@get@num{2}pt}{\pgf@lib@svg@get@num{3}pt}}}%
% Clear quadratic last point and save new last control point:
\let\pgf@lib@svg@quad@last=\pgfutil@empty%
- \pgf@process{\pgfpointadd{\pgfqpoint{\pgf@lib@svg@last@x}{\pgf@lib@svg@last@y}}{\pgfqpoint{\pgf@lib@svg@get@num{2}pt}{\pgf@lib@svg@get@num{3}pt}}}
+ \pgf@process{\pgfpointadd{\pgfqpoint{\pgf@lib@svg@last@x}{\pgf@lib@svg@last@y}}{\pgfqpoint{\pgf@lib@svg@get@num{0}pt}{\pgf@lib@svg@get@num{1}pt}}}
\edef\pgf@lib@svg@bezier@last{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}%
% update
\advance\pgf@lib@svg@last@x by\pgf@lib@svg@get@num{2}pt%
@@ -391,7 +391,7 @@
% Go on
\pgf@lib@svg@read@nums{4}{\pgf@lib@svg@curveto@rel@smooth}
\fi
-}
+}%
@@ -402,7 +402,7 @@
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{4}{\pgf@lib@svg@quad@curveto}
-}
+}%
\def\pgf@lib@svg@quad@curveto{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -420,14 +420,14 @@
% Go on
\pgf@lib@svg@read@nums{4}{\pgf@lib@svg@quad@curveto}
\fi
-}
+}%
\pgfparserdef{svgpath}{all}{the letter q}
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{4}{\pgf@lib@svg@quad@curveto@rel}
-}
+}%
\def\pgf@lib@svg@quad@curveto@rel{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -444,7 +444,7 @@
\advance\pgf@lib@svg@last@y by\pgf@lib@svg@get@num{3}pt%
\pgf@lib@svg@read@nums{4}{\pgf@lib@svg@quad@curveto@rel}
\fi
-}
+}%
@@ -453,7 +453,7 @@
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@quad@curveto@smooth}
-}
+}%
\def\pgf@lib@svg@quad@curveto@smooth{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -485,14 +485,14 @@
% Go on
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@quad@curveto@smooth}
\fi
-}
+}%
\pgfparserdef{svgpath}{all}{the letter t}
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@quad@curveto@rel@smooth}
-}
+}%
\def\pgf@lib@svg@quad@curveto@rel@smooth{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -524,7 +524,7 @@
% Go on
\pgf@lib@svg@read@nums{2}{\pgf@lib@svg@quad@curveto@rel@smooth}
\fi
-}
+}%
@@ -534,7 +534,7 @@
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{7}{\pgf@lib@svg@arcto}
-}
+}%
\def\pgf@lib@svg@arcto{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -553,13 +553,13 @@
% Go on
\pgf@lib@svg@read@nums{7}{\pgf@lib@svg@arcto}
\fi
-}
+}%
\pgfparserdef{svgpath}{all}{the letter a}
{
\pgf@lib@svg@finish@prev
\pgf@lib@svg@read@nums{7}{\pgf@lib@svg@arcto@rel}
-}
+}%
\def\pgf@lib@svg@arcto@rel{%
\ifnum\pgf@lib@svg@count=0\relax% nothing read
@@ -578,7 +578,7 @@
% Go on
\pgf@lib@svg@read@nums{7}{\pgf@lib@svg@arcto@rel}
\fi
-}
+}%
@@ -590,7 +590,7 @@
{
\pgf@lib@svg@finish@prev
\pgfparserswitch{final}
-}
+}%
@@ -610,26 +610,26 @@
\fi
#2
}
-}
+}%
-\def\pgf@lib@svg@get@num#1{\csname pgf@lib@svg@num@#1\endcsname}
+\def\pgf@lib@svg@get@num#1{\csname pgf@lib@svg@num@#1\endcsname}%
\pgfparserdef{svgpath}{num}{the character ,}
{
\pgf@lib@svg@handle@spacer
-}
+}%
\pgfparserdef{svgpath}{num}{\meaning\pgfutil@sptoken}
{
\pgf@lib@svg@handle@spacer
-}
+}%
\pgfparserdef{svgpath}{num}{the character -}
{
\pgf@lib@svg@handle@spacer
\def\pgf@lib@svg@num{-}%
-}
+}%
\def\pgf@lib@svg@handle@spacer{
\ifx\pgf@lib@svg@num\pgfutil@empty%
@@ -642,44 +642,40 @@
\fi
\let\pgf@lib@svg@num=\pgfutil@empty%
\fi
-}
+}%
% Handle digits
\pgfparserdef{svgpath}{all}{the character .}
-{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num.}}
+{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num.}}%
\pgfparserdef{svgpath}{all}{the character 0}
-{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num0}}
+{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num0}}%
\pgfparserdef{svgpath}{all}{the character 1}
-{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num1}}
+{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num1}}%
\pgfparserdef{svgpath}{all}{the character 2}
-{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num2}}
+{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num2}}%
\pgfparserdef{svgpath}{all}{the character 3}
-{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num3}}
+{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num3}}%
\pgfparserdef{svgpath}{all}{the character 4}
-{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num4}}
+{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num4}}%
\pgfparserdef{svgpath}{all}{the character 5}
-{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num5}}
+{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num5}}%
\pgfparserdef{svgpath}{all}{the character 6}
-{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num6}}
+{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num6}}%
\pgfparserdef{svgpath}{all}{the character 7}
-{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num7}}
+{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num7}}%
\pgfparserdef{svgpath}{all}{the character 8}
-{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num8}}
+{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num8}}%
\pgfparserdef{svgpath}{all}{the character 9}
-{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num9}}
-
-
-
-
+{\expandafter\def\expandafter\pgf@lib@svg@num\expandafter{\pgf@lib@svg@num9}}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytimelines.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytimelines.code.tex
new file mode 100644
index 00000000000..dd9b38fdc46
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytimelines.code.tex
@@ -0,0 +1,197 @@
+% Copyright 2015 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS{pgflibrarytimelines.code.tex}
+
+
+% We need the animation module:
+
+\usepgfmodule{animations}%
+
+
+% Starts a fixed timeline
+%
+% Description:
+%
+% A (fixed) timeline defines for a specific number of seconds how a
+% different objects are animated. In contrast to a dynamic timeline,
+% the animation must be fixed beforehand, that is, in a fixed timeline
+% you can specify things like "be there after 2s and there after 4s
+% and be red after 5s" but not "be there after that other animation
+% has finished and then stay there until another animation has
+% finished or something has been clicked". Note that while a fixed
+% timeline describes a fixed sequence of animations, the starting
+% point of the timeline may depend for instance on when some button is
+% clicked; only when the timeline's animation gets started there is
+% nothing dynamic about it till its end (a timeline may be ended
+% prematurely, however).
+%
+% This command allows you to start a timeline. Once the timeline has
+% been started, you can call the following macro repeatedly:
+%
+% \pgftimelineentry{time}{object}{attribute}{value}
+%
+% The time is some time when the given attribute should have the given
+% value. The important thing is that the entries need not come in any
+% specific order; it is the job of the timeline library to sort them
+% into a sensible order.
+%
+% At the end of the timeline, you will have specified for a whole
+% bunch of objects and attributes their values at certain time
+% points. The macro \pgftimelineend will now call \pgfanimateattribute
+% for all attributes and objects mentioned in the timeline.
+%
+%
+% Internally, pgf keeps track of all objects in a timeline and all
+% attributes and sorts the times using a simple insertion sort (which
+% will be fastest when the times are given in increasing order as
+% happens most of the time).
+
+\def\pgftimelinebegin{%
+ \pgf@timeline@todo@saved=\pgf@timeline@todo%
+ \begingroup%
+ \advance\pgf@timeline@depth by1\relax%
+ \pgf@timeline@todo{}%
+}%
+
+\newcount\pgf@timeline@depth
+\newtoks\pgf@timeline@todo
+\newtoks\pgf@timeline@todo@saved
+
+
+% Ends a timeline
+%
+% Description:
+%
+% This command will scan \pgfanimateattribute for the objects and
+% attributes mentioned in the timeline.
+
+\def\pgftimelineend{%
+ \the\pgf@timeline@todo%
+ \endgroup%
+ \global\pgf@timeline@todo=\pgf@timeline@todo@saved%
+}%
+
+
+% Adds an entry to a timeline
+%
+% #1 = a time (evaluated using \pgfparsetime)
+% #2 = an object (a "whom" in the sense of pgfmoduleanimations, will
+% be expanded)
+% #3 = an attribute (in the sense of pgfmoduleanimations, will be expanded)
+% #4 = a value
+%
+% Description:
+%
+% Adds a new entry to the timeline. For a fixed #1, several calls to
+% this macro allow you to specify a key frame by specifying the
+% different values of the different attributes of the different
+% objects in the key frame.
+
+\def\pgftimelineentry#1#2#3#4{%
+ \begingroup%
+ \pgfparsetime{#1}%
+ \edef\pgf@timeline@whom{#2}%
+ \edef\pgf@timeline@attr{#3}%
+ \expandafter\let\expandafter\pgf@timeline@entry\csname pgf@tl@\pgf@timeline@whom @\pgf@timeline@attr @\the\pgf@timeline@depth\endcsname%
+ \ifx\pgf@timeline@entry\relax%
+ \edef\pgf@timeline@entry{\noexpand\pgf@timeline@setup{\pgf@timeline@whom}{\pgf@timeline@attr}}%
+ \fi%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@timeline@entry\expandafter\expandafter\expandafter%
+ {\expandafter\pgf@timeline@entry\expandafter\pgf@timeline@doentry\expandafter{\pgftimeresult}{#4}}%
+ \expandafter\global\expandafter\let\csname pgf@tl@\pgf@timeline@whom @\pgf@timeline@attr @\the\pgf@timeline@depth\endcsname\pgf@timeline@entry%
+ \global\pgf@timeline@todo\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgf@timeline@todo\expandafter\pgf@timeline@handle\csname pgf@tl@\pgf@timeline@whom @\pgf@timeline@attr @\the\pgf@timeline@depth\endcsname}%
+ \endgroup%
+}%
+
+
+\newtoks\pgf@timeline@sort@toks
+\countdef\pgf@timeline@sort@count=0\relax%
+\countdef\pgf@timeline@count@down=1\relax%
+\countdef\pgf@timeline@count@down@next=2\relax%
+
+% Handles one entry in a timeline
+
+\def\pgf@timeline@handle#1{%
+ \ifx#1\relax%
+ \else%
+ % Do an inserting sort. The time is kept in the dimension registers
+ % 1 to n, the value in the token registers 1 to n.
+ {%
+ \pgf@timeline@sort@count=1\relax%
+ #1% will start a group
+ % Now we collect the toks:
+ \pgf@timeline@count@down=1\relax%
+ \pgf@timeline@sort@toks{}%
+ \pgfutil@loop%
+ \ifnum\pgf@timeline@count@down<\pgf@timeline@sort@count\relax%
+ \edef\pgf@temp{\the\pgf@timeline@sort@toks\noexpand\pgf@timeline@donow{\the\dimen\pgf@timeline@count@down}{\the\toks\pgf@timeline@count@down}}%
+ \pgf@timeline@sort@toks\expandafter{\pgf@temp}%
+ \advance\pgf@timeline@count@down by1\relax%
+ \pgfutil@repeat%
+ % Do computations now
+ \pgf@timeline@compute@duration%
+ %
+ \edef\pgf@temp{\noexpand\pgf@timeline@call@attribute{\pgf@timeline@whom}{\pgf@timeline@attr}{\the\pgf@timeline@sort@toks}}
+ \expandafter%
+ \endgroup%
+ \pgf@temp%
+ }%
+ \global\let#1\relax% cleanup
+ \fi%
+}%
+
+\def\pgf@timeline@compute@duration{%
+ \advance\pgf@timeline@sort@count by-1\relax%
+ \pgfmathparse{\the\dimen\pgf@timeline@sort@count}%
+ \global\let\pgf@timeline@duration\pgfmathresult%
+}%
+
+
+\def\pgf@timeline@setup#1#2{%
+ \def\pgf@timeline@whom{#1}%
+ \def\pgf@timeline@attr{#2}%
+ \begingroup%
+}%
+
+\def\pgf@timeline@doentry#1#2{%
+ \dimen\pgf@timeline@sort@count=#1pt\relax%
+ \toks\pgf@timeline@sort@count{#2}%
+ \pgf@timeline@count@down\pgf@timeline@sort@count\relax%
+ \pgfutil@loop%
+ \ifnum\pgf@timeline@count@down>1\relax%
+ \pgf@timeline@count@down@next\pgf@timeline@count@down%
+ \advance\pgf@timeline@count@down@next by-1\relax%
+ \ifdim\dimen\pgf@timeline@count@down<\dimen\pgf@timeline@count@down@next\relax%
+ % Swap:
+ \toks0=\toks\pgf@timeline@count@down%
+ \dimen0=\dimen\pgf@timeline@count@down%
+ \toks\pgf@timeline@count@down=\toks\pgf@timeline@count@down@next%
+ \dimen\pgf@timeline@count@down=\dimen\pgf@timeline@count@down@next%
+ \toks\pgf@timeline@count@down@next=\toks0\relax%
+ \dimen\pgf@timeline@count@down@next=\dimen0\relax%
+ \pgf@timeline@count@down\pgf@timeline@count@down@next\relax%
+ \else%
+ \pgf@timeline@count@down1\relax%
+ \fi%
+ \pgfutil@repeat%
+ \advance\pgf@timeline@sort@count by1\relax%
+}%
+
+
+\def\pgf@timeline@call@attribute#1#2#3{%
+ \pgfanimateattributecode{#2}{\pgfkeys{/pgf/animation/whom={#1},/pgf/animation/duration=\pgf@timeline@duration}#3}%
+}%
+
+\def\pgf@timeline@donow#1#2{%
+ \pgfkeys{/pgf/animation/key time={#1/\pgf@timeline@duration}}%
+ \pgfkeys{/pgf/animation/value={#2}}%
+}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.ee.IEC.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.ee.IEC.code.tex
index e79634a06ea..62b1a260299 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.ee.IEC.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.ee.IEC.code.tex
@@ -13,20 +13,20 @@
%
\pgfdeclareshape{var resistor IEC}
-{
- \inheritsavedanchors[from=rectangle ee]
- \inheritanchor[from=rectangle ee]{center}
- \inheritanchor[from=rectangle ee]{north}
- \inheritanchor[from=rectangle ee]{south}
- \inheritanchor[from=rectangle ee]{east}
- \inheritanchor[from=rectangle ee]{west}
- \inheritanchor[from=rectangle ee]{north east}
- \inheritanchor[from=rectangle ee]{north west}
- \inheritanchor[from=rectangle ee]{south east}
- \inheritanchor[from=rectangle ee]{south west}
- \inheritanchor[from=rectangle ee]{input}
- \inheritanchor[from=rectangle ee]{output}
- \inheritanchorborder[from=rectangle ee]
+{%
+ \inheritsavedanchors[from=rectangle ee]%
+ \inheritanchor[from=rectangle ee]{center}%
+ \inheritanchor[from=rectangle ee]{north}%
+ \inheritanchor[from=rectangle ee]{south}%
+ \inheritanchor[from=rectangle ee]{east}%
+ \inheritanchor[from=rectangle ee]{west}%
+ \inheritanchor[from=rectangle ee]{north east}%
+ \inheritanchor[from=rectangle ee]{north west}%
+ \inheritanchor[from=rectangle ee]{south east}%
+ \inheritanchor[from=rectangle ee]{south west}%
+ \inheritanchor[from=rectangle ee]{input}%
+ \inheritanchor[from=rectangle ee]{output}%
+ \inheritanchorborder[from=rectangle ee]%
\backgroundpath{
\pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
@@ -54,9 +54,9 @@
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yc}}%
\pgfutil@repeat%
\advance\pgf@xb by-.1pt%
- \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yc}}%
- }
-}
+ \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yc}}%
+ }%
+}%
@@ -65,7 +65,7 @@
%
\pgfdeclareshape{inductor IEC}
-{
+{%
\savedanchor\northeast{%
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%
@@ -75,7 +75,7 @@
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}%
\pgf@y=\pgf@ya%
\advance\pgf@y by\pgf@yb%
- }
+ }%
\savedanchor\southwest{%
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%
@@ -83,19 +83,19 @@
\advance\pgf@x by -.5\pgf@xb%
\pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
\pgf@y=-\pgf@ya%
- }
-
- \anchor{center}{\pgfpointorigin}
- \inheritanchor[from=rectangle ee]{north}
- \inheritanchor[from=rectangle ee]{south}
- \inheritanchor[from=rectangle ee]{east}
- \inheritanchor[from=rectangle ee]{west}
- \inheritanchor[from=rectangle ee]{north east}
- \inheritanchor[from=rectangle ee]{north west}
- \inheritanchor[from=rectangle ee]{south east}
- \inheritanchor[from=rectangle ee]{south west}
- \inheritanchor[from=rectangle ee]{input}
- \inheritanchor[from=rectangle ee]{output}
+ }%
+
+ \anchor{center}{\pgfpointorigin}%
+ \inheritanchor[from=rectangle ee]{north}%
+ \inheritanchor[from=rectangle ee]{south}%
+ \inheritanchor[from=rectangle ee]{east}%
+ \inheritanchor[from=rectangle ee]{west}%
+ \inheritanchor[from=rectangle ee]{north east}%
+ \inheritanchor[from=rectangle ee]{north west}%
+ \inheritanchor[from=rectangle ee]{south east}%
+ \inheritanchor[from=rectangle ee]{south west}%
+ \inheritanchor[from=rectangle ee]{input}%
+ \inheritanchor[from=rectangle ee]{output}%
\anchorborder{%
\ifdim\pgf@y<0pt%
@@ -112,8 +112,8 @@
\pgf@yc=\pgf@y%
\pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\northeast}}%
\fi%
- }
-
+ }%
+
\backgroundpath{
\pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}}
\pgf@xa=-\pgf@x \pgf@ya=0pt
@@ -127,12 +127,12 @@
\pgfutil@loop%
\advance\pgf@xa by2\pgf@xc\relax%
\ifdim\pgf@xa<\pgf@xb%
- \pgfpatharc{180}{0}{\pgf@xc}%
+ \pgfpatharc{180}{0}{\pgf@xc}%
\pgfutil@repeat%
\advance\pgf@xb by-.1pt%
- \pgfpathlineto{\pgfqpoint{\pgf@xb}{0pt}}%
- }
-}
+ \pgfpathlineto{\pgfqpoint{\pgf@xb}{0pt}}%
+ }%
+}%
@@ -142,20 +142,20 @@
%
\pgfdeclareshape{capacitor IEC}
-{
- \inheritsavedanchors[from=rectangle ee]
- \inheritanchor[from=rectangle ee]{center}
- \inheritanchor[from=rectangle ee]{north}
- \inheritanchor[from=rectangle ee]{south}
- \inheritanchor[from=rectangle ee]{east}
- \inheritanchor[from=rectangle ee]{west}
- \inheritanchor[from=rectangle ee]{north east}
- \inheritanchor[from=rectangle ee]{north west}
- \inheritanchor[from=rectangle ee]{south east}
- \inheritanchor[from=rectangle ee]{south west}
- \inheritanchor[from=rectangle ee]{input}
- \inheritanchor[from=rectangle ee]{output}
- \inheritanchorborder[from=rectangle ee]
+{%
+ \inheritsavedanchors[from=rectangle ee]%
+ \inheritanchor[from=rectangle ee]{center}%
+ \inheritanchor[from=rectangle ee]{north}%
+ \inheritanchor[from=rectangle ee]{south}%
+ \inheritanchor[from=rectangle ee]{east}%
+ \inheritanchor[from=rectangle ee]{west}%
+ \inheritanchor[from=rectangle ee]{north east}%
+ \inheritanchor[from=rectangle ee]{north west}%
+ \inheritanchor[from=rectangle ee]{south east}%
+ \inheritanchor[from=rectangle ee]{south west}%
+ \inheritanchor[from=rectangle ee]{input}%
+ \inheritanchor[from=rectangle ee]{output}%
+ \inheritanchorborder[from=rectangle ee]%
\backgroundpath{
\pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
@@ -166,8 +166,8 @@
\pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}}
\pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@ya}}
\pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}}
- }
-}
+ }%
+}%
@@ -177,20 +177,20 @@
%
\pgfdeclareshape{ground IEC}
-{
- \inheritsavedanchors[from=rectangle ee]
- \inheritanchor[from=rectangle ee]{center}
- \inheritanchor[from=rectangle ee]{north}
- \inheritanchor[from=rectangle ee]{south}
- \inheritanchor[from=rectangle ee]{east}
- \inheritanchor[from=rectangle ee]{west}
- \inheritanchor[from=rectangle ee]{north east}
- \inheritanchor[from=rectangle ee]{north west}
- \inheritanchor[from=rectangle ee]{south east}
- \inheritanchor[from=rectangle ee]{south west}
- \inheritanchor[from=rectangle ee]{input}
- \inheritanchor[from=rectangle ee]{output}
- \inheritanchorborder[from=rectangle ee]
+{%
+ \inheritsavedanchors[from=rectangle ee]%
+ \inheritanchor[from=rectangle ee]{center}%
+ \inheritanchor[from=rectangle ee]{north}%
+ \inheritanchor[from=rectangle ee]{south}%
+ \inheritanchor[from=rectangle ee]{east}%
+ \inheritanchor[from=rectangle ee]{west}%
+ \inheritanchor[from=rectangle ee]{north east}%
+ \inheritanchor[from=rectangle ee]{north west}%
+ \inheritanchor[from=rectangle ee]{south east}%
+ \inheritanchor[from=rectangle ee]{south west}%
+ \inheritanchor[from=rectangle ee]{input}%
+ \inheritanchor[from=rectangle ee]{output}%
+ \inheritanchorborder[from=rectangle ee]%
\backgroundpath{
\pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
@@ -213,8 +213,8 @@
\advance\pgf@yb by-\pgf@yc
\pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@ya}}
\pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}}
- }
-}
+ }%
+}%
@@ -224,20 +224,20 @@
%
\pgfdeclareshape{battery IEC}
-{
- \inheritsavedanchors[from=rectangle ee]
- \inheritanchor[from=rectangle ee]{center}
- \inheritanchor[from=rectangle ee]{north}
- \inheritanchor[from=rectangle ee]{south}
- \inheritanchor[from=rectangle ee]{east}
- \inheritanchor[from=rectangle ee]{west}
- \inheritanchor[from=rectangle ee]{north east}
- \inheritanchor[from=rectangle ee]{north west}
- \inheritanchor[from=rectangle ee]{south east}
- \inheritanchor[from=rectangle ee]{south west}
- \inheritanchor[from=rectangle ee]{input}
- \inheritanchor[from=rectangle ee]{output}
- \inheritanchorborder[from=rectangle ee]
+{%
+ \inheritsavedanchors[from=rectangle ee]%
+ \inheritanchor[from=rectangle ee]{center}%
+ \inheritanchor[from=rectangle ee]{north}%
+ \inheritanchor[from=rectangle ee]{south}%
+ \inheritanchor[from=rectangle ee]{east}%
+ \inheritanchor[from=rectangle ee]{west}%
+ \inheritanchor[from=rectangle ee]{north east}%
+ \inheritanchor[from=rectangle ee]{north west}%
+ \inheritanchor[from=rectangle ee]{south east}%
+ \inheritanchor[from=rectangle ee]{south west}%
+ \inheritanchor[from=rectangle ee]{input}%
+ \inheritanchor[from=rectangle ee]{output}%
+ \inheritanchorborder[from=rectangle ee]%
\backgroundpath{
\pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
@@ -253,8 +253,8 @@
\advance\pgf@yb by-\pgf@yc
\pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@ya}}
\pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}}
- }
-}
+ }%
+}%
%
@@ -263,20 +263,20 @@
\pgfdeclareshape{breakdown diode IEC}
-{
- \inheritsavedanchors[from=rectangle ee]
- \inheritanchor[from=rectangle ee]{center}
- \inheritanchor[from=rectangle ee]{north}
- \inheritanchor[from=rectangle ee]{south}
- \inheritanchor[from=rectangle ee]{east}
- \inheritanchor[from=rectangle ee]{west}
- \inheritanchor[from=rectangle ee]{north east}
- \inheritanchor[from=rectangle ee]{north west}
- \inheritanchor[from=rectangle ee]{south east}
- \inheritanchor[from=rectangle ee]{south west}
- \inheritanchor[from=rectangle ee]{input}
- \inheritanchor[from=rectangle ee]{output}
- \inheritanchorborder[from=rectangle ee]
+{%
+ \inheritsavedanchors[from=rectangle ee]%
+ \inheritanchor[from=rectangle ee]{center}%
+ \inheritanchor[from=rectangle ee]{north}%
+ \inheritanchor[from=rectangle ee]{south}%
+ \inheritanchor[from=rectangle ee]{east}%
+ \inheritanchor[from=rectangle ee]{west}%
+ \inheritanchor[from=rectangle ee]{north east}%
+ \inheritanchor[from=rectangle ee]{north west}%
+ \inheritanchor[from=rectangle ee]{south east}%
+ \inheritanchor[from=rectangle ee]{south west}%
+ \inheritanchor[from=rectangle ee]{input}%
+ \inheritanchor[from=rectangle ee]{output}%
+ \inheritanchorborder[from=rectangle ee]%
\backgroundpath{
\pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
@@ -295,9 +295,9 @@
\pgfpathlineto{\pgfqpoint{\pgf@xc}{\pgf@yc}}
\pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}}
\pgfpathclose
- }
+ }%
+
-
\beforebackgroundpath{
{
\pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
@@ -311,7 +311,7 @@
\pgfusepathqstroke
\pgf@xc=.5\pgf@xa
\advance\pgf@xc by.5\pgf@xb
- \pgftransformshift{\pgfqpoint{\pgf@xc}{\pgf@yc}}
+ \pgftransformshift{\pgfqpoint{\pgf@xc}{\pgf@yc}}
\pgf@yc=.5\pgf@yb
\advance\pgf@yc by-.5\pgf@ya
\pgftransformscale{\pgf@sys@tonumber{\pgf@yc}}
@@ -321,8 +321,8 @@
\pgfpathlineto{\pgfqpoint{.5pt}{1pt}}
\pgfusepathqstroke
}
- }
-}
+ }%
+}%
@@ -339,7 +339,7 @@
\pgfdeclareshape{generic circle IEC}
-{
+{%
% This shape is a generic circle, to which you can add something to
% the before background path using the key
% /pgf/generic circle IEC/before background
@@ -347,31 +347,31 @@
% setup such that the circle's center is at the origin and that the
% position \pgfpoint{1pt}{0pt} lies exactly on the top of the circle
% (and, there, on the middle of the line).
-
- \inheritsavedanchors[from=circle ee]
- \inheritanchorborder[from=circle ee]
- \inheritanchor[from=circle ee]{north}
- \inheritanchor[from=circle ee]{north west}
- \inheritanchor[from=circle ee]{north east}
- \inheritanchor[from=circle ee]{center}
- \inheritanchor[from=circle ee]{west}
- \inheritanchor[from=circle ee]{east}
- \inheritanchor[from=circle ee]{south}
- \inheritanchor[from=circle ee]{south west}
- \inheritanchor[from=circle ee]{south east}
- \inheritanchor[from=circle ee]{input}
- \inheritanchor[from=circle ee]{output}
- \inheritbackgroundpath[from=circle ee]
-
+
+ \inheritsavedanchors[from=circle ee]%
+ \inheritanchorborder[from=circle ee]%
+ \inheritanchor[from=circle ee]{north}%
+ \inheritanchor[from=circle ee]{north west}%
+ \inheritanchor[from=circle ee]{north east}%
+ \inheritanchor[from=circle ee]{center}%
+ \inheritanchor[from=circle ee]{west}%
+ \inheritanchor[from=circle ee]{east}%
+ \inheritanchor[from=circle ee]{south}%
+ \inheritanchor[from=circle ee]{south west}%
+ \inheritanchor[from=circle ee]{south east}%
+ \inheritanchor[from=circle ee]{input}%
+ \inheritanchor[from=circle ee]{output}%
+ \inheritbackgroundpath[from=circle ee]%
+
\beforebackgroundpath{
{
\centerpoint%
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
- \pgftransformshift{}
+ \pgftransformshift{}
\pgfutil@tempdima=\radius%
- \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\ifdim\pgf@xb<\pgf@yb%
\advance\pgfutil@tempdima by-\pgf@yb%
\else%
@@ -380,8 +380,8 @@
\pgftransformscale{\pgf@sys@tonumber{\pgfutil@tempdima}}
\pgfkeysvalueof{/pgf/generic circle IEC/before background}
}
- }
-}
+ }%
+}%
@@ -390,28 +390,28 @@
%
\pgfdeclareshape{generic diode IEC}
-{
+{%
% This shape is a generic diode, to which you can add something to
% the before background path using the key
% /pgf/generic diode IEC/before background
% When this key is invoked, the transformation matrix will have been
- % setup such that the center is at the tip of the diode. The
+ % setup such that the center is at the tip of the diode. The
% position \pgfpoint{1pt}{0pt} lies exactly on the top of the
- % (suggested) line before the diode.
-
- \inheritsavedanchors[from=rectangle ee]
- \inheritanchor[from=rectangle ee]{center}
- \inheritanchor[from=rectangle ee]{north}
- \inheritanchor[from=rectangle ee]{south}
- \inheritanchor[from=rectangle ee]{east}
- \inheritanchor[from=rectangle ee]{west}
- \inheritanchor[from=rectangle ee]{north east}
- \inheritanchor[from=rectangle ee]{north west}
- \inheritanchor[from=rectangle ee]{south east}
- \inheritanchor[from=rectangle ee]{south west}
- \inheritanchor[from=rectangle ee]{input}
- \inheritanchor[from=rectangle ee]{output}
- \inheritanchorborder[from=rectangle ee]
+ % (suggested) line before the diode.
+
+ \inheritsavedanchors[from=rectangle ee]%
+ \inheritanchor[from=rectangle ee]{center}%
+ \inheritanchor[from=rectangle ee]{north}%
+ \inheritanchor[from=rectangle ee]{south}%
+ \inheritanchor[from=rectangle ee]{east}%
+ \inheritanchor[from=rectangle ee]{west}%
+ \inheritanchor[from=rectangle ee]{north east}%
+ \inheritanchor[from=rectangle ee]{north west}%
+ \inheritanchor[from=rectangle ee]{south east}%
+ \inheritanchor[from=rectangle ee]{south west}%
+ \inheritanchor[from=rectangle ee]{input}%
+ \inheritanchor[from=rectangle ee]{output}%
+ \inheritanchorborder[from=rectangle ee]%
\backgroundpath{
\pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
@@ -427,9 +427,9 @@
\advance\pgf@yc by .5\pgf@yb
\pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yc}}
\pgfpathclose
- }
+ }%
+
-
\beforebackgroundpath{
{
\pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
@@ -441,31 +441,31 @@
\pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@yc}}
\pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yc}}
\pgfusepathqstroke
- \pgftransformshift{\pgfqpoint{\pgf@xb}{\pgf@yc}}
+ \pgftransformshift{\pgfqpoint{\pgf@xb}{\pgf@yc}}
\pgf@yc=.5\pgf@yb
\advance\pgf@yc by-.5\pgf@ya
\pgftransformscale{\pgf@sys@tonumber{\pgf@yc}}
\pgfkeysvalueof{/pgf/generic diode IEC/before background}
}
- }
-}
+ }%
+}%
\pgfkeys{
/pgf/generic circle IEC/before background/.initial=,
/pgf/generic diode IEC/before background/.initial=,
-}
+}%
%
-% Concacts
+% Contacts
%
\pgfdeclareshape{make contact IEC}
-{
+{%
\savedanchor\northeast{%
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%
@@ -475,7 +475,7 @@
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}%
\pgf@y=\pgf@ya%
\advance\pgf@y by\pgf@yb%
- }
+ }%
\savedanchor\southwest{%
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%
@@ -483,23 +483,23 @@
\advance\pgf@x by -.5\pgf@xb%
\pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
\pgf@y=-\pgf@ya%
- }
-
- \anchor{center}{\pgfpointorigin}
- \inheritanchor[from=rectangle ee]{north}
- \inheritanchor[from=rectangle ee]{south}
- \inheritanchor[from=rectangle ee]{east}
- \inheritanchor[from=rectangle ee]{west}
- \inheritanchor[from=rectangle ee]{north east}
- \inheritanchor[from=rectangle ee]{north west}
- \inheritanchor[from=rectangle ee]{south east}
- \inheritanchor[from=rectangle ee]{south west}
- \inheritanchor[from=rectangle ee]{input}
- \inheritanchor[from=rectangle ee]{output}
+ }%
+
+ \anchor{center}{\pgfpointorigin}%
+ \inheritanchor[from=rectangle ee]{north}%
+ \inheritanchor[from=rectangle ee]{south}%
+ \inheritanchor[from=rectangle ee]{east}%
+ \inheritanchor[from=rectangle ee]{west}%
+ \inheritanchor[from=rectangle ee]{north east}%
+ \inheritanchor[from=rectangle ee]{north west}%
+ \inheritanchor[from=rectangle ee]{south east}%
+ \inheritanchor[from=rectangle ee]{south west}%
+ \inheritanchor[from=rectangle ee]{input}%
+ \inheritanchor[from=rectangle ee]{output}%
\anchorborder{%
\ifdim\pgf@y<0pt%
- % tricky... simpilfy to the origin...
+ % tricky... simplify to the origin...
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
\pgf@process{\southwest}%
@@ -512,8 +512,8 @@
\pgf@yc=\pgf@y%
\pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\northeast}}%
\fi%
- }
-
+ }%
+
\backgroundpath{
\pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}}
\pgf@xa=-\pgf@x \pgf@ya=0pt
@@ -521,17 +521,17 @@
% Start point
\pgfpathmoveto{\pgfqpoint{\pgf@xa}{0pt}}
\pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}}
- }
-}
+ }%
+}%
%
-% Concacts
+% Contacts
%
\pgfdeclareshape{var make contact IEC}
-{
+{%
\savedanchor\northeast{%
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%
@@ -541,7 +541,7 @@
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}%
\pgf@y=\pgf@ya%
\advance\pgf@y by\pgf@yb%
- }
+ }%
\savedanchor\southwest{%
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%
@@ -551,23 +551,23 @@
\pgf@y=-\pgf@ya%
\pgf@xc=0.083333\pgf@x%
\advance\pgf@y by\pgf@xc%
- }
-
- \anchor{center}{\pgfpointorigin}
- \inheritanchor[from=rectangle ee]{north}
- \inheritanchor[from=rectangle ee]{south}
- \inheritanchor[from=rectangle ee]{east}
- \inheritanchor[from=rectangle ee]{west}
- \inheritanchor[from=rectangle ee]{north east}
- \inheritanchor[from=rectangle ee]{north west}
- \inheritanchor[from=rectangle ee]{south east}
- \inheritanchor[from=rectangle ee]{south west}
- \inheritanchor[from=rectangle ee]{input}
- \inheritanchor[from=rectangle ee]{output}
+ }%
+
+ \anchor{center}{\pgfpointorigin}%
+ \inheritanchor[from=rectangle ee]{north}%
+ \inheritanchor[from=rectangle ee]{south}%
+ \inheritanchor[from=rectangle ee]{east}%
+ \inheritanchor[from=rectangle ee]{west}%
+ \inheritanchor[from=rectangle ee]{north east}%
+ \inheritanchor[from=rectangle ee]{north west}%
+ \inheritanchor[from=rectangle ee]{south east}%
+ \inheritanchor[from=rectangle ee]{south west}%
+ \inheritanchor[from=rectangle ee]{input}%
+ \inheritanchor[from=rectangle ee]{output}%
\anchorborder{%
\ifdim\pgf@y<0pt%
- % tricky... simpilfy to the origin...
+ % tricky... simplify to the origin...
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
\pgf@process{\southwest}%
@@ -579,8 +579,8 @@
\pgf@yc=\pgf@y%
\pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\northeast}}%
\fi%
- }
-
+ }%
+
\backgroundpath{
\pgf@process{\pgfpointadd{\northeast}{
\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}}
@@ -600,13 +600,13 @@
\pgfpathmoveto{\pgfpointadd{\pgfqpoint{\pgf@xa}{0pt}}{%
\pgfpointscale{\pgfutil@tempdima}{\pgfqpoint{\pgf@xc}{\pgf@yc}}}}
\pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}}
- }
-}
+ }%
+}%
\pgfdeclareshape{break contact IEC}
-{
+{%
\savedanchor\northeast{%
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%
@@ -616,7 +616,7 @@
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}%
\pgf@y=\pgf@ya%
\advance\pgf@y by\pgf@yb%
- }
+ }%
\savedanchor\southwest{%
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%
@@ -624,23 +624,23 @@
\advance\pgf@x by -.5\pgf@xb%
\pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
\pgf@y=-\pgf@ya%
- }
-
- \anchor{center}{\pgfpointorigin}
- \inheritanchor[from=rectangle ee]{north}
- \inheritanchor[from=rectangle ee]{south}
- \inheritanchor[from=rectangle ee]{east}
- \inheritanchor[from=rectangle ee]{west}
- \inheritanchor[from=rectangle ee]{north east}
- \inheritanchor[from=rectangle ee]{north west}
- \inheritanchor[from=rectangle ee]{south east}
- \inheritanchor[from=rectangle ee]{south west}
- \inheritanchor[from=rectangle ee]{input}
- \inheritanchor[from=rectangle ee]{output}
+ }%
+
+ \anchor{center}{\pgfpointorigin}%
+ \inheritanchor[from=rectangle ee]{north}%
+ \inheritanchor[from=rectangle ee]{south}%
+ \inheritanchor[from=rectangle ee]{east}%
+ \inheritanchor[from=rectangle ee]{west}%
+ \inheritanchor[from=rectangle ee]{north east}%
+ \inheritanchor[from=rectangle ee]{north west}%
+ \inheritanchor[from=rectangle ee]{south east}%
+ \inheritanchor[from=rectangle ee]{south west}%
+ \inheritanchor[from=rectangle ee]{input}%
+ \inheritanchor[from=rectangle ee]{output}%
\anchorborder{%
\ifdim\pgf@y<0pt%
- % tricky... simpilfy to the origin...
+ % tricky... simplify to the origin...
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
\pgf@process{\southwest}%
@@ -653,8 +653,8 @@
\pgf@yc=\pgf@y%
\pgf@process{\pgfpointborderrectangle{\pgfqpoint{\pgf@xc}{\the\pgf@yc}}{\northeast}}%
\fi%
- }
-
+ }%
+
\backgroundpath{
\pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}}
\pgf@xa=-\pgf@x \pgf@ya=0pt
@@ -669,12 +669,11 @@
\advance\pgf@xb by-\pgf@xc
\pgfpathlineto{\pgfqpoint{\pgf@xb}{0pt}}
\pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}}
- }
-}
+ }%
+}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.ee.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.ee.code.tex
index 30ecbff3c4d..4cfa4eed7d6 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.ee.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.ee.code.tex
@@ -16,25 +16,25 @@
% and an "output" anchor have been added at the left and right end.
\pgfdeclareshape{rectangle ee}
-{
- \inheritsavedanchors[from=rectangle]
- \inheritanchorborder[from=rectangle]
- \inheritanchor[from=rectangle]{north}
- \inheritanchor[from=rectangle]{north west}
- \inheritanchor[from=rectangle]{north east}
- \inheritanchor[from=rectangle]{center}
- \inheritanchor[from=rectangle]{west}
- \inheritanchor[from=rectangle]{east}
- \inheritanchor[from=rectangle]{mid}
- \inheritanchor[from=rectangle]{mid west}
- \inheritanchor[from=rectangle]{mid east}
- \inheritanchor[from=rectangle]{base}
- \inheritanchor[from=rectangle]{base west}
- \inheritanchor[from=rectangle]{base east}
- \inheritanchor[from=rectangle]{south}
- \inheritanchor[from=rectangle]{south west}
- \inheritanchor[from=rectangle]{south east}
- \inheritbackgroundpath[from=rectangle]
+{%
+ \inheritsavedanchors[from=rectangle]%
+ \inheritanchorborder[from=rectangle]%
+ \inheritanchor[from=rectangle]{north}%
+ \inheritanchor[from=rectangle]{north west}%
+ \inheritanchor[from=rectangle]{north east}%
+ \inheritanchor[from=rectangle]{center}%
+ \inheritanchor[from=rectangle]{west}%
+ \inheritanchor[from=rectangle]{east}%
+ \inheritanchor[from=rectangle]{mid}%
+ \inheritanchor[from=rectangle]{mid west}%
+ \inheritanchor[from=rectangle]{mid east}%
+ \inheritanchor[from=rectangle]{base}%
+ \inheritanchor[from=rectangle]{base west}%
+ \inheritanchor[from=rectangle]{base east}%
+ \inheritanchor[from=rectangle]{south}%
+ \inheritanchor[from=rectangle]{south west}%
+ \inheritanchor[from=rectangle]{south east}%
+ \inheritbackgroundpath[from=rectangle]%
% New:
\anchor{input}{
\pgf@process{\northeast}%
@@ -42,57 +42,57 @@
\pgf@process{\southwest}%
\pgf@y=.5\pgf@y%
\advance\pgf@y by \pgf@ya%
- }
+ }%
\anchor{output}{%
\pgf@process{\southwest}%
\pgf@ya=.5\pgf@y%
\pgf@process{\northeast}%
\pgf@y=.5\pgf@y%
\advance\pgf@y by \pgf@ya%
- }
-}
+ }%
+}%
\pgfdeclareshape{circle ee}
-{
- \inheritsavedanchors[from=circle]
- \inheritanchorborder[from=circle]
- \inheritanchor[from=circle]{north}
- \inheritanchor[from=circle]{north west}
- \inheritanchor[from=circle]{north east}
- \inheritanchor[from=circle]{center}
- \inheritanchor[from=circle]{west}
- \inheritanchor[from=circle]{east}
- \inheritanchor[from=circle]{mid}
- \inheritanchor[from=circle]{mid west}
- \inheritanchor[from=circle]{mid east}
- \inheritanchor[from=circle]{base}
- \inheritanchor[from=circle]{base west}
- \inheritanchor[from=circle]{base east}
- \inheritanchor[from=circle]{south}
- \inheritanchor[from=circle]{south west}
- \inheritanchor[from=circle]{south east}
- \inheritbackgroundpath[from=circle]
+{%
+ \inheritsavedanchors[from=circle]%
+ \inheritanchorborder[from=circle]%
+ \inheritanchor[from=circle]{north}%
+ \inheritanchor[from=circle]{north west}%
+ \inheritanchor[from=circle]{north east}%
+ \inheritanchor[from=circle]{center}%
+ \inheritanchor[from=circle]{west}%
+ \inheritanchor[from=circle]{east}%
+ \inheritanchor[from=circle]{mid}%
+ \inheritanchor[from=circle]{mid west}%
+ \inheritanchor[from=circle]{mid east}%
+ \inheritanchor[from=circle]{base}%
+ \inheritanchor[from=circle]{base west}%
+ \inheritanchor[from=circle]{base east}%
+ \inheritanchor[from=circle]{south}%
+ \inheritanchor[from=circle]{south west}%
+ \inheritanchor[from=circle]{south east}%
+ \inheritbackgroundpath[from=circle]%
% New:
- \anchor{input}{\centerpoint\advance\pgf@x by-\radius}
- \anchor{output}{\centerpoint\advance\pgf@x by\radius}
-}
+ \anchor{input}{\centerpoint\advance\pgf@x by-\radius}%
+ \anchor{output}{\centerpoint\advance\pgf@x by\radius}%
+}%
%
% Current direction indicator. This shape uses the current setting of
% the current direction arrow tip for the arrow. The shape is a
-% rectangle around the arrow tip.
+% rectangle around the arrow tip.
%
\pgfdeclareshape{direction ee}
-{
+{%
\savedanchor\northeast{
\pgf@x=0pt%
% Height is given by minimum height/2
\pgfmathsetlength{\pgf@y}{\pgfkeysvalueof{/pgf/minimum height}}%
\pgf@y=.5\pgf@y
- }
+ }%
\savedanchor\southwest{
% Left border is given by left extend
\pgfarrowtotallength{\pgfkeysvalueof{/pgf/direction ee arrow}}%
@@ -100,20 +100,20 @@
% Height is given by minimum height/2
\pgfmathsetlength{\pgf@y}{\pgfkeysvalueof{/pgf/minimum height}}%
\pgf@y=-.5\pgf@y
- }
-
- \inheritanchor[from=rectangle ee]{center}
- \inheritanchor[from=rectangle ee]{north}
- \inheritanchor[from=rectangle ee]{south}
- \inheritanchor[from=rectangle ee]{east}
- \inheritanchor[from=rectangle ee]{west}
- \inheritanchor[from=rectangle ee]{north east}
- \inheritanchor[from=rectangle ee]{north west}
- \inheritanchor[from=rectangle ee]{south east}
- \inheritanchor[from=rectangle ee]{south west}
- \inheritanchor[from=rectangle ee]{input}
- \inheritanchor[from=rectangle ee]{output}
- \inheritanchorborder[from=rectangle ee]
+ }%
+
+ \inheritanchor[from=rectangle ee]{center}%
+ \inheritanchor[from=rectangle ee]{north}%
+ \inheritanchor[from=rectangle ee]{south}%
+ \inheritanchor[from=rectangle ee]{east}%
+ \inheritanchor[from=rectangle ee]{west}%
+ \inheritanchor[from=rectangle ee]{north east}%
+ \inheritanchor[from=rectangle ee]{north west}%
+ \inheritanchor[from=rectangle ee]{south east}%
+ \inheritanchor[from=rectangle ee]{south west}%
+ \inheritanchor[from=rectangle ee]{input}%
+ \inheritanchor[from=rectangle ee]{output}%
+ \inheritanchorborder[from=rectangle ee]%
\nodeparts{}% no text
\behindbackgroundpath{
@@ -124,7 +124,7 @@
\pgfpathmoveto{\pgfqpoint{\pgf@xa}{0pt}}
\pgfpathlineto{\pgfqpoint{\pgf@xb}{0pt}}
\pgfusepathqstroke
- }
+ }%
\beforebackgroundpath{
{
@@ -132,19 +132,19 @@
\pgfarrowdraw{\pgfkeysvalueof{/pgf/direction ee arrow}}%
\pgfsys@endscope
}
- }
-}
+ }%
+}%
\pgfkeys{
/pgf/direction ee arrow/.initial=direction ee,
-}
+}%
% Special arrow for ee directions:
\pgfarrowsdeclare{direction ee}{direction ee}
-{
+{%
\pgfmathsetlength\pgfutil@tempdima{\pgfgetarrowoptions{direction ee}}%
\pgfutil@tempdima=.5\pgfutil@tempdima
\pgfarrowsleftextend{+-\pgfutil@tempdima}
@@ -159,13 +159,12 @@
\pgfpathlineto{\pgfqpoint{-0.5\pgfutil@tempdima}{-0.38268343237\pgfutil@tempdima}}
\pgfpathclose
\pgfusepathqfillstroke
-}
+}%
-\pgfsetarrowoptions{direction ee}{4pt}
+\pgfsetarrowoptions{direction ee}{4pt}%
\endinput
-
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.IEC.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.IEC.code.tex
index e137e113cdc..9b964996d70 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.IEC.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.IEC.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgflibrary{shapes.gates.logic}
+\usepgflibrary{shapes.gates.logic}%
\pgfkeys{/pgf/.cd,
and gate IEC symbol/.initial=$\char`\&$,
@@ -20,14 +20,14 @@
buffer gate IEC symbol/.initial=1,
logic gate IEC symbol align/.initial=top,
logic gate IEC symbol color/.initial=% no value
-}
+}%
\pgfkeys{/pgf/logic gate IEC symbol align/.cd,
top/.code=\pgftransformyshift{\innerhalfheight},
bottom/.code=\pgftransformyshift{-\innerhalfheight},
left/.code=\pgftransformxshift{-\innerhalfwidth},
- right/.code=\pgftransformxshift{\innerhalfwidth}
-}
+ right/.code=\pgftransformxshift{\innerhalfwidth},
+}%
\def\pgf@lib@sh@logicgates@IEC@foregroundpath#1{%
\dimensions%
@@ -45,7 +45,7 @@
\pgfkeysvalueof{/pgf/#1 gate IEC symbol}%
}%
}%
-}
+}%
\def\pgf@lib@sh@logicgates@dimensions@IEC#1{%
@@ -135,13 +135,13 @@
\multiply\pgfutil@tempdima#1\relax%
\advance\pgf@y\halfheight%
\advance\pgf@y-\pgfutil@tempdima%
-}
+}%
% Shape and gate IEC
%
-\pgfdeclareshape{and gate IEC}{
+\pgfdeclareshape{and gate IEC}{%
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@and gate IEC\endcsname{%
\pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
%
@@ -165,25 +165,25 @@
\saveddimen\outerinvertedradius{%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
\advance\pgf@x.5\pgflinewidth%
- }
+ }%
\savedmacro\dimensions{%
\pgf@lib@sh@logicgates@dimensions@IEC{and}%
- }
+ }%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\midpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+0.5ex}%
- }
+ }%
\savedanchor\basepoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt%
- }
+ }%
\anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}
+ \anchor{mid}{\midpoint}%
\anchor{mid west}{%
\dimensions%
\midpoint%
@@ -192,7 +192,7 @@
\dimensions%
\midpoint%
\advance\pgf@x\halfwidth}%
- \anchor{base}{\basepoint}
+ \anchor{base}{\basepoint}%
\anchor{base west}{%
\dimensions%
\basepoint%
@@ -209,7 +209,7 @@
\anchor{north west}{\dimensions\centerpoint\advance\pgf@x-\halfwidth\advance\pgf@y\halfheight}%
\anchor{south east}{\dimensions\centerpoint\advance\pgf@x\halfwidth\advance\pgf@y-\halfheight}%
\anchor{south west}{\dimensions\centerpoint\advance\pgf@x-\halfwidth\advance\pgf@y-\halfheight}%
- \anchor{output}{\dimensions\centerpoint\advance\pgf@x\halfwidth}
+ \anchor{output}{\dimensions\centerpoint\advance\pgf@x\halfwidth}%
\backgroundpath{%
\dimensions%
\pgf@xc\halfwidth%
@@ -241,19 +241,19 @@
\advance\pgf@yc-\pgfutil@tempdima%
\expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
{%
- \pgfpathcircle{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\invertedradius}%
+ \pgfpathcircle{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\invertedradius}%
}%
\fi%
\repeatpgfmathloop%
}%
- }
- \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{and}}
+ }%
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{and}}%
\anchorborder{%
\pgfextract@process\externalpoint{}%
\dimensions%
\pgfpointadd{\centerpoint}{\pgfpointborderrectangle{\externalpoint}{\pgfqpoint{\halfwidth}{\halfheight}}}%
- }%
-}
+ }%
+}%
@@ -261,7 +261,7 @@
% Shape nand gate IEC
%
-\pgfdeclareshape{nand gate IEC}{
+\pgfdeclareshape{nand gate IEC}{%
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nand gate IEC\endcsname{%
\pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
%
@@ -285,43 +285,43 @@
\saveddimen\outerinvertedradius{%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
\advance\pgf@x.5\pgflinewidth%
- }
+ }%
\savedmacro\dimensions{%
\pgf@lib@sh@logicgates@dimensions@IEC{nand}%
- }
+ }%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\midpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+0.5ex}%
- }
+ }%
\savedanchor\basepoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt%
- }
- \inheritanchor[from=and gate IEC]{center}
- \inheritanchor[from=and gate IEC]{mid}
- \inheritanchor[from=and gate IEC]{mid west}
- \inheritanchor[from=and gate IEC]{mid east}
- \inheritanchor[from=and gate IEC]{base}
- \inheritanchor[from=and gate IEC]{base west}
- \inheritanchor[from=and gate IEC]{base east}
- \inheritanchor[from=and gate IEC]{north}
- \inheritanchor[from=and gate IEC]{south}
- \inheritanchor[from=and gate IEC]{east}
- \inheritanchor[from=and gate IEC]{west}
- \inheritanchor[from=and gate IEC]{north east}
- \inheritanchor[from=and gate IEC]{north west}
- \inheritanchor[from=and gate IEC]{south east}
- \inheritanchor[from=and gate IEC]{south west}
+ }%
+ \inheritanchor[from=and gate IEC]{center}%
+ \inheritanchor[from=and gate IEC]{mid}%
+ \inheritanchor[from=and gate IEC]{mid west}%
+ \inheritanchor[from=and gate IEC]{mid east}%
+ \inheritanchor[from=and gate IEC]{base}%
+ \inheritanchor[from=and gate IEC]{base west}%
+ \inheritanchor[from=and gate IEC]{base east}%
+ \inheritanchor[from=and gate IEC]{north}%
+ \inheritanchor[from=and gate IEC]{south}%
+ \inheritanchor[from=and gate IEC]{east}%
+ \inheritanchor[from=and gate IEC]{west}%
+ \inheritanchor[from=and gate IEC]{north east}%
+ \inheritanchor[from=and gate IEC]{north west}%
+ \inheritanchor[from=and gate IEC]{south east}%
+ \inheritanchor[from=and gate IEC]{south west}%
\anchor{output}{%
\csname pgf@anchor@and gate IEC@east\endcsname%
\advance\pgf@x\invertedradius%
\advance\pgf@x\outerinvertedradius%
- }
+ }%
\backgroundpath{%
\csname pgf@sh@bg@and gate IEC\endcsname%
\pgfpathcircle{%
@@ -329,10 +329,10 @@
\advance\pgf@x\halfwidth%
\advance\pgf@x\invertedradius%
}{+\invertedradius}%
- }
- \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{nand}}
- \inheritanchorborder[from=and gate IEC]
-}
+ }%
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{nand}}%
+ \inheritanchorborder[from=and gate IEC]%
+}%
@@ -340,7 +340,7 @@
% Shape or gate IEC
%
-\pgfdeclareshape{or gate IEC}{
+\pgfdeclareshape{or gate IEC}{%
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@or gate IEC\endcsname{%
\pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
%
@@ -364,43 +364,43 @@
\saveddimen\outerinvertedradius{%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
\advance\pgf@x.5\pgflinewidth%
- }
+ }%
\savedmacro\dimensions{%
\pgf@lib@sh@logicgates@dimensions@IEC{or}%
- }
+ }%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\midpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+0.5ex}%
- }
+ }%
\savedanchor\basepoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt%
- }
- \inheritanchor[from=and gate IEC]{center}
- \inheritanchor[from=and gate IEC]{mid}
- \inheritanchor[from=and gate IEC]{mid west}
- \inheritanchor[from=and gate IEC]{mid east}
- \inheritanchor[from=and gate IEC]{base}
- \inheritanchor[from=and gate IEC]{base west}
- \inheritanchor[from=and gate IEC]{base east}
- \inheritanchor[from=and gate IEC]{north}
- \inheritanchor[from=and gate IEC]{south}
- \inheritanchor[from=and gate IEC]{east}
- \inheritanchor[from=and gate IEC]{west}
- \inheritanchor[from=and gate IEC]{north east}
- \inheritanchor[from=and gate IEC]{north west}
- \inheritanchor[from=and gate IEC]{south east}
- \inheritanchor[from=and gate IEC]{south west}
- \inheritanchor[from=and gate IEC]{output}
- \inheritbackgroundpath[from=and gate IEC]
- \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{or}}
- \inheritanchorborder[from=and gate IEC]
-}
+ }%
+ \inheritanchor[from=and gate IEC]{center}%
+ \inheritanchor[from=and gate IEC]{mid}%
+ \inheritanchor[from=and gate IEC]{mid west}%
+ \inheritanchor[from=and gate IEC]{mid east}%
+ \inheritanchor[from=and gate IEC]{base}%
+ \inheritanchor[from=and gate IEC]{base west}%
+ \inheritanchor[from=and gate IEC]{base east}%
+ \inheritanchor[from=and gate IEC]{north}%
+ \inheritanchor[from=and gate IEC]{south}%
+ \inheritanchor[from=and gate IEC]{east}%
+ \inheritanchor[from=and gate IEC]{west}%
+ \inheritanchor[from=and gate IEC]{north east}%
+ \inheritanchor[from=and gate IEC]{north west}%
+ \inheritanchor[from=and gate IEC]{south east}%
+ \inheritanchor[from=and gate IEC]{south west}%
+ \inheritanchor[from=and gate IEC]{output}%
+ \inheritbackgroundpath[from=and gate IEC]%
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{or}}%
+ \inheritanchorborder[from=and gate IEC]%
+}%
@@ -408,7 +408,7 @@
% Shape nor gate IEC
%
-\pgfdeclareshape{nor gate IEC}{
+\pgfdeclareshape{nor gate IEC}{%
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nor gate IEC\endcsname{%
\pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
%
@@ -432,43 +432,43 @@
\saveddimen\outerinvertedradius{%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
\advance\pgf@x.5\pgflinewidth%
- }
+ }%
\savedmacro\dimensions{%
\pgf@lib@sh@logicgates@dimensions@IEC{nor}%
- }
+ }%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\midpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+0.5ex}%
- }
+ }%
\savedanchor\basepoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt%
- }
- \inheritanchor[from=and gate IEC]{center}
- \inheritanchor[from=and gate IEC]{mid}
- \inheritanchor[from=and gate IEC]{mid west}
- \inheritanchor[from=and gate IEC]{mid east}
- \inheritanchor[from=and gate IEC]{base}
- \inheritanchor[from=and gate IEC]{base west}
- \inheritanchor[from=and gate IEC]{base east}
- \inheritanchor[from=and gate IEC]{north}
- \inheritanchor[from=and gate IEC]{south}
- \inheritanchor[from=and gate IEC]{east}
- \inheritanchor[from=and gate IEC]{west}
- \inheritanchor[from=and gate IEC]{north east}
- \inheritanchor[from=and gate IEC]{north west}
- \inheritanchor[from=and gate IEC]{south east}
- \inheritanchor[from=and gate IEC]{south west}
- \inheritanchor[from=nand gate IEC]{output}%
- \inheritbackgroundpath[from=nand gate IEC]
- \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{nor}}
- \inheritanchorborder[from=and gate IEC]
-}
+ }%
+ \inheritanchor[from=and gate IEC]{center}%
+ \inheritanchor[from=and gate IEC]{mid}%
+ \inheritanchor[from=and gate IEC]{mid west}%
+ \inheritanchor[from=and gate IEC]{mid east}%
+ \inheritanchor[from=and gate IEC]{base}%
+ \inheritanchor[from=and gate IEC]{base west}%
+ \inheritanchor[from=and gate IEC]{base east}%
+ \inheritanchor[from=and gate IEC]{north}%
+ \inheritanchor[from=and gate IEC]{south}%
+ \inheritanchor[from=and gate IEC]{east}%
+ \inheritanchor[from=and gate IEC]{west}%
+ \inheritanchor[from=and gate IEC]{north east}%
+ \inheritanchor[from=and gate IEC]{north west}%
+ \inheritanchor[from=and gate IEC]{south east}%
+ \inheritanchor[from=and gate IEC]{south west}%
+ \inheritanchor[from=nand gate IEC]{output}%%
+ \inheritbackgroundpath[from=nand gate IEC]%
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{nor}}%
+ \inheritanchorborder[from=and gate IEC]%
+}%
@@ -476,7 +476,7 @@
% Shape xor gate IEC
%
-\pgfdeclareshape{xor gate IEC}{
+\pgfdeclareshape{xor gate IEC}{%
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@xor gate IEC\endcsname{%
\pgf@lib@sh@logicgate@parseinputs{2}% Maximum 1024 (!) inputs.
%
@@ -500,43 +500,43 @@
\saveddimen\outerinvertedradius{%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
\advance\pgf@x.5\pgflinewidth%
- }
+ }%
\savedmacro\dimensions{%
\pgf@lib@sh@logicgates@dimensions@IEC{xor}%
- }
+ }%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\midpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+0.5ex}%
- }
+ }%
\savedanchor\basepoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt%
- }
- \inheritanchor[from=and gate IEC]{center}
- \inheritanchor[from=and gate IEC]{mid}
- \inheritanchor[from=and gate IEC]{mid west}
- \inheritanchor[from=and gate IEC]{mid east}
- \inheritanchor[from=and gate IEC]{base}
- \inheritanchor[from=and gate IEC]{base west}
- \inheritanchor[from=and gate IEC]{base east}
- \inheritanchor[from=and gate IEC]{north}
- \inheritanchor[from=and gate IEC]{south}
- \inheritanchor[from=and gate IEC]{east}
- \inheritanchor[from=and gate IEC]{west}
- \inheritanchor[from=and gate IEC]{north east}
- \inheritanchor[from=and gate IEC]{north west}
- \inheritanchor[from=and gate IEC]{south east}
- \inheritanchor[from=and gate IEC]{south west}
- \inheritanchor[from=and gate IEC]{output}
- \inheritbackgroundpath[from=and gate IEC]
- \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{xor}}
- \inheritanchorborder[from=and gate IEC]
-}
+ }%
+ \inheritanchor[from=and gate IEC]{center}%
+ \inheritanchor[from=and gate IEC]{mid}%
+ \inheritanchor[from=and gate IEC]{mid west}%
+ \inheritanchor[from=and gate IEC]{mid east}%
+ \inheritanchor[from=and gate IEC]{base}%
+ \inheritanchor[from=and gate IEC]{base west}%
+ \inheritanchor[from=and gate IEC]{base east}%
+ \inheritanchor[from=and gate IEC]{north}%
+ \inheritanchor[from=and gate IEC]{south}%
+ \inheritanchor[from=and gate IEC]{east}%
+ \inheritanchor[from=and gate IEC]{west}%
+ \inheritanchor[from=and gate IEC]{north east}%
+ \inheritanchor[from=and gate IEC]{north west}%
+ \inheritanchor[from=and gate IEC]{south east}%
+ \inheritanchor[from=and gate IEC]{south west}%
+ \inheritanchor[from=and gate IEC]{output}%
+ \inheritbackgroundpath[from=and gate IEC]%
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{xor}}%
+ \inheritanchorborder[from=and gate IEC]%
+}%
@@ -544,7 +544,7 @@
% Shape xnor gate IEC
%
-\pgfdeclareshape{xnor gate IEC}{
+\pgfdeclareshape{xnor gate IEC}{%
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@xnor gate IEC\endcsname{%
\pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
%
@@ -568,50 +568,50 @@
\saveddimen\outerinvertedradius{%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
\advance\pgf@x.5\pgflinewidth%
- }
+ }%
\savedmacro\dimensions{%
\pgf@lib@sh@logicgates@dimensions@IEC{xnor}%
- }
+ }%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\midpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+0.5ex}%
- }
+ }%
\savedanchor\basepoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt%
- }
- \inheritanchor[from=and gate IEC]{center}
- \inheritanchor[from=and gate IEC]{mid}
- \inheritanchor[from=and gate IEC]{mid west}
- \inheritanchor[from=and gate IEC]{mid east}
- \inheritanchor[from=and gate IEC]{base}
- \inheritanchor[from=and gate IEC]{base west}
- \inheritanchor[from=and gate IEC]{base east}
- \inheritanchor[from=and gate IEC]{north}
- \inheritanchor[from=and gate IEC]{south}
- \inheritanchor[from=and gate IEC]{east}
- \inheritanchor[from=and gate IEC]{west}
- \inheritanchor[from=and gate IEC]{north east}
- \inheritanchor[from=and gate IEC]{north west}
- \inheritanchor[from=and gate IEC]{south east}
- \inheritanchor[from=and gate IEC]{south west}
- \inheritanchor[from=nand gate IEC]{output}
- \inheritbackgroundpath[from=nand gate IEC]
- \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{xnor}}
- \inheritanchorborder[from=and gate IEC]
-}
+ }%
+ \inheritanchor[from=and gate IEC]{center}%
+ \inheritanchor[from=and gate IEC]{mid}%
+ \inheritanchor[from=and gate IEC]{mid west}%
+ \inheritanchor[from=and gate IEC]{mid east}%
+ \inheritanchor[from=and gate IEC]{base}%
+ \inheritanchor[from=and gate IEC]{base west}%
+ \inheritanchor[from=and gate IEC]{base east}%
+ \inheritanchor[from=and gate IEC]{north}%
+ \inheritanchor[from=and gate IEC]{south}%
+ \inheritanchor[from=and gate IEC]{east}%
+ \inheritanchor[from=and gate IEC]{west}%
+ \inheritanchor[from=and gate IEC]{north east}%
+ \inheritanchor[from=and gate IEC]{north west}%
+ \inheritanchor[from=and gate IEC]{south east}%
+ \inheritanchor[from=and gate IEC]{south west}%
+ \inheritanchor[from=nand gate IEC]{output}%
+ \inheritbackgroundpath[from=nand gate IEC]%
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{xnor}}%
+ \inheritanchorborder[from=and gate IEC]%
+}%
% Shape buffer gate IEC
%
-\pgfdeclareshape{buffer gate IEC}{
+\pgfdeclareshape{buffer gate IEC}{%
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@buffer gate IEC\endcsname{%
\pgf@lib@sh@logicgate@parseinputs{1}% Maximum 1 input.
%
@@ -629,43 +629,43 @@
\saveddimen\outerinvertedradius{%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
\advance\pgf@x.5\pgflinewidth%
- }
+ }%
\savedmacro\dimensions{%
\pgf@lib@sh@logicgates@dimensions@IEC{xor}%
- }
+ }%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\midpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+0.5ex}%
- }
+ }%
\savedanchor\basepoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt%
- }
- \inheritanchor[from=and gate IEC]{center}
- \inheritanchor[from=and gate IEC]{mid}
- \inheritanchor[from=and gate IEC]{mid west}
- \inheritanchor[from=and gate IEC]{mid east}
- \inheritanchor[from=and gate IEC]{base}
- \inheritanchor[from=and gate IEC]{base west}
- \inheritanchor[from=and gate IEC]{base east}
- \inheritanchor[from=and gate IEC]{north}
- \inheritanchor[from=and gate IEC]{south}
- \inheritanchor[from=and gate IEC]{east}
- \inheritanchor[from=and gate IEC]{west}
- \inheritanchor[from=and gate IEC]{north east}
- \inheritanchor[from=and gate IEC]{north west}
- \inheritanchor[from=and gate IEC]{south east}
- \inheritanchor[from=and gate IEC]{south west}
- \inheritanchor[from=and gate IEC]{output}
- \inheritbackgroundpath[from=and gate IEC]
- \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{buffer}}
- \inheritanchorborder[from=and gate IEC]
-}
+ }%
+ \inheritanchor[from=and gate IEC]{center}%
+ \inheritanchor[from=and gate IEC]{mid}%
+ \inheritanchor[from=and gate IEC]{mid west}%
+ \inheritanchor[from=and gate IEC]{mid east}%
+ \inheritanchor[from=and gate IEC]{base}%
+ \inheritanchor[from=and gate IEC]{base west}%
+ \inheritanchor[from=and gate IEC]{base east}%
+ \inheritanchor[from=and gate IEC]{north}%
+ \inheritanchor[from=and gate IEC]{south}%
+ \inheritanchor[from=and gate IEC]{east}%
+ \inheritanchor[from=and gate IEC]{west}%
+ \inheritanchor[from=and gate IEC]{north east}%
+ \inheritanchor[from=and gate IEC]{north west}%
+ \inheritanchor[from=and gate IEC]{south east}%
+ \inheritanchor[from=and gate IEC]{south west}%
+ \inheritanchor[from=and gate IEC]{output}%
+ \inheritbackgroundpath[from=and gate IEC]%
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{buffer}}%
+ \inheritanchorborder[from=and gate IEC]%
+}%
@@ -673,7 +673,7 @@
% Shape not gate IEC
%
-\pgfdeclareshape{not gate IEC}{
+\pgfdeclareshape{not gate IEC}{%
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@not gate IEC\endcsname{%
\pgf@lib@sh@logicgate@parseinputs{1}%
%
@@ -692,42 +692,42 @@
\saveddimen\outerinvertedradius{%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
\advance\pgf@x.5\pgflinewidth%
- }
+ }%
\savedmacro\dimensions{%
\pgf@lib@sh@logicgates@dimensions@IEC{not}%
- }
+ }%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\midpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+0.5ex}%
- }
+ }%
\savedanchor\basepoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt%
- }
- \inheritanchor[from=and gate IEC]{center}
- \inheritanchor[from=and gate IEC]{mid}
- \inheritanchor[from=and gate IEC]{mid west}
- \inheritanchor[from=and gate IEC]{mid east}
- \inheritanchor[from=and gate IEC]{base}
- \inheritanchor[from=and gate IEC]{base west}
- \inheritanchor[from=and gate IEC]{base east}
- \inheritanchor[from=and gate IEC]{north}
- \inheritanchor[from=and gate IEC]{south}
- \inheritanchor[from=and gate IEC]{east}
- \inheritanchor[from=and gate IEC]{west}
- \inheritanchor[from=and gate IEC]{north east}
- \inheritanchor[from=and gate IEC]{north west}
- \inheritanchor[from=and gate IEC]{south east}
- \inheritanchor[from=and gate IEC]{south west}
- \inheritanchor[from=nand gate IEC]{output}
- \inheritbackgroundpath[from=nand gate IEC]
- \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{not}}
- \inheritanchorborder[from=and gate IEC]
-}
-
-\endinput \ No newline at end of file
+ }%
+ \inheritanchor[from=and gate IEC]{center}%
+ \inheritanchor[from=and gate IEC]{mid}%
+ \inheritanchor[from=and gate IEC]{mid west}%
+ \inheritanchor[from=and gate IEC]{mid east}%
+ \inheritanchor[from=and gate IEC]{base}%
+ \inheritanchor[from=and gate IEC]{base west}%
+ \inheritanchor[from=and gate IEC]{base east}%
+ \inheritanchor[from=and gate IEC]{north}%
+ \inheritanchor[from=and gate IEC]{south}%
+ \inheritanchor[from=and gate IEC]{east}%
+ \inheritanchor[from=and gate IEC]{west}%
+ \inheritanchor[from=and gate IEC]{north east}%
+ \inheritanchor[from=and gate IEC]{north west}%
+ \inheritanchor[from=and gate IEC]{south east}%
+ \inheritanchor[from=and gate IEC]{south west}%
+ \inheritanchor[from=nand gate IEC]{output}%
+ \inheritbackgroundpath[from=nand gate IEC]%
+ \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{not}}%
+ \inheritanchorborder[from=and gate IEC]%
+}%
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.US.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.US.code.tex
index f941abd2647..3a496324f81 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.US.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.US.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgflibrary{shapes.gates.logic}
+\usepgflibrary{shapes.gates.logic}%
\newif\ifpgfgateanchorsuseboundingrectangle%
@@ -17,160 +17,160 @@
%
\pgfkeys{
/pgf/logic gate anchors use bounding box/.is if=pgfgateanchorsuseboundingrectangle,%
-}
+}%
-% An internal macro for calculating internal dimensions of
+% An internal macro for calculating internal dimensions of
% the US + CDH gates (excluding and gate US and nand gate US).
%
\def\pgf@lib@sh@logicgates@dimensions@orUS{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- %
- % Adjust the height for the number of inputs.
- %
- \c@pgf@counta\pgf@lib@sh@logicgate@numinputs%
- \advance\c@pgf@counta1\relax%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- \advance\pgf@ya\pgflinewidth%
- \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/logic gate input sep}}%
- \pgf@yb.5\pgf@yb%
- \ifdim\pgf@ya<\pgf@yb%
- \pgf@ya\pgf@yb%
- \fi%
- \multiply\pgf@ya\c@pgf@counta%
- \ifdim\pgf@y<\pgf@ya%
- \pgf@y\pgf@ya%
- \fi%
- %
- \ifdim\pgf@x>\pgf@y%
- \pgf@y\pgf@x%
- \else%
- \pgf@x\pgf@y%
- \fi%
- %
- % Adjust for minimum height and width.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@y<.5\pgf@ya%
- \pgf@y.5\pgf@ya%
- \fi%
- \pgf@xb\pgf@x%
- \advance\pgf@xb1.732051\pgf@y% 2y*cos(30)
- \ifdim\pgf@xb<\pgf@xa%
- \pgf@xb\pgf@xa%
- \pgf@x0.366025\pgf@xb% xb / (1 + 2*cos(30))
- \fi%
- %
- \ifdim\pgf@x>\pgf@y%
- \pgf@y\pgf@x%
- \else%
- \pgf@x\pgf@y%
- \fi%
- \edef\halfside{\the\pgf@x}%
- \addtosavedmacro\halfside%
- %
- % Take into account the outer sep.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
- \edef\outerxsep{\the\pgf@xa}%
- \edef\outerysep{\the\pgf@ya}%
- \addtosavedmacro\outerxsep%
- \addtosavedmacro\outerysep%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- %
- \edef\halfwidth{\the\pgf@x}%
- \edef\halfheight{\the\pgf@y}%
- \addtosavedmacro\halfwidth%
- \addtosavedmacro\halfheight%
- %
- \pgfextract@process\tipanchor{%
- \advance\pgf@x-\pgf@xa%
- \advance\pgf@y-\pgf@ya%
- \pgf@x-.16666\pgf@x%
- \pgf@yb2.0\pgf@y%
- \advance\pgf@x.866025\pgf@yb%
- \advance\pgf@x1.154701\pgf@xa%
- \pgf@y0pt%
- }%
- \addtosavedmacro\tipanchor%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ %
+ % Adjust the height for the number of inputs.
+ %
+ \c@pgf@counta\pgf@lib@sh@logicgate@numinputs%
+ \advance\c@pgf@counta1\relax%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@ya\pgflinewidth%
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/logic gate input sep}}%
+ \pgf@yb.5\pgf@yb%
+ \ifdim\pgf@ya<\pgf@yb%
+ \pgf@ya\pgf@yb%
+ \fi%
+ \multiply\pgf@ya\c@pgf@counta%
+ \ifdim\pgf@y<\pgf@ya%
+ \pgf@y\pgf@ya%
+ \fi%
+ %
+ \ifdim\pgf@x>\pgf@y%
+ \pgf@y\pgf@x%
+ \else%
+ \pgf@x\pgf@y%
+ \fi%
+ %
+ % Adjust for minimum height and width.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@y<.5\pgf@ya%
+ \pgf@y.5\pgf@ya%
+ \fi%
+ \pgf@xb\pgf@x%
+ \advance\pgf@xb1.732051\pgf@y% 2y*cos(30)
+ \ifdim\pgf@xb<\pgf@xa%
+ \pgf@xb\pgf@xa%
+ \pgf@x0.366025\pgf@xb% xb / (1 + 2*cos(30))
+ \fi%
+ %
+ \ifdim\pgf@x>\pgf@y%
+ \pgf@y\pgf@x%
+ \else%
+ \pgf@x\pgf@y%
+ \fi%
+ \edef\halfside{\the\pgf@x}%
+ \addtosavedmacro\halfside%
+ %
+ % Take into account the outer sep.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \edef\outerxsep{\the\pgf@xa}%
+ \edef\outerysep{\the\pgf@ya}%
+ \addtosavedmacro\outerxsep%
+ \addtosavedmacro\outerysep%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ %
+ \edef\halfwidth{\the\pgf@x}%
+ \edef\halfheight{\the\pgf@y}%
+ \addtosavedmacro\halfwidth%
+ \addtosavedmacro\halfheight%
+ %
+ \pgfextract@process\tipanchor{%
+ \advance\pgf@x-\pgf@xa%
+ \advance\pgf@y-\pgf@ya%
+ \pgf@x-.16666\pgf@x%
+ \pgf@yb2.0\pgf@y%
+ \advance\pgf@x.866025\pgf@yb%
+ \advance\pgf@x1.154701\pgf@xa%
+ \pgf@y0pt%
+ }%
+ \addtosavedmacro\tipanchor%
}%
-% An internal macro for calculating internal dimensions of
+% An internal macro for calculating internal dimensions of
% the and gate US and nand gate US.
%
\def\pgf@lib@sh@logicgates@dimensions@andUS{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- %
- % Adjust the height for the number of inputs.
- %
- \c@pgf@counta\pgf@lib@sh@logicgate@numinputs%
- \advance\c@pgf@counta1\relax%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- \advance\pgf@ya\pgflinewidth%
- \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/logic gate input sep}}%
- \pgf@yb.5\pgf@yb%
- \ifdim\pgf@ya<\pgf@yb%
- \pgf@ya\pgf@yb%
- \fi%
- \multiply\pgf@ya\c@pgf@counta%
- \ifdim\pgf@y<\pgf@ya%
- \pgf@y\pgf@ya%
- \fi%
- %
- \ifdim\pgf@x>\pgf@y%
- \pgf@y\pgf@x%
- \else%
- \pgf@x\pgf@y%
- \fi%
- %
- % Adjust for minimum height and width.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@y<.5\pgf@ya%
- \pgf@y.5\pgf@ya%
- \fi%
- \pgf@xb2.5\pgf@x%
- \ifdim\pgf@xb<\pgf@xa%
- \pgf@xb\pgf@xa%
- \pgf@x0.4\pgf@xb%
- \fi%
- %
- \ifdim\pgf@x>\pgf@y%
- \pgf@y\pgf@x%
- \else%
- \pgf@x\pgf@y%
- \fi%
- \edef\halfside{\the\pgf@x}%
- \addtosavedmacro\halfside%
- %
- % Take into account the outer sep.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
- \edef\outerxsep{\the\pgf@xa}%
- \edef\outerysep{\the\pgf@ya}%
- \addtosavedmacro\outerxsep%
- \addtosavedmacro\outerysep%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- %
- \edef\halfwidth{\the\pgf@x}%
- \edef\halfheight{\the\pgf@y}%
- \addtosavedmacro\halfwidth%
- \addtosavedmacro\halfheight%
- %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ %
+ % Adjust the height for the number of inputs.
+ %
+ \c@pgf@counta\pgf@lib@sh@logicgate@numinputs%
+ \advance\c@pgf@counta1\relax%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@ya\pgflinewidth%
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/logic gate input sep}}%
+ \pgf@yb.5\pgf@yb%
+ \ifdim\pgf@ya<\pgf@yb%
+ \pgf@ya\pgf@yb%
+ \fi%
+ \multiply\pgf@ya\c@pgf@counta%
+ \ifdim\pgf@y<\pgf@ya%
+ \pgf@y\pgf@ya%
+ \fi%
+ %
+ \ifdim\pgf@x>\pgf@y%
+ \pgf@y\pgf@x%
+ \else%
+ \pgf@x\pgf@y%
+ \fi%
+ %
+ % Adjust for minimum height and width.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@y<.5\pgf@ya%
+ \pgf@y.5\pgf@ya%
+ \fi%
+ \pgf@xb2.5\pgf@x%
+ \ifdim\pgf@xb<\pgf@xa%
+ \pgf@xb\pgf@xa%
+ \pgf@x0.4\pgf@xb%
+ \fi%
+ %
+ \ifdim\pgf@x>\pgf@y%
+ \pgf@y\pgf@x%
+ \else%
+ \pgf@x\pgf@y%
+ \fi%
+ \edef\halfside{\the\pgf@x}%
+ \addtosavedmacro\halfside%
+ %
+ % Take into account the outer sep.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \edef\outerxsep{\the\pgf@xa}%
+ \edef\outerysep{\the\pgf@ya}%
+ \addtosavedmacro\outerxsep%
+ \addtosavedmacro\outerysep%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ %
+ \edef\halfwidth{\the\pgf@x}%
+ \edef\halfheight{\the\pgf@y}%
+ \addtosavedmacro\halfwidth%
+ \addtosavedmacro\halfheight%
+ %
}%
@@ -178,25 +178,25 @@
% both and gates and nand gates, and also the not gate and buffer.
%
\def\pgf@lib@sh@logicgate@AND@inputanchor#1{%
- \dimensions%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-.166666\pgf@xa%
- \advance\pgf@x-\halfwidth%
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-#1\endcsname%
- \advance\pgf@x-\invertedradius%
- \advance\pgf@x-\outerinvertedradius%
- \fi%
- %
- \pgfutil@tempdima\halfside%
- \multiply\pgfutil@tempdima2\relax%
- \c@pgf@counta\numinputs%
- \advance\c@pgf@counta1\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- \multiply\pgfutil@tempdima#1\relax%
- \advance\pgf@y\halfside%
- \advance\pgf@y-\pgfutil@tempdima%
-}
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-.166666\pgf@xa%
+ \advance\pgf@x-\halfwidth%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-#1\endcsname%
+ \advance\pgf@x-\invertedradius%
+ \advance\pgf@x-\outerinvertedradius%
+ \fi%
+ %
+ \pgfutil@tempdima\halfside%
+ \multiply\pgfutil@tempdima2\relax%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \multiply\pgfutil@tempdima#1\relax%
+ \advance\pgf@y\halfside%
+ \advance\pgf@y-\pgfutil@tempdima%
+}%
@@ -204,235 +204,235 @@
% Shape and gate US
%
\pgfdeclareshape{and gate US}{%
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@and gate US\endcsname{%
- \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
- %
- \pgfmathloop%
- \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
- \else%
- \pgfutil@ifundefined{pgf@anchor@and gate US@input \pgfmathcounter}{%
- \expandafter\xdef\csname pgf@anchor@and gate US@input \pgfmathcounter\endcsname{%
- \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
- }%
- }{}%
- \repeatpgfmathloop%
- \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
- \pgferror{An and gate must have at least two inputs}%
- \fi%
- }%
- \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
- \saveddimen\invertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- }%
- \saveddimen\outerinvertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- \advance\pgf@x.5\pgflinewidth%
- }
- \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@andUS}
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \anchor{mid east}{%
- \csname pgf@anchor@and gate US@east\endcsname%
- \pgf@xa\pgf@x%
- \midpoint%
- \pgf@x\pgf@xa}
- \anchor{mid west}{%
- \csname pgf@anchor@and gate US@west\endcsname%
- \pgf@xa\pgf@x%
- \midpoint%
- \pgf@x\pgf@xa}
- \anchor{base}{\basepoint}%
- \anchor{base east}{%
- \csname pgf@anchor@and gate US@east\endcsname%
- \pgf@xa\pgf@x%
- \basepoint%
- \pgf@x\pgf@xa}
- \anchor{base west}{%
- \csname pgf@anchor@and gate US@west\endcsname%
- \pgf@xa\pgf@x%
- \basepoint%
- \pgf@x\pgf@xa}
- \anchor{east}{%
- \dimensions%
- \pgf@xa\halfwidth%
- \pgf@xb\pgf@xa%
- \advance\pgf@xb-\outerxsep%
- \centerpoint%
- \advance\pgf@x.333333\pgf@xb%
- \advance\pgf@x\pgf@xa%
- }
- \anchor{output}{\csname pgf@anchor@and gate US@east\endcsname}
- \anchor{north east}{%
- \dimensions%
- \ifpgfgateanchorsuseboundingrectangle%
- \csname pgf@anchor@nand gate US@east\endcsname%
- \advance\pgf@y\halfheight%
- \else
- \pgf@xa\halfwidth%
- \pgf@ya\halfheight%
- \pgf@xb\pgf@xa%
- \advance\pgf@xb-\outerxsep%
- \centerpoint%
- \advance\pgf@x.333333\pgf@xb%
- \advance\pgf@x.707106\pgf@xa%
- \advance\pgf@y.707106\pgf@ya%
- \fi%
- }
- \anchor{south east}{%
- \dimensions%
- \ifpgfgateanchorsuseboundingrectangle%
- \csname pgf@anchor@nand gate US@east\endcsname%
- \advance\pgf@y-\halfheight%
- \else
- \pgf@xa\halfwidth%
- \pgf@ya\halfheight%
- \pgf@xb\pgf@xa%
- \advance\pgf@xb-\outerxsep%
- \centerpoint%
- \advance\pgf@x.333333\pgf@xb%
- \advance\pgf@x.707106\pgf@xa%
- \advance\pgf@y-.707106\pgf@ya%
- \fi%
- }
- \anchor{north}{%
- \dimensions%
- \centerpoint%
- \advance\pgf@y\halfheight%
- }
- \anchor{south}{%
- \dimensions%
- \centerpoint%
- \advance\pgf@y-\halfheight%
- }
- \anchor{south west}{%
- \dimensions%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.16666\pgf@xa%
- \advance\pgf@x-\outerxsep%
- \advance\pgf@y-\halfheight%
- }
- \anchor{north west}{%
- \dimensions%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.16666\pgf@xa%
- \advance\pgf@x-\outerxsep%
- \advance\pgf@y\halfheight%
- }
- \anchor{west}{%
- \dimensions%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.16666\pgf@xa%
- \advance\pgf@x-\outerxsep%
- }
- \backgroundpath{%
- \dimensions%
- \pgf@xc\halfwidth%
- \pgf@yc\halfheight%
- \advance\pgf@xc-\outerxsep%
- \advance\pgf@yc-\outerysep%
- \pgf@xb.333333\pgf@xc%
- {%
- \pgftransformshift{\centerpoint}%
- \pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@yc}}%
- {%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{90}{-90}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
- \pgfpathclose%
- %
- % Draw the inputs.
- %
- \pgfutil@tempdima2.0\pgf@yc%
- \c@pgf@counta\numinputs%
- \advance\c@pgf@counta1\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\numinputs%
- \else%
- \advance\pgf@yc-\pgfutil@tempdima%
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
- {%
- \pgfpathcircle{%
- \pgf@xa\halfside%
- \pgf@x-1.16666\pgf@xa%
- \advance\pgf@x-.5\pgflinewidth%
- \advance\pgf@x-\invertedradius%
- \pgf@y\pgf@yc%
- }{+\invertedradius}%
- }%
- \fi%
- \repeatpgfmathloop%
- }%
- }%
- \anchorborder{%
- \pgfextract@process\externalpoint{}%
- \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
- \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
- \let\externalangle\pgfmathresult%
- \dimensions%
- \pgf@xb\halfside%
- \pgf@xc1.66666\pgf@xb%
- \advance\pgf@xc\outerxsep%
- \pgf@yc\halfheight%
- \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@and gate US@north west\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y\pgf@yc}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
- {%
- \centerpoint%
- \advance\pgf@x.333333\pgf@xb%
- }%
- {0}{90}{+\halfwidth and +\halfheight}%
- \else%
- \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
- {\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y\pgf@yc}%
- {\centerpoint\advance\pgf@x-\pgf@xc\advance\pgf@y\pgf@yc}%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y-\pgf@yc}%
- \ifdim\externalangle pt>\pgfmathresult pt\relax%
- \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
- {%
- \centerpoint%
- \advance\pgf@x.333333\pgf@xb%
- }%
- {270}{360}{+\halfwidth and +\halfheight}%
- \else%
- \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@and gate US@south west\endcsname}%
- \ifdim\externalangle pt>\pgfmathresult pt\relax%
- \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
- {\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y-\pgf@yc}%
- {\csname pgf@anchor@and gate US@south west\endcsname}%
- \else%
- \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
- {\csname pgf@anchor@and gate US@north west\endcsname}%
- {\csname pgf@anchor@and gate US@south west\endcsname}%
- \fi%
- \fi%
- \fi%
- }
-}
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@and gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@and gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@and gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \pgferror{An and gate must have at least two inputs}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }%
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@andUS}%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \csname pgf@anchor@and gate US@east\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}%
+ \anchor{mid west}{%
+ \csname pgf@anchor@and gate US@west\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \csname pgf@anchor@and gate US@east\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}%
+ \anchor{base west}{%
+ \csname pgf@anchor@and gate US@west\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}%
+ \anchor{east}{%
+ \dimensions%
+ \pgf@xa\halfwidth%
+ \pgf@xb\pgf@xa%
+ \advance\pgf@xb-\outerxsep%
+ \centerpoint%
+ \advance\pgf@x.333333\pgf@xb%
+ \advance\pgf@x\pgf@xa%
+ }%
+ \anchor{output}{\csname pgf@anchor@and gate US@east\endcsname}%
+ \anchor{north east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@nand gate US@east\endcsname%
+ \advance\pgf@y\halfheight%
+ \else
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\pgf@xa%
+ \advance\pgf@xb-\outerxsep%
+ \centerpoint%
+ \advance\pgf@x.333333\pgf@xb%
+ \advance\pgf@x.707106\pgf@xa%
+ \advance\pgf@y.707106\pgf@ya%
+ \fi%
+ }%
+ \anchor{south east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@nand gate US@east\endcsname%
+ \advance\pgf@y-\halfheight%
+ \else
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\pgf@xa%
+ \advance\pgf@xb-\outerxsep%
+ \centerpoint%
+ \advance\pgf@x.333333\pgf@xb%
+ \advance\pgf@x.707106\pgf@xa%
+ \advance\pgf@y-.707106\pgf@ya%
+ \fi%
+ }%
+ \anchor{north}{%
+ \dimensions%
+ \centerpoint%
+ \advance\pgf@y\halfheight%
+ }%
+ \anchor{south}{%
+ \dimensions%
+ \centerpoint%
+ \advance\pgf@y-\halfheight%
+ }%
+ \anchor{south west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@y-\halfheight%
+ }%
+ \anchor{north west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@y\halfheight%
+ }%
+ \anchor{west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ }%
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ \pgf@xb.333333\pgf@xc%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@yc}}%
+ {%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
+ \pgfpathclose%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@xa\halfside%
+ \pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-.5\pgflinewidth%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \let\externalangle\pgfmathresult%
+ \dimensions%
+ \pgf@xb\halfside%
+ \pgf@xc1.66666\pgf@xb%
+ \advance\pgf@xc\outerxsep%
+ \pgf@yc\halfheight%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@and gate US@north west\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y\pgf@yc}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@x.333333\pgf@xb%
+ }%
+ {0}{90}{+\halfwidth and +\halfheight}%
+ \else%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y\pgf@yc}%
+ {\centerpoint\advance\pgf@x-\pgf@xc\advance\pgf@y\pgf@yc}%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y-\pgf@yc}%
+ \ifdim\externalangle pt>\pgfmathresult pt\relax%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@x.333333\pgf@xb%
+ }%
+ {270}{360}{+\halfwidth and +\halfheight}%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@and gate US@south west\endcsname}%
+ \ifdim\externalangle pt>\pgfmathresult pt\relax%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {\centerpoint\advance\pgf@x.333333\pgf@xb\advance\pgf@y-\pgf@yc}%
+ {\csname pgf@anchor@and gate US@south west\endcsname}%
+ \else%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {\csname pgf@anchor@and gate US@north west\endcsname}%
+ {\csname pgf@anchor@and gate US@south west\endcsname}%
+ \fi%
+ \fi%
+ \fi%
+ }%
+}%
@@ -441,512 +441,512 @@
% Shape nand gate US
%
\pgfdeclareshape{nand gate US}{%
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nand gate US\endcsname{%
- \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
- %
- \pgfmathloop%
- \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
- \else%
- \pgfutil@ifundefined{pgf@anchor@nand gate US@input \pgfmathcounter}{%
- \expandafter\xdef\csname pgf@anchor@nand gate US@input \pgfmathcounter\endcsname{%
- \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
- }%
- }{}%
- \repeatpgfmathloop%
- \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
- \pgferror{A nand gate must have at least two inputs}%
- \fi%
- }%
- \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
- \saveddimen\invertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- }%
- \saveddimen\outerinvertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- \advance\pgf@x.5\pgflinewidth%
- }
- \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@andUS}
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }
- \anchor{center}{\centerpoint}%
- \inheritanchor[from=and gate US]{mid}
- \inheritanchor[from=and gate US]{mid east}
- \inheritanchor[from=and gate US]{mid west}
- \inheritanchor[from=and gate US]{base}
- \inheritanchor[from=and gate US]{base east}
- \inheritanchor[from=and gate US]{base west}
- \anchor{output}{%
- \dimensions
- \pgfpointadd{\centerpoint}{%
- \pgf@xa\halfside%
- \pgf@x1.33333\pgf@xa%
- \advance\pgf@x\invertedradius%
- \advance\pgf@x\outerinvertedradius%
- \advance\pgf@x\outerxsep%
- \pgf@y0pt%
- }%
- }
- \inheritanchor[from=and gate US]{east}
- \inheritanchor[from=and gate US]{north east}
- \inheritanchor[from=and gate US]{south east}
- \inheritanchor[from=and gate US]{north}
- \inheritanchor[from=and gate US]{south}
- \inheritanchor[from=and gate US]{south west}
- \inheritanchor[from=and gate US]{north west}
- \inheritanchor[from=and gate US]{west}
- \backgroundpath{%
- \dimensions%
- \pgf@xc\halfwidth%
- \pgf@yc\halfheight%
- \advance\pgf@xc-\outerxsep%
- \advance\pgf@yc-\outerysep%
- \pgf@xb.333333\pgf@xc%
- {%
- \pgftransformshift{\centerpoint}%
- \pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@yc}}%
- {%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{90}{-90}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
- \pgfpathclose%
- %
- % Draw the inputs.
- %
- \pgfutil@tempdima2.0\pgf@yc%
- \c@pgf@counta\numinputs%
- \advance\c@pgf@counta1\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\numinputs%
- \else%
- \advance\pgf@yc-\pgfutil@tempdima%
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
- {%
- \pgfpathcircle{%
- \pgf@xa\halfside%
- \pgf@x-1.166666\pgf@xa%
- \advance\pgf@x-.5\pgflinewidth%
- \advance\pgf@x-\invertedradius%
- \pgf@y\pgf@yc%
- }{+\invertedradius}%
- }%
- \fi%
- \repeatpgfmathloop%
- %
- % Draw the output inverter.
- %
- {%
- \pgfpathcircle{%
- \pgf@x1.33333\pgf@xc%
- \advance\pgf@x\outerinvertedradius%
- \pgf@y0pt%
- }{+\invertedradius}%
- }%
- }%
- }
- \inheritanchorborder[from=and gate US]
-}
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nand gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@nand gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@nand gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \pgferror{A nand gate must have at least two inputs}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }%
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@andUS}%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \inheritanchor[from=and gate US]{mid}%
+ \inheritanchor[from=and gate US]{mid east}%
+ \inheritanchor[from=and gate US]{mid west}%
+ \inheritanchor[from=and gate US]{base}%
+ \inheritanchor[from=and gate US]{base east}%
+ \inheritanchor[from=and gate US]{base west}%
+ \anchor{output}{%
+ \dimensions
+ \pgfpointadd{\centerpoint}{%
+ \pgf@xa\halfside%
+ \pgf@x1.33333\pgf@xa%
+ \advance\pgf@x\invertedradius%
+ \advance\pgf@x\outerinvertedradius%
+ \advance\pgf@x\outerxsep%
+ \pgf@y0pt%
+ }%
+ }%
+ \inheritanchor[from=and gate US]{east}%
+ \inheritanchor[from=and gate US]{north east}%
+ \inheritanchor[from=and gate US]{south east}%
+ \inheritanchor[from=and gate US]{north}%
+ \inheritanchor[from=and gate US]{south}%
+ \inheritanchor[from=and gate US]{south west}%
+ \inheritanchor[from=and gate US]{north west}%
+ \inheritanchor[from=and gate US]{west}%
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ \pgf@xb.333333\pgf@xc%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{\pgf@xb}{\pgf@yc}}%
+ {%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
+ \pgfpathclose%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@xa\halfside%
+ \pgf@x-1.166666\pgf@xa%
+ \advance\pgf@x-.5\pgflinewidth%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ %
+ % Draw the output inverter.
+ %
+ {%
+ \pgfpathcircle{%
+ \pgf@x1.33333\pgf@xc%
+ \advance\pgf@x\outerinvertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ }%
+ }%
+ \inheritanchorborder[from=and gate US]%
+}%
% Internal macro for calculation input anchors. Used by
% or, nor xnor gates (US).
%
\def\pgf@lib@sh@logicgate@OR@inputanchor#1{%
- \dimensions%
- \pgf@ya\halfside%
- \pgf@yb2.0\pgf@ya%
- %
- \pgfutil@tempdima\halfside%
- \multiply\pgfutil@tempdima2\relax%
- \c@pgf@counta\numinputs%
- \advance\c@pgf@counta1\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- \multiply\pgfutil@tempdima#1\relax%
- \pgf@yc\pgf@ya%
- \advance\pgf@yc-\pgfutil@tempdima%
- %
- \pgf@xb\pgf@yb%
- \advance\pgf@yb-\halflinewidth%
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
- \pgfmathasin@{\pgfmathresult}%
- \pgfmathcos@{\pgfmathresult}%
- %
- \pgf@xc-1.166666\pgf@ya%
- \advance\pgf@xc-.866025\pgf@xb%
- \advance\pgf@xc\pgfmathresult\pgf@yb%
- \advance\pgf@xc\halflinewidth%
- \advance\pgf@xc-\outerxsep%
- %
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-#1\endcsname%
- \advance\pgf@xc-\invertedradius%
- \advance\pgf@xc-\outerinvertedradius%
- \fi%
- %
- \centerpoint%
- \advance\pgf@x\pgf@xc%
- \advance\pgf@y\pgf@yc%
-}
+ \dimensions%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ %
+ \pgfutil@tempdima\halfside%
+ \multiply\pgfutil@tempdima2\relax%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \multiply\pgfutil@tempdima#1\relax%
+ \pgf@yc\pgf@ya%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ %
+ \pgf@xb\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@xc-1.166666\pgf@ya%
+ \advance\pgf@xc-.866025\pgf@xb%
+ \advance\pgf@xc\pgfmathresult\pgf@yb%
+ \advance\pgf@xc\halflinewidth%
+ \advance\pgf@xc-\outerxsep%
+ %
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-#1\endcsname%
+ \advance\pgf@xc-\invertedradius%
+ \advance\pgf@xc-\outerinvertedradius%
+ \fi%
+ %
+ \centerpoint%
+ \advance\pgf@x\pgf@xc%
+ \advance\pgf@y\pgf@yc%
+}%
% Shape or gate US
%
\pgfdeclareshape{or gate US}{%
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@or gate US\endcsname{%
- \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
- %
- \pgfmathloop%
- \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
- \else%
- \pgfutil@ifundefined{pgf@anchor@or gate US@input \pgfmathcounter}{%
- \expandafter\xdef\csname pgf@anchor@or gate US@input \pgfmathcounter\endcsname{%
- \noexpand\pgf@lib@sh@logicgate@OR@inputanchor{\pgfmathcounter}%
- }%
- }{}%
- \repeatpgfmathloop%
- \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
- \pgferror{An or gate must have at least two inputs}%
- \fi%
- }%
- \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
- \saveddimen\invertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- }%
- \saveddimen\halflinewidth{%
- \pgf@x.5\pgflinewidth%
- }%
- \saveddimen\outerinvertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- \advance\pgf@x.5\pgflinewidth%
- }
- \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \anchor{mid east}{%
- \csname pgf@anchor@or gate US@east\endcsname%
- \pgf@xa\pgf@x%
- \midpoint%
- \pgf@x\pgf@xa}
- \anchor{mid west}{%
- \csname pgf@anchor@or gate US@north west\endcsname%
- \pgf@xa\pgf@x%
- \midpoint%
- \pgf@x\pgf@xa}
- \anchor{base}{\basepoint}%
- \anchor{base east}{%
- \csname pgf@anchor@or gate US@east\endcsname%
- \pgf@xa\pgf@x%
- \basepoint%
- \pgf@x\pgf@xa}
- \anchor{base west}{%
- \csname pgf@anchor@or gate US@north west\endcsname%
- \pgf@xa\pgf@x%
- \basepoint%
- \pgf@x\pgf@xa}
- \anchor{east}{%
- \dimensions%
- \pgfpointadd{\centerpoint}{\tipanchor}%
- }
- \anchor{output}{\csname pgf@anchor@or gate US@east\endcsname}
- \anchor{north east}{%
- \dimensions%
- \ifpgfgateanchorsuseboundingrectangle%
- \tipanchor%
- \pgf@xa\pgf@x%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\halfheight%
- \else%
- \centerpoint%
- \pgf@xa\halfwidth%
- \pgf@ya\halfheight%
- \pgf@xb\halfside%
- \advance\pgf@x-.166666\pgf@xb%
- \advance\pgf@xa\pgf@xb%
- \advance\pgf@x.5\pgf@xa%
- \advance\pgf@y-\pgf@xb%
- \advance\pgf@ya\pgf@xb%
- \advance\pgf@y.866025\pgf@ya%
- \fi%
- }
- \anchor{south east}{%
- \dimensions%
- \ifpgfgateanchorsuseboundingrectangle%
- \tipanchor%
- \pgf@xa\pgf@x%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y-\halfheight%
- \else
- \centerpoint%
- \pgf@xa\halfwidth%
- \pgf@ya\halfheight%
- \pgf@xb\halfside%
- \advance\pgf@x-.166666\pgf@xb%
- \advance\pgf@xa\pgf@xb%
- \advance\pgf@x.5\pgf@xa%
- \advance\pgf@y\pgf@xb%
- \advance\pgf@ya\pgf@xb%
- \advance\pgf@y-.866025\pgf@ya%
- \fi%
- }
- \anchor{north}{%
- \dimensions%
- \centerpoint%
- \ifpgfgateanchorsuseboundingrectangle%
- \advance\pgf@y\halfheight%
- \else%
- \pgf@ya\halfheight%
- \advance\pgf@y.993043\pgf@ya%
- \fi%
- }
- \anchor{south}{%
- \dimensions%
- \centerpoint%
- \ifpgfgateanchorsuseboundingrectangle%
- \advance\pgf@y-\halfheight%
- \else%
- \pgf@ya\halfheight%
- \advance\pgf@y-.993043\pgf@ya%
- \fi%
- }
- \anchor{south west}{%
- \dimensions%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.16666\pgf@xa%
- \pgf@xa\outerxsep%
- \advance\pgf@x-1.732050\pgf@xa%
- \advance\pgf@y-\halfheight%
- }
- \anchor{north west}{%
- \dimensions%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.16666\pgf@xa%
- \pgf@xa\outerxsep%
- \advance\pgf@x-1.732050\pgf@xa%
- \advance\pgf@y\halfheight%
- }
- \anchor{west}{%
- \dimensions%
- \centerpoint%
- \pgf@xa\halfside%
- \ifpgfgateanchorsuseboundingrectangle%
- \advance\pgf@x-1.16666\pgf@xa%
- \advance\pgf@x-\outerxsep%
- \else%
- \advance\pgf@x-1.16666\pgf@xa%
- \advance\pgf@x-\outerxsep%
- \advance\pgf@x0.267949\pgf@xa%
- \fi%
- }
- \backgroundpath{%
- \dimensions%
- \pgf@xc\halfwidth%
- \pgf@yc\halfheight%
- \advance\pgf@xc-\outerxsep%
- \advance\pgf@yc-\outerysep%
- {%
- \pgftransformshift{\centerpoint}%
- \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
- {%
- \pgf@yc2.0\pgf@yc%
- \pgfpatharc{-30}{0}{+\pgf@yc}%
- }
- {%
- \pgf@yc2.0\pgf@yc%
- \pgfpatharc{0}{30}{+\pgf@yc}%
- }%
- \pgfpathclose%
- %
- % Draw the inputs.
- %
- \pgfutil@tempdima2.0\pgf@yc%
- \c@pgf@counta\numinputs%
- \advance\c@pgf@counta1\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\numinputs%
- \else%
- \advance\pgf@yc-\pgfutil@tempdima%
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
- {%
- \pgfpathcircle{%
- \pgf@ya\halfside%
- \pgf@yb2.0\pgf@ya%
- \pgf@xa\pgf@yb%
- \advance\pgf@yb-\halflinewidth%
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
- \let\sineangle\pgfmathresult%
- \pgfmathasin@{\pgfmathresult}%
- \pgfmathcos@{\pgfmathresult}%
- %
- \pgf@x-1.166666\pgf@ya%
- \advance\pgf@x-.866025\pgf@xa%
- \advance\pgf@x\pgfmathresult\pgf@yb%
- \advance\pgf@x-\invertedradius%
- \pgf@y\pgf@yc%
- }{+\invertedradius}%
- }%
- \fi%
- \repeatpgfmathloop%
- }%
- }%
- \anchorborder{%
- \pgfextract@process\externalpoint{}%
- \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \centerpoint%
- \pgf@xb\pgf@x%
- \pgf@yb\pgf@y%
- \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
- \let\externalangle\pgfmathresult%
- \dimensions%
- \pgf@xc\halfside%
- %
- \pgf@xc-.166666\pgf@xc%
- \ifdim\pgf@xa<\pgf@xc%
- \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@or gate US@north west\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
- {%
- \pgfgateanchorsuseboundingrectangletrue%
- \csname pgf@anchor@or gate US@north\endcsname%
- }%
- {\csname pgf@anchor@or gate US@north west\endcsname}%
- \else%
- \pgfmathsubtract@{360}{\pgfmathresult}%
- \ifdim\externalangle pt>\pgfmathresult pt\relax%
- \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
- {%
- \pgfgateanchorsuseboundingrectangletrue%
- \csname pgf@anchor@or gate US@south\endcsname%
- }%
- {\csname pgf@anchor@or gate US@south west\endcsname}%
- \else%
- \ifdim\pgf@ya>\pgf@yb%
- \pgf@yc\halfheight%
- \advance\pgf@yc\halfside%
- \advance\pgf@yc-\outerxsep%
- \pgfextract@process\point{%
- \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
- {%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.166666\pgf@xa%
- \pgf@xa2.0\pgf@xa%
- \advance\pgf@x-.866025\pgf@xa%
- \advance\pgf@x-\outerxsep%
- }%
- {0}{90}{+\pgf@yc}%
- }%
- \else%
- \pgf@yc\halfheight%
- \advance\pgf@yc\halfside%
- \advance\pgf@yc-\outerxsep%
- \pgfextract@process\point{%
- \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
- {%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.166666\pgf@xa%
- \pgf@xa2.0\pgf@xa%
- \advance\pgf@x-.866025\pgf@xa%
- \advance\pgf@x-\outerxsep%
- }%
- {270}{360}{+\pgf@yc}%
- }%
- \fi%
- \fi%
- \fi%
- \else%
- \ifdim\pgf@y=0pt\relax%
- \csname pgf@anchor@and gate US@east\endcsname%
- \else%
- \pgf@xc\halfwidth%
- \advance\pgf@xc\halfside%
- \pgf@yc\halfheight%
- \advance\pgf@yc\halfside%
- \pgf@xb\halfside%
- \pgf@xb-.166666\pgf@xb%
- \ifdim\pgf@ya<0pt%
- \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
- {%
- \centerpoint%
- \advance\pgf@y\halfside%
- \advance\pgf@x\pgf@xb%
- }%
- {270}{330}{+\pgf@yc}%
- \else%
- \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
- {%
- \centerpoint%
- \advance\pgf@y-\halfside%
- \advance\pgf@x\pgf@xb%
- }%
- {30}{90}{+\pgf@xc and +\pgf@yc}%
- \fi%
- \fi%
- \fi%
- }%
-}
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@or gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@or gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@or gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@OR@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \pgferror{An or gate must have at least two inputs}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\halflinewidth{%
+ \pgf@x.5\pgflinewidth%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }%
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \csname pgf@anchor@or gate US@east\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}%
+ \anchor{mid west}{%
+ \csname pgf@anchor@or gate US@north west\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \csname pgf@anchor@or gate US@east\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}%
+ \anchor{base west}{%
+ \csname pgf@anchor@or gate US@north west\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}%
+ \anchor{east}{%
+ \dimensions%
+ \pgfpointadd{\centerpoint}{\tipanchor}%
+ }%
+ \anchor{output}{\csname pgf@anchor@or gate US@east\endcsname}%
+ \anchor{north east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \tipanchor%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\halfheight%
+ \else%
+ \centerpoint%
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\halfside%
+ \advance\pgf@x-.166666\pgf@xb%
+ \advance\pgf@xa\pgf@xb%
+ \advance\pgf@x.5\pgf@xa%
+ \advance\pgf@y-\pgf@xb%
+ \advance\pgf@ya\pgf@xb%
+ \advance\pgf@y.866025\pgf@ya%
+ \fi%
+ }%
+ \anchor{south east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \tipanchor%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y-\halfheight%
+ \else
+ \centerpoint%
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\halfside%
+ \advance\pgf@x-.166666\pgf@xb%
+ \advance\pgf@xa\pgf@xb%
+ \advance\pgf@x.5\pgf@xa%
+ \advance\pgf@y\pgf@xb%
+ \advance\pgf@ya\pgf@xb%
+ \advance\pgf@y-.866025\pgf@ya%
+ \fi%
+ }%
+ \anchor{north}{%
+ \dimensions%
+ \centerpoint%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y\halfheight%
+ \else%
+ \pgf@ya\halfheight%
+ \advance\pgf@y.993043\pgf@ya%
+ \fi%
+ }%
+ \anchor{south}{%
+ \dimensions%
+ \centerpoint%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y-\halfheight%
+ \else%
+ \pgf@ya\halfheight%
+ \advance\pgf@y-.993043\pgf@ya%
+ \fi%
+ }%
+ \anchor{south west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x-1.732050\pgf@xa%
+ \advance\pgf@y-\halfheight%
+ }%
+ \anchor{north west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x-1.732050\pgf@xa%
+ \advance\pgf@y\halfheight%
+ }%
+ \anchor{west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \else%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@x0.267949\pgf@xa%
+ \fi%
+ }%
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \pgfpatharc{-30}{0}{+\pgf@yc}%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \pgfpatharc{0}{30}{+\pgf@yc}%
+ }%
+ \pgfpathclose%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ \pgf@xa\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \let\sineangle\pgfmathresult%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@x-1.166666\pgf@ya%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x\pgfmathresult\pgf@yb%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@xb\pgf@x%
+ \pgf@yb\pgf@y%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \let\externalangle\pgfmathresult%
+ \dimensions%
+ \pgf@xc\halfside%
+ %
+ \pgf@xc-.166666\pgf@xc%
+ \ifdim\pgf@xa<\pgf@xc%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@or gate US@north west\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@or gate US@north\endcsname%
+ }%
+ {\csname pgf@anchor@or gate US@north west\endcsname}%
+ \else%
+ \pgfmathsubtract@{360}{\pgfmathresult}%
+ \ifdim\externalangle pt>\pgfmathresult pt\relax%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@or gate US@south\endcsname%
+ }%
+ {\csname pgf@anchor@or gate US@south west\endcsname}%
+ \else%
+ \ifdim\pgf@ya>\pgf@yb%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \advance\pgf@yc-\outerxsep%
+ \pgfextract@process\point{%
+ \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
+ {%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.166666\pgf@xa%
+ \pgf@xa2.0\pgf@xa%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ }%
+ {0}{90}{+\pgf@yc}%
+ }%
+ \else%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \advance\pgf@yc-\outerxsep%
+ \pgfextract@process\point{%
+ \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
+ {%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.166666\pgf@xa%
+ \pgf@xa2.0\pgf@xa%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ }%
+ {270}{360}{+\pgf@yc}%
+ }%
+ \fi%
+ \fi%
+ \fi%
+ \else%
+ \ifdim\pgf@y=0pt\relax%
+ \csname pgf@anchor@and gate US@east\endcsname%
+ \else%
+ \pgf@xc\halfwidth%
+ \advance\pgf@xc\halfside%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \pgf@xb\halfside%
+ \pgf@xb-.166666\pgf@xb%
+ \ifdim\pgf@ya<0pt%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {270}{330}{+\pgf@yc}%
+ \else%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y-\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {30}{90}{+\pgf@xc and +\pgf@yc}%
+ \fi%
+ \fi%
+ \fi%
+ }%
+}%
@@ -954,154 +954,154 @@
% Shape nor gate US
%
\pgfdeclareshape{nor gate US}{%
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nor gate US\endcsname{%
- \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
- %
- \pgfmathloop%
- \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
- \else%
- \pgfutil@ifundefined{pgf@anchor@nor gate US@input \pgfmathcounter}{%
- \expandafter\xdef\csname pgf@anchor@nor gate US@input \pgfmathcounter\endcsname{%
- \noexpand\pgf@lib@sh@logicgate@OR@inputanchor{\pgfmathcounter}%
- }%
- }{}%
- \repeatpgfmathloop%
- \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
- \pgferror{A nor gate must have at least two inputs}%
- \fi%
- }%
- \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
- \saveddimen\invertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- }%
- \saveddimen\halflinewidth{%
- \pgf@x.5\pgflinewidth%
- }%
- \saveddimen\outerinvertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- \advance\pgf@x.5\pgflinewidth%
- }
- \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }
- \inheritanchor[from=or gate US]{center}
- \inheritanchor[from=or gate US]{mid}
- \inheritanchor[from=or gate US]{mid east}
- \inheritanchor[from=or gate US]{mid west}
- \inheritanchor[from=or gate US]{base}
- \inheritanchor[from=or gate US]{base east}
- \inheritanchor[from=or gate US]{base west}
- \inheritanchor[from=or gate US]{east}
- \inheritanchor[from=or gate US]{north east}
- \inheritanchor[from=or gate US]{south east}
- \inheritanchor[from=or gate US]{north}
- \inheritanchor[from=or gate US]{south}
- \inheritanchor[from=or gate US]{south west}
- \inheritanchor[from=or gate US]{north west}
- \inheritanchor[from=or gate US]{west}
- \anchor{output}{%
- \dimensions%
- \centerpoint%
- \pgf@xc\halfside%
- \pgf@yc\pgf@xc%
- \advance\pgf@x-.166666\pgf@xc%
- \pgf@yc2.0\pgf@yc%
- \advance\pgf@x.866025\pgf@yc%
- \advance\pgf@x\outerinvertedradius%
- \advance\pgf@x\invertedradius%
- \advance\pgf@x\outerxsep%
- }%
- \backgroundpath{%
- \dimensions%
- \pgf@xc\halfwidth%
- \pgf@yc\halfheight%
- \advance\pgf@xc-\outerxsep%
- \advance\pgf@yc-\outerysep%
- {%
- \pgftransformshift{\centerpoint}%
- \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
- {%
- \pgf@yc2.0\pgf@yc%
- \pgfpatharc{-30}{0}{+\pgf@yc}%
- }
- {%
- \pgf@yc2.0\pgf@yc%
- \pgfpatharc{0}{30}{+\pgf@yc}%
- }%
- \pgfpathclose%
- % Draw the output inverter.
- %
- {%
- \pgfpathcircle{%
- \pgf@x-.166666\pgf@xc%
- \pgf@yc2.0\pgf@yc%
- \advance\pgf@x.866025\pgf@yc%
- \advance\pgf@x\outerinvertedradius%
- \pgf@y0pt%
- }{+\invertedradius}%
- }%
- %
- % Draw the inputs.
- %
- \pgfutil@tempdima2.0\pgf@yc%
- \c@pgf@counta\numinputs%
- \advance\c@pgf@counta1\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\numinputs%
- \else%
- \advance\pgf@yc-\pgfutil@tempdima%
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
- {%
- \pgfpathcircle{%
- \pgf@ya\halfside%
- \pgf@yb2.0\pgf@ya%
- \pgf@xa\pgf@yb%
- \advance\pgf@yb-\halflinewidth%
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
- \let\sineangle\pgfmathresult%
- \pgfmathasin@{\pgfmathresult}%
- \pgfmathcos@{\pgfmathresult}%
- %
- \pgf@x-1.166666\pgf@ya%
- \advance\pgf@x-.866025\pgf@xa%
- \advance\pgf@x\pgfmathresult\pgf@yb%
- \advance\pgf@x-\invertedradius%
- \pgf@y\pgf@yc%
- }{+\invertedradius}%
- }%
- \fi%
- \repeatpgfmathloop%
- }%
- }%
- \inheritanchorborder[from=or gate US]
-}
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nor gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@nor gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@nor gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@OR@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \pgferror{A nor gate must have at least two inputs}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\halflinewidth{%
+ \pgf@x.5\pgflinewidth%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }%
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \inheritanchor[from=or gate US]{center}%
+ \inheritanchor[from=or gate US]{mid}%
+ \inheritanchor[from=or gate US]{mid east}%
+ \inheritanchor[from=or gate US]{mid west}%
+ \inheritanchor[from=or gate US]{base}%
+ \inheritanchor[from=or gate US]{base east}%
+ \inheritanchor[from=or gate US]{base west}%
+ \inheritanchor[from=or gate US]{east}%
+ \inheritanchor[from=or gate US]{north east}%
+ \inheritanchor[from=or gate US]{south east}%
+ \inheritanchor[from=or gate US]{north}%
+ \inheritanchor[from=or gate US]{south}%
+ \inheritanchor[from=or gate US]{south west}%
+ \inheritanchor[from=or gate US]{north west}%
+ \inheritanchor[from=or gate US]{west}%
+ \anchor{output}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xc\halfside%
+ \pgf@yc\pgf@xc%
+ \advance\pgf@x-.166666\pgf@xc%
+ \pgf@yc2.0\pgf@yc%
+ \advance\pgf@x.866025\pgf@yc%
+ \advance\pgf@x\outerinvertedradius%
+ \advance\pgf@x\invertedradius%
+ \advance\pgf@x\outerxsep%
+ }%
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \pgfpatharc{-30}{0}{+\pgf@yc}%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \pgfpatharc{0}{30}{+\pgf@yc}%
+ }%
+ \pgfpathclose%
+ % Draw the output inverter.
+ %
+ {%
+ \pgfpathcircle{%
+ \pgf@x-.166666\pgf@xc%
+ \pgf@yc2.0\pgf@yc%
+ \advance\pgf@x.866025\pgf@yc%
+ \advance\pgf@x\outerinvertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ \pgf@xa\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \let\sineangle\pgfmathresult%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@x-1.166666\pgf@ya%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x\pgfmathresult\pgf@yb%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ }%
+ \inheritanchorborder[from=or gate US]%
+}%
@@ -1109,42 +1109,42 @@
% xor and xnor gates (US).
%
\def\pgf@lib@sh@logicgate@XOR@inputanchor#1{%
- \dimensions%
- \pgf@ya\halfside%
- \pgf@yb2.0\pgf@ya%
- %
- \pgfutil@tempdima\halfside%
- \multiply\pgfutil@tempdima2\relax%
- \c@pgf@counta\numinputs%
- \advance\c@pgf@counta1\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- \multiply\pgfutil@tempdima#1\relax%
- \pgf@yc\pgf@ya%
- \advance\pgf@yc-\pgfutil@tempdima%
- %
- \pgf@xb\pgf@yb%
- \advance\pgf@yb-\halflinewidth%
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
- \pgfmathasin@{\pgfmathresult}%
- \pgfmathcos@{\pgfmathresult}%
- %
- \pgf@xc-1.166666\pgf@ya%
- \advance\pgf@xc-.866025\pgf@xb%
- \advance\pgf@xc\pgfmathresult\pgf@yb%
- \advance\pgf@xc\halflinewidth%
- \advance\pgf@xc-\outerxsep%
- %
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-#1\endcsname%
- \advance\pgf@xc-\invertedradius%
- \advance\pgf@xc-\outerinvertedradius%
- \fi%
- %
- \centerpoint%
- \advance\pgf@x\pgf@xc%
- \advance\pgf@y\pgf@yc%
- \pgf@xa\halfside%
- \advance\pgf@x-.333333\pgf@xa%
-}
+ \dimensions%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ %
+ \pgfutil@tempdima\halfside%
+ \multiply\pgfutil@tempdima2\relax%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \multiply\pgfutil@tempdima#1\relax%
+ \pgf@yc\pgf@ya%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ %
+ \pgf@xb\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@xc-1.166666\pgf@ya%
+ \advance\pgf@xc-.866025\pgf@xb%
+ \advance\pgf@xc\pgfmathresult\pgf@yb%
+ \advance\pgf@xc\halflinewidth%
+ \advance\pgf@xc-\outerxsep%
+ %
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-#1\endcsname%
+ \advance\pgf@xc-\invertedradius%
+ \advance\pgf@xc-\outerinvertedradius%
+ \fi%
+ %
+ \centerpoint%
+ \advance\pgf@x\pgf@xc%
+ \advance\pgf@y\pgf@yc%
+ \pgf@xa\halfside%
+ \advance\pgf@x-.333333\pgf@xa%
+}%
@@ -1153,330 +1153,330 @@
% Shape xor gate US
%
\pgfdeclareshape{xor gate US}{%
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@xor gate US\endcsname{%
- \pgf@lib@sh@logicgate@parseinputs{2}%
- %
- \pgfmathloop%
- \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
- \else%
- \pgfutil@ifundefined{pgf@anchor@xor gate US@input \pgfmathcounter}{%
- \expandafter\xdef\csname pgf@anchor@xor gate US@input \pgfmathcounter\endcsname{%
- \noexpand\pgf@lib@sh@logicgate@XOR@inputanchor{\pgfmathcounter}%
- }%
- }{}%
- \repeatpgfmathloop%
- \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
- \pgferror{An xor gate must have at two inputs}%
- \fi%
- }%
- \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
- \saveddimen\invertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- }%
- \saveddimen\halflinewidth{%
- \pgf@x.5\pgflinewidth%
- }%
- \saveddimen\outerinvertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- \advance\pgf@x.5\pgflinewidth%
- }
- \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \inheritanchor[from=or gate US]{mid east}
- \anchor{mid west}{%
- \csname pgf@anchor@xor gate US@north west\endcsname%
- \pgf@xa\pgf@x%
- \midpoint%
- \pgf@x\pgf@xa}
- \anchor{base}{\basepoint}%
- \inheritanchor[from=or gate US]{base east}
- \anchor{base west}{%
- \csname pgf@anchor@xor gate US@north west\endcsname%
- \pgf@xa\pgf@x%
- \basepoint%
- \pgf@x\pgf@xa}
- \inheritanchor[from=or gate US]{base}
- \inheritanchor[from=or gate US]{output}
- \inheritanchor[from=or gate US]{east}
- \inheritanchor[from=or gate US]{north east}
- \inheritanchor[from=or gate US]{south east}
- \inheritanchor[from=or gate US]{north}
- \inheritanchor[from=or gate US]{south}
- \anchor{south west}{%
- \dimensions%
- \pgf@xa\halfside%
- \pgf@xa-3.232051\pgf@xa% (7/6 + 2*cos(30) + 1/3) * x
- \pgf@xb\halfside%
- \pgf@xb2.0\pgf@xb%
- \advance\pgf@xb-\halflinewidth%
- \advance\pgf@xa.866025\pgf@xb%
- \pgf@ya.5\pgf@xb%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \ifpgfgateanchorsuseboundingrectangle%
- \advance\pgf@y-\halfheight%
- \else%
- \advance\pgf@y-\pgf@ya%
- \fi%
- }
- \anchor{north west}{%
- \dimensions%
- \pgf@xa\halfside%
- \pgf@xa-3.232051\pgf@xa% (7/6 + 2*cos(30) + 1/3) * x
- \pgf@xb\halfside%
- \pgf@xb2.0\pgf@xb%
- \advance\pgf@xb-\halflinewidth%
- \advance\pgf@xa.866025\pgf@xb%
- \pgf@ya.5\pgf@xb%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \ifpgfgateanchorsuseboundingrectangle%
- \advance\pgf@y\halfheight%
- \else%
- \advance\pgf@y\pgf@ya%
- \fi%
- }
- \anchor{west}{%
- \dimensions%
- \pgf@ya\halfside%
- \pgf@yb2.0\pgf@ya%
- %
- \pgf@xb\pgf@yb%
- \advance\pgf@yb-\halflinewidth%
- \pgfmathdivide@{0}{\pgfmath@tonumber{\pgf@yb}}%
- \pgfmathasin@{\pgfmathresult}%
- \pgfmathcos@{\pgfmathresult}%
- %
- \pgf@xc-1.166666\pgf@ya%
- \advance\pgf@xc-.866025\pgf@xb%
- \advance\pgf@xc\pgfmathresult\pgf@yb%
- \advance\pgf@xc\halflinewidth%
- \advance\pgf@xc-\outerxsep%
- %
- \centerpoint%
- \advance\pgf@x\pgf@xc%
- \pgf@xa\halfside%
- \advance\pgf@x-.333333\pgf@xa%
- \ifpgfgateanchorsuseboundingrectangle%
- \pgf@xa2.0\pgf@xa%
- \advance\pgf@x-0.133974\pgf@xa%
- \fi%
- }
- \backgroundpath{%
- \dimensions%
- \pgf@xc\halfwidth%
- \pgf@yc\halfheight%
- \advance\pgf@xc-\outerxsep%
- \advance\pgf@yc-\outerysep%
- {%
- \pgftransformshift{\centerpoint}%
- \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
- {%
- \pgf@yc2.66666\pgf@yc%
- \pgfpatharc{-22}{0}{+1.166666\pgf@yc and +\pgf@yc}%
- }
- {%
- \pgf@yc2.66666\pgf@yc%
- \pgfpatharc{0}{22}{+1.166666\pgf@yc and +\pgf@yc}%
- }%
- \pgfpathclose%
- %
- % Draw the inputs.
- %
- \pgfutil@tempdima2.0\pgf@yc%
- \c@pgf@counta\numinputs%
- \advance\c@pgf@counta1\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\numinputs%
- \else%
- \advance\pgf@yc-\pgfutil@tempdima%
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
- {%
- \pgfpathcircle{%
- \pgf@ya\halfside%
- \pgf@yb2.0\pgf@ya%
- \pgf@xa\pgf@yb%
- \advance\pgf@yb-\halflinewidth%
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
- \pgfmathasin@{\pgfmathresult}%
- \pgfmathcos@{\pgfmathresult}%
- %
- \pgf@x-1.5\pgf@ya%
- \advance\pgf@x-.866025\pgf@xa%
- \advance\pgf@x\pgfmathresult\pgf@yb%
- \advance\pgf@x-\invertedradius%
- \pgf@y\pgf@yc%
- }{+\invertedradius}%
- }%
- \fi%
- \repeatpgfmathloop%
- %
- % Now, some fooling around to stop the `tail' being filled.
- % Technically it still is, but it isn't visible.
- %
- \pgf@xc\halfside%
- \pgf@yc\halfside%
- \pgfpathmoveto{\pgfqpoint{-1.5\pgf@xc}{-\pgf@yc}}%
- \pgf@yc2.0\pgf@yc%
- \pgfmathloop%
- \ifnum\pgfmathcounter<61\relax%
- {%
- \pgfextract@process\point{%
- \pgfpointadd{%
- \pgf@x\halfside%
- \pgf@x-3.232051\pgf@x% (7/6 + 2*cos(30) + 1/3) * x
- \pgf@y0pt%
- }{%
- \pgfpointpolar{\pgfmathcounter-30}{+\pgf@yc}%
- }%
- }%
- \pgfpathlineto{\point}%
- \pgfpathmoveto{\point}%
- }
- \repeatpgfmathloop%
- }%
- }%
- \anchorborder{%
- \pgfextract@process\externalpoint{}%
- \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \centerpoint%
- \pgf@xb\pgf@x%
- \pgf@yb\pgf@y%
- \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
- \let\externalangle\pgfmathresult%
- \dimensions%
- \pgf@xc\halfside%
- %
- \pgf@xc-.166666\pgf@xc%
- \ifdim\pgf@xa<\pgf@xc%
- \pgfmathanglebetweenpoints{\centerpoint}%
- {%
- \pgfgateanchorsuseboundingrectangletrue%
- \csname pgf@anchor@xor gate US@north west\endcsname%
- }%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
- {%
- \pgfgateanchorsuseboundingrectangletrue%
- \csname pgf@anchor@xor gate US@north\endcsname%
- }%
- {%
- \pgfgateanchorsuseboundingrectangletrue%
- \csname pgf@anchor@xor gate US@north west\endcsname%
- }%
- \else%
- \pgfmathsubtract@{360}{\pgfmathresult}%
- \ifdim\externalangle pt>\pgfmathresult pt\relax%
- \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
- {%
- \pgfgateanchorsuseboundingrectangletrue%
- \csname pgf@anchor@xor gate US@south\endcsname%
- }%
- {%
- \pgfgateanchorsuseboundingrectangletrue%
- \csname pgf@anchor@xor gate US@south west\endcsname%
- }%
- \else%
- \ifdim\pgf@ya>\pgf@yb%
- \pgf@yc\halfheight%
- \advance\pgf@yc\halfside%
- \advance\pgf@yc-\outerxsep%
- \pgf@process{%
- \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
- {%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.166666\pgf@xa%
- \pgf@xa2.0\pgf@xa%
- \advance\pgf@x-.866025\pgf@xa%
- \advance\pgf@x-\outerxsep%
- \advance\pgf@x-.166666\pgf@xa%
- }%
- {0}{90}{+\pgf@yc}%
- }%
- \else%
- \pgf@yc\halfheight%
- \advance\pgf@yc\halfside%
- \advance\pgf@yc-\outerxsep%
- \pgf@process{%
- \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
- {%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.166666\pgf@xa%
- \pgf@xa2.0\pgf@xa%
- \advance\pgf@x-.866025\pgf@xa%
- \advance\pgf@x-\outerxsep%
- \advance\pgf@x-.166666\pgf@xa%
- }%
- {270}{360}{+\pgf@yc}%
- }%
- \fi%
- \fi%
- \fi%
- \else%
- \ifdim\pgf@y=0pt\relax%
- \csname pgf@anchor@and gate US@east\endcsname%
- \else%
- \pgf@xc\halfwidth%
- \advance\pgf@xc\halfside%
- \pgf@yc\halfheight%
- \advance\pgf@yc\halfside%
- \pgf@xb\halfside%
- \pgf@xb-.166666\pgf@xb%
- \ifdim\pgf@ya<0pt%
- \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
- {%
- \centerpoint%
- \advance\pgf@y\halfside%
- \advance\pgf@x\pgf@xb%
- }%
- {270}{330}{+\pgf@yc}%
- \else%
- \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
- {%
- \centerpoint%
- \advance\pgf@y-\halfside%
- \advance\pgf@x\pgf@xb%
- }%
- {30}{90}{+\pgf@xc and +\pgf@yc}%
- \fi%
- \fi%
- \fi%
- }%
-}
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@xor gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{2}%
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@xor gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@xor gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@XOR@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \pgferror{An xor gate must have at two inputs}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\halflinewidth{%
+ \pgf@x.5\pgflinewidth%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }%
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \inheritanchor[from=or gate US]{mid east}%
+ \anchor{mid west}{%
+ \csname pgf@anchor@xor gate US@north west\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}%
+ \anchor{base}{\basepoint}%
+ \inheritanchor[from=or gate US]{base east}%
+ \anchor{base west}{%
+ \csname pgf@anchor@xor gate US@north west\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}%
+ \inheritanchor[from=or gate US]{base}%
+ \inheritanchor[from=or gate US]{output}%
+ \inheritanchor[from=or gate US]{east}%
+ \inheritanchor[from=or gate US]{north east}%
+ \inheritanchor[from=or gate US]{south east}%
+ \inheritanchor[from=or gate US]{north}%
+ \inheritanchor[from=or gate US]{south}%
+ \anchor{south west}{%
+ \dimensions%
+ \pgf@xa\halfside%
+ \pgf@xa-3.232051\pgf@xa% (7/6 + 2*cos(30) + 1/3) * x
+ \pgf@xb\halfside%
+ \pgf@xb2.0\pgf@xb%
+ \advance\pgf@xb-\halflinewidth%
+ \advance\pgf@xa.866025\pgf@xb%
+ \pgf@ya.5\pgf@xb%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y-\halfheight%
+ \else%
+ \advance\pgf@y-\pgf@ya%
+ \fi%
+ }%
+ \anchor{north west}{%
+ \dimensions%
+ \pgf@xa\halfside%
+ \pgf@xa-3.232051\pgf@xa% (7/6 + 2*cos(30) + 1/3) * x
+ \pgf@xb\halfside%
+ \pgf@xb2.0\pgf@xb%
+ \advance\pgf@xb-\halflinewidth%
+ \advance\pgf@xa.866025\pgf@xb%
+ \pgf@ya.5\pgf@xb%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y\halfheight%
+ \else%
+ \advance\pgf@y\pgf@ya%
+ \fi%
+ }%
+ \anchor{west}{%
+ \dimensions%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ %
+ \pgf@xb\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{0}{\pgfmath@tonumber{\pgf@yb}}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@xc-1.166666\pgf@ya%
+ \advance\pgf@xc-.866025\pgf@xb%
+ \advance\pgf@xc\pgfmathresult\pgf@yb%
+ \advance\pgf@xc\halflinewidth%
+ \advance\pgf@xc-\outerxsep%
+ %
+ \centerpoint%
+ \advance\pgf@x\pgf@xc%
+ \pgf@xa\halfside%
+ \advance\pgf@x-.333333\pgf@xa%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \pgf@xa2.0\pgf@xa%
+ \advance\pgf@x-0.133974\pgf@xa%
+ \fi%
+ }%
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ {%
+ \pgf@yc2.66666\pgf@yc%
+ \pgfpatharc{-22}{0}{+1.166666\pgf@yc and +\pgf@yc}%
+ }
+ {%
+ \pgf@yc2.66666\pgf@yc%
+ \pgfpatharc{0}{22}{+1.166666\pgf@yc and +\pgf@yc}%
+ }%
+ \pgfpathclose%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ \pgf@xa\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@x-1.5\pgf@ya%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x\pgfmathresult\pgf@yb%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ %
+ % Now, some fooling around to stop the `tail' being filled.
+ % Technically it still is, but it isn't visible.
+ %
+ \pgf@xc\halfside%
+ \pgf@yc\halfside%
+ \pgfpathmoveto{\pgfqpoint{-1.5\pgf@xc}{-\pgf@yc}}%
+ \pgf@yc2.0\pgf@yc%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter<61\relax%
+ {%
+ \pgfextract@process\point{%
+ \pgfpointadd{%
+ \pgf@x\halfside%
+ \pgf@x-3.232051\pgf@x% (7/6 + 2*cos(30) + 1/3) * x
+ \pgf@y0pt%
+ }{%
+ \pgfpointpolar{\pgfmathcounter-30}{+\pgf@yc}%
+ }%
+ }%
+ \pgfpathlineto{\point}%
+ \pgfpathmoveto{\point}%
+ }
+ \repeatpgfmathloop%
+ }%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@xb\pgf@x%
+ \pgf@yb\pgf@y%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \let\externalangle\pgfmathresult%
+ \dimensions%
+ \pgf@xc\halfside%
+ %
+ \pgf@xc-.166666\pgf@xc%
+ \ifdim\pgf@xa<\pgf@xc%
+ \pgfmathanglebetweenpoints{\centerpoint}%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@xor gate US@north west\endcsname%
+ }%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@xor gate US@north\endcsname%
+ }%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@xor gate US@north west\endcsname%
+ }%
+ \else%
+ \pgfmathsubtract@{360}{\pgfmathresult}%
+ \ifdim\externalangle pt>\pgfmathresult pt\relax%
+ \pgfpointintersectionoflines{\externalpoint}{\centerpoint}%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@xor gate US@south\endcsname%
+ }%
+ {%
+ \pgfgateanchorsuseboundingrectangletrue%
+ \csname pgf@anchor@xor gate US@south west\endcsname%
+ }%
+ \else%
+ \ifdim\pgf@ya>\pgf@yb%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \advance\pgf@yc-\outerxsep%
+ \pgf@process{%
+ \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
+ {%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.166666\pgf@xa%
+ \pgf@xa2.0\pgf@xa%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@x-.166666\pgf@xa%
+ }%
+ {0}{90}{+\pgf@yc}%
+ }%
+ \else%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \advance\pgf@yc-\outerxsep%
+ \pgf@process{%
+ \pgfmathpointintersectionoflineandarc{\centerpoint}{\externalpoint}%
+ {%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.166666\pgf@xa%
+ \pgf@xa2.0\pgf@xa%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@x-.166666\pgf@xa%
+ }%
+ {270}{360}{+\pgf@yc}%
+ }%
+ \fi%
+ \fi%
+ \fi%
+ \else%
+ \ifdim\pgf@y=0pt\relax%
+ \csname pgf@anchor@and gate US@east\endcsname%
+ \else%
+ \pgf@xc\halfwidth%
+ \advance\pgf@xc\halfside%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \pgf@xb\halfside%
+ \pgf@xb-.166666\pgf@xb%
+ \ifdim\pgf@ya<0pt%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {270}{330}{+\pgf@yc}%
+ \else%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y-\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {30}{90}{+\pgf@xc and +\pgf@yc}%
+ \fi%
+ \fi%
+ \fi%
+ }%
+}%
@@ -1484,167 +1484,167 @@
% Shape xnor gate US
%
\pgfdeclareshape{xnor gate US}{%
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@xnor gate US\endcsname{%
- \pgf@lib@sh@logicgate@parseinputs{2}%
- %
- \pgfmathloop%
- \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
- \else%
- \pgfutil@ifundefined{pgf@anchor@xnor gate US@input \pgfmathcounter}{%
- \expandafter\xdef\csname pgf@anchor@xnor gate US@input \pgfmathcounter\endcsname{%
- \noexpand\pgf@lib@sh@logicgate@XOR@inputanchor{\pgfmathcounter}%
- }%
- }{}%
- \repeatpgfmathloop%
- \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
- \pgferror{An xnor gate must have two inputs}%
- \fi%
- }%
- \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
- \saveddimen\invertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- }%
- \saveddimen\halflinewidth{%
- \pgf@x.5\pgflinewidth%
- }%
- \saveddimen\outerinvertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- \advance\pgf@x.5\pgflinewidth%
- }
- \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \inheritanchor[from=xor gate US]{mid east}
- \inheritanchor[from=xor gate US]{mid west}
- \anchor{base}{\basepoint}%
- \inheritanchor[from=xor gate US]{base east}
- \inheritanchor[from=xor gate US]{base west}
- \inheritanchor[from=xor gate US]{base}
- \inheritanchor[from=nor gate US]{output}
- \inheritanchor[from=xor gate US]{east}
- \inheritanchor[from=xor gate US]{north east}
- \inheritanchor[from=xor gate US]{south east}
- \inheritanchor[from=xor gate US]{north}
- \inheritanchor[from=xor gate US]{south}
- \inheritanchor[from=xor gate US]{south west}
- \inheritanchor[from=xor gate US]{north west}
- \inheritanchor[from=xor gate US]{west}
- \backgroundpath{%
- \dimensions%
- \pgf@xc\halfwidth%
- \pgf@yc\halfheight%
- \advance\pgf@xc-\outerxsep%
- \advance\pgf@yc-\outerysep%
- {%
- \pgftransformshift{\centerpoint}%
- \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
- {%
- \pgf@yc2.66666\pgf@yc%
- \pgfpatharc{-22}{0}{+1.166666\pgf@yc and +\pgf@yc}%
- }
- {%
- \pgf@yc2.66666\pgf@yc%
- \pgfpatharc{0}{22}{+1.166666\pgf@yc and +\pgf@yc}%
- }%
- \pgfpathclose%
- %
- % Draw the output inverter.
- %
- {%
- \pgfpathcircle{%
- \pgf@x-.166666\pgf@xc%
- \pgf@yc2.0\pgf@yc%
- \advance\pgf@x.866025\pgf@yc%
- \advance\pgf@x\outerinvertedradius%
- \pgf@y0pt%
- }{+\invertedradius}%
- }%
- %
- % Draw the inputs.
- %
- \pgfutil@tempdima2.0\pgf@yc%
- \c@pgf@counta\numinputs%
- \advance\c@pgf@counta1\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\numinputs%
- \else%
- \advance\pgf@yc-\pgfutil@tempdima%
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
- {%
- \pgfpathcircle{%
- \pgf@ya\halfside%
- \pgf@yb2.0\pgf@ya%
- \pgf@xa\pgf@yb%
- \advance\pgf@yb-\halflinewidth%
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
- \pgfmathasin@{\pgfmathresult}%
- \pgfmathcos@{\pgfmathresult}%
- %
- \pgf@x-1.5\pgf@ya%
- \advance\pgf@x-.866025\pgf@xa%
- \advance\pgf@x\pgfmathresult\pgf@yb%
- \advance\pgf@x-\invertedradius%
- \pgf@y\pgf@yc%
- }{+\invertedradius}%
- }%
- \fi%
- \repeatpgfmathloop%
- %
- % Now, some fooling around to stop the `tail' being filled.
- %
- \pgf@xc\halfside%
- \pgf@yc\halfside%
- \pgfpathmoveto{\pgfqpoint{-1.5\pgf@xc}{-\pgf@yc}}%
- \pgf@yc2.0\pgf@yc%
- \pgfmathloop%
- \ifnum\pgfmathcounter<61\relax%
- {%
- \pgfextract@process\point{%
- \pgfpointadd{%
- \pgf@x\halfside%
- \pgf@x-3.232051\pgf@x% (7/6 + 2*cos(30) + 1/3) * x
- \pgf@y0pt%
- }{%
- \pgfpointpolar{\pgfmathcounter-30}{+\pgf@yc}%
- }%
- }%
- \pgfpathlineto{\point}%
- \pgfpathmoveto{\point}%
- }
- \repeatpgfmathloop%
- }%
- }%
- \inheritanchorborder[from=xor gate US]
-}
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@xnor gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{2}%
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@xnor gate US@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@xnor gate US@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@XOR@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \pgferror{An xnor gate must have two inputs}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\halflinewidth{%
+ \pgf@x.5\pgflinewidth%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }%
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \inheritanchor[from=xor gate US]{mid east}%
+ \inheritanchor[from=xor gate US]{mid west}%
+ \anchor{base}{\basepoint}%%
+ \inheritanchor[from=xor gate US]{base east}%
+ \inheritanchor[from=xor gate US]{base west}%
+ \inheritanchor[from=xor gate US]{base}%
+ \inheritanchor[from=nor gate US]{output}%
+ \inheritanchor[from=xor gate US]{east}%
+ \inheritanchor[from=xor gate US]{north east}%
+ \inheritanchor[from=xor gate US]{south east}%
+ \inheritanchor[from=xor gate US]{north}%
+ \inheritanchor[from=xor gate US]{south}%
+ \inheritanchor[from=xor gate US]{south west}%
+ \inheritanchor[from=xor gate US]{north west}%
+ \inheritanchor[from=xor gate US]{west}%
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ {%
+ \pgf@yc2.66666\pgf@yc%
+ \pgfpatharc{-22}{0}{+1.166666\pgf@yc and +\pgf@yc}%
+ }
+ {%
+ \pgf@yc2.66666\pgf@yc%
+ \pgfpatharc{0}{22}{+1.166666\pgf@yc and +\pgf@yc}%
+ }%
+ \pgfpathclose%
+ %
+ % Draw the output inverter.
+ %
+ {%
+ \pgfpathcircle{%
+ \pgf@x-.166666\pgf@xc%
+ \pgf@yc2.0\pgf@yc%
+ \advance\pgf@x.866025\pgf@yc%
+ \advance\pgf@x\outerinvertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@ya\halfside%
+ \pgf@yb2.0\pgf@ya%
+ \pgf@xa\pgf@yb%
+ \advance\pgf@yb-\halflinewidth%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yc}}{\pgfmath@tonumber{\pgf@yb}}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ %
+ \pgf@x-1.5\pgf@ya%
+ \advance\pgf@x-.866025\pgf@xa%
+ \advance\pgf@x\pgfmathresult\pgf@yb%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ %
+ % Now, some fooling around to stop the `tail' being filled.
+ %
+ \pgf@xc\halfside%
+ \pgf@yc\halfside%
+ \pgfpathmoveto{\pgfqpoint{-1.5\pgf@xc}{-\pgf@yc}}%
+ \pgf@yc2.0\pgf@yc%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter<61\relax%
+ {%
+ \pgfextract@process\point{%
+ \pgfpointadd{%
+ \pgf@x\halfside%
+ \pgf@x-3.232051\pgf@x% (7/6 + 2*cos(30) + 1/3) * x
+ \pgf@y0pt%
+ }{%
+ \pgfpointpolar{\pgfmathcounter-30}{+\pgf@yc}%
+ }%
+ }%
+ \pgfpathlineto{\point}%
+ \pgfpathmoveto{\point}%
+ }
+ \repeatpgfmathloop%
+ }%
+ }%
+ \inheritanchorborder[from=xor gate US]%
+}%
@@ -1655,7 +1655,7 @@
%
\pgfdeclareshape{not gate US}{%
\expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@not gate US\endcsname{%
- \pgf@lib@sh@logicgate@parseinputs{1}%
+ \pgf@lib@sh@logicgate@parseinputs{1}%
\ifnum\pgf@lib@sh@logicgate@numinputs=0\relax%
\pgferror{A not gate must have one input}%
\fi%
@@ -1670,21 +1670,21 @@
\saveddimen\outerinvertedradius{%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
\advance\pgf@x.5\pgflinewidth%
- }
- \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
+ }%
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\midpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+0.5ex}%
- }
+ }%
\savedanchor\basepoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt%
- }
+ }%
\anchor{center}{\centerpoint}%
\anchor{mid}{\midpoint}%
\anchor{mid east}{%
@@ -1692,14 +1692,14 @@
\pgfutil@tempdima\pgf@y%
\csname pgf@anchor@not gate US@east\endcsname%
\pgf@y\pgfutil@tempdima%
- }
+ }%
\anchor{mid west}{%
\dimensions%
\pgf@xc\halfside%
\pgf@xc-.833333\pgf@xc%
\advance\pgf@xc-\outerxsep%
\midpoint%
- \advance\pgf@x\pgf@xc%
+ \advance\pgf@x\pgf@xc%
}%
\anchor{base}{\basepoint}%
\anchor{base east}{%
@@ -1707,16 +1707,16 @@
\pgfutil@tempdima\pgf@y%
\csname pgf@anchor@not gate US@east\endcsname%
\pgf@y\pgfutil@tempdima%
- }
+ }%
\anchor{base west}{%
\dimensions%
\pgf@xc\halfside%
\pgf@xc-.833333\pgf@xc%
\advance\pgf@xc-\outerxsep%
\basepoint%
- \advance\pgf@x\pgf@xc%
+ \advance\pgf@x\pgf@xc%
}%
- \inheritanchor[from=and gate US]{base}
+ \inheritanchor[from=and gate US]{base}%
\anchor{output}{%
\dimensions%
\pgf@xc\halfside%
@@ -1727,7 +1727,7 @@
\advance\pgf@x\invertedradius%
\advance\pgf@x\outerinvertedradius%
\advance\pgf@x\outerxsep%
- }
+ }%
\anchor{east}{%
\dimensions%
\tipanchor%
@@ -1749,11 +1749,11 @@
\pgfpointadd{\centerpoint}{%
\tipanchor%
\pgf@xa\outerxsep%
- \advance\pgf@x2.350943\pgf@xa%
+ \advance\pgf@x2.350943\pgf@xa%
}%
- }%
+ }%
\fi%
- }
+ }%
\anchor{south}{%
\dimensions%
\ifpgfgateanchorsuseboundingrectangle%
@@ -1768,17 +1768,17 @@
\pgfpointadd{\centerpoint}{%
\tipanchor%
\pgf@xa\outerxsep%
- \advance\pgf@x2.350943\pgf@xa%
+ \advance\pgf@x2.350943\pgf@xa%
}%
- }%
+ }%
\fi%
- }
+ }%
\anchor{south east}{%
\dimensions%
\ifpgfgateanchorsuseboundingrectangle%
\csname pgf@anchor@not gate US@south west\endcsname%
\pgf@ya\pgf@y%
- \pgf@process{%
+ \pgf@process{%
\dimensions%
\tipanchor%
\pgf@xa\pgf@x%
@@ -1793,17 +1793,17 @@
\pgfpointadd{\centerpoint}{%
\tipanchor%
\pgf@xa\outerxsep%
- \advance\pgf@x2.350943\pgf@xa%
+ \advance\pgf@x2.350943\pgf@xa%
}%
- }%
+ }%
\fi%
- }
+ }%
\anchor{north east}{%
\dimensions%
\ifpgfgateanchorsuseboundingrectangle%
\csname pgf@anchor@not gate US@north west\endcsname%
\pgf@ya\pgf@y%
- \pgf@process{%
+ \pgf@process{%
\dimensions%
\tipanchor%
\pgf@xa\pgf@x%
@@ -1818,11 +1818,11 @@
\pgfpointadd{\centerpoint}{%
\tipanchor%
\pgf@xa\outerxsep%
- \advance\pgf@x2.350943\pgf@xa%
+ \advance\pgf@x2.350943\pgf@xa%
}%
- }%
+ }%
\fi%
- }
+ }%
\anchor{south west}{%
\dimensions%
\pgf@xa\halfside%
@@ -1831,7 +1831,7 @@
\advance\pgf@x-\outerxsep%
\advance\pgf@y-1.166666\pgf@xa%
\pgf@ya\outerysep%
- \advance\pgf@y-1.565\pgf@ya% Selected by trial and error.
+ \advance\pgf@y-1.565\pgf@ya% Selected by trial and error.
}%
\anchor{north west}{%
\dimensions%
@@ -1841,7 +1841,7 @@
\advance\pgf@x-\outerxsep%
\advance\pgf@y1.166666\pgf@xa%
\pgf@ya\outerysep%
- \advance\pgf@y1.565\pgf@ya% Selected by trial and error.
+ \advance\pgf@y1.565\pgf@ya% Selected by trial and error.
}%
\anchor{input}{%
\dimensions%
@@ -1856,7 +1856,7 @@
\advance\pgf@xc-\outerxsep%
\centerpoint%
\advance\pgf@x\pgf@xc%
- }
+ }%
\backgroundpath{%
\dimensions%
\pgf@xc\halfwidth%
@@ -1869,9 +1869,9 @@
\pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{1.166666\pgf@yc}}%
\pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{-1.166666\pgf@yc}}%
\pgfpathlineto{\tipanchor}%
- %
+ %
% Draw the output inverter.
- %
+ %
{%
\pgfpathcircle{%
\pgf@x-.166666\pgf@xc%
@@ -1879,11 +1879,11 @@
\advance\pgf@x.866025\pgf@yc%
\advance\pgf@x\outerinvertedradius%
\pgf@y0pt%
- }{+\invertedradius}%
+ }{+\invertedradius}%
}%
- %
+ %
% Draw the input.
- %
+ %
\expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-1\endcsname%
{%
\pgfpathcircle{%
@@ -1892,15 +1892,15 @@
\advance\pgf@x-.5\pgflinewidth%
\advance\pgf@x-\invertedradius%
\pgf@y0pt%
- }{+\invertedradius}%
+ }{+\invertedradius}%
}%
- \fi%
+ \fi%
}%
}%
\anchorborder{%
\pgf@lib@gates@not@buffer@border{not gate US}
- }
-}
+ }%
+}%
\def\pgf@lib@gates@not@buffer@border#1{
\pgfextract@process\externalpoint{}%
@@ -1922,9 +1922,9 @@
\pgfpointadd{\centerpoint}{%
\tipanchor%
\pgf@xa\outerxsep%
- \advance\pgf@x2.350943\pgf@xa%
+ \advance\pgf@x2.350943\pgf@xa%
}%
- }%
+ }%
\else%
\pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@not gate US@south west\endcsname}%
\ifdim\externalangle pt<\pgfmathresult pt%
@@ -1938,9 +1938,9 @@
\pgfpointadd{\centerpoint}{%
\tipanchor%
\pgf@xa\outerxsep%
- \advance\pgf@x2.350943\pgf@xa%
+ \advance\pgf@x2.350943\pgf@xa%
}%
- }%
+ }%
\fi%
\fi%
\fi%
@@ -1948,8 +1948,8 @@
}%
-\def\pgf@lib@zero@text{0.0}
-\def\pgf@lib@onehundredeighty@text{180.0}
+\def\pgf@lib@zero@text{0.0}%
+\def\pgf@lib@onehundredeighty@text{180.0}%
@@ -1957,569 +1957,569 @@
% Shape buffer gate US.
%
\pgfdeclareshape{buffer gate US}{%
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@buffer gate US\endcsname{%
- \pgf@lib@sh@logicgate@parseinputs{1}%
- \ifnum\pgf@lib@sh@logicgate@numinputs=0\relax%
- \pgferror{A buffer gate must have one input}%
- \fi%
- }%
- \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
- \saveddimen\invertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- }%
- \saveddimen\halflinewidth{%
- \pgf@x.5\pgflinewidth%
- }%
- \saveddimen\outerinvertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- \advance\pgf@x.5\pgflinewidth%
- }
- \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \anchor{mid east}{%
- \midpoint%
- \pgfutil@tempdima\pgf@y%
- \csname pgf@anchor@buffer gate US@east\endcsname%
- \pgf@y\pgfutil@tempdima%
- }
- \anchor{mid west}{%
- \dimensions%
- \pgf@xc\halfside%
- \pgf@xc-.833333\pgf@xc%
- \advance\pgf@xc-\outerxsep%
- \midpoint%
- \advance\pgf@x\pgf@xc%
- }%
- \anchor{base}{\basepoint}%
- \anchor{base east}{%
- \basepoint%
- \pgfutil@tempdima\pgf@y%
- \csname pgf@anchor@buffer gate US@east\endcsname%
- \pgf@y\pgfutil@tempdima%
- }
- \inheritanchor[from=not gate US]{base west}
- \inheritanchor[from=and gate US]{base}
- \anchor{output}{\csname pgf@anchor@buffer gate US@east\endcsname}
- \anchor{east}{%
- \dimensions%
- \pgfpointadd{\centerpoint}{%
- \tipanchor%
- \pgf@xa\outerxsep%
- \advance\pgf@x2.350943\pgf@xa%
- }%
- }%
- \anchor{north}{%
- \dimensions%
- \ifpgfgateanchorsuseboundingrectangle%
- \csname pgf@anchor@not gate US@north west\endcsname%
- \pgf@ya\pgf@y%
- \centerpoint%
- \pgf@y\pgf@ya%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@y1pt}%
- {\csname pgf@anchor@buffer gate US@north west\endcsname}%
- {%
- \pgfpointadd{\centerpoint}{%
- \tipanchor%
- \pgf@xa\outerxsep%
- \advance\pgf@x2.350943\pgf@xa%
- }%
- }%
- \fi%
- }
- \anchor{south}{%
- \dimensions%
- \ifpgfgateanchorsuseboundingrectangle%
- \csname pgf@anchor@not gate US@south west\endcsname%
- \pgf@ya\pgf@y%
- \centerpoint%
- \pgf@y\pgf@ya%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@y-1pt}%
- {\csname pgf@anchor@not gate US@south west\endcsname}%
- {%
- \pgfpointadd{\centerpoint}{%
- \tipanchor%
- \pgf@xa\outerxsep%
- \advance\pgf@x2.350943\pgf@xa%
- }%
- }%
- \fi%
- }
- \anchor{south east}{%
- \dimensions%
- \ifpgfgateanchorsuseboundingrectangle%
- \csname pgf@anchor@not gate US@south west\endcsname%
- \pgfutil@tempdima\pgf@y%
- \csname pgf@anchor@buffer gate US@east\endcsname%
- \pgf@y\pgfutil@tempdima%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@x1pt\advance\pgf@y-1pt}%
- {\csname pgf@anchor@buffer gate US@south west\endcsname}%
- {%
- \pgfpointadd{\centerpoint}{%
- \tipanchor%
- \pgf@xc\outerxsep%
- \advance\pgf@x2.350943\pgf@xc%
- }%
- }%
- \fi%
- }
- \anchor{north east}{%
- \dimensions%
- \ifpgfgateanchorsuseboundingrectangle%
- \csname pgf@anchor@not gate US@north west\endcsname%
- \pgfutil@tempdima\pgf@y%
- \csname pgf@anchor@buffer gate US@east\endcsname%
- \pgf@y\pgfutil@tempdima%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@x1pt\advance\pgf@y1pt}%
- {\csname pgf@anchor@buffer gate US@north west\endcsname}%
- {%
- \pgfpointadd{\centerpoint}{%
- \tipanchor%
- \pgf@xa\outerxsep%
- \advance\pgf@x2.350943\pgf@xa%
- }%
- }%
- \fi%
- }
- \inheritanchor[from=not gate US]{south west}
- \inheritanchor[from=not gate US]{north west}
- \inheritanchor[from=not gate US]{input}
- \inheritanchor[from=not gate US]{west}
- \backgroundpath{%
- \dimensions%
- \pgf@xc\halfwidth%
- \pgf@yc\halfheight%
- \advance\pgf@xc-\outerxsep%
- \advance\pgf@yc-\outerysep%
- {%
- \pgftransformshift{\centerpoint}%
- \pgfpathmoveto{\tipanchor}%
- \pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{1.166666\pgf@yc}}%
- \pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{-1.166666\pgf@yc}}%
- \pgfpathclose%
- %
- % Draw the input.
- %
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-1\endcsname%
- {%
- \pgfpathcircle{%
- \pgf@xa\halfside%
- \pgf@x-.833333\pgf@xa%
- \advance\pgf@x-.5\pgflinewidth%
- \advance\pgf@x-\invertedradius%
- \pgf@y0pt%
- }{+\invertedradius}%
- }%
- \fi%
- }%
- }%
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@buffer gate US\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1}%
+ \ifnum\pgf@lib@sh@logicgate@numinputs=0\relax%
+ \pgferror{A buffer gate must have one input}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\halflinewidth{%
+ \pgf@x.5\pgflinewidth%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }%
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \midpoint%
+ \pgfutil@tempdima\pgf@y%
+ \csname pgf@anchor@buffer gate US@east\endcsname%
+ \pgf@y\pgfutil@tempdima%
+ }%
+ \anchor{mid west}{%
+ \dimensions%
+ \pgf@xc\halfside%
+ \pgf@xc-.833333\pgf@xc%
+ \advance\pgf@xc-\outerxsep%
+ \midpoint%
+ \advance\pgf@x\pgf@xc%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \basepoint%
+ \pgfutil@tempdima\pgf@y%
+ \csname pgf@anchor@buffer gate US@east\endcsname%
+ \pgf@y\pgfutil@tempdima%
+ }%
+ \inheritanchor[from=not gate US]{base west}%
+ \inheritanchor[from=and gate US]{base}%
+ \anchor{output}{\csname pgf@anchor@buffer gate US@east\endcsname}%
+ \anchor{east}{%
+ \dimensions%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \anchor{north}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@north west\endcsname%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@y\pgf@ya%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@y1pt}%
+ {\csname pgf@anchor@buffer gate US@north west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \fi%
+ }%
+ \anchor{south}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@south west\endcsname%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@y\pgf@ya%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@y-1pt}%
+ {\csname pgf@anchor@not gate US@south west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \fi%
+ }%
+ \anchor{south east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@south west\endcsname%
+ \pgfutil@tempdima\pgf@y%
+ \csname pgf@anchor@buffer gate US@east\endcsname%
+ \pgf@y\pgfutil@tempdima%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@x1pt\advance\pgf@y-1pt}%
+ {\csname pgf@anchor@buffer gate US@south west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xc\outerxsep%
+ \advance\pgf@x2.350943\pgf@xc%
+ }%
+ }%
+ \fi%
+ }%
+ \anchor{north east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \csname pgf@anchor@not gate US@north west\endcsname%
+ \pgfutil@tempdima\pgf@y%
+ \csname pgf@anchor@buffer gate US@east\endcsname%
+ \pgf@y\pgfutil@tempdima%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@x1pt\advance\pgf@y1pt}%
+ {\csname pgf@anchor@buffer gate US@north west\endcsname}%
+ {%
+ \pgfpointadd{\centerpoint}{%
+ \tipanchor%
+ \pgf@xa\outerxsep%
+ \advance\pgf@x2.350943\pgf@xa%
+ }%
+ }%
+ \fi%
+ }%
+ \inheritanchor[from=not gate US]{south west}%
+ \inheritanchor[from=not gate US]{north west}%
+ \inheritanchor[from=not gate US]{input}%
+ \inheritanchor[from=not gate US]{west}%
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\tipanchor}%
+ \pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{1.166666\pgf@yc}}%
+ \pgfpathlineto{\pgfqpoint{-.833333\pgf@xc}{-1.166666\pgf@yc}}%
+ \pgfpathclose%
+ %
+ % Draw the input.
+ %
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-1\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@xa\halfside%
+ \pgf@x-.833333\pgf@xa%
+ \advance\pgf@x-.5\pgflinewidth%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ }%
+ }%
\anchorborder{%
\pgf@lib@gates@not@buffer@border{buffer gate US}
- }
-}
+ }%
+}%
\pgfdeclareshape{and gate CDH}{%
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@and gate CDH\endcsname{%
- \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
- %
- \pgfmathloop%
- \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
- \else%
- \pgfutil@ifundefined{pgf@anchor@and gate CDH@input \pgfmathcounter}{%
- \expandafter\xdef\csname pgf@anchor@and gate CDH@input \pgfmathcounter\endcsname{%
- \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
- }%
- }{}%
- \repeatpgfmathloop%
- \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
- \pgferror{An and gate must have at least two inputs}%
- \fi%
- }%
- \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
- \saveddimen\invertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- }%
- \saveddimen\outerinvertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- \advance\pgf@x.5\pgflinewidth%
- }
- \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \anchor{mid east}{%
- \csname pgf@anchor@and gate CDH@east\endcsname%
- \pgf@xa\pgf@x%
- \midpoint%
- \pgf@x\pgf@xa}
- \anchor{mid west}{%
- \csname pgf@anchor@and gate CDH@west\endcsname%
- \pgf@xa\pgf@x%
- \midpoint%
- \pgf@x\pgf@xa}
- \anchor{base}{\basepoint}%
- \anchor{base east}{%
- \csname pgf@anchor@and gate CDH@east\endcsname%
- \pgf@xa\pgf@x%
- \basepoint%
- \pgf@x\pgf@xa}
- \anchor{base west}{%
- \csname pgf@anchor@and gate CDH@west\endcsname%
- \pgf@xa\pgf@x%
- \basepoint%
- \pgf@x\pgf@xa}
- \anchor{east}{%
- \dimensions%
- \pgfpointadd{\centerpoint}{\tipanchor}%
- }
- \anchor{output}{\csname pgf@anchor@and gate CDH@east\endcsname}
- \anchor{north east}{%
- \dimensions%
- \ifpgfgateanchorsuseboundingrectangle%
- \tipanchor%
- \pgf@xa\pgf@x%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\halfheight%
- \else%
- \centerpoint%
- \pgf@xa\halfwidth%
- \pgf@ya\halfheight%
- \pgf@xb\halfside%
- \advance\pgf@x-.166666\pgf@xb%
- \advance\pgf@xa\pgf@xb%
- \advance\pgf@x.5\pgf@xa%
- \advance\pgf@y-\pgf@xb%
- \advance\pgf@ya\pgf@xb%
- \advance\pgf@y.866025\pgf@ya%
- \fi%
- }
- \anchor{south east}{%
- \dimensions%
- \ifpgfgateanchorsuseboundingrectangle%
- \tipanchor%
- \pgf@xa\pgf@x%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y-\halfheight%
- \else
- \centerpoint%
- \pgf@xa\halfwidth%
- \pgf@ya\halfheight%
- \pgf@xb\halfside%
- \advance\pgf@x-.166666\pgf@xb%
- \advance\pgf@xa\pgf@xb%
- \advance\pgf@x.5\pgf@xa%
- \advance\pgf@y\pgf@xb%
- \advance\pgf@ya\pgf@xb%
- \advance\pgf@y-.866025\pgf@ya%
- \fi%
- }
- \anchor{north}{%
- \dimensions%
- \centerpoint%
- \ifpgfgateanchorsuseboundingrectangle%
- \advance\pgf@y\halfheight%
- \else%
- \pgf@ya\halfheight%
- \advance\pgf@y.993043\pgf@ya%
- \fi%
- }
- \anchor{south}{%
- \dimensions%
- \centerpoint%
- \ifpgfgateanchorsuseboundingrectangle%
- \advance\pgf@y-\halfheight%
- \else%
- \pgf@ya\halfheight%
- \advance\pgf@y-.993043\pgf@ya%
- \fi%
- }
- \anchor{south west}{%
- \dimensions%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.16666\pgf@xa%
- \advance\pgf@x-\outerxsep%
- \advance\pgf@y-\halfheight%
- }
- \anchor{north west}{%
- \dimensions%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.16666\pgf@xa%
- \advance\pgf@x-\outerxsep%
- \advance\pgf@y\halfheight%
- }
- \anchor{west}{%
- \dimensions%
- \centerpoint%
- \pgf@xa\halfside%
- \advance\pgf@x-1.16666\pgf@xa%
- \advance\pgf@x-\outerxsep%
- }
- \backgroundpath{%
- \dimensions%
- \pgf@xc\halfwidth%
- \pgf@yc\halfheight%
- \advance\pgf@xc-\outerxsep%
- \advance\pgf@yc-\outerysep%
- {%
- \pgftransformshift{\centerpoint}%
- \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
- \pgfpathclose%
- %
- % Draw the inputs.
- %
- \pgfutil@tempdima2.0\pgf@yc%
- \c@pgf@counta\numinputs%
- \advance\c@pgf@counta1\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\numinputs%
- \else%
- \advance\pgf@yc-\pgfutil@tempdima%
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
- {%
- \pgfpathcircle{%
- \pgf@xa\halfside%
- \pgf@x-1.16666\pgf@xa%
- \advance\pgf@x-.5\pgflinewidth%
- \advance\pgf@x-\invertedradius%
- \pgf@y\pgf@yc%
- }{+\invertedradius}%
- }%
- \fi%
- \repeatpgfmathloop%
- }%
- }%
- \anchorborder{%
- \pgfextract@process\externalpoint{}%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \dimensions%
- \pgf@xb\halfside%
- %
- \pgf@xb-.166666\pgf@xb%
- \ifdim\pgf@xa<\pgf@xb%
- \pgfpointadd{\centerpoint}{%
- \pgfpointborderrectangle{\externalpoint}{%
- \pgf@xc\halfside%
- \pgf@xc.166666\pgf@xc%
- \advance\pgf@xc\halfwidth%
- \pgfqpoint{\pgf@xc}{\halfheight}%
- }%
- }%
- \else%
- \ifdim\pgf@y=0pt\relax%
- \csname pgf@anchor@and gate CDH@east\endcsname%
- \else%
- \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
- \pgf@xc\halfwidth%
- \advance\pgf@xc\halfside%
- \pgf@yc\halfheight%
- \advance\pgf@yc\halfside%
- \ifdim\pgf@ya<0pt%
- \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
- {%
- \centerpoint%
- \advance\pgf@y\halfside%
- \advance\pgf@x\pgf@xb%
- }%
- {270}{330}{+\pgf@yc}%
- \else%
- \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
- {%
- \centerpoint%
- \advance\pgf@y-\halfside%
- \advance\pgf@x\pgf@xb%
- }%
- {30}{90}{+\pgf@xc and +\pgf@yc}%
- \fi%
- \fi%
- \fi%
- }
-}
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@and gate CDH\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@and gate CDH@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@and gate CDH@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \pgferror{An and gate must have at least two inputs}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }%
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \csname pgf@anchor@and gate CDH@east\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}%
+ \anchor{mid west}{%
+ \csname pgf@anchor@and gate CDH@west\endcsname%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \pgf@x\pgf@xa}%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \csname pgf@anchor@and gate CDH@east\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}%
+ \anchor{base west}{%
+ \csname pgf@anchor@and gate CDH@west\endcsname%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \pgf@x\pgf@xa}%
+ \anchor{east}{%
+ \dimensions%
+ \pgfpointadd{\centerpoint}{\tipanchor}%
+ }%
+ \anchor{output}{\csname pgf@anchor@and gate CDH@east\endcsname}%
+ \anchor{north east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \tipanchor%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\halfheight%
+ \else%
+ \centerpoint%
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\halfside%
+ \advance\pgf@x-.166666\pgf@xb%
+ \advance\pgf@xa\pgf@xb%
+ \advance\pgf@x.5\pgf@xa%
+ \advance\pgf@y-\pgf@xb%
+ \advance\pgf@ya\pgf@xb%
+ \advance\pgf@y.866025\pgf@ya%
+ \fi%
+ }%
+ \anchor{south east}{%
+ \dimensions%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \tipanchor%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y-\halfheight%
+ \else
+ \centerpoint%
+ \pgf@xa\halfwidth%
+ \pgf@ya\halfheight%
+ \pgf@xb\halfside%
+ \advance\pgf@x-.166666\pgf@xb%
+ \advance\pgf@xa\pgf@xb%
+ \advance\pgf@x.5\pgf@xa%
+ \advance\pgf@y\pgf@xb%
+ \advance\pgf@ya\pgf@xb%
+ \advance\pgf@y-.866025\pgf@ya%
+ \fi%
+ }%
+ \anchor{north}{%
+ \dimensions%
+ \centerpoint%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y\halfheight%
+ \else%
+ \pgf@ya\halfheight%
+ \advance\pgf@y.993043\pgf@ya%
+ \fi%
+ }%
+ \anchor{south}{%
+ \dimensions%
+ \centerpoint%
+ \ifpgfgateanchorsuseboundingrectangle%
+ \advance\pgf@y-\halfheight%
+ \else%
+ \pgf@ya\halfheight%
+ \advance\pgf@y-.993043\pgf@ya%
+ \fi%
+ }%
+ \anchor{south west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@y-\halfheight%
+ }%
+ \anchor{north west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ \advance\pgf@y\halfheight%
+ }%
+ \anchor{west}{%
+ \dimensions%
+ \centerpoint%
+ \pgf@xa\halfside%
+ \advance\pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-\outerxsep%
+ }%
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
+ \pgfpathclose%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@xa\halfside%
+ \pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-.5\pgflinewidth%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \dimensions%
+ \pgf@xb\halfside%
+ %
+ \pgf@xb-.166666\pgf@xb%
+ \ifdim\pgf@xa<\pgf@xb%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointborderrectangle{\externalpoint}{%
+ \pgf@xc\halfside%
+ \pgf@xc.166666\pgf@xc%
+ \advance\pgf@xc\halfwidth%
+ \pgfqpoint{\pgf@xc}{\halfheight}%
+ }%
+ }%
+ \else%
+ \ifdim\pgf@y=0pt\relax%
+ \csname pgf@anchor@and gate CDH@east\endcsname%
+ \else%
+ \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}%
+ \pgf@xc\halfwidth%
+ \advance\pgf@xc\halfside%
+ \pgf@yc\halfheight%
+ \advance\pgf@yc\halfside%
+ \ifdim\pgf@ya<0pt%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {270}{330}{+\pgf@yc}%
+ \else%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {%
+ \centerpoint%
+ \advance\pgf@y-\halfside%
+ \advance\pgf@x\pgf@xb%
+ }%
+ {30}{90}{+\pgf@xc and +\pgf@yc}%
+ \fi%
+ \fi%
+ \fi%
+ }%
+}%
\pgfdeclareshape{nand gate CDH}{%
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nand gate CDH\endcsname{%
- \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
- %
- \pgfmathloop%
- \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
- \else%
- \pgfutil@ifundefined{pgf@anchor@nand gate CDH@input \pgfmathcounter}{%
- \expandafter\xdef\csname pgf@anchor@nand gate CDH@input \pgfmathcounter\endcsname{%
- \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
- }%
- }{}%
- \repeatpgfmathloop%
- \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
- \pgferror{A nand gate must have at least two inputs}%
- \fi%
- }%
- \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
- \saveddimen\invertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- }%
- \saveddimen\outerinvertedradius{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
- \advance\pgf@x.5\pgflinewidth%
- }
- \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \inheritanchor[from=and gate CDH]{mid east}
- \inheritanchor[from=and gate CDH]{mid west}
- \anchor{base}{\basepoint}%
- \inheritanchor[from=and gate CDH]{base east}
- \inheritanchor[from=and gate CDH]{base west}
- \anchor{output}{%
- \dimensions
- \pgfpointadd{\centerpoint}{%
- \pgf@xa\halfside%
- \pgf@x-.166666\pgf@xa%
- \pgf@xb2.0\pgf@xa%
- \advance\pgf@x.866025\pgf@xb%
- \advance\pgf@x\invertedradius%
- \advance\pgf@x\outerinvertedradius%
- \advance\pgf@x\outerxsep%
- \pgf@y0pt%
- }%
- }
- \inheritanchor[from=and gate CDH]{east}
- \inheritanchor[from=and gate CDH]{north east}
- \inheritanchor[from=and gate CDH]{south east}
- \inheritanchor[from=and gate CDH]{north}
- \inheritanchor[from=and gate CDH]{south}
- \inheritanchor[from=and gate CDH]{south west}
- \inheritanchor[from=and gate CDH]{north west}
- \inheritanchor[from=and gate CDH]{west}
- \backgroundpath{%
- \dimensions%
- \pgf@xc\halfwidth%
- \pgf@yc\halfheight%
- \advance\pgf@xc-\outerxsep%
- \advance\pgf@yc-\outerysep%
- {%
- \pgftransformshift{\centerpoint}%
- \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- {%
- \pgf@yc2.0\pgf@yc%
- \edef\pgf@marshal{%
- \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
- }%
- \pgf@marshal%
- }
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
- \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
- \pgfpathclose%
- %
- % Draw the output inverter.
- %
- {%
- \pgfpathcircle{%
- \pgf@x-.166666\pgf@xc%
- \pgf@yc2.0\pgf@yc%
- \advance\pgf@x.866025\pgf@yc%
- \advance\pgf@x\outerinvertedradius%
- \pgf@y0pt%
- }{+\invertedradius}%
- }%
- %
- % Draw the inputs.
- %
- \pgfutil@tempdima2.0\pgf@yc%
- \c@pgf@counta\numinputs%
- \advance\c@pgf@counta1\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\numinputs%
- \else%
- \advance\pgf@yc-\pgfutil@tempdima%
- \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
- {%
- \pgfpathcircle{%
- \pgf@xa\halfside%
- \pgf@x-1.16666\pgf@xa%
- \advance\pgf@x-.5\pgflinewidth%
- \advance\pgf@x-\invertedradius%
- \pgf@y\pgf@yc%
- }{+\invertedradius}%
- }%
- \fi%
- \repeatpgfmathloop%
- }%
- }%
- \inheritanchorborder[from=and gate CDH]
-} \ No newline at end of file
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@nand gate CDH\endcsname{%
+ \pgf@lib@sh@logicgate@parseinputs{1024}% Maximum 1024 (!) inputs.
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs%
+ \else%
+ \pgfutil@ifundefined{pgf@anchor@nand gate CDH@input \pgfmathcounter}{%
+ \expandafter\xdef\csname pgf@anchor@nand gate CDH@input \pgfmathcounter\endcsname{%
+ \noexpand\pgf@lib@sh@logicgate@AND@inputanchor{\pgfmathcounter}%
+ }%
+ }{}%
+ \repeatpgfmathloop%
+ \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax%
+ \pgferror{A nand gate must have at least two inputs}%
+ \fi%
+ }%
+ \savedmacro\numinputs{\let\numinputs\pgf@lib@sh@logicgate@numinputs}%
+ \saveddimen\invertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ }%
+ \saveddimen\outerinvertedradius{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/logic gate inverted radius}}%
+ \advance\pgf@x.5\pgflinewidth%
+ }%
+ \savedmacro\dimensions{\pgf@lib@sh@logicgates@dimensions@orUS}%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \inheritanchor[from=and gate CDH]{mid east}%
+ \inheritanchor[from=and gate CDH]{mid west}%
+ \anchor{base}{\basepoint}%%
+ \inheritanchor[from=and gate CDH]{base east}%
+ \inheritanchor[from=and gate CDH]{base west}%
+ \anchor{output}{%
+ \dimensions
+ \pgfpointadd{\centerpoint}{%
+ \pgf@xa\halfside%
+ \pgf@x-.166666\pgf@xa%
+ \pgf@xb2.0\pgf@xa%
+ \advance\pgf@x.866025\pgf@xb%
+ \advance\pgf@x\invertedradius%
+ \advance\pgf@x\outerinvertedradius%
+ \advance\pgf@x\outerxsep%
+ \pgf@y0pt%
+ }%
+ }%
+ \inheritanchor[from=and gate CDH]{east}%
+ \inheritanchor[from=and gate CDH]{north east}%
+ \inheritanchor[from=and gate CDH]{south east}%
+ \inheritanchor[from=and gate CDH]{north}%
+ \inheritanchor[from=and gate CDH]{south}%
+ \inheritanchor[from=and gate CDH]{south west}%
+ \inheritanchor[from=and gate CDH]{north west}%
+ \inheritanchor[from=and gate CDH]{west}%
+ \backgroundpath{%
+ \dimensions%
+ \pgf@xc\halfwidth%
+ \pgf@yc\halfheight%
+ \advance\pgf@xc-\outerxsep%
+ \advance\pgf@yc-\outerysep%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfqpoint{-.16666\pgf@xc}{\pgf@yc}}%
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{90}{30}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ {%
+ \pgf@yc2.0\pgf@yc%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpatharc{-30}{-90}{\the\pgf@yc}%
+ }%
+ \pgf@marshal%
+ }
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{-\pgf@yc}}%
+ \pgfpathlineto{\pgfqpoint{-1.16666\pgf@xc}{\pgf@yc}}%
+ \pgfpathclose%
+ %
+ % Draw the output inverter.
+ %
+ {%
+ \pgfpathcircle{%
+ \pgf@x-.166666\pgf@xc%
+ \pgf@yc2.0\pgf@yc%
+ \advance\pgf@x.866025\pgf@yc%
+ \advance\pgf@x\outerinvertedradius%
+ \pgf@y0pt%
+ }{+\invertedradius}%
+ }%
+ %
+ % Draw the inputs.
+ %
+ \pgfutil@tempdima2.0\pgf@yc%
+ \c@pgf@counta\numinputs%
+ \advance\c@pgf@counta1\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\numinputs%
+ \else%
+ \advance\pgf@yc-\pgfutil@tempdima%
+ \expandafter\ifx\expandafter\pgf@lib@sh@itext\csname input-\pgfmathcounter\endcsname%
+ {%
+ \pgfpathcircle{%
+ \pgf@xa\halfside%
+ \pgf@x-1.16666\pgf@xa%
+ \advance\pgf@x-.5\pgflinewidth%
+ \advance\pgf@x-\invertedradius%
+ \pgf@y\pgf@yc%
+ }{+\invertedradius}%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ }%
+ \inheritanchorborder[from=and gate CDH]%
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.code.tex
index 72d6a6d22ba..68005a61478 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/circuits/pgflibraryshapes.gates.logic.code.tex
@@ -13,8 +13,8 @@
\pgfkeys{/pgf/.cd,%
logic gate input sep/.initial=0.125cm,
logic gate inputs/.initial={normal,normal},%
- logic gate inverted radius/.initial=2pt
-}
+ logic gate inverted radius/.initial=2pt,
+}%
% Internal macro for parsing inputs.
@@ -31,19 +31,19 @@
\let\pgf@lib@sh@next\pgf@lib@sh@logicgate@parseinputs@short%
\fi%
\pgf@lib@sh@next%
-}
-\def\pgf@lib@sh@itext{i}
-\def\pgf@lib@sh@invertedtext{inverted}
-\def\pgf@lib@sh@atchar{@}
-\def\pgf@lib@sh@gobbletilat#1@{}
-\def\pgf@lib@sh@gobbletilatcomma#1@,{}
+}%
+\def\pgf@lib@sh@itext{i}%
+\def\pgf@lib@sh@invertedtext{inverted}%
+\def\pgf@lib@sh@atchar{@}%
+\def\pgf@lib@sh@gobbletilat#1@{}%
+\def\pgf@lib@sh@gobbletilatcomma#1@,{}%
%
-% The `short' version for input specifcation is an extension of
+% The `short' version for input specification is an extension of
% ideas due to Juergen Werber and Christoph Bartoschek.
%
\def\pgf@lib@sh@logicgate@parseinputs@short{%
\expandafter\pgf@lib@sh@logicgate@parseinputs@@short\pgf@lib@sh@temp @%
-}
+}%
\def\pgf@lib@sh@logicgate@parseinputs@@short#1{%
\def\pgf@lib@sh@tmp{#1}%
\ifx\pgf@lib@sh@tmp\pgf@lib@sh@atchar%
@@ -61,17 +61,17 @@
\else%
\expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{%
\expandafter\def\csname input-\the\c@pgf@countb\endcsname{n}}%
- \fi%
+ \fi%
\let\pgf@lib@sh@next=\pgf@lib@sh@logicgate@parseinputs@@short%
\fi%
\fi%
\pgf@lib@sh@next%
-}
+}%
\def\pgf@lib@sh@logicgate@parseinputs@long{%
\expandafter\pgf@lib@sh@logicgate@parseinputs@@long\pgf@lib@sh@temp,@,%
-}
+}%
\def\pgf@lib@sh@logicgate@parseinputs@@long#1,{%
\def\pgf@lib@sh@tmp{#1}%
\ifx\pgf@lib@sh@tmp\pgf@lib@sh@atchar%
@@ -90,16 +90,14 @@
\else%
\expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{%
\expandafter\def\csname input-\the\c@pgf@countb\endcsname{n}}%
- \fi%
+ \fi%
\let\pgf@lib@sh@next=\pgf@lib@sh@logicgate@parseinputs@@@long%
\fi%
\fi%
\pgf@lib@sh@next%
-}
+}%
\def\pgf@lib@sh@logicgate@parseinputs@@@long{%
\pgfutil@ifnextchar x{\pgf@lib@sh@logicgate@parseinputs@@long}%
{\pgf@lib@sh@logicgate@parseinputs@@long}%
-}
+}%
\fi%
-
-
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.arrows.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.arrows.code.tex
index 39f90d6f2e6..0859687f9d4 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.arrows.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.arrows.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/shapes/pgflibraryshapes.arrows.code.tex,v 1.1 2008/06/26 16:55:55 tantau Exp $
+\ProvidesFileRCS{pgflibraryshapes.arrows.code.tex}
% keys for shape single arrow
@@ -17,531 +17,532 @@
% /pgf/single arrow head indent
\pgfkeys{/pgf/.cd,
- single arrow tip angle/.initial=90,
- single arrow head extend/.initial=.25cm,
- single arrow head indent/.initial=0cm}
+ single arrow tip angle/.initial=90,
+ single arrow head extend/.initial=.25cm,
+ single arrow head indent/.initial=0cm,
+}%
% Shape single arrow
%
%
\pgfdeclareshape{single arrow}{%
- \savedmacro\getsinglearrowpoints{%
- %
- % Get the outer sep.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \edef\xoutersep{\the\pgf@x}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \edef\youtersep{\the\pgf@y}%
- %
- % Get the node dimensions.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@xa.5\wd\pgfnodeparttextbox%
- \advance\pgf@xa.5\pgflinewidth%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@ya.5\ht\pgfnodeparttextbox%
- \advance\pgf@ya.5\dp\pgfnodeparttextbox%
- \advance\pgf@ya.5\pgflinewidth%
- \ifpgfshapeborderusesincircle%
- \ifdim\pgf@xa<\pgf@ya%
- \pgf@xa\pgf@ya%
- \fi%
- \pgf@xa1.41421\pgf@xa%
- \pgf@ya\pgf@xa%
- \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
- \ifdim\xoutersep>\youtersep\relax%
- \let\youtersep\xoutersep%
- \else%
- \let\xoutersep\youtersep%
- \fi%
- \else%
- %
- % Round the rotation.
- %
- \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
- \pgfmathmod@{\rotate}{360}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
- \advance\c@pgf@counta45\relax%
- \divide\c@pgf@counta90\relax%
- \multiply\c@pgf@counta90\relax%
- \ifnum\c@pgf@counta<0\relax%
- \advance\c@pgf@counta360\relax%
- \fi%
- \edef\rotate{\the\c@pgf@counta}%
- %
- % Calculate the width and height of the node
- % contents, according to any border rotation.
- %
- \ifnum\c@pgf@counta=90\relax%
- \pgf@x\pgf@xa%
- \pgf@xa\pgf@ya%
- \pgf@ya\pgf@x%
- \let\pgfmathresult\xoutersep%
- \let\xoutersep\youtersep%
- \let\youtersep\pgfmathresult%
- \else%
- \ifnum\c@pgf@counta=270\relax%
- \pgf@x\pgf@xa%
- \pgf@xa\pgf@ya%
- \pgf@ya\pgf@x%
- \let\pgfmathresult\xoutersep%
- \let\xoutersep\youtersep%
- \let\youtersep\pgfmathresult%
- \fi%
- \fi%
- \fi%
- \addtosavedmacro\rotate%
- %
- % Get some useful trig stuff.
- %
- \pgfmathdivide{\pgfkeysvalueof{/pgf/single arrow tip angle}}{2}%
- \let\halftipangle\pgfmathresult%
- \pgfmathcosec@{\halftipangle}%
- \let\cosechalftipangle\pgfmathresult%
- \pgfmathcos@{\halftipangle}%
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \pgfutil@tempdima\cosechalftipangle\pgfutil@tempdima%
- \edef\cothalftipangle{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \let\sechalftipangle\pgfmathresult%
- \pgfmathsin@{\halftipangle}%
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \pgfutil@tempdima\sechalftipangle\pgfutil@tempdima%
- \edef\tanhalftipangle{\pgfmath@tonumber{\pgfutil@tempdima}}%
- %
- % Get the single arrow head extend, and adjust for minimum width.
- %
- \pgf@xb\pgf@ya%
- \pgf@xb\cothalftipangle\pgf@xb%
- \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/single arrow head extend}}%
- \pgf@yc\pgf@xc%
- \advance\pgf@xc\pgf@ya%
- \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum width}}%
- \ifdim\pgf@xc<.5\pgfutil@tempdimb%
- \pgfutil@tempdimb.5\pgfutil@tempdimb%
- \pgfmathdivide@{\pgfmath@tonumber{\pgfutil@tempdimb}}{\pgfmath@tonumber{\pgf@xc}}%
- \pgf@ya\pgfmathresult\pgf@ya%
- \pgf@xc\pgfmathresult\pgf@xc%
- \pgf@yc\pgfmathresult\pgf@yc%
- \pgf@xb\pgfmathresult\pgf@xb%
- \fi%
- %
- % Now calculate the height of the arrow and adjust for minimum height.
- %
- \advance\pgf@xc-\pgf@ya%
- \pgf@xc\cothalftipangle\pgf@xc%
- \pgf@xa2.0\pgf@xa%
- \advance\pgf@xa\pgf@xb%
- \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@xa<\pgfutil@tempdimb%
- \pgf@xa\pgfutil@tempdimb%
- \fi%
- \advance\pgf@xa-\pgf@xb%
- \pgf@xa.5\pgf@xa%
- \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/single arrow head indent}}%
- %
- % Now:
- %
- % xa - .5 * width of the node minus xb.
- % ya - .5 * height of the node contents.
- % xb - distance from the end of the node contents to the arrow tip.
- % xc - distance from the end of the node contents to the back end of the arrow head.
- % yc - distance from the top of the node contents to the top end of the arrow head.
- %
- \pgfsavepgf@process\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \pgfsavepgf@process\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }%
- \pgfsavepgf@process\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- %
- % As the arrow is symmetrical it can be described by only four points:
- %
- \pgfsavepgf@process\arrowtip{%
- \pgf@x\pgf@xa%
- \advance\pgf@x\pgf@xb%
- \pgf@y0pt\relax%
- }%
- \pgfsavepgf@process\beforearrowtip{%
- \pgf@x\pgf@xa%
- \advance\pgf@x-\pgf@xc%
- \pgf@y\pgf@ya%
- \advance\pgf@y\pgf@yc%
- }%
- \pgfsavepgf@process\beforearrowhead{%
- \pgf@x\pgf@xa%
- \advance\pgf@x-\pgf@xc%
- \advance\pgf@x\pgfutil@tempdima%
- \pgf@y\pgf@ya%
- }%
- \pgfsavepgf@process\afterarrowtail{%
- \pgf@x-\pgf@xa%
- \pgf@y\pgf@ya%
- }%
- %
- % Calculate the anchor point at the arrow tip...
- %
- \pgfsavepgf@process\arrowtipanchor{%
- \pgfpointadd{\centerpoint}{\arrowtip}%
- \pgf@xa\xoutersep\relax%
- \advance\pgf@x\cosechalftipangle\pgf@xa%
- }%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \edef\externalradius{\the\pgf@x}%
- \addtosavedmacro\externalradius%
- %
- % ...and the rest of the points.
- %
- \pgfmathanglebetweenlines{\beforearrowtip}{\beforearrowhead}{\beforearrowtip}{\arrowtip}%
- \pgf@xa\xoutersep\relax%
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \pgfutil@tempdima.5\pgfutil@tempdima%
- \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \pgf@xa\pgfmathresult\pgf@xa%
- \pgfutil@tempdima-\pgfutil@tempdima%
- \advance\pgfutil@tempdima180pt\relax%
- \advance\pgfutil@tempdima-\halftipangle pt\relax%
- %
- \pgfsavepgf@process\beforearrowtipanchor{%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgf@xa}%
- \pgf@xb\pgf@x%
- \pgf@yb\pgf@y%
- \pgf@process{\pgfpointadd{\centerpoint}{\beforearrowtip}}%
- \advance\pgf@x\pgf@xb%
- \advance\pgf@y\pgf@yb%
- }%
- \pgfmathanglebetweenpoints{\beforearrowhead}{\beforearrowtip}%
- \pgfutil@tempdima-\pgfmathresult pt\relax%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfutil@tempdima.5\pgfutil@tempdima%
- \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \pgf@xa\xoutersep\relax%
- \pgf@xa\pgfmathresult\pgf@xa%
- \pgfutil@tempdima-\pgfutil@tempdima%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfsavepgf@process\beforearrowheadanchor{%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgf@xa}%
- \pgf@xb\pgf@x%
- \pgf@yb\pgf@y%
- \pgf@process{\pgfpointadd{\centerpoint}{\beforearrowhead}}%
- \advance\pgf@x\pgf@xb%
- \advance\pgf@y\pgf@yb%
- }%
- \pgfsavepgf@process\afterarrowtailanchor{%
- \pgfpointadd{\centerpoint}{\afterarrowtail}%
- \advance\pgf@x-\xoutersep\relax%
- \advance\pgf@y\youtersep\relax%
- }%
- %
- \pgfmathanglebetweenpoints{\centerpoint}{\beforearrowtipanchor}%
- \let\center@angle@beforearrowtip\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\beforearrowheadanchor}%
- \let\center@angle@beforearrowhead\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\afterarrowtailanchor}%
- \let\center@angle@afterarrowtail\pgfmathresult%
- \addtosavedmacro\center@angle@beforearrowtip%
- \addtosavedmacro\center@angle@beforearrowhead%
- \addtosavedmacro\center@angle@afterarrowtail%
- %
- \pgfmathanglebetweenpoints{\midpoint}{\beforearrowtipanchor}%
- \let\mid@angle@beforearrowtip\pgfmathresult%
- \pgfmathanglebetweenpoints{\midpoint}{\beforearrowheadanchor}%
- \let\mid@angle@beforearrowhead\pgfmathresult%
- \pgfmathanglebetweenpoints{\midpoint}{\afterarrowtailanchor}%
- \let\mid@angle@afterarrowtail\pgfmathresult%
- \addtosavedmacro\mid@angle@beforearrowtip%
- \addtosavedmacro\mid@angle@beforearrowhead%
- \addtosavedmacro\mid@angle@afterarrowtail%
- %
- \pgfmathanglebetweenpoints{\basepoint}{\beforearrowtipanchor}%
- \let\base@angle@beforearrowtip\pgfmathresult%
- \pgfmathanglebetweenpoints{\basepoint}{\beforearrowheadanchor}%
- \let\base@angle@beforearrowhead\pgfmathresult%
- \pgfmathanglebetweenpoints{\basepoint}{\afterarrowtailanchor}%
- \let\base@angle@afterarrowtail\pgfmathresult%
- \addtosavedmacro\base@angle@beforearrowtip%
- \addtosavedmacro\base@angle@beforearrowhead%
- \addtosavedmacro\base@angle@afterarrowtail%
- %
- \addtosavedmacro\arrowtipanchor%
- \addtosavedmacro\beforearrowtipanchor%
- \addtosavedmacro\beforearrowheadanchor%
- \addtosavedmacro\afterarrowtailanchor%
- }
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }%
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }%
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \anchor{mid east}{%
- \getsinglearrowpoints%
- \let\pgf@singlearrow@referencepoint\midpoint%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{mid west}{%
- \getsinglearrowpoints%
- \let\pgf@singlearrow@referencepoint\midpoint%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
- \anchor{base}{\basepoint}%
- \anchor{base east}{%
- \getsinglearrowpoints%
- \let\pgf@singlearrow@referencepoint\basepoint%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{base west}{%
- \getsinglearrowpoints%
- \let\pgf@singlearrow@referencepoint\basepoint%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
- \anchor{north}{%
- \getsinglearrowpoints%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{0pt}{\externalradius}}%
- }
- \anchor{south}{%
- \getsinglearrowpoints%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{0pt}{-\externalradius}}%
- }
- \anchor{east}{%
- \getsinglearrowpoints%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{west}{%
- \getsinglearrowpoints%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
- \anchor{north east}{%
- \getsinglearrowpoints%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{\externalradius}{\externalradius}}%
- }
- \anchor{south east}{%
- \getsinglearrowpoints%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{\externalradius}{-\externalradius}}%
- }
- \anchor{south west}{%
- \getsinglearrowpoints%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{-\externalradius}{-\externalradius}}%
- }
- \anchor{north west}{%
- \getsinglearrowpoints%
- \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{-\externalradius}{\externalradius}}%
- }
- \anchor{before head}{%
- \getsinglearrowpoints%
- \pgfmathrotatepointaround{\beforearrowheadanchor}{\centerpoint}{\rotate}%
- }%
- \anchor{before tip}{%
- \getsinglearrowpoints%
- \pgfmathrotatepointaround{\beforearrowtipanchor}{\centerpoint}{\rotate}%
- }%
- \anchor{tip}{%
- \getsinglearrowpoints%
- \pgfmathrotatepointaround{\arrowtipanchor}{\centerpoint}{\rotate}%
- }%
- \anchor{after tip}{%
- \getsinglearrowpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }
- \anchor{after head}{%
- \getsinglearrowpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }
- \anchor{before tail}{%
- \getsinglearrowpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\afterarrowtailanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }
- \anchor{after tail}{%
- \getsinglearrowpoints%
- \pgfmathrotatepointaround{\afterarrowtailanchor}{\centerpoint}{\rotate}%
- }
- \anchor{tail}{%
- \getsinglearrowpoints%
- \pgfpointlineattime{0.5}{%
- \pgfmathrotatepointaround{\afterarrowtailanchor}{\centerpoint}{\rotate}%
- }%
- {%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\afterarrowtailanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }%
- }%
- \backgroundpath{%
- {%
- \pgftransformshift{\centerpoint}%
- \pgftransformrotate{\rotate}%
- \pgfpathmoveto{\arrowtip}%
- \pgfpathlineto{\beforearrowtip}%
- \pgfpathlineto{\beforearrowhead}%
- \pgfpathlineto{\afterarrowtail}%
- \pgfpathlineto{\afterarrowtail\pgf@y-\pgf@y}%
- \pgfpathlineto{\beforearrowhead\pgf@y-\pgf@y}%
- \pgfpathlineto{\beforearrowtip\pgf@y-\pgf@y}%
- }%
- \pgfpathclose%
- }%
- \anchorborder{%
- \pgfsavepgf@process\externalpoint{}%
- \getsinglearrowpoints%
- \pgfutil@ifundefined{pgf@singlearrow@referencepoint}{\let\referencepoint\centerpoint}%
- {\let\referencepoint\pgf@singlearrow@referencepoint}%
- \pgfsavepgf@process\externalpoint{%
- \externalpoint%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \referencepoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya}%
- \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
- \pgfmathsubtract@{\pgfmathresult}{\rotate}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \let\externalangle\pgfmathresult%
- \pgf@x\externalangle pt\relax%
- \ifx\referencepoint\midpoint%
- \pgf@xa\mid@angle@beforearrowtip pt\relax%
- \pgf@xb\mid@angle@beforearrowhead pt\relax%
- \pgf@xc\mid@angle@afterarrowtail pt\relax%
- \else%
- \ifx\referencepoint\basepoint%
- \pgf@xa\base@angle@beforearrowtip pt\relax%
- \pgf@xb\base@angle@beforearrowhead pt\relax%
- \pgf@xc\base@angle@afterarrowtail pt\relax%
- \else%
- \pgf@xa\center@angle@beforearrowtip pt\relax%
- \pgf@xb\center@angle@beforearrowhead pt\relax%
- \pgf@xc\center@angle@afterarrowtail pt\relax%
- \fi%
- \fi%
- \ifdim\pgf@x<\pgf@xa%
- \let\firstpoint\arrowtipanchor%
- \let\secondpoint\beforearrowtipanchor%
- \else%
- \ifdim\pgf@x<\pgf@xb%
- \ifdim\pgf@xb<\pgf@xa%
- \let\firstpoint\arrowtipanchor%
- \let\secondpoint\beforearrowtipanchor%
- \else%
- \let\firstpoint\beforearrowheadanchor%
- \let\secondpoint\beforearrowtipanchor%
- \fi%
- \else%
- \ifdim\pgf@x<\pgf@xc%
- \let\firstpoint\beforearrowheadanchor%
- \let\secondpoint\afterarrowtailanchor%
- \else%
- \pgf@xc-\pgf@xc%
- \advance\pgf@xc360pt\relax%
- \ifdim\pgf@x<\pgf@xc%
- \let\firstpoint\afterarrowtailanchor%
- \pgfsavepgf@process\secondpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\afterarrowtailanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}%
- }%
- \else%
- \pgf@xa-\pgf@xa%
- \advance\pgf@xa360pt\relax%
- \pgf@xb-\pgf@xb%
- \advance\pgf@xb360pt\relax%
- \ifdim\pgf@x<\pgf@xa%
- \ifdim\pgf@x<\pgf@xb%
- \pgfsavepgf@process\firstpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\afterarrowtailanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}%
- }%
- \pgfsavepgf@process\secondpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}%
- }%
- \else%
- \ifdim\pgf@xb<\pgf@xa%
- \pgfsavepgf@process\firstpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}%
- }%
- \else%
- \pgfsavepgf@process\firstpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\arrowtipanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}%
- }%
- \fi%
- \pgfsavepgf@process\secondpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}%
- }%
- \fi%
- \else%
- \pgfsavepgf@process\firstpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}%
- }%
- \let\secondpoint\arrowtipanchor%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \pgfsavepgf@process\firstpoint{%
- \pgfmathrotatepointaround{\firstpoint}{\centerpoint}{\rotate}%
- }%
- \pgfsavepgf@process\secondpoint{%
- \pgfmathrotatepointaround{\secondpoint}{\centerpoint}{\rotate}%
- }%
- \pgfpointintersectionoflines{\referencepoint}{\externalpoint}%
- {\firstpoint}{\secondpoint}%
- }%
-}
+ \savedmacro\getsinglearrowpoints{%
+ %
+ % Get the outer sep.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \edef\xoutersep{\the\pgf@x}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \edef\youtersep{\the\pgf@y}%
+ %
+ % Get the node dimensions.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@xa.5\wd\pgfnodeparttextbox%
+ \advance\pgf@xa.5\pgflinewidth%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@ya.5\ht\pgfnodeparttextbox%
+ \advance\pgf@ya.5\dp\pgfnodeparttextbox%
+ \advance\pgf@ya.5\pgflinewidth%
+ \ifpgfshapeborderusesincircle%
+ \ifdim\pgf@xa<\pgf@ya%
+ \pgf@xa\pgf@ya%
+ \fi%
+ \pgf@xa1.41421\pgf@xa%
+ \pgf@ya\pgf@xa%
+ \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ \ifdim\xoutersep>\youtersep\relax%
+ \let\youtersep\xoutersep%
+ \else%
+ \let\xoutersep\youtersep%
+ \fi%
+ \else%
+ %
+ % Round the rotation.
+ %
+ \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ \pgfmathmod@{\rotate}{360}%
+ \afterassignment\pgfmath@gobbletilpgfmath@%
+ \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
+ \advance\c@pgf@counta45\relax%
+ \divide\c@pgf@counta90\relax%
+ \multiply\c@pgf@counta90\relax%
+ \ifnum\c@pgf@counta<0\relax%
+ \advance\c@pgf@counta360\relax%
+ \fi%
+ \edef\rotate{\the\c@pgf@counta}%
+ %
+ % Calculate the width and height of the node
+ % contents, according to any border rotation.
+ %
+ \ifnum\c@pgf@counta=90\relax%
+ \pgf@x\pgf@xa%
+ \pgf@xa\pgf@ya%
+ \pgf@ya\pgf@x%
+ \let\pgfmathresult\xoutersep%
+ \let\xoutersep\youtersep%
+ \let\youtersep\pgfmathresult%
+ \else%
+ \ifnum\c@pgf@counta=270\relax%
+ \pgf@x\pgf@xa%
+ \pgf@xa\pgf@ya%
+ \pgf@ya\pgf@x%
+ \let\pgfmathresult\xoutersep%
+ \let\xoutersep\youtersep%
+ \let\youtersep\pgfmathresult%
+ \fi%
+ \fi%
+ \fi%
+ \addtosavedmacro\rotate%
+ %
+ % Get some useful trig stuff.
+ %
+ \pgfmathdivide{\pgfkeysvalueof{/pgf/single arrow tip angle}}{2}%
+ \let\halftipangle\pgfmathresult%
+ \pgfmathcosec@{\halftipangle}%
+ \let\cosechalftipangle\pgfmathresult%
+ \pgfmathcos@{\halftipangle}%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \pgfutil@tempdima\cosechalftipangle\pgfutil@tempdima%
+ \edef\cothalftipangle{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \let\sechalftipangle\pgfmathresult%
+ \pgfmathsin@{\halftipangle}%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \pgfutil@tempdima\sechalftipangle\pgfutil@tempdima%
+ \edef\tanhalftipangle{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ %
+ % Get the single arrow head extend, and adjust for minimum width.
+ %
+ \pgf@xb\pgf@ya%
+ \pgf@xb\cothalftipangle\pgf@xb%
+ \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/single arrow head extend}}%
+ \pgf@yc\pgf@xc%
+ \advance\pgf@xc\pgf@ya%
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgf@xc<.5\pgfutil@tempdimb%
+ \pgfutil@tempdimb.5\pgfutil@tempdimb%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgfutil@tempdimb}}{\pgfmath@tonumber{\pgf@xc}}%
+ \pgf@ya\pgfmathresult\pgf@ya%
+ \pgf@xc\pgfmathresult\pgf@xc%
+ \pgf@yc\pgfmathresult\pgf@yc%
+ \pgf@xb\pgfmathresult\pgf@xb%
+ \fi%
+ %
+ % Now calculate the height of the arrow and adjust for minimum height.
+ %
+ \advance\pgf@xc-\pgf@ya%
+ \pgf@xc\cothalftipangle\pgf@xc%
+ \pgf@xa2.0\pgf@xa%
+ \advance\pgf@xa\pgf@xb%
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@xa<\pgfutil@tempdimb%
+ \pgf@xa\pgfutil@tempdimb%
+ \fi%
+ \advance\pgf@xa-\pgf@xb%
+ \pgf@xa.5\pgf@xa%
+ \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/single arrow head indent}}%
+ %
+ % Now:
+ %
+ % xa - .5 * width of the node minus xb.
+ % ya - .5 * height of the node contents.
+ % xb - distance from the end of the node contents to the arrow tip.
+ % xc - distance from the end of the node contents to the back end of the arrow head.
+ % yc - distance from the top of the node contents to the top end of the arrow head.
+ %
+ \pgfsavepgf@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \pgfsavepgf@process\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \pgfsavepgf@process\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ %
+ % As the arrow is symmetrical it can be described by only four points:
+ %
+ \pgfsavepgf@process\arrowtip{%
+ \pgf@x\pgf@xa%
+ \advance\pgf@x\pgf@xb%
+ \pgf@y0pt\relax%
+ }%
+ \pgfsavepgf@process\beforearrowtip{%
+ \pgf@x\pgf@xa%
+ \advance\pgf@x-\pgf@xc%
+ \pgf@y\pgf@ya%
+ \advance\pgf@y\pgf@yc%
+ }%
+ \pgfsavepgf@process\beforearrowhead{%
+ \pgf@x\pgf@xa%
+ \advance\pgf@x-\pgf@xc%
+ \advance\pgf@x\pgfutil@tempdima%
+ \pgf@y\pgf@ya%
+ }%
+ \pgfsavepgf@process\afterarrowtail{%
+ \pgf@x-\pgf@xa%
+ \pgf@y\pgf@ya%
+ }%
+ %
+ % Calculate the anchor point at the arrow tip...
+ %
+ \pgfsavepgf@process\arrowtipanchor{%
+ \pgfpointadd{\centerpoint}{\arrowtip}%
+ \pgf@xa\xoutersep\relax%
+ \advance\pgf@x\cosechalftipangle\pgf@xa%
+ }%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \edef\externalradius{\the\pgf@x}%
+ \addtosavedmacro\externalradius%
+ %
+ % ...and the rest of the points.
+ %
+ \pgfmathanglebetweenlines{\beforearrowtip}{\beforearrowhead}{\beforearrowtip}{\arrowtip}%
+ \pgf@xa\xoutersep\relax%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \pgfutil@tempdima.5\pgfutil@tempdima%
+ \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \pgf@xa\pgfmathresult\pgf@xa%
+ \pgfutil@tempdima-\pgfutil@tempdima%
+ \advance\pgfutil@tempdima180pt\relax%
+ \advance\pgfutil@tempdima-\halftipangle pt\relax%
+ %
+ \pgfsavepgf@process\beforearrowtipanchor{%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgf@xa}%
+ \pgf@xb\pgf@x%
+ \pgf@yb\pgf@y%
+ \pgf@process{\pgfpointadd{\centerpoint}{\beforearrowtip}}%
+ \advance\pgf@x\pgf@xb%
+ \advance\pgf@y\pgf@yb%
+ }%
+ \pgfmathanglebetweenpoints{\beforearrowhead}{\beforearrowtip}%
+ \pgfutil@tempdima-\pgfmathresult pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfutil@tempdima.5\pgfutil@tempdima%
+ \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \pgf@xa\xoutersep\relax%
+ \pgf@xa\pgfmathresult\pgf@xa%
+ \pgfutil@tempdima-\pgfutil@tempdima%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfsavepgf@process\beforearrowheadanchor{%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgf@xa}%
+ \pgf@xb\pgf@x%
+ \pgf@yb\pgf@y%
+ \pgf@process{\pgfpointadd{\centerpoint}{\beforearrowhead}}%
+ \advance\pgf@x\pgf@xb%
+ \advance\pgf@y\pgf@yb%
+ }%
+ \pgfsavepgf@process\afterarrowtailanchor{%
+ \pgfpointadd{\centerpoint}{\afterarrowtail}%
+ \advance\pgf@x-\xoutersep\relax%
+ \advance\pgf@y\youtersep\relax%
+ }%
+ %
+ \pgfmathanglebetweenpoints{\centerpoint}{\beforearrowtipanchor}%
+ \let\center@angle@beforearrowtip\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\beforearrowheadanchor}%
+ \let\center@angle@beforearrowhead\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\afterarrowtailanchor}%
+ \let\center@angle@afterarrowtail\pgfmathresult%
+ \addtosavedmacro\center@angle@beforearrowtip%
+ \addtosavedmacro\center@angle@beforearrowhead%
+ \addtosavedmacro\center@angle@afterarrowtail%
+ %
+ \pgfmathanglebetweenpoints{\midpoint}{\beforearrowtipanchor}%
+ \let\mid@angle@beforearrowtip\pgfmathresult%
+ \pgfmathanglebetweenpoints{\midpoint}{\beforearrowheadanchor}%
+ \let\mid@angle@beforearrowhead\pgfmathresult%
+ \pgfmathanglebetweenpoints{\midpoint}{\afterarrowtailanchor}%
+ \let\mid@angle@afterarrowtail\pgfmathresult%
+ \addtosavedmacro\mid@angle@beforearrowtip%
+ \addtosavedmacro\mid@angle@beforearrowhead%
+ \addtosavedmacro\mid@angle@afterarrowtail%
+ %
+ \pgfmathanglebetweenpoints{\basepoint}{\beforearrowtipanchor}%
+ \let\base@angle@beforearrowtip\pgfmathresult%
+ \pgfmathanglebetweenpoints{\basepoint}{\beforearrowheadanchor}%
+ \let\base@angle@beforearrowhead\pgfmathresult%
+ \pgfmathanglebetweenpoints{\basepoint}{\afterarrowtailanchor}%
+ \let\base@angle@afterarrowtail\pgfmathresult%
+ \addtosavedmacro\base@angle@beforearrowtip%
+ \addtosavedmacro\base@angle@beforearrowhead%
+ \addtosavedmacro\base@angle@afterarrowtail%
+ %
+ \addtosavedmacro\arrowtipanchor%
+ \addtosavedmacro\beforearrowtipanchor%
+ \addtosavedmacro\beforearrowheadanchor%
+ \addtosavedmacro\afterarrowtailanchor%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \getsinglearrowpoints%
+ \let\pgf@singlearrow@referencepoint\midpoint%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{mid west}{%
+ \getsinglearrowpoints%
+ \let\pgf@singlearrow@referencepoint\midpoint%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \getsinglearrowpoints%
+ \let\pgf@singlearrow@referencepoint\basepoint%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{base west}{%
+ \getsinglearrowpoints%
+ \let\pgf@singlearrow@referencepoint\basepoint%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{north}{%
+ \getsinglearrowpoints%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{0pt}{\externalradius}}%
+ }%
+ \anchor{south}{%
+ \getsinglearrowpoints%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{0pt}{-\externalradius}}%
+ }%
+ \anchor{east}{%
+ \getsinglearrowpoints%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{west}{%
+ \getsinglearrowpoints%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{north east}{%
+ \getsinglearrowpoints%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{\externalradius}{\externalradius}}%
+ }%
+ \anchor{south east}{%
+ \getsinglearrowpoints%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{\externalradius}{-\externalradius}}%
+ }%
+ \anchor{south west}{%
+ \getsinglearrowpoints%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{-\externalradius}{-\externalradius}}%
+ }%
+ \anchor{north west}{%
+ \getsinglearrowpoints%
+ \csname pgf@anchor@single arrow@border\endcsname{\pgfqpoint{-\externalradius}{\externalradius}}%
+ }%
+ \anchor{before head}{%
+ \getsinglearrowpoints%
+ \pgfmathrotatepointaround{\beforearrowheadanchor}{\centerpoint}{\rotate}%
+ }%
+ \anchor{before tip}{%
+ \getsinglearrowpoints%
+ \pgfmathrotatepointaround{\beforearrowtipanchor}{\centerpoint}{\rotate}%
+ }%
+ \anchor{tip}{%
+ \getsinglearrowpoints%
+ \pgfmathrotatepointaround{\arrowtipanchor}{\centerpoint}{\rotate}%
+ }%
+ \anchor{after tip}{%
+ \getsinglearrowpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{after head}{%
+ \getsinglearrowpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{before tail}{%
+ \getsinglearrowpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\afterarrowtailanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{after tail}{%
+ \getsinglearrowpoints%
+ \pgfmathrotatepointaround{\afterarrowtailanchor}{\centerpoint}{\rotate}%
+ }%
+ \anchor{tail}{%
+ \getsinglearrowpoints%
+ \pgfpointlineattime{0.5}{%
+ \pgfmathrotatepointaround{\afterarrowtailanchor}{\centerpoint}{\rotate}%
+ }%
+ {%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\afterarrowtailanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ }%
+ \backgroundpath{%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgftransformrotate{\rotate}%
+ \pgfpathmoveto{\arrowtip}%
+ \pgfpathlineto{\beforearrowtip}%
+ \pgfpathlineto{\beforearrowhead}%
+ \pgfpathlineto{\afterarrowtail}%
+ \pgfpathlineto{\afterarrowtail\pgf@y-\pgf@y}%
+ \pgfpathlineto{\beforearrowhead\pgf@y-\pgf@y}%
+ \pgfpathlineto{\beforearrowtip\pgf@y-\pgf@y}%
+ }%
+ \pgfpathclose%
+ }%
+ \anchorborder{%
+ \pgfsavepgf@process\externalpoint{}%
+ \getsinglearrowpoints%
+ \pgfutil@ifundefined{pgf@singlearrow@referencepoint}{\let\referencepoint\centerpoint}%
+ {\let\referencepoint\pgf@singlearrow@referencepoint}%
+ \pgfsavepgf@process\externalpoint{%
+ \externalpoint%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \referencepoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya}%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \pgfmathsubtract@{\pgfmathresult}{\rotate}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \let\externalangle\pgfmathresult%
+ \pgf@x\externalangle pt\relax%
+ \ifx\referencepoint\midpoint%
+ \pgf@xa\mid@angle@beforearrowtip pt\relax%
+ \pgf@xb\mid@angle@beforearrowhead pt\relax%
+ \pgf@xc\mid@angle@afterarrowtail pt\relax%
+ \else%
+ \ifx\referencepoint\basepoint%
+ \pgf@xa\base@angle@beforearrowtip pt\relax%
+ \pgf@xb\base@angle@beforearrowhead pt\relax%
+ \pgf@xc\base@angle@afterarrowtail pt\relax%
+ \else%
+ \pgf@xa\center@angle@beforearrowtip pt\relax%
+ \pgf@xb\center@angle@beforearrowhead pt\relax%
+ \pgf@xc\center@angle@afterarrowtail pt\relax%
+ \fi%
+ \fi%
+ \ifdim\pgf@x<\pgf@xa%
+ \let\firstpoint\arrowtipanchor%
+ \let\secondpoint\beforearrowtipanchor%
+ \else%
+ \ifdim\pgf@x<\pgf@xb%
+ \ifdim\pgf@xb<\pgf@xa%
+ \let\firstpoint\arrowtipanchor%
+ \let\secondpoint\beforearrowtipanchor%
+ \else%
+ \let\firstpoint\beforearrowheadanchor%
+ \let\secondpoint\beforearrowtipanchor%
+ \fi%
+ \else%
+ \ifdim\pgf@x<\pgf@xc%
+ \let\firstpoint\beforearrowheadanchor%
+ \let\secondpoint\afterarrowtailanchor%
+ \else%
+ \pgf@xc-\pgf@xc%
+ \advance\pgf@xc360pt\relax%
+ \ifdim\pgf@x<\pgf@xc%
+ \let\firstpoint\afterarrowtailanchor%
+ \pgfsavepgf@process\secondpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\afterarrowtailanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}%
+ }%
+ \else%
+ \pgf@xa-\pgf@xa%
+ \advance\pgf@xa360pt\relax%
+ \pgf@xb-\pgf@xb%
+ \advance\pgf@xb360pt\relax%
+ \ifdim\pgf@x<\pgf@xa%
+ \ifdim\pgf@x<\pgf@xb%
+ \pgfsavepgf@process\firstpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\afterarrowtailanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}%
+ }%
+ \pgfsavepgf@process\secondpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}%
+ }%
+ \else%
+ \ifdim\pgf@xb<\pgf@xa%
+ \pgfsavepgf@process\firstpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}%
+ }%
+ \else%
+ \pgfsavepgf@process\firstpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\arrowtipanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}%
+ }%
+ \fi%
+ \pgfsavepgf@process\secondpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}%
+ }%
+ \fi%
+ \else%
+ \pgfsavepgf@process\firstpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}%
+ }%
+ \let\secondpoint\arrowtipanchor%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \pgfsavepgf@process\firstpoint{%
+ \pgfmathrotatepointaround{\firstpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfsavepgf@process\secondpoint{%
+ \pgfmathrotatepointaround{\secondpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfpointintersectionoflines{\referencepoint}{\externalpoint}%
+ {\firstpoint}{\secondpoint}%
+ }%
+}%
@@ -555,504 +556,505 @@
% /pgf/double arrow head sep
\pgfkeys{/pgf/.cd,
- double arrow tip angle/.initial=90,
- double arrow head extend/.initial=.25cm,
- double arrow head indent/.initial=0cm}
+ double arrow tip angle/.initial=90,
+ double arrow head extend/.initial=.25cm,
+ double arrow head indent/.initial=0cm,
+}%
% Shape double arrow
%
%
\pgfdeclareshape{double arrow}{%
- \savedmacro\getdoublearrowpoints{%
- %
- % Get the outer sep.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \edef\xoutersep{\the\pgf@x}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \edef\youtersep{\the\pgf@y}%
- %
- % Get the node dimensions.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@xa.5\wd\pgfnodeparttextbox%
- \advance\pgf@xa.5\pgflinewidth%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@ya.5\ht\pgfnodeparttextbox%
- \advance\pgf@ya.5\dp\pgfnodeparttextbox%
- \advance\pgf@ya.5\pgflinewidth%
- \ifpgfshapeborderusesincircle%
- \ifdim\pgf@xa<\pgf@ya%
- \pgf@xa\pgf@ya%
- \fi%
- \pgf@xa1.41421\pgf@xa%
- \pgf@ya\pgf@xa%
- \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
- \ifdim\xoutersep>\youtersep\relax%
- \let\youtersep\xoutersep%
- \else%
- \let\xoutersep\youtersep%
- \fi%
- \else%
- %
- % Round the rotation.
- %
- \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}
- \pgfmathmod@{\rotate}{360}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
- \advance\c@pgf@counta45\relax%
- \divide\c@pgf@counta90\relax%
- \multiply\c@pgf@counta90\relax%
- \ifnum\c@pgf@counta<0\relax%
- \advance\c@pgf@counta360\relax%
- \fi%
- \edef\rotate{\the\c@pgf@counta}%
- %
- % Calculate the width and height of the node
- % contents, according to any border rotation.
- %
- \ifnum\c@pgf@counta=90\relax%
- \pgf@x\pgf@xa%
- \pgf@xa\pgf@ya%
- \pgf@ya\pgf@x%
- \let\pgfmathresult\xoutersep%
- \let\xoutersep\youtersep%
- \let\youtersep\pgfmathresult%
- \else%
- \ifnum\c@pgf@counta=270\relax%
- \pgf@x\pgf@xa%
- \pgf@xa\pgf@ya%
- \pgf@ya\pgf@x%
- \let\pgfmathresult\xoutersep%
- \let\xoutersep\youtersep%
- \let\youtersep\pgfmathresult%
- \fi%
- \fi%
- \fi%
- \addtosavedmacro\rotate%
- %
- % Get some useful trig stuff.
- %
- \pgfmathdivide{\pgfkeysvalueof{/pgf/double arrow tip angle}}{2}%
- \let\halftipangle\pgfmathresult%
- \pgfmathcosec@{\halftipangle}%
- \let\cosechalftipangle\pgfmathresult%
- \pgfmathcos@{\halftipangle}%
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \pgfutil@tempdima\cosechalftipangle\pgfutil@tempdima%
- \edef\cothalftipangle{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \let\sechalftipangle\pgfmathresult%
- \pgfmathsin@{\halftipangle}%
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \pgfutil@tempdima\sechalftipangle\pgfutil@tempdima%
- \edef\tanhalftipangle{\pgfmath@tonumber{\pgfutil@tempdima}}%
- %
- % Get the double arrow head extend, and adjust for minimum width.
- %
- \pgf@xb\pgf@ya%
- \pgf@xb\cothalftipangle\pgf@xb%
- \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/double arrow head extend}}%
- \pgf@yc\pgf@xc%
- \advance\pgf@xc\pgf@ya%
- \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum width}}%
- \ifdim\pgf@xc<.5\pgfutil@tempdimb%
- \pgfutil@tempdimb.5\pgfutil@tempdimb%
- \pgfmathdivide@{\pgfmath@tonumber{\pgfutil@tempdimb}}{\pgfmath@tonumber{\pgf@xc}}%
- \pgf@ya\pgfmathresult\pgf@ya%
- \pgf@xc\pgfmathresult\pgf@xc%
- \pgf@yc\pgfmathresult\pgf@yc%
- \pgf@xb\pgfmathresult\pgf@xb%
- \fi%
- %
- % Now calculate the height of the arrow and adjust for minimum height.
- %
- \advance\pgf@xc-\pgf@ya%
- \pgf@xc\cothalftipangle\pgf@xc%
- \advance\pgf@xa\pgf@xb%
- \pgf@xa2.0\pgf@xa%
- \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@xa<\pgfutil@tempdimb%
- \pgf@xa\pgfutil@tempdimb%
- \fi%
- \pgf@xa.5\pgf@xa%
- \advance\pgf@xa-\pgf@xb%
- \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/double arrow head indent}}%
- %
- % Now:
- %
- % xa - .5 * width of the node minus xb.
- % ya - .5 * height of the node contents.
- % xb - distance from the end of the node contents to the arrow tip.
- % xc - distance from the end of the node contents to the back end of the arrow head.
- % yc - distance from the top of the node contents to the top end of the arrow head.
- %
- \pgfsavepgf@process\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \pgfsavepgf@process\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }%
- \pgfsavepgf@process\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- %
- % As the arrow is symmetrical it can be described by only 3 points:
- %
- \pgfsavepgf@process\arrowtip{%
- \pgf@x\pgf@xa%
- \advance\pgf@x\pgf@xb%
- \pgf@y0pt\relax%
- }%
- \pgfsavepgf@process\beforearrowtip{%
- \pgf@x\pgf@xa%
- \advance\pgf@x-\pgf@xc%
- \pgf@y\pgf@ya%
- \advance\pgf@y\pgf@yc%
- }%
- \pgfsavepgf@process\beforearrowhead{%
- \pgf@x\pgf@xa%
- \advance\pgf@x-\pgf@xc%
- \advance\pgf@x\pgfutil@tempdima%
- \pgf@y\pgf@ya%
- }%
- %
- % Calculate the anchor point at the arrow tip.
- %
- \pgfsavepgf@process\arrowtipanchor{%
- \pgfpointadd{\centerpoint}{\arrowtip}%
- \pgf@xa\xoutersep\relax%
- \advance\pgf@x\cosechalftipangle\pgf@xa%
- }%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \edef\externalradius{\the\pgf@x}%
- \addtosavedmacro\externalradius%
- %
- %
- \pgfmathanglebetweenlines{\beforearrowtip}{\beforearrowhead}{\beforearrowtip}{\arrowtip}%
- \pgf@xa\xoutersep\relax%
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \pgfutil@tempdima.5\pgfutil@tempdima%
- \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \pgf@xa\pgfmathresult\pgf@xa%
- \pgfutil@tempdima-\pgfutil@tempdima%
- \advance\pgfutil@tempdima180pt\relax%
- \advance\pgfutil@tempdima-\halftipangle pt\relax%
- \pgfsavepgf@process\beforearrowtipanchor{%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgf@xa}%
- \pgf@xb\pgf@x%
- \pgf@yb\pgf@y%
- \pgf@process{\pgfpointadd{\centerpoint}{\beforearrowtip}}%
- \advance\pgf@x\pgf@xb%
- \advance\pgf@y\pgf@yb%
- }%
- \pgfmathanglebetweenpoints{\beforearrowhead}{\beforearrowtip}%
- \pgfutil@tempdima-\pgfmathresult pt\relax%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfutil@tempdima.5\pgfutil@tempdima%
- \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \pgf@xa\xoutersep\relax%
- \pgf@xa\pgfmathresult\pgf@xa%
- \pgfutil@tempdima-\pgfutil@tempdima%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfsavepgf@process\beforearrowheadanchor{%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgf@xa}%
- \pgf@xb\pgf@x%
- \pgf@yb\pgf@y%
- \pgf@process{\pgfpointadd{\centerpoint}{\beforearrowhead}}%
- \advance\pgf@x\pgf@xb%
- \advance\pgf@y\pgf@yb%
- }%
- %
- \pgfmathanglebetweenpoints{\centerpoint}{\beforearrowtipanchor}%
- \let\center@angle@beforearrowtip\pgfmathresult%
- \addtosavedmacro\center@angle@beforearrowtip%
- %
- \pgfmathanglebetweenpoints{\midpoint}{\beforearrowtipanchor}%
- \let\mid@angle@beforearrowtip\pgfmathresult%
- \addtosavedmacro\mid@angle@beforearrowtip%
- %
- \pgfmathanglebetweenpoints{\basepoint}{\beforearrowtipanchor}%
- \let\base@angle@beforearrowtip\pgfmathresult%
- \addtosavedmacro\base@angle@beforearrowtip%
- %
- \addtosavedmacro\arrowtipanchor%
- \addtosavedmacro\beforearrowtipanchor%
- \addtosavedmacro\beforearrowheadanchor%
- }
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }%
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }%
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \anchor{mid east}{%
- \getdoublearrowpoints%
- \let\pgf@singlearrow@referencepoint\midpoint%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{mid west}{%
- \getdoublearrowpoints%
- \let\pgf@singlearrow@referencepoint\midpoint%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
- \anchor{base}{\basepoint}%
- \anchor{base east}{%
- \getdoublearrowpoints%
- \let\pgf@singlearrow@referencepoint\basepoint%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{base west}{%
- \getdoublearrowpoints%
- \let\pgf@singlearrow@referencepoint\basepoint%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
- \anchor{north}{%
- \getdoublearrowpoints%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{0pt}{\externalradius}}%
- }
- \anchor{south}{%
- \getdoublearrowpoints%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{0pt}{-\externalradius}}%
- }
- \anchor{east}{%
- \getdoublearrowpoints%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{west}{%
- \getdoublearrowpoints%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
- \anchor{north east}{%
- \getdoublearrowpoints%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{\externalradius}{\externalradius}}%
- }
- \anchor{south east}{%
- \getdoublearrowpoints%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{\externalradius}{-\externalradius}}%
- }
- \anchor{south west}{%
- \getdoublearrowpoints%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{-\externalradius}{-\externalradius}}%
- }
- \anchor{north west}{%
- \getdoublearrowpoints%
- \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{-\externalradius}{\externalradius}}%
- }
- \anchor{before head 1}{%
- \getdoublearrowpoints%
- \pgfmathrotatepointaround{\beforearrowheadanchor}{\centerpoint}{\rotate}%
- }%
- \anchor{before tip 1}{%
- \getdoublearrowpoints%
- \pgfmathrotatepointaround{\beforearrowtipanchor}{\centerpoint}{\rotate}%
- }%
- \anchor{tip 1}{%
- \getdoublearrowpoints%
- \pgfmathrotatepointaround{\arrowtipanchor}{\centerpoint}{\rotate}%
- }%
- \anchor{after tip 1}{%
- \getdoublearrowpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }
- \anchor{after head 1}{%
- \getdoublearrowpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }
- \anchor{before head 2}{%
- \getdoublearrowpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
- \pgf@x-\pgf@x%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }%
- \anchor{before tip 2}{%
- \getdoublearrowpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
- \pgf@x-\pgf@x%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }%
- \anchor{tip 2}{%
- \getdoublearrowpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\arrowtipanchor}%
- \pgf@x-\pgf@x%
- }{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }%
- \anchor{after tip 2}{%
- \getdoublearrowpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
- \pgf@x-\pgf@x%
- }{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }
- \anchor{after head 2}{%
- \getdoublearrowpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
- \pgf@x-\pgf@x%
- }{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }
- \backgroundpath{%
- {%
- \pgftransformshift{\centerpoint}%
- \pgftransformrotate{\rotate}%
- \pgfpathmoveto{\arrowtip}%
- \pgfpathlineto{\beforearrowtip}%
- \pgfpathlineto{\beforearrowhead}%
- \pgfpathlineto{\beforearrowhead\pgf@x-\pgf@x}%
- \pgfpathlineto{\beforearrowtip\pgf@x-\pgf@x}%
- \pgfpathlineto{\arrowtip\pgf@x-\pgf@x}%
- \pgfpathlineto{\beforearrowtip\pgf@x-\pgf@x\pgf@y-\pgf@y}%
- \pgfpathlineto{\beforearrowhead\pgf@x-\pgf@x\pgf@y-\pgf@y}%
- \pgfpathlineto{\beforearrowhead\pgf@y-\pgf@y}%
- \pgfpathlineto{\beforearrowtip\pgf@y-\pgf@y}%
- }%
- \pgfpathclose%
- }%
- \anchorborder{%
- \pgfsavepgf@process\externalpoint{}%
- \getdoublearrowpoints%
- \pgfutil@ifundefined{pgf@singlearrow@referencepoint}{\let\referencepoint\centerpoint}%
- {\let\referencepoint\pgf@singlearrow@referencepoint}%
- \pgfsavepgf@process\externalpoint{%
- \externalpoint%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \referencepoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya}%
- \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
- \pgfmathsubtract@{\pgfmathresult}{\rotate}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \let\externalangle\pgfmathresult%
- \pgf@x\externalangle pt\relax%
- \ifx\referencepoint\midpoint%
- \pgf@xa\mid@angle@beforearrowtip pt\relax%
- \else%
- \ifx\referencepoint\basepoint%
- \pgf@xa\base@angle@beforearrowtip pt\relax%
- \else%
- \pgf@xa\center@angle@beforearrowtip pt\relax%
- \fi%
- \fi%
- \ifdim\pgf@x<180pt\relax%
- \ifdim\pgf@x<\pgf@xa%
- \let\firstpoint\arrowtipanchor%
- \let\secondpoint\beforearrowtipanchor%
- \else%
- \pgf@xa-\pgf@xa%
- \advance\pgf@xa180pt\relax%
- \ifdim\pgf@x<\pgf@xa%
- \let\firstpoint\beforearrowheadanchor%
- \pgfsavepgf@process\secondpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
- \pgf@x-\pgf@x
- }{\centerpoint}}%
- \else%
- \pgfsavepgf@process\firstpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
- \pgf@x-\pgf@x
- }{\centerpoint}}%
- \pgfsavepgf@process\secondpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\arrowtipanchor}%
- \pgf@x-\pgf@x%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- \fi%
- \fi%
- \else%
- \pgf@xa-\pgf@xa%
- \advance\pgf@xa360pt\relax%
- \ifdim\pgf@x<\pgf@xa%
- \pgf@xa-\pgf@xa%
- \advance\pgf@xa540pt\relax%
- \ifdim\pgf@x<\pgf@xa%
- \pgfsavepgf@process\firstpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\arrowtipanchor}%
- \pgf@x-\pgf@x%
- }{\centerpoint}}%
- \pgfsavepgf@process\secondpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
- \pgf@x-\pgf@x%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- \else%
- \pgfsavepgf@process\firstpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
- \pgf@x-\pgf@x%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- \pgfsavepgf@process\secondpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
- \pgf@y-\pgf@y%
- }{\centerpoint}}%
- \fi%
- \else%
- \pgfsavepgf@process\firstpoint{%
- \pgfpointadd{%
- \pgfpointdiff{\beforearrowtipanchor}{\centerpoint}%
- \pgf@x-\pgf@x%
- }{\centerpoint}}%
- \let\secondpoint\arrowtipanchor%
- \fi%
- \fi%
- \pgfsavepgf@process\firstpoint{%
- \pgfmathrotatepointaround{\firstpoint}{\centerpoint}{\rotate}%
- }%
- \pgfsavepgf@process\secondpoint{%
- \pgfmathrotatepointaround{\secondpoint}{\centerpoint}{\rotate}%
- }%
- \pgfpointintersectionoflines{\referencepoint}{\externalpoint}%
- {\firstpoint}{\secondpoint}%
- }%
-}
+ \savedmacro\getdoublearrowpoints{%
+ %
+ % Get the outer sep.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \edef\xoutersep{\the\pgf@x}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \edef\youtersep{\the\pgf@y}%
+ %
+ % Get the node dimensions.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@xa.5\wd\pgfnodeparttextbox%
+ \advance\pgf@xa.5\pgflinewidth%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@ya.5\ht\pgfnodeparttextbox%
+ \advance\pgf@ya.5\dp\pgfnodeparttextbox%
+ \advance\pgf@ya.5\pgflinewidth%
+ \ifpgfshapeborderusesincircle%
+ \ifdim\pgf@xa<\pgf@ya%
+ \pgf@xa\pgf@ya%
+ \fi%
+ \pgf@xa1.41421\pgf@xa%
+ \pgf@ya\pgf@xa%
+ \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ \ifdim\xoutersep>\youtersep\relax%
+ \let\youtersep\xoutersep%
+ \else%
+ \let\xoutersep\youtersep%
+ \fi%
+ \else%
+ %
+ % Round the rotation.
+ %
+ \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}
+ \pgfmathmod@{\rotate}{360}%
+ \afterassignment\pgfmath@gobbletilpgfmath@%
+ \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
+ \advance\c@pgf@counta45\relax%
+ \divide\c@pgf@counta90\relax%
+ \multiply\c@pgf@counta90\relax%
+ \ifnum\c@pgf@counta<0\relax%
+ \advance\c@pgf@counta360\relax%
+ \fi%
+ \edef\rotate{\the\c@pgf@counta}%
+ %
+ % Calculate the width and height of the node
+ % contents, according to any border rotation.
+ %
+ \ifnum\c@pgf@counta=90\relax%
+ \pgf@x\pgf@xa%
+ \pgf@xa\pgf@ya%
+ \pgf@ya\pgf@x%
+ \let\pgfmathresult\xoutersep%
+ \let\xoutersep\youtersep%
+ \let\youtersep\pgfmathresult%
+ \else%
+ \ifnum\c@pgf@counta=270\relax%
+ \pgf@x\pgf@xa%
+ \pgf@xa\pgf@ya%
+ \pgf@ya\pgf@x%
+ \let\pgfmathresult\xoutersep%
+ \let\xoutersep\youtersep%
+ \let\youtersep\pgfmathresult%
+ \fi%
+ \fi%
+ \fi%
+ \addtosavedmacro\rotate%
+ %
+ % Get some useful trig stuff.
+ %
+ \pgfmathdivide{\pgfkeysvalueof{/pgf/double arrow tip angle}}{2}%
+ \let\halftipangle\pgfmathresult%
+ \pgfmathcosec@{\halftipangle}%
+ \let\cosechalftipangle\pgfmathresult%
+ \pgfmathcos@{\halftipangle}%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \pgfutil@tempdima\cosechalftipangle\pgfutil@tempdima%
+ \edef\cothalftipangle{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \let\sechalftipangle\pgfmathresult%
+ \pgfmathsin@{\halftipangle}%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \pgfutil@tempdima\sechalftipangle\pgfutil@tempdima%
+ \edef\tanhalftipangle{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ %
+ % Get the double arrow head extend, and adjust for minimum width.
+ %
+ \pgf@xb\pgf@ya%
+ \pgf@xb\cothalftipangle\pgf@xb%
+ \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/double arrow head extend}}%
+ \pgf@yc\pgf@xc%
+ \advance\pgf@xc\pgf@ya%
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgf@xc<.5\pgfutil@tempdimb%
+ \pgfutil@tempdimb.5\pgfutil@tempdimb%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgfutil@tempdimb}}{\pgfmath@tonumber{\pgf@xc}}%
+ \pgf@ya\pgfmathresult\pgf@ya%
+ \pgf@xc\pgfmathresult\pgf@xc%
+ \pgf@yc\pgfmathresult\pgf@yc%
+ \pgf@xb\pgfmathresult\pgf@xb%
+ \fi%
+ %
+ % Now calculate the height of the arrow and adjust for minimum height.
+ %
+ \advance\pgf@xc-\pgf@ya%
+ \pgf@xc\cothalftipangle\pgf@xc%
+ \advance\pgf@xa\pgf@xb%
+ \pgf@xa2.0\pgf@xa%
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@xa<\pgfutil@tempdimb%
+ \pgf@xa\pgfutil@tempdimb%
+ \fi%
+ \pgf@xa.5\pgf@xa%
+ \advance\pgf@xa-\pgf@xb%
+ \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/double arrow head indent}}%
+ %
+ % Now:
+ %
+ % xa - .5 * width of the node minus xb.
+ % ya - .5 * height of the node contents.
+ % xb - distance from the end of the node contents to the arrow tip.
+ % xc - distance from the end of the node contents to the back end of the arrow head.
+ % yc - distance from the top of the node contents to the top end of the arrow head.
+ %
+ \pgfsavepgf@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \pgfsavepgf@process\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \pgfsavepgf@process\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ %
+ % As the arrow is symmetrical it can be described by only 3 points:
+ %
+ \pgfsavepgf@process\arrowtip{%
+ \pgf@x\pgf@xa%
+ \advance\pgf@x\pgf@xb%
+ \pgf@y0pt\relax%
+ }%
+ \pgfsavepgf@process\beforearrowtip{%
+ \pgf@x\pgf@xa%
+ \advance\pgf@x-\pgf@xc%
+ \pgf@y\pgf@ya%
+ \advance\pgf@y\pgf@yc%
+ }%
+ \pgfsavepgf@process\beforearrowhead{%
+ \pgf@x\pgf@xa%
+ \advance\pgf@x-\pgf@xc%
+ \advance\pgf@x\pgfutil@tempdima%
+ \pgf@y\pgf@ya%
+ }%
+ %
+ % Calculate the anchor point at the arrow tip.
+ %
+ \pgfsavepgf@process\arrowtipanchor{%
+ \pgfpointadd{\centerpoint}{\arrowtip}%
+ \pgf@xa\xoutersep\relax%
+ \advance\pgf@x\cosechalftipangle\pgf@xa%
+ }%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \edef\externalradius{\the\pgf@x}%
+ \addtosavedmacro\externalradius%
+ %
+ %
+ \pgfmathanglebetweenlines{\beforearrowtip}{\beforearrowhead}{\beforearrowtip}{\arrowtip}%
+ \pgf@xa\xoutersep\relax%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \pgfutil@tempdima.5\pgfutil@tempdima%
+ \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \pgf@xa\pgfmathresult\pgf@xa%
+ \pgfutil@tempdima-\pgfutil@tempdima%
+ \advance\pgfutil@tempdima180pt\relax%
+ \advance\pgfutil@tempdima-\halftipangle pt\relax%
+ \pgfsavepgf@process\beforearrowtipanchor{%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgf@xa}%
+ \pgf@xb\pgf@x%
+ \pgf@yb\pgf@y%
+ \pgf@process{\pgfpointadd{\centerpoint}{\beforearrowtip}}%
+ \advance\pgf@x\pgf@xb%
+ \advance\pgf@y\pgf@yb%
+ }%
+ \pgfmathanglebetweenpoints{\beforearrowhead}{\beforearrowtip}%
+ \pgfutil@tempdima-\pgfmathresult pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfutil@tempdima.5\pgfutil@tempdima%
+ \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \pgf@xa\xoutersep\relax%
+ \pgf@xa\pgfmathresult\pgf@xa%
+ \pgfutil@tempdima-\pgfutil@tempdima%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfsavepgf@process\beforearrowheadanchor{%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgf@xa}%
+ \pgf@xb\pgf@x%
+ \pgf@yb\pgf@y%
+ \pgf@process{\pgfpointadd{\centerpoint}{\beforearrowhead}}%
+ \advance\pgf@x\pgf@xb%
+ \advance\pgf@y\pgf@yb%
+ }%
+ %
+ \pgfmathanglebetweenpoints{\centerpoint}{\beforearrowtipanchor}%
+ \let\center@angle@beforearrowtip\pgfmathresult%
+ \addtosavedmacro\center@angle@beforearrowtip%
+ %
+ \pgfmathanglebetweenpoints{\midpoint}{\beforearrowtipanchor}%
+ \let\mid@angle@beforearrowtip\pgfmathresult%
+ \addtosavedmacro\mid@angle@beforearrowtip%
+ %
+ \pgfmathanglebetweenpoints{\basepoint}{\beforearrowtipanchor}%
+ \let\base@angle@beforearrowtip\pgfmathresult%
+ \addtosavedmacro\base@angle@beforearrowtip%
+ %
+ \addtosavedmacro\arrowtipanchor%
+ \addtosavedmacro\beforearrowtipanchor%
+ \addtosavedmacro\beforearrowheadanchor%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \getdoublearrowpoints%
+ \let\pgf@singlearrow@referencepoint\midpoint%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{mid west}{%
+ \getdoublearrowpoints%
+ \let\pgf@singlearrow@referencepoint\midpoint%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \getdoublearrowpoints%
+ \let\pgf@singlearrow@referencepoint\basepoint%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{base west}{%
+ \getdoublearrowpoints%
+ \let\pgf@singlearrow@referencepoint\basepoint%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{north}{%
+ \getdoublearrowpoints%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{0pt}{\externalradius}}%
+ }%
+ \anchor{south}{%
+ \getdoublearrowpoints%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{0pt}{-\externalradius}}%
+ }%
+ \anchor{east}{%
+ \getdoublearrowpoints%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{west}{%
+ \getdoublearrowpoints%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{north east}{%
+ \getdoublearrowpoints%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{\externalradius}{\externalradius}}%
+ }%
+ \anchor{south east}{%
+ \getdoublearrowpoints%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{\externalradius}{-\externalradius}}%
+ }%
+ \anchor{south west}{%
+ \getdoublearrowpoints%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{-\externalradius}{-\externalradius}}%
+ }%
+ \anchor{north west}{%
+ \getdoublearrowpoints%
+ \csname pgf@anchor@double arrow@border\endcsname{\pgfqpoint{-\externalradius}{\externalradius}}%
+ }%
+ \anchor{before head 1}{%
+ \getdoublearrowpoints%
+ \pgfmathrotatepointaround{\beforearrowheadanchor}{\centerpoint}{\rotate}%
+ }%
+ \anchor{before tip 1}{%
+ \getdoublearrowpoints%
+ \pgfmathrotatepointaround{\beforearrowtipanchor}{\centerpoint}{\rotate}%
+ }%
+ \anchor{tip 1}{%
+ \getdoublearrowpoints%
+ \pgfmathrotatepointaround{\arrowtipanchor}{\centerpoint}{\rotate}%
+ }%
+ \anchor{after tip 1}{%
+ \getdoublearrowpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{after head 1}{%
+ \getdoublearrowpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{before head 2}{%
+ \getdoublearrowpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
+ \pgf@x-\pgf@x%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{before tip 2}{%
+ \getdoublearrowpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
+ \pgf@x-\pgf@x%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{tip 2}{%
+ \getdoublearrowpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\arrowtipanchor}%
+ \pgf@x-\pgf@x%
+ }{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{after tip 2}{%
+ \getdoublearrowpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
+ \pgf@x-\pgf@x%
+ }{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{after head 2}{%
+ \getdoublearrowpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
+ \pgf@x-\pgf@x%
+ }{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \backgroundpath{%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgftransformrotate{\rotate}%
+ \pgfpathmoveto{\arrowtip}%
+ \pgfpathlineto{\beforearrowtip}%
+ \pgfpathlineto{\beforearrowhead}%
+ \pgfpathlineto{\beforearrowhead\pgf@x-\pgf@x}%
+ \pgfpathlineto{\beforearrowtip\pgf@x-\pgf@x}%
+ \pgfpathlineto{\arrowtip\pgf@x-\pgf@x}%
+ \pgfpathlineto{\beforearrowtip\pgf@x-\pgf@x\pgf@y-\pgf@y}%
+ \pgfpathlineto{\beforearrowhead\pgf@x-\pgf@x\pgf@y-\pgf@y}%
+ \pgfpathlineto{\beforearrowhead\pgf@y-\pgf@y}%
+ \pgfpathlineto{\beforearrowtip\pgf@y-\pgf@y}%
+ }%
+ \pgfpathclose%
+ }%
+ \anchorborder{%
+ \pgfsavepgf@process\externalpoint{}%
+ \getdoublearrowpoints%
+ \pgfutil@ifundefined{pgf@singlearrow@referencepoint}{\let\referencepoint\centerpoint}%
+ {\let\referencepoint\pgf@singlearrow@referencepoint}%
+ \pgfsavepgf@process\externalpoint{%
+ \externalpoint%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \referencepoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya}%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \pgfmathsubtract@{\pgfmathresult}{\rotate}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \let\externalangle\pgfmathresult%
+ \pgf@x\externalangle pt\relax%
+ \ifx\referencepoint\midpoint%
+ \pgf@xa\mid@angle@beforearrowtip pt\relax%
+ \else%
+ \ifx\referencepoint\basepoint%
+ \pgf@xa\base@angle@beforearrowtip pt\relax%
+ \else%
+ \pgf@xa\center@angle@beforearrowtip pt\relax%
+ \fi%
+ \fi%
+ \ifdim\pgf@x<180pt\relax%
+ \ifdim\pgf@x<\pgf@xa%
+ \let\firstpoint\arrowtipanchor%
+ \let\secondpoint\beforearrowtipanchor%
+ \else%
+ \pgf@xa-\pgf@xa%
+ \advance\pgf@xa180pt\relax%
+ \ifdim\pgf@x<\pgf@xa%
+ \let\firstpoint\beforearrowheadanchor%
+ \pgfsavepgf@process\secondpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
+ \pgf@x-\pgf@x
+ }{\centerpoint}}%
+ \else%
+ \pgfsavepgf@process\firstpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
+ \pgf@x-\pgf@x
+ }{\centerpoint}}%
+ \pgfsavepgf@process\secondpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\arrowtipanchor}%
+ \pgf@x-\pgf@x%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ \fi%
+ \fi%
+ \else%
+ \pgf@xa-\pgf@xa%
+ \advance\pgf@xa360pt\relax%
+ \ifdim\pgf@x<\pgf@xa%
+ \pgf@xa-\pgf@xa%
+ \advance\pgf@xa540pt\relax%
+ \ifdim\pgf@x<\pgf@xa%
+ \pgfsavepgf@process\firstpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\arrowtipanchor}%
+ \pgf@x-\pgf@x%
+ }{\centerpoint}}%
+ \pgfsavepgf@process\secondpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowtipanchor}%
+ \pgf@x-\pgf@x%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ \else%
+ \pgfsavepgf@process\firstpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
+ \pgf@x-\pgf@x%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ \pgfsavepgf@process\secondpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\centerpoint}{\beforearrowheadanchor}%
+ \pgf@y-\pgf@y%
+ }{\centerpoint}}%
+ \fi%
+ \else%
+ \pgfsavepgf@process\firstpoint{%
+ \pgfpointadd{%
+ \pgfpointdiff{\beforearrowtipanchor}{\centerpoint}%
+ \pgf@x-\pgf@x%
+ }{\centerpoint}}%
+ \let\secondpoint\arrowtipanchor%
+ \fi%
+ \fi%
+ \pgfsavepgf@process\firstpoint{%
+ \pgfmathrotatepointaround{\firstpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfsavepgf@process\secondpoint{%
+ \pgfmathrotatepointaround{\secondpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfpointintersectionoflines{\referencepoint}{\externalpoint}%
+ {\firstpoint}{\secondpoint}%
+ }%
+}%
@@ -1061,1298 +1063,1299 @@
% Internal macros for the arrow box/shape.
%
\def\pgf@lib@arrowbox@parsearrowlength#1#2#3{%
- \edef\pgf@lib@temp{#3}%
- \edef\pgf@lib@marshal{%
- \noexpand\pgfutil@in@{none}{\pgf@lib@temp}%
- }%
- \pgf@lib@marshal%
- \ifpgfutil@in@%
- #10pt\relax%
- \else%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter#1\pgf@lib@temp\relax\pgfmath@%
- %
- \edef\pgf@lib@marshal{%
- \noexpand\pgfutil@in@{from center}{\pgf@lib@temp}%
- }%
- \pgf@lib@marshal%
- \ifpgfutil@in@%
- \else%
- \ifdim#1>0pt\relax%
- \advance#1#2\relax%
- \fi%
- \fi%
- \fi}
+ \edef\pgf@lib@temp{#3}%
+ \edef\pgf@lib@marshal{%
+ \noexpand\pgfutil@in@{none}{\pgf@lib@temp}%
+ }%
+ \pgf@lib@marshal%
+ \ifpgfutil@in@%
+ #10pt\relax%
+ \else%
+ \afterassignment\pgfmath@gobbletilpgfmath@%
+ \expandafter#1\pgf@lib@temp\relax\pgfmath@%
+ %
+ \edef\pgf@lib@marshal{%
+ \noexpand\pgfutil@in@{from center}{\pgf@lib@temp}%
+ }%
+ \pgf@lib@marshal%
+ \ifpgfutil@in@%
+ \else%
+ \ifdim#1>0pt\relax%
+ \advance#1#2\relax%
+ \fi%
+ \fi%
+ \fi}%
\def\pgf@lib@arrowbox@parsearrows#1{%
- \pgfkeys{/pgf/.cd,%
- arrow box west arrow=0pt,
- arrow box east arrow=0pt,
- arrow box south arrow=0pt,
- arrow box north arrow=0pt
- }%
- \def\pgf@lib@arrowbox@extend{0pt}%
- \edef\pgf@lib@temp{#1}%
- \expandafter\pgf@lib@arrowbox@@parsearrows\pgf@lib@temp,\pgf@lib@arrowbox@parsearrows,}
+ \pgfkeys{/pgf/.cd,%
+ arrow box west arrow=0pt,
+ arrow box east arrow=0pt,
+ arrow box south arrow=0pt,
+ arrow box north arrow=0pt
+ }%
+ \def\pgf@lib@arrowbox@extend{0pt}%
+ \edef\pgf@lib@temp{#1}%
+ \expandafter\pgf@lib@arrowbox@@parsearrows\pgf@lib@temp,\pgf@lib@arrowbox@parsearrows,
+}%
\def\pgf@lib@arrowbox@@parsearrows#1,{%
- \ifx\pgf@lib@arrowbox@parsearrows#1%
- \let\pgflib@next\relax%
- \else%
- \pgfutil@in@:{#1}%
- \ifpgfutil@in@%
- \pgf@lib@arrowbox@getextend#1\pgf@lib%
- \else%
- \def\pgf@lib@arrowbox@direction{#1}%
- \fi%
- \edef\pgf@marshal{%
- \noexpand\pgfkeys{/pgf/arrow box \pgf@lib@arrowbox@direction\space arrow=\pgf@lib@arrowbox@extend}%
- }%
- \pgf@marshal%
- \let\pgflib@next\pgf@lib@arrowbox@@@parsearrows%
- \fi%
- \pgflib@next%
-}
+ \ifx\pgf@lib@arrowbox@parsearrows#1%
+ \let\pgflib@next\relax%
+ \else%
+ \pgfutil@in@:{#1}%
+ \ifpgfutil@in@%
+ \pgf@lib@arrowbox@getextend#1\pgf@lib%
+ \else%
+ \def\pgf@lib@arrowbox@direction{#1}%
+ \fi%
+ \edef\pgf@marshal{%
+ \noexpand\pgfkeys{/pgf/arrow box \pgf@lib@arrowbox@direction\space arrow=\pgf@lib@arrowbox@extend}%
+ }%
+ \pgf@marshal%
+ \let\pgflib@next\pgf@lib@arrowbox@@@parsearrows%
+ \fi%
+ \pgflib@next%
+}%
\def\pgf@lib@arrowbox@@@parsearrows{%
- \pgfutil@ifnextchar x{\relax\pgf@lib@arrowbox@@parsearrows}{\relax\pgf@lib@arrowbox@@parsearrows}%
-}
+ \pgfutil@ifnextchar x{\relax\pgf@lib@arrowbox@@parsearrows}{\relax\pgf@lib@arrowbox@@parsearrows}%
+}%
\def\pgf@lib@arrowbox@getextend#1:#2\pgf@lib{%
- \def\pgf@lib@arrowbox@direction{#1}%
- \def\pgf@lib@arrowbox@extend{#2}%
+ \def\pgf@lib@arrowbox@direction{#1}%
+ \def\pgf@lib@arrowbox@extend{#2}%
}%
%
-% /pgf/arrow box north arrow
-% /pgf/arrow box south arrow
-% /pgf/arrow box west arrow
-% /pgf/arrow box east arrow
-% /pgf/arrow box arrows
-% /pgf/arrow box shaft width
-% /pgf/arrow box head extend
-% /pgf/arrow box head indent
-% /pgf/arrow box tip angle
+% /pgf/arrow box north arrow
+% /pgf/arrow box south arrow
+% /pgf/arrow box west arrow
+% /pgf/arrow box east arrow
+% /pgf/arrow box arrows
+% /pgf/arrow box shaft width
+% /pgf/arrow box head extend
+% /pgf/arrow box head indent
+% /pgf/arrow box tip angle
%
\pgfkeys{/pgf/.cd,
- arrow box west arrow/.initial=.5cm,
- arrow box east arrow/.initial=.5cm,
- arrow box south arrow/.initial=.5cm,
- arrow box north arrow/.initial=.5cm,
- arrow box shaft width/.initial=.125cm,
- arrow box head extend/.initial=.125cm,
- arrow box head indent/.initial=0cm,
- arrow box tip angle/.initial=90,
-}
+ arrow box west arrow/.initial=.5cm,
+ arrow box east arrow/.initial=.5cm,
+ arrow box south arrow/.initial=.5cm,
+ arrow box north arrow/.initial=.5cm,
+ arrow box shaft width/.initial=.125cm,
+ arrow box head extend/.initial=.125cm,
+ arrow box head indent/.initial=0cm,
+ arrow box tip angle/.initial=90,
+}%
%
% arrow box/Shape.
%
\pgfdeclareshape{arrow box}{%
- \saveddimen\shaftwidth{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/arrow box shaft width}}%
- }%
- %
- % Calculate far the arrows extend from the center of the node.
- %
- \savedmacro\arrowboxpoints{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
- \ifdim\pgf@x<.5\pgf@xa%
- \pgf@x.5\pgf@xa%
- \fi%
- \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- %
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@y<.5\pgf@ya%
- \pgf@y.5\pgf@ya%
- \fi%
- \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- %
- \edef\halfboxwidth{\the\pgf@x}%
- \edef\halfboxheight{\the\pgf@y}%
- \pgfextract@process\arrowboxcorner{}%
- \addtosavedmacro\arrowboxcorner%
- %
- \pgf@lib@arrowbox@parsearrowlength\pgf@x{\halfboxwidth}%
- {\pgfkeysvalueof{/pgf/arrow box west arrow}}%
- \edef\westextend{\the\pgf@x}%
- \addtosavedmacro\westextend%
- %
- \pgf@lib@arrowbox@parsearrowlength\pgf@x{\halfboxwidth}%
- {\pgfkeysvalueof{/pgf/arrow box east arrow}}%
- \edef\eastextend{\the\pgf@x}%
- \addtosavedmacro\eastextend%
- %
- \pgf@lib@arrowbox@parsearrowlength\pgf@x{\halfboxheight}%
- {\pgfkeysvalueof{/pgf/arrow box north arrow}}%
- \edef\northextend{\the\pgf@x}%
- \addtosavedmacro\northextend%
- %
- \pgf@lib@arrowbox@parsearrowlength\pgf@x{\halfboxheight}%
- {\pgfkeysvalueof{/pgf/arrow box south arrow}}%
- \edef\southextend{\the\pgf@x}%
- \addtosavedmacro\southextend%
- }%
- \saveddimen\arrowheadextend{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/arrow box head extend}}%
- }%
- \saveddimen\arrowheadindent{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/arrow box head indent}}%
- }%
- %
- % Calculate the `miter' angle for the outer sep at the arrow tip.
- %
- \savedmacro\arrowtipmiterangle{%
- \pgfmathparse{\pgfkeysvalueof{/pgf/arrow box tip angle}}%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \let\arrowtipmiterangle\pgfmathresult%
- }%
- %
- % Calculate the `miter' angle for the outer sep at the point just
- % before the arrow tip.
- %
- \savedmacro\arrowheadangles{%
- %
- % Calculate the `miter' angle and its cosecant at the arrow tip...
- %
- \pgfmathparse{\pgfkeysvalueof{/pgf/arrow box tip angle}}%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \let\arrowtipmiterangle\pgfmathresult%
- \addtosavedmacro\arrowtipmiterangle%
- \pgfmathcosec@{\arrowtipmiterangle}%
- \let\cosecarrowtipmiterangle\pgfmathresult%
- \addtosavedmacro\cosecarrowtipmiterangle%
- %
- % ...before the arrow head...
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/arrow box head extend}}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/arrow box head indent}}%
- \ifdim\pgf@y=0pt\relax%
- \def\pgfmathresult{90}%
- \else%
- \ifdim\pgf@y<0pt\relax%
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
- \pgfmathatan@{\pgfmathresult}%
- \pgfmathadd@{\pgfmathresult}{180}%
- \else%
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
- \pgfmathatan@{\pgfmathresult}%
- \fi%
- \fi%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \let\beforearrowheadmiterangle\pgfmathresult%
- \addtosavedmacro\beforearrowheadmiterangle%
- \pgfmathcosec@{\beforearrowheadmiterangle}%
- \let\cosecbeforearrowheadmiterangle\pgfmathresult%
- \addtosavedmacro\cosecbeforearrowheadmiterangle%
- %
- % ...and before the arrow tip.
- %
- \pgfutil@tempdima-\arrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima90pt\relax%
- \pgfutil@tempdimb\beforearrowheadmiterangle pt\relax%
- \pgfutil@tempdimb2.0\pgfutil@tempdimb%
- \advance\pgfutil@tempdimb-90pt\relax%
- \advance\pgfutil@tempdima\pgfutil@tempdimb%
- \divide\pgfutil@tempdima2\relax%
- \edef\beforearrowtipmiterangle{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \addtosavedmacro\beforearrowtipmiterangle%
- \pgfmathcosec@{\beforearrowtipmiterangle}%
- \let\cosecbeforearrowtipmiterangle\pgfmathresult%
- \addtosavedmacro\cosecbeforearrowtipmiterangle%
- }
- \saveddimen\outerxsep{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- }%
- \saveddimen\outerysep{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer ysep}}%
- }%
- %
- % Calculate the (path) point immediately prior to an arrow tip.
- %
- \savedanchor\beforearrowtip{%
- \pgfmathparse{\pgfkeysvalueof{/pgf/arrow box tip angle}}%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \pgfmathcot@{\pgfmathresult}%
- \let\cothalfangle\pgfmathresult%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/arrow box shaft width}}%
- \pgf@y.5\pgf@y%
- \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/arrow box head extend}}%
- \pgf@y\pgf@y%
- \pgf@x\cothalfangle\pgf@y%
- }%
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt\relax%
- }%
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- \anchor{center}{\centerpoint}
- \anchor{mid}{\midpoint}
- \anchor{mid east}{%
- \arrowboxpoints%
- \ifdim\eastextend>0pt\relax%
- \let\pgf@lib@shapes@arrowbox@referencepoint\midpoint%
- \csname pgf@anchor@arrow box@border\endcsname{\pgfqpoint{\eastextend}{0pt}};
- \else%
- \arrowboxcorner%
- \pgf@xa\pgf@x%
- \midpoint%
- \advance\pgf@x\pgf@xa%
- \fi%
- }
- \anchor{mid west}{%
- \arrowboxpoints%
- \ifdim\westextend>0pt\relax%
- \let\pgf@lib@shapes@arrowbox@referencepoint\midpoint%
- \csname pgf@anchor@arrow box@border\endcsname{\pgfqpoint{-\westextend}{0pt}};
- \else%
- \arrowboxcorner%
- \pgf@xa\pgf@x%
- \midpoint%
- \advance\pgf@x-\pgf@xa%
- \fi%
- }
- \anchor{base}{\basepoint}
- \anchor{base east}{%
- \arrowboxpoints%
- \ifdim\eastextend>0pt\relax%
- \let\pgf@lib@shapes@arrowbox@referencepoint\basepoint%
- \csname pgf@anchor@arrow box@border\endcsname{\pgfqpoint{\eastextend}{0pt}};
- \else%
- \arrowboxcorner%
- \pgf@xa\pgf@x%
- \basepoint%
- \advance\pgf@x\pgf@xa%
- \fi%
- }
- \anchor{base west}{%
- \arrowboxpoints%
- \ifdim\westextend>0pt\relax%
- \let\pgf@lib@shapes@arrowbox@referencepoint\basepoint%
- \csname pgf@anchor@arrow box@border\endcsname{\pgfqpoint{-\westextend}{0pt}};
- \else%
- \arrowboxcorner%
- \pgf@xa\pgf@x%
- \basepoint%
- \advance\pgf@x-\pgf@xa%
- \fi%
- }
- \anchor{north}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \csname pgf@anchor@arrow box@north arrow tip\endcsname%
- \else%
- \pgfpointadd{\centerpoint}{\arrowboxcorner}%
- \pgf@ya\pgf@y%
- \centerpoint%
- \pgf@y\pgf@ya%
- \fi%
- }%
- \anchor{south}{%
- \arrowboxpoints%
- \ifdim\southextend>0pt\relax%
- \csname pgf@anchor@arrow box@south arrow tip\endcsname%
- \else%
- \pgfpointadd{\centerpoint}{\arrowboxcorner\pgf@y-\pgf@y}%
- \pgf@ya\pgf@y%
- \centerpoint%
- \pgf@y\pgf@ya%
- \fi%
- }%
- \anchor{east}{%
- \arrowboxpoints%
- \ifdim\eastextend>0pt\relax%
- \csname pgf@anchor@arrow box@east arrow tip\endcsname%
- \else%
- \pgfpointadd{\centerpoint}{\arrowboxcorner}%
- \pgf@xa\pgf@x%
- \centerpoint%
- \pgf@x\pgf@xa%
- \fi%
- }%
- \anchor{west}{%
- \arrowboxpoints%
- \ifdim\westextend>0pt\relax%
- \csname pgf@anchor@arrow box@west arrow tip\endcsname%
- \else%
- \pgfpointadd{\centerpoint}{\arrowboxcorner\pgf@x-\pgf@x}%
- \pgf@xa\pgf@x%
- \centerpoint%
- \pgf@x\pgf@xa%
- \fi%
- }%
- \anchor{north east}{%
- \arrowboxpoints%
- \pgfpointadd{\centerpoint}{\arrowboxcorner}%
- }%
- \anchor{north west}{%
- \arrowboxpoints%
- \pgfpointadd{\centerpoint}{\arrowboxcorner\pgf@x-\pgf@x}%
- }%
- \anchor{south west}{%
- \arrowboxpoints%
- \pgfpointadd{\centerpoint}{\arrowboxcorner\pgf@x-\pgf@x\pgf@y-\pgf@y}%
- }%
- \anchor{south east}{%
- \arrowboxpoints%
- \pgfpointadd{\centerpoint}{\arrowboxcorner\pgf@y-\pgf@y}%
- }%
- \anchor{before east arrow}{%
- \arrowboxpoints%
- \ifdim\eastextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \arrowboxcorner%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- \advance\pgf@y\outerysep\relax%
- }%
- \else%
- \csname pgf@anchor@arrow box@east\endcsname%
- \fi%
- }%
- \anchor{before east arrow head}{%
- \arrowboxpoints%
- \ifdim\eastextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfutil@tempdimb\outerxsep\relax%
- \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\eastextend\relax%
- \advance\pgf@x\arrowheadindent\relax%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- }%
- }%
- \else%
- \csname pgf@anchor@arrow box@east\endcsname%
- \fi%
- }
- \anchor{before east arrow tip}{%
- \arrowboxpoints%
- \ifdim\eastextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\arrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima-\beforearrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfutil@tempdimb\outerysep\relax%
- \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\eastextend\relax%
- }%
- }%
- \else%
- \csname pgf@anchor@arrow box@east\endcsname%
- \fi%
- }
- \anchor{east arrow tip}{%
- \arrowboxpoints%
- \ifdim\eastextend>0pt\relax%
- \centerpoint%
- \advance\pgf@x\eastextend\relax%
- \pgf@xa\outerxsep\relax%
- \pgfmathcosec@{\arrowtipmiterangle}%
- \advance\pgf@x\pgfmathresult\pgf@xa%
- \else%
- \csname pgf@anchor@arrow box@east\endcsname%
- \fi%
- }
- \anchor{after east arrow tip}{%
- \arrowboxpoints%
- \ifdim\eastextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\arrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima-\beforearrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfutil@tempdimb\outerysep\relax%
- \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\eastextend\relax%
- }%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@east\endcsname%
- \fi%
- }
- \anchor{after east arrow head}{%
- \arrowboxpoints%
- \ifdim\eastextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfutil@tempdimb\outerxsep\relax%
- \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\eastextend\relax%
- \advance\pgf@x\arrowheadindent\relax%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- }%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@east\endcsname%
- \fi%
- }
- \anchor{after east arrow}{%
- \arrowboxpoints%
- \ifdim\eastextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \arrowboxcorner%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- \advance\pgf@y\outerysep\relax%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@east\endcsname%
- \fi%
- }%
- %
- \anchor{before west arrow}{%
- \arrowboxpoints%
- \ifdim\westextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \arrowboxcorner%
- \pgf@x-\pgf@x%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- \advance\pgf@y\outerysep\relax%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@west\endcsname%
- \fi%
- }%
- \anchor{before west arrow head}{%
- \arrowboxpoints%
- \ifdim\westextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfutil@tempdimb\outerxsep\relax%
- \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\westextend\relax%
- \advance\pgf@x\arrowheadindent\relax%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- }%
- \pgf@x-\pgf@x%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@west\endcsname%
- \fi%
- }
- \anchor{before west arrow tip}{%
- \arrowboxpoints%
- \ifdim\westextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\arrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima-\beforearrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfutil@tempdimb\outerysep\relax%
- \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\westextend\relax%
- }%
- \pgf@x-\pgf@x%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@west\endcsname%
- \fi%
- }
- \anchor{west arrow tip}{%
- \arrowboxpoints%
- \ifdim\westextend>0pt\relax%
- \centerpoint%
- \advance\pgf@x-\westextend\relax%
- \pgf@xa\outerxsep\relax%
- \pgfmathcosec@{\arrowtipmiterangle}%
- \advance\pgf@x-\pgfmathresult\pgf@xa%
- \else%
- \csname pgf@anchor@arrow box@west\endcsname%
- \fi%
- }
- \anchor{after west arrow tip}{%
- \arrowboxpoints%
- \ifdim\westextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\arrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima-\beforearrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfutil@tempdimb\outerysep\relax%
- \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\westextend\relax%
- }%
- \pgf@x-\pgf@x%
- }%
- \else%
- \csname pgf@anchor@arrow box@west\endcsname%
- \fi%
- }
- \anchor{after west arrow head}{%
- \arrowboxpoints%
- \ifdim\westextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfutil@tempdimb\outerxsep\relax%
- \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\westextend\relax%
- \advance\pgf@x\arrowheadindent\relax%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- }%
- \pgf@x-\pgf@x%
- }%
- \else%
- \csname pgf@anchor@arrow box@west\endcsname%
- \fi%
- }
- \anchor{after west arrow}{%
- \arrowboxpoints%
- \ifdim\westextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \arrowboxcorner%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- \advance\pgf@y\outerysep\relax%
- \pgf@x-\pgf@x%
- }%
- \else%
- \csname pgf@anchor@arrow box@west\endcsname%
- \fi%
- }%
- %
- \anchor{before north arrow}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \arrowboxcorner%
- \pgf@x-\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- \advance\pgf@x-\outerxsep\relax%
- }%
- \else%
- \csname pgf@anchor@arrow box@north\endcsname%
- \fi%
- }
- \anchor{before north arrow head}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
- \advance\pgfutil@tempdima270pt\relax%
- \pgfutil@tempdimb\outerysep\relax%
- \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@y-\pgf@x%
- \advance\pgf@y\northextend\relax%
- \advance\pgf@y\arrowheadindent\relax%
- \pgf@x-\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- }%
- }%
- \else%
- \csname pgf@anchor@arrow box@north\endcsname%
- \fi%
- }
- \anchor{before north arrow tip}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima\arrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima\beforearrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima-90pt\relax%
- \pgfutil@tempdimb\outerxsep\relax%
- \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@xa\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y-\pgf@xa%
- \advance\pgf@y\northextend\relax%
- }%
- \pgf@x-\pgf@x%
- }%
- \else%
- \csname pgf@anchor@arrow box@north\endcsname%
- \fi%
- }
- \anchor{north arrow tip}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \centerpoint%
- \advance\pgf@y\northextend\relax%
- \pgf@ya\outerysep\relax%
- \pgfmathcosec@{\arrowtipmiterangle}%
- \advance\pgf@y\pgfmathresult\pgf@ya%
- \else%
- \csname pgf@anchor@arrow box@north\endcsname%
- \fi%
- }
- \anchor{after north arrow tip}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima\arrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima\beforearrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima-90pt\relax%
- \pgfutil@tempdimb\outerxsep\relax%
- \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@xa\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y-\pgf@xa%
- \advance\pgf@y\northextend\relax%
- }%
- }%
- \else%
- \csname pgf@anchor@arrow box@north\endcsname%
- \fi%
- }
- \anchor{after north arrow head}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
- \advance\pgfutil@tempdima270pt\relax%
- \pgfutil@tempdimb\outerysep\relax%
- \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@y-\pgf@x%
- \advance\pgf@y\northextend\relax%
- \advance\pgf@y\arrowheadindent\relax%
- \pgf@x-\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- }%
- \pgf@x-\pgf@x%
- }%
- \else%
- \csname pgf@anchor@arrow box@north\endcsname%
- \fi%
- }
- \anchor{after north arrow}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \arrowboxcorner%
- \pgf@x\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- \advance\pgf@x\outerxsep\relax%
- }%
- \else%
- \csname pgf@anchor@arrow box@north\endcsname%
- \fi%
- }
- %
- \anchor{before south arrow}{%
- \arrowboxpoints%
- \ifdim\southextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \arrowboxcorner%
- \pgf@x\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- \advance\pgf@x\outerxsep\relax%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@south\endcsname%
- \fi%
- }%
- \anchor{before south arrow head}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
- \advance\pgfutil@tempdima270pt\relax%
- \pgfutil@tempdimb\outerysep\relax%
- \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@y-\pgf@x%
- \advance\pgf@y\northextend\relax%
- \advance\pgf@y\arrowheadindent\relax%
- \pgf@x-\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- }%
- \pgf@x-\pgf@x%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@south\endcsname%
- \fi%
- }
- \anchor{before south arrow tip}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima\arrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima\beforearrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima-90pt\relax%
- \pgfutil@tempdimb\outerxsep\relax%
- \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@xa\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y-\pgf@xa%
- \advance\pgf@y\northextend\relax%
- }%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@south\endcsname%
- \fi%
- }
- \anchor{south arrow tip}{%
- \arrowboxpoints%
- \ifdim\southextend>0pt\relax%
- \centerpoint%
- \advance\pgf@y-\southextend\relax%
- \pgf@ya\outerysep\relax%
- \pgfmathcosec@{\arrowtipmiterangle}%
- \advance\pgf@y-\pgfmathresult\pgf@ya%
- \else%
- \csname pgf@anchor@arrow box@east\endcsname%
- \fi%
- }
- \anchor{after south arrow tip}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima\arrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima\beforearrowtipmiterangle pt\relax%
- \advance\pgfutil@tempdima-90pt\relax%
- \pgfutil@tempdimb\outerxsep\relax%
- \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@xa\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y-\pgf@xa%
- \advance\pgf@y\northextend\relax%
- }%
- \pgf@x-\pgf@x%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@south\endcsname%
- \fi%
- }
- \anchor{after south arrow head}{%
- \arrowboxpoints%
- \ifdim\northextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \pgfpointadd{%
- \arrowheadangles%
- \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
- \advance\pgfutil@tempdima270pt\relax%
- \pgfutil@tempdimb\outerysep\relax%
- \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }%
- {%
- \beforearrowtip%
- \pgf@y-\pgf@x%
- \advance\pgf@y\northextend\relax%
- \advance\pgf@y\arrowheadindent\relax%
- \pgf@x-\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- }%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@south\endcsname%
- \fi%
- }
- \anchor{after south arrow}{%
- \arrowboxpoints%
- \ifdim\southextend>0pt\relax%
- \pgfpointadd{\centerpoint}{%
- \arrowboxcorner%
- \pgf@x-\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- \advance\pgf@x-\outerxsep\relax%
- \pgf@y-\pgf@y%
- }%
- \else%
- \csname pgf@anchor@arrow box@south\endcsname%
- \fi%
- }%
- %
- \backgroundpath{%
- \arrowboxpoints%
- \pgfextract@process\arrowboxcorner{%
- \arrowboxcorner%
- \pgfmathaddtolength\pgf@x{-\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathaddtolength\pgf@y{-\pgfkeysvalueof{/pgf/outer ysep}}%
- }%
- {%
- \pgftransformshift{\centerpoint}%
- \pgfpathmoveto{\arrowboxcorner}%
- \ifdim\eastextend>0pt\relax%
- \pgfpathlineto{%
- \arrowboxcorner%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\eastextend\relax%
- \advance\pgf@x\arrowheadindent\relax%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\eastextend\relax%
- }%
- \pgfpathlineto{%
- \pgf@x\eastextend\relax%
- \pgf@y0pt\relax%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\eastextend\relax%
- \pgf@y-\pgf@y%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@x-\pgf@x%
- \advance\pgf@x\eastextend\relax%
- \advance\pgf@x\arrowheadindent\relax%
- \pgf@y\shaftwidth\relax%
- \pgf@y-.5\pgf@y%
- }%
- \pgfpathlineto{%
- \arrowboxcorner%
- \pgf@y\shaftwidth\relax%
- \pgf@y-.5\pgf@y%
- }%
- \fi%
- \pgfpathlineto{\arrowboxcorner\pgf@y-\pgf@y}%
- \ifdim\southextend>0pt\relax%
- \pgfpathlineto{%
- \arrowboxcorner%
- \pgf@x\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- \pgf@y-\pgf@y%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@y\pgf@x%
- \advance\pgf@y-\southextend\relax%
- \advance\pgf@y-\arrowheadindent\relax%
- \pgf@x\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@xa\pgf@y%
- \pgf@y\pgf@x%
- \advance\pgf@y-\southextend\relax%
- \pgf@x\pgf@xa%
- }%
- \pgfpathlineto{%
- \pgf@x0pt\relax%
- \pgf@y-\southextend\relax%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@xa\pgf@y%
- \pgf@y\pgf@x%
- \advance\pgf@y-\southextend\relax%
- \pgf@x-\pgf@xa%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@y\pgf@x%
- \advance\pgf@y-\southextend\relax%
- \advance\pgf@y-\arrowheadindent\relax%
- \pgf@x\shaftwidth\relax%
- \pgf@x-.5\pgf@x%
- }%
- \pgfpathlineto{%
- \arrowboxcorner%
- \pgf@x\shaftwidth\relax%
- \pgf@x-.5\pgf@x%
- \pgf@y-\pgf@y%
- }%
- \fi%
- \pgfpathlineto{\arrowboxcorner\pgf@x-\pgf@x\pgf@y-\pgf@y}%
- \ifdim\westextend>0pt\relax%
- \pgfpathlineto{%
- \arrowboxcorner%
- \pgf@x-\pgf@x
- \pgf@y\shaftwidth\relax%
- \pgf@y-.5\pgf@y%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \advance\pgf@x-\westextend\relax%
- \advance\pgf@x-\arrowheadindent\relax%
- \pgf@y\shaftwidth\relax%
- \pgf@y-.5\pgf@y%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \advance\pgf@x-\westextend\relax%
- \pgf@y-\pgf@y%
- }%
- \pgfpathlineto{%
- \pgf@x-\westextend\relax%
- \pgf@y0pt\relax%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \advance\pgf@x-\westextend\relax%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \advance\pgf@x-\westextend\relax%
- \advance\pgf@x-\arrowheadindent\relax%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- }%
- \pgfpathlineto{%
- \arrowboxcorner%
- \pgf@x-\pgf@x%
- \pgf@y\shaftwidth\relax%
- \pgf@y.5\pgf@y%
- }%
- \fi%
- \pgfpathlineto{\arrowboxcorner\pgf@x-\pgf@x}%
- \ifdim\northextend>0pt\relax%
- \pgfpathlineto{%
- \arrowboxcorner%
- \pgf@x\shaftwidth\relax%
- \pgf@x-.5\pgf@x%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@y-\pgf@x%
- \advance\pgf@y\northextend\relax%
- \advance\pgf@y\arrowheadindent\relax%
- \pgf@x\shaftwidth\relax%
- \pgf@x-.5\pgf@x%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@xa\pgf@y%
- \pgf@y-\pgf@x%
- \advance\pgf@y\northextend\relax%
- \pgf@x-\pgf@xa%
- }%
- \pgfpathlineto{%
- \pgf@x0pt\relax%
- \pgf@y\northextend\relax%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@xa\pgf@y%
- \pgf@y-\pgf@x%
- \advance\pgf@y\northextend\relax%
- \pgf@x\pgf@xa%
- }%
- \pgfpathlineto{%
- \beforearrowtip%
- \pgf@y-\pgf@x%
- \advance\pgf@y\northextend\relax%
- \advance\pgf@y\arrowheadindent\relax%
- \pgf@x\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- }%
- \pgfpathlineto{%
- \arrowboxcorner%
- \pgf@x\shaftwidth\relax%
- \pgf@x.5\pgf@x%
- }%
- \fi%
- \pgfpathclose%
- }%
- }
- \anchorborder{%
- \pgfextract@process\externalpoint{}%
- \pgfutil@ifundefined{pgf@lib@shapes@arrowbox@referencepoint}%
- {\let\referencepoint\centerpoint}{\let\referencepoint\pgf@lib@shapes@arrowbox@referencepoint}%
- \pgfextract@process\externalpoint{%
- \pgfpointadd{\referencepoint}{\externalpoint}%
- }%
- \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
- \let\externalangle\pgfmathresult%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@west\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@north\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@north east\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@before east arrow tip\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{east arrow tip}%
- \def\secondpoint{before east arrow tip}%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@before east arrow\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{before east arrow head}%
- \def\secondpoint{before east arrow}%
- \else%
- \def\firstpoint{before east arrow}%
- \def\secondpoint{north east}%
- \fi%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@after north arrow tip\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@after north arrow\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{north east}%
- \def\secondpoint{after north arrow}%
- \else%
- \def\firstpoint{after north arrow}%
- \def\secondpoint{after north arrow head}%
- \fi%
- \else%
- \def\firstpoint{after north arrow tip}%
- \def\secondpoint{north arrow tip}%
- \fi%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@north west\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@before north arrow tip\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{north arrow tip}%
- \def\secondpoint{before north arrow tip}%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@before north arrow\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{before north head}%
- \def\secondpoint{before north arrow}%
- \else%
- \def\firstpoint{before north arrow}%
- \def\secondpoint{north west}%
- \fi%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@after west arrow tip\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@after west arrow\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{north west}%
- \def\secondpoint{after west arrow}%
- \else%
- \def\firstpoint{after west arrow}%
- \def\secondpoint{after west arrow head}%
- \fi%
- \else%
- \def\firstpoint{after west arrow tip}%
- \def\secondpoint{west arrow tip}%
- \fi%
- \fi%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@south arrow tip\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@south west\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@before west arrow tip\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{west arrow tip}%
- \def\secondpoint{before west arrow tip}%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@before west arrow\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{before west arrow head}%
- \def\secondpoint{before west arrow}%
- \else%
- \def\firstpoint{before west arrow}%
- \def\secondpoint{south west}%
- \fi%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@after south arrow tip\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@after south arrow\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{south west}%
- \def\secondpoint{after south arrow}%
- \else%
- \def\firstpoint{after south arrow}%
- \def\secondpoint{after south arrow head}%
- \fi%
- \else%
- \def\firstpoint{after south arrow tip}%
- \def\secondpoint{south arrow tip}%
- \fi%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@south east\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@before south arrow tip\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{south arrow tip}%
- \def\secondpoint{before south arrow tip}%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@before south arrow\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{before south arrow head}%
- \def\secondpoint{before south arrow}%
- \else%
- \def\firstpoint{before south arrow}%
- \def\secondpoint{south east}%
- \fi%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@after east arrow tip\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}%
- {\csname pgf@anchor@arrow box@after east arrow\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \def\firstpoint{south east}%
- \def\secondpoint{after east arrow}%
- \else%
- \def\firstpoint{after east arrow}%
- \def\secondpoint{after east arrow head}%
- \fi%
- \else%
- \def\firstpoint{after east arrow tip}%
- \def\secondpoint{east arrow tip}%
- \fi%
- \fi%
- \fi%
- \fi%
- \pgfpointintersectionoflines{\referencepoint}{\externalpoint}%
- {\csname pgf@anchor@arrow box@\firstpoint\endcsname}%
- {\csname pgf@anchor@arrow box@\secondpoint\endcsname}%
- }
-}
+ \saveddimen\shaftwidth{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/arrow box shaft width}}%
+ }%
+ %
+ % Calculate far the arrows extend from the center of the node.
+ %
+ \savedmacro\arrowboxpoints{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgf@x<.5\pgf@xa%
+ \pgf@x.5\pgf@xa%
+ \fi%
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ %
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@y<.5\pgf@ya%
+ \pgf@y.5\pgf@ya%
+ \fi%
+ \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ %
+ \edef\halfboxwidth{\the\pgf@x}%
+ \edef\halfboxheight{\the\pgf@y}%
+ \pgfextract@process\arrowboxcorner{}%
+ \addtosavedmacro\arrowboxcorner%
+ %
+ \pgf@lib@arrowbox@parsearrowlength\pgf@x{\halfboxwidth}%
+ {\pgfkeysvalueof{/pgf/arrow box west arrow}}%
+ \edef\westextend{\the\pgf@x}%
+ \addtosavedmacro\westextend%
+ %
+ \pgf@lib@arrowbox@parsearrowlength\pgf@x{\halfboxwidth}%
+ {\pgfkeysvalueof{/pgf/arrow box east arrow}}%
+ \edef\eastextend{\the\pgf@x}%
+ \addtosavedmacro\eastextend%
+ %
+ \pgf@lib@arrowbox@parsearrowlength\pgf@x{\halfboxheight}%
+ {\pgfkeysvalueof{/pgf/arrow box north arrow}}%
+ \edef\northextend{\the\pgf@x}%
+ \addtosavedmacro\northextend%
+ %
+ \pgf@lib@arrowbox@parsearrowlength\pgf@x{\halfboxheight}%
+ {\pgfkeysvalueof{/pgf/arrow box south arrow}}%
+ \edef\southextend{\the\pgf@x}%
+ \addtosavedmacro\southextend%
+ }%
+ \saveddimen\arrowheadextend{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/arrow box head extend}}%
+ }%
+ \saveddimen\arrowheadindent{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/arrow box head indent}}%
+ }%
+ %
+ % Calculate the `miter' angle for the outer sep at the arrow tip.
+ %
+ \savedmacro\arrowtipmiterangle{%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/arrow box tip angle}}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \let\arrowtipmiterangle\pgfmathresult%
+ }%
+ %
+ % Calculate the `miter' angle for the outer sep at the point just
+ % before the arrow tip.
+ %
+ \savedmacro\arrowheadangles{%
+ %
+ % Calculate the `miter' angle and its cosecant at the arrow tip...
+ %
+ \pgfmathparse{\pgfkeysvalueof{/pgf/arrow box tip angle}}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \let\arrowtipmiterangle\pgfmathresult%
+ \addtosavedmacro\arrowtipmiterangle%
+ \pgfmathcosec@{\arrowtipmiterangle}%
+ \let\cosecarrowtipmiterangle\pgfmathresult%
+ \addtosavedmacro\cosecarrowtipmiterangle%
+ %
+ % ...before the arrow head...
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/arrow box head extend}}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/arrow box head indent}}%
+ \ifdim\pgf@y=0pt\relax%
+ \def\pgfmathresult{90}%
+ \else%
+ \ifdim\pgf@y<0pt\relax%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \pgfmathatan@{\pgfmathresult}%
+ \pgfmathadd@{\pgfmathresult}{180}%
+ \else%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \pgfmathatan@{\pgfmathresult}%
+ \fi%
+ \fi%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \let\beforearrowheadmiterangle\pgfmathresult%
+ \addtosavedmacro\beforearrowheadmiterangle%
+ \pgfmathcosec@{\beforearrowheadmiterangle}%
+ \let\cosecbeforearrowheadmiterangle\pgfmathresult%
+ \addtosavedmacro\cosecbeforearrowheadmiterangle%
+ %
+ % ...and before the arrow tip.
+ %
+ \pgfutil@tempdima-\arrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima90pt\relax%
+ \pgfutil@tempdimb\beforearrowheadmiterangle pt\relax%
+ \pgfutil@tempdimb2.0\pgfutil@tempdimb%
+ \advance\pgfutil@tempdimb-90pt\relax%
+ \advance\pgfutil@tempdima\pgfutil@tempdimb%
+ \divide\pgfutil@tempdima2\relax%
+ \edef\beforearrowtipmiterangle{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \addtosavedmacro\beforearrowtipmiterangle%
+ \pgfmathcosec@{\beforearrowtipmiterangle}%
+ \let\cosecbeforearrowtipmiterangle\pgfmathresult%
+ \addtosavedmacro\cosecbeforearrowtipmiterangle%
+ }%
+ \saveddimen\outerxsep{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ }%
+ \saveddimen\outerysep{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer ysep}}%
+ }%
+ %
+ % Calculate the (path) point immediately prior to an arrow tip.
+ %
+ \savedanchor\beforearrowtip{%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/arrow box tip angle}}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \pgfmathcot@{\pgfmathresult}%
+ \let\cothalfangle\pgfmathresult%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/arrow box shaft width}}%
+ \pgf@y.5\pgf@y%
+ \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/arrow box head extend}}%
+ \pgf@y\pgf@y%
+ \pgf@x\cothalfangle\pgf@y%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \arrowboxpoints%
+ \ifdim\eastextend>0pt\relax%
+ \let\pgf@lib@shapes@arrowbox@referencepoint\midpoint%
+ \csname pgf@anchor@arrow box@border\endcsname{\pgfqpoint{\eastextend}{0pt}};
+ \else%
+ \arrowboxcorner%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \advance\pgf@x\pgf@xa%
+ \fi%
+ }%
+ \anchor{mid west}{%
+ \arrowboxpoints%
+ \ifdim\westextend>0pt\relax%
+ \let\pgf@lib@shapes@arrowbox@referencepoint\midpoint%
+ \csname pgf@anchor@arrow box@border\endcsname{\pgfqpoint{-\westextend}{0pt}};
+ \else%
+ \arrowboxcorner%
+ \pgf@xa\pgf@x%
+ \midpoint%
+ \advance\pgf@x-\pgf@xa%
+ \fi%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \arrowboxpoints%
+ \ifdim\eastextend>0pt\relax%
+ \let\pgf@lib@shapes@arrowbox@referencepoint\basepoint%
+ \csname pgf@anchor@arrow box@border\endcsname{\pgfqpoint{\eastextend}{0pt}};
+ \else%
+ \arrowboxcorner%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \advance\pgf@x\pgf@xa%
+ \fi%
+ }%
+ \anchor{base west}{%
+ \arrowboxpoints%
+ \ifdim\westextend>0pt\relax%
+ \let\pgf@lib@shapes@arrowbox@referencepoint\basepoint%
+ \csname pgf@anchor@arrow box@border\endcsname{\pgfqpoint{-\westextend}{0pt}};
+ \else%
+ \arrowboxcorner%
+ \pgf@xa\pgf@x%
+ \basepoint%
+ \advance\pgf@x-\pgf@xa%
+ \fi%
+ }%
+ \anchor{north}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \csname pgf@anchor@arrow box@north arrow tip\endcsname%
+ \else%
+ \pgfpointadd{\centerpoint}{\arrowboxcorner}%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@y\pgf@ya%
+ \fi%
+ }%
+ \anchor{south}{%
+ \arrowboxpoints%
+ \ifdim\southextend>0pt\relax%
+ \csname pgf@anchor@arrow box@south arrow tip\endcsname%
+ \else%
+ \pgfpointadd{\centerpoint}{\arrowboxcorner\pgf@y-\pgf@y}%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \pgf@y\pgf@ya%
+ \fi%
+ }%
+ \anchor{east}{%
+ \arrowboxpoints%
+ \ifdim\eastextend>0pt\relax%
+ \csname pgf@anchor@arrow box@east arrow tip\endcsname%
+ \else%
+ \pgfpointadd{\centerpoint}{\arrowboxcorner}%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \pgf@x\pgf@xa%
+ \fi%
+ }%
+ \anchor{west}{%
+ \arrowboxpoints%
+ \ifdim\westextend>0pt\relax%
+ \csname pgf@anchor@arrow box@west arrow tip\endcsname%
+ \else%
+ \pgfpointadd{\centerpoint}{\arrowboxcorner\pgf@x-\pgf@x}%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \pgf@x\pgf@xa%
+ \fi%
+ }%
+ \anchor{north east}{%
+ \arrowboxpoints%
+ \pgfpointadd{\centerpoint}{\arrowboxcorner}%
+ }%
+ \anchor{north west}{%
+ \arrowboxpoints%
+ \pgfpointadd{\centerpoint}{\arrowboxcorner\pgf@x-\pgf@x}%
+ }%
+ \anchor{south west}{%
+ \arrowboxpoints%
+ \pgfpointadd{\centerpoint}{\arrowboxcorner\pgf@x-\pgf@x\pgf@y-\pgf@y}%
+ }%
+ \anchor{south east}{%
+ \arrowboxpoints%
+ \pgfpointadd{\centerpoint}{\arrowboxcorner\pgf@y-\pgf@y}%
+ }%
+ \anchor{before east arrow}{%
+ \arrowboxpoints%
+ \ifdim\eastextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \arrowboxcorner%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ \advance\pgf@y\outerysep\relax%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@east\endcsname%
+ \fi%
+ }%
+ \anchor{before east arrow head}{%
+ \arrowboxpoints%
+ \ifdim\eastextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfutil@tempdimb\outerxsep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\eastextend\relax%
+ \advance\pgf@x\arrowheadindent\relax%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ }%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@east\endcsname%
+ \fi%
+ }%
+ \anchor{before east arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\eastextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\arrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima-\beforearrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfutil@tempdimb\outerysep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\eastextend\relax%
+ }%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@east\endcsname%
+ \fi%
+ }%
+ \anchor{east arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\eastextend>0pt\relax%
+ \centerpoint%
+ \advance\pgf@x\eastextend\relax%
+ \pgf@xa\outerxsep\relax%
+ \pgfmathcosec@{\arrowtipmiterangle}%
+ \advance\pgf@x\pgfmathresult\pgf@xa%
+ \else%
+ \csname pgf@anchor@arrow box@east\endcsname%
+ \fi%
+ }%
+ \anchor{after east arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\eastextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\arrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima-\beforearrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfutil@tempdimb\outerysep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\eastextend\relax%
+ }%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@east\endcsname%
+ \fi%
+ }%
+ \anchor{after east arrow head}{%
+ \arrowboxpoints%
+ \ifdim\eastextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfutil@tempdimb\outerxsep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\eastextend\relax%
+ \advance\pgf@x\arrowheadindent\relax%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ }%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@east\endcsname%
+ \fi%
+ }%
+ \anchor{after east arrow}{%
+ \arrowboxpoints%
+ \ifdim\eastextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \arrowboxcorner%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ \advance\pgf@y\outerysep\relax%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@east\endcsname%
+ \fi%
+ }%
+ %
+ \anchor{before west arrow}{%
+ \arrowboxpoints%
+ \ifdim\westextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \arrowboxcorner%
+ \pgf@x-\pgf@x%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ \advance\pgf@y\outerysep\relax%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@west\endcsname%
+ \fi%
+ }%
+ \anchor{before west arrow head}{%
+ \arrowboxpoints%
+ \ifdim\westextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfutil@tempdimb\outerxsep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\westextend\relax%
+ \advance\pgf@x\arrowheadindent\relax%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ }%
+ \pgf@x-\pgf@x%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@west\endcsname%
+ \fi%
+ }%
+ \anchor{before west arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\westextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\arrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima-\beforearrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfutil@tempdimb\outerysep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\westextend\relax%
+ }%
+ \pgf@x-\pgf@x%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@west\endcsname%
+ \fi%
+ }%
+ \anchor{west arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\westextend>0pt\relax%
+ \centerpoint%
+ \advance\pgf@x-\westextend\relax%
+ \pgf@xa\outerxsep\relax%
+ \pgfmathcosec@{\arrowtipmiterangle}%
+ \advance\pgf@x-\pgfmathresult\pgf@xa%
+ \else%
+ \csname pgf@anchor@arrow box@west\endcsname%
+ \fi%
+ }%
+ \anchor{after west arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\westextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\arrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima-\beforearrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfutil@tempdimb\outerysep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\westextend\relax%
+ }%
+ \pgf@x-\pgf@x%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@west\endcsname%
+ \fi%
+ }%
+ \anchor{after west arrow head}{%
+ \arrowboxpoints%
+ \ifdim\westextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfutil@tempdimb\outerxsep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\westextend\relax%
+ \advance\pgf@x\arrowheadindent\relax%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ }%
+ \pgf@x-\pgf@x%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@west\endcsname%
+ \fi%
+ }%
+ \anchor{after west arrow}{%
+ \arrowboxpoints%
+ \ifdim\westextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \arrowboxcorner%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ \advance\pgf@y\outerysep\relax%
+ \pgf@x-\pgf@x%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@west\endcsname%
+ \fi%
+ }%
+ %
+ \anchor{before north arrow}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \arrowboxcorner%
+ \pgf@x-\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ \advance\pgf@x-\outerxsep\relax%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@north\endcsname%
+ \fi%
+ }%
+ \anchor{before north arrow head}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
+ \advance\pgfutil@tempdima270pt\relax%
+ \pgfutil@tempdimb\outerysep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@y-\pgf@x%
+ \advance\pgf@y\northextend\relax%
+ \advance\pgf@y\arrowheadindent\relax%
+ \pgf@x-\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ }%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@north\endcsname%
+ \fi%
+ }%
+ \anchor{before north arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima\arrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima\beforearrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima-90pt\relax%
+ \pgfutil@tempdimb\outerxsep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@xa\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y-\pgf@xa%
+ \advance\pgf@y\northextend\relax%
+ }%
+ \pgf@x-\pgf@x%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@north\endcsname%
+ \fi%
+ }%
+ \anchor{north arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \centerpoint%
+ \advance\pgf@y\northextend\relax%
+ \pgf@ya\outerysep\relax%
+ \pgfmathcosec@{\arrowtipmiterangle}%
+ \advance\pgf@y\pgfmathresult\pgf@ya%
+ \else%
+ \csname pgf@anchor@arrow box@north\endcsname%
+ \fi%
+ }%
+ \anchor{after north arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima\arrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima\beforearrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima-90pt\relax%
+ \pgfutil@tempdimb\outerxsep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@xa\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y-\pgf@xa%
+ \advance\pgf@y\northextend\relax%
+ }%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@north\endcsname%
+ \fi%
+ }%
+ \anchor{after north arrow head}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
+ \advance\pgfutil@tempdima270pt\relax%
+ \pgfutil@tempdimb\outerysep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@y-\pgf@x%
+ \advance\pgf@y\northextend\relax%
+ \advance\pgf@y\arrowheadindent\relax%
+ \pgf@x-\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ }%
+ \pgf@x-\pgf@x%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@north\endcsname%
+ \fi%
+ }%
+ \anchor{after north arrow}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \arrowboxcorner%
+ \pgf@x\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ \advance\pgf@x\outerxsep\relax%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@north\endcsname%
+ \fi%
+ }%
+ %
+ \anchor{before south arrow}{%
+ \arrowboxpoints%
+ \ifdim\southextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \arrowboxcorner%
+ \pgf@x\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ \advance\pgf@x\outerxsep\relax%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@south\endcsname%
+ \fi%
+ }%
+ \anchor{before south arrow head}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
+ \advance\pgfutil@tempdima270pt\relax%
+ \pgfutil@tempdimb\outerysep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@y-\pgf@x%
+ \advance\pgf@y\northextend\relax%
+ \advance\pgf@y\arrowheadindent\relax%
+ \pgf@x-\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ }%
+ \pgf@x-\pgf@x%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@south\endcsname%
+ \fi%
+ }%
+ \anchor{before south arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima\arrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima\beforearrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima-90pt\relax%
+ \pgfutil@tempdimb\outerxsep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@xa\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y-\pgf@xa%
+ \advance\pgf@y\northextend\relax%
+ }%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@south\endcsname%
+ \fi%
+ }%
+ \anchor{south arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\southextend>0pt\relax%
+ \centerpoint%
+ \advance\pgf@y-\southextend\relax%
+ \pgf@ya\outerysep\relax%
+ \pgfmathcosec@{\arrowtipmiterangle}%
+ \advance\pgf@y-\pgfmathresult\pgf@ya%
+ \else%
+ \csname pgf@anchor@arrow box@east\endcsname%
+ \fi%
+ }%
+ \anchor{after south arrow tip}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima\arrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima\beforearrowtipmiterangle pt\relax%
+ \advance\pgfutil@tempdima-90pt\relax%
+ \pgfutil@tempdimb\outerxsep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowtipmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@xa\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y-\pgf@xa%
+ \advance\pgf@y\northextend\relax%
+ }%
+ \pgf@x-\pgf@x%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@south\endcsname%
+ \fi%
+ }%
+ \anchor{after south arrow head}{%
+ \arrowboxpoints%
+ \ifdim\northextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointadd{%
+ \arrowheadangles%
+ \pgfutil@tempdima-\beforearrowheadmiterangle pt\relax%
+ \advance\pgfutil@tempdima270pt\relax%
+ \pgfutil@tempdimb\outerysep\relax%
+ \pgfutil@tempdimb\cosecbeforearrowheadmiterangle\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \beforearrowtip%
+ \pgf@y-\pgf@x%
+ \advance\pgf@y\northextend\relax%
+ \advance\pgf@y\arrowheadindent\relax%
+ \pgf@x-\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ }%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@south\endcsname%
+ \fi%
+ }%
+ \anchor{after south arrow}{%
+ \arrowboxpoints%
+ \ifdim\southextend>0pt\relax%
+ \pgfpointadd{\centerpoint}{%
+ \arrowboxcorner%
+ \pgf@x-\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ \advance\pgf@x-\outerxsep\relax%
+ \pgf@y-\pgf@y%
+ }%
+ \else%
+ \csname pgf@anchor@arrow box@south\endcsname%
+ \fi%
+ }%
+ %
+ \backgroundpath{%
+ \arrowboxpoints%
+ \pgfextract@process\arrowboxcorner{%
+ \arrowboxcorner%
+ \pgfmathaddtolength\pgf@x{-\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathaddtolength\pgf@y{-\pgfkeysvalueof{/pgf/outer ysep}}%
+ }%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\arrowboxcorner}%
+ \ifdim\eastextend>0pt\relax%
+ \pgfpathlineto{%
+ \arrowboxcorner%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\eastextend\relax%
+ \advance\pgf@x\arrowheadindent\relax%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\eastextend\relax%
+ }%
+ \pgfpathlineto{%
+ \pgf@x\eastextend\relax%
+ \pgf@y0pt\relax%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\eastextend\relax%
+ \pgf@y-\pgf@y%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@x-\pgf@x%
+ \advance\pgf@x\eastextend\relax%
+ \advance\pgf@x\arrowheadindent\relax%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y-.5\pgf@y%
+ }%
+ \pgfpathlineto{%
+ \arrowboxcorner%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y-.5\pgf@y%
+ }%
+ \fi%
+ \pgfpathlineto{\arrowboxcorner\pgf@y-\pgf@y}%
+ \ifdim\southextend>0pt\relax%
+ \pgfpathlineto{%
+ \arrowboxcorner%
+ \pgf@x\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ \pgf@y-\pgf@y%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@y\pgf@x%
+ \advance\pgf@y-\southextend\relax%
+ \advance\pgf@y-\arrowheadindent\relax%
+ \pgf@x\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@xa\pgf@y%
+ \pgf@y\pgf@x%
+ \advance\pgf@y-\southextend\relax%
+ \pgf@x\pgf@xa%
+ }%
+ \pgfpathlineto{%
+ \pgf@x0pt\relax%
+ \pgf@y-\southextend\relax%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@xa\pgf@y%
+ \pgf@y\pgf@x%
+ \advance\pgf@y-\southextend\relax%
+ \pgf@x-\pgf@xa%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@y\pgf@x%
+ \advance\pgf@y-\southextend\relax%
+ \advance\pgf@y-\arrowheadindent\relax%
+ \pgf@x\shaftwidth\relax%
+ \pgf@x-.5\pgf@x%
+ }%
+ \pgfpathlineto{%
+ \arrowboxcorner%
+ \pgf@x\shaftwidth\relax%
+ \pgf@x-.5\pgf@x%
+ \pgf@y-\pgf@y%
+ }%
+ \fi%
+ \pgfpathlineto{\arrowboxcorner\pgf@x-\pgf@x\pgf@y-\pgf@y}%
+ \ifdim\westextend>0pt\relax%
+ \pgfpathlineto{%
+ \arrowboxcorner%
+ \pgf@x-\pgf@x
+ \pgf@y\shaftwidth\relax%
+ \pgf@y-.5\pgf@y%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \advance\pgf@x-\westextend\relax%
+ \advance\pgf@x-\arrowheadindent\relax%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y-.5\pgf@y%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \advance\pgf@x-\westextend\relax%
+ \pgf@y-\pgf@y%
+ }%
+ \pgfpathlineto{%
+ \pgf@x-\westextend\relax%
+ \pgf@y0pt\relax%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \advance\pgf@x-\westextend\relax%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \advance\pgf@x-\westextend\relax%
+ \advance\pgf@x-\arrowheadindent\relax%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ }%
+ \pgfpathlineto{%
+ \arrowboxcorner%
+ \pgf@x-\pgf@x%
+ \pgf@y\shaftwidth\relax%
+ \pgf@y.5\pgf@y%
+ }%
+ \fi%
+ \pgfpathlineto{\arrowboxcorner\pgf@x-\pgf@x}%
+ \ifdim\northextend>0pt\relax%
+ \pgfpathlineto{%
+ \arrowboxcorner%
+ \pgf@x\shaftwidth\relax%
+ \pgf@x-.5\pgf@x%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@y-\pgf@x%
+ \advance\pgf@y\northextend\relax%
+ \advance\pgf@y\arrowheadindent\relax%
+ \pgf@x\shaftwidth\relax%
+ \pgf@x-.5\pgf@x%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@xa\pgf@y%
+ \pgf@y-\pgf@x%
+ \advance\pgf@y\northextend\relax%
+ \pgf@x-\pgf@xa%
+ }%
+ \pgfpathlineto{%
+ \pgf@x0pt\relax%
+ \pgf@y\northextend\relax%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@xa\pgf@y%
+ \pgf@y-\pgf@x%
+ \advance\pgf@y\northextend\relax%
+ \pgf@x\pgf@xa%
+ }%
+ \pgfpathlineto{%
+ \beforearrowtip%
+ \pgf@y-\pgf@x%
+ \advance\pgf@y\northextend\relax%
+ \advance\pgf@y\arrowheadindent\relax%
+ \pgf@x\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ }%
+ \pgfpathlineto{%
+ \arrowboxcorner%
+ \pgf@x\shaftwidth\relax%
+ \pgf@x.5\pgf@x%
+ }%
+ \fi%
+ \pgfpathclose%
+ }%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \pgfutil@ifundefined{pgf@lib@shapes@arrowbox@referencepoint}%
+ {\let\referencepoint\centerpoint}{\let\referencepoint\pgf@lib@shapes@arrowbox@referencepoint}%
+ \pgfextract@process\externalpoint{%
+ \pgfpointadd{\referencepoint}{\externalpoint}%
+ }%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \let\externalangle\pgfmathresult%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@west\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@north\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@north east\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@before east arrow tip\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{east arrow tip}%
+ \def\secondpoint{before east arrow tip}%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@before east arrow\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{before east arrow head}%
+ \def\secondpoint{before east arrow}%
+ \else%
+ \def\firstpoint{before east arrow}%
+ \def\secondpoint{north east}%
+ \fi%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@after north arrow tip\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@after north arrow\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{north east}%
+ \def\secondpoint{after north arrow}%
+ \else%
+ \def\firstpoint{after north arrow}%
+ \def\secondpoint{after north arrow head}%
+ \fi%
+ \else%
+ \def\firstpoint{after north arrow tip}%
+ \def\secondpoint{north arrow tip}%
+ \fi%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@north west\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@before north arrow tip\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{north arrow tip}%
+ \def\secondpoint{before north arrow tip}%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@before north arrow\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{before north head}%
+ \def\secondpoint{before north arrow}%
+ \else%
+ \def\firstpoint{before north arrow}%
+ \def\secondpoint{north west}%
+ \fi%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@after west arrow tip\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@after west arrow\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{north west}%
+ \def\secondpoint{after west arrow}%
+ \else%
+ \def\firstpoint{after west arrow}%
+ \def\secondpoint{after west arrow head}%
+ \fi%
+ \else%
+ \def\firstpoint{after west arrow tip}%
+ \def\secondpoint{west arrow tip}%
+ \fi%
+ \fi%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@south arrow tip\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@south west\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@before west arrow tip\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{west arrow tip}%
+ \def\secondpoint{before west arrow tip}%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@before west arrow\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{before west arrow head}%
+ \def\secondpoint{before west arrow}%
+ \else%
+ \def\firstpoint{before west arrow}%
+ \def\secondpoint{south west}%
+ \fi%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@after south arrow tip\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@after south arrow\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{south west}%
+ \def\secondpoint{after south arrow}%
+ \else%
+ \def\firstpoint{after south arrow}%
+ \def\secondpoint{after south arrow head}%
+ \fi%
+ \else%
+ \def\firstpoint{after south arrow tip}%
+ \def\secondpoint{south arrow tip}%
+ \fi%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@south east\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@before south arrow tip\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{south arrow tip}%
+ \def\secondpoint{before south arrow tip}%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@before south arrow\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{before south arrow head}%
+ \def\secondpoint{before south arrow}%
+ \else%
+ \def\firstpoint{before south arrow}%
+ \def\secondpoint{south east}%
+ \fi%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@after east arrow tip\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}%
+ {\csname pgf@anchor@arrow box@after east arrow\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \def\firstpoint{south east}%
+ \def\secondpoint{after east arrow}%
+ \else%
+ \def\firstpoint{after east arrow}%
+ \def\secondpoint{after east arrow head}%
+ \fi%
+ \else%
+ \def\firstpoint{after east arrow tip}%
+ \def\secondpoint{east arrow tip}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \pgfpointintersectionoflines{\referencepoint}{\externalpoint}%
+ {\csname pgf@anchor@arrow box@\firstpoint\endcsname}%
+ {\csname pgf@anchor@arrow box@\secondpoint\endcsname}%
+ }%
+}%
+
+
-
-
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.callouts.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.callouts.code.tex
index cfa1d80d442..4cf4b1346b8 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.callouts.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.callouts.code.tex
@@ -7,83 +7,83 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\usepgflibrary{shapes.symbols}
+\usepgflibrary{shapes.symbols}%
% Keys for callouts
%
% Common to all callouts:
-% /pgf/callout absolute pointer
-% /pgf/callout relative pointer
+% /pgf/callout absolute pointer
+% /pgf/callout relative pointer
%
% ellipse callout only:
-% /pgf/callout pointer arc
+% /pgf/callout pointer arc
%
-% rectangle callout only:
-% /pgf/callout pointer width
+% rectangle callout only:
+% /pgf/callout pointer width
%
% cloud callout only:
-% /pgf/callout pointer start size
-% /pgf/callout pointer end size
-% /pgf/callout pointer segments
+% /pgf/callout pointer start size
+% /pgf/callout pointer end size
+% /pgf/callout pointer segments
%
\newif\ifpgf@lib@callout@absolutepointer
\pgfkeys{/pgf/.cd,
- callout pointer arc/.initial=15,
- callout pointer width/.initial=.25cm,
- callout pointer start size/.initial=.2 of callout,
- callout pointer end size/.initial=.1 of callout,
- callout pointer segments/.initial=2,
- callout absolute pointer/.code={\pgf@lib@callout@makeabsolutepointer{#1}},
- callout relative pointer/.code={\pgf@lib@callout@makerelativepointer{#1}},
- callout pointer shorten/.initial=0cm
-}
+ callout pointer arc/.initial=15,
+ callout pointer width/.initial=.25cm,
+ callout pointer start size/.initial=.2 of callout,
+ callout pointer end size/.initial=.1 of callout,
+ callout pointer segments/.initial=2,
+ callout absolute pointer/.code={\pgf@lib@callout@makeabsolutepointer{#1}},
+ callout relative pointer/.code={\pgf@lib@callout@makerelativepointer{#1}},
+ callout pointer shorten/.initial=0cm,
+}%
\def\pgf@lib@callout@makeabsolutepointer#1{%
- \pgf@lib@callout@absolutepointertrue%
- {%
- \pgftransformshift{#1}%
- \pgfmultipartnode{coordinate}{center}{pgf@lib@callout@pointer}{}%
- }%
-}
+ \pgf@lib@callout@absolutepointertrue%
+ {%
+ \pgftransformshift{#1}%
+ \pgfmultipartnode{coordinate}{center}{pgf@lib@callout@pointer}{}%
+ }%
+}%
\def\pgf@lib@callout@makerelativepointer#1{%
- \pgf@lib@callout@absolutepointerfalse%
- \def\pgf@lib@callout@relativepointer{#1}%
-}
-\pgfkeys{/pgf/callout relative pointer=\pgfpointpolar{300}{.5cm}}
+ \pgf@lib@callout@absolutepointerfalse%
+ \def\pgf@lib@callout@relativepointer{#1}%
+}%
+\pgfkeys{/pgf/callout relative pointer=\pgfpointpolar{300}{.5cm}}%
% Shape ellipse callout
%
%
\pgfdeclareshape{ellipse callout}{%
- \savedmacro\ellipsecalloutpoints{%
- %
- % Get the larger of the outer sep.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgf@x>\pgf@y%
- \edef\outersep{\the\pgf@x}%
- \else%
- \edef\outersep{\the\pgf@y}%
- \fi%
- \addtosavedmacro\outersep%
- %
- % Calculate the node dimensions...
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \savedmacro\ellipsecalloutpoints{%
+ %
+ % Get the larger of the outer sep.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@x>\pgf@y%
+ \edef\outersep{\the\pgf@x}%
+ \else%
+ \edef\outersep{\the\pgf@y}%
+ \fi%
+ \addtosavedmacro\outersep%
+ %
+ % Calculate the node dimensions...
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@x1.4142136\pgf@x%
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
\ifdim\pgf@x<.5\pgf@xa%
\pgf@x.5\pgf@xa%
\fi%
%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y.5\dp\pgfnodeparttextbox%
\pgf@y1.4142136\pgf@y%
\pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
@@ -105,177 +105,177 @@
%
\addtosavedmacro\xradius%
\addtosavedmacro\xpathradius%
- \addtosavedmacro\yradius%
+ \addtosavedmacro\yradius%
\addtosavedmacro\ypathradius%
- %
- \pgfmathsetmacro\pointerarc{\pgfkeysvalueof{/pgf/callout pointer arc}}%
- \addtosavedmacro\pointerarc%
- %
- \pgfextract@process\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- %
- % Get the realtive pointer.
- %
- \ifpgf@lib@callout@absolutepointer%
- \else%
- \pgfextract@process\calloutpointer{%
- \pgfextract@process\borderpoint{%
- \expandafter\pgfpointborderellipse\expandafter{\pgf@lib@callout@relativepointer}{\pgfqpoint{\xpathradius}{\ypathradius}}%
- }%
- \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
- \let\pointerangle\pgfmathresult%
- \expandafter\pgf@process\expandafter{\pgf@lib@callout@relativepointer}%
- \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
- \edef\pointerradius{\pgfmathresult pt}%
- \pgfpointadd{\borderpoint}{\pgfqpointpolar{\pointerangle}{\pointerradius}}%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- %
- \addtosavedmacro\calloutpointer%
- \pgf@lib@callouts@shortenpointer%
- \pgf@lib@ellipsecallout@getpoints%
- \addtosavedmacro\calloutpointeranchor%
- \addtosavedmacro\beforecalloutangle%
- \addtosavedmacro\aftercalloutangle%
- \fi%
+ %
+ \pgfmathsetmacro\pointerarc{\pgfkeysvalueof{/pgf/callout pointer arc}}%
+ \addtosavedmacro\pointerarc%
+ %
+ \pgfextract@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ %
+ % Get the relative pointer.
+ %
+ \ifpgf@lib@callout@absolutepointer%
+ \else%
+ \pgfextract@process\calloutpointer{%
+ \pgfextract@process\borderpoint{%
+ \expandafter\pgfpointborderellipse\expandafter{\pgf@lib@callout@relativepointer}{\pgfqpoint{\xpathradius}{\ypathradius}}%
+ }%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
+ \let\pointerangle\pgfmathresult%
+ \expandafter\pgf@process\expandafter{\pgf@lib@callout@relativepointer}%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \edef\pointerradius{\pgfmathresult pt}%
+ \pgfpointadd{\borderpoint}{\pgfqpointpolar{\pointerangle}{\pointerradius}}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ %
+ \addtosavedmacro\calloutpointer%
+ \pgf@lib@callouts@shortenpointer%
+ \pgf@lib@ellipsecallout@getpoints%
+ \addtosavedmacro\calloutpointeranchor%
+ \addtosavedmacro\beforecalloutangle%
+ \addtosavedmacro\aftercalloutangle%
+ \fi%
}%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\midpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+.5ex}%
- }
+ }%
\savedanchor\basepoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt\relax%
- }
+ }%
\anchor{center}{\centerpoint}%
\anchor{mid}{\midpoint}%
\anchor{mid east}{%
- \ellipsecalloutpoints%
- \pgfmathpointintersectionoflineandarc{\midpoint\advance\pgf@x\xradius}{\midpoint}%
- {\centerpoint}{270}{450}{\xradius and \yradius}%
+ \ellipsecalloutpoints%
+ \pgfmathpointintersectionoflineandarc{\midpoint\advance\pgf@x\xradius}{\midpoint}%
+ {\centerpoint}{270}{450}{\xradius and \yradius}%
}%
\anchor{mid west}{%
- \ellipsecalloutpoints%
- \pgfmathpointintersectionoflineandarc{\midpoint\advance\pgf@x-\xradius}{\midpoint}%
- {\centerpoint}{90}{270}{\xradius and \yradius}%
+ \ellipsecalloutpoints%
+ \pgfmathpointintersectionoflineandarc{\midpoint\advance\pgf@x-\xradius}{\midpoint}%
+ {\centerpoint}{90}{270}{\xradius and \yradius}%
}%
\anchor{base}{\basepoint}%
\anchor{base east}{%
- \ellipsecalloutpoints%
- \pgfmathpointintersectionoflineandarc{\basepoint\advance\pgf@x\xradius}{\basepoint}%
- {\centerpoint}{270}{450}{\xradius and \yradius}%
+ \ellipsecalloutpoints%
+ \pgfmathpointintersectionoflineandarc{\basepoint\advance\pgf@x\xradius}{\basepoint}%
+ {\centerpoint}{270}{450}{\xradius and \yradius}%
}%
\anchor{base west}{%
- \ellipsecalloutpoints%
- \pgfmathpointintersectionoflineandarc{\basepoint\advance\pgf@x-\xradius}{\basepoint}%
- {\centerpoint}{90}{270}{\xradius and \yradius}%
+ \ellipsecalloutpoints%
+ \pgfmathpointintersectionoflineandarc{\basepoint\advance\pgf@x-\xradius}{\basepoint}%
+ {\centerpoint}{90}{270}{\xradius and \yradius}%
}%
\anchor{north}{%
- \ellipsecalloutpoints%
- \centerpoint%
- \advance\pgf@y\yradius\relax%
- }
+ \ellipsecalloutpoints%
+ \centerpoint%
+ \advance\pgf@y\yradius\relax%
+ }%
\anchor{south}{%
- \ellipsecalloutpoints%
- \centerpoint%
- \advance\pgf@y-\yradius\relax%
- }
+ \ellipsecalloutpoints%
+ \centerpoint%
+ \advance\pgf@y-\yradius\relax%
+ }%
\anchor{east}{%
- \ellipsecalloutpoints%
- \centerpoint%
- \advance\pgf@x\xradius\relax%
- }
+ \ellipsecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x\xradius\relax%
+ }%
\anchor{west}{%
- \ellipsecalloutpoints%
- \centerpoint%
- \advance\pgf@x-\xradius\relax%
- }
+ \ellipsecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x-\xradius\relax%
+ }%
\anchor{north west}{%
- \ellipsecalloutpoints%
- \pgf@xa\xradius\relax%
- \pgf@ya\yradius\relax%
- \centerpoint%
- \advance\pgf@y0.7071067\pgf@ya%
- \advance\pgf@x-0.7071067\pgf@xa%
- }
+ \ellipsecalloutpoints%
+ \pgf@xa\xradius\relax%
+ \pgf@ya\yradius\relax%
+ \centerpoint%
+ \advance\pgf@y0.7071067\pgf@ya%
+ \advance\pgf@x-0.7071067\pgf@xa%
+ }%
\anchor{north east}{%
- \ellipsecalloutpoints%
- \pgf@xa\xradius\relax%
- \pgf@ya\yradius\relax%
- \centerpoint%
- \advance\pgf@y0.7071067\pgf@ya%
- \advance\pgf@x0.7071067\pgf@xa%
- }
+ \ellipsecalloutpoints%
+ \pgf@xa\xradius\relax%
+ \pgf@ya\yradius\relax%
+ \centerpoint%
+ \advance\pgf@y0.7071067\pgf@ya%
+ \advance\pgf@x0.7071067\pgf@xa%
+ }%
\anchor{south west}{%
- \ellipsecalloutpoints%
- \pgf@xa\xradius\relax%
- \pgf@ya\yradius\relax%
- \centerpoint%
- \advance\pgf@y-0.7071067\pgf@ya%
- \advance\pgf@x-0.7071067\pgf@xa%
- }
+ \ellipsecalloutpoints%
+ \pgf@xa\xradius\relax%
+ \pgf@ya\yradius\relax%
+ \centerpoint%
+ \advance\pgf@y-0.7071067\pgf@ya%
+ \advance\pgf@x-0.7071067\pgf@xa%
+ }%
\anchor{south east}{%
- \ellipsecalloutpoints%
- \pgf@xa\xradius\relax%
- \pgf@ya\yradius\relax%
- \centerpoint%
- \advance\pgf@y-0.7071067\pgf@ya%
- \advance\pgf@x0.7071067\pgf@xa%
- }
+ \ellipsecalloutpoints%
+ \pgf@xa\xradius\relax%
+ \pgf@ya\yradius\relax%
+ \centerpoint%
+ \advance\pgf@y-0.7071067\pgf@ya%
+ \advance\pgf@x0.7071067\pgf@xa%
+ }%
\anchor{pointer}{%
- \ellipsecalloutpoints%
- \calloutpointeranchor%
- }%
+ \ellipsecalloutpoints%
+ \calloutpointeranchor%
+ }%
\backgroundpath{%
- \ellipsecalloutpoints%
- \ifpgf@lib@callout@absolutepointer%
- \pgfextract@process\calloutpointer{%
- \pgfpointanchor{pgf@lib@callout@pointer}{center}%
- }%
- \pgf@lib@callouts@shortenpointer%
- \pgf@lib@ellipsecallout@getpoints%
- \calloutpointeranchor%
- \ifx\pgf@node@name\pgfutil@empty%
- \else%
- \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@node@name\noexpand\endcsname}%
- \edef\pgf@sh@@@temp{%
- \noexpand\def\noexpand\calloutpointeranchor{%
- \noexpand\pgf@x\the\pgf@x%
- \noexpand\pgf@y\the\pgf@y%
- }%
- }%
- \expandafter\pgf@sh@@temp\expandafter{\pgf@sh@@@temp}
- \fi%
- \fi%
- \pgfpathmoveto{\calloutpointer}%
- \pgfpathlineto{\aftercalloutpointer}%
- \ifdim\aftercalloutangle pt<\beforecalloutangle pt\relax%
- \pgfpatharc{\aftercalloutangle}{\beforecalloutangle}{\xpathradius and \ypathradius}%
- \else%
- \pgfpatharc{\aftercalloutangle}{360}{\xpathradius and \ypathradius}%
- \pgfpatharc{0}{\beforecalloutangle}{\xpathradius and \ypathradius}%
- \fi%
- \pgfpathclose%
- }%
+ \ellipsecalloutpoints%
+ \ifpgf@lib@callout@absolutepointer%
+ \pgfextract@process\calloutpointer{%
+ \pgfpointanchor{pgf@lib@callout@pointer}{center}%
+ }%
+ \pgf@lib@callouts@shortenpointer%
+ \pgf@lib@ellipsecallout@getpoints%
+ \calloutpointeranchor%
+ \ifx\pgf@node@name\pgfutil@empty%
+ \else%
+ \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@node@name\noexpand\endcsname}%
+ \edef\pgf@sh@@@temp{%
+ \noexpand\def\noexpand\calloutpointeranchor{%
+ \noexpand\pgf@x\the\pgf@x%
+ \noexpand\pgf@y\the\pgf@y%
+ }%
+ }%
+ \expandafter\pgf@sh@@temp\expandafter{\pgf@sh@@@temp}
+ \fi%
+ \fi%
+ \pgfpathmoveto{\calloutpointer}%
+ \pgfpathlineto{\aftercalloutpointer}%
+ \ifdim\aftercalloutangle pt<\beforecalloutangle pt\relax%
+ \pgfpatharc{\aftercalloutangle}{\beforecalloutangle}{\xpathradius and \ypathradius}%
+ \else%
+ \pgfpatharc{\aftercalloutangle}{360}{\xpathradius and \ypathradius}%
+ \pgfpatharc{0}{\beforecalloutangle}{\xpathradius and \ypathradius}%
+ \fi%
+ \pgfpathclose%
+ }%
\anchorborder{%
- \pgfextract@process\externalpoint{}%
- \ellipsecalloutpoints%
- \pgfpointadd{\pgfpointborderellipse{\externalpoint}{\pgfpoint{\xradius}{\yradius}}%
- }{\centerpoint}%
+ \pgfextract@process\externalpoint{}%
+ \ellipsecalloutpoints%
+ \pgfpointadd{\pgfpointborderellipse{\externalpoint}{\pgfpoint{\xradius}{\yradius}}%
+ }{\centerpoint}%
}%
-}
+}%
% Internal macro for calculating the points for the
% ellipse callout pointer.
@@ -289,334 +289,334 @@
% \ypathradius - the y radius of the ellipse.
%
\def\pgf@lib@ellipsecallout@getpoints{%
- \pgfextract@process\borderpoint{%
- \pgfpointborderellipse{%
- \centerpoint%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \calloutpointer%
- \advance\pgf@x-\pgf@xa%
- \advance\pgf@y-\pgf@ya%
- }{\pgfqpoint{\xpathradius}{\ypathradius}}%
- }%
- \pgfmathangleonellipse{\borderpoint}{\xpathradius and \ypathradius}%
- \pgfutil@tempdima\pointerarc pt\relax%
- \pgfutil@tempdimb\pgfmathresult pt\relax%
- \advance\pgfutil@tempdimb-.5\pgfutil@tempdima%
- \ifdim\pgfutil@tempdimb<0pt\relax%
- \advance\pgfutil@tempdimb360pt\relax%
- \fi%
- \edef\beforecalloutangle{\pgfmath@tonumber{\pgfutil@tempdimb}}%
- \advance\pgfutil@tempdimb\pgfutil@tempdima%
- \ifdim\pgfutil@tempdimb<360pt\relax%
- \else%
- \advance\pgfutil@tempdimb-360pt\relax%
- \fi%
- \edef\aftercalloutangle{\pgfmath@tonumber{\pgfutil@tempdimb}}%
- %
- \pgfextract@process\beforecalloutpointer{%
- \pgfpointadd{\centerpoint}{%
- \pgfpointpolar{\beforecalloutangle}{\xpathradius and \ypathradius}%
- }%
- }%
- \pgfextract@process\aftercalloutpointer{%
- \pgfpointadd{\centerpoint}{%
- \pgfpointpolar{\aftercalloutangle}{\xpathradius and \ypathradius}%
- }%
- }%
- %
- % Calculate the pointer anchor.
- %
- \pgf@lib@callouts@pointeranchor%
-}
+ \pgfextract@process\borderpoint{%
+ \pgfpointborderellipse{%
+ \centerpoint%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \calloutpointer%
+ \advance\pgf@x-\pgf@xa%
+ \advance\pgf@y-\pgf@ya%
+ }{\pgfqpoint{\xpathradius}{\ypathradius}}%
+ }%
+ \pgfmathangleonellipse{\borderpoint}{\xpathradius and \ypathradius}%
+ \pgfutil@tempdima\pointerarc pt\relax%
+ \pgfutil@tempdimb\pgfmathresult pt\relax%
+ \advance\pgfutil@tempdimb-.5\pgfutil@tempdima%
+ \ifdim\pgfutil@tempdimb<0pt\relax%
+ \advance\pgfutil@tempdimb360pt\relax%
+ \fi%
+ \edef\beforecalloutangle{\pgfmath@tonumber{\pgfutil@tempdimb}}%
+ \advance\pgfutil@tempdimb\pgfutil@tempdima%
+ \ifdim\pgfutil@tempdimb<360pt\relax%
+ \else%
+ \advance\pgfutil@tempdimb-360pt\relax%
+ \fi%
+ \edef\aftercalloutangle{\pgfmath@tonumber{\pgfutil@tempdimb}}%
+ %
+ \pgfextract@process\beforecalloutpointer{%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointpolar{\beforecalloutangle}{\xpathradius and \ypathradius}%
+ }%
+ }%
+ \pgfextract@process\aftercalloutpointer{%
+ \pgfpointadd{\centerpoint}{%
+ \pgfpointpolar{\aftercalloutangle}{\xpathradius and \ypathradius}%
+ }%
+ }%
+ %
+ % Calculate the pointer anchor.
+ %
+ \pgf@lib@callouts@pointeranchor%
+}%
-% If the callout pointer is very pointed and stroked, the anchor will be
+% If the callout pointer is very pointed and stroked, the anchor will be
% miles away from the end of the pointer which will (typically) be
-% bevelled.
+% bevelled.
% Using outer sep=0pt is one solution, however, another is provided
% using this special key:
%
% /pgf/callout pointer anchor aspect
-%
+%
% which takes a value from 0 (ignore any outer sep) to 1 (use
% the full outer sep).
-\pgfkeys{/pgf/callout pointer anchor aspect/.initial=1}
+\pgfkeys{/pgf/callout pointer anchor aspect/.initial=1}%
% Internal macro for calculating the anchor for the callout pointer.
%
% Requires the following to be set up (points are anti-clockwise)
%
-% \beforecalloutpointer - point on the border before the callout pointer
-% \calloutpointer
+% \beforecalloutpointer - point on the border before the callout pointer
+% \calloutpointer
% \aftercalloutpointer - point on the border after the callout pointer
% \outersep - the largest of the outer xsep or ysep.
%
\def\pgf@lib@callouts@pointeranchor{%
- \pgfutil@tempdimb\outersep\relax%
- %
- \pgfmathanglebetweenlines{\calloutpointer}{\aftercalloutpointer}{\calloutpointer}{\beforecalloutpointer}%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \pgfmathcosec@{\pgfmathresult}%
- \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
- \pgfmathanglebetweenpoints{\calloutpointer}{\aftercalloutpointer}%
- \advance\pgfutil@tempdima\pgfmathresult pt\relax%
- \advance\pgfutil@tempdima180pt\relax%
- %
- \pgfextract@process\calloutpointeranchor{%
- \pgfpointadd{%
- \pgfmathparse{\pgfkeysvalueof{/pgf/callout pointer anchor aspect}}%
- \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- }{%
- \calloutpointer%
- }%
- }%
+ \pgfutil@tempdimb\outersep\relax%
+ %
+ \pgfmathanglebetweenlines{\calloutpointer}{\aftercalloutpointer}{\calloutpointer}{\beforecalloutpointer}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \pgfmathcosec@{\pgfmathresult}%
+ \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
+ \pgfmathanglebetweenpoints{\calloutpointer}{\aftercalloutpointer}%
+ \advance\pgfutil@tempdima\pgfmathresult pt\relax%
+ \advance\pgfutil@tempdima180pt\relax%
+ %
+ \pgfextract@process\calloutpointeranchor{%
+ \pgfpointadd{%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/callout pointer anchor aspect}}%
+ \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ }{%
+ \calloutpointer%
+ }%
+ }%
}%
\def\pgf@lib@callouts@shortenpointer{%
- \pgfextract@process\calloutpointer{%
- \pgfmathanglebetweenpoints{\calloutpointer}{\centerpoint}%
- \let\angle\pgfmathresult%
- \pgfmathsin@{\angle}%
- \let\sinpointerangle\pgfmathresult%
- \pgfmathcos@{\angle}%
- \let\cospointerangle\pgfmathresult%
- \pgfpointadd{\calloutpointer}{%
- \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/callout pointer shorten}}%
- \pgf@x\cospointerangle\pgfutil@tempdima%
- \pgf@y\sinpointerangle\pgfutil@tempdima%
- }%
- }%
+ \pgfextract@process\calloutpointer{%
+ \pgfmathanglebetweenpoints{\calloutpointer}{\centerpoint}%
+ \let\angle\pgfmathresult%
+ \pgfmathsin@{\angle}%
+ \let\sinpointerangle\pgfmathresult%
+ \pgfmathcos@{\angle}%
+ \let\cospointerangle\pgfmathresult%
+ \pgfpointadd{\calloutpointer}{%
+ \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/callout pointer shorten}}%
+ \pgf@x\cospointerangle\pgfutil@tempdima%
+ \pgf@y\sinpointerangle\pgfutil@tempdima%
+ }%
+ }%
}%
-
+
\pgfdeclareshape{rectangle callout}{%
- \savedmacro\rectanglecalloutpoints{%
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
- \ifdim\pgf@x<.5\pgf@xa%
- \pgf@x.5\pgf@xa%
- \fi%
- \edef\xtemp{\the\pgf@x}%
- \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- %
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@y<.5\pgf@ya%
- \pgf@y.5\pgf@ya%
- \fi%
- \edef\ytemp{\the\pgf@y}%
- \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- %
- \edef\xlength{\the\pgf@x}%
- \edef\ylength{\the\pgf@y}%
- \addtosavedmacro\xlength%
- \addtosavedmacro\ylength%
- %
- \pgfmathsetlengthmacro\pointerwidth{\pgfkeysvalueof{/pgf/callout pointer width}}%
- \addtosavedmacro\pointerwidth%
- %
- \pgfextract@process\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- %
- % Process the relative callout pointer.
- %
- \ifpgf@lib@callout@absolutepointer%
- \else%
- \pgfextract@process\calloutpointer{%
- \pgfextract@process\borderpoint{%
- \expandafter\pgfpointborderrectangle\expandafter{\pgf@lib@callout@relativepointer}%
- {\pgfqpoint{\xtemp}{\ytemp}}%
- }%
- \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
- \let\pointerangle\pgfmathresult%
- \expandafter\pgf@process\expandafter{\pgf@lib@callout@relativepointer}%
- \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
- \edef\pointerradius{\pgfmathresult pt}%
- \pgfpointadd{\borderpoint}{\pgfqpointpolar{\pointerangle}{\pointerradius}}%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \pgf@lib@callouts@shortenpointer%
- \addtosavedmacro\calloutpointer%
- \pgf@lib@rectanglecallout@pointer%
- \addtosavedmacro\calloutpointeranchor%
- \addtosavedmacro\beforecalloutpointer%
- \addtosavedmacro\aftercalloutpointer%
- \addtosavedmacro\firstpoint%
- \addtosavedmacro\secondpoint%
- \addtosavedmacro\thirdpoint%
- \addtosavedmacro\fourthpoint%
- \fi%
- }
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt\relax%
- }
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5em}%
- }
- \anchor{center}{\centerpoint}
- \anchor{mid}{\midpoint}
- \anchor{mid east}{%
- \rectanglecalloutpoints%
- \midpoint%
- \advance\pgf@x\xlength\relax%
- }
- \anchor{mid west}{%
- \rectanglecalloutpoints%
- \midpoint%
- \advance\pgf@x-\xlength\relax%
- }
- \anchor{base}{\basepoint}
- \anchor{base east}{%
- \rectanglecalloutpoints%
- \basepoint%
- \advance\pgf@x\xlength\relax%
- }
- \anchor{base west}{%
- \rectanglecalloutpoints%
- \basepoint%
- \advance\pgf@x-\xlength\relax%
- }
- \anchor{north}{%
- \rectanglecalloutpoints%
- \centerpoint%
- \advance\pgf@y\ylength\relax%
- }%
- \anchor{south}{%
- \rectanglecalloutpoints%
- \centerpoint%
- \advance\pgf@y-\ylength\relax%
- }%
- \anchor{east}{%
- \rectanglecalloutpoints%
- \centerpoint%
- \advance\pgf@x\xlength\relax%
- }%
- \anchor{west}{%
- \rectanglecalloutpoints%
- \centerpoint%
- \advance\pgf@x-\xlength\relax%
- }%
- \anchor{north east}{%
- \rectanglecalloutpoints%
- \centerpoint%
- \advance\pgf@x\xlength\relax%
- \advance\pgf@y\ylength\relax%
- }%
- \anchor{south west}{%
- \rectanglecalloutpoints%
- \centerpoint%
- \advance\pgf@x-\xlength\relax%
- \advance\pgf@y-\ylength\relax%
- }%
- \anchor{south east}{%
- \rectanglecalloutpoints%
- \centerpoint%
- \advance\pgf@x\xlength\relax%
- \advance\pgf@y-\ylength\relax%
- }%
- \anchor{north west}{%
- \rectanglecalloutpoints%
- \centerpoint%
- \advance\pgf@x-\xlength\relax%
- \advance\pgf@y\ylength\relax%
- }%
- \anchor{pointer}{%
- \rectanglecalloutpoints%
- \calloutpointeranchor%
- }%
- \backgroundpath{%
- \rectanglecalloutpoints%
- \pgf@x\xlength\relax%
- \pgf@y\ylength\relax%
- \pgfmathaddtolength\pgf@x{-\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathaddtolength\pgf@y{-\pgfkeysvalueof{/pgf/outer ysep}}%
- \edef\xtemp{\the\pgf@x}%
- \edef\ytemp{\the\pgf@y}%
- %
- % The absolute pointer must be calculated here because the
- % anchor of the shape (which is calculated after the saved
- % macros and points) affects how the pointer joins the
- % main rectangle.
- %
- \ifpgf@lib@callout@absolutepointer%
- \pgfextract@process\calloutpointer{%
- \pgfpointanchor{pgf@lib@callout@pointer}{center}%
- }%
- \pgf@lib@callouts@shortenpointer%
- \pgfmathsetlengthmacro\pointerwidth{\pgfkeysvalueof{/pgf/callout pointer width}}%
- \pgf@lib@rectanglecallout@pointer%
- %
- % \pgf@node@name = the shape name (from \pgfmultipartnode)
- %
- \ifx\pgf@node@name\pgfutil@empty%
- \else%
- %
- % Now hack an extra saved anchor \calloutpointeranchor,
- % with the new anchor for the callout pointer.
- %
- \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@node@name\noexpand\endcsname}%
- \edef\pgf@sh@@@temp{%
- \noexpand\def\noexpand\calloutpointeranchor{%
- \noexpand\pgf@x\the\pgf@x%
- \noexpand\pgf@y\the\pgf@y%
- }%
- }%
- \expandafter\pgf@sh@@temp\expandafter{\pgf@sh@@@temp}%
- \fi%
- \fi%
- {%
- \pgfsetcornersarced{\pgfqpoint{0pt}{0pt}}%
- \pgfpathmoveto{\beforecalloutpointer}%
- }%
- \pgfpathlineto{\calloutpointer}%
- {%
- \pgfsetcornersarced{\pgfqpoint{0pt}{0pt}}%
- \pgfpathlineto{\aftercalloutpointer}%
- }%
- {%
- \pgftransformshift{\centerpoint}%
- \pgfpathlineto{\firstpoint}%
- \pgfpathlineto{\secondpoint}%
- \pgfpathlineto{\thirdpoint}%
- \pgfpathlineto{\fourthpoint}%
- {%
- \pgfsetcornersarced{\pgfqpoint{0pt}{0pt}}%
- \pgfpathclose%
- }%
- }
- }
- \anchorborder{%
- \pgfextract@process\externalpoint{}%
- \rectanglecalloutpoints%
- \pgfpointadd{\centerpoint}%
- {%
- \pgfpointborderrectangle{\pgfpointadd{\centerpoint}{\externalpoint}}%
- {\pgfqpoint{\xlength}{\ylength}}%
- }%
- }%
-}
+ \savedmacro\rectanglecalloutpoints{%
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgf@x<.5\pgf@xa%
+ \pgf@x.5\pgf@xa%
+ \fi%
+ \edef\xtemp{\the\pgf@x}%
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ %
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@y<.5\pgf@ya%
+ \pgf@y.5\pgf@ya%
+ \fi%
+ \edef\ytemp{\the\pgf@y}%
+ \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ %
+ \edef\xlength{\the\pgf@x}%
+ \edef\ylength{\the\pgf@y}%
+ \addtosavedmacro\xlength%
+ \addtosavedmacro\ylength%
+ %
+ \pgfmathsetlengthmacro\pointerwidth{\pgfkeysvalueof{/pgf/callout pointer width}}%
+ \addtosavedmacro\pointerwidth%
+ %
+ \pgfextract@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ %
+ % Process the relative callout pointer.
+ %
+ \ifpgf@lib@callout@absolutepointer%
+ \else%
+ \pgfextract@process\calloutpointer{%
+ \pgfextract@process\borderpoint{%
+ \expandafter\pgfpointborderrectangle\expandafter{\pgf@lib@callout@relativepointer}%
+ {\pgfqpoint{\xtemp}{\ytemp}}%
+ }%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
+ \let\pointerangle\pgfmathresult%
+ \expandafter\pgf@process\expandafter{\pgf@lib@callout@relativepointer}%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \edef\pointerradius{\pgfmathresult pt}%
+ \pgfpointadd{\borderpoint}{\pgfqpointpolar{\pointerangle}{\pointerradius}}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgf@lib@callouts@shortenpointer%
+ \addtosavedmacro\calloutpointer%
+ \pgf@lib@rectanglecallout@pointer%
+ \addtosavedmacro\calloutpointeranchor%
+ \addtosavedmacro\beforecalloutpointer%
+ \addtosavedmacro\aftercalloutpointer%
+ \addtosavedmacro\firstpoint%
+ \addtosavedmacro\secondpoint%
+ \addtosavedmacro\thirdpoint%
+ \addtosavedmacro\fourthpoint%
+ \fi%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5em}%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \rectanglecalloutpoints%
+ \midpoint%
+ \advance\pgf@x\xlength\relax%
+ }%
+ \anchor{mid west}{%
+ \rectanglecalloutpoints%
+ \midpoint%
+ \advance\pgf@x-\xlength\relax%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \rectanglecalloutpoints%
+ \basepoint%
+ \advance\pgf@x\xlength\relax%
+ }%
+ \anchor{base west}{%
+ \rectanglecalloutpoints%
+ \basepoint%
+ \advance\pgf@x-\xlength\relax%
+ }%
+ \anchor{north}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@y\ylength\relax%
+ }%
+ \anchor{south}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@y-\ylength\relax%
+ }%
+ \anchor{east}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x\xlength\relax%
+ }%
+ \anchor{west}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x-\xlength\relax%
+ }%
+ \anchor{north east}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x\xlength\relax%
+ \advance\pgf@y\ylength\relax%
+ }%
+ \anchor{south west}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x-\xlength\relax%
+ \advance\pgf@y-\ylength\relax%
+ }%
+ \anchor{south east}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x\xlength\relax%
+ \advance\pgf@y-\ylength\relax%
+ }%
+ \anchor{north west}{%
+ \rectanglecalloutpoints%
+ \centerpoint%
+ \advance\pgf@x-\xlength\relax%
+ \advance\pgf@y\ylength\relax%
+ }%
+ \anchor{pointer}{%
+ \rectanglecalloutpoints%
+ \calloutpointeranchor%
+ }%
+ \backgroundpath{%
+ \rectanglecalloutpoints%
+ \pgf@x\xlength\relax%
+ \pgf@y\ylength\relax%
+ \pgfmathaddtolength\pgf@x{-\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathaddtolength\pgf@y{-\pgfkeysvalueof{/pgf/outer ysep}}%
+ \edef\xtemp{\the\pgf@x}%
+ \edef\ytemp{\the\pgf@y}%
+ %
+ % The absolute pointer must be calculated here because the
+ % anchor of the shape (which is calculated after the saved
+ % macros and points) affects how the pointer joins the
+ % main rectangle.
+ %
+ \ifpgf@lib@callout@absolutepointer%
+ \pgfextract@process\calloutpointer{%
+ \pgfpointanchor{pgf@lib@callout@pointer}{center}%
+ }%
+ \pgf@lib@callouts@shortenpointer%
+ \pgfmathsetlengthmacro\pointerwidth{\pgfkeysvalueof{/pgf/callout pointer width}}%
+ \pgf@lib@rectanglecallout@pointer%
+ %
+ % \pgf@node@name = the shape name (from \pgfmultipartnode)
+ %
+ \ifx\pgf@node@name\pgfutil@empty%
+ \else%
+ %
+ % Now hack an extra saved anchor \calloutpointeranchor,
+ % with the new anchor for the callout pointer.
+ %
+ \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@node@name\noexpand\endcsname}%
+ \edef\pgf@sh@@@temp{%
+ \noexpand\def\noexpand\calloutpointeranchor{%
+ \noexpand\pgf@x\the\pgf@x%
+ \noexpand\pgf@y\the\pgf@y%
+ }%
+ }%
+ \expandafter\pgf@sh@@temp\expandafter{\pgf@sh@@@temp}%
+ \fi%
+ \fi%
+ {%
+ \pgfsetcornersarced{\pgfqpoint{0pt}{0pt}}%
+ \pgfpathmoveto{\beforecalloutpointer}%
+ }%
+ \pgfpathlineto{\calloutpointer}%
+ {%
+ \pgfsetcornersarced{\pgfqpoint{0pt}{0pt}}%
+ \pgfpathlineto{\aftercalloutpointer}%
+ }%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathlineto{\firstpoint}%
+ \pgfpathlineto{\secondpoint}%
+ \pgfpathlineto{\thirdpoint}%
+ \pgfpathlineto{\fourthpoint}%
+ {%
+ \pgfsetcornersarced{\pgfqpoint{0pt}{0pt}}%
+ \pgfpathclose%
+ }%
+ }
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \rectanglecalloutpoints%
+ \pgfpointadd{\centerpoint}%
+ {%
+ \pgfpointborderrectangle{\pgfpointadd{\centerpoint}{\externalpoint}}%
+ {\pgfqpoint{\xlength}{\ylength}}%
+ }%
+ }%
+}%
@@ -632,145 +632,145 @@
% \pointerwidth - the width of the pointer.
%
\def\pgf@lib@rectanglecallout@pointer{%
- %
- % Ensure that the pointer never connects to the main shape
- % too near to a corner. This is done for two reasons:
- % 1. It can look ugly.
- % 2. If the corners are rounded, a mess can result.
- %
- \pgfextract@process\borderpoint{%
- \pgfpointborderrectangle{%
- \centerpoint%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \calloutpointer%
- \advance\pgf@x-\pgf@xa%
- \advance\pgf@y-\pgf@ya%
- }{\pgfqpoint{\xtemp}{\ytemp}}%
- }%
- \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
- \let\borderangle\pgfmathresult%
- %
- \pgfutil@tempdima\pointerwidth\relax%
- \pgf@xa\xtemp\relax%
- \advance\pgf@xa-\pgfutil@tempdima%
- \pgf@ya\ytemp\relax%
- \advance\pgf@ya-\pgfutil@tempdima%
- %
- \pgf@process{%
- \pgfutil@ifundefined{pgf@corner@arc}{\pgfpointorigin}{%
- \expandafter\pgfqpoint\pgf@corner@arc}%
- }%
- \advance\pgf@xa-\pgf@x%
- \advance\pgf@ya-\pgf@y%
- %
- \borderpoint%
- \pgf@xb\pgf@x%
- \pgf@yb\pgf@y%
- %
- \pgf@xc0pt\relax%
- \pgf@yc0pt\relax%
- %
- \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{\xtemp}{\ytemp}}%
- \ifdim\borderangle pt<\pgfmathresult pt\relax%
- \pgf@yc.5\pgfutil@tempdima%
- \ifdim\pgf@yb>\pgf@ya%
- \pgf@yb\pgf@ya%
- \fi%
- %
- % Establish the order for drawing the rectangle corners.
- %
- \edef\firstpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
- \edef\secondpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
- \edef\thirdpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
- \edef\fourthpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
- \else%
- \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{-\xtemp}{\ytemp}}%
- \ifdim\borderangle pt<\pgfmathresult pt\relax%
- \pgf@xc-.5\pgfutil@tempdima%
- \ifdim\pgf@xb>\pgf@xa%
- \pgf@xb\pgf@xa%
- \else%
- \ifdim\pgf@xb<-\pgf@xa%
- \pgf@xb-\pgf@xa%
- \fi%
- \fi%
- \edef\firstpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
- \edef\secondpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
- \edef\thirdpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
- \edef\fourthpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
- \else%
- \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{-\xtemp}{-\ytemp}}%
- \ifdim\borderangle pt<\pgfmathresult pt\relax%
- \pgf@yc-.5\pgfutil@tempdima%
- \ifdim\pgf@yb>\pgf@ya%
- \pgf@yb\pgf@ya%
- \else%
- \ifdim\pgf@yb<-\pgf@ya%
- \pgf@yb-\pgf@ya%
- \fi%
- \fi%
- \edef\firstpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
- \edef\secondpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
- \edef\thirdpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
- \edef\fourthpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
- \else%
- \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{\xtemp}{-\ytemp}}%
- \ifdim\borderangle pt<\pgfmathresult pt\relax%
- \pgf@xc.5\pgfutil@tempdima%
- \ifdim\pgf@xb>\pgf@xa%
- \pgf@xb\pgf@xa%
- \else%
- \ifdim\pgf@xb<-\pgf@xa%
- \pgf@xb-\pgf@xa%
- \fi%
- \fi%
- \edef\firstpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
- \edef\secondpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
- \edef\thirdpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
- \edef\fourthpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
- \else%
- \pgf@yc.5\pgfutil@tempdima%
- \ifdim\pgf@yb<-\pgf@ya%
- \pgf@yb-\pgf@ya%
- \fi%
- \edef\firstpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
- \edef\secondpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
- \edef\thirdpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
- \edef\fourthpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
- \fi%
- \fi%
- \fi%
- \fi%
- \pgfextract@process\beforecalloutpointer{%
- \centerpoint%
- \advance\pgf@x\pgf@xb%
- \advance\pgf@y\pgf@yb%
- \advance\pgf@x-\pgf@xc%
- \advance\pgf@y-\pgf@yc%
- }%
- \pgfextract@process\aftercalloutpointer{%
- \centerpoint%
- \advance\pgf@x\pgf@xb%
- \advance\pgf@y\pgf@yb%
- \advance\pgf@x\pgf@xc%
- \advance\pgf@y\pgf@yc%
- }%
- %
- % Now calculate the pointer anchor.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgf@x>\pgf@y%
- \edef\outersep{\the\pgf@x}%
- \else%
- \edef\outersep{\the\pgf@y}%
- \fi%
- \pgf@lib@callouts@pointeranchor%
-}
+ %
+ % Ensure that the pointer never connects to the main shape
+ % too near to a corner. This is done for two reasons:
+ % 1. It can look ugly.
+ % 2. If the corners are rounded, a mess can result.
+ %
+ \pgfextract@process\borderpoint{%
+ \pgfpointborderrectangle{%
+ \centerpoint%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \calloutpointer%
+ \advance\pgf@x-\pgf@xa%
+ \advance\pgf@y-\pgf@ya%
+ }{\pgfqpoint{\xtemp}{\ytemp}}%
+ }%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
+ \let\borderangle\pgfmathresult%
+ %
+ \pgfutil@tempdima\pointerwidth\relax%
+ \pgf@xa\xtemp\relax%
+ \advance\pgf@xa-\pgfutil@tempdima%
+ \pgf@ya\ytemp\relax%
+ \advance\pgf@ya-\pgfutil@tempdima%
+ %
+ \pgf@process{%
+ \pgfutil@ifundefined{pgf@corner@arc}{\pgfpointorigin}{%
+ \expandafter\pgfqpoint\pgf@corner@arc}%
+ }%
+ \advance\pgf@xa-\pgf@x%
+ \advance\pgf@ya-\pgf@y%
+ %
+ \borderpoint%
+ \pgf@xb\pgf@x%
+ \pgf@yb\pgf@y%
+ %
+ \pgf@xc0pt\relax%
+ \pgf@yc0pt\relax%
+ %
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{\xtemp}{\ytemp}}%
+ \ifdim\borderangle pt<\pgfmathresult pt\relax%
+ \pgf@yc.5\pgfutil@tempdima%
+ \ifdim\pgf@yb>\pgf@ya%
+ \pgf@yb\pgf@ya%
+ \fi%
+ %
+ % Establish the order for drawing the rectangle corners.
+ %
+ \edef\firstpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
+ \edef\secondpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
+ \edef\thirdpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \edef\fourthpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
+ \else%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{-\xtemp}{\ytemp}}%
+ \ifdim\borderangle pt<\pgfmathresult pt\relax%
+ \pgf@xc-.5\pgfutil@tempdima%
+ \ifdim\pgf@xb>\pgf@xa%
+ \pgf@xb\pgf@xa%
+ \else%
+ \ifdim\pgf@xb<-\pgf@xa%
+ \pgf@xb-\pgf@xa%
+ \fi%
+ \fi%
+ \edef\firstpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
+ \edef\secondpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \edef\thirdpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
+ \edef\fourthpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
+ \else%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \ifdim\borderangle pt<\pgfmathresult pt\relax%
+ \pgf@yc-.5\pgfutil@tempdima%
+ \ifdim\pgf@yb>\pgf@ya%
+ \pgf@yb\pgf@ya%
+ \else%
+ \ifdim\pgf@yb<-\pgf@ya%
+ \pgf@yb-\pgf@ya%
+ \fi%
+ \fi%
+ \edef\firstpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \edef\secondpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
+ \edef\thirdpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
+ \edef\fourthpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
+ \else%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\pgfqpoint{\xtemp}{-\ytemp}}%
+ \ifdim\borderangle pt<\pgfmathresult pt\relax%
+ \pgf@xc.5\pgfutil@tempdima%
+ \ifdim\pgf@xb>\pgf@xa%
+ \pgf@xb\pgf@xa%
+ \else%
+ \ifdim\pgf@xb<-\pgf@xa%
+ \pgf@xb-\pgf@xa%
+ \fi%
+ \fi%
+ \edef\firstpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
+ \edef\secondpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
+ \edef\thirdpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
+ \edef\fourthpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \else%
+ \pgf@yc.5\pgfutil@tempdima%
+ \ifdim\pgf@yb<-\pgf@ya%
+ \pgf@yb-\pgf@ya%
+ \fi%
+ \edef\firstpoint{\noexpand\pgfqpoint{\xtemp}{\ytemp}}%
+ \edef\secondpoint{\noexpand\pgfqpoint{-\xtemp}{\ytemp}}%
+ \edef\thirdpoint{\noexpand\pgfqpoint{-\xtemp}{-\ytemp}}%
+ \edef\fourthpoint{\noexpand\pgfqpoint{\xtemp}{-\ytemp}}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \pgfextract@process\beforecalloutpointer{%
+ \centerpoint%
+ \advance\pgf@x\pgf@xb%
+ \advance\pgf@y\pgf@yb%
+ \advance\pgf@x-\pgf@xc%
+ \advance\pgf@y-\pgf@yc%
+ }%
+ \pgfextract@process\aftercalloutpointer{%
+ \centerpoint%
+ \advance\pgf@x\pgf@xb%
+ \advance\pgf@y\pgf@yb%
+ \advance\pgf@x\pgf@xc%
+ \advance\pgf@y\pgf@yc%
+ }%
+ %
+ % Now calculate the pointer anchor.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@x>\pgf@y%
+ \edef\outersep{\the\pgf@x}%
+ \else%
+ \edef\outersep{\the\pgf@y}%
+ \fi%
+ \pgf@lib@callouts@pointeranchor%
+}%
-% Internal macro for parsing the size of
+% Internal macro for parsing the size of
% the cloud callout pointer.
%
% \pgf@x and \pgf@y should be set up as the
@@ -779,173 +779,173 @@
% \pgf@xa and \pgf@ya are returned appropriately.
%
\def\pgf@lib@callout@setpointersize#1{%
- \edef\pgf@lib@callout@temp{#1}%
- \edef\pgf@marshall{\noexpand\pgfutil@in@{of callout}{\pgf@lib@callout@temp}}%
- \pgf@marshall%
- \ifpgfutil@in@%
- \expandafter\pgf@xa\expandafter\pgf@lib@callout@setpointerrelativesize%
- \pgf@lib@callout@temp\pgf@lib@stop\pgf@x%
- \expandafter\pgf@ya\expandafter\pgf@lib@callout@setpointerrelativesize%
- \pgf@lib@callout@temp\pgf@lib@stop\pgf@y%
- \else%
- \edef\pgf@marshall{\noexpand\pgfutil@in@{and}{\pgf@lib@callout@temp}}%
- \pgf@marshall%
- \ifpgfutil@in@%
- \expandafter\pgf@lib@callout@setpointerbothsizes\pgf@lib@callout@temp\pgf@lib@stop%
- \else%
- \pgfmathsetlength\pgf@xa{#1}%
- \pgfmathsetlength\pgf@ya{#1}%
- \fi%
- \fi%
-}
+ \edef\pgf@lib@callout@temp{#1}%
+ \edef\pgf@marshall{\noexpand\pgfutil@in@{of callout}{\pgf@lib@callout@temp}}%
+ \pgf@marshall%
+ \ifpgfutil@in@%
+ \expandafter\pgf@xa\expandafter\pgf@lib@callout@setpointerrelativesize%
+ \pgf@lib@callout@temp\pgf@lib@stop\pgf@x%
+ \expandafter\pgf@ya\expandafter\pgf@lib@callout@setpointerrelativesize%
+ \pgf@lib@callout@temp\pgf@lib@stop\pgf@y%
+ \else%
+ \edef\pgf@marshall{\noexpand\pgfutil@in@{and}{\pgf@lib@callout@temp}}%
+ \pgf@marshall%
+ \ifpgfutil@in@%
+ \expandafter\pgf@lib@callout@setpointerbothsizes\pgf@lib@callout@temp\pgf@lib@stop%
+ \else%
+ \pgfmathsetlength\pgf@xa{#1}%
+ \pgfmathsetlength\pgf@ya{#1}%
+ \fi%
+ \fi%
+}%
\def\pgf@lib@callout@setpointerrelativesize#1of callout#2\pgf@lib@stop{#1}%
\def\pgf@lib@callout@setpointerbothsizes#1and#2\pgf@lib@stop{%
- \pgfmathsetlength\pgf@xa{#2}%
- \pgfmathsetlength\pgf@ya{#2}%
-}
+ \pgfmathsetlength\pgf@xa{#2}%
+ \pgfmathsetlength\pgf@ya{#2}%
+}%
% Shape: cloud callout.
%
\pgfdeclareshape{cloud callout}{%
- \savedanchor\calloutpointer{%
- \pgfutil@ifundefined{pgf@sh@s@cloud}{%
- \pgferror{I cannot find the cloud shape. Please load the `symbol shapes' library}}{}%
- \pgf@sh@s@cloud%
- \pgf@sh@savedmacros%
- %
- \pgfextract@process\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \ifpgf@lib@callout@absolutepointer%
- \else%
- \pgfextract@process\calloutpointer{%
- \pgfextract@process\borderpoint{%
- \expandafter\pgfpointborderellipse\expandafter{\pgf@lib@callout@relativepointer}%
- {\pgfqpoint{\xouterradius}{\youterradius}}%
- }%
- \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
- \let\pointerangle\pgfmathresult%
- \expandafter\pgf@process\expandafter{\pgf@lib@callout@relativepointer}%
- \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
- \edef\pointerradius{\pgfmathresult pt}%
- \pgfpointadd{\borderpoint}{\pgfqpointpolar{\pointerangle}{\pointerradius}}%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \pgf@lib@callouts@shortenpointer%
- \fi%
- }
- \anchor{pointer}{%
- \calloutpointer%
- }%
- \inheritsavedanchors[from=cloud]
- \inheritanchor[from=cloud]{center}
- \inheritanchor[from=cloud]{base}
- \inheritanchor[from=cloud]{mid}
- \inheritanchor[from=cloud]{north}
- \inheritanchor[from=cloud]{south}
- \inheritanchor[from=cloud]{east}
- \inheritanchor[from=cloud]{west}
- \inheritanchor[from=cloud]{north east}
- \inheritanchor[from=cloud]{south west}
- \inheritanchor[from=cloud]{south east}
- \inheritanchor[from=cloud]{north west}
- \inheritanchorborder[from=cloud]
- \backgroundpath{%
- \pgf@sh@bg@cloud%
- \ifpgf@lib@callout@absolutepointer%
- \pgfextract@process\calloutpointer{%
- \pgfpointanchor{pgf@lib@callout@pointer}{center}%
- }%
- \ifx\pgf@node@name\pgfutil@empty%
- \else%
- \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@node@name\noexpand\endcsname}%
- \edef\pgf@sh@@@temp{%
- \noexpand\def\noexpand\calloutpointeranchor{%
- \noexpand\pgf@x\the\pgf@x%
- \noexpand\pgf@y\the\pgf@y%
- }%
- }%
- \expandafter\pgf@sh@@temp\expandafter{\pgf@sh@@@temp}
- \fi%
- \fi%
- %
- \pgfextract@process\borderpoint{%
- \pgfpointadd{%
- \pgfpointborderellipse{\pgfpointdiff{\centerpoint}{\calloutpointer}}%
- {\pgfqpoint{\xouterradius}{\youterradius}}%
- }{\centerpoint}%
- }%
- \pgf@lib@callouts@shortenpointer%
- \pgfmathanglebetweenpoints{\calloutpointer}{\centerpoint}%
- \let\angle\pgfmathresult%
- \pgfmathsin@{\angle}%
- \let\sinpointerangle\pgfmathresult%
- \pgfmathcos@{\angle}%
- \let\cospointerangle\pgfmathresult%
- %
- \pgf@x\xouterradius\relax%
- \pgf@x2.0\pgf@x%
- \pgf@y\yinnerradius\relax%
- \pgf@y2.0\pgf@y%
- \pgf@lib@callout@setpointersize{\pgfkeysvalueof{/pgf/callout pointer start size}}%
- \pgf@xb\pgf@xa%
- \pgf@yb\pgf@ya%
- \pgf@lib@callout@setpointersize{\pgfkeysvalueof{/pgf/callout pointer end size}}%
- \advance\pgf@xb-\pgf@xa%
- \advance\pgf@yb-\pgf@ya%
- %
- \pgfmathsetcount\c@pgf@counta{\pgfkeysvalueof{/pgf/callout pointer segments}}%
- \divide\pgf@xb\c@pgf@counta%
- \divide\pgf@yb\c@pgf@counta%
- %
- \pgf@process{\pgfpointdiff{\borderpoint}{\calloutpointer}}%
- \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \divide\pgfutil@tempdima\c@pgf@counta%
- %
- \pgfutil@tempdimb0pt\relax%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\c@pgf@counta%
- \else%
- {%
- \pgf@xa.5\pgf@xa%
- \pgf@ya.5\pgf@ya%
- \edef\tempxradius{\the\pgf@xa}%
- \edef\tempyradius{\the\pgf@ya}%
- \pgfpathellipse%
- {%
- \calloutpointer%
- \advance\pgf@x\cospointerangle\pgfutil@tempdimb%
- \advance\pgf@y\sinpointerangle\pgfutil@tempdimb%
- }%
- {\pgfqpoint{\tempxradius}{0pt}}{\pgfqpoint{0pt}{\tempyradius}}%
- }%
- \advance\pgf@xa\pgf@xb%
- \advance\pgf@ya\pgf@yb%
- \advance\pgfutil@tempdimb\pgfutil@tempdima%
- \repeatpgfmathloop%
- }%
- %
- % Hack the puff anchors for the callout.
- %
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@cloud callout\endcsname{%
- \c@pgf@counta\puffs\relax%
- \pgfmathloop%
- \ifnum\c@pgf@counta>0\relax%
- \pgfutil@ifundefined{pgf@anchor@cloud callout@puff\space\the\c@pgf@counta}{%
- \expandafter\xdef\csname pgf@anchor@cloud callout@puff\space\the\c@pgf@counta\endcsname{%
- \noexpand\pgf@sh@@cloudpuffanchor{\the\c@pgf@counta}%
- }%
- }{\c@pgf@counta0\relax}%
- \advance\c@pgf@counta-1\relax%
- \repeatpgfmathloop%
- }%
-}
+ \savedanchor\calloutpointer{%
+ \pgfutil@ifundefined{pgf@sh@s@cloud}{%
+ \pgferror{I cannot find the cloud shape. Please load the `symbol shapes' library}}{}%
+ \pgf@sh@s@cloud%
+ \pgf@sh@savedmacros%
+ %
+ \pgfextract@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \ifpgf@lib@callout@absolutepointer%
+ \else%
+ \pgfextract@process\calloutpointer{%
+ \pgfextract@process\borderpoint{%
+ \expandafter\pgfpointborderellipse\expandafter{\pgf@lib@callout@relativepointer}%
+ {\pgfqpoint{\xouterradius}{\youterradius}}%
+ }%
+ \pgfmathanglebetweenpoints{\pgfpointorigin}{\borderpoint}%
+ \let\pointerangle\pgfmathresult%
+ \expandafter\pgf@process\expandafter{\pgf@lib@callout@relativepointer}%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \edef\pointerradius{\pgfmathresult pt}%
+ \pgfpointadd{\borderpoint}{\pgfqpointpolar{\pointerangle}{\pointerradius}}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgf@lib@callouts@shortenpointer%
+ \fi%
+ }%
+ \anchor{pointer}{%
+ \calloutpointer%
+ }%
+ \inheritsavedanchors[from=cloud]%
+ \inheritanchor[from=cloud]{center}%
+ \inheritanchor[from=cloud]{base}%
+ \inheritanchor[from=cloud]{mid}%
+ \inheritanchor[from=cloud]{north}%
+ \inheritanchor[from=cloud]{south}%
+ \inheritanchor[from=cloud]{east}%
+ \inheritanchor[from=cloud]{west}%
+ \inheritanchor[from=cloud]{north east}%
+ \inheritanchor[from=cloud]{south west}%
+ \inheritanchor[from=cloud]{south east}%
+ \inheritanchor[from=cloud]{north west}%
+ \inheritanchorborder[from=cloud]%
+ \backgroundpath{%
+ \pgf@sh@bg@cloud%
+ \ifpgf@lib@callout@absolutepointer%
+ \pgfextract@process\calloutpointer{%
+ \pgfpointanchor{pgf@lib@callout@pointer}{center}%
+ }%
+ \ifx\pgf@node@name\pgfutil@empty%
+ \else%
+ \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@node@name\noexpand\endcsname}%
+ \edef\pgf@sh@@@temp{%
+ \noexpand\def\noexpand\calloutpointeranchor{%
+ \noexpand\pgf@x\the\pgf@x%
+ \noexpand\pgf@y\the\pgf@y%
+ }%
+ }%
+ \expandafter\pgf@sh@@temp\expandafter{\pgf@sh@@@temp}
+ \fi%
+ \fi%
+ %
+ \pgfextract@process\borderpoint{%
+ \pgfpointadd{%
+ \pgfpointborderellipse{\pgfpointdiff{\centerpoint}{\calloutpointer}}%
+ {\pgfqpoint{\xouterradius}{\youterradius}}%
+ }{\centerpoint}%
+ }%
+ \pgf@lib@callouts@shortenpointer%
+ \pgfmathanglebetweenpoints{\calloutpointer}{\centerpoint}%
+ \let\angle\pgfmathresult%
+ \pgfmathsin@{\angle}%
+ \let\sinpointerangle\pgfmathresult%
+ \pgfmathcos@{\angle}%
+ \let\cospointerangle\pgfmathresult%
+ %
+ \pgf@x\xouterradius\relax%
+ \pgf@x2.0\pgf@x%
+ \pgf@y\yinnerradius\relax%
+ \pgf@y2.0\pgf@y%
+ \pgf@lib@callout@setpointersize{\pgfkeysvalueof{/pgf/callout pointer start size}}%
+ \pgf@xb\pgf@xa%
+ \pgf@yb\pgf@ya%
+ \pgf@lib@callout@setpointersize{\pgfkeysvalueof{/pgf/callout pointer end size}}%
+ \advance\pgf@xb-\pgf@xa%
+ \advance\pgf@yb-\pgf@ya%
+ %
+ \pgfmathsetcount\c@pgf@counta{\pgfkeysvalueof{/pgf/callout pointer segments}}%
+ \divide\pgf@xb\c@pgf@counta%
+ \divide\pgf@yb\c@pgf@counta%
+ %
+ \pgf@process{\pgfpointdiff{\borderpoint}{\calloutpointer}}%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \divide\pgfutil@tempdima\c@pgf@counta%
+ %
+ \pgfutil@tempdimb0pt\relax%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\c@pgf@counta%
+ \else%
+ {%
+ \pgf@xa.5\pgf@xa%
+ \pgf@ya.5\pgf@ya%
+ \edef\tempxradius{\the\pgf@xa}%
+ \edef\tempyradius{\the\pgf@ya}%
+ \pgfpathellipse%
+ {%
+ \calloutpointer%
+ \advance\pgf@x\cospointerangle\pgfutil@tempdimb%
+ \advance\pgf@y\sinpointerangle\pgfutil@tempdimb%
+ }%
+ {\pgfqpoint{\tempxradius}{0pt}}{\pgfqpoint{0pt}{\tempyradius}}%
+ }%
+ \advance\pgf@xa\pgf@xb%
+ \advance\pgf@ya\pgf@yb%
+ \advance\pgfutil@tempdimb\pgfutil@tempdima%
+ \repeatpgfmathloop%
+ }%
+ %
+ % Hack the puff anchors for the callout.
+ %
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@cloud callout\endcsname{%
+ \c@pgf@counta\puffs\relax%
+ \pgfmathloop%
+ \ifnum\c@pgf@counta>0\relax%
+ \pgfutil@ifundefined{pgf@anchor@cloud callout@puff\space\the\c@pgf@counta}{%
+ \expandafter\xdef\csname pgf@anchor@cloud callout@puff\space\the\c@pgf@counta\endcsname{%
+ \noexpand\pgf@sh@@cloudpuffanchor{\the\c@pgf@counta}%
+ }%
+ }{\c@pgf@counta0\relax}%
+ \advance\c@pgf@counta-1\relax%
+ \repeatpgfmathloop%
+ }%
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.code.tex
index fc0b1d20aa5..ee41b301abc 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.code.tex
@@ -7,14 +7,14 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/shapes/pgflibraryshapes.code.tex,v 1.1 2008/06/26 16:55:55 tantau Exp $
+\ProvidesFileRCS{pgflibraryshapes.code.tex}
% Only the following are loaded by default and only for historical
-% reasons.
+% reasons.
-\usepgflibrary{shapes.geometric}
-\usepgflibrary{shapes.misc}
-\usepgflibrary{shapes.symbols}
+\usepgflibrary{shapes.geometric}%
+\usepgflibrary{shapes.misc}%
+\usepgflibrary{shapes.symbols}%
% Further libraries should be included directly
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.geometric.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.geometric.code.tex
index ae7ec0f3c4e..08ef867ff0e 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.geometric.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.geometric.code.tex
@@ -7,87 +7,87 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/shapes/pgflibraryshapes.geometric.code.tex,v 1.1 2008/06/26 16:55:55 tantau Exp $
+\ProvidesFileRCS{pgflibraryshapes.geometric.code.tex}
\pgfdeclareshape{ellipse}
%
% Draws a circle around the text
%
-{
+{%
\savedanchor\centerpoint{%
\pgf@x=.5\wd\pgfnodeparttextbox%
\pgf@y=.5\ht\pgfnodeparttextbox%
\advance\pgf@y by-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\radius{%
- %
- % Caculate ``height radius''
- %
+ %
+ % Calculate ``height radius''
+ %
\pgf@y=.5\ht\pgfnodeparttextbox%
\advance\pgf@y by.5\dp\pgfnodeparttextbox%
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/inner ysep}}%
\advance\pgf@y by\pgf@yb%
- %
- % Caculate ``width radius''
- %
+ %
+ % Calculate ``width radius''
+ %
\pgf@x=.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/inner xsep}}%
\advance\pgf@x by\pgf@xb%
- %
+ %
% Adjust
- %
+ %
\pgf@x=1.4142136\pgf@x%
\pgf@y=1.4142136\pgf@y%
- %
- % Adjust hieght, if necessary
- %
+ %
+ % Adjust height, if necessary
+ %
\pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/minimum height}}%
\ifdim\pgf@y<.5\pgf@yc%
\pgf@y=.5\pgf@yc%
\fi%
- %
+ %
% Adjust width, if necessary
- %
+ %
\pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/minimum width}}%
\ifdim\pgf@x<.5\pgf@xc%
\pgf@x=.5\pgf@xc%
\fi%
- %
+ %
% Add outer sep
- %
- \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
+ %
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\advance\pgf@x by\pgf@xb%
\advance\pgf@y by\pgf@yb%
- }
+ }%
%
% Anchors
- %
- \anchor{center}{\centerpoint}
- \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}
- \anchor{base}{\centerpoint\pgf@y=0pt}
+ %
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}%
+ \anchor{base}{\centerpoint\pgf@y=0pt}%
\anchor{north}
{
\pgf@process{\radius}
\pgf@ya=\pgf@y%
\pgf@process{\centerpoint}
\advance\pgf@y by\pgf@ya
- }
+ }%
\anchor{south}
{
\pgf@process{\radius}
\pgf@ya=\pgf@y%
\pgf@process{\centerpoint}
\advance\pgf@y by-\pgf@ya
- }
+ }%
\anchor{west}
{
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@process{\centerpoint}
\advance\pgf@x by-\pgf@xa
- }
+ }%
\anchor{mid west}
{%
\pgf@process{\radius}
@@ -95,7 +95,7 @@
\pgf@process{\centerpoint}
\advance\pgf@x by-\pgf@xa%
\pgfmathsetlength\pgf@y{.5ex}
- }
+ }%
\anchor{base west}
{%
\pgf@process{\radius}
@@ -103,7 +103,7 @@
\pgf@process{\centerpoint}
\advance\pgf@x by-\pgf@xa%
\pgf@y=0pt
- }
+ }%
\anchor{north west}
{
\pgf@process{\radius}
@@ -112,7 +112,7 @@
\pgf@process{\centerpoint}
\advance\pgf@x by-0.707107\pgf@xa
\advance\pgf@y by0.707107\pgf@ya
- }
+ }%
\anchor{south west}
{
\pgf@process{\radius}
@@ -121,14 +121,14 @@
\pgf@process{\centerpoint}
\advance\pgf@x by-0.707107\pgf@xa
\advance\pgf@y by-0.707107\pgf@ya
- }
+ }%
\anchor{east}
{%
\pgf@process{\radius}
\pgf@xa=\pgf@x%
\pgf@process{\centerpoint}
\advance\pgf@x by\pgf@xa
- }
+ }%
\anchor{mid east}
{%
\pgf@process{\radius}
@@ -136,7 +136,7 @@
\pgf@process{\centerpoint}
\advance\pgf@x by\pgf@xa%
\pgfmathsetlength\pgf@y{.5ex}
- }
+ }%
\anchor{base east}
{%
\pgf@process{\radius}
@@ -144,7 +144,7 @@
\pgf@process{\centerpoint}
\advance\pgf@x by\pgf@xa%
\pgf@y=0pt
- }
+ }%
\anchor{north east}
{
\pgf@process{\radius}
@@ -153,7 +153,7 @@
\pgf@process{\centerpoint}
\advance\pgf@x by0.707107\pgf@xa
\advance\pgf@y by0.707107\pgf@ya
- }
+ }%
\anchor{south east}
{
\pgf@process{\radius}
@@ -162,7 +162,7 @@
\pgf@process{\centerpoint}
\advance\pgf@x by0.707107\pgf@xa
\advance\pgf@y by-0.707107\pgf@ya
- }
+ }%
\anchorborder{
\edef\pgf@marshal{%
\noexpand\pgfpointborderellipse
@@ -175,7 +175,7 @@
\centerpoint%
\advance\pgf@x by\pgf@xa%
\advance\pgf@y by\pgf@ya%
- }
+ }%
%
% Background path
@@ -185,13 +185,13 @@
\pgf@process{\radius}%
\pgfutil@tempdima=\pgf@x%
\pgfutil@tempdimb=\pgf@y%
- \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\advance\pgfutil@tempdima by-\pgf@xb%
\advance\pgfutil@tempdimb by-\pgf@yb%
\pgfpathellipse{\centerpoint}{\pgfqpoint{\pgfutil@tempdima}{0pt}}{\pgfqpoint{0pt}{\pgfutil@tempdimb}}%
- }
-}
+ }%
+}%
@@ -209,14 +209,14 @@
% /pgf/aspect : recommended width/height quotient.
%
\pgfkeys{/pgf/.cd,
- aspect/.code={\pgfsetshapeaspect{#1}},% this for tikz...
- shape aspect/.initial=1,% but this is consistent with other pgfset stuff.
- shape aspect/.code={%
- \pgfkeys{/pgf/aspect=#1}%
- \pgfkeyssetvalue{/pgf/shape aspect}{#1}
- }%
-}
-
+ aspect/.code={\pgfsetshapeaspect{#1}},% this for tikz...
+ shape aspect/.initial=1,% but this is consistent with other pgfset stuff.
+ shape aspect/.code={%
+ \pgfkeys{/pgf/aspect=#1}%
+ \pgfkeyssetvalue{/pgf/shape aspect}{#1}
+ }%
+}%
+
\def\pgfsetshapeaspect#1{%
\def\pgfshapeaspect{#1}%
@@ -226,13 +226,13 @@
\c@pgf@counta=\pgfutil@tempdima\relax% 8192*determinant
\pgfutil@tempdima=8192pt%
\divide\pgfutil@tempdima by\c@pgf@counta%
- \edef\pgfshapeaspectinverse{\pgf@sys@tonumber{\pgfutil@tempdima}}
-}
+ \edef\pgfshapeaspectinverse{\pgf@sys@tonumber{\pgfutil@tempdima}}%
+}%
-\pgfsetshapeaspect{1}
+\pgfsetshapeaspect{1}%
\pgfdeclareshape{diamond}
-{
+{%
\savedanchor\outernortheast{%
%
% Calculate width and height of the inner rectangle
@@ -255,13 +255,13 @@
% Check against minimum height/width
%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum width}}%
- \pgf@xb=.5\pgf@xb%
+ \pgf@xb=.5\pgf@xb%
\ifdim\pgf@x<\pgf@xb%
% yes, too small. Enlarge...
\pgf@x=\pgf@xb%
\fi%
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}%
- \pgf@yb=.5\pgf@yb%
+ \pgf@yb=.5\pgf@yb%
\ifdim\pgf@y<\pgf@yb%
% yes, too small. Enlarge...
\pgf@y=\pgf@yb%
@@ -273,12 +273,12 @@
\advance\pgf@x by\pgf@xa%
\pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
\advance\pgf@y by\pgf@ya%
- }
+ }%
\savedanchor\text{%
\pgf@x=-.5\wd\pgfnodeparttextbox%
\pgf@y=-.5\ht\pgfnodeparttextbox%
\advance\pgf@y by.5\dp\pgfnodeparttextbox%
- }
+ }%
%
% Anchors
@@ -288,18 +288,18 @@
\anchor{mid}{%
\pgf@process{\text}%
\pgf@x=0pt%
- \pgfmathsetlength\pgf@ya{.5ex}
+ \pgfmathsetlength\pgf@ya{.5ex}%
\advance\pgf@y by\pgf@ya%
- }
- \anchor{base}{\pgf@process{\text}\pgf@x=0pt }
- \anchor{north}{\pgf@process{\outernortheast}\pgf@x=0pt}
- \anchor{south}{\pgf@process{\outernortheast}\pgf@x=0pt\pgf@y=-\pgf@y}
- \anchor{west}{\pgf@process{\outernortheast}\pgf@x=-\pgf@x\pgf@y=0pt}
- \anchor{north west}{\pgf@process{\outernortheast}\pgf@x=-.5\pgf@x\pgf@y=.5\pgf@y}
- \anchor{south west}{\pgf@process{\outernortheast}\pgf@x=-.5\pgf@x\pgf@y=-.5\pgf@y}
- \anchor{east}{\pgf@process{\outernortheast}\pgf@y=0pt}
- \anchor{north east}{\pgf@process{\outernortheast}\pgf@x=.5\pgf@x\pgf@y=.5\pgf@y}
- \anchor{south east}{\pgf@process{\outernortheast}\pgf@x=.5\pgf@x\pgf@y=-.5\pgf@y}
+ }%
+ \anchor{base}{\pgf@process{\text}\pgf@x=0pt}%
+ \anchor{north}{\pgf@process{\outernortheast}\pgf@x=0pt}%
+ \anchor{south}{\pgf@process{\outernortheast}\pgf@x=0pt\pgf@y=-\pgf@y}%
+ \anchor{west}{\pgf@process{\outernortheast}\pgf@x=-\pgf@x\pgf@y=0pt}%
+ \anchor{north west}{\pgf@process{\outernortheast}\pgf@x=-.5\pgf@x\pgf@y=.5\pgf@y}%
+ \anchor{south west}{\pgf@process{\outernortheast}\pgf@x=-.5\pgf@x\pgf@y=-.5\pgf@y}%
+ \anchor{east}{\pgf@process{\outernortheast}\pgf@y=0pt}%
+ \anchor{north east}{\pgf@process{\outernortheast}\pgf@x=.5\pgf@x\pgf@y=.5\pgf@y}%
+ \anchor{south east}{\pgf@process{\outernortheast}\pgf@x=.5\pgf@x\pgf@y=-.5\pgf@y}%
\anchorborder{%
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
@@ -320,7 +320,7 @@
{\noexpand\pgfqpoint{0pt}{\the\pgf@y}}%
}%
\pgf@process{\pgf@marshal}%
- }
+ }%
%
% Background path
@@ -338,8 +338,8 @@
\pgfpathlineto{\pgfqpoint{-\pgf@xc}{0pt}}%
\pgfpathlineto{\pgfqpoint{0pt}{-\pgf@yc}}%
\pgfpathclose%
- }
-}
+ }%
+}%
@@ -356,571 +356,569 @@
% /pgf/star point ratio : The ratio of the outer point and inner point radii.
\pgfkeys{/pgf/.cd,
- star points/.initial=5,
- star point height/.initial=.5cm,
- star point height/.code={%
- \def\pgf@lib@temp{#1}%
- \pgfkeyslet{/pgf/star point height}{\pgf@lib@temp}%
- \pgf@lib@shapes@starouterradiususesratiofalse%
- },
- star point ratio/.initial=1.5,
- star point ratio/.code={%
- \def\pgf@lib@temp{#1}%
- \pgfkeyslet{/pgf/star point ratio}{\pgf@lib@temp}%
- \pgf@lib@shapes@starouterradiususesratiotrue%
- },%
- star rotate/.style={/pgf/shape border rotate=#1}% For compatability with 1.18
-}
+ star points/.initial=5,
+ star point height/.initial=.5cm,
+ star point height/.code={%
+ \def\pgf@lib@temp{#1}%
+ \pgfkeyslet{/pgf/star point height}{\pgf@lib@temp}%
+ \pgf@lib@shapes@starouterradiususesratiofalse%
+ },
+ star point ratio/.initial=1.5,
+ star point ratio/.code={%
+ \def\pgf@lib@temp{#1}%
+ \pgfkeyslet{/pgf/star point ratio}{\pgf@lib@temp}%
+ \pgf@lib@shapes@starouterradiususesratiotrue%
+ },%
+ star rotate/.style={/pgf/shape border rotate=#1},% For compatibility with 1.18
+}%
% Shape star.
%
-\pgfdeclareshape{star}{
- \savedmacro\totalstarpoints{%
- \pgfmathsetcounter{pgf@counta}{\pgfkeysvalueof{/pgf/star points}}%
- \multiply\c@pgf@counta2\relax%
- \edef\totalstarpoints{\the\c@pgf@counta}%
- }
- \savedmacro\anglestep{%
- \pgfmathdivide{180}{\pgfkeysvalueof{/pgf/star points}}%
- \let\anglestep\pgfmathresult%
- }
- \savedmacro\calculateradii{%
- %
- % Get the node dimensions.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- \ifdim\pgf@y>\pgf@x%
- \pgf@x\pgf@y%
- \fi%
- %
- % Calculate the incircle radius.
- %
- \pgf@x1.41421\pgf@x%
- \edef\innerradius{\the\pgf@x}%
- %
- % Calculate the circumcircle radius.
- %
- % Use the star point height or the star point ratio?
- %
- \ifpgf@lib@shapes@starouterradiususesratio%
- \pgfmathparse{\pgfkeysvalueof{/pgf/star point ratio}}%
- \expandafter\pgf@x\pgfmathresult\pgf@x%
- \else%
- \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/star point height}}%
- \fi%
- \pgf@xc\pgf@x%
- %
- % Accommodate the larger of the minimum height/width.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@ya>\pgf@xa%
- \pgf@xa\pgf@ya%
- \fi%
- \ifdim\pgf@x<.5\pgf@xa%
- \pgf@x.5\pgf@xa%
- \fi%
- \edef\outerradius{\the\pgf@x}%
- %
- % If the outer radius has been enlarged, adjust the inner radius...
- %
- \ifdim\pgf@x>\pgf@xc%
- %
- % ...using the star point ratio, or...
- %
- \ifpgf@lib@shapes@starouterradiususesratio%
- \pgfmathreciprocal{\pgfkeysvalueof{/pgf/star point ratio}}%
- \pgf@xa\pgfmathresult\pgf@x\relax%
- \edef\innerradius{\the\pgf@xa}%
- \else%
- %
- % The star point height.
- %
- \pgf@xa\pgf@x\relax%
- \pgfmathaddtolength\pgf@xa{-\pgfkeysvalueof{/pgf/star point height}}%
- \edef\innerradius{\the\pgf@xa}%
- \fi%
- \fi%
- \edef\outerradius{\the\pgf@x}%
- %
- % Now calculate the anchor radii from the outer sep.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgf@ya>\pgf@xa%
- \pgf@xa\pgf@ya%
- \fi
- %
- % Take into account the miter length...
- %
- \pgfmathdivide{180}{\pgfkeysvalueof{/pgf/star points}}%
- \let\angletofirstpoint\pgfmathresult%
- \pgfmathmultiply@{\angletofirstpoint}{2}%
- \let\angletosecondpoint\pgfmathresult%
- %
- % ...for the outer radius...
- %
- \pgfmathanglebetweenlines%
- {\pgfqpointpolar{\angletofirstpoint}{\outerradius}}%
- {\pgfqpointpolar{\angletosecondpoint}{\innerradius}}%
- {\pgfqpointpolar{\angletofirstpoint}{\outerradius}}%
- {\pgfqpointpolar{0}{\innerradius}}%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \pgfmathcosec@{\pgfmathresult}%
- \pgf@x\outerradius\relax%
- \advance\pgf@x\pgfmathresult\pgf@xa%
- \edef\anchorouterradius{\the\pgf@x}%
- %
- % ...and for the inner radius.
- %
- \pgfmathanglebetweenlines%
- {\pgfqpointpolar{\angletofirstpoint}{\innerradius}}%
- {\pgfqpointpolar{0}{\outerradius}}%
- {\pgfqpointpolar{\angletofirstpoint}{\innerradius}}%
- {\pgfqpointpolar{\angletosecondpoint}{\outerradius}}%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \pgfmathcosec@{\pgfmathresult}%
- \pgf@x\innerradius\relax%
- \advance\pgf@x\pgfmathresult\pgf@xa%
- \edef\anchorinnerradius{\the\pgf@x}%
- %
- % Save all radii.
- %
- \addtosavedmacro{\innerradius}%
- \addtosavedmacro{\outerradius}%
- \addtosavedmacro{\anchorinnerradius}%
- \addtosavedmacro{\anchorouterradius}%
- }
- \savedmacro\startangle{%
- \pgfmathadd{90}{\pgfkeysvalueof{/pgf/shape border rotate}}%
- \let\startangle\pgfmathresult%
- }
- %
- % Saved anchors.
- %
- \savedanchor{\centerpoint}{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor{\midpoint}{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- %
- % Other anchors.
- %
-%
- % Other anchors.
- %
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}%
- \anchor{base}{\centerpoint\pgf@y=0pt}%
- \anchor{north}{%
- \calculateradii%
- \csname pgf@anchor@star@border\endcsname{\pgfqpoint{0pt}{\anchorouterradius}}}%
- \anchor{south}{%
- \calculateradii%
- \csname pgf@anchor@star@border\endcsname{\pgfqpoint{0pt}{-\anchorouterradius}}}%
- \anchor{east}{%
- \calculateradii%
- \csname pgf@anchor@star@border\endcsname{\pgfqpoint{\anchorouterradius}{0pt}}}%
- \anchor{west}{%
- \calculateradii%
- \csname pgf@anchor@star@border\endcsname{\pgfqpoint{-\anchorouterradius}{0pt}}}%
- \anchor{north east}{%
- \calculateradii%
- \csname pgf@anchor@star@border\endcsname{\pgfqpoint{\anchorouterradius}{\anchorouterradius}}}%
- \anchor{north west}{%
- \calculateradii%
- \csname pgf@anchor@star@border\endcsname{\pgfqpoint{-\anchorouterradius}{\anchorouterradius}}}%
- \anchor{south east}{%
- \calculateradii%
- \csname pgf@anchor@star@border\endcsname{\pgfqpoint{\anchorouterradius}{-\anchorouterradius}}}%
- \anchor{south west}{%
- \calculateradii%
- \csname pgf@anchor@star@border\endcsname{\pgfqpoint{-\anchorouterradius}{-\anchorouterradius}}}%
- %
- % Background path.
- %
- \backgroundpath{%
- \calculateradii%
- \let\angle\startangle%
- \pgfpathmoveto{\pgfpointadd{\centerpoint}{\pgfqpointpolar{\startangle}{\outerradius}}}%
- \pgfmathloop%
- \pgfmathadd@{\angle}{\anglestep}%
- \let\angle\pgfmathresult%
- \ifnum\pgfmathcounter=\totalstarpoints%
- \pgfpathclose%
- \else%
- \ifodd\pgfmathcounter
- \pgfpathlineto{\pgfpointadd{\centerpoint}{\pgfqpointpolar{\angle}{\innerradius}}}%
- \else%
- \pgfpathlineto{\pgfpointadd{\centerpoint}{\pgfqpointpolar{\angle}{\outerradius}}}%
- \fi%
- \repeatpgfmathloop%
- }%
- %
- % Define points on the anchor border.
- %
- \anchorborder{%
- %
- % Save x and y.
- %
- \edef\externalx{\the\pgf@x}%
- \edef\externaly{\the\pgf@y}%
- %
- % Adjust the location of the external
- % point relative to \centerpoint.
- %
- \centerpoint%
- \pgf@xa\externalx\relax%
- \pgf@ya\externaly\relax%
- \advance\pgf@xa\pgf@x%
- \advance\pgf@ya\pgf@y%
- \edef\externalx{\the\pgf@xa}%
- \edef\externaly{\the\pgf@ya}%
- %
- % Get the angle of the external point to the \centerpoint.
- %
- \pgfmathanglebetweenpoints{\centerpoint}{\pgfqpoint{\externalx}{\externaly}}%
- %
- % Locate the appropriate sides on the star border...
- %
- \pgfmathsubtract@{\pgfmathresult}{\startangle}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \pgfmathdivide@{\pgfmathresult}{\anglestep}%
- \pgfmathfloor@{\pgfmathresult}%
- \afterassignment\pgfmath@gobbletilpgfmath@
- \c@pgf@counta\pgfmathresult\relax\pgfmath@
- \pgfmathmultiply@{\pgfmathresult}{\anglestep}%
- \pgfmathadd@{\pgfmathresult}{\startangle}%
- \let\firstangle\pgfmathresult%
- \pgfmathadd@{\pgfmathresult}{\anglestep}%
- \let\secondangle\pgfmathresult%
- \calculateradii%
- %
- % ...and thus, the point on the star border.
- %
- \ifodd\c@pgf@counta
- \pgfpointintersectionoflines{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}%
- {%
- \pgfpointadd{\centerpoint}%
- {\pgfqpointpolar{+\firstangle}{+\anchorinnerradius}}%
- }%
- {%
- \pgfpointadd{\centerpoint}%
- {\pgfqpointpolar{+\secondangle}{+\anchorouterradius}}%
- }%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}%
- {%
- \pgfpointadd{\centerpoint}%
- {\pgfqpointpolar{+\firstangle}{+\anchorouterradius}}%
- }%
- {%
- \pgfpointadd{\centerpoint}%
- {\pgfqpointpolar{+\secondangle}{+\anchorinnerradius}}%
- }%
- \fi%
- }
- %
- % Some hackery. This is needed if a star is positioned using
- % a `...point <n+1>' anchor, where n is the maximum number of
- % points of any previously drawn star.
- %
- \pgfutil@g@addto@macro\pgf@sh@s@star{%
- \c@pgf@counta\totalstarpoints\relax%
- \divide\c@pgf@counta2\relax%
- \pgfmathloop%
- \ifnum\c@pgf@counta>0\relax%
- \c@pgf@countb\c@pgf@counta\relax%
- \advance\c@pgf@countb-1\relax%
- \pgfutil@ifundefined{pgf@anchor@star@inner point\space\the\c@pgf@counta}{%
- \expandafter\xdef\csname pgf@anchor@star@inner point\space\the\c@pgf@counta\endcsname{%
- \noexpand\calculateradii%
- \noexpand\pgfmathmultiply@{\the\c@pgf@countb}{\noexpand\anglestep}%
- \noexpand\pgfmathmultiply@{\noexpand\pgfmathresult}{2}%
- \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\anglestep}%
- \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\startangle}%
- \noexpand\let\noexpand\angle\noexpand\pgfmathresult%
- \noexpand\pgfpointadd{\noexpand\centerpoint}%
- {\noexpand\pgfqpointpolar{\noexpand\angle}{\noexpand\anchorinnerradius}}%
- }%
- \expandafter\xdef\csname pgf@anchor@star@outer point\space\the\c@pgf@counta\endcsname{%
- \noexpand\calculateradii%
- \noexpand\pgfmathmultiply@{\the\c@pgf@countb}{\noexpand\anglestep}%
- \noexpand\pgfmathmultiply@{\noexpand\pgfmathresult}{2}%
- \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\startangle}%
- \noexpand\let\noexpand\angle\noexpand\pgfmathresult%
- \noexpand\pgfpointadd{\noexpand\centerpoint}%
- {\noexpand\pgfqpointpolar{\noexpand\angle}{\noexpand\anchorouterradius}}%
- }%
- }{\c@pgf@counta0\relax}%
- \advance\c@pgf@counta-1\relax%
- \repeatpgfmathloop%
- }%
-}
+\pgfdeclareshape{star}{%
+ \savedmacro\totalstarpoints{%
+ \pgfmathsetcounter{pgf@counta}{\pgfkeysvalueof{/pgf/star points}}%
+ \multiply\c@pgf@counta2\relax%
+ \edef\totalstarpoints{\the\c@pgf@counta}%
+ }%
+ \savedmacro\anglestep{%
+ \pgfmathdivide{180}{\pgfkeysvalueof{/pgf/star points}}%
+ \let\anglestep\pgfmathresult%
+ }%
+ \savedmacro\calculateradii{%
+ %
+ % Get the node dimensions.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ \ifdim\pgf@y>\pgf@x%
+ \pgf@x\pgf@y%
+ \fi%
+ %
+ % Calculate the incircle radius.
+ %
+ \pgf@x1.41421\pgf@x%
+ \edef\innerradius{\the\pgf@x}%
+ %
+ % Calculate the circumcircle radius.
+ %
+ % Use the star point height or the star point ratio?
+ %
+ \ifpgf@lib@shapes@starouterradiususesratio%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/star point ratio}}%
+ \expandafter\pgf@x\pgfmathresult\pgf@x%
+ \else%
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/star point height}}%
+ \fi%
+ \pgf@xc\pgf@x%
+ %
+ % Accommodate the larger of the minimum height/width.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@ya>\pgf@xa%
+ \pgf@xa\pgf@ya%
+ \fi%
+ \ifdim\pgf@x<.5\pgf@xa%
+ \pgf@x.5\pgf@xa%
+ \fi%
+ \edef\outerradius{\the\pgf@x}%
+ %
+ % If the outer radius has been enlarged, adjust the inner radius...
+ %
+ \ifdim\pgf@x>\pgf@xc%
+ %
+ % ...using the star point ratio, or...
+ %
+ \ifpgf@lib@shapes@starouterradiususesratio%
+ \pgfmathreciprocal{\pgfkeysvalueof{/pgf/star point ratio}}%
+ \pgf@xa\pgfmathresult\pgf@x\relax%
+ \edef\innerradius{\the\pgf@xa}%
+ \else%
+ %
+ % The star point height.
+ %
+ \pgf@xa\pgf@x\relax%
+ \pgfmathaddtolength\pgf@xa{-\pgfkeysvalueof{/pgf/star point height}}%
+ \edef\innerradius{\the\pgf@xa}%
+ \fi%
+ \fi%
+ \edef\outerradius{\the\pgf@x}%
+ %
+ % Now calculate the anchor radii from the outer sep.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@ya>\pgf@xa%
+ \pgf@xa\pgf@ya%
+ \fi
+ %
+ % Take into account the miter length...
+ %
+ \pgfmathdivide{180}{\pgfkeysvalueof{/pgf/star points}}%
+ \let\angletofirstpoint\pgfmathresult%
+ \pgfmathmultiply@{\angletofirstpoint}{2}%
+ \let\angletosecondpoint\pgfmathresult%
+ %
+ % ...for the outer radius...
+ %
+ \pgfmathanglebetweenlines%
+ {\pgfqpointpolar{\angletofirstpoint}{\outerradius}}%
+ {\pgfqpointpolar{\angletosecondpoint}{\innerradius}}%
+ {\pgfqpointpolar{\angletofirstpoint}{\outerradius}}%
+ {\pgfqpointpolar{0}{\innerradius}}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \pgfmathcosec@{\pgfmathresult}%
+ \pgf@x\outerradius\relax%
+ \advance\pgf@x\pgfmathresult\pgf@xa%
+ \edef\anchorouterradius{\the\pgf@x}%
+ %
+ % ...and for the inner radius.
+ %
+ \pgfmathanglebetweenlines%
+ {\pgfqpointpolar{\angletofirstpoint}{\innerradius}}%
+ {\pgfqpointpolar{0}{\outerradius}}%
+ {\pgfqpointpolar{\angletofirstpoint}{\innerradius}}%
+ {\pgfqpointpolar{\angletosecondpoint}{\outerradius}}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \pgfmathcosec@{\pgfmathresult}%
+ \pgf@x\innerradius\relax%
+ \advance\pgf@x\pgfmathresult\pgf@xa%
+ \edef\anchorinnerradius{\the\pgf@x}%
+ %
+ % Save all radii.
+ %
+ \addtosavedmacro{\innerradius}%
+ \addtosavedmacro{\outerradius}%
+ \addtosavedmacro{\anchorinnerradius}%
+ \addtosavedmacro{\anchorouterradius}%
+ }%
+ \savedmacro\startangle{%
+ \pgfmathadd{90}{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ \let\startangle\pgfmathresult%
+ }%
+ %
+ % Saved anchors.
+ %
+ \savedanchor{\centerpoint}{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor{\midpoint}{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ %
+ %
+ % Other anchors.
+ %
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}%
+ \anchor{base}{\centerpoint\pgf@y=0pt}%
+ \anchor{north}{%
+ \calculateradii%
+ \csname pgf@anchor@star@border\endcsname{\pgfqpoint{0pt}{\anchorouterradius}}}%
+ \anchor{south}{%
+ \calculateradii%
+ \csname pgf@anchor@star@border\endcsname{\pgfqpoint{0pt}{-\anchorouterradius}}}%
+ \anchor{east}{%
+ \calculateradii%
+ \csname pgf@anchor@star@border\endcsname{\pgfqpoint{\anchorouterradius}{0pt}}}%
+ \anchor{west}{%
+ \calculateradii%
+ \csname pgf@anchor@star@border\endcsname{\pgfqpoint{-\anchorouterradius}{0pt}}}%
+ \anchor{north east}{%
+ \calculateradii%
+ \csname pgf@anchor@star@border\endcsname{\pgfqpoint{\anchorouterradius}{\anchorouterradius}}}%
+ \anchor{north west}{%
+ \calculateradii%
+ \csname pgf@anchor@star@border\endcsname{\pgfqpoint{-\anchorouterradius}{\anchorouterradius}}}%
+ \anchor{south east}{%
+ \calculateradii%
+ \csname pgf@anchor@star@border\endcsname{\pgfqpoint{\anchorouterradius}{-\anchorouterradius}}}%
+ \anchor{south west}{%
+ \calculateradii%
+ \csname pgf@anchor@star@border\endcsname{\pgfqpoint{-\anchorouterradius}{-\anchorouterradius}}}%
+ %
+ % Background path.
+ %
+ \backgroundpath{%
+ \calculateradii%
+ \let\angle\startangle%
+ \pgfpathmoveto{\pgfpointadd{\centerpoint}{\pgfqpointpolar{\startangle}{\outerradius}}}%
+ \pgfmathloop%
+ \pgfmathadd@{\angle}{\anglestep}%
+ \let\angle\pgfmathresult%
+ \ifnum\pgfmathcounter=\totalstarpoints%
+ \pgfpathclose%
+ \else%
+ \ifodd\pgfmathcounter
+ \pgfpathlineto{\pgfpointadd{\centerpoint}{\pgfqpointpolar{\angle}{\innerradius}}}%
+ \else%
+ \pgfpathlineto{\pgfpointadd{\centerpoint}{\pgfqpointpolar{\angle}{\outerradius}}}%
+ \fi%
+ \repeatpgfmathloop%
+ }%
+ %
+ % Define points on the anchor border.
+ %
+ \anchorborder{%
+ %
+ % Save x and y.
+ %
+ \edef\externalx{\the\pgf@x}%
+ \edef\externaly{\the\pgf@y}%
+ %
+ % Adjust the location of the external
+ % point relative to \centerpoint.
+ %
+ \centerpoint%
+ \pgf@xa\externalx\relax%
+ \pgf@ya\externaly\relax%
+ \advance\pgf@xa\pgf@x%
+ \advance\pgf@ya\pgf@y%
+ \edef\externalx{\the\pgf@xa}%
+ \edef\externaly{\the\pgf@ya}%
+ %
+ % Get the angle of the external point to the \centerpoint.
+ %
+ \pgfmathanglebetweenpoints{\centerpoint}{\pgfqpoint{\externalx}{\externaly}}%
+ %
+ % Locate the appropriate sides on the star border...
+ %
+ \pgfmathsubtract@{\pgfmathresult}{\startangle}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \pgfmathdivide@{\pgfmathresult}{\anglestep}%
+ \pgfmathfloor@{\pgfmathresult}%
+ \afterassignment\pgfmath@gobbletilpgfmath@
+ \c@pgf@counta\pgfmathresult\relax\pgfmath@
+ \pgfmathmultiply@{\pgfmathresult}{\anglestep}%
+ \pgfmathadd@{\pgfmathresult}{\startangle}%
+ \let\firstangle\pgfmathresult%
+ \pgfmathadd@{\pgfmathresult}{\anglestep}%
+ \let\secondangle\pgfmathresult%
+ \calculateradii%
+ %
+ % ...and thus, the point on the star border.
+ %
+ \ifodd\c@pgf@counta
+ \pgfpointintersectionoflines{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}%
+ {%
+ \pgfpointadd{\centerpoint}%
+ {\pgfqpointpolar{+\firstangle}{+\anchorinnerradius}}%
+ }%
+ {%
+ \pgfpointadd{\centerpoint}%
+ {\pgfqpointpolar{+\secondangle}{+\anchorouterradius}}%
+ }%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}%
+ {%
+ \pgfpointadd{\centerpoint}%
+ {\pgfqpointpolar{+\firstangle}{+\anchorouterradius}}%
+ }%
+ {%
+ \pgfpointadd{\centerpoint}%
+ {\pgfqpointpolar{+\secondangle}{+\anchorinnerradius}}%
+ }%
+ \fi%
+ }%
+ %
+ % Some hackery. This is needed if a star is positioned using
+ % a `...point <n+1>' anchor, where n is the maximum number of
+ % points of any previously drawn star.
+ %
+ \pgfutil@g@addto@macro\pgf@sh@s@star{%
+ \c@pgf@counta\totalstarpoints\relax%
+ \divide\c@pgf@counta2\relax%
+ \pgfmathloop%
+ \ifnum\c@pgf@counta>0\relax%
+ \c@pgf@countb\c@pgf@counta\relax%
+ \advance\c@pgf@countb-1\relax%
+ \pgfutil@ifundefined{pgf@anchor@star@inner point\space\the\c@pgf@counta}{%
+ \expandafter\xdef\csname pgf@anchor@star@inner point\space\the\c@pgf@counta\endcsname{%
+ \noexpand\calculateradii%
+ \noexpand\pgfmathmultiply@{\the\c@pgf@countb}{\noexpand\anglestep}%
+ \noexpand\pgfmathmultiply@{\noexpand\pgfmathresult}{2}%
+ \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\anglestep}%
+ \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\startangle}%
+ \noexpand\let\noexpand\angle\noexpand\pgfmathresult%
+ \noexpand\pgfpointadd{\noexpand\centerpoint}%
+ {\noexpand\pgfqpointpolar{\noexpand\angle}{\noexpand\anchorinnerradius}}%
+ }%
+ \expandafter\xdef\csname pgf@anchor@star@outer point\space\the\c@pgf@counta\endcsname{%
+ \noexpand\calculateradii%
+ \noexpand\pgfmathmultiply@{\the\c@pgf@countb}{\noexpand\anglestep}%
+ \noexpand\pgfmathmultiply@{\noexpand\pgfmathresult}{2}%
+ \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\startangle}%
+ \noexpand\let\noexpand\angle\noexpand\pgfmathresult%
+ \noexpand\pgfpointadd{\noexpand\centerpoint}%
+ {\noexpand\pgfqpointpolar{\noexpand\angle}{\noexpand\anchorouterradius}}%
+ }%
+ }{\c@pgf@counta0\relax}%
+ \advance\c@pgf@counta-1\relax%
+ \repeatpgfmathloop%
+ }%
+}%
% Keys for shape regular polygon
%
-% /pgf/regular polygon sides
+% /pgf/regular polygon sides
%
\pgfkeys{/pgf/.cd,
- regular polygon sides/.initial=5,
- regular polygon rotate/.style={/pgf/shape border rotate=#1}% For compatability with 1.18
-}
+ regular polygon sides/.initial=5,
+ regular polygon rotate/.style={/pgf/shape border rotate=#1}% For compatibility with 1.18
+}%
% Shape Regular Polygon.
%
-\pgfdeclareshape{regular polygon}{
- \savedmacro\sides{%
- \pgfmathtruncatemacro\sides{\pgfkeysvalueof{/pgf/regular polygon sides}}%
- }
- \savedmacro\anglestep{%
- \pgfmathdivide{360}{\pgfkeysvalueof{/pgf/regular polygon sides}}%
- \let\anglestep\pgfmathresult%
- }
- \savedmacro\calculateradii{%
- %
- % Get the node dimensions.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- \ifdim\pgf@y>\pgf@x%
- \pgf@x\pgf@y%
- \fi%
- %
- % Calculate i, the incircle radius
- %
- \pgf@x1.41421\pgf@x%
- %
- % Calculate r, the polygon radius
- %
- % r = i / cos(360 / s / 2)
- %
- % (s = polygon sides)
- %
- \pgfmathdivide{180}{\pgfkeysvalueof{/pgf/regular polygon sides}}%
- \pgfmathsec@{\pgfmathresult}%
- \pgf@x\pgfmathresult\pgf@x%
- %
- % Accommodate the minimum width/height.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@ya>\pgf@xa%
- \pgf@xa\pgf@ya%
- \fi%
- \ifdim\pgf@x<.5\pgf@xa%
- \pgf@x.5\pgf@xa%
- \fi%
- \edef\radius{\the\pgf@x}%
- %
- % Now calculate the anchor radius from the outer sep.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgf@ya>\pgf@xa%
- \pgf@xa\pgf@ya%
- \fi
- %
- % Take into account the miter length.
- %
- % m = o / sin (90 - (360 / s / 2))
- %
- % (o = outer sep, s = sides)
- %
- \pgfmathdivide{180}{\pgfkeysvalueof{/pgf/regular polygon sides}}%
- \pgfmathsubtract@{90}{\pgfmathresult}%
- \pgfmathcosec@{\pgfmathresult}%
- \advance\pgf@x\pgfmathresult\pgf@xa%
- \edef\anchorradius{\the\pgf@x}%
- %
- % Save both radii.
- %
- \addtosavedmacro{\radius}%
- \addtosavedmacro{\anchorradius}%
- }
- \savedmacro\startangle{%
- \pgfmathdivide{360}{\pgfkeysvalueof{/pgf/regular polygon sides}}%
- \let\anglestep\pgfmathresult%
- \pgfmathtruncatemacro\sides{\pgfkeysvalueof{/pgf/regular polygon sides}}%
- \expandafter\ifodd\sides\relax%
- \edef\pgfmathresult{90}%
- \else%
- \pgfmathdivide@{\anglestep}{2}%
- \pgfmathsubtract@{90}{\pgfmathresult}%
- \fi%
- \pgfmathadd{\pgfmathresult}{\pgfkeysvalueof{/pgf/shape border rotate}}%
- \let\startangle\pgfmathresult%
- }
- %
- % Saved anchors.
- %
- \savedanchor{\centerpoint}{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor{\midpoint}{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- %
- % Other anchors.
- %
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \anchor{base}{\centerpoint\pgf@y=0pt}%
- \anchor{north}{%
- \calculateradii%
- \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{0pt}{\anchorradius}}}%
- \anchor{south}{%
- \calculateradii%
- \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{0pt}{-\anchorradius}}}%
- \anchor{east}{%
- \calculateradii%
- \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{\anchorradius}{0pt}}}%
- \anchor{west}{%
- \calculateradii%
- \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{-\anchorradius}{0pt}}}%
- \anchor{north east}{%
- \calculateradii%
- \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{\anchorradius}{\anchorradius}}}%
- \anchor{north west}{%
- \calculateradii%
- \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{-\anchorradius}{\anchorradius}}}%
- \anchor{south east}{%
- \calculateradii%
- \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{\anchorradius}{-\anchorradius}}}%
- \anchor{south west}{%
- \calculateradii%
- \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{-\anchorradius}{-\anchorradius}}}%
- %
- % Background path.
- %
- \backgroundpath{%
- \calculateradii%
- \pgfpathmoveto{%
- \pgfpointadd{\centerpoint}{\pgfqpointpolar{\startangle}{\radius}}%
- }%
- \let\angle\startangle%
- \pgfmathloop%
- \ifnum\pgfmathcounter=\sides\relax%
- \pgfpathclose%
- \else%
- \pgfmathadd@{\angle}{\anglestep}%
- \let\angle\pgfmathresult%
- \pgfpathlineto{%
- \pgfpointadd{\centerpoint}{\pgfqpointpolar{\angle}{\radius}}%
- }%
- \repeatpgfmathloop%
- }%
- \anchorborder{%
- %
- % Save x and y.
- %
- \edef\externalx{\the\pgf@x}%
- \edef\externaly{\the\pgf@y}%
- %
- % Adjust the location of the external
- % point relative to \centerpoint.
- %
- \centerpoint%
- \pgf@xa\externalx\relax%
- \pgf@ya\externaly\relax%
- \advance\pgf@xa\pgf@x%
- \advance\pgf@ya\pgf@y%
- \edef\externalx{\the\pgf@xa}%
- \edef\externaly{\the\pgf@ya}%
- %
- % Get the angle of the external point to the \centerpoint.
- %
- \pgfmathanglebetweenpoints{\centerpoint}{\pgfqpoint{\externalx}{\externaly}}%
- %
- % Locate the appropriate sides on the polygon border...
- %
- \pgfmathsubtract@{\pgfmathresult}{\startangle}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \pgfmathdivide@{\pgfmathresult}{\anglestep}%
- \pgfmathfloor@{\pgfmathresult}%
- \pgfmathmultiply@{\pgfmathresult}{\anglestep}%
- \pgfmathadd@{\pgfmathresult}{\startangle}%
- \let\firstangle\pgfmathresult%
- \pgfmathadd@{\pgfmathresult}{\anglestep}%
- \let\secondangle\pgfmathresult%
- \calculateradii%
- %
- % ...and thus, the point on the polygon border.
- %
- \pgfpointintersectionoflines{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}%
- {%
- \pgfpointadd{\centerpoint}%
- {\pgfqpointpolar{+\firstangle}{+\anchorradius}}%
- }%
- {%
- \pgfpointadd{\centerpoint}%
- {\pgfqpointpolar{+\secondangle}{+\anchorradius}}%
- }%
- }
- %
- % More hackery for when the recuglar polygon is positioned using
- % a `corner <n+1>' or `side <n+1>' anchor, where n is the maximum
- % number of sides of any previously drawn regular polygon.
- %
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@regular polygon\endcsname{%
- \c@pgf@counta\sides\relax%
- \pgfmathloop%
- \ifnum\c@pgf@counta>0\relax%
- \pgfutil@ifundefined{pgf@anchor@regular polygon@corner\space\the\c@pgf@counta}{%
- %
- % ...(manually \xdef as \gdef is normally used by \anchor)...
- %
- \expandafter\xdef\csname pgf@anchor@regular polygon@corner\space\the\c@pgf@counta\endcsname{%
- \noexpand\calculateradii%
- \noexpand\pgfmathsubtract@{\the\c@pgf@counta}{1}%
- \noexpand\pgfmathmultiply@{\noexpand\pgfmathresult}{\noexpand\anglestep}%
- \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\startangle}%
- \noexpand\let\noexpand\angle\noexpand\pgfmathresult%
- \noexpand\pgfpointadd{\noexpand\centerpoint}%
- {\noexpand\pgfqpointpolar{\noexpand\angle}{\noexpand\anchorradius}}%
- }%
- \expandafter\xdef\csname pgf@anchor@regular polygon@side\space\the\c@pgf@counta\endcsname{%
- \noexpand\calculateradii%
- \noexpand\pgfmathsubtract@{\the\c@pgf@counta}{1}%
- \noexpand\pgfmathmultiply@{\noexpand\pgfmathresult}{\noexpand\anglestep}%
- \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\startangle}%
- \noexpand\let\noexpand\firstangle\noexpand\pgfmathresult%
- \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\anglestep}%
- \noexpand\let\noexpand\secondangle\noexpand\pgfmathresult%
- \noexpand\pgfpointlineattime{0.5}%
- {\noexpand\pgfpointadd{\noexpand\centerpoint}%
- {\noexpand\pgfqpointpolar{\noexpand\firstangle}{\noexpand\anchorradius}}}%
- {\noexpand\pgfpointadd{\noexpand\centerpoint}%
- {\noexpand\pgfqpointpolar{\noexpand\secondangle}{\noexpand\anchorradius}}}%
- }%
- }{\c@pgf@counta0\relax}%
- \advance\c@pgf@counta-1\relax%
- \repeatpgfmathloop%
- }%
-}
+\pgfdeclareshape{regular polygon}{%
+ \savedmacro\sides{%
+ \pgfmathtruncatemacro\sides{\pgfkeysvalueof{/pgf/regular polygon sides}}%
+ }%
+ \savedmacro\anglestep{%
+ \pgfmathdivide{360}{\pgfkeysvalueof{/pgf/regular polygon sides}}%
+ \let\anglestep\pgfmathresult%
+ }%
+ \savedmacro\calculateradii{%
+ %
+ % Get the node dimensions.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ \ifdim\pgf@y>\pgf@x%
+ \pgf@x\pgf@y%
+ \fi%
+ %
+ % Calculate i, the incircle radius
+ %
+ \pgf@x1.41421\pgf@x%
+ %
+ % Calculate r, the polygon radius
+ %
+ % r = i / cos(360 / s / 2)
+ %
+ % (s = polygon sides)
+ %
+ \pgfmathdivide{180}{\pgfkeysvalueof{/pgf/regular polygon sides}}%
+ \pgfmathsec@{\pgfmathresult}%
+ \pgf@x\pgfmathresult\pgf@x%
+ %
+ % Accommodate the minimum width/height.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@ya>\pgf@xa%
+ \pgf@xa\pgf@ya%
+ \fi%
+ \ifdim\pgf@x<.5\pgf@xa%
+ \pgf@x.5\pgf@xa%
+ \fi%
+ \edef\radius{\the\pgf@x}%
+ %
+ % Now calculate the anchor radius from the outer sep.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@ya>\pgf@xa%
+ \pgf@xa\pgf@ya%
+ \fi
+ %
+ % Take into account the miter length.
+ %
+ % m = o / sin (90 - (360 / s / 2))
+ %
+ % (o = outer sep, s = sides)
+ %
+ \pgfmathdivide{180}{\pgfkeysvalueof{/pgf/regular polygon sides}}%
+ \pgfmathsubtract@{90}{\pgfmathresult}%
+ \pgfmathcosec@{\pgfmathresult}%
+ \advance\pgf@x\pgfmathresult\pgf@xa%
+ \edef\anchorradius{\the\pgf@x}%
+ %
+ % Save both radii.
+ %
+ \addtosavedmacro{\radius}%
+ \addtosavedmacro{\anchorradius}%
+ }%
+ \savedmacro\startangle{%
+ \pgfmathdivide{360}{\pgfkeysvalueof{/pgf/regular polygon sides}}%
+ \let\anglestep\pgfmathresult%
+ \pgfmathtruncatemacro\sides{\pgfkeysvalueof{/pgf/regular polygon sides}}%
+ \expandafter\ifodd\sides\relax%
+ \edef\pgfmathresult{90}%
+ \else%
+ \pgfmathdivide@{\anglestep}{2}%
+ \pgfmathsubtract@{90}{\pgfmathresult}%
+ \fi%
+ \pgfmathadd{\pgfmathresult}{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ \let\startangle\pgfmathresult%
+ }%
+ %
+ % Saved anchors.
+ %
+ \savedanchor{\centerpoint}{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor{\midpoint}{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ %
+ % Other anchors.
+ %
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{base}{\centerpoint\pgf@y=0pt}%
+ \anchor{north}{%
+ \calculateradii%
+ \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{0pt}{\anchorradius}}}%
+ \anchor{south}{%
+ \calculateradii%
+ \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{0pt}{-\anchorradius}}}%
+ \anchor{east}{%
+ \calculateradii%
+ \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{\anchorradius}{0pt}}}%
+ \anchor{west}{%
+ \calculateradii%
+ \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{-\anchorradius}{0pt}}}%
+ \anchor{north east}{%
+ \calculateradii%
+ \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{\anchorradius}{\anchorradius}}}%
+ \anchor{north west}{%
+ \calculateradii%
+ \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{-\anchorradius}{\anchorradius}}}%
+ \anchor{south east}{%
+ \calculateradii%
+ \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{\anchorradius}{-\anchorradius}}}%
+ \anchor{south west}{%
+ \calculateradii%
+ \csname pgf@anchor@regular polygon@border\endcsname{\pgfqpoint{-\anchorradius}{-\anchorradius}}}%
+ %
+ % Background path.
+ %
+ \backgroundpath{%
+ \calculateradii%
+ \pgfpathmoveto{%
+ \pgfpointadd{\centerpoint}{\pgfqpointpolar{\startangle}{\radius}}%
+ }%
+ \let\angle\startangle%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter=\sides\relax%
+ \pgfpathclose%
+ \else%
+ \pgfmathadd@{\angle}{\anglestep}%
+ \let\angle\pgfmathresult%
+ \pgfpathlineto{%
+ \pgfpointadd{\centerpoint}{\pgfqpointpolar{\angle}{\radius}}%
+ }%
+ \repeatpgfmathloop%
+ }%
+ \anchorborder{%
+ %
+ % Save x and y.
+ %
+ \edef\externalx{\the\pgf@x}%
+ \edef\externaly{\the\pgf@y}%
+ %
+ % Adjust the location of the external
+ % point relative to \centerpoint.
+ %
+ \centerpoint%
+ \pgf@xa\externalx\relax%
+ \pgf@ya\externaly\relax%
+ \advance\pgf@xa\pgf@x%
+ \advance\pgf@ya\pgf@y%
+ \edef\externalx{\the\pgf@xa}%
+ \edef\externaly{\the\pgf@ya}%
+ %
+ % Get the angle of the external point to the \centerpoint.
+ %
+ \pgfmathanglebetweenpoints{\centerpoint}{\pgfqpoint{\externalx}{\externaly}}%
+ %
+ % Locate the appropriate sides on the polygon border...
+ %
+ \pgfmathsubtract@{\pgfmathresult}{\startangle}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \pgfmathdivide@{\pgfmathresult}{\anglestep}%
+ \pgfmathfloor@{\pgfmathresult}%
+ \pgfmathmultiply@{\pgfmathresult}{\anglestep}%
+ \pgfmathadd@{\pgfmathresult}{\startangle}%
+ \let\firstangle\pgfmathresult%
+ \pgfmathadd@{\pgfmathresult}{\anglestep}%
+ \let\secondangle\pgfmathresult%
+ \calculateradii%
+ %
+ % ...and thus, the point on the polygon border.
+ %
+ \pgfpointintersectionoflines{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}%
+ {%
+ \pgfpointadd{\centerpoint}%
+ {\pgfqpointpolar{+\firstangle}{+\anchorradius}}%
+ }%
+ {%
+ \pgfpointadd{\centerpoint}%
+ {\pgfqpointpolar{+\secondangle}{+\anchorradius}}%
+ }%
+ }%
+ %
+ % More hackery for when the rectangular polygon is positioned using
+ % a `corner <n+1>' or `side <n+1>' anchor, where n is the maximum
+ % number of sides of any previously drawn regular polygon.
+ %
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@regular polygon\endcsname{%
+ \c@pgf@counta\sides\relax%
+ \pgfmathloop%
+ \ifnum\c@pgf@counta>0\relax%
+ \pgfutil@ifundefined{pgf@anchor@regular polygon@corner\space\the\c@pgf@counta}{%
+ %
+ % ...(manually \xdef as \gdef is normally used by \anchor)...
+ %
+ \expandafter\xdef\csname pgf@anchor@regular polygon@corner\space\the\c@pgf@counta\endcsname{%
+ \noexpand\calculateradii%
+ \noexpand\pgfmathsubtract@{\the\c@pgf@counta}{1}%
+ \noexpand\pgfmathmultiply@{\noexpand\pgfmathresult}{\noexpand\anglestep}%
+ \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\startangle}%
+ \noexpand\let\noexpand\angle\noexpand\pgfmathresult%
+ \noexpand\pgfpointadd{\noexpand\centerpoint}%
+ {\noexpand\pgfqpointpolar{\noexpand\angle}{\noexpand\anchorradius}}%
+ }%
+ \expandafter\xdef\csname pgf@anchor@regular polygon@side\space\the\c@pgf@counta\endcsname{%
+ \noexpand\calculateradii%
+ \noexpand\pgfmathsubtract@{\the\c@pgf@counta}{1}%
+ \noexpand\pgfmathmultiply@{\noexpand\pgfmathresult}{\noexpand\anglestep}%
+ \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\startangle}%
+ \noexpand\let\noexpand\firstangle\noexpand\pgfmathresult%
+ \noexpand\pgfmathadd@{\noexpand\pgfmathresult}{\noexpand\anglestep}%
+ \noexpand\let\noexpand\secondangle\noexpand\pgfmathresult%
+ \noexpand\pgfpointlineattime{0.5}%
+ {\noexpand\pgfpointadd{\noexpand\centerpoint}%
+ {\noexpand\pgfqpointpolar{\noexpand\firstangle}{\noexpand\anchorradius}}}%
+ {\noexpand\pgfpointadd{\noexpand\centerpoint}%
+ {\noexpand\pgfqpointpolar{\noexpand\secondangle}{\noexpand\anchorradius}}}%
+ }%
+ }{\c@pgf@counta0\relax}%
+ \advance\c@pgf@counta-1\relax%
+ \repeatpgfmathloop%
+ }%
+}%
@@ -930,15 +928,15 @@
% /pgf/trapezium right angle : angle of the right side.
\pgfkeys{/pgf/.cd,
- trapezium left angle/.initial=60,
- trapezium right angle/.initial=60,
- trapezium angle/.style={
- /pgf/trapezium left angle=#1,
- /pgf/trapezium right angle=#1
- },%
- trapezium stretches/.is if=pgf@lib@sh@trapeziumstretches,%
- trapezium stretches body/.is if=pgf@lib@sh@trapeziumstretchesbody%
-}
+ trapezium left angle/.initial=60,
+ trapezium right angle/.initial=60,
+ trapezium angle/.style={
+ /pgf/trapezium left angle=#1,
+ /pgf/trapezium right angle=#1
+ },%
+ trapezium stretches/.is if=pgf@lib@sh@trapeziumstretches,%
+ trapezium stretches body/.is if=pgf@lib@sh@trapeziumstretchesbody,%
+}%
\newif\ifpgf@lib@sh@trapeziumstretchesbody
\newif\ifpgf@lib@sh@trapeziumstretches
@@ -946,1394 +944,1394 @@
% Shape trapezium.
%
-\pgfdeclareshape{trapezium}{
- \savedmacro\installtrapeziumparameters{%
- %
- % Get the node dimensions.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- \ifpgfshapeborderusesincircle%
- %
- % Get the rotation (no rounding).
- %
- \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
- %
- % Use the radius of the incircle if required...
- %
- \ifdim\pgf@x<\pgf@y%
- \pgf@x\pgf@y%
- \fi%
- \pgf@x1.41421\pgf@x%
- \pgf@y\pgf@x%
- \else%
- %
- % Get the rotation (with rounding).
- %
- \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
- \advance\c@pgf@counta45\relax%
- \divide\c@pgf@counta90\relax%
- \multiply\c@pgf@counta90\relax%
- \ifnum\c@pgf@counta<0\relax%
- \advance\c@pgf@counta360\relax%
- \fi%
- \edef\rotate{\the\c@pgf@counta}%
- %
- % Calculate the width and height of the node
- % contents, according to any border rotation.
- %
- \ifnum\c@pgf@counta=90\relax%
- \pgf@xc\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xc%
- \else%
- \ifnum\c@pgf@counta=270\relax%
- \pgf@xc\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xc%
- \fi%
- \fi%
- \fi%
- \pgfmathmod{\pgfkeysvalueof{/pgf/trapezium left angle}}{360}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \let\leftangle\pgfmathresult%
- \ifdim\leftangle pt=0pt\relax%
- \def\pgfmathresult{0}%
- \else%
- \pgfmathcot@{\leftangle}%
- \fi%
- \pgf@xa2\pgf@y%
- \pgf@xa\pgfmathresult\pgf@xa%
- \pgfmathmod{\pgfkeysvalueof{/pgf/trapezium right angle}}{360}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \let\rightangle\pgfmathresult%
- \ifdim\rightangle pt=0pt\relax%
- \def\pgfmathresult{0}%
- \else%
- \pgfmathcot@{\rightangle}%
- \fi%
- \pgf@xb2\pgf@y%
- \pgf@xb\pgfmathresult\pgf@xb%
- %
- % Take into account minimum height and width.
- %
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@y<.5\pgf@ya%
- \ifpgf@lib@sh@trapeziumstretches%
- \pgf@y.5\pgf@ya%
- \else%
- \ifpgf@lib@sh@trapeziumstretchesbody%
- \pgf@y.5\pgf@ya%
- \else%
- \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@y}}%
- \pgf@yb.5\pgf@ya%
- \pgf@yb\pgfmathresult\pgf@yb%
- \pgf@y.5\pgf@ya%
- \pgf@x\pgfmath@tonumber{\pgf@yb}\pgf@x%
- \pgf@xa\pgfmath@tonumber{\pgf@yb}\pgf@xa%
- \pgf@xb\pgfmath@tonumber{\pgf@yb}\pgf@xb%
- \fi%
- \fi%
- \fi%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum width}}%
- \pgf@xc2\pgf@x%
- \ifdim\pgf@xa<0pt\relax%
- \advance\pgf@xc-\pgf@xa%
- \else%
- \advance\pgf@xc\pgf@xa%
- \fi%
- \ifdim\pgf@xb<0pt\relax%
- \advance\pgf@xc-\pgf@xb%
- \else%
- \advance\pgf@xc\pgf@xb%
- \fi%
- \ifdim\pgf@xc<\pgf@ya%
- \ifpgf@lib@sh@trapeziumstretchesbody%
- \pgf@xc-\pgf@xc%
- \advance\pgf@xc\pgf@ya%
- \advance\pgf@x.5\pgf@xc%
- \else%
- \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@xc}}%
- \pgf@ya\pgfmathresult\pgf@ya%
- \pgf@x\pgfmath@tonumber{\pgf@ya}\pgf@x%
- \pgf@xa\pgfmath@tonumber{\pgf@ya}\pgf@xa%
- \pgf@xb\pgfmath@tonumber{\pgf@ya}\pgf@xb%
- \ifpgf@lib@sh@trapeziumstretches%
- \else%
- \pgf@y\pgfmath@tonumber{\pgf@ya}\pgf@y%
- \fi%
- \fi%
- \fi%
- \edef\halfheight{\the\pgf@y}%
- \edef\halfwidth{\the\pgf@x}%
- \edef\leftextension{\the\pgf@xa}%
- \edef\rightextension{\the\pgf@xb}%
- \pgf@xc2\pgf@x%
- %
- % Take the larger of the outer sep.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgf@y>\pgf@x%
- \pgf@x\pgf@y%
- \fi%
- \edef\outersep{\the\pgf@x}%
- %
- % The \externalradius is a length that is
- % guarenteed to produce a point outside the trapezium.
- %
- \advance\pgf@xc2.0\pgf@x%
- \pgf@yc\halfheight\relax%
- \multiply\pgf@yc2\relax%
- \advance\pgf@yc2.0\pgf@x%
- \ifdim\pgf@xc<\pgf@yc%
- \edef\externalradius{\the\pgf@yc}%
- \else%
- \edef\externalradius{\the\pgf@xc}%
- \fi%
- %
- % Calculate the centre base and mid poins of the node.
- %
- \pgfextract@process\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \pgfextract@process\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt\relax%
- }%
- \pgfextract@process\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- %
- % Calculate each point on the trapezium (without rotation).
- %
- \pgfextract@process\lowerleftpoint{%
- \centerpoint%
- \advance\pgf@x-\halfwidth\relax%
- \ifdim\leftextension>0pt\relax%
- \advance\pgf@x-\leftextension\relax%
- \fi%
- \advance\pgf@y-\halfheight\relax%
- }%
- \pgfextract@process\upperleftpoint{%
- \centerpoint%
- \advance\pgf@x-\halfwidth\relax%
- \ifdim\leftextension<0pt\relax%
- \advance\pgf@x\leftextension\relax%
- \fi%
- \advance\pgf@y\halfheight\relax%
- }%
- \pgfextract@process\upperrightpoint{%
- \centerpoint%
- \advance\pgf@x\halfwidth\relax%
- \ifdim\rightextension<0pt\relax%
- \advance\pgf@x-\rightextension\relax%
- \fi%
- \advance\pgf@y\halfheight\relax%
- }%
- \pgfextract@process\lowerrightpoint{%
- \centerpoint%
- \advance\pgf@x\halfwidth\relax%
- \ifdim\rightextension>0pt\relax%
- \advance\pgf@x\rightextension\relax%
- \fi%
- \advance\pgf@y-\halfheight\relax%
- }%
- %
- % Now calculate the adjustment for the miter length at each corner
- % of the trapezium. This ensures more accurate anchor positioning
- % when the line width is particularly thick.
- %
- \pgfextract@process\lowerleftmiter{%
- \pgfmathanglebetweenlines{\lowerleftpoint}{\lowerrightpoint}{\lowerleftpoint}{\upperleftpoint}%
- \pgfmathmultiply@{\pgfmathresult}{.5}%
- \pgfmathtan@{\pgfmathresult}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@x-\outersep\relax%
- \pgf@x\pgfmathresult\pgf@x%
- \pgf@y-\outersep\relax%
- }%
- \pgfextract@process\upperleftmiter{%
- \pgfmathanglebetweenlines{\upperleftpoint}{\lowerleftpoint}{\upperleftpoint}{\upperrightpoint}%
- \pgfmathmultiply@{\pgfmathresult}{.5}%
- \pgfmathtan@{\pgfmathresult}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@x-\outersep\relax%
- \pgf@x\pgfmathresult\pgf@x%
- \pgf@y\outersep\relax%
- }%
- \pgfextract@process\upperrightmiter{%
- \pgfmathanglebetweenlines{\upperrightpoint}{\upperleftpoint}{\upperrightpoint}{\lowerrightpoint}%
- \pgfmathmultiply@{\pgfmathresult}{.5}%
- \pgfmathtan@{\pgfmathresult}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@x\outersep\relax%
- \pgf@x\pgfmathresult\pgf@x%
- \pgf@y\outersep\relax%
- }%
- \pgfextract@process\lowerrightmiter{%
- \pgfmathanglebetweenlines{\lowerrightpoint}{\upperrightpoint}{\lowerrightpoint}{\lowerleftpoint}%
- \pgfmathmultiply@{\pgfmathresult}{.5}%
- \pgfmathtan@{\pgfmathresult}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@x\outersep\relax%
- \pgf@x\pgfmathresult\pgf@x%
- \pgf@y-\outersep\relax%
- }%
- %
- % Now calculate the corners for determining anchor border
- % points, by adding the adjustment for the miter length.
- %
- \pgfextract@process\lowerleftborderpoint{%
- \pgfpointadd{\lowerleftpoint}{\lowerleftmiter}%
- }%
- \pgfextract@process\upperleftborderpoint{%
- \pgfpointadd{\upperleftpoint}{\upperleftmiter}%
- }%
- \pgfextract@process\upperrightborderpoint{%
- \pgfpointadd{\upperrightpoint}{\upperrightmiter}%
- }%
- \pgfextract@process\lowerrightborderpoint{%
- \pgfpointadd{\lowerrightpoint}{\lowerrightmiter}%
- }%
- %
- % Calulate the angle from the centerpoint to each corner.
- % Rotation is not important here (see \anchorborder code).
- %
- \pgfmathanglebetweenpoints{\centerpoint}{\lowerleftborderpoint}%
- \let\angletolowerleft\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\upperleftborderpoint}%
- \let\angletoupperleft\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\upperrightborderpoint}%
- \let\angletoupperright\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\lowerrightborderpoint}%
- \let\angletolowerright\pgfmathresult%
- %
- % Do the same for the *inversely rotated* base point...
- %
- \pgfextract@process\rotatedbasepoint{%
- \pgfmathrotatepointaround{\basepoint}{\centerpoint}{-\rotate}%
- }%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\lowerleftborderpoint}%
- \let\baseangletolowerleft\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\upperleftborderpoint}%
- \let\baseangletoupperleft\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\upperrightborderpoint}%
- \let\baseangletoupperright\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\lowerrightborderpoint}%
- \let\baseangletolowerright\pgfmathresult%
- %
- % And the *inversely rotated* mid point...
- %
- \pgfextract@process\rotatedmidpoint{%
- \pgfmathrotatepointaround{\midpoint}{\centerpoint}{-\rotate}%
- }%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\lowerleftborderpoint}%
- \let\midangletolowerleft\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\upperleftborderpoint}%
- \let\midangletoupperleft\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\upperrightborderpoint}%
- \let\midangletoupperright\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\lowerrightborderpoint}%
- \let\midangletolowerright\pgfmathresult%
- %
- % Now rotate the border points around the centerpoint...
- %
- \pgfextract@process\lowerleftborderpoint{%
- \pgfmathrotatepointaround%
- {\lowerleftborderpoint}%
- {\centerpoint}%
- {\rotate}%
- }%
- \pgfextract@process\upperleftborderpoint{%
- \pgfmathrotatepointaround%
- {\upperleftborderpoint}%
- {\centerpoint}%
- {\rotate}%
- }%
- \pgfextract@process\upperrightborderpoint{%
- \pgfmathrotatepointaround%
- {\upperrightborderpoint}%
- {\centerpoint}%
- {\rotate}%
- }%
- \pgfextract@process\lowerrightborderpoint{%
- \pgfmathrotatepointaround%
- {\lowerrightborderpoint}%
- {\centerpoint}%
- {\rotate}%
- }%
- %
- % ...and the points for drawing the border (i.e. no outer sep).
- %
- \pgfextract@process\lowerleftpoint{%
- \pgfmathrotatepointaround{\lowerleftpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\upperleftpoint{%
- \pgfmathrotatepointaround{\upperleftpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\upperrightpoint{%
- \pgfmathrotatepointaround{\upperrightpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\lowerrightpoint{%
- \pgfmathrotatepointaround{\lowerrightpoint}{\centerpoint}{\rotate}%
- }%
- %
- % And finally, save all the relevant stuff.
- %
- \addtosavedmacro{\lowerleftpoint}%
- \addtosavedmacro{\upperleftpoint}%
- \addtosavedmacro{\upperrightpoint}%
- \addtosavedmacro{\lowerrightpoint}%
- %
- \addtosavedmacro{\lowerleftborderpoint}%
- \addtosavedmacro{\upperleftborderpoint}%
- \addtosavedmacro{\upperrightborderpoint}%
- \addtosavedmacro{\lowerrightborderpoint}%
- %
- \addtosavedmacro{\angletolowerleft}%
- \addtosavedmacro{\angletoupperleft}%
- \addtosavedmacro{\angletoupperright}%
- \addtosavedmacro{\angletolowerright}%
- %
- \addtosavedmacro{\baseangletolowerleft}%
- \addtosavedmacro{\baseangletoupperleft}%
- \addtosavedmacro{\baseangletoupperright}%
- \addtosavedmacro{\baseangletolowerright}%
- %
- \addtosavedmacro{\midangletolowerleft}%
- \addtosavedmacro{\midangletoupperleft}%
- \addtosavedmacro{\midangletoupperright}%
- \addtosavedmacro{\midangletolowerright}%
- %
- \addtosavedmacro{\rotate}%
- \addtosavedmacro{\externalradius}%
- }
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt\relax%
- }%
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- \anchor{center}{\centerpoint}%
- \anchor{base}{\basepoint}%
- \anchor{base east}{%
- \installtrapeziumparameters%
- \let\pgf@trapeziumanchorborderreferencepoint\basepoint%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{base west}{%
- \installtrapeziumparameters%
- \let\pgf@trapeziumanchorborderreferencepoint\basepoint%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }%
- \anchor{mid}{\midpoint}%
- \anchor{mid east}{%
- \installtrapeziumparameters%
- \let\pgf@trapeziumanchorborderreferencepoint\midpoint%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{mid west}{%
- \installtrapeziumparameters%
- \let\pgf@trapeziumanchorborderreferencepoint\midpoint%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }%
- \anchor{north}{%
- \installtrapeziumparameters%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{0pt}{\externalradius}}%
- }
- \anchor{south}{%
- \installtrapeziumparameters%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{0pt}{-\externalradius}}%
- }
- \anchor{east}{%
- \installtrapeziumparameters%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{west}{%
- \installtrapeziumparameters%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
- \anchor{north east}{%
- \installtrapeziumparameters%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{\externalradius}{\externalradius}}%
- }
- \anchor{south west}{%
- \installtrapeziumparameters%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{-\externalradius}{-\externalradius}}%
- }
- \anchor{south east}{%
- \installtrapeziumparameters%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{\externalradius}{-\externalradius}}%
- }
- \anchor{north west}{%
- \installtrapeziumparameters%
- \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{-\externalradius}{\externalradius}}%
- }
- \anchor{bottom left corner}{%
- \installtrapeziumparameters%
- \lowerleftborderpoint%
- }%
- \anchor{top left corner}{%
- \installtrapeziumparameters%
- \upperleftborderpoint%
- }%
- \anchor{top right corner}{%
- \installtrapeziumparameters%
- \upperrightborderpoint%
- }%
- \anchor{bottom right corner}{%
- \installtrapeziumparameters%
- \lowerrightborderpoint%
- }%
- \anchor{left side}{%
- \installtrapeziumparameters%
- \pgfpointlineattime{0.5}{\lowerleftborderpoint}{\upperleftborderpoint}%
- }%
- \anchor{right side}{%
- \installtrapeziumparameters%
- \pgfpointlineattime{0.5}{\lowerrightborderpoint}{\upperrightborderpoint}%
- }%
- \anchor{top side}{%
- \installtrapeziumparameters%
- \pgfpointlineattime{0.5}{\upperleftborderpoint}{\upperrightborderpoint}%
- }%
- \anchor{bottom side}{%
- \installtrapeziumparameters%
- \pgfpointlineattime{0.5}{\lowerleftborderpoint}{\lowerrightborderpoint}%
- }%
- \backgroundpath{%
- \installtrapeziumparameters%
- \pgfpathmoveto{\lowerleftpoint}%
- \pgfpathlineto{\upperleftpoint}%
- \pgfpathlineto{\upperrightpoint}%
- \pgfpathlineto{\lowerrightpoint}%
- \pgfpathclose%
- }
- \anchorborder{%
- %
- % Save x and y.
- %
- \edef\externalx{\the\pgf@x}%
- \edef\externaly{\the\pgf@y}%
- %
- % This allows anchors base east, base west, mid east and mid west,
- % to redefine the `center' of the node to correctly calculate the
- % border points.
- %
- \pgfutil@ifundefined{pgf@trapeziumanchorborderreferencepoint}%
- {\let\referencepoint\centerpoint}%
- {\let\referencepoint\pgf@trapeziumanchorborderreferencepoint}%
- %
- % Adjust the location of the external
- % point relative to the reference point.
- %
- \referencepoint%
- \pgf@xa\externalx\relax%
- \pgf@ya\externaly\relax%
- \advance\pgf@xa\pgf@x%
- \advance\pgf@ya\pgf@y%
- \edef\externalx{\the\pgf@xa}%
- \edef\externaly{\the\pgf@ya}%
- %
- % Install the required points and angles.
- %
- \installtrapeziumparameters%
- %
- % Get the angle of the external point to the \referencepoint.
- %
- \pgfmathanglebetweenpoints{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
- %
- % *Subtract* the rotation from the external angle. This is
- % why the border point angles do not neeed to be rotated.
- %
- \pgfmathsubtract@{\pgfmathresult}{\rotate}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- %
- % Get the relevant angles for the reference point.
- %
- \let\externalangle\pgfmathresult%
- \ifx\referencepoint\basepoint%
- \let\angletoupperright\baseangletoupperright%
- \let\angletoupperleft\baseangletoupperleft%
- \let\angletolowerright\baseangletolowerright%
- \let\angletolowerleft\baseangletolowerleft%
- \else%
- \ifx\referencepoint\midpoint%
- \let\angletoupperright\midangletoupperright%
- \let\angletoupperleft\midangletoupperleft%
- \let\angletolowerright\midangletolowerright%
- \let\angletolowerleft\midangletolowerleft%
- \fi\fi%
- %
- % Find the line on the border...
- %
- \ifdim\externalangle pt<\angletoupperright pt\relax%
- \let\firstpoint\upperrightborderpoint%
- \let\secondpoint\lowerrightborderpoint%
- \else%
- \ifdim\externalangle pt<\angletoupperleft pt\relax%
- \let\firstpoint\upperleftborderpoint%
- \let\secondpoint\upperrightborderpoint%
- \else%
- \ifdim\externalangle pt<\angletolowerleft pt\relax%
- \let\firstpoint\upperleftborderpoint%
- \let\secondpoint\lowerleftborderpoint%
- \else%
- \ifdim\externalangle pt<\angletolowerright pt\relax%
- \let\firstpoint\lowerleftborderpoint%
- \let\secondpoint\lowerrightborderpoint%
- \else%
- \let\firstpoint\upperrightborderpoint%
- \let\secondpoint\lowerrightborderpoint%
- \fi%
- \fi%
- \fi%
- \fi%
- %
- % ...and thus the point on the border.
- %
- \pgfpointintersectionoflines{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
- {\firstpoint}{\secondpoint}%
- }%
-}
+\pgfdeclareshape{trapezium}{%
+ \savedmacro\installtrapeziumparameters{%
+ %
+ % Get the node dimensions.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ \ifpgfshapeborderusesincircle%
+ %
+ % Get the rotation (no rounding).
+ %
+ \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ %
+ % Use the radius of the incircle if required...
+ %
+ \ifdim\pgf@x<\pgf@y%
+ \pgf@x\pgf@y%
+ \fi%
+ \pgf@x1.41421\pgf@x%
+ \pgf@y\pgf@x%
+ \else%
+ %
+ % Get the rotation (with rounding).
+ %
+ \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
+ \afterassignment\pgfmath@gobbletilpgfmath@%
+ \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
+ \advance\c@pgf@counta45\relax%
+ \divide\c@pgf@counta90\relax%
+ \multiply\c@pgf@counta90\relax%
+ \ifnum\c@pgf@counta<0\relax%
+ \advance\c@pgf@counta360\relax%
+ \fi%
+ \edef\rotate{\the\c@pgf@counta}%
+ %
+ % Calculate the width and height of the node
+ % contents, according to any border rotation.
+ %
+ \ifnum\c@pgf@counta=90\relax%
+ \pgf@xc\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xc%
+ \else%
+ \ifnum\c@pgf@counta=270\relax%
+ \pgf@xc\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xc%
+ \fi%
+ \fi%
+ \fi%
+ \pgfmathmod{\pgfkeysvalueof{/pgf/trapezium left angle}}{360}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \let\leftangle\pgfmathresult%
+ \ifdim\leftangle pt=0pt\relax%
+ \def\pgfmathresult{0}%
+ \else%
+ \pgfmathcot@{\leftangle}%
+ \fi%
+ \pgf@xa2\pgf@y%
+ \pgf@xa\pgfmathresult\pgf@xa%
+ \pgfmathmod{\pgfkeysvalueof{/pgf/trapezium right angle}}{360}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \let\rightangle\pgfmathresult%
+ \ifdim\rightangle pt=0pt\relax%
+ \def\pgfmathresult{0}%
+ \else%
+ \pgfmathcot@{\rightangle}%
+ \fi%
+ \pgf@xb2\pgf@y%
+ \pgf@xb\pgfmathresult\pgf@xb%
+ %
+ % Take into account minimum height and width.
+ %
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@y<.5\pgf@ya%
+ \ifpgf@lib@sh@trapeziumstretches%
+ \pgf@y.5\pgf@ya%
+ \else%
+ \ifpgf@lib@sh@trapeziumstretchesbody%
+ \pgf@y.5\pgf@ya%
+ \else%
+ \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@y}}%
+ \pgf@yb.5\pgf@ya%
+ \pgf@yb\pgfmathresult\pgf@yb%
+ \pgf@y.5\pgf@ya%
+ \pgf@x\pgfmath@tonumber{\pgf@yb}\pgf@x%
+ \pgf@xa\pgfmath@tonumber{\pgf@yb}\pgf@xa%
+ \pgf@xb\pgfmath@tonumber{\pgf@yb}\pgf@xb%
+ \fi%
+ \fi%
+ \fi%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgf@xc2\pgf@x%
+ \ifdim\pgf@xa<0pt\relax%
+ \advance\pgf@xc-\pgf@xa%
+ \else%
+ \advance\pgf@xc\pgf@xa%
+ \fi%
+ \ifdim\pgf@xb<0pt\relax%
+ \advance\pgf@xc-\pgf@xb%
+ \else%
+ \advance\pgf@xc\pgf@xb%
+ \fi%
+ \ifdim\pgf@xc<\pgf@ya%
+ \ifpgf@lib@sh@trapeziumstretchesbody%
+ \pgf@xc-\pgf@xc%
+ \advance\pgf@xc\pgf@ya%
+ \advance\pgf@x.5\pgf@xc%
+ \else%
+ \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@xc}}%
+ \pgf@ya\pgfmathresult\pgf@ya%
+ \pgf@x\pgfmath@tonumber{\pgf@ya}\pgf@x%
+ \pgf@xa\pgfmath@tonumber{\pgf@ya}\pgf@xa%
+ \pgf@xb\pgfmath@tonumber{\pgf@ya}\pgf@xb%
+ \ifpgf@lib@sh@trapeziumstretches%
+ \else%
+ \pgf@y\pgfmath@tonumber{\pgf@ya}\pgf@y%
+ \fi%
+ \fi%
+ \fi%
+ \edef\halfheight{\the\pgf@y}%
+ \edef\halfwidth{\the\pgf@x}%
+ \edef\leftextension{\the\pgf@xa}%
+ \edef\rightextension{\the\pgf@xb}%
+ \pgf@xc2\pgf@x%
+ %
+ % Take the larger of the outer sep.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@y>\pgf@x%
+ \pgf@x\pgf@y%
+ \fi%
+ \edef\outersep{\the\pgf@x}%
+ %
+ % The \externalradius is a length that is
+ % guarenteed to produce a point outside the trapezium.
+ %
+ \advance\pgf@xc2.0\pgf@x%
+ \pgf@yc\halfheight\relax%
+ \multiply\pgf@yc2\relax%
+ \advance\pgf@yc2.0\pgf@x%
+ \ifdim\pgf@xc<\pgf@yc%
+ \edef\externalradius{\the\pgf@yc}%
+ \else%
+ \edef\externalradius{\the\pgf@xc}%
+ \fi%
+ %
+ % Calculate the centre base and mid poins of the node.
+ %
+ \pgfextract@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \pgfextract@process\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }%
+ \pgfextract@process\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ %
+ % Calculate each point on the trapezium (without rotation).
+ %
+ \pgfextract@process\lowerleftpoint{%
+ \centerpoint%
+ \advance\pgf@x-\halfwidth\relax%
+ \ifdim\leftextension>0pt\relax%
+ \advance\pgf@x-\leftextension\relax%
+ \fi%
+ \advance\pgf@y-\halfheight\relax%
+ }%
+ \pgfextract@process\upperleftpoint{%
+ \centerpoint%
+ \advance\pgf@x-\halfwidth\relax%
+ \ifdim\leftextension<0pt\relax%
+ \advance\pgf@x\leftextension\relax%
+ \fi%
+ \advance\pgf@y\halfheight\relax%
+ }%
+ \pgfextract@process\upperrightpoint{%
+ \centerpoint%
+ \advance\pgf@x\halfwidth\relax%
+ \ifdim\rightextension<0pt\relax%
+ \advance\pgf@x-\rightextension\relax%
+ \fi%
+ \advance\pgf@y\halfheight\relax%
+ }%
+ \pgfextract@process\lowerrightpoint{%
+ \centerpoint%
+ \advance\pgf@x\halfwidth\relax%
+ \ifdim\rightextension>0pt\relax%
+ \advance\pgf@x\rightextension\relax%
+ \fi%
+ \advance\pgf@y-\halfheight\relax%
+ }%
+ %
+ % Now calculate the adjustment for the miter length at each corner
+ % of the trapezium. This ensures more accurate anchor positioning
+ % when the line width is particularly thick.
+ %
+ \pgfextract@process\lowerleftmiter{%
+ \pgfmathanglebetweenlines{\lowerleftpoint}{\lowerrightpoint}{\lowerleftpoint}{\upperleftpoint}%
+ \pgfmathmultiply@{\pgfmathresult}{.5}%
+ \pgfmathtan@{\pgfmathresult}%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \pgf@x-\outersep\relax%
+ \pgf@x\pgfmathresult\pgf@x%
+ \pgf@y-\outersep\relax%
+ }%
+ \pgfextract@process\upperleftmiter{%
+ \pgfmathanglebetweenlines{\upperleftpoint}{\lowerleftpoint}{\upperleftpoint}{\upperrightpoint}%
+ \pgfmathmultiply@{\pgfmathresult}{.5}%
+ \pgfmathtan@{\pgfmathresult}%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \pgf@x-\outersep\relax%
+ \pgf@x\pgfmathresult\pgf@x%
+ \pgf@y\outersep\relax%
+ }%
+ \pgfextract@process\upperrightmiter{%
+ \pgfmathanglebetweenlines{\upperrightpoint}{\upperleftpoint}{\upperrightpoint}{\lowerrightpoint}%
+ \pgfmathmultiply@{\pgfmathresult}{.5}%
+ \pgfmathtan@{\pgfmathresult}%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \pgf@x\outersep\relax%
+ \pgf@x\pgfmathresult\pgf@x%
+ \pgf@y\outersep\relax%
+ }%
+ \pgfextract@process\lowerrightmiter{%
+ \pgfmathanglebetweenlines{\lowerrightpoint}{\upperrightpoint}{\lowerrightpoint}{\lowerleftpoint}%
+ \pgfmathmultiply@{\pgfmathresult}{.5}%
+ \pgfmathtan@{\pgfmathresult}%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \pgf@x\outersep\relax%
+ \pgf@x\pgfmathresult\pgf@x%
+ \pgf@y-\outersep\relax%
+ }%
+ %
+ % Now calculate the corners for determining anchor border
+ % points, by adding the adjustment for the miter length.
+ %
+ \pgfextract@process\lowerleftborderpoint{%
+ \pgfpointadd{\lowerleftpoint}{\lowerleftmiter}%
+ }%
+ \pgfextract@process\upperleftborderpoint{%
+ \pgfpointadd{\upperleftpoint}{\upperleftmiter}%
+ }%
+ \pgfextract@process\upperrightborderpoint{%
+ \pgfpointadd{\upperrightpoint}{\upperrightmiter}%
+ }%
+ \pgfextract@process\lowerrightborderpoint{%
+ \pgfpointadd{\lowerrightpoint}{\lowerrightmiter}%
+ }%
+ %
+ % Calculate the angle from the centerpoint to each corner.
+ % Rotation is not important here (see \anchorborder code).
+ %
+ \pgfmathanglebetweenpoints{\centerpoint}{\lowerleftborderpoint}%
+ \let\angletolowerleft\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\upperleftborderpoint}%
+ \let\angletoupperleft\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\upperrightborderpoint}%
+ \let\angletoupperright\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\lowerrightborderpoint}%
+ \let\angletolowerright\pgfmathresult%
+ %
+ % Do the same for the *inversely rotated* base point...
+ %
+ \pgfextract@process\rotatedbasepoint{%
+ \pgfmathrotatepointaround{\basepoint}{\centerpoint}{-\rotate}%
+ }%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\lowerleftborderpoint}%
+ \let\baseangletolowerleft\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\upperleftborderpoint}%
+ \let\baseangletoupperleft\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\upperrightborderpoint}%
+ \let\baseangletoupperright\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\lowerrightborderpoint}%
+ \let\baseangletolowerright\pgfmathresult%
+ %
+ % And the *inversely rotated* mid point...
+ %
+ \pgfextract@process\rotatedmidpoint{%
+ \pgfmathrotatepointaround{\midpoint}{\centerpoint}{-\rotate}%
+ }%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\lowerleftborderpoint}%
+ \let\midangletolowerleft\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\upperleftborderpoint}%
+ \let\midangletoupperleft\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\upperrightborderpoint}%
+ \let\midangletoupperright\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\lowerrightborderpoint}%
+ \let\midangletolowerright\pgfmathresult%
+ %
+ % Now rotate the border points around the centerpoint...
+ %
+ \pgfextract@process\lowerleftborderpoint{%
+ \pgfmathrotatepointaround%
+ {\lowerleftborderpoint}%
+ {\centerpoint}%
+ {\rotate}%
+ }%
+ \pgfextract@process\upperleftborderpoint{%
+ \pgfmathrotatepointaround%
+ {\upperleftborderpoint}%
+ {\centerpoint}%
+ {\rotate}%
+ }%
+ \pgfextract@process\upperrightborderpoint{%
+ \pgfmathrotatepointaround%
+ {\upperrightborderpoint}%
+ {\centerpoint}%
+ {\rotate}%
+ }%
+ \pgfextract@process\lowerrightborderpoint{%
+ \pgfmathrotatepointaround%
+ {\lowerrightborderpoint}%
+ {\centerpoint}%
+ {\rotate}%
+ }%
+ %
+ % ...and the points for drawing the border (i.e. no outer sep).
+ %
+ \pgfextract@process\lowerleftpoint{%
+ \pgfmathrotatepointaround{\lowerleftpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\upperleftpoint{%
+ \pgfmathrotatepointaround{\upperleftpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\upperrightpoint{%
+ \pgfmathrotatepointaround{\upperrightpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\lowerrightpoint{%
+ \pgfmathrotatepointaround{\lowerrightpoint}{\centerpoint}{\rotate}%
+ }%
+ %
+ % And finally, save all the relevant stuff.
+ %
+ \addtosavedmacro{\lowerleftpoint}%
+ \addtosavedmacro{\upperleftpoint}%
+ \addtosavedmacro{\upperrightpoint}%
+ \addtosavedmacro{\lowerrightpoint}%
+ %
+ \addtosavedmacro{\lowerleftborderpoint}%
+ \addtosavedmacro{\upperleftborderpoint}%
+ \addtosavedmacro{\upperrightborderpoint}%
+ \addtosavedmacro{\lowerrightborderpoint}%
+ %
+ \addtosavedmacro{\angletolowerleft}%
+ \addtosavedmacro{\angletoupperleft}%
+ \addtosavedmacro{\angletoupperright}%
+ \addtosavedmacro{\angletolowerright}%
+ %
+ \addtosavedmacro{\baseangletolowerleft}%
+ \addtosavedmacro{\baseangletoupperleft}%
+ \addtosavedmacro{\baseangletoupperright}%
+ \addtosavedmacro{\baseangletolowerright}%
+ %
+ \addtosavedmacro{\midangletolowerleft}%
+ \addtosavedmacro{\midangletoupperleft}%
+ \addtosavedmacro{\midangletoupperright}%
+ \addtosavedmacro{\midangletolowerright}%
+ %
+ \addtosavedmacro{\rotate}%
+ \addtosavedmacro{\externalradius}%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \installtrapeziumparameters%
+ \let\pgf@trapeziumanchorborderreferencepoint\basepoint%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{base west}{%
+ \installtrapeziumparameters%
+ \let\pgf@trapeziumanchorborderreferencepoint\basepoint%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \installtrapeziumparameters%
+ \let\pgf@trapeziumanchorborderreferencepoint\midpoint%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{mid west}{%
+ \installtrapeziumparameters%
+ \let\pgf@trapeziumanchorborderreferencepoint\midpoint%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{north}{%
+ \installtrapeziumparameters%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{0pt}{\externalradius}}%
+ }%
+ \anchor{south}{%
+ \installtrapeziumparameters%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{0pt}{-\externalradius}}%
+ }%
+ \anchor{east}{%
+ \installtrapeziumparameters%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{west}{%
+ \installtrapeziumparameters%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{north east}{%
+ \installtrapeziumparameters%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{\externalradius}{\externalradius}}%
+ }%
+ \anchor{south west}{%
+ \installtrapeziumparameters%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{-\externalradius}{-\externalradius}}%
+ }%
+ \anchor{south east}{%
+ \installtrapeziumparameters%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{\externalradius}{-\externalradius}}%
+ }%
+ \anchor{north west}{%
+ \installtrapeziumparameters%
+ \csname pgf@anchor@trapezium@border\endcsname{\pgfqpoint{-\externalradius}{\externalradius}}%
+ }%
+ \anchor{bottom left corner}{%
+ \installtrapeziumparameters%
+ \lowerleftborderpoint%
+ }%
+ \anchor{top left corner}{%
+ \installtrapeziumparameters%
+ \upperleftborderpoint%
+ }%
+ \anchor{top right corner}{%
+ \installtrapeziumparameters%
+ \upperrightborderpoint%
+ }%
+ \anchor{bottom right corner}{%
+ \installtrapeziumparameters%
+ \lowerrightborderpoint%
+ }%
+ \anchor{left side}{%
+ \installtrapeziumparameters%
+ \pgfpointlineattime{0.5}{\lowerleftborderpoint}{\upperleftborderpoint}%
+ }%
+ \anchor{right side}{%
+ \installtrapeziumparameters%
+ \pgfpointlineattime{0.5}{\lowerrightborderpoint}{\upperrightborderpoint}%
+ }%
+ \anchor{top side}{%
+ \installtrapeziumparameters%
+ \pgfpointlineattime{0.5}{\upperleftborderpoint}{\upperrightborderpoint}%
+ }%
+ \anchor{bottom side}{%
+ \installtrapeziumparameters%
+ \pgfpointlineattime{0.5}{\lowerleftborderpoint}{\lowerrightborderpoint}%
+ }%
+ \backgroundpath{%
+ \installtrapeziumparameters%
+ \pgfpathmoveto{\lowerleftpoint}%
+ \pgfpathlineto{\upperleftpoint}%
+ \pgfpathlineto{\upperrightpoint}%
+ \pgfpathlineto{\lowerrightpoint}%
+ \pgfpathclose%
+ }%
+ \anchorborder{%
+ %
+ % Save x and y.
+ %
+ \edef\externalx{\the\pgf@x}%
+ \edef\externaly{\the\pgf@y}%
+ %
+ % This allows anchors base east, base west, mid east and mid west,
+ % to redefine the `center' of the node to correctly calculate the
+ % border points.
+ %
+ \pgfutil@ifundefined{pgf@trapeziumanchorborderreferencepoint}%
+ {\let\referencepoint\centerpoint}%
+ {\let\referencepoint\pgf@trapeziumanchorborderreferencepoint}%
+ %
+ % Adjust the location of the external
+ % point relative to the reference point.
+ %
+ \referencepoint%
+ \pgf@xa\externalx\relax%
+ \pgf@ya\externaly\relax%
+ \advance\pgf@xa\pgf@x%
+ \advance\pgf@ya\pgf@y%
+ \edef\externalx{\the\pgf@xa}%
+ \edef\externaly{\the\pgf@ya}%
+ %
+ % Install the required points and angles.
+ %
+ \installtrapeziumparameters%
+ %
+ % Get the angle of the external point to the \referencepoint.
+ %
+ \pgfmathanglebetweenpoints{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
+ %
+ % *Subtract* the rotation from the external angle. This is
+ % why the border point angles do not neeed to be rotated.
+ %
+ \pgfmathsubtract@{\pgfmathresult}{\rotate}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ %
+ % Get the relevant angles for the reference point.
+ %
+ \let\externalangle\pgfmathresult%
+ \ifx\referencepoint\basepoint%
+ \let\angletoupperright\baseangletoupperright%
+ \let\angletoupperleft\baseangletoupperleft%
+ \let\angletolowerright\baseangletolowerright%
+ \let\angletolowerleft\baseangletolowerleft%
+ \else%
+ \ifx\referencepoint\midpoint%
+ \let\angletoupperright\midangletoupperright%
+ \let\angletoupperleft\midangletoupperleft%
+ \let\angletolowerright\midangletolowerright%
+ \let\angletolowerleft\midangletolowerleft%
+ \fi\fi%
+ %
+ % Find the line on the border...
+ %
+ \ifdim\externalangle pt<\angletoupperright pt\relax%
+ \let\firstpoint\upperrightborderpoint%
+ \let\secondpoint\lowerrightborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletoupperleft pt\relax%
+ \let\firstpoint\upperleftborderpoint%
+ \let\secondpoint\upperrightborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletolowerleft pt\relax%
+ \let\firstpoint\upperleftborderpoint%
+ \let\secondpoint\lowerleftborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletolowerright pt\relax%
+ \let\firstpoint\lowerleftborderpoint%
+ \let\secondpoint\lowerrightborderpoint%
+ \else%
+ \let\firstpoint\upperrightborderpoint%
+ \let\secondpoint\lowerrightborderpoint%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ %
+ % ...and thus the point on the border.
+ %
+ \pgfpointintersectionoflines{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
+ {\firstpoint}{\secondpoint}%
+ }%
+}%
% Shape semicircle.
%
-\pgfdeclareshape{semicircle}{
- \savedmacro\installsemicircleparameters{%
- %
- % Get the larger of the outer sep.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgf@x<\pgf@y%
- \pgf@x\pgf@y%
- \fi%
- \edef\outersep{\the\pgf@x}%
- %
- % Get the node dimensions.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x+.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y+.5\ht\pgfnodeparttextbox%
- \advance\pgf@y+.5\dp\pgfnodeparttextbox%
- %
- % Use the radius of the incircle if required...
- %
- \ifpgfshapeborderusesincircle%
- %
- % Get the rotation (no rounding).
- %
- \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
- \ifdim\pgf@x<\pgf@y%
- \pgf@x\pgf@y%
- \fi%
- \pgf@x1.41421\pgf@x%
- \edef\halfheight{\the\pgf@x}%
- \advance\pgf@x\pgf@x%
- \else%
- %
- % Get the rotation (with rounding).
- %
- \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
- \advance\c@pgf@counta45\relax%
- \divide\c@pgf@counta90\relax%
- \multiply\c@pgf@counta90\relax%
- \ifnum\c@pgf@counta<0\relax%
- \advance\c@pgf@counta360\relax%
- \fi%
- \edef\rotate{\the\c@pgf@counta}%
- %
- % Calculate the width and height of the node
- % contents, according to any border rotation.
- %
- \ifnum\c@pgf@counta=90\relax%
- \pgf@xc\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xc%
- \else%
- \ifnum\c@pgf@counta=270\relax%
- \pgf@xc\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xc%
- \fi%
- \fi%
- \advance\pgf@y\pgf@y%
- \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
- \pgf@x\pgfmathresult pt\relax%
- \pgf@y.5\pgf@y%
- \edef\halfheight{\the\pgf@y}%
- \fi%
- \edef\defaultradius{\the\pgf@x}%
- %
- % Take into account minimum height and width.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
- \ifdim\pgf@x<.5\pgf@xa%
- \pgf@x.5\pgf@xa%
- \fi%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@x<\pgf@ya%
- \pgf@x\pgf@ya%
- \fi%
- \edef\semicircleradius{\the\pgf@x}%
- %
- % Find the center/base/mid of the semi circle node.
- %
- \pgfextract@process\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y+-.5\dp\pgfnodeparttextbox%
- }%
- \pgfextract@process\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt\relax%
- }%
- \pgfextract@process\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- \pgfextract@process\semicirclecenterpoint{%
- \centerpoint%
- \pgf@ya\semicircleradius\relax%
- \advance\pgf@ya-\defaultradius\relax%
- %
- % The point is adjusted to make the node contents
- % appear more centered if the node is enlarged to
- % some minimum size. The factor .4 just seems OK.
- %
- \pgf@ya.4\pgf@ya%
- \advance\pgf@y-\pgf@ya%
- \pgf@ya\halfheight\relax%
- \advance\pgf@y-\pgf@ya%
- }%
- %
- % Add the outer sep to the radius here.
- %
- \pgf@x\semicircleradius\relax%
- \advance\pgf@x\outersep\relax%
- \edef\semicircleradius{\the\pgf@x}%
- \pgfpointdiff{\centerpoint}{\semicirclecenterpoint}%
- \ifdim\pgf@y<0pt\pgf@y-\pgf@y\fi%
- \edef\centerpointdiff{\the\pgf@y}%
- %
- % Calculate the start and end points on the border.
- %
- \pgfextract@process\arcstartborder{%
- \semicirclecenterpoint%
- \advance\pgf@x\semicircleradius\relax%
- }%
- \pgfextract@process\arcendborder{%
- \semicirclecenterpoint%
- \advance\pgf@x-\semicircleradius\relax%
- }%
- %
- % Calculate the start and end *corner* points on the border.
- % This is needed to accommodate the outer sep.
- %
- \pgfextract@process\arcstartcorner{%
- \arcstartborder%
- \advance\pgf@y-\outersep\relax%
- }%
- \pgfextract@process\arcendcorner{%
- \arcendborder%
- \advance\pgf@y-\outersep\relax%
- }
- %
- % Now calculate all the relevant angles.
- %
- % For the center point.
- %
- \pgfmathanglebetweenpoints{\centerpoint}{\arcstartborder}%
- \let\angletoarcstartborder\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\arcendborder}%
- \let\angletoarcendborder\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\arcstartcorner}%
- \let\angletoarcstartcorner\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\arcendcorner}%
- \let\angletoarcendcorner\pgfmathresult%
- %
- % For the basepoint (rotated about the center point).
- %
- \pgfextract@process\rotatedbasepoint{%
- \pgfmathrotatepointaround{\basepoint}{\centerpoint}{-\rotate}%
- }%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\arcstartborder}%
- \let\baseangletoarcstartborder\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\arcendborder}%
- \let\baseangletoarcendborder\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\arcstartcorner}%
- \let\baseangletoarcstartcorner\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\arcendcorner}%
- \let\baseangletoarcendcorner\pgfmathresult%
- %
- % For the midpoint (rotated about the center point).
- %
- \pgfextract@process\rotatedmidpoint{%
- \pgfmathrotatepointaround{\midpoint}{\centerpoint}{-\rotate}%
- }%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\arcstartborder}%
- \let\midangletoarcstartborder\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\arcendborder}%
- \let\midangletoarcendborder\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\arcstartcorner}%
- \let\midangletoarcstartcorner\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\arcendcorner}%
- \let\midangletoarcendcorner\pgfmathresult%
- %
- % Now, rotate the semicircle points around the centerpoint.
- %
- \pgfextract@process\semicirclecenterpoint{%
- \pgfmathrotatepointaround{\semicirclecenterpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\arcstartborder{%
- \pgfmathrotatepointaround{\arcstartborder}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\arcendborder{%
- \pgfmathrotatepointaround{\arcendborder}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\arcstartcorner{%
- \pgfmathrotatepointaround{\arcstartcorner}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\arcendcorner{%
- \pgfmathrotatepointaround{\arcendcorner}{\centerpoint}{\rotate}%
- }%
- %
- % Calculate the distance between the base point and the (rotated) semicircle center.
- %
- \pgfpointdiff{\basepoint}{\semicirclecenterpoint}%
- \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
- \edef\basesemicirclecenterdiff{\pgfmathresult pt}%
- %
- % Calculate the distance between the base point and the (rotated) semicircle center.
- %
- \pgfpointdiff{\midpoint}{\semicirclecenterpoint}%
- \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
- \edef\midsemicirclecenterdiff{\pgfmathresult pt}%
- %
- % And save all the stuff.
- %
- \addtosavedmacro{\rotate}%
- \addtosavedmacro{\outersep}%
- \addtosavedmacro{\semicircleradius}%
- %
- \addtosavedmacro{\arcstartborder}%
- \addtosavedmacro{\arcendborder}%
- \addtosavedmacro{\arcstartcorner}%
- \addtosavedmacro{\arcendcorner}%
- \addtosavedmacro{\semicirclecenterpoint}%
- %
- \addtosavedmacro{\angletoarcstartborder}%
- \addtosavedmacro{\angletoarcendborder}%
- \addtosavedmacro{\angletoarcstartcorner}%
- \addtosavedmacro{\angletoarcendcorner}%
- %
- \addtosavedmacro{\centerpointdiff}%
- \addtosavedmacro{\basesemicirclecenterdiff}%
- \addtosavedmacro{\midsemicirclecenterdiff}%
- %
- \addtosavedmacro{\baseangletoarcstartborder}%
- \addtosavedmacro{\baseangletoarcendborder}%
- \addtosavedmacro{\baseangletoarcstartcorner}%
- \addtosavedmacro{\baseangletoarcendcorner}%
- %
- \addtosavedmacro{\midangletoarcstartborder}%
- \addtosavedmacro{\midangletoarcendborder}%
- \addtosavedmacro{\midangletoarcstartcorner}%
- \addtosavedmacro{\midangletoarcendcorner}%
- }
- \savedanchor{\centerpoint}{%
- \pgfmathsetlength\pgf@x{+.5\wd\pgfnodeparttextbox}%
- \pgfmathsetlength\pgf@y{+.5\ht\pgfnodeparttextbox}%
- \pgfmathaddtolength\pgf@y{-.5\dp\pgfnodeparttextbox}%
- }
- \savedanchor{\basepoint}{%
- \pgfmathsetlength\pgf@x{+.5\wd\pgfnodeparttextbox}%
- \pgf@y0pt\relax%
- }
- \savedanchor{\midpoint}{%
- \pgfmathsetlength\pgf@x{+.5\wd\pgfnodeparttextbox}%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }
- \anchor{center}{\centerpoint}
- \anchor{base}{\basepoint}
- \anchor{base west}{%
- \installsemicircleparameters%
- \let\pgf@semicirclereferencepoint\basepoint%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpoint{-\semicircleradius}{0pt}}%
- }
- \anchor{base east}{%
- \installsemicircleparameters%
- \let\pgf@semicirclereferencepoint\basepoint%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpoint{\semicircleradius}{0pt}}%
- }
- \anchor{mid}{\midpoint}
- \anchor{mid west}{%
- \installsemicircleparameters%
- \let\pgf@semicirclereferencepoint\midpoint%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpoint{-\semicircleradius}{0pt}}%
- }
- \anchor{mid east}{%
- \installsemicircleparameters%
- \let\pgf@semicirclereferencepoint\midpoint%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpoint{\semicircleradius}{0pt}}%
- }
- \anchor{apex}{%
- \installsemicircleparameters%
- \pgfmathadd@{\rotate}{90}%
- \let\angle\pgfmathresult%
- \pgfpointadd{\semicirclecenterpoint}{\pgfqpointpolar{\angle}{\semicircleradius}}%
- }
- \anchor{arc start}{%
- \installsemicircleparameters%
- \arcstartcorner%
- }
- \anchor{arc end}{%
- \installsemicircleparameters%
- \arcendcorner%
- }
- \anchor{chord center}{%
- \installsemicircleparameters%
- \pgfpointlineattime{0.5}{\arcstartcorner}{\arcendcorner}%
- }
- \anchor{north}{%
- \installsemicircleparameters%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{90}{\semicircleradius}}%
- }
- \anchor{south}{%
- \installsemicircleparameters%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{270}{\semicircleradius}}%
- }
- \anchor{east}{%
- \installsemicircleparameters%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{0}{\semicircleradius}}%
- }
- \anchor{west}{%
- \installsemicircleparameters%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{180}{\semicircleradius}}%
- }
- \anchor{north west}{%
- \installsemicircleparameters%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{135}{\semicircleradius}}%
- }
- \anchor{south west}{%
- \installsemicircleparameters%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{225}{\semicircleradius}}%
- }
- \anchor{north east}{%
- \installsemicircleparameters%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{45}{\semicircleradius}}%
- }
- \anchor{south east}{%
- \installsemicircleparameters%
- \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{315}{\semicircleradius}}%
- }
- \backgroundpath{%
- \installsemicircleparameters%
- \pgf@x\semicircleradius\relax%
- \advance\pgf@x-\outersep\relax%
- \edef\semicircleradius{\the\pgf@x}%
- \pgfpathmoveto{\pgfpointadd{\semicirclecenterpoint}{\pgfqpointpolar{\rotate}{\semicircleradius}}}%
- {%
- \pgftransformrotate{\rotate}%
- \pgfpatharc{0}{180}{\semicircleradius}%
- \pgfpathclose%
- }%
- }
- \anchorborder{%
- %
- % Save x and y.
- %
- \edef\externalx{\the\pgf@x}%
- \edef\externaly{\the\pgf@y}%
- %
- % Check if a reference point has been defined (i.e. \midpoint or \basepoint).
- %
- \pgfutil@ifundefined{pgf@semicirclereferencepoint}%
- {\let\referencepoint\centerpoint}%
- {\let\referencepoint\pgf@semicirclereferencepoint}%
- %
- % Adjust the location of the external point relative to the reference point.
- %
- \referencepoint%
- \pgf@xa\externalx\relax%
- \pgf@ya\externaly\relax%
- \advance\pgf@xa\pgf@x%
- \advance\pgf@ya\pgf@y%
- \edef\externalx{\the\pgf@xa}%
- \edef\externaly{\the\pgf@ya}%
- %
- % Install the required points and angles.
- %
- \installsemicircleparameters%
- %
- % Get the angle of the external point to the \referencepoint.
- %
- \pgfmathanglebetweenpoints{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
- \let\externalangle\pgfmathresult%
- %
- % *Subtract* the rotation from the external angle.
- %
- \pgfmathsubtract@{\pgfmathresult}{\rotate}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \let\angle\pgfmathresult%
- \ifx\referencepoint\basepoint%
- \let\angletoarcstartborder\baseangletoarcstartborder%
- \let\angletoarcendborder\baseangletoarcendborder%
- \let\angletoarcstartcorner\baseangletoarcstartcorner%
- \let\angletoarcendcorner\baseangletoarcendcorner%
- \let\centerpointdiff\basesemicirclecenterdiff%
- \else%
- \ifx\referencepoint\midpoint%
- \let\angletoarcstartborder\midangletoarcstartborder%
- \let\angletoarcendborder\midangletoarcendborder%
- \let\angletoarcstartcorner\midangletoarcstartcorner%
- \let\angletoarcendcorner\midangletoarcendcorner%
- \let\centerpointdiff\midsemicirclecenterdiff%
- \fi\fi%
- %
- % Determine if the line will cross the semicircle arc, or the chord.
- %
- \ifdim\angle pt>\angletoarcstartborder pt\relax%
- \let\firstpoint\pgfutil@empty%
- \let\secondpoint\pgfutil@empty%
- \else%
- \ifdim\angle pt>\angletoarcstartcorner pt\relax%
- \let\firstpoint\arcstartcorner%
- \let\secondpoint\arcstartborder%
- \else%
- \ifdim\angle pt>\angletoarcendcorner pt\relax%
- \let\firstpoint\arcendcorner%
- \let\secondpoint\arcstartcorner%
- \else%
- \ifdim\angle pt>\angletoarcendborder pt\relax%
- \let\firstpoint\arcendborder%
- \let\secondpoint\arcendcorner%
- \else%
- \let\firstpoint\pgfutil@empty%
- \let\secondpoint\pgfutil@empty%
- \fi%
- \fi%
- \fi%
- \fi%
- \ifx\firstpoint\pgfutil@empty
- %
- % Calculate the angle from the centre of the semicircle to the
- % point on the semicircle arc which intersects the line from
- % the external point to the reference point...
- %
- \pgfmathanglebetweenlines{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
- {\semicirclecenterpoint}{\referencepoint}%
- \pgfmathsin@{\pgfmathresult}%
- \let\sineangle\pgfmathresult%
- \pgf@x\semicircleradius\relax%
- \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@x}}%
- \let\reciprocalradius\pgfmathresult%
- \pgf@x\centerpointdiff\relax%
- \pgf@x\sineangle\pgf@x%
- \pgf@x\reciprocalradius\pgf@x%
- \pgfmathasin@{\pgfmath@tonumber{\pgf@x}}%
- \pgf@x\pgfmathresult pt\relax%
- \advance\pgf@x\externalangle pt\relax%
- \edef\angle{\pgfmath@tonumber{\pgf@x}}%
- %
- % ...and thus the point on the border.
- %
- \pgfpointadd{\semicirclecenterpoint}{\pgfqpointpolar{\angle}{\semicircleradius}}%
- \else%
- %
- % Calculate the the point where the semicircle chord intersects
- % the line from the external point to the reference point.
- %
- \pgfpointintersectionoflines{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
- {\firstpoint}{\secondpoint}%
- \fi%
- }
-}
+\pgfdeclareshape{semicircle}{%
+ \savedmacro\installsemicircleparameters{%
+ %
+ % Get the larger of the outer sep.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@x<\pgf@y%
+ \pgf@x\pgf@y%
+ \fi%
+ \edef\outersep{\the\pgf@x}%
+ %
+ % Get the node dimensions.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x+.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y+.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y+.5\dp\pgfnodeparttextbox%
+ %
+ % Use the radius of the incircle if required...
+ %
+ \ifpgfshapeborderusesincircle%
+ %
+ % Get the rotation (no rounding).
+ %
+ \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ \ifdim\pgf@x<\pgf@y%
+ \pgf@x\pgf@y%
+ \fi%
+ \pgf@x1.41421\pgf@x%
+ \edef\halfheight{\the\pgf@x}%
+ \advance\pgf@x\pgf@x%
+ \else%
+ %
+ % Get the rotation (with rounding).
+ %
+ \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
+ \afterassignment\pgfmath@gobbletilpgfmath@%
+ \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
+ \advance\c@pgf@counta45\relax%
+ \divide\c@pgf@counta90\relax%
+ \multiply\c@pgf@counta90\relax%
+ \ifnum\c@pgf@counta<0\relax%
+ \advance\c@pgf@counta360\relax%
+ \fi%
+ \edef\rotate{\the\c@pgf@counta}%
+ %
+ % Calculate the width and height of the node
+ % contents, according to any border rotation.
+ %
+ \ifnum\c@pgf@counta=90\relax%
+ \pgf@xc\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xc%
+ \else%
+ \ifnum\c@pgf@counta=270\relax%
+ \pgf@xc\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xc%
+ \fi%
+ \fi%
+ \advance\pgf@y\pgf@y%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \pgf@x\pgfmathresult pt\relax%
+ \pgf@y.5\pgf@y%
+ \edef\halfheight{\the\pgf@y}%
+ \fi%
+ \edef\defaultradius{\the\pgf@x}%
+ %
+ % Take into account minimum height and width.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgf@x<.5\pgf@xa%
+ \pgf@x.5\pgf@xa%
+ \fi%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@x<\pgf@ya%
+ \pgf@x\pgf@ya%
+ \fi%
+ \edef\semicircleradius{\the\pgf@x}%
+ %
+ % Find the center/base/mid of the semi circle node.
+ %
+ \pgfextract@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y+-.5\dp\pgfnodeparttextbox%
+ }%
+ \pgfextract@process\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }%
+ \pgfextract@process\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ \pgfextract@process\semicirclecenterpoint{%
+ \centerpoint%
+ \pgf@ya\semicircleradius\relax%
+ \advance\pgf@ya-\defaultradius\relax%
+ %
+ % The point is adjusted to make the node contents
+ % appear more centered if the node is enlarged to
+ % some minimum size. The factor .4 just seems OK.
+ %
+ \pgf@ya.4\pgf@ya%
+ \advance\pgf@y-\pgf@ya%
+ \pgf@ya\halfheight\relax%
+ \advance\pgf@y-\pgf@ya%
+ }%
+ %
+ % Add the outer sep to the radius here.
+ %
+ \pgf@x\semicircleradius\relax%
+ \advance\pgf@x\outersep\relax%
+ \edef\semicircleradius{\the\pgf@x}%
+ \pgfpointdiff{\centerpoint}{\semicirclecenterpoint}%
+ \ifdim\pgf@y<0pt\pgf@y-\pgf@y\fi%
+ \edef\centerpointdiff{\the\pgf@y}%
+ %
+ % Calculate the start and end points on the border.
+ %
+ \pgfextract@process\arcstartborder{%
+ \semicirclecenterpoint%
+ \advance\pgf@x\semicircleradius\relax%
+ }%
+ \pgfextract@process\arcendborder{%
+ \semicirclecenterpoint%
+ \advance\pgf@x-\semicircleradius\relax%
+ }%
+ %
+ % Calculate the start and end *corner* points on the border.
+ % This is needed to accommodate the outer sep.
+ %
+ \pgfextract@process\arcstartcorner{%
+ \arcstartborder%
+ \advance\pgf@y-\outersep\relax%
+ }%
+ \pgfextract@process\arcendcorner{%
+ \arcendborder%
+ \advance\pgf@y-\outersep\relax%
+ }
+ %
+ % Now calculate all the relevant angles.
+ %
+ % For the center point.
+ %
+ \pgfmathanglebetweenpoints{\centerpoint}{\arcstartborder}%
+ \let\angletoarcstartborder\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\arcendborder}%
+ \let\angletoarcendborder\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\arcstartcorner}%
+ \let\angletoarcstartcorner\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\arcendcorner}%
+ \let\angletoarcendcorner\pgfmathresult%
+ %
+ % For the basepoint (rotated about the center point).
+ %
+ \pgfextract@process\rotatedbasepoint{%
+ \pgfmathrotatepointaround{\basepoint}{\centerpoint}{-\rotate}%
+ }%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\arcstartborder}%
+ \let\baseangletoarcstartborder\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\arcendborder}%
+ \let\baseangletoarcendborder\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\arcstartcorner}%
+ \let\baseangletoarcstartcorner\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\arcendcorner}%
+ \let\baseangletoarcendcorner\pgfmathresult%
+ %
+ % For the midpoint (rotated about the center point).
+ %
+ \pgfextract@process\rotatedmidpoint{%
+ \pgfmathrotatepointaround{\midpoint}{\centerpoint}{-\rotate}%
+ }%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\arcstartborder}%
+ \let\midangletoarcstartborder\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\arcendborder}%
+ \let\midangletoarcendborder\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\arcstartcorner}%
+ \let\midangletoarcstartcorner\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\arcendcorner}%
+ \let\midangletoarcendcorner\pgfmathresult%
+ %
+ % Now, rotate the semicircle points around the centerpoint.
+ %
+ \pgfextract@process\semicirclecenterpoint{%
+ \pgfmathrotatepointaround{\semicirclecenterpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\arcstartborder{%
+ \pgfmathrotatepointaround{\arcstartborder}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\arcendborder{%
+ \pgfmathrotatepointaround{\arcendborder}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\arcstartcorner{%
+ \pgfmathrotatepointaround{\arcstartcorner}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\arcendcorner{%
+ \pgfmathrotatepointaround{\arcendcorner}{\centerpoint}{\rotate}%
+ }%
+ %
+ % Calculate the distance between the base point and the (rotated) semicircle center.
+ %
+ \pgfpointdiff{\basepoint}{\semicirclecenterpoint}%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \edef\basesemicirclecenterdiff{\pgfmathresult pt}%
+ %
+ % Calculate the distance between the base point and the (rotated) semicircle center.
+ %
+ \pgfpointdiff{\midpoint}{\semicirclecenterpoint}%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@x}}{\pgfmath@tonumber{\pgf@y}}%
+ \edef\midsemicirclecenterdiff{\pgfmathresult pt}%
+ %
+ % And save all the stuff.
+ %
+ \addtosavedmacro{\rotate}%
+ \addtosavedmacro{\outersep}%
+ \addtosavedmacro{\semicircleradius}%
+ %
+ \addtosavedmacro{\arcstartborder}%
+ \addtosavedmacro{\arcendborder}%
+ \addtosavedmacro{\arcstartcorner}%
+ \addtosavedmacro{\arcendcorner}%
+ \addtosavedmacro{\semicirclecenterpoint}%
+ %
+ \addtosavedmacro{\angletoarcstartborder}%
+ \addtosavedmacro{\angletoarcendborder}%
+ \addtosavedmacro{\angletoarcstartcorner}%
+ \addtosavedmacro{\angletoarcendcorner}%
+ %
+ \addtosavedmacro{\centerpointdiff}%
+ \addtosavedmacro{\basesemicirclecenterdiff}%
+ \addtosavedmacro{\midsemicirclecenterdiff}%
+ %
+ \addtosavedmacro{\baseangletoarcstartborder}%
+ \addtosavedmacro{\baseangletoarcendborder}%
+ \addtosavedmacro{\baseangletoarcstartcorner}%
+ \addtosavedmacro{\baseangletoarcendcorner}%
+ %
+ \addtosavedmacro{\midangletoarcstartborder}%
+ \addtosavedmacro{\midangletoarcendborder}%
+ \addtosavedmacro{\midangletoarcstartcorner}%
+ \addtosavedmacro{\midangletoarcendcorner}%
+ }%
+ \savedanchor{\centerpoint}{%
+ \pgfmathsetlength\pgf@x{+.5\wd\pgfnodeparttextbox}%
+ \pgfmathsetlength\pgf@y{+.5\ht\pgfnodeparttextbox}%
+ \pgfmathaddtolength\pgf@y{-.5\dp\pgfnodeparttextbox}%
+ }%
+ \savedanchor{\basepoint}{%
+ \pgfmathsetlength\pgf@x{+.5\wd\pgfnodeparttextbox}%
+ \pgf@y0pt\relax%
+ }%
+ \savedanchor{\midpoint}{%
+ \pgfmathsetlength\pgf@x{+.5\wd\pgfnodeparttextbox}%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{base}{\basepoint}%
+ \anchor{base west}{%
+ \installsemicircleparameters%
+ \let\pgf@semicirclereferencepoint\basepoint%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpoint{-\semicircleradius}{0pt}}%
+ }%
+ \anchor{base east}{%
+ \installsemicircleparameters%
+ \let\pgf@semicirclereferencepoint\basepoint%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpoint{\semicircleradius}{0pt}}%
+ }%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid west}{%
+ \installsemicircleparameters%
+ \let\pgf@semicirclereferencepoint\midpoint%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpoint{-\semicircleradius}{0pt}}%
+ }%
+ \anchor{mid east}{%
+ \installsemicircleparameters%
+ \let\pgf@semicirclereferencepoint\midpoint%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpoint{\semicircleradius}{0pt}}%
+ }%
+ \anchor{apex}{%
+ \installsemicircleparameters%
+ \pgfmathadd@{\rotate}{90}%
+ \let\angle\pgfmathresult%
+ \pgfpointadd{\semicirclecenterpoint}{\pgfqpointpolar{\angle}{\semicircleradius}}%
+ }%
+ \anchor{arc start}{%
+ \installsemicircleparameters%
+ \arcstartcorner%
+ }%
+ \anchor{arc end}{%
+ \installsemicircleparameters%
+ \arcendcorner%
+ }%
+ \anchor{chord center}{%
+ \installsemicircleparameters%
+ \pgfpointlineattime{0.5}{\arcstartcorner}{\arcendcorner}%
+ }%
+ \anchor{north}{%
+ \installsemicircleparameters%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{90}{\semicircleradius}}%
+ }%
+ \anchor{south}{%
+ \installsemicircleparameters%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{270}{\semicircleradius}}%
+ }%
+ \anchor{east}{%
+ \installsemicircleparameters%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{0}{\semicircleradius}}%
+ }%
+ \anchor{west}{%
+ \installsemicircleparameters%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{180}{\semicircleradius}}%
+ }%
+ \anchor{north west}{%
+ \installsemicircleparameters%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{135}{\semicircleradius}}%
+ }%
+ \anchor{south west}{%
+ \installsemicircleparameters%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{225}{\semicircleradius}}%
+ }%
+ \anchor{north east}{%
+ \installsemicircleparameters%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{45}{\semicircleradius}}%
+ }%
+ \anchor{south east}{%
+ \installsemicircleparameters%
+ \csname pgf@anchor@semicircle@border\endcsname{\pgfqpointpolar{315}{\semicircleradius}}%
+ }%
+ \backgroundpath{%
+ \installsemicircleparameters%
+ \pgf@x\semicircleradius\relax%
+ \advance\pgf@x-\outersep\relax%
+ \edef\semicircleradius{\the\pgf@x}%
+ \pgfpathmoveto{\pgfpointadd{\semicirclecenterpoint}{\pgfqpointpolar{\rotate}{\semicircleradius}}}%
+ {%
+ \pgftransformrotate{\rotate}%
+ \pgfpatharc{0}{180}{\semicircleradius}%
+ \pgfpathclose%
+ }%
+ }%
+ \anchorborder{%
+ %
+ % Save x and y.
+ %
+ \edef\externalx{\the\pgf@x}%
+ \edef\externaly{\the\pgf@y}%
+ %
+ % Check if a reference point has been defined (i.e. \midpoint or \basepoint).
+ %
+ \pgfutil@ifundefined{pgf@semicirclereferencepoint}%
+ {\let\referencepoint\centerpoint}%
+ {\let\referencepoint\pgf@semicirclereferencepoint}%
+ %
+ % Adjust the location of the external point relative to the reference point.
+ %
+ \referencepoint%
+ \pgf@xa\externalx\relax%
+ \pgf@ya\externaly\relax%
+ \advance\pgf@xa\pgf@x%
+ \advance\pgf@ya\pgf@y%
+ \edef\externalx{\the\pgf@xa}%
+ \edef\externaly{\the\pgf@ya}%
+ %
+ % Install the required points and angles.
+ %
+ \installsemicircleparameters%
+ %
+ % Get the angle of the external point to the \referencepoint.
+ %
+ \pgfmathanglebetweenpoints{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
+ \let\externalangle\pgfmathresult%
+ %
+ % *Subtract* the rotation from the external angle.
+ %
+ \pgfmathsubtract@{\pgfmathresult}{\rotate}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \let\angle\pgfmathresult%
+ \ifx\referencepoint\basepoint%
+ \let\angletoarcstartborder\baseangletoarcstartborder%
+ \let\angletoarcendborder\baseangletoarcendborder%
+ \let\angletoarcstartcorner\baseangletoarcstartcorner%
+ \let\angletoarcendcorner\baseangletoarcendcorner%
+ \let\centerpointdiff\basesemicirclecenterdiff%
+ \else%
+ \ifx\referencepoint\midpoint%
+ \let\angletoarcstartborder\midangletoarcstartborder%
+ \let\angletoarcendborder\midangletoarcendborder%
+ \let\angletoarcstartcorner\midangletoarcstartcorner%
+ \let\angletoarcendcorner\midangletoarcendcorner%
+ \let\centerpointdiff\midsemicirclecenterdiff%
+ \fi\fi%
+ %
+ % Determine if the line will cross the semicircle arc, or the chord.
+ %
+ \ifdim\angle pt>\angletoarcstartborder pt\relax%
+ \let\firstpoint\pgfutil@empty%
+ \let\secondpoint\pgfutil@empty%
+ \else%
+ \ifdim\angle pt>\angletoarcstartcorner pt\relax%
+ \let\firstpoint\arcstartcorner%
+ \let\secondpoint\arcstartborder%
+ \else%
+ \ifdim\angle pt>\angletoarcendcorner pt\relax%
+ \let\firstpoint\arcendcorner%
+ \let\secondpoint\arcstartcorner%
+ \else%
+ \ifdim\angle pt>\angletoarcendborder pt\relax%
+ \let\firstpoint\arcendborder%
+ \let\secondpoint\arcendcorner%
+ \else%
+ \let\firstpoint\pgfutil@empty%
+ \let\secondpoint\pgfutil@empty%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \ifx\firstpoint\pgfutil@empty
+ %
+ % Calculate the angle from the centre of the semicircle to the
+ % point on the semicircle arc which intersects the line from
+ % the external point to the reference point...
+ %
+ \pgfmathanglebetweenlines{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
+ {\semicirclecenterpoint}{\referencepoint}%
+ \pgfmathsin@{\pgfmathresult}%
+ \let\sineangle\pgfmathresult%
+ \pgf@x\semicircleradius\relax%
+ \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@x}}%
+ \let\reciprocalradius\pgfmathresult%
+ \pgf@x\centerpointdiff\relax%
+ \pgf@x\sineangle\pgf@x%
+ \pgf@x\reciprocalradius\pgf@x%
+ \pgfmathasin@{\pgfmath@tonumber{\pgf@x}}%
+ \pgf@x\pgfmathresult pt\relax%
+ \advance\pgf@x\externalangle pt\relax%
+ \edef\angle{\pgfmath@tonumber{\pgf@x}}%
+ %
+ % ...and thus the point on the border.
+ %
+ \pgfpointadd{\semicirclecenterpoint}{\pgfqpointpolar{\angle}{\semicircleradius}}%
+ \else%
+ %
+ % Calculate the the point where the semicircle chord intersects
+ % the line from the external point to the reference point.
+ %
+ \pgfpointintersectionoflines{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
+ {\firstpoint}{\secondpoint}%
+ \fi%
+ }%
+}%
% Keys for shape isosceles triangle
%
% /pgf/isosceles triangle apex angle : angle at the apex of the triangle.
\pgfkeys{/pgf/.cd,
- isosceles triangle apex angle/.initial=45,
- isosceles triangle stretches/.is if=pgf@lib@sh@isosceslestrianglestretches
-}
+ isosceles triangle apex angle/.initial=45,
+ isosceles triangle stretches/.is if=pgf@lib@sh@isosceslestrianglestretches
+}%
\newif\ifpgf@lib@sh@isosceslestrianglestretches
-\pgfdeclareshape{isosceles triangle}{
- \savedmacro\trianglepoints{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/isosceles triangle apex angle}}%
- \divide\pgf@x2\relax%
- \edef\halfapexangle{\pgfmath@tonumber{\pgf@x}}%
- \addtosavedmacro\halfapexangle%
- %
- \pgfmathtan@{\halfapexangle}%
- \let\tanhalfapexangle\pgfmathresult%
- %
- \pgfmathcot@{\halfapexangle}%
- \let\cothalfapexangle\pgfmathresult%
- %
- \pgfmathsin@{\halfapexangle}%
- \let\sinhalfapexangle\pgfmathresult%
- %
- \pgfmathreciprocal@{\pgfmathresult}%
- \let\cosechalfapexangle\pgfmathresult%
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- %
- \ifpgfshapeborderusesincircle%
- \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
- \ifdim\pgf@x<\pgf@y%
- \pgf@x\pgf@y%
- \else%
- \pgf@y\pgf@x%
- \fi%
- \pgf@x1.414213\pgf@x%
- \pgf@y1.414213\pgf@y%
- %
- \pgf@xa\pgf@x%
- \advance\pgf@xa\cosechalfapexangle\pgf@x%
- \pgf@ya\tanhalfapexangle\pgf@xa%
- \else%
- \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \pgfmathsetcount\c@pgf@counta{+\pgfmathresult}%
- \advance\c@pgf@counta45\relax%
- \divide\c@pgf@counta90\relax%
- \multiply\c@pgf@counta90\relax%
- \edef\rotate{\the\c@pgf@counta}%
- \ifnum\c@pgf@counta=90\relax%
- \pgf@xa\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xa%
- \else%
- \ifnum\c@pgf@counta=270\relax%
- \pgf@xa\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xa%
- \fi%
- \fi%
- %
- \pgf@xa2.0\pgf@x%
- \pgf@ya\tanhalfapexangle\pgf@xa%
- \advance\pgf@xa\cothalfapexangle\pgf@y%
- \advance\pgf@ya\pgf@y%
- \fi%
- \addtosavedmacro\rotate%
- \ifdim\pgf@xa=0pt\relax%
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum height}}%
- \fi%
- % Adjust for minimum height and width.
- %
- \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum width}}%
- \ifdim\pgf@ya<.5\pgf@yb%
- \ifpgf@lib@sh@isosceslestrianglestretches%
- \pgf@ya.5\pgf@yb%
- %
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@ya}}{\pgfmath@tonumber{\pgf@xa}}%
- \pgfmathatan@{\pgfmathresult}%
- \let\halfapexangle\pgfmathresult%
- %
- \else%
- \pgf@ya.5\pgf@yb%
- \pgf@xa\cothalfapexangle\pgf@ya%
- \fi%
- \fi%
- %
- \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@xa<\pgf@xb%
- \ifpgf@lib@sh@isosceslestrianglestretches%
- \pgf@xa\pgf@xb%
- %
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@ya}}{\pgfmath@tonumber{\pgf@xa}}%
- \pgfmathatan@{\pgfmathresult}%
- \let\halfapexangle\pgfmathresult%
- %
- \else%
- \pgf@xa\pgf@xb%
- \pgf@ya\tanhalfapexangle\pgf@xa%
- \fi%
- \fi%
- %
- %
- % Now find the ``offset height'' (h'). This is the distance from the
- % center of the node contents to the base of the triangle.
- %
- \ifpgfshapeborderusesincircle%
- %
- % h' = H*sin(a/2) / (1+sin(a/2))
- %
- % where:
- % H = the height of the triangle.
- % a = the apex angle.
- %
- \pgf@xc\pgf@xa%
- \pgfmathsin@{\halfapexangle}%
- \pgf@xc\pgfmathresult\pgf@xc%
- \pgf@yc1pt\relax%
- \advance\pgf@yc\pgfmathresult pt\relax%
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@xc}}{\pgfmath@tonumber{\pgf@yc}}
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \else%
- %
- % h' = 0.5*h + (0.5*(W-w)*cos(a/2) - h*sin(a/2))/(1+sin(a/2))
- %
- % where:
- % h = the height of the node contents.
- % w = the width of the node contents.
- % W = the width of the triangle.
- % a = the apex angle.
- %
- \pgf@xc\pgf@ya%
- \advance\pgf@xc-\pgf@y%
- \pgfmathcos@{\halfapexangle}%
- \pgf@xc\pgfmathresult\pgf@xc%
- \pgfmathsin@{\halfapexangle}%
- \advance\pgf@xc-\pgfmathresult\pgf@x%
- \advance\pgf@xc-\pgfmathresult\pgf@x%
- \pgf@yc\pgfmathresult pt\relax%
- \advance\pgf@yc1pt\relax%
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@xc}}{\pgfmath@tonumber{\pgf@yc}}%
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \advance\pgfutil@tempdima\pgf@x%
- \fi%
- \pgfextract@process\apex{%
- \pgf@y0pt%
- \pgf@x\pgf@xa%
- \advance\pgf@x-\pgfutil@tempdima%
- }%
- \addtosavedmacro\apex%
- %
- \pgfextract@process\lowerleft{%
- \pgf@y\pgf@ya%
- \pgf@x-\pgfutil@tempdima%
- }%
- \addtosavedmacro\lowerleft%
- %
- \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgf@xb<\pgf@yb%
- \pgf@xb\pgf@yb%
- \fi%
- \pgfextract@process\apexanchor{%
- \apex%
- \advance\pgf@x\cosechalfapexangle\pgf@xb%
- }%
- \addtosavedmacro\apexanchor%
- %
- \pgf@yc-\halfapexangle pt\relax%
- \advance\pgf@yc90pt\relax%
- \divide\pgf@yc2\relax%
- \pgfmathcot@{\pgfmath@tonumber{\pgf@yc}}%
- \pgfextract@process\lowerleftanchor{%
- \lowerleft%
- \advance\pgf@y\pgfmathresult\pgf@xb%
- \advance\pgf@x-\pgf@xb%
- }%
- \addtosavedmacro\lowerleftanchor%
- %
- \pgfextract@process\lowerrightanchor{%
- \lowerleftanchor%
- \pgf@y-\pgf@y%
- }%
- \addtosavedmacro\lowerrightanchor%
- }
- \anchor{apex}{%
- \trianglepoints%
- \pgfpointadd{\centerpoint}{%
- \pgfmathrotatepointaround{\apexanchor}{\pgfpointorigin}{\rotate}%
- }%
- }%
- \anchor{left corner}{%
- \trianglepoints%
- \pgfpointadd{\centerpoint}{%
- \pgfmathrotatepointaround{\lowerleftanchor}{\pgfpointorigin}{\rotate}%
- }%
- }%
- \anchor{right corner}{%
- \trianglepoints%
- \pgfpointadd{\centerpoint}{%
- \pgfmathrotatepointaround{\lowerrightanchor}{\pgfpointorigin}{\rotate}%
- }%
- }%
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }%
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \anchor{mid west}{%
- \trianglepoints%
- \let\pgf@isoscelestriangle@referencepoint\midpoint%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{-1pt}{0pt}}%
- }%
- \anchor{mid east}{%
- \trianglepoints%
- \let\pgf@isoscelestriangle@referencepoint\midpoint%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{1pt}{0pt}}%
- }%
- \anchor{base}{\basepoint}%
- \anchor{base west}{%
- \trianglepoints%
- \let\pgf@isoscelestriangle@referencepoint\basepoint%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{-1pt}{0pt}}%
- }%
- \anchor{base east}{%
- \trianglepoints%
- \let\pgf@isoscelestriangle@referencepoint\basepoint%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{1pt}{0pt}}%
- }%
- \anchor{north}{%
- \trianglepoints%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{0pt}{1pt}}%
- }
- \anchor{south}{%
- \trianglepoints%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{0pt}{-1pt}}%
- }
- \anchor{east}{%
- \trianglepoints%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{1pt}{0pt}}%
- }
- \anchor{west}{%
- \trianglepoints%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{-1pt}{0pt}}%
- }
- \anchor{north east}{%
- \trianglepoints%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{1pt}{1pt}}%
- }
- \anchor{south west}{%
- \trianglepoints%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{-1pt}{-1pt}}%
- }
- \anchor{south east}{%
- \trianglepoints%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{1pt}{-1pt}}%
- }
- \anchor{north west}{%
- \trianglepoints%
- \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{-1pt}{1pt}}%
- }
- \anchor{left side}{%
- \trianglepoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{\pgfpointlineattime{0.5}{\lowerleftanchor}{\apexanchor}}{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }
- \anchor{right side}{%
- \trianglepoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{\pgfpointlineattime{0.5}{\lowerrightanchor}{\apexanchor}}{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }
- \anchor{lower side}{%
- \trianglepoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{\pgfpointlineattime{0.5}{\lowerleftanchor}{\lowerrightanchor}}{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }
- \backgroundpath{%
- \trianglepoints%
- {%
- \pgftransformshift{\centerpoint}%
- \pgftransformrotate{\rotate}%
- \pgfpathmoveto{\apex}%
- \pgfpathlineto{\lowerleft}%
- \pgfpathlineto{\lowerleft\pgf@y-\pgf@y}%
- \pgfpathclose%
- }%
- }
- \anchorborder{%
- \pgfutil@ifundefined{pgf@isoscelestriangle@referencepoint}{\let\referencepoint\centerpoint}%
- {\let\referencepoint\pgf@isoscelestriangle@referencepoint}%
- \pgfextract@process\externalpoint{%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \referencepoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \trianglepoints%
- \pgfmathanglebetweenpoints{\referencepoint}{\externalpoint}%
- \pgfmathsubtract@{\pgfmathresult}{\rotate}%
- \pgfmathmod@{\pgfmathresult}{360}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \let\externalangle\pgfmathresult%
- %
- \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\centerpoint}{\lowerrightanchor}}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\centerpoint}{\lowerleftanchor}}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\centerpoint}{\apexanchor}}%
- \ifdim\externalangle pt>\pgfmathresult pt\relax%
- \let\firstpoint\apexanchor%
- \let\secondpoint\lowerleftanchor%
- \else%
- \let\firstpoint\apexanchor%
- \let\secondpoint\lowerrightanchor%
- \fi%
- \else%
- \let\firstpoint\lowerleftanchor%
- \let\secondpoint\lowerrightanchor%
- \fi%
- \else%
- \let\firstpoint\lowerrightanchor%
- \let\secondpoint\apexanchor%
- \fi%
- \pgfpointintersectionoflines{\referencepoint}{\externalpoint}%
- {\pgfmathrotatepointaround{\pgfpointadd{\centerpoint}{\firstpoint}}{\centerpoint}{\rotate}}%
- {\pgfmathrotatepointaround{\pgfpointadd{\centerpoint}{\secondpoint}}{\centerpoint}{\rotate}}%
- }%
-}
+\pgfdeclareshape{isosceles triangle}{%
+ \savedmacro\trianglepoints{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/isosceles triangle apex angle}}%
+ \divide\pgf@x2\relax%
+ \edef\halfapexangle{\pgfmath@tonumber{\pgf@x}}%
+ \addtosavedmacro\halfapexangle%
+ %
+ \pgfmathtan@{\halfapexangle}%
+ \let\tanhalfapexangle\pgfmathresult%
+ %
+ \pgfmathcot@{\halfapexangle}%
+ \let\cothalfapexangle\pgfmathresult%
+ %
+ \pgfmathsin@{\halfapexangle}%
+ \let\sinhalfapexangle\pgfmathresult%
+ %
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \let\cosechalfapexangle\pgfmathresult%
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ %
+ \ifpgfshapeborderusesincircle%
+ \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ \ifdim\pgf@x<\pgf@y%
+ \pgf@x\pgf@y%
+ \else%
+ \pgf@y\pgf@x%
+ \fi%
+ \pgf@x1.414213\pgf@x%
+ \pgf@y1.414213\pgf@y%
+ %
+ \pgf@xa\pgf@x%
+ \advance\pgf@xa\cosechalfapexangle\pgf@x%
+ \pgf@ya\tanhalfapexangle\pgf@xa%
+ \else%
+ \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \pgfmathsetcount\c@pgf@counta{+\pgfmathresult}%
+ \advance\c@pgf@counta45\relax%
+ \divide\c@pgf@counta90\relax%
+ \multiply\c@pgf@counta90\relax%
+ \edef\rotate{\the\c@pgf@counta}%
+ \ifnum\c@pgf@counta=90\relax%
+ \pgf@xa\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xa%
+ \else%
+ \ifnum\c@pgf@counta=270\relax%
+ \pgf@xa\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xa%
+ \fi%
+ \fi%
+ %
+ \pgf@xa2.0\pgf@x%
+ \pgf@ya\tanhalfapexangle\pgf@xa%
+ \advance\pgf@xa\cothalfapexangle\pgf@y%
+ \advance\pgf@ya\pgf@y%
+ \fi%
+ \addtosavedmacro\rotate%
+ \ifdim\pgf@xa=0pt\relax%
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum height}}%
+ \fi%
+ % Adjust for minimum height and width.
+ %
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgf@ya<.5\pgf@yb%
+ \ifpgf@lib@sh@isosceslestrianglestretches%
+ \pgf@ya.5\pgf@yb%
+ %
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@ya}}{\pgfmath@tonumber{\pgf@xa}}%
+ \pgfmathatan@{\pgfmathresult}%
+ \let\halfapexangle\pgfmathresult%
+ %
+ \else%
+ \pgf@ya.5\pgf@yb%
+ \pgf@xa\cothalfapexangle\pgf@ya%
+ \fi%
+ \fi%
+ %
+ \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@xa<\pgf@xb%
+ \ifpgf@lib@sh@isosceslestrianglestretches%
+ \pgf@xa\pgf@xb%
+ %
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@ya}}{\pgfmath@tonumber{\pgf@xa}}%
+ \pgfmathatan@{\pgfmathresult}%
+ \let\halfapexangle\pgfmathresult%
+ %
+ \else%
+ \pgf@xa\pgf@xb%
+ \pgf@ya\tanhalfapexangle\pgf@xa%
+ \fi%
+ \fi%
+ %
+ %
+ % Now find the ``offset height'' (h'). This is the distance from the
+ % center of the node contents to the base of the triangle.
+ %
+ \ifpgfshapeborderusesincircle%
+ %
+ % h' = H*sin(a/2) / (1+sin(a/2))
+ %
+ % where:
+ % H = the height of the triangle.
+ % a = the apex angle.
+ %
+ \pgf@xc\pgf@xa%
+ \pgfmathsin@{\halfapexangle}%
+ \pgf@xc\pgfmathresult\pgf@xc%
+ \pgf@yc1pt\relax%
+ \advance\pgf@yc\pgfmathresult pt\relax%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@xc}}{\pgfmath@tonumber{\pgf@yc}}
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \else%
+ %
+ % h' = 0.5*h + (0.5*(W-w)*cos(a/2) - h*sin(a/2))/(1+sin(a/2))
+ %
+ % where:
+ % h = the height of the node contents.
+ % w = the width of the node contents.
+ % W = the width of the triangle.
+ % a = the apex angle.
+ %
+ \pgf@xc\pgf@ya%
+ \advance\pgf@xc-\pgf@y%
+ \pgfmathcos@{\halfapexangle}%
+ \pgf@xc\pgfmathresult\pgf@xc%
+ \pgfmathsin@{\halfapexangle}%
+ \advance\pgf@xc-\pgfmathresult\pgf@x%
+ \advance\pgf@xc-\pgfmathresult\pgf@x%
+ \pgf@yc\pgfmathresult pt\relax%
+ \advance\pgf@yc1pt\relax%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@xc}}{\pgfmath@tonumber{\pgf@yc}}%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \advance\pgfutil@tempdima\pgf@x%
+ \fi%
+ \pgfextract@process\apex{%
+ \pgf@y0pt%
+ \pgf@x\pgf@xa%
+ \advance\pgf@x-\pgfutil@tempdima%
+ }%
+ \addtosavedmacro\apex%
+ %
+ \pgfextract@process\lowerleft{%
+ \pgf@y\pgf@ya%
+ \pgf@x-\pgfutil@tempdima%
+ }%
+ \addtosavedmacro\lowerleft%
+ %
+ \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@xb<\pgf@yb%
+ \pgf@xb\pgf@yb%
+ \fi%
+ \pgfextract@process\apexanchor{%
+ \apex%
+ \advance\pgf@x\cosechalfapexangle\pgf@xb%
+ }%
+ \addtosavedmacro\apexanchor%
+ %
+ \pgf@yc-\halfapexangle pt\relax%
+ \advance\pgf@yc90pt\relax%
+ \divide\pgf@yc2\relax%
+ \pgfmathcot@{\pgfmath@tonumber{\pgf@yc}}%
+ \pgfextract@process\lowerleftanchor{%
+ \lowerleft%
+ \advance\pgf@y\pgfmathresult\pgf@xb%
+ \advance\pgf@x-\pgf@xb%
+ }%
+ \addtosavedmacro\lowerleftanchor%
+ %
+ \pgfextract@process\lowerrightanchor{%
+ \lowerleftanchor%
+ \pgf@y-\pgf@y%
+ }%
+ \addtosavedmacro\lowerrightanchor%
+ }%
+ \anchor{apex}{%
+ \trianglepoints%
+ \pgfpointadd{\centerpoint}{%
+ \pgfmathrotatepointaround{\apexanchor}{\pgfpointorigin}{\rotate}%
+ }%
+ }%
+ \anchor{left corner}{%
+ \trianglepoints%
+ \pgfpointadd{\centerpoint}{%
+ \pgfmathrotatepointaround{\lowerleftanchor}{\pgfpointorigin}{\rotate}%
+ }%
+ }%
+ \anchor{right corner}{%
+ \trianglepoints%
+ \pgfpointadd{\centerpoint}{%
+ \pgfmathrotatepointaround{\lowerrightanchor}{\pgfpointorigin}{\rotate}%
+ }%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid west}{%
+ \trianglepoints%
+ \let\pgf@isoscelestriangle@referencepoint\midpoint%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{-1pt}{0pt}}%
+ }%
+ \anchor{mid east}{%
+ \trianglepoints%
+ \let\pgf@isoscelestriangle@referencepoint\midpoint%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{1pt}{0pt}}%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base west}{%
+ \trianglepoints%
+ \let\pgf@isoscelestriangle@referencepoint\basepoint%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{-1pt}{0pt}}%
+ }%
+ \anchor{base east}{%
+ \trianglepoints%
+ \let\pgf@isoscelestriangle@referencepoint\basepoint%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{1pt}{0pt}}%
+ }%
+ \anchor{north}{%
+ \trianglepoints%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{0pt}{1pt}}%
+ }%
+ \anchor{south}{%
+ \trianglepoints%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{0pt}{-1pt}}%
+ }%
+ \anchor{east}{%
+ \trianglepoints%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{1pt}{0pt}}%
+ }%
+ \anchor{west}{%
+ \trianglepoints%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{-1pt}{0pt}}%
+ }%
+ \anchor{north east}{%
+ \trianglepoints%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{1pt}{1pt}}%
+ }%
+ \anchor{south west}{%
+ \trianglepoints%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{-1pt}{-1pt}}%
+ }%
+ \anchor{south east}{%
+ \trianglepoints%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{1pt}{-1pt}}%
+ }%
+ \anchor{north west}{%
+ \trianglepoints%
+ \csname pgf@anchor@isosceles triangle@border\endcsname{\pgfqpoint{-1pt}{1pt}}%
+ }%
+ \anchor{left side}{%
+ \trianglepoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{\pgfpointlineattime{0.5}{\lowerleftanchor}{\apexanchor}}{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{right side}{%
+ \trianglepoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{\pgfpointlineattime{0.5}{\lowerrightanchor}{\apexanchor}}{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{lower side}{%
+ \trianglepoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{\pgfpointlineattime{0.5}{\lowerleftanchor}{\lowerrightanchor}}{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \backgroundpath{%
+ \trianglepoints%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgftransformrotate{\rotate}%
+ \pgfpathmoveto{\apex}%
+ \pgfpathlineto{\lowerleft}%
+ \pgfpathlineto{\lowerleft\pgf@y-\pgf@y}%
+ \pgfpathclose%
+ }%
+ }%
+ \anchorborder{%
+ \pgfutil@ifundefined{pgf@isoscelestriangle@referencepoint}{\let\referencepoint\centerpoint}%
+ {\let\referencepoint\pgf@isoscelestriangle@referencepoint}%
+ \pgfextract@process\externalpoint{%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \referencepoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \trianglepoints%
+ \pgfmathanglebetweenpoints{\referencepoint}{\externalpoint}%
+ \pgfmathsubtract@{\pgfmathresult}{\rotate}%
+ \pgfmathmod@{\pgfmathresult}{360}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \let\externalangle\pgfmathresult%
+ %
+ \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\centerpoint}{\lowerrightanchor}}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\centerpoint}{\lowerleftanchor}}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\centerpoint}{\apexanchor}}%
+ \ifdim\externalangle pt>\pgfmathresult pt\relax%
+ \let\firstpoint\apexanchor%
+ \let\secondpoint\lowerleftanchor%
+ \else%
+ \let\firstpoint\apexanchor%
+ \let\secondpoint\lowerrightanchor%
+ \fi%
+ \else%
+ \let\firstpoint\lowerleftanchor%
+ \let\secondpoint\lowerrightanchor%
+ \fi%
+ \else%
+ \let\firstpoint\lowerrightanchor%
+ \let\secondpoint\apexanchor%
+ \fi%
+ \pgfpointintersectionoflines{\referencepoint}{\externalpoint}%
+ {\pgfmathrotatepointaround{\pgfpointadd{\centerpoint}{\firstpoint}}{\centerpoint}{\rotate}}%
+ {\pgfmathrotatepointaround{\pgfpointadd{\centerpoint}{\secondpoint}}{\centerpoint}{\rotate}}%
+ }%
+}%
@@ -2342,654 +2340,654 @@
%
%
\pgfkeys{/pgf/.cd,
- kite upper vertex angle/.initial=120,
- kite lower vertex angle/.initial=60,
- kite vertex angles/.code={%
- \pgfutil@in@{and}{#1}%
- \ifpgfutil@in@%
- \def\pgf@marshal##1and##2\@@{%
- \pgfkeys{/pgf/kite upper vertex angle=##1}%
- \pgfkeys{/pgf/kite lower vertex angle=##2}%
- }%
- \expandafter\pgf@marshal#1\@@%
- \else%
- \pgfkeys{/pgf/kite upper vertex angle=#1}%
- \pgfkeys{/pgf/kite lower vertex angle=#1}%
- \fi%
- }%
-}
+ kite upper vertex angle/.initial=120,
+ kite lower vertex angle/.initial=60,
+ kite vertex angles/.code={%
+ \pgfutil@in@{and}{#1}%
+ \ifpgfutil@in@%
+ \def\pgf@marshal##1and##2\@@{%
+ \pgfkeys{/pgf/kite upper vertex angle=##1}%
+ \pgfkeys{/pgf/kite lower vertex angle=##2}%
+ }%
+ \expandafter\pgf@marshal#1\@@%
+ \else%
+ \pgfkeys{/pgf/kite upper vertex angle=#1}%
+ \pgfkeys{/pgf/kite lower vertex angle=#1}%
+ \fi%
+ }%
+}%
% Shape kite.
%
-\pgfdeclareshape{kite}{
- \savedmacro\installkiteparameters{%
- %
- % Get the larger of the outer sep.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgf@x<\pgf@y%
- \pgf@x\pgf@y%
- \fi%
- \edef\outersep{\the\pgf@x}%
- %
- % Calculate the centre, base and mid points of the node.
- %
- \pgfextract@process\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \pgfextract@process\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt\relax%
- }%
- \pgfextract@process\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- %
- % Halve the vertex angles.
- %
- \pgfmathdivide{\pgfkeysvalueof{/pgf/kite upper vertex angle}}{2}%
- \let\halfuppervertexangle\pgfmathresult%
- \pgfmathdivide{\pgfkeysvalueof{/pgf/kite lower vertex angle}}{2}%
- \let\halflowervertexangle\pgfmathresult%
- %
- % Get the node dimensions.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- \ifpgfshapeborderusesincircle%
- %
- % Get the rotation.
- %
- \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
- %
- % Get the radis of the incircle.
- %
- \ifdim\pgf@x<\pgf@y%
- \pgf@x\pgf@y%
- \fi%
- \pgf@x1.41421\pgf@x%
- %
- % Get the distances from the upper and lower verticies
- % to the center of the incircle.
- %
- \pgfmathsin@{\halfuppervertexangle}%
- \let\sinehalfuppervertexangle\pgfmathresult%
- \pgfmathreciprocal@{\pgfmathresult}%
- \let\cosechalfuppervertexangle\pgfmathresult%
- \pgf@ya\pgfmathresult\pgf@x%
- \pgfmathsin@{\halflowervertexangle}%
- \let\sinehalflowervertexangle\pgfmathresult%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@yb\pgfmathresult\pgf@x%
- %
- % Now calculate vertical offset (yc) between the center of
- % the incircle, and the intersection of the kite diagonals.
- %
- % yc = x * cosec(a/2) - x * cot(a/2) * (sin(a/2) + sin(b/2)) * cosec(a/2 + b/2)
- %
- % where:
- % x = the incircle radius.
- % a = the upper vertex angle.
- % b = the lower vertex angle.
- %
- \pgf@yc\pgf@x%
- \pgfmathadd@{\halfuppervertexangle}{\halflowervertexangle}%
- \pgfmathcosec@{\pgfmathresult}%
- \pgf@yc\pgfmathresult\pgf@yc%
- \pgfmathadd@{\sinehalfuppervertexangle}{\sinehalflowervertexangle}%
+\pgfdeclareshape{kite}{%
+ \savedmacro\installkiteparameters{%
+ %
+ % Get the larger of the outer sep.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@x<\pgf@y%
+ \pgf@x\pgf@y%
+ \fi%
+ \edef\outersep{\the\pgf@x}%
+ %
+ % Calculate the centre, base and mid points of the node.
+ %
+ \pgfextract@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \pgfextract@process\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }%
+ \pgfextract@process\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ %
+ % Halve the vertex angles.
+ %
+ \pgfmathdivide{\pgfkeysvalueof{/pgf/kite upper vertex angle}}{2}%
+ \let\halfuppervertexangle\pgfmathresult%
+ \pgfmathdivide{\pgfkeysvalueof{/pgf/kite lower vertex angle}}{2}%
+ \let\halflowervertexangle\pgfmathresult%
+ %
+ % Get the node dimensions.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ \ifpgfshapeborderusesincircle%
+ %
+ % Get the rotation.
+ %
+ \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ %
+ % Get the radius of the incircle.
+ %
+ \ifdim\pgf@x<\pgf@y%
+ \pgf@x\pgf@y%
+ \fi%
+ \pgf@x1.41421\pgf@x%
+ %
+ % Get the distances from the upper and lower vertices
+ % to the center of the incircle.
+ %
+ \pgfmathsin@{\halfuppervertexangle}%
+ \let\sinehalfuppervertexangle\pgfmathresult%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \let\cosechalfuppervertexangle\pgfmathresult%
+ \pgf@ya\pgfmathresult\pgf@x%
+ \pgfmathsin@{\halflowervertexangle}%
+ \let\sinehalflowervertexangle\pgfmathresult%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \pgf@yb\pgfmathresult\pgf@x%
+ %
+ % Now calculate vertical offset (yc) between the center of
+ % the incircle, and the intersection of the kite diagonals.
+ %
+ % yc = x * cosec(a/2) - x * cot(a/2) * (sin(a/2) + sin(b/2)) * cosec(a/2 + b/2)
+ %
+ % where:
+ % x = the incircle radius.
+ % a = the upper vertex angle.
+ % b = the lower vertex angle.
+ %
+ \pgf@yc\pgf@x%
+ \pgfmathadd@{\halfuppervertexangle}{\halflowervertexangle}%
+ \pgfmathcosec@{\pgfmathresult}%
+ \pgf@yc\pgfmathresult\pgf@yc%
+ \pgfmathadd@{\sinehalfuppervertexangle}{\sinehalflowervertexangle}%
\pgf@yc\pgfmathresult\pgf@yc%
- \pgfmathcos@{\halfuppervertexangle}%
- \pgf@yc\pgfmathresult\pgf@yc%
- \pgf@yc-\cosechalfuppervertexangle\pgf@yc%
- \advance\pgf@yc\cosechalfuppervertexangle\pgf@x%
- \edef\deltay{\the\pgf@yc}%
- %
- % Now calculate the height of the kite...
- %
- \advance\pgf@ya-\pgf@yc%
- %
- % ...and the depth.
- %
- \advance\pgf@yb\pgf@yc%
- %
- % Get the half width of the widest part of the kite.
- %
- \pgfmathtan@{\halfuppervertexangle}%
- \pgf@xa\pgfmathresult\pgf@ya%
- \else%
- \multiply\pgf@x2\relax%
- \multiply\pgf@y2\relax%
- %
- % Get the rotation (with rounding).
- %
- \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
- \advance\c@pgf@counta45\relax%
- \divide\c@pgf@counta90\relax%
- \multiply\c@pgf@counta90\relax%
- \ifnum\c@pgf@counta<0\relax%
- \advance\c@pgf@counta360\relax%
- \fi%
- \edef\rotate{\the\c@pgf@counta}%
- %
- % Calculate the width and height of the node
- % contents, according to any border rotation.
- %
- \ifnum\c@pgf@counta=90\relax%
- \pgf@xc\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xc%
- \else%
- \ifnum\c@pgf@counta=270\relax%
- \pgf@xc\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xc%
- \fi%
- \fi%
- %
- % The node contents (total height y) extends a distance ya into the
- % upper isosceles triangle of the kite and a distance yb into the
- % lower isosceles triangle. Thus, the following relationships hold:
- %
- % ya/yb = tan(b/2)/tan(a/2)
- %
- % and y = ya + yb
- %
- % so ya = y * sin(a/2 + b/2) / (cos(a/2) * sin(b/2))
- %
- % where:
- % a = upper vertex angle.
- % b = lower vertex angle.
- %
- \pgfmathadd@{\halfuppervertexangle}{\halflowervertexangle}%
- \pgfmathsin@{\pgfmathresult}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@ya\pgfmathresult\pgf@y%
- \pgfmathcos@{\halfuppervertexangle}%
- \pgf@ya\pgfmathresult\pgf@ya%
- \pgfmathsin@{\halflowervertexangle}%
- \pgf@ya\pgfmathresult\pgf@ya%
- \pgf@yb\pgf@y%
- \advance\pgf@yb-\pgf@ya%
- %
- % The vertical offset between the center of the node, and
- % the intersection of the kite diagonals is given by:
- %
- % yc = y/2 - ya
- %
- \pgf@yc.5\pgf@y%
- \advance\pgf@yc-\pgf@ya%
- \edef\deltay{\the\pgf@yc}%
- %
- % Get the half width of the widest part of the kite.
- %
- \pgfmathtan@{\halfuppervertexangle}%
- \pgf@xa.5\pgf@x%
- \advance\pgf@xa\pgfmathresult\pgf@ya%
- %
- % Now calculate the height of the kite...
- %
- \pgf@xb.5\pgf@x%
- \pgfmathreciprocal@{\pgfmathresult}%
- \advance\pgf@ya\pgfmathresult\pgf@xb%
- %
- % ...and the depth.
- %
- \pgfmathtan@{\halflowervertexangle}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \advance\pgf@yb\pgfmathresult\pgf@xb%
- \fi%
- %
- % Take into account minimum height and width.
- %
- % ya is the kite height.
- % yb is the kite depth.
- % xa is the kite (half) width.
- %
- \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/minimum height}}%
- \pgf@y\pgf@ya%
- \advance\pgf@y\pgf@yb%
- \ifdim\pgf@y<\pgf@yc%
- \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@y}}%
- \pgf@yc\pgfmathresult\pgf@yc%
- \pgf@xa\pgfmath@tonumber{\pgf@yc}\pgf@xa%
- \pgf@ya\pgfmath@tonumber{\pgf@yc}\pgf@ya%
- \pgf@yb\pgfmath@tonumber{\pgf@yc}\pgf@yb%
- \fi%
- \pgf@x2.0\pgf@xa%
- \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/minimum width}}%
- \ifdim\pgf@x<\pgf@xc%
- \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@x}}%
- \pgf@xc\pgfmathresult\pgf@xc%
- \pgf@xa\pgfmath@tonumber{\pgf@xc}\pgf@xa%
- \pgf@ya\pgfmath@tonumber{\pgf@xc}\pgf@ya%
- \pgf@yb\pgfmath@tonumber{\pgf@xc}\pgf@yb%
- \fi%
- \edef\kitehalfwidth{\the\pgf@xa}%
- \edef\kiteheight{\the\pgf@ya}%
- \edef\kitedepth{\the\pgf@yb}%
- %
- % Calculate the basic points on the kite (for the background path).
- %
- \pgfextract@process\toppoint{%
- \centerpoint%
- \advance\pgf@y\deltay\relax%
- \advance\pgf@y\kiteheight%
- }%
- \pgfextract@process\bottompoint{%
- \centerpoint%
- \advance\pgf@y\deltay\relax%
- \advance\pgf@y-\kitedepth%
- }%
- \pgfextract@process\leftpoint{%
- \centerpoint%
- \advance\pgf@y\deltay\relax%
- \advance\pgf@x-\kitehalfwidth%
- }%
- \pgfextract@process\rightpoint{%
- \centerpoint%
- \advance\pgf@y\deltay\relax%
- \advance\pgf@x\kitehalfwidth%
- }%
- %
- % Now calculate the miter length. At the top...
- %
- \pgfmathsin@{\halfuppervertexangle}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@y\outersep\relax%
- \pgf@y\pgfmathresult\pgf@y%
- \edef\topmiter{\the\pgf@y}%
- %
- % ...at the bottom...
- %
- \pgfmathsin@{\halflowervertexangle}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@y\outersep\relax%
- \pgf@y\pgfmathresult\pgf@y%
- \edef\bottommiter{\the\pgf@y}%
- %
- % ...to the right...
- %
- \pgfmathsubtract@{180}{\halflowervertexangle}%
- \pgfmathsubtract@{\pgfmathresult}{\halfuppervertexangle}%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \pgfmathsin@{\pgfmathresult}%
- \pgfmathreciprocal@{\pgfmathresult}%
- \pgf@xa\outersep\relax%
- \pgf@xa\pgfmathresult\pgf@xa%
- \pgfmathsubtract@{\halfuppervertexangle}{\halflowervertexangle}%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \let\angle\pgfmathresult%
- \pgfextract@process\rightmiter{%
- \pgfqpointpolar{\angle}{\the\pgf@xa}%
- }%
- %
- % ...and to the left.
- %
- \pgfmathsubtract@{180}{\angle}%
- \let\angle\pgfmathresult%
- \pgfextract@process\leftmiter{%
- \pgfqpointpolar{\angle}{\the\pgf@xa}%
- }%
- %
- % Create the border points.
- %
- \pgfextract@process\topborderpoint{%
- \toppoint%
- \advance\pgf@y\topmiter\relax%
- }%
- \pgfextract@process\bottomborderpoint{%
- \bottompoint%
- \advance\pgf@y-\bottommiter\relax%
- }%
- \pgfextract@process\leftborderpoint{%
- \leftpoint%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \leftmiter%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \pgfextract@process\rightborderpoint{%
- \rightpoint%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \rightmiter%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- %
- % Get the angle from the \centerpoint to the *unrotated points*.
- %
- \pgfmathanglebetweenpoints{\centerpoint}{\topborderpoint}%
- \let\angletotoppoint\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\leftborderpoint}%
- \let\angletoleftpoint\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\bottomborderpoint}%
- \let\angletobottompoint\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\rightborderpoint}%
- \let\angletorightpoint\pgfmathresult%
- %
- % ...from the *inversly rotated* \basepoint...
- %
- \pgfextract@process\rotatedbasepoint{%
- \pgfmathrotatepointaround{\basepoint}{\centerpoint}{-\rotate}%
- }%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\topborderpoint}%
- \let\baseangletotoppoint\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\leftborderpoint}%
- \let\baseangletoleftpoint\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\bottomborderpoint}%
- \let\baseangletobottompoint\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\rightborderpoint}%
- \let\baseangletorightpoint\pgfmathresult%
- %
- % ...and from the *inversely rotated* \midpoint.
- %
- \pgfextract@process\rotatedmidpoint{%
- \pgfmathrotatepointaround{\midpoint}{\centerpoint}{-\rotate}%
- }%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\topborderpoint}%
- \let\midangletotoppoint\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\leftborderpoint}%
- \let\midangletoleftpoint\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\bottomborderpoint}%
- \let\midangletobottompoint\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\rightborderpoint}%
- \let\midangletorightpoint\pgfmathresult%
- %
- % Calculate a radius guaranteed to be outside the kite.
- %
- \pgfextractx\pgf@xa{\pgfpointdiff{\leftborderpoint}{\rightborderpoint}}%
- \ifdim\pgf@xa<0pt\relax%
- \pgf@xa-\pgf@xa%
- \fi%
- \pgfextracty\pgf@ya{\pgfpointdiff{\topborderpoint}{\bottomborderpoint}}%
- \ifdim\pgf@ya<0pt\relax%
- \pgf@ya-\pgf@ya%
- \fi%
- \ifdim\pgf@ya>\pgf@xa%
- \edef\externalradius{\the\pgf@ya}%
- \else%
- \edef\externalradius{\the\pgf@xa}%
- \fi%
- %
- % Now rotate the points...
- %
- \pgfextract@process\toppoint{%
- \pgfmathrotatepointaround{\toppoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\bottompoint{%
- \pgfmathrotatepointaround{\bottompoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\leftpoint{%
- \pgfmathrotatepointaround{\leftpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\rightpoint{%
- \pgfmathrotatepointaround{\rightpoint}{\centerpoint}{\rotate}%
- }%
- %
- % ...and the border points.
- %
- \pgfextract@process\topborderpoint{%
- \pgfmathrotatepointaround{\topborderpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\bottomborderpoint{%
- \pgfmathrotatepointaround{\bottomborderpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\leftborderpoint{%
- \pgfmathrotatepointaround{\leftborderpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\rightborderpoint{%
- \pgfmathrotatepointaround{\rightborderpoint}{\centerpoint}{\rotate}%
- }%
- %
- % Now save it all.
- %
- \addtosavedmacro{\rotate}%
- \addtosavedmacro{\externalradius}%
- %
- \addtosavedmacro\toppoint%
- \addtosavedmacro\bottompoint%
- \addtosavedmacro\leftpoint%
- \addtosavedmacro\rightpoint%
- %
- \addtosavedmacro\topborderpoint%
- \addtosavedmacro\bottomborderpoint%
- \addtosavedmacro\leftborderpoint%
- \addtosavedmacro\rightborderpoint%
- %
- \addtosavedmacro\angletotoppoint%
- \addtosavedmacro\angletobottompoint%
- \addtosavedmacro\angletoleftpoint%
- \addtosavedmacro\angletorightpoint%
- %
- \addtosavedmacro\baseangletotoppoint%
- \addtosavedmacro\baseangletobottompoint%
- \addtosavedmacro\baseangletoleftpoint%
- \addtosavedmacro\baseangletorightpoint%
- %
- \addtosavedmacro\midangletotoppoint%
- \addtosavedmacro\midangletobottompoint%
- \addtosavedmacro\midangletoleftpoint%
- \addtosavedmacro\midangletorightpoint%
- }
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt\relax%
- }%
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- \anchor{center}{\centerpoint}%
- \anchor{base}{\basepoint}%
- \anchor{base west}{%
- \installkiteparameters%
- \let\pgf@kiteanchorborderreferencepoint\basepoint%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }%
- \anchor{base east}{%
- \installkiteparameters%
- \let\pgf@kiteanchorborderreferencepoint\basepoint%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }%
- \anchor{mid}{\midpoint}%
- \anchor{mid west}{%
- \installkiteparameters%
- \let\pgf@kiteanchorborderreferencepoint\midpoint%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }%
- \anchor{mid east}{%
- \installkiteparameters%
- \let\pgf@kiteanchorborderreferencepoint\midpoint%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }%
- \anchor{north}{%
- \installkiteparameters%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{0pt}{\externalradius}}%
- }
- \anchor{south}{%
- \installkiteparameters%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{0pt}{-\externalradius}}%
- }
- \anchor{east}{%
- \installkiteparameters%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{west}{%
- \installkiteparameters%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
- \anchor{north east}{%
- \installkiteparameters%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{\externalradius}{\externalradius}}%
- }
- \anchor{south west}{%
- \installkiteparameters%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{-\externalradius}{-\externalradius}}%
- }
- \anchor{south east}{%
- \installkiteparameters%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{\externalradius}{-\externalradius}}%
- }
- \anchor{north west}{%
- \installkiteparameters%
- \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{-\externalradius}{\externalradius}}%
- }
- \anchor{upper vertex}{%
- \installkiteparameters%
- \topborderpoint}
- \anchor{lower vertex}{%
- \installkiteparameters%
- \bottomborderpoint}
- \anchor{left vertex}{%
- \installkiteparameters%
- \leftborderpoint}
- \anchor{right vertex}{%
- \installkiteparameters%
- \rightborderpoint}
- \anchor{upper left side}{%
- \installkiteparameters%
- \pgfpointlineattime{0.5}{\topborderpoint}{\leftborderpoint}}
- \anchor{lower left side}{%
- \installkiteparameters%
- \pgfpointlineattime{0.5}{\bottomborderpoint}{\leftborderpoint}}
- \anchor{upper right side}{%
- \installkiteparameters%
- \pgfpointlineattime{0.5}{\topborderpoint}{\rightborderpoint}}
- \anchor{lower right side}{%
- \installkiteparameters%
- \pgfpointlineattime{0.5}{\bottomborderpoint}{\rightborderpoint}}
- \backgroundpath{%
- \installkiteparameters%
- \pgfpathmoveto{\toppoint}%
- \pgfpathlineto{\leftpoint}%
- \pgfpathlineto{\bottompoint}%
- \pgfpathlineto{\rightpoint}%
- \pgfpathclose%
- }
- \anchorborder{%
- %
- % Save x and y.
- %
- \edef\externalx{\the\pgf@x}%
- \edef\externaly{\the\pgf@y}%
- %
- % This allows anchors base east, base west, mid east and mid west,
- % to redefine the `center' of the node to correctly calculate the
- % border points.
- %
- \pgfutil@ifundefined{pgf@kiteanchorborderreferencepoint}%
- {\let\referencepoint\centerpoint}%
- {\let\referencepoint\pgf@kiteanchorborderreferencepoint}%
- %
- % Adjust the location of the external
- % point relative to the reference point.
- %
- \referencepoint%
- \pgf@xa\externalx\relax%
- \pgf@ya\externaly\relax%
- \advance\pgf@xa\pgf@x%
- \advance\pgf@ya\pgf@y%
- \edef\externalx{\the\pgf@xa}%
- \edef\externaly{\the\pgf@ya}%
- %
- % Install the required points and angles.
- %
- \installkiteparameters%
- %
- % Get the angle of the external point relative to \referencepoint.
- %
- \pgfmathanglebetweenpoints{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
- %
- % *Subtract* the rotation from the external angle.
- %
- \pgfmathsubtract@{\pgfmathresult}{\rotate}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \let\externalangle\pgfmathresult%
- \ifx\referencepoint\basepoint%
- \let\angletotoppoint\baseangletotoppoint%
- \let\angletobottompoint\baseangletobottompoint%
- \let\angletoleftpoint\baseangletoleftpoint%
- \let\angletorightpoint\baseangletorightpoint%
- \else%
- \ifx\referencepoint\midpoint%
- \let\angletotoppoint\midangletotoppoint%
- \let\angletobottompoint\midangletobottompoint%
- \let\angletoleftpoint\midangletoleftpoint%
- \let\angletorightpoint\midangletorightpoint%
- \fi\fi%
- %
- % Depending on the rotation, the angle to \rightborderpoint
- % may be smaller than the angle to \topborderpoint.
- %
- \ifdim\angletorightpoint pt<\angletotoppoint pt\relax%
- \ifdim\externalangle pt<\angletorightpoint pt\relax%
- \let\firstpoint\rightborderpoint%
- \let\secondpoint\bottomborderpoint%
- \else%
- \ifdim\externalangle pt<\angletotoppoint pt\relax%
- \let\firstpoint\rightborderpoint%
- \let\secondpoint\topborderpoint%
- \else%
- \ifdim\externalangle pt<\angletoleftpoint pt\relax%
- \let\firstpoint\topborderpoint%
- \let\secondpoint\leftborderpoint%
- \else%
- \ifdim\externalangle pt<\angletobottompoint pt\relax%
- \let\firstpoint\leftborderpoint%
- \let\secondpoint\bottomborderpoint%
- \else%
- \let\firstpoint\rightborderpoint%
- \let\secondpoint\bottomborderpoint%
- \fi%
- \fi%
- \fi%
- \fi%
- \else%
- \ifdim\externalangle pt<\angletotoppoint pt\relax%
- \let\firstpoint\rightborderpoint%
- \let\secondpoint\topborderpoint%
- \else%
- \ifdim\externalangle pt<\angletoleftpoint pt\relax%
- \let\firstpoint\leftborderpoint%
- \let\secondpoint\topborderpoint%
- \else%
- \ifdim\externalangle pt<\angletobottompoint pt\relax%
- \let\firstpoint\bottomborderpoint%
- \let\secondpoint\leftborderpoint%
- \else%
- \ifdim\externalangle pt<\angletorightpoint pt\relax%
- \let\firstpoint\rightborderpoint%
- \let\secondpoint\bottomborderpoint%
- \else%
- \let\firstpoint\rightborderpoint%
- \let\secondpoint\topborderpoint%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \pgfpointintersectionoflines{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
- {\firstpoint}{\secondpoint}%
- }
-}
+ \pgfmathcos@{\halfuppervertexangle}%
+ \pgf@yc\pgfmathresult\pgf@yc%
+ \pgf@yc-\cosechalfuppervertexangle\pgf@yc%
+ \advance\pgf@yc\cosechalfuppervertexangle\pgf@x%
+ \edef\deltay{\the\pgf@yc}%
+ %
+ % Now calculate the height of the kite...
+ %
+ \advance\pgf@ya-\pgf@yc%
+ %
+ % ...and the depth.
+ %
+ \advance\pgf@yb\pgf@yc%
+ %
+ % Get the half width of the widest part of the kite.
+ %
+ \pgfmathtan@{\halfuppervertexangle}%
+ \pgf@xa\pgfmathresult\pgf@ya%
+ \else%
+ \multiply\pgf@x2\relax%
+ \multiply\pgf@y2\relax%
+ %
+ % Get the rotation (with rounding).
+ %
+ \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
+ \afterassignment\pgfmath@gobbletilpgfmath@%
+ \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
+ \advance\c@pgf@counta45\relax%
+ \divide\c@pgf@counta90\relax%
+ \multiply\c@pgf@counta90\relax%
+ \ifnum\c@pgf@counta<0\relax%
+ \advance\c@pgf@counta360\relax%
+ \fi%
+ \edef\rotate{\the\c@pgf@counta}%
+ %
+ % Calculate the width and height of the node
+ % contents, according to any border rotation.
+ %
+ \ifnum\c@pgf@counta=90\relax%
+ \pgf@xc\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xc%
+ \else%
+ \ifnum\c@pgf@counta=270\relax%
+ \pgf@xc\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xc%
+ \fi%
+ \fi%
+ %
+ % The node contents (total height y) extends a distance ya into the
+ % upper isosceles triangle of the kite and a distance yb into the
+ % lower isosceles triangle. Thus, the following relationships hold:
+ %
+ % ya/yb = tan(b/2)/tan(a/2)
+ %
+ % and y = ya + yb
+ %
+ % so ya = y * sin(a/2 + b/2) / (cos(a/2) * sin(b/2))
+ %
+ % where:
+ % a = upper vertex angle.
+ % b = lower vertex angle.
+ %
+ \pgfmathadd@{\halfuppervertexangle}{\halflowervertexangle}%
+ \pgfmathsin@{\pgfmathresult}%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \pgf@ya\pgfmathresult\pgf@y%
+ \pgfmathcos@{\halfuppervertexangle}%
+ \pgf@ya\pgfmathresult\pgf@ya%
+ \pgfmathsin@{\halflowervertexangle}%
+ \pgf@ya\pgfmathresult\pgf@ya%
+ \pgf@yb\pgf@y%
+ \advance\pgf@yb-\pgf@ya%
+ %
+ % The vertical offset between the center of the node, and
+ % the intersection of the kite diagonals is given by:
+ %
+ % yc = y/2 - ya
+ %
+ \pgf@yc.5\pgf@y%
+ \advance\pgf@yc-\pgf@ya%
+ \edef\deltay{\the\pgf@yc}%
+ %
+ % Get the half width of the widest part of the kite.
+ %
+ \pgfmathtan@{\halfuppervertexangle}%
+ \pgf@xa.5\pgf@x%
+ \advance\pgf@xa\pgfmathresult\pgf@ya%
+ %
+ % Now calculate the height of the kite...
+ %
+ \pgf@xb.5\pgf@x%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \advance\pgf@ya\pgfmathresult\pgf@xb%
+ %
+ % ...and the depth.
+ %
+ \pgfmathtan@{\halflowervertexangle}%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \advance\pgf@yb\pgfmathresult\pgf@xb%
+ \fi%
+ %
+ % Take into account minimum height and width.
+ %
+ % ya is the kite height.
+ % yb is the kite depth.
+ % xa is the kite (half) width.
+ %
+ \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/minimum height}}%
+ \pgf@y\pgf@ya%
+ \advance\pgf@y\pgf@yb%
+ \ifdim\pgf@y<\pgf@yc%
+ \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@y}}%
+ \pgf@yc\pgfmathresult\pgf@yc%
+ \pgf@xa\pgfmath@tonumber{\pgf@yc}\pgf@xa%
+ \pgf@ya\pgfmath@tonumber{\pgf@yc}\pgf@ya%
+ \pgf@yb\pgfmath@tonumber{\pgf@yc}\pgf@yb%
+ \fi%
+ \pgf@x2.0\pgf@xa%
+ \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgf@x<\pgf@xc%
+ \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@x}}%
+ \pgf@xc\pgfmathresult\pgf@xc%
+ \pgf@xa\pgfmath@tonumber{\pgf@xc}\pgf@xa%
+ \pgf@ya\pgfmath@tonumber{\pgf@xc}\pgf@ya%
+ \pgf@yb\pgfmath@tonumber{\pgf@xc}\pgf@yb%
+ \fi%
+ \edef\kitehalfwidth{\the\pgf@xa}%
+ \edef\kiteheight{\the\pgf@ya}%
+ \edef\kitedepth{\the\pgf@yb}%
+ %
+ % Calculate the basic points on the kite (for the background path).
+ %
+ \pgfextract@process\toppoint{%
+ \centerpoint%
+ \advance\pgf@y\deltay\relax%
+ \advance\pgf@y\kiteheight%
+ }%
+ \pgfextract@process\bottompoint{%
+ \centerpoint%
+ \advance\pgf@y\deltay\relax%
+ \advance\pgf@y-\kitedepth%
+ }%
+ \pgfextract@process\leftpoint{%
+ \centerpoint%
+ \advance\pgf@y\deltay\relax%
+ \advance\pgf@x-\kitehalfwidth%
+ }%
+ \pgfextract@process\rightpoint{%
+ \centerpoint%
+ \advance\pgf@y\deltay\relax%
+ \advance\pgf@x\kitehalfwidth%
+ }%
+ %
+ % Now calculate the miter length. At the top...
+ %
+ \pgfmathsin@{\halfuppervertexangle}%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \pgf@y\outersep\relax%
+ \pgf@y\pgfmathresult\pgf@y%
+ \edef\topmiter{\the\pgf@y}%
+ %
+ % ...at the bottom...
+ %
+ \pgfmathsin@{\halflowervertexangle}%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \pgf@y\outersep\relax%
+ \pgf@y\pgfmathresult\pgf@y%
+ \edef\bottommiter{\the\pgf@y}%
+ %
+ % ...to the right...
+ %
+ \pgfmathsubtract@{180}{\halflowervertexangle}%
+ \pgfmathsubtract@{\pgfmathresult}{\halfuppervertexangle}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \pgfmathsin@{\pgfmathresult}%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \pgf@xa\outersep\relax%
+ \pgf@xa\pgfmathresult\pgf@xa%
+ \pgfmathsubtract@{\halfuppervertexangle}{\halflowervertexangle}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \let\angle\pgfmathresult%
+ \pgfextract@process\rightmiter{%
+ \pgfqpointpolar{\angle}{\the\pgf@xa}%
+ }%
+ %
+ % ...and to the left.
+ %
+ \pgfmathsubtract@{180}{\angle}%
+ \let\angle\pgfmathresult%
+ \pgfextract@process\leftmiter{%
+ \pgfqpointpolar{\angle}{\the\pgf@xa}%
+ }%
+ %
+ % Create the border points.
+ %
+ \pgfextract@process\topborderpoint{%
+ \toppoint%
+ \advance\pgf@y\topmiter\relax%
+ }%
+ \pgfextract@process\bottomborderpoint{%
+ \bottompoint%
+ \advance\pgf@y-\bottommiter\relax%
+ }%
+ \pgfextract@process\leftborderpoint{%
+ \leftpoint%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \leftmiter%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgfextract@process\rightborderpoint{%
+ \rightpoint%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \rightmiter%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ %
+ % Get the angle from the \centerpoint to the *unrotated points*.
+ %
+ \pgfmathanglebetweenpoints{\centerpoint}{\topborderpoint}%
+ \let\angletotoppoint\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\leftborderpoint}%
+ \let\angletoleftpoint\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\bottomborderpoint}%
+ \let\angletobottompoint\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\rightborderpoint}%
+ \let\angletorightpoint\pgfmathresult%
+ %
+ % ...from the *inversely rotated* \basepoint...
+ %
+ \pgfextract@process\rotatedbasepoint{%
+ \pgfmathrotatepointaround{\basepoint}{\centerpoint}{-\rotate}%
+ }%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\topborderpoint}%
+ \let\baseangletotoppoint\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\leftborderpoint}%
+ \let\baseangletoleftpoint\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\bottomborderpoint}%
+ \let\baseangletobottompoint\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\rightborderpoint}%
+ \let\baseangletorightpoint\pgfmathresult%
+ %
+ % ...and from the *inversely rotated* \midpoint.
+ %
+ \pgfextract@process\rotatedmidpoint{%
+ \pgfmathrotatepointaround{\midpoint}{\centerpoint}{-\rotate}%
+ }%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\topborderpoint}%
+ \let\midangletotoppoint\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\leftborderpoint}%
+ \let\midangletoleftpoint\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\bottomborderpoint}%
+ \let\midangletobottompoint\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\rightborderpoint}%
+ \let\midangletorightpoint\pgfmathresult%
+ %
+ % Calculate a radius guaranteed to be outside the kite.
+ %
+ \pgfextractx\pgf@xa{\pgfpointdiff{\leftborderpoint}{\rightborderpoint}}%
+ \ifdim\pgf@xa<0pt\relax%
+ \pgf@xa-\pgf@xa%
+ \fi%
+ \pgfextracty\pgf@ya{\pgfpointdiff{\topborderpoint}{\bottomborderpoint}}%
+ \ifdim\pgf@ya<0pt\relax%
+ \pgf@ya-\pgf@ya%
+ \fi%
+ \ifdim\pgf@ya>\pgf@xa%
+ \edef\externalradius{\the\pgf@ya}%
+ \else%
+ \edef\externalradius{\the\pgf@xa}%
+ \fi%
+ %
+ % Now rotate the points...
+ %
+ \pgfextract@process\toppoint{%
+ \pgfmathrotatepointaround{\toppoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\bottompoint{%
+ \pgfmathrotatepointaround{\bottompoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\leftpoint{%
+ \pgfmathrotatepointaround{\leftpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\rightpoint{%
+ \pgfmathrotatepointaround{\rightpoint}{\centerpoint}{\rotate}%
+ }%
+ %
+ % ...and the border points.
+ %
+ \pgfextract@process\topborderpoint{%
+ \pgfmathrotatepointaround{\topborderpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\bottomborderpoint{%
+ \pgfmathrotatepointaround{\bottomborderpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\leftborderpoint{%
+ \pgfmathrotatepointaround{\leftborderpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\rightborderpoint{%
+ \pgfmathrotatepointaround{\rightborderpoint}{\centerpoint}{\rotate}%
+ }%
+ %
+ % Now save it all.
+ %
+ \addtosavedmacro{\rotate}%
+ \addtosavedmacro{\externalradius}%
+ %
+ \addtosavedmacro\toppoint%
+ \addtosavedmacro\bottompoint%
+ \addtosavedmacro\leftpoint%
+ \addtosavedmacro\rightpoint%
+ %
+ \addtosavedmacro\topborderpoint%
+ \addtosavedmacro\bottomborderpoint%
+ \addtosavedmacro\leftborderpoint%
+ \addtosavedmacro\rightborderpoint%
+ %
+ \addtosavedmacro\angletotoppoint%
+ \addtosavedmacro\angletobottompoint%
+ \addtosavedmacro\angletoleftpoint%
+ \addtosavedmacro\angletorightpoint%
+ %
+ \addtosavedmacro\baseangletotoppoint%
+ \addtosavedmacro\baseangletobottompoint%
+ \addtosavedmacro\baseangletoleftpoint%
+ \addtosavedmacro\baseangletorightpoint%
+ %
+ \addtosavedmacro\midangletotoppoint%
+ \addtosavedmacro\midangletobottompoint%
+ \addtosavedmacro\midangletoleftpoint%
+ \addtosavedmacro\midangletorightpoint%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{base}{\basepoint}%
+ \anchor{base west}{%
+ \installkiteparameters%
+ \let\pgf@kiteanchorborderreferencepoint\basepoint%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{base east}{%
+ \installkiteparameters%
+ \let\pgf@kiteanchorborderreferencepoint\basepoint%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid west}{%
+ \installkiteparameters%
+ \let\pgf@kiteanchorborderreferencepoint\midpoint%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{mid east}{%
+ \installkiteparameters%
+ \let\pgf@kiteanchorborderreferencepoint\midpoint%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{north}{%
+ \installkiteparameters%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{0pt}{\externalradius}}%
+ }%
+ \anchor{south}{%
+ \installkiteparameters%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{0pt}{-\externalradius}}%
+ }%
+ \anchor{east}{%
+ \installkiteparameters%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{west}{%
+ \installkiteparameters%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{north east}{%
+ \installkiteparameters%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{\externalradius}{\externalradius}}%
+ }%
+ \anchor{south west}{%
+ \installkiteparameters%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{-\externalradius}{-\externalradius}}%
+ }%
+ \anchor{south east}{%
+ \installkiteparameters%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{\externalradius}{-\externalradius}}%
+ }%
+ \anchor{north west}{%
+ \installkiteparameters%
+ \csname pgf@anchor@kite@border\endcsname{\pgfqpoint{-\externalradius}{\externalradius}}%
+ }%
+ \anchor{upper vertex}{%
+ \installkiteparameters%
+ \topborderpoint}%
+ \anchor{lower vertex}{%
+ \installkiteparameters%
+ \bottomborderpoint}%
+ \anchor{left vertex}{%
+ \installkiteparameters%
+ \leftborderpoint}%
+ \anchor{right vertex}{%
+ \installkiteparameters%
+ \rightborderpoint}%
+ \anchor{upper left side}{%
+ \installkiteparameters%
+ \pgfpointlineattime{0.5}{\topborderpoint}{\leftborderpoint}}%
+ \anchor{lower left side}{%
+ \installkiteparameters%
+ \pgfpointlineattime{0.5}{\bottomborderpoint}{\leftborderpoint}}%
+ \anchor{upper right side}{%
+ \installkiteparameters%
+ \pgfpointlineattime{0.5}{\topborderpoint}{\rightborderpoint}}%
+ \anchor{lower right side}{%
+ \installkiteparameters%
+ \pgfpointlineattime{0.5}{\bottomborderpoint}{\rightborderpoint}}%
+ \backgroundpath{%
+ \installkiteparameters%
+ \pgfpathmoveto{\toppoint}%
+ \pgfpathlineto{\leftpoint}%
+ \pgfpathlineto{\bottompoint}%
+ \pgfpathlineto{\rightpoint}%
+ \pgfpathclose%
+ }%
+ \anchorborder{%
+ %
+ % Save x and y.
+ %
+ \edef\externalx{\the\pgf@x}%
+ \edef\externaly{\the\pgf@y}%
+ %
+ % This allows anchors base east, base west, mid east and mid west,
+ % to redefine the `center' of the node to correctly calculate the
+ % border points.
+ %
+ \pgfutil@ifundefined{pgf@kiteanchorborderreferencepoint}%
+ {\let\referencepoint\centerpoint}%
+ {\let\referencepoint\pgf@kiteanchorborderreferencepoint}%
+ %
+ % Adjust the location of the external
+ % point relative to the reference point.
+ %
+ \referencepoint%
+ \pgf@xa\externalx\relax%
+ \pgf@ya\externaly\relax%
+ \advance\pgf@xa\pgf@x%
+ \advance\pgf@ya\pgf@y%
+ \edef\externalx{\the\pgf@xa}%
+ \edef\externaly{\the\pgf@ya}%
+ %
+ % Install the required points and angles.
+ %
+ \installkiteparameters%
+ %
+ % Get the angle of the external point relative to \referencepoint.
+ %
+ \pgfmathanglebetweenpoints{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
+ %
+ % *Subtract* the rotation from the external angle.
+ %
+ \pgfmathsubtract@{\pgfmathresult}{\rotate}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \let\externalangle\pgfmathresult%
+ \ifx\referencepoint\basepoint%
+ \let\angletotoppoint\baseangletotoppoint%
+ \let\angletobottompoint\baseangletobottompoint%
+ \let\angletoleftpoint\baseangletoleftpoint%
+ \let\angletorightpoint\baseangletorightpoint%
+ \else%
+ \ifx\referencepoint\midpoint%
+ \let\angletotoppoint\midangletotoppoint%
+ \let\angletobottompoint\midangletobottompoint%
+ \let\angletoleftpoint\midangletoleftpoint%
+ \let\angletorightpoint\midangletorightpoint%
+ \fi\fi%
+ %
+ % Depending on the rotation, the angle to \rightborderpoint
+ % may be smaller than the angle to \topborderpoint.
+ %
+ \ifdim\angletorightpoint pt<\angletotoppoint pt\relax%
+ \ifdim\externalangle pt<\angletorightpoint pt\relax%
+ \let\firstpoint\rightborderpoint%
+ \let\secondpoint\bottomborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletotoppoint pt\relax%
+ \let\firstpoint\rightborderpoint%
+ \let\secondpoint\topborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletoleftpoint pt\relax%
+ \let\firstpoint\topborderpoint%
+ \let\secondpoint\leftborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletobottompoint pt\relax%
+ \let\firstpoint\leftborderpoint%
+ \let\secondpoint\bottomborderpoint%
+ \else%
+ \let\firstpoint\rightborderpoint%
+ \let\secondpoint\bottomborderpoint%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \else%
+ \ifdim\externalangle pt<\angletotoppoint pt\relax%
+ \let\firstpoint\rightborderpoint%
+ \let\secondpoint\topborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletoleftpoint pt\relax%
+ \let\firstpoint\leftborderpoint%
+ \let\secondpoint\topborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletobottompoint pt\relax%
+ \let\firstpoint\bottomborderpoint%
+ \let\secondpoint\leftborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletorightpoint pt\relax%
+ \let\firstpoint\rightborderpoint%
+ \let\secondpoint\bottomborderpoint%
+ \else%
+ \let\firstpoint\rightborderpoint%
+ \let\secondpoint\topborderpoint%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \pgfpointintersectionoflines{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
+ {\firstpoint}{\secondpoint}%
+ }%
+}%
@@ -2999,545 +2997,545 @@
%
\pgfkeys{/pgf/.cd,
- dart tip angle/.initial=45,
- dart tail angle/.initial=135
-}
+ dart tip angle/.initial=45,
+ dart tail angle/.initial=135,
+}%
% Shape dart.
%
\pgfdeclareshape{dart}{%
- \savedmacro\installdartparameters{%
- %
- % Get the halved angles (more useful).
- %
- \pgfmathdivide{\pgfkeysvalueof{/pgf/dart tip angle}}{2}%
- \let\halftipangle\pgfmathresult%
- \pgfmathdivide{\pgfkeysvalueof{/pgf/dart tail angle}}{2}%
- \let\halftailangle\pgfmathresult%
- %
- % Calculate some common results.
- %
- \pgfmathcot@{\halftipangle}%
- \let\cothalftipangle\pgfmathresult%
- %
- % Get the larger of the outer sep.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgf@x<\pgf@y%
- \pgf@x\pgf@y%
- \fi%
- \edef\outersep{\the\pgf@x}%
- %
- % Calculate the centre, base and mid points of the node.
- %
- \pgfextract@process\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \pgfextract@process\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt\relax%
- }%
- \pgfextract@process\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- %
- % Get the (halved) dimension of the node.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- %
- % Get the length of the dart tip.
- %
- \ifpgfshapeborderusesincircle%
- %
- % Get the (unrounded) rotation.
- %
- \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
- %
- % Get the radius of the incircle.
- %
- \ifdim\pgf@x<\pgf@y%
- \pgf@x\pgf@y%
- \fi%
- \pgf@x1.41421\pgf@x%
- %
- % Calculate the length of the dart tip.
- %
- \pgf@xa\cothalftipangle\pgf@x%
- \advance\pgf@xa\pgf@x%
- \else%
- %
- % Get the rotation (with rounding).
- %
- \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
- \advance\c@pgf@counta45\relax%
- \divide\c@pgf@counta90\relax%
- \multiply\c@pgf@counta90\relax%
- \ifnum\c@pgf@counta<0\relax%
- \advance\c@pgf@counta360\relax%
- \fi%
- \edef\rotate{\the\c@pgf@counta}%
- %
- % Flip the width and height of the node contents,
- % according to the appropriate border rotation.
- %
- \ifnum\c@pgf@counta=90\relax%
- \pgf@xc\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xc%
- \else%
- \ifnum\c@pgf@counta=270\relax%
- \pgf@xc\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xc%
- \fi%
- \fi%
- %
- % Calculate the length of the dart tip.
- %
- \pgf@xa\cothalftipangle\pgf@y%
- \advance\pgf@xa2.0\pgf@x%
- \fi%
- %
- % Get the (half) separation of the dart tails.
- %
- \pgfmathsubtract@{\halftailangle}{\halftipangle}%
- \pgfmathcosec@{\pgfmathresult}%
- \pgf@ya\pgfmathresult\pgf@xa%
- \pgfmathsin@{\halftipangle}%
- \pgf@ya\pgfmathresult\pgf@ya%
- \pgfmathcos@{\halftipangle}%
- \pgf@ya\pgfmathresult\pgf@ya%
- %
- % Get the total length of the dart...
- %
- \pgf@xb\cothalftipangle\pgf@ya%
- %
- % and hence the length of the tails.
- %
- \pgf@xc-\pgf@xa%
- \advance\pgf@xc\pgf@xb%
- %
- % Adjust for minimum height (length of the dart).
- %
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@xb<\pgf@y%
- \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@xb}}%
- \pgf@y\pgfmathresult\pgf@y%
- \pgf@xa\pgfmath@tonumber{\pgf@y}\pgf@xa%
- \pgf@xc\pgfmath@tonumber{\pgf@y}\pgf@xc%
- \pgf@ya\pgfmath@tonumber{\pgf@y}\pgf@ya%
- \pgf@x\pgfmath@tonumber{\pgf@y}\pgf@x%
- \fi%
- %
- % Adjust for minimum width (tail separation length).
- %
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/minimum width}}%
- \pgf@y.5\pgf@y%
- \ifdim\pgf@ya<\pgf@y%
- \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@ya}}%
- \pgf@ya\pgf@y%
- \pgf@y\pgfmathresult\pgf@y%
- \pgf@xa\pgfmath@tonumber{\pgf@y}\pgf@xa%
- \pgf@xc\pgfmath@tonumber{\pgf@y}\pgf@xc%
- \pgf@x\pgfmath@tonumber{\pgf@y}\pgf@x%
- \fi%
- \edef\dartlength{\the\pgf@xa}%
- \edef\deltax{\the\pgf@x}%
- \edef\taillength{\the\pgf@xc}%
- \edef\halftailseparation{\the\pgf@ya}
- %
- % Create the basic points on the dart (for the backgroundo path).
- %
- \pgfextract@process\tippoint{%
- \centerpoint%
- \advance\pgf@x\dartlength\relax%
- \advance\pgf@x-\deltax\relax%
- }%
- \pgfextract@process\tailcenterpoint{%
- \centerpoint%
- \advance\pgf@x-\deltax\relax%
- }%
- \pgfextract@process\lefttailpoint{%
- \centerpoint%
- \advance\pgf@x-\deltax\relax%
- \advance\pgf@x-\taillength\relax%
- \advance\pgf@y\halftailseparation\relax%
- }%
- \pgfextract@process\righttailpoint{%
- \centerpoint%
- \advance\pgf@x-\deltax\relax%
- \advance\pgf@x-\taillength\relax%
- \advance\pgf@y-\halftailseparation\relax%
- }%
- %
- % Calculate the miter vectors. At the dart tip...
- %
- \pgfextract@process\tipmiter{%
- \pgfmathcosec@{\halftipangle}%
- \pgf@x\outersep\relax%
- \pgf@x\pgfmathresult\pgf@x%
- \pgf@y0pt\relax%
- }%
- %
- % ...at the tail center...
- %
- \pgfextract@process\tailcentermiter{%
- \pgfmathcosec@{\halftailangle}%
- \pgf@x-\outersep\relax%
- \pgf@x\pgfmathresult\pgf@x%
- \pgf@y0pt\relax%
- }%
- %
- % ...at the left tail...
- %
- \pgfmathsubtract@{\halftailangle}{\halftipangle}%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \let\angle\pgfmathresult%
- \pgfmathcosec@{\pgfmathresult}%
- \pgf@x\outersep\relax%
- \pgf@x\pgfmathresult\pgf@x%
- \pgfmathadd@{\angle}{90}%
- \pgfmathsubtract{\pgfmathresult}{\halftailangle}%
- \pgfmathsincos@{\pgfmathresult}%
- \pgf@ya\pgfmathresultx\pgf@x%
- \pgf@xa\pgfmathresulty\pgf@x%
- \pgfextract@process\lefttailmiter{%
- \pgf@x-\pgf@xa%
- \pgf@y\pgf@ya%
- }%
- %
- % ...and the right tail.
- %
- \pgfextract@process\righttailmiter{%
- \pgf@x-\pgf@xa%
- \pgf@y-\pgf@ya%
- }%
- %
- % Create the border points.
- %
- \pgfextract@process\tipborderpoint{%
- \pgfpointadd{\tippoint}{\tipmiter}
- }%
- \pgfextract@process\tailcenterborderpoint{%
- \pgfpointadd{\tailcenterpoint}{\tailcentermiter}%
- }%
- \pgfextract@process\lefttailborderpoint{%
- \pgfpointadd{\lefttailpoint}{\lefttailmiter}%
- }%
- \pgfextract@process\righttailborderpoint{%
- \pgfpointadd{\righttailpoint}{\righttailmiter}%
- }%
- %
- % Calculate the angles between the centerpoint
- % and the *unrotated* borderpoints.
- %
- \pgfmathanglebetweenpoints{\centerpoint}{\tipborderpoint}%
- \let\angletotip\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\tailcenterborderpoint}%
- \let\angletotailcenter\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\lefttailborderpoint}%
- \let\angletolefttail\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\righttailborderpoint}%
- \let\angletorighttail\pgfmathresult%
- %
- % Calculate the angles between the *inversly rotated*
- % basepoint and the *unrotated* borderpoints.
- %
- \pgfextract@process\rotatedbasepoint{%
- \pgfmathrotatepointaround{\basepoint}{\centerpoint}{-\rotate}%
- }%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\tipborderpoint}%
- \let\baseangletotip\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\tailcenterborderpoint}%
- \let\baseangletotailcenter\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\lefttailborderpoint}%
- \let\baseangletolefttail\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedbasepoint}{\righttailborderpoint}%
- \let\baseangletorighttail\pgfmathresult%
- %
- % Calculate the angles between the *inversly rotated*
- % midpoint and the *unrotated* borderpoints.
- %
- \pgfextract@process\rotatedmidpoint{%
- \pgfmathrotatepointaround{\midpoint}{\centerpoint}{-\rotate}%
- }%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\tipborderpoint}%
- \let\midangletotip\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\tailcenterborderpoint}%
- \let\midangletotailcenter\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\lefttailborderpoint}%
- \let\midangletolefttail\pgfmathresult%
- \pgfmathanglebetweenpoints{\rotatedmidpoint}{\righttailborderpoint}%
- \let\midangletorighttail\pgfmathresult%
- %
- % Rotate the background path points.
- %
- \pgfextract@process\tippoint{%
- \pgfmathrotatepointaround{\tippoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\tailcenterpoint{%
- \pgfmathrotatepointaround{\tailcenterpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\lefttailpoint{%
- \pgfmathrotatepointaround{\lefttailpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\righttailpoint{%
- \pgfmathrotatepointaround{\righttailpoint}{\centerpoint}{\rotate}%
- }%
- %
- % Calculate a radius guaranteed to be outside the dart.
- %
- \pgfextractx\pgf@xa{\pgfpointdiff{\lefttailborderpoint}{\tipborderpoint}}%
- \pgfextracty\pgf@ya{\pgfpointdiff{\lefttailborderpoint}{\righttailborderpoint}}%
- \ifdim\pgf@xa<0pt\relax%
- \pgf@xa-\pgf@xa%
- \fi%
- \ifdim\pgf@ya<0pt\relax%
- \pgf@ya-\pgf@ya%
- \fi%
- \ifdim\pgf@xa>\pgf@ya%
- \edef\externalradius{\the\pgf@xa}%
- \else%
- \edef\externalradius{\the\pgf@ya}%
- \fi%
- %
- % Rotate the border anchor points.
- %
- \pgfextract@process\tipborderpoint{%
- \pgfmathrotatepointaround{\tipborderpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\tailcenterborderpoint{%
- \pgfmathrotatepointaround{\tailcenterborderpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\lefttailborderpoint{%
- \pgfmathrotatepointaround{\lefttailborderpoint}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\righttailborderpoint{%
- \pgfmathrotatepointaround{\righttailborderpoint}{\centerpoint}{\rotate}%
- }%
- %
- % Save everything.
- %
- \addtosavedmacro{\rotate}%
- \addtosavedmacro{\externalradius}%
- %
- \addtosavedmacro{\tippoint}%
- \addtosavedmacro{\tailcenterpoint}%
- \addtosavedmacro{\lefttailpoint}%
- \addtosavedmacro{\righttailpoint}%
- %
- \addtosavedmacro{\tipborderpoint}%
- \addtosavedmacro{\tailcenterborderpoint}%
- \addtosavedmacro{\lefttailborderpoint}%
- \addtosavedmacro{\righttailborderpoint}%
- %
- \addtosavedmacro{\angletotip}%
- \addtosavedmacro{\angletotailcenter}%
- \addtosavedmacro{\angletolefttail}%
- \addtosavedmacro{\angletorighttail}%
- %
- \addtosavedmacro{\baseangletotip}%
- \addtosavedmacro{\baseangletotailcenter}%
- \addtosavedmacro{\baseangletolefttail}%
- \addtosavedmacro{\baseangletorighttail}%
- %
- \addtosavedmacro{\midangletotip}%
- \addtosavedmacro{\midangletotailcenter}%
- \addtosavedmacro{\midangletolefttail}%
- \addtosavedmacro{\midangletorighttail}%
- }
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt\relax%
- }%
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- \anchor{center}{\centerpoint}%
- \anchor{base}{\basepoint}%
- \anchor{base west}{%
- \installdartparameters%
- \let\pgf@dartanchorborderreferencepoint\basepoint%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
- \anchor{base east}{%
- \installdartparameters%
- \let\pgf@dartanchorborderreferencepoint\basepoint%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{mid}{\midpoint}%
- \anchor{mid west}{%
- \installdartparameters%
- \let\pgf@dartanchorborderreferencepoint\midpoint%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
- \anchor{mid east}{%
- \installdartparameters%
- \let\pgf@dartanchorborderreferencepoint\midpoint%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{north}{%
- \installdartparameters%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{0pt}{\externalradius}}%
- }
- \anchor{south}{%
- \installdartparameters%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{0pt}{-\externalradius}}%
- }
- \anchor{east}{%
- \installdartparameters%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
- \anchor{west}{%
- \installdartparameters%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
- \anchor{north east}{%
- \installdartparameters%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{\externalradius}{\externalradius}}%
- }
- \anchor{south west}{%
- \installdartparameters%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{-\externalradius}{-\externalradius}}%
- }
- \anchor{south east}{%
- \installdartparameters%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{\externalradius}{-\externalradius}}%
- }
- \anchor{north west}{%
- \installdartparameters%
- \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{-\externalradius}{\externalradius}}%
- }
- \anchor{tip}{%
- \installdartparameters%
- \tipborderpoint}
- \anchor{left tail}{%
- \installdartparameters%
- \lefttailborderpoint}
- \anchor{right tail}{%
- \installdartparameters%
- \righttailborderpoint}
- \anchor{tail center}{%
- \installdartparameters%
- \tailcenterborderpoint}
- \anchor{left side}{%
- \installdartparameters%
- \pgfpointlineattime{0.5}{\tipborderpoint}{\lefttailborderpoint}}
- \anchor{right side}{%
- \installdartparameters%
- \pgfpointlineattime{0.5}{\tipborderpoint}{\righttailborderpoint}}
- \backgroundpath{%
- \installdartparameters%
- \pgfpathmoveto{\tippoint}%
- \pgfpathlineto{\lefttailpoint}%
- \pgfpathlineto{\tailcenterpoint}%
- \pgfpathlineto{\righttailpoint}%
- \pgfpathclose%
- }
- \anchorborder{%
- %
- % Save x and y.
- %
- \edef\externalx{\the\pgf@x}%
- \edef\externaly{\the\pgf@y}%
- %
- % This allows anchors base east, base west, mid east and mid west,
- % to redefine the `center' of the node to correctly calculate the
- % border points.
- %
- \pgfutil@ifundefined{pgf@dartanchorborderreferencepoint}%
- {\let\referencepoint\centerpoint}%
- {\let\referencepoint\pgf@dartanchorborderreferencepoint}%
- %
- % Adjust the location of the external
- % point relative to the reference point.
- %
- \referencepoint%
- \pgf@xa\externalx\relax%
- \pgf@ya\externaly\relax%
- \advance\pgf@xa\pgf@x%
- \advance\pgf@ya\pgf@y%
- \edef\externalx{\the\pgf@xa}%
- \edef\externaly{\the\pgf@ya}%
- %
- % Install the required points and angles.
- %
- \installdartparameters%
- %
- % Get the angle of the external point relative to \referencepoint.
- %
- \pgfmathanglebetweenpoints{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
- %
- % *Subtract* the rotation from the external angle.
- %
- \pgfmathsubtract@{\pgfmathresult}{\rotate}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \let\externalangle\pgfmathresult%
- %
- % Get the set of angles for the appropriate border point.
- %
- \ifx\referencepoint\basepoint%
- \let\angletotip\baseangletotip%
- \let\angletotailcenter\baseangletotailcenter%
- \let\angletolefttail\baseangletolefttail%
- \let\angletorighttail\baseangletorighttail%
- \else%
- \ifx\referencepoint\midpoint%
- \let\angletotip\midangletotip%
- \let\angletotailcenter\midangletotailcenter%
- \let\angletolefttail\midangletolefttail%
- \let\angletorighttail\midangletorighttail%
- \fi\fi%
- %
- % Locate the appropriate line on the border...
- %
- \ifdim\externalangle pt<\angletotip pt\relax%
- \let\firstpoint\tipborderpoint%
- \let\secondpoint\righttailborderpoint%
- \else%
- \ifdim\externalangle pt<\angletolefttail pt\relax%
- \let\firstpoint\lefttailborderpoint%
- \let\secondpoint\tipborderpoint%
- \else%
- \ifdim\externalangle pt<\angletotailcenter pt\relax%
- \let\firstpoint\lefttailborderpoint%
- \let\secondpoint\tailcenterborderpoint%
- \else%
- \ifdim\externalangle pt<\angletorighttail pt\relax%
- \let\firstpoint\righttailborderpoint%
- \let\secondpoint\tailcenterborderpoint%
- \else%
- \let\firstpoint\tipborderpoint%
- \let\secondpoint\righttailborderpoint%
- \fi%
- \fi%
- \fi%
- \fi%
- %
- % ...and thus the point on the border.
- %
- \pgfpointintersectionoflines{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
- {\firstpoint}{\secondpoint}%
- }%
-}
+ \savedmacro\installdartparameters{%
+ %
+ % Get the halved angles (more useful).
+ %
+ \pgfmathdivide{\pgfkeysvalueof{/pgf/dart tip angle}}{2}%
+ \let\halftipangle\pgfmathresult%
+ \pgfmathdivide{\pgfkeysvalueof{/pgf/dart tail angle}}{2}%
+ \let\halftailangle\pgfmathresult%
+ %
+ % Calculate some common results.
+ %
+ \pgfmathcot@{\halftipangle}%
+ \let\cothalftipangle\pgfmathresult%
+ %
+ % Get the larger of the outer sep.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@x<\pgf@y%
+ \pgf@x\pgf@y%
+ \fi%
+ \edef\outersep{\the\pgf@x}%
+ %
+ % Calculate the centre, base and mid points of the node.
+ %
+ \pgfextract@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \pgfextract@process\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }%
+ \pgfextract@process\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ %
+ % Get the (halved) dimension of the node.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ %
+ % Get the length of the dart tip.
+ %
+ \ifpgfshapeborderusesincircle%
+ %
+ % Get the (unrounded) rotation.
+ %
+ \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ %
+ % Get the radius of the incircle.
+ %
+ \ifdim\pgf@x<\pgf@y%
+ \pgf@x\pgf@y%
+ \fi%
+ \pgf@x1.41421\pgf@x%
+ %
+ % Calculate the length of the dart tip.
+ %
+ \pgf@xa\cothalftipangle\pgf@x%
+ \advance\pgf@xa\pgf@x%
+ \else%
+ %
+ % Get the rotation (with rounding).
+ %
+ \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
+ \afterassignment\pgfmath@gobbletilpgfmath@%
+ \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
+ \advance\c@pgf@counta45\relax%
+ \divide\c@pgf@counta90\relax%
+ \multiply\c@pgf@counta90\relax%
+ \ifnum\c@pgf@counta<0\relax%
+ \advance\c@pgf@counta360\relax%
+ \fi%
+ \edef\rotate{\the\c@pgf@counta}%
+ %
+ % Flip the width and height of the node contents,
+ % according to the appropriate border rotation.
+ %
+ \ifnum\c@pgf@counta=90\relax%
+ \pgf@xc\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xc%
+ \else%
+ \ifnum\c@pgf@counta=270\relax%
+ \pgf@xc\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xc%
+ \fi%
+ \fi%
+ %
+ % Calculate the length of the dart tip.
+ %
+ \pgf@xa\cothalftipangle\pgf@y%
+ \advance\pgf@xa2.0\pgf@x%
+ \fi%
+ %
+ % Get the (half) separation of the dart tails.
+ %
+ \pgfmathsubtract@{\halftailangle}{\halftipangle}%
+ \pgfmathcosec@{\pgfmathresult}%
+ \pgf@ya\pgfmathresult\pgf@xa%
+ \pgfmathsin@{\halftipangle}%
+ \pgf@ya\pgfmathresult\pgf@ya%
+ \pgfmathcos@{\halftipangle}%
+ \pgf@ya\pgfmathresult\pgf@ya%
+ %
+ % Get the total length of the dart...
+ %
+ \pgf@xb\cothalftipangle\pgf@ya%
+ %
+ % and hence the length of the tails.
+ %
+ \pgf@xc-\pgf@xa%
+ \advance\pgf@xc\pgf@xb%
+ %
+ % Adjust for minimum height (length of the dart).
+ %
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@xb<\pgf@y%
+ \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@xb}}%
+ \pgf@y\pgfmathresult\pgf@y%
+ \pgf@xa\pgfmath@tonumber{\pgf@y}\pgf@xa%
+ \pgf@xc\pgfmath@tonumber{\pgf@y}\pgf@xc%
+ \pgf@ya\pgfmath@tonumber{\pgf@y}\pgf@ya%
+ \pgf@x\pgfmath@tonumber{\pgf@y}\pgf@x%
+ \fi%
+ %
+ % Adjust for minimum width (tail separation length).
+ %
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgf@y.5\pgf@y%
+ \ifdim\pgf@ya<\pgf@y%
+ \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@ya}}%
+ \pgf@ya\pgf@y%
+ \pgf@y\pgfmathresult\pgf@y%
+ \pgf@xa\pgfmath@tonumber{\pgf@y}\pgf@xa%
+ \pgf@xc\pgfmath@tonumber{\pgf@y}\pgf@xc%
+ \pgf@x\pgfmath@tonumber{\pgf@y}\pgf@x%
+ \fi%
+ \edef\dartlength{\the\pgf@xa}%
+ \edef\deltax{\the\pgf@x}%
+ \edef\taillength{\the\pgf@xc}%
+ \edef\halftailseparation{\the\pgf@ya}
+ %
+ % Create the basic points on the dart (for the background path).
+ %
+ \pgfextract@process\tippoint{%
+ \centerpoint%
+ \advance\pgf@x\dartlength\relax%
+ \advance\pgf@x-\deltax\relax%
+ }%
+ \pgfextract@process\tailcenterpoint{%
+ \centerpoint%
+ \advance\pgf@x-\deltax\relax%
+ }%
+ \pgfextract@process\lefttailpoint{%
+ \centerpoint%
+ \advance\pgf@x-\deltax\relax%
+ \advance\pgf@x-\taillength\relax%
+ \advance\pgf@y\halftailseparation\relax%
+ }%
+ \pgfextract@process\righttailpoint{%
+ \centerpoint%
+ \advance\pgf@x-\deltax\relax%
+ \advance\pgf@x-\taillength\relax%
+ \advance\pgf@y-\halftailseparation\relax%
+ }%
+ %
+ % Calculate the miter vectors. At the dart tip...
+ %
+ \pgfextract@process\tipmiter{%
+ \pgfmathcosec@{\halftipangle}%
+ \pgf@x\outersep\relax%
+ \pgf@x\pgfmathresult\pgf@x%
+ \pgf@y0pt\relax%
+ }%
+ %
+ % ...at the tail center...
+ %
+ \pgfextract@process\tailcentermiter{%
+ \pgfmathcosec@{\halftailangle}%
+ \pgf@x-\outersep\relax%
+ \pgf@x\pgfmathresult\pgf@x%
+ \pgf@y0pt\relax%
+ }%
+ %
+ % ...at the left tail...
+ %
+ \pgfmathsubtract@{\halftailangle}{\halftipangle}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \let\angle\pgfmathresult%
+ \pgfmathcosec@{\pgfmathresult}%
+ \pgf@x\outersep\relax%
+ \pgf@x\pgfmathresult\pgf@x%
+ \pgfmathadd@{\angle}{90}%
+ \pgfmathsubtract{\pgfmathresult}{\halftailangle}%
+ \pgfmathsincos@{\pgfmathresult}%
+ \pgf@ya\pgfmathresultx\pgf@x%
+ \pgf@xa\pgfmathresulty\pgf@x%
+ \pgfextract@process\lefttailmiter{%
+ \pgf@x-\pgf@xa%
+ \pgf@y\pgf@ya%
+ }%
+ %
+ % ...and the right tail.
+ %
+ \pgfextract@process\righttailmiter{%
+ \pgf@x-\pgf@xa%
+ \pgf@y-\pgf@ya%
+ }%
+ %
+ % Create the border points.
+ %
+ \pgfextract@process\tipborderpoint{%
+ \pgfpointadd{\tippoint}{\tipmiter}
+ }%
+ \pgfextract@process\tailcenterborderpoint{%
+ \pgfpointadd{\tailcenterpoint}{\tailcentermiter}%
+ }%
+ \pgfextract@process\lefttailborderpoint{%
+ \pgfpointadd{\lefttailpoint}{\lefttailmiter}%
+ }%
+ \pgfextract@process\righttailborderpoint{%
+ \pgfpointadd{\righttailpoint}{\righttailmiter}%
+ }%
+ %
+ % Calculate the angles between the centerpoint
+ % and the *unrotated* borderpoints.
+ %
+ \pgfmathanglebetweenpoints{\centerpoint}{\tipborderpoint}%
+ \let\angletotip\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\tailcenterborderpoint}%
+ \let\angletotailcenter\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\lefttailborderpoint}%
+ \let\angletolefttail\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\righttailborderpoint}%
+ \let\angletorighttail\pgfmathresult%
+ %
+ % Calculate the angles between the *inversely rotated*
+ % basepoint and the *unrotated* borderpoints.
+ %
+ \pgfextract@process\rotatedbasepoint{%
+ \pgfmathrotatepointaround{\basepoint}{\centerpoint}{-\rotate}%
+ }%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\tipborderpoint}%
+ \let\baseangletotip\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\tailcenterborderpoint}%
+ \let\baseangletotailcenter\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\lefttailborderpoint}%
+ \let\baseangletolefttail\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedbasepoint}{\righttailborderpoint}%
+ \let\baseangletorighttail\pgfmathresult%
+ %
+ % Calculate the angles between the *inversely rotated*
+ % midpoint and the *unrotated* borderpoints.
+ %
+ \pgfextract@process\rotatedmidpoint{%
+ \pgfmathrotatepointaround{\midpoint}{\centerpoint}{-\rotate}%
+ }%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\tipborderpoint}%
+ \let\midangletotip\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\tailcenterborderpoint}%
+ \let\midangletotailcenter\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\lefttailborderpoint}%
+ \let\midangletolefttail\pgfmathresult%
+ \pgfmathanglebetweenpoints{\rotatedmidpoint}{\righttailborderpoint}%
+ \let\midangletorighttail\pgfmathresult%
+ %
+ % Rotate the background path points.
+ %
+ \pgfextract@process\tippoint{%
+ \pgfmathrotatepointaround{\tippoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\tailcenterpoint{%
+ \pgfmathrotatepointaround{\tailcenterpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\lefttailpoint{%
+ \pgfmathrotatepointaround{\lefttailpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\righttailpoint{%
+ \pgfmathrotatepointaround{\righttailpoint}{\centerpoint}{\rotate}%
+ }%
+ %
+ % Calculate a radius guaranteed to be outside the dart.
+ %
+ \pgfextractx\pgf@xa{\pgfpointdiff{\lefttailborderpoint}{\tipborderpoint}}%
+ \pgfextracty\pgf@ya{\pgfpointdiff{\lefttailborderpoint}{\righttailborderpoint}}%
+ \ifdim\pgf@xa<0pt\relax%
+ \pgf@xa-\pgf@xa%
+ \fi%
+ \ifdim\pgf@ya<0pt\relax%
+ \pgf@ya-\pgf@ya%
+ \fi%
+ \ifdim\pgf@xa>\pgf@ya%
+ \edef\externalradius{\the\pgf@xa}%
+ \else%
+ \edef\externalradius{\the\pgf@ya}%
+ \fi%
+ %
+ % Rotate the border anchor points.
+ %
+ \pgfextract@process\tipborderpoint{%
+ \pgfmathrotatepointaround{\tipborderpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\tailcenterborderpoint{%
+ \pgfmathrotatepointaround{\tailcenterborderpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\lefttailborderpoint{%
+ \pgfmathrotatepointaround{\lefttailborderpoint}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\righttailborderpoint{%
+ \pgfmathrotatepointaround{\righttailborderpoint}{\centerpoint}{\rotate}%
+ }%
+ %
+ % Save everything.
+ %
+ \addtosavedmacro{\rotate}%
+ \addtosavedmacro{\externalradius}%
+ %
+ \addtosavedmacro{\tippoint}%
+ \addtosavedmacro{\tailcenterpoint}%
+ \addtosavedmacro{\lefttailpoint}%
+ \addtosavedmacro{\righttailpoint}%
+ %
+ \addtosavedmacro{\tipborderpoint}%
+ \addtosavedmacro{\tailcenterborderpoint}%
+ \addtosavedmacro{\lefttailborderpoint}%
+ \addtosavedmacro{\righttailborderpoint}%
+ %
+ \addtosavedmacro{\angletotip}%
+ \addtosavedmacro{\angletotailcenter}%
+ \addtosavedmacro{\angletolefttail}%
+ \addtosavedmacro{\angletorighttail}%
+ %
+ \addtosavedmacro{\baseangletotip}%
+ \addtosavedmacro{\baseangletotailcenter}%
+ \addtosavedmacro{\baseangletolefttail}%
+ \addtosavedmacro{\baseangletorighttail}%
+ %
+ \addtosavedmacro{\midangletotip}%
+ \addtosavedmacro{\midangletotailcenter}%
+ \addtosavedmacro{\midangletolefttail}%
+ \addtosavedmacro{\midangletorighttail}%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{base}{\basepoint}%
+ \anchor{base west}{%
+ \installdartparameters%
+ \let\pgf@dartanchorborderreferencepoint\basepoint%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{base east}{%
+ \installdartparameters%
+ \let\pgf@dartanchorborderreferencepoint\basepoint%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid west}{%
+ \installdartparameters%
+ \let\pgf@dartanchorborderreferencepoint\midpoint%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{mid east}{%
+ \installdartparameters%
+ \let\pgf@dartanchorborderreferencepoint\midpoint%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{north}{%
+ \installdartparameters%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{0pt}{\externalradius}}%
+ }%
+ \anchor{south}{%
+ \installdartparameters%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{0pt}{-\externalradius}}%
+ }%
+ \anchor{east}{%
+ \installdartparameters%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{west}{%
+ \installdartparameters%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{north east}{%
+ \installdartparameters%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{\externalradius}{\externalradius}}%
+ }%
+ \anchor{south west}{%
+ \installdartparameters%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{-\externalradius}{-\externalradius}}%
+ }%
+ \anchor{south east}{%
+ \installdartparameters%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{\externalradius}{-\externalradius}}%
+ }%
+ \anchor{north west}{%
+ \installdartparameters%
+ \csname pgf@anchor@dart@border\endcsname{\pgfqpoint{-\externalradius}{\externalradius}}%
+ }%
+ \anchor{tip}{%
+ \installdartparameters%
+ \tipborderpoint}%
+ \anchor{left tail}{%
+ \installdartparameters%
+ \lefttailborderpoint}%
+ \anchor{right tail}{%
+ \installdartparameters%
+ \righttailborderpoint}%
+ \anchor{tail center}{%
+ \installdartparameters%
+ \tailcenterborderpoint}%
+ \anchor{left side}{%
+ \installdartparameters%
+ \pgfpointlineattime{0.5}{\tipborderpoint}{\lefttailborderpoint}}%
+ \anchor{right side}{%
+ \installdartparameters%
+ \pgfpointlineattime{0.5}{\tipborderpoint}{\righttailborderpoint}}%
+ \backgroundpath{%
+ \installdartparameters%
+ \pgfpathmoveto{\tippoint}%
+ \pgfpathlineto{\lefttailpoint}%
+ \pgfpathlineto{\tailcenterpoint}%
+ \pgfpathlineto{\righttailpoint}%
+ \pgfpathclose%
+ }%
+ \anchorborder{%
+ %
+ % Save x and y.
+ %
+ \edef\externalx{\the\pgf@x}%
+ \edef\externaly{\the\pgf@y}%
+ %
+ % This allows anchors base east, base west, mid east and mid west,
+ % to redefine the `center' of the node to correctly calculate the
+ % border points.
+ %
+ \pgfutil@ifundefined{pgf@dartanchorborderreferencepoint}%
+ {\let\referencepoint\centerpoint}%
+ {\let\referencepoint\pgf@dartanchorborderreferencepoint}%
+ %
+ % Adjust the location of the external
+ % point relative to the reference point.
+ %
+ \referencepoint%
+ \pgf@xa\externalx\relax%
+ \pgf@ya\externaly\relax%
+ \advance\pgf@xa\pgf@x%
+ \advance\pgf@ya\pgf@y%
+ \edef\externalx{\the\pgf@xa}%
+ \edef\externaly{\the\pgf@ya}%
+ %
+ % Install the required points and angles.
+ %
+ \installdartparameters%
+ %
+ % Get the angle of the external point relative to \referencepoint.
+ %
+ \pgfmathanglebetweenpoints{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
+ %
+ % *Subtract* the rotation from the external angle.
+ %
+ \pgfmathsubtract@{\pgfmathresult}{\rotate}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \let\externalangle\pgfmathresult%
+ %
+ % Get the set of angles for the appropriate border point.
+ %
+ \ifx\referencepoint\basepoint%
+ \let\angletotip\baseangletotip%
+ \let\angletotailcenter\baseangletotailcenter%
+ \let\angletolefttail\baseangletolefttail%
+ \let\angletorighttail\baseangletorighttail%
+ \else%
+ \ifx\referencepoint\midpoint%
+ \let\angletotip\midangletotip%
+ \let\angletotailcenter\midangletotailcenter%
+ \let\angletolefttail\midangletolefttail%
+ \let\angletorighttail\midangletorighttail%
+ \fi\fi%
+ %
+ % Locate the appropriate line on the border...
+ %
+ \ifdim\externalangle pt<\angletotip pt\relax%
+ \let\firstpoint\tipborderpoint%
+ \let\secondpoint\righttailborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletolefttail pt\relax%
+ \let\firstpoint\lefttailborderpoint%
+ \let\secondpoint\tipborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletotailcenter pt\relax%
+ \let\firstpoint\lefttailborderpoint%
+ \let\secondpoint\tailcenterborderpoint%
+ \else%
+ \ifdim\externalangle pt<\angletorighttail pt\relax%
+ \let\firstpoint\righttailborderpoint%
+ \let\secondpoint\tailcenterborderpoint%
+ \else%
+ \let\firstpoint\tipborderpoint%
+ \let\secondpoint\righttailborderpoint%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ %
+ % ...and thus the point on the border.
+ %
+ \pgfpointintersectionoflines{\referencepoint}{\pgfqpoint{\externalx}{\externaly}}%
+ {\firstpoint}{\secondpoint}%
+ }%
+}%
@@ -3545,476 +3543,476 @@
%
% /pgf/circular sector angle : the angle at the center of the sector.
%
-\pgfkeys{/pgf/circular sector angle/.initial=60}
+\pgfkeys{/pgf/circular sector angle/.initial=60}%
% Shape circular sector
%
\pgfdeclareshape{circular sector}{%
- \savedmacro\installcircularsectorparameters{%
- %
- % Define a \centerpoint, \basepoint and \midpoint.
- %
- \pgfextract@process\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- %
- % Get the larger of the outer sep.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgf@x<\pgf@y%
- \pgf@x\pgf@y%
- \fi%
- \edef\outersep{\the\pgf@x}%
- %
- % Half of the sector angle is more useful.
- %
- \pgfmathmod{\pgfkeysvalueof{/pgf/circular sector angle}}{360}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \let\angle\pgfmathresult%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \let\halfangle\pgfmathresult%
- %
- % Get some useful trigonometric stuff.
- %
- \pgfmathsin@{\halfangle}%
- \let\sinehalfangle\pgfmathresult%
- \pgfmathreciprocal@{\pgfmathresult}%
- \let\cosechalfangle\pgfmathresult%
- \pgfmathabs@{\halfangle}%
- \pgfmathcos@{\pgfmathresult}%
- \let\coshalfangle\pgfmathresult%
- \pgf@x\pgfmathresult pt\relax%
- \pgf@x\cosechalfangle\pgf@x%
- \edef\cothalfangle{\pgfmath@tonumber{\pgf@x}}%
- %
- % Calculate the miter length at the center,
- % according to the outer sep.
- %
- \pgf@x\outersep\relax%
- \pgf@x\cosechalfangle\pgf@x%
- \edef\centermiter{\the\pgf@x}%
- %
- % Get the start and end angles of the arc.
- %
- \pgfmathsubtract@{180}{\halfangle}%
- \let\startangle\pgfmathresult%
- \pgfmathadd@{180}{\halfangle}%
- \let\endangle\pgfmathresult%
- %
- % Get (half) the node dimensions.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- %
- % Calculate the radius of the sector and the `center offset',
- % which is the distance between the center of the node and the
- % center of the sector.
- %
- \ifpgfshapeborderusesincircle%
- %
- % Get the rotation.
- %
- \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
- %
- % Calculate the incircle radius.
- %
- \ifdim\pgf@x<\pgf@y%
- \pgf@x\pgf@y%
- \fi%
- \pgf@x1.41421\pgf@x%
- \pgf@xa\cosechalfangle\pgf@x%
- %
- % xa is the radius, xb the offset.
- %
- \pgf@xb\pgf@xa%
- \advance\pgf@xa\pgf@x%
- \else%
- %
- % Get the rotation (with rounding).
- %
- \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
- \advance\c@pgf@counta45\relax%
- \divide\c@pgf@counta90\relax%
- \multiply\c@pgf@counta90\relax%
- \ifnum\c@pgf@counta<0\relax%
- \advance\c@pgf@counta360\relax%
- \fi%
- \edef\rotate{\the\c@pgf@counta}%
- %
- % Swap the height and width for relevant angles.
- %
- \ifnum\c@pgf@counta=90\relax%
- \pgf@xc\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xc%
- \else%
- \ifnum\c@pgf@counta=270\relax%
- \pgf@xc\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xc%
- \fi%
- \fi%
- %
- % xa is the radius, xb the offset.
- %
- \pgf@xa\cosechalfangle\pgf@y%
- \pgf@xa\coshalfangle\pgf@xa%
- \advance\pgf@xa\pgf@x%
- \pgf@xb\pgf@xa%
- \advance\pgf@xa\pgf@x%
- \pgfmathveclen@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@y}}%
- \pgf@xa\pgfmathresult pt\relax%
- \fi%
- %
- % Adjust for minimum height and width.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/minimum width}}%
- \pgf@x.5\pgf@x%
- \pgfmathsec@{\halfangle}%
- \pgf@xc\pgfmathresult\pgf@xb%
- \ifdim\pgf@xc<0pt\relax%
- \pgf@xc-\pgf@xc%
- \fi%
- \ifdim\pgf@xc<\pgf@x%
- \pgfmathreciprocal{\pgfmath@tonumber{\pgf@xc}}%
- \pgf@xc\pgfmathresult\pgf@x% Increase by ratio.
- \pgf@xa\pgfmath@tonumber{\pgf@xc}\pgf@xa%
- \pgf@xb\pgfmath@tonumber{\pgf@xc}\pgf@xb%
- \fi%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@xa<\pgf@y%
- \pgfmathreciprocal{\pgfmath@tonumber{\pgf@xa}}%
- \pgf@xc\pgfmathresult\pgf@y% Increase by ratio.
- \pgf@xa\pgf@y%
- \pgf@xb\pgfmath@tonumber{\pgf@xc}\pgf@xb%
- \fi%
- \edef\centeroffset{\the\pgf@xb}%
- \edef\radius{\the\pgf@xa}%
- %
- % Calculate the radius at sector border and the arc corners.
- %
- \advance\pgf@xa\outersep\relax%
- \edef\borderradius{\the\pgf@xa}%
- \pgf@x\outersep\relax%
- \pgf@x\cosechalfangle\pgf@x%
- \pgf@x\coshalfangle\pgf@x%
- \advance\pgf@xa\pgf@x%
- \edef\cornerradius{\the\pgf@xa}%
- %
- % Calculate the *unrotated* points for the background path.
- %
- \pgfextract@process\sectorcenter{%
- \centerpoint%
- \advance\pgf@x\centeroffset%
- }%
- \pgfextract@process\arcstart{%
- \pgfqpointpolar{\startangle}{\radius}%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \sectorcenter%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- %
- % Calculate the *unrotated* points for the anchor border.
- %
- \pgfextract@process\sectorcenterborder{%
- \sectorcenter%
- \advance\pgf@x\centermiter\relax%
- }%
- \pgfextract@process\arcstartborder{%
- \pgfqpointpolar{\startangle}{\borderradius}%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \sectorcenter%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \pgfextract@process\arcendborder{%
- \pgfqpointpolar{\endangle}{\borderradius}%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \sectorcenter%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \pgfextract@process\arcstartcorner{%
- \pgfqpointpolar{\startangle}{\cornerradius}%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \sectorcenterborder%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \pgfextract@process\arcendcorner{%
- \pgfqpointpolar{\endangle}{\cornerradius}%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \sectorcenterborder%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- %
- % Calculate the *unrotated* corner angles to the \centerpoint.
- %
- \pgfmathanglebetweenpoints{\centerpoint}{\sectorcenterborder}%
- \let\angletosectorcenterborder\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\arcstartborder}%
- \let\angletoarcstartborder\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\arcendborder}%
- \let\angletoarcendborder\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\arcstartcorner}%
- \let\angletoarcstartcorner\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\arcendcorner}%
- \let\angletoarcendcorner\pgfmathresult%
- %
- % Rotate the background path points around the note center.
- %
- \pgfextract@process\sectorcenter{%
- \pgfmathrotatepointaround{\sectorcenter}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\arcstart{%
- \pgfmathrotatepointaround{\arcstart}{\centerpoint}{\rotate}%
- }%
- %
- % Rotate the border points around the note center.
- %
- \pgfextract@process\sectorcenterborder{%
- \pgfmathrotatepointaround{\sectorcenterborder}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\arcstartborder{%
- \pgfmathrotatepointaround{\arcstartborder}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\arcendborder{%
- \pgfmathrotatepointaround{\arcendborder}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\arcstartcorner{%
- \pgfmathrotatepointaround{\arcstartcorner}{\centerpoint}{\rotate}%
- }%
- \pgfextract@process\arcendcorner{%
- \pgfmathrotatepointaround{\arcendcorner}{\centerpoint}{\rotate}%
- }%
- %
- % Add the rotation to the start and end angles.
- %
- \pgfmathadd@{\startangle}{\rotate}%
- \let\startangle\pgfmathresult%
- \pgfmathadd@{\endangle}{\rotate}%
- \let\endangle\pgfmathresult%
- %
- % Save everything.
- %
- % NB \addtosavedmacro is currently experimental. May get changed.
- %
- \addtosavedmacro{\rotate}%
- \addtosavedmacro{\centeroffset}%
- %
- \addtosavedmacro{\radius}%
- \addtosavedmacro{\borderradius}%
- \addtosavedmacro{\cornerradius}%
- %
- \addtosavedmacro{\endangle}%
- \addtosavedmacro{\startangle}%
- %
- \addtosavedmacro{\sectorcenter}%
- \addtosavedmacro{\arcstart}%
- %
- \addtosavedmacro{\sectorcenterborder}%
- \addtosavedmacro{\arcstartborder}%
- \addtosavedmacro{\arcendborder}%
- \addtosavedmacro{\arcstartcorner}%
- \addtosavedmacro{\arcendcorner}%
- %
- \addtosavedmacro{\angletosectorcenterborder}%
- \addtosavedmacro{\angletoarcstartborder}%
- \addtosavedmacro{\angletoarcendborder}%
- \addtosavedmacro{\angletoarcstartcorner}%
- \addtosavedmacro{\angletoarcendcorner}%
- }%
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt\relax%
- }%
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- \anchor{center}{\centerpoint}
- \anchor{base}{\basepoint}
- \anchor{mid}{\midpoint}
- \anchor{arc start}{%
- \installcircularsectorparameters%
- \arcstartcorner%
- }
- \anchor{arc end}{%
- \installcircularsectorparameters%
- \arcendcorner%
- }
- \anchor{sector center}{%
- \installcircularsectorparameters%
- \sectorcenterborder%
- }
- \anchor{arc center}{%
- \installcircularsectorparameters%
- \pgfmathadd@{\rotate}{180}%
- \let\angle\pgfmathresult%
- \csname pgf@anchor@circular sector@border\endcsname{\pgfqpointpolar{\angle}{\cornerradius}}%
- }
- \anchor{north}{%
- \installcircularsectorparameters%
- \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{0pt}{\cornerradius}}%
- }
- \anchor{south}{%
- \installcircularsectorparameters%
- \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{0pt}{-\cornerradius}}%
- }
- \anchor{east}{%
- \installcircularsectorparameters%
- \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{\cornerradius}{0pt}}%
- }
- \anchor{west}{%
- \installcircularsectorparameters%
- \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{-\cornerradius}{0pt}}%
- }
- \anchor{north west}{%
- \installcircularsectorparameters%
- \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{-\cornerradius}{\cornerradius}}%
- }
- \anchor{south west}{%
- \installcircularsectorparameters%
- \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{-\cornerradius}{-\cornerradius}}%
- }
- \anchor{north east}{%
- \installcircularsectorparameters%
- \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{\cornerradius}{\cornerradius}}%
- }
- \anchor{south east}{%
- \installcircularsectorparameters%
- \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{\cornerradius}{-\cornerradius}}%
- }
- \backgroundpath{%
- \installcircularsectorparameters%
- \pgfpathmoveto{\sectorcenter}%
- \pgfpathlineto{\arcstart}%
- \ifdim\endangle pt>360pt\relax%
- \ifdim\startangle pt>360pt\relax%
- \pgfpatharc{\startangle}{\endangle}{\radius}%
- \else%
- \pgfpatharc{\startangle}{360}{\radius}%
- \pgfpatharc{0}{\endangle}{\radius}%
- \fi%
- \else%
- \pgfpatharc{\startangle}{\endangle}{\radius}%
- \fi%
- \pgfpathclose%
- }%
- \anchorborder{%
- %
- % Save x and y.
- %
- \edef\externalx{\the\pgf@x}%
- \edef\externaly{\the\pgf@y}%
- %
- % Adjust the location of the external point relative to \centerpoint.
- %
- \centerpoint%
- \pgf@xa\externalx\relax%
- \pgf@ya\externaly\relax%
- \advance\pgf@xa\pgf@x%
- \advance\pgf@ya\pgf@y%
- \edef\externalx{\the\pgf@xa}%
- \edef\externaly{\the\pgf@ya}%
- %
- % Install the required points and angles.
- %
- \installcircularsectorparameters%
- %
- % Get the angle of the external point to the \centerpoint.
- %
- \pgfmathanglebetweenpoints{\centerpoint}{\pgfqpoint{\externalx}{\externaly}}%
- \let\externalangle\pgfmathresult%
- %
- % *Subtract* the rotation from the external angle.
- %
- \pgfmathsubtract@{\pgfmathresult}{\rotate}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \let\angle\pgfmathresult%
- %
- % Determine if the line will cross the sector arc.
- %
- \ifdim\angle pt>\angletoarcendcorner pt\relax%
- \let\firstpoint\arcendcorner%
- \let\secondpoint\sectorcenterborder%
- \else%
- \ifdim\angle pt>\angletoarcendborder pt\relax%
- \let\firstpoint\arcendborder%
- \let\secondpoint\arcendcorner%
- \else%
- \ifdim\angle pt>\angletoarcstartborder pt\relax%
- \let\firstpoint\pgfutil@empty%
- \let\secondpoint\pgfutil@empty%
- \else%
- \ifdim\angle pt>\angletoarcstartcorner pt\relax%
- \let\firstpoint\arcstartborder
- \let\secondpoint\arcstartcorner
- \else%
- \let\firstpoint\sectorcenterborder%
- \let\secondpoint\arcstartcorner%
- \fi%
- \fi%
- \fi%
- \fi%
- \ifx\firstpoint\pgfutil@empty
- %
- % Calculate the angle from the centre of the semicircle to the
- % point on the semicircle arc which intersects the line from
- % the external point to the reference point...
- %
- \pgfmathanglebetweenlines{\centerpoint}{\pgfqpoint{\externalx}{\externaly}}%
- {\sectorcenter}{\centerpoint}%
- \pgfmathsin@{\pgfmathresult}%
- \let\sineangle\pgfmathresult%
- \pgf@x\borderradius\relax%
- \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@x}}%
- \let\reciprocalradius\pgfmathresult%
- \pgf@x\centeroffset\relax%
- \pgf@x\sineangle\pgf@x%
- \pgf@x\reciprocalradius\pgf@x%
- \pgfmathasin@{\pgfmath@tonumber{\pgf@x}}%
- \pgf@x\pgfmathresult pt\relax%
- \advance\pgf@x\externalangle pt\relax%
- \edef\angle{\pgfmath@tonumber{\pgf@x}}%
- %
- % ...and thus the point on the border.
- %
- \pgfpointadd{\sectorcenter}{\pgfqpointpolar{\angle}{\borderradius}}%
- \else%
- %
- % Calculate the the point where the semicircle chord intersects
- % the line from the external point to the reference point.
- %
- \pgfpointintersectionoflines{\centerpoint}{\pgfqpoint{\externalx}{\externaly}}%
- {\firstpoint}{\secondpoint}%
- \fi%
- }%
-}
+ \savedmacro\installcircularsectorparameters{%
+ %
+ % Define a \centerpoint, \basepoint and \midpoint.
+ %
+ \pgfextract@process\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ %
+ % Get the larger of the outer sep.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@x<\pgf@y%
+ \pgf@x\pgf@y%
+ \fi%
+ \edef\outersep{\the\pgf@x}%
+ %
+ % Half of the sector angle is more useful.
+ %
+ \pgfmathmod{\pgfkeysvalueof{/pgf/circular sector angle}}{360}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \let\angle\pgfmathresult%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \let\halfangle\pgfmathresult%
+ %
+ % Get some useful trigonometric stuff.
+ %
+ \pgfmathsin@{\halfangle}%
+ \let\sinehalfangle\pgfmathresult%
+ \pgfmathreciprocal@{\pgfmathresult}%
+ \let\cosechalfangle\pgfmathresult%
+ \pgfmathabs@{\halfangle}%
+ \pgfmathcos@{\pgfmathresult}%
+ \let\coshalfangle\pgfmathresult%
+ \pgf@x\pgfmathresult pt\relax%
+ \pgf@x\cosechalfangle\pgf@x%
+ \edef\cothalfangle{\pgfmath@tonumber{\pgf@x}}%
+ %
+ % Calculate the miter length at the center,
+ % according to the outer sep.
+ %
+ \pgf@x\outersep\relax%
+ \pgf@x\cosechalfangle\pgf@x%
+ \edef\centermiter{\the\pgf@x}%
+ %
+ % Get the start and end angles of the arc.
+ %
+ \pgfmathsubtract@{180}{\halfangle}%
+ \let\startangle\pgfmathresult%
+ \pgfmathadd@{180}{\halfangle}%
+ \let\endangle\pgfmathresult%
+ %
+ % Get (half) the node dimensions.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ %
+ % Calculate the radius of the sector and the `center offset',
+ % which is the distance between the center of the node and the
+ % center of the sector.
+ %
+ \ifpgfshapeborderusesincircle%
+ %
+ % Get the rotation.
+ %
+ \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ %
+ % Calculate the incircle radius.
+ %
+ \ifdim\pgf@x<\pgf@y%
+ \pgf@x\pgf@y%
+ \fi%
+ \pgf@x1.41421\pgf@x%
+ \pgf@xa\cosechalfangle\pgf@x%
+ %
+ % xa is the radius, xb the offset.
+ %
+ \pgf@xb\pgf@xa%
+ \advance\pgf@xa\pgf@x%
+ \else%
+ %
+ % Get the rotation (with rounding).
+ %
+ \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
+ \afterassignment\pgfmath@gobbletilpgfmath@%
+ \expandafter\c@pgf@counta\pgfmathresult\relax\pgfmath@%
+ \advance\c@pgf@counta45\relax%
+ \divide\c@pgf@counta90\relax%
+ \multiply\c@pgf@counta90\relax%
+ \ifnum\c@pgf@counta<0\relax%
+ \advance\c@pgf@counta360\relax%
+ \fi%
+ \edef\rotate{\the\c@pgf@counta}%
+ %
+ % Swap the height and width for relevant angles.
+ %
+ \ifnum\c@pgf@counta=90\relax%
+ \pgf@xc\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xc%
+ \else%
+ \ifnum\c@pgf@counta=270\relax%
+ \pgf@xc\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xc%
+ \fi%
+ \fi%
+ %
+ % xa is the radius, xb the offset.
+ %
+ \pgf@xa\cosechalfangle\pgf@y%
+ \pgf@xa\coshalfangle\pgf@xa%
+ \advance\pgf@xa\pgf@x%
+ \pgf@xb\pgf@xa%
+ \advance\pgf@xa\pgf@x%
+ \pgfmathveclen@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@y}}%
+ \pgf@xa\pgfmathresult pt\relax%
+ \fi%
+ %
+ % Adjust for minimum height and width.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgf@x.5\pgf@x%
+ \pgfmathsec@{\halfangle}%
+ \pgf@xc\pgfmathresult\pgf@xb%
+ \ifdim\pgf@xc<0pt\relax%
+ \pgf@xc-\pgf@xc%
+ \fi%
+ \ifdim\pgf@xc<\pgf@x%
+ \pgfmathreciprocal{\pgfmath@tonumber{\pgf@xc}}%
+ \pgf@xc\pgfmathresult\pgf@x% Increase by ratio.
+ \pgf@xa\pgfmath@tonumber{\pgf@xc}\pgf@xa%
+ \pgf@xb\pgfmath@tonumber{\pgf@xc}\pgf@xb%
+ \fi%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@xa<\pgf@y%
+ \pgfmathreciprocal{\pgfmath@tonumber{\pgf@xa}}%
+ \pgf@xc\pgfmathresult\pgf@y% Increase by ratio.
+ \pgf@xa\pgf@y%
+ \pgf@xb\pgfmath@tonumber{\pgf@xc}\pgf@xb%
+ \fi%
+ \edef\centeroffset{\the\pgf@xb}%
+ \edef\radius{\the\pgf@xa}%
+ %
+ % Calculate the radius at sector border and the arc corners.
+ %
+ \advance\pgf@xa\outersep\relax%
+ \edef\borderradius{\the\pgf@xa}%
+ \pgf@x\outersep\relax%
+ \pgf@x\cosechalfangle\pgf@x%
+ \pgf@x\coshalfangle\pgf@x%
+ \advance\pgf@xa\pgf@x%
+ \edef\cornerradius{\the\pgf@xa}%
+ %
+ % Calculate the *unrotated* points for the background path.
+ %
+ \pgfextract@process\sectorcenter{%
+ \centerpoint%
+ \advance\pgf@x\centeroffset%
+ }%
+ \pgfextract@process\arcstart{%
+ \pgfqpointpolar{\startangle}{\radius}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \sectorcenter%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ %
+ % Calculate the *unrotated* points for the anchor border.
+ %
+ \pgfextract@process\sectorcenterborder{%
+ \sectorcenter%
+ \advance\pgf@x\centermiter\relax%
+ }%
+ \pgfextract@process\arcstartborder{%
+ \pgfqpointpolar{\startangle}{\borderradius}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \sectorcenter%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgfextract@process\arcendborder{%
+ \pgfqpointpolar{\endangle}{\borderradius}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \sectorcenter%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgfextract@process\arcstartcorner{%
+ \pgfqpointpolar{\startangle}{\cornerradius}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \sectorcenterborder%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgfextract@process\arcendcorner{%
+ \pgfqpointpolar{\endangle}{\cornerradius}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \sectorcenterborder%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ %
+ % Calculate the *unrotated* corner angles to the \centerpoint.
+ %
+ \pgfmathanglebetweenpoints{\centerpoint}{\sectorcenterborder}%
+ \let\angletosectorcenterborder\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\arcstartborder}%
+ \let\angletoarcstartborder\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\arcendborder}%
+ \let\angletoarcendborder\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\arcstartcorner}%
+ \let\angletoarcstartcorner\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\arcendcorner}%
+ \let\angletoarcendcorner\pgfmathresult%
+ %
+ % Rotate the background path points around the note center.
+ %
+ \pgfextract@process\sectorcenter{%
+ \pgfmathrotatepointaround{\sectorcenter}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\arcstart{%
+ \pgfmathrotatepointaround{\arcstart}{\centerpoint}{\rotate}%
+ }%
+ %
+ % Rotate the border points around the note center.
+ %
+ \pgfextract@process\sectorcenterborder{%
+ \pgfmathrotatepointaround{\sectorcenterborder}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\arcstartborder{%
+ \pgfmathrotatepointaround{\arcstartborder}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\arcendborder{%
+ \pgfmathrotatepointaround{\arcendborder}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\arcstartcorner{%
+ \pgfmathrotatepointaround{\arcstartcorner}{\centerpoint}{\rotate}%
+ }%
+ \pgfextract@process\arcendcorner{%
+ \pgfmathrotatepointaround{\arcendcorner}{\centerpoint}{\rotate}%
+ }%
+ %
+ % Add the rotation to the start and end angles.
+ %
+ \pgfmathadd@{\startangle}{\rotate}%
+ \let\startangle\pgfmathresult%
+ \pgfmathadd@{\endangle}{\rotate}%
+ \let\endangle\pgfmathresult%
+ %
+ % Save everything.
+ %
+ % NB \addtosavedmacro is currently experimental. May get changed.
+ %
+ \addtosavedmacro{\rotate}%
+ \addtosavedmacro{\centeroffset}%
+ %
+ \addtosavedmacro{\radius}%
+ \addtosavedmacro{\borderradius}%
+ \addtosavedmacro{\cornerradius}%
+ %
+ \addtosavedmacro{\endangle}%
+ \addtosavedmacro{\startangle}%
+ %
+ \addtosavedmacro{\sectorcenter}%
+ \addtosavedmacro{\arcstart}%
+ %
+ \addtosavedmacro{\sectorcenterborder}%
+ \addtosavedmacro{\arcstartborder}%
+ \addtosavedmacro{\arcendborder}%
+ \addtosavedmacro{\arcstartcorner}%
+ \addtosavedmacro{\arcendcorner}%
+ %
+ \addtosavedmacro{\angletosectorcenterborder}%
+ \addtosavedmacro{\angletoarcstartborder}%
+ \addtosavedmacro{\angletoarcendborder}%
+ \addtosavedmacro{\angletoarcstartcorner}%
+ \addtosavedmacro{\angletoarcendcorner}%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{base}{\basepoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{arc start}{%
+ \installcircularsectorparameters%
+ \arcstartcorner%
+ }%
+ \anchor{arc end}{%
+ \installcircularsectorparameters%
+ \arcendcorner%
+ }%
+ \anchor{sector center}{%
+ \installcircularsectorparameters%
+ \sectorcenterborder%
+ }%
+ \anchor{arc center}{%
+ \installcircularsectorparameters%
+ \pgfmathadd@{\rotate}{180}%
+ \let\angle\pgfmathresult%
+ \csname pgf@anchor@circular sector@border\endcsname{\pgfqpointpolar{\angle}{\cornerradius}}%
+ }%
+ \anchor{north}{%
+ \installcircularsectorparameters%
+ \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{0pt}{\cornerradius}}%
+ }%
+ \anchor{south}{%
+ \installcircularsectorparameters%
+ \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{0pt}{-\cornerradius}}%
+ }%
+ \anchor{east}{%
+ \installcircularsectorparameters%
+ \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{\cornerradius}{0pt}}%
+ }%
+ \anchor{west}{%
+ \installcircularsectorparameters%
+ \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{-\cornerradius}{0pt}}%
+ }%
+ \anchor{north west}{%
+ \installcircularsectorparameters%
+ \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{-\cornerradius}{\cornerradius}}%
+ }%
+ \anchor{south west}{%
+ \installcircularsectorparameters%
+ \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{-\cornerradius}{-\cornerradius}}%
+ }%
+ \anchor{north east}{%
+ \installcircularsectorparameters%
+ \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{\cornerradius}{\cornerradius}}%
+ }%
+ \anchor{south east}{%
+ \installcircularsectorparameters%
+ \csname pgf@anchor@circular sector@border\endcsname{\pgfqpoint{\cornerradius}{-\cornerradius}}%
+ }%
+ \backgroundpath{%
+ \installcircularsectorparameters%
+ \pgfpathmoveto{\sectorcenter}%
+ \pgfpathlineto{\arcstart}%
+ \ifdim\endangle pt>360pt\relax%
+ \ifdim\startangle pt>360pt\relax%
+ \pgfpatharc{\startangle}{\endangle}{\radius}%
+ \else%
+ \pgfpatharc{\startangle}{360}{\radius}%
+ \pgfpatharc{0}{\endangle}{\radius}%
+ \fi%
+ \else%
+ \pgfpatharc{\startangle}{\endangle}{\radius}%
+ \fi%
+ \pgfpathclose%
+ }%
+ \anchorborder{%
+ %
+ % Save x and y.
+ %
+ \edef\externalx{\the\pgf@x}%
+ \edef\externaly{\the\pgf@y}%
+ %
+ % Adjust the location of the external point relative to \centerpoint.
+ %
+ \centerpoint%
+ \pgf@xa\externalx\relax%
+ \pgf@ya\externaly\relax%
+ \advance\pgf@xa\pgf@x%
+ \advance\pgf@ya\pgf@y%
+ \edef\externalx{\the\pgf@xa}%
+ \edef\externaly{\the\pgf@ya}%
+ %
+ % Install the required points and angles.
+ %
+ \installcircularsectorparameters%
+ %
+ % Get the angle of the external point to the \centerpoint.
+ %
+ \pgfmathanglebetweenpoints{\centerpoint}{\pgfqpoint{\externalx}{\externaly}}%
+ \let\externalangle\pgfmathresult%
+ %
+ % *Subtract* the rotation from the external angle.
+ %
+ \pgfmathsubtract@{\pgfmathresult}{\rotate}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \let\angle\pgfmathresult%
+ %
+ % Determine if the line will cross the sector arc.
+ %
+ \ifdim\angle pt>\angletoarcendcorner pt\relax%
+ \let\firstpoint\arcendcorner%
+ \let\secondpoint\sectorcenterborder%
+ \else%
+ \ifdim\angle pt>\angletoarcendborder pt\relax%
+ \let\firstpoint\arcendborder%
+ \let\secondpoint\arcendcorner%
+ \else%
+ \ifdim\angle pt>\angletoarcstartborder pt\relax%
+ \let\firstpoint\pgfutil@empty%
+ \let\secondpoint\pgfutil@empty%
+ \else%
+ \ifdim\angle pt>\angletoarcstartcorner pt\relax%
+ \let\firstpoint\arcstartborder
+ \let\secondpoint\arcstartcorner
+ \else%
+ \let\firstpoint\sectorcenterborder%
+ \let\secondpoint\arcstartcorner%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \ifx\firstpoint\pgfutil@empty
+ %
+ % Calculate the angle from the centre of the semicircle to the
+ % point on the semicircle arc which intersects the line from
+ % the external point to the reference point...
+ %
+ \pgfmathanglebetweenlines{\centerpoint}{\pgfqpoint{\externalx}{\externaly}}%
+ {\sectorcenter}{\centerpoint}%
+ \pgfmathsin@{\pgfmathresult}%
+ \let\sineangle\pgfmathresult%
+ \pgf@x\borderradius\relax%
+ \pgfmathreciprocal@{\pgfmath@tonumber{\pgf@x}}%
+ \let\reciprocalradius\pgfmathresult%
+ \pgf@x\centeroffset\relax%
+ \pgf@x\sineangle\pgf@x%
+ \pgf@x\reciprocalradius\pgf@x%
+ \pgfmathasin@{\pgfmath@tonumber{\pgf@x}}%
+ \pgf@x\pgfmathresult pt\relax%
+ \advance\pgf@x\externalangle pt\relax%
+ \edef\angle{\pgfmath@tonumber{\pgf@x}}%
+ %
+ % ...and thus the point on the border.
+ %
+ \pgfpointadd{\sectorcenter}{\pgfqpointpolar{\angle}{\borderradius}}%
+ \else%
+ %
+ % Calculate the the point where the semicircle chord intersects
+ % the line from the external point to the reference point.
+ %
+ \pgfpointintersectionoflines{\centerpoint}{\pgfqpoint{\externalx}{\externaly}}%
+ {\firstpoint}{\secondpoint}%
+ \fi%
+ }%
+}%
@@ -4023,397 +4021,397 @@
% /pgf/shape aspect : Ratio between the x and y radii of the cylinder end.
% /pgf/cylinder uses custom fill : Use a custom fill for the cylinder.
% /pgf/cylinder end fill : Custom color for the cylinder end.
-% /pgf/cylinder body fill : Custom color for the cylinderbody.
+% /pgf/cylinder body fill : Custom color for the cylinder body.
%
\newif\ifpgfcylinderusescustomfill
\pgfkeys{/pgf/.cd,
- cylinder uses custom fill/.is if=pgfcylinderusescustomfill,
- cylinder end fill/.initial=white,
- cylinder body fill/.initial=white
-}
+ cylinder uses custom fill/.is if=pgfcylinderusescustomfill,
+ cylinder end fill/.initial=white,
+ cylinder body fill/.initial=white,
+}%
\pgfdeclareshape{cylinder}{%
- \savedmacro\getcylinderpoints{%
- \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}%
- \pgf@x\pgf@xc%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}%
- \pgf@y\pgf@yc%
- \advance\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y.5\dp\pgfnodeparttextbox%
- \ifpgfshapeborderusesincircle%
- \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
- \ifdim\pgf@x<\pgf@y%
- \pgf@x\pgf@y%
- \else%
- \pgf@y\pgf@x%
- \fi%
- \pgf@x1.414213\pgf@x%
- \pgf@y1.414213\pgf@y%
- \else%
- \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \pgfmathsetcount\c@pgf@counta{+\pgfmathresult}%
- \advance\c@pgf@counta45\relax%
- \divide\c@pgf@counta90\relax%
- \multiply\c@pgf@counta90\relax%
- \edef\rotate{\the\c@pgf@counta}%
- \ifnum\c@pgf@counta=90\relax%
- \pgf@xa\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xa%
- \pgf@yc\pgf@xc%
- \else%
- \ifnum\c@pgf@counta=270\relax%
- \pgf@xa\pgf@x%
- \pgf@x\pgf@y%
- \pgf@y\pgf@xa%
- \pgf@yc\pgf@xc%
- \fi%
- \fi%
- \fi%
- \addtosavedmacro\rotate%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \pgfutil@tempdima\pgfshapeaspect\pgf@ya%
- \pgfutil@tempdimb\pgf@ya%
- %
- % Adjust for minimum height.
- %
- \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/minimum width}}%
- \ifdim\pgfutil@tempdimb<.5\pgf@xc\relax%
- \pgfutil@tempdimb.5\pgf@xc%
- \pgf@ya\pgfutil@tempdimb%
- \fi%
- %
- % Calculate how far the node contents can extend into the cylinder bottom.
- %
- \pgf@yb\pgfutil@tempdimb%
- \advance\pgf@yb-\pgf@yc%
- \pgfmathdivide@{\pgfmath@tonumber{\pgf@yb}}{\pgfmath@tonumber{\pgfutil@tempdimb}}%
- \pgfmathasin@{\pgfmathresult}%
- \pgfmathcos@{\pgfmathresult}%
- \let\angle\pgfmathresult%
- \pgf@xb\pgfmathresult\pgfutil@tempdima%
- %
- % Adjust for minimum width.
- %
- \pgf@x.5\pgflinewidth%
- \advance\pgf@x2.0\pgf@xa%
- \advance\pgf@x3.0\pgfutil@tempdima%
- \advance\pgf@x-\pgf@xb%
- \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@x<\pgf@xc%
- \advance\pgf@xc-\pgf@x%
- \advance\pgf@xa.5\pgf@xc%
- \fi%
- %
- % Add the larger of the outer sep to the radii.
- %
- \pgf@x\pgfutil@tempdima\relax%
- \pgf@y\pgfutil@tempdimb\relax%
- \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgf@xc>\pgf@yc%
- \advance\pgf@x\pgf@xc%
- \advance\pgf@y\pgf@xc%
- \edef\outersep{\the\pgf@xc}%
- \else%
- \advance\pgf@x\pgf@yc%
- \advance\pgf@y\pgf@yc%
- \edef\outersep{\the\pgf@yc}%
- \fi%
- \edef\xradius{\the\pgf@x}%
- \edef\yradius{\the\pgf@y}%
- \addtosavedmacro\xradius%
- \addtosavedmacro\yradius%
- \addtosavedmacro\outersep%
- %
- \pgfextract@process\cylindercenter{%
- \pgf@x\pgfutil@tempdima%
- \advance\pgf@x.5\pgflinewidth%
- \advance\pgf@x\pgf@xb%
- \pgf@x.5\pgf@x%
- \pgf@y0pt%
- }%
- \addtosavedmacro\cylindercenter%
- %
- \pgfextract@process\beforetop{%
- \pgf@x\pgf@xa%
- \advance\pgf@x\pgfutil@tempdima%
- \advance\pgf@x.5\pgflinewidth%
- \pgf@y\pgf@ya%
- }%
- \pgfextract@process\afterbottom{%
- \pgf@x-\pgf@xa%
- \advance\pgf@x\pgf@xb%
- \pgf@y\pgf@ya%
- }%
- \addtosavedmacro\beforetop%
- \addtosavedmacro\afterbottom%
- \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/outer ysep}}%
- \pgfextract@process\beforetopanchor{%
- \beforetop%
- \advance\pgf@y\pgf@yc%
- }%
- \pgfextract@process\afterbottomanchor{%
- \afterbottom%
- \advance\pgf@y\pgf@yc%
- }%
- \addtosavedmacro\beforetopanchor%
- \addtosavedmacro\afterbottomanchor%
- %
- \beforetopanchor%
- \advance\pgf@x\xradius\relax%
- \ifdim\pgf@x>\pgf@y%
- \edef\externalradius{\the\pgf@x}%
- \else%
- \edef\externalradius{\the\pgf@y}%
- \fi%
- \addtosavedmacro\externalradius%
- }
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }%
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }%
- \anchor{center}{\centerpoint}
- \anchor{shape center}{%
- \getcylinderpoints%
- \pgfmathrotatepointaround{\pgfpointadd{\cylindercenter}{\centerpoint}}%
- {\centerpoint}{\rotate}%
- }%
- \anchor{mid}{\midpoint}%
- \anchor{mid east}{%
- \getcylinderpoints%
- \let\pgf@cylinder@referencepoint\midpoint%
- \pgf@anchor@cylinder@border{\pgfqpoint{\externalradius}{0pt}}%
- }%
- \anchor{mid west}{%
- \getcylinderpoints%
- \let\pgf@cylinder@referencepoint\midpoint%
- \pgf@anchor@cylinder@border{\pgfqpoint{-\externalradius}{0pt}}%
- }%
- \anchor{base}{\basepoint}%
- \anchor{base east}{%
- \getcylinderpoints%
- \let\pgf@cylinder@referencepoint\basepoint%
- \pgf@anchor@cylinder@border{\pgfqpoint{\externalradius}{0pt}}%
- }%
- \anchor{base west}{%
- \getcylinderpoints%
- \let\pgf@cylinder@referencepoint\basepoint%
- \pgf@anchor@cylinder@border{\pgfqpoint{-\externalradius}{0pt}}%
- }%
- \anchor{north}{%
- \getcylinderpoints%
- \pgf@anchor@cylinder@border{\pgfqpoint{0pt}{\externalradius}}%
- }%
- \anchor{south}{%
- \getcylinderpoints%
- \pgf@anchor@cylinder@border{\pgfqpoint{0pt}{-\externalradius}}%
- }%
- \anchor{east}{%
- \getcylinderpoints%
- \pgf@anchor@cylinder@border{\pgfqpoint{\externalradius}{0pt}}%
- }%
- \anchor{west}{%
- \getcylinderpoints%
- \pgf@anchor@cylinder@border{\pgfqpoint{-\externalradius}{0pt}}%
- }%
- \anchor{north east}{%
- \getcylinderpoints%
- \pgf@anchor@cylinder@border{\pgfqpoint{\externalradius}{\externalradius}}%
- }%
- \anchor{south west}{%
- \getcylinderpoints%
- \pgf@anchor@cylinder@border{\pgfqpoint{-\externalradius}{-\externalradius}}%
- }%
- \anchor{south east}{%
- \getcylinderpoints%
- \pgf@anchor@cylinder@border{\pgfqpoint{\externalradius}{-\externalradius}}%
- }%
- \anchor{north west}{%
- \getcylinderpoints%
- \pgf@anchor@cylinder@border{\pgfqpoint{-\externalradius}{\externalradius}}%
- }%
- \anchor{before top}{%
- \getcylinderpoints%
- \pgfmathrotatepointaround{\pgfpointadd{\beforetopanchor}{\centerpoint}}{\centerpoint}{\rotate}%
- }
- \anchor{top}{%
- \getcylinderpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \beforetop%
- \pgf@y0pt\relax%
- \advance\pgf@x\xradius\relax%
- }{\centerpoint}}{\centerpoint}{\rotate}%
- }
- \anchor{after top}{%
- \getcylinderpoints%
- \pgfmathrotatepointaround{\pgfpointadd{\beforetopanchor\pgf@y-\pgf@y}{\centerpoint}}{\centerpoint}{\rotate}%
- }
- \anchor{before bottom}{%
- \getcylinderpoints%
- \pgfmathrotatepointaround{\pgfpointadd{\afterbottomanchor\pgf@y-\pgf@y}{\centerpoint}}{\centerpoint}{\rotate}%
- }
- \anchor{bottom}{%
- \getcylinderpoints%
- \pgfmathrotatepointaround{%
- \pgfpointadd{%
- \afterbottom%
- \pgf@y0pt\relax%
- \advance\pgf@x-\xradius\relax%
- }{\centerpoint}}{\centerpoint}{\rotate}%
- }
- \anchor{after bottom}{%
- \getcylinderpoints%
- \pgfmathrotatepointaround{\pgfpointadd{\afterbottomanchor}{\centerpoint}}{\centerpoint}{\rotate}%
- }
- \backgroundpath{%
- \getcylinderpoints%
- {%
- \pgf@x\xradius\relax%
- \advance\pgf@x-\outersep\relax%
- \edef\xradius{\the\pgf@x}%
- \pgf@y\yradius\relax%
- \advance\pgf@y-\outersep\relax%
- \edef\yradius{\the\pgf@y}%
- \pgftransformshift{\centerpoint}%
- \pgftransformrotate{\rotate}%
- \pgfpathmoveto{\afterbottom}%
- \pgfpatharc{90}{270}{\xradius and \yradius}%
- \pgfpathlineto{\beforetop\pgf@y-\pgf@y}%
- \pgfpatharc{-90}{90}{\xradius and \yradius}%
- \pgfpathclose%
- \pgfpathmoveto{\beforetop}%
- \pgfpatharc{90}{270}{\xradius and \yradius}%
- }%
- }%
- \behindbackgroundpath{%
- \ifpgfcylinderusescustomfill%
- \getcylinderpoints%
- \pgf@x\xradius\relax%
- \advance\pgf@x-\outersep\relax%
- \edef\xradius{\the\pgf@x}%
- \pgf@y\yradius\relax%
- \advance\pgf@y-\outersep\relax%
- \edef\yradius{\the\pgf@y}%
- {%
- \pgftransformshift{\centerpoint}%
- \pgftransformrotate{\rotate}%
- \pgfpathmoveto{\afterbottom}%
- \pgfpatharc{90}{270}{\xradius and \yradius}%
- \pgfpathlineto{\beforetop\pgf@y-\pgf@y}%
- \pgfpatharc{270}{90}{\xradius and \yradius}%
- \pgfpathclose%
- \expandafter\pgfsetfillcolor\expandafter{\pgfkeysvalueof{/pgf/cylinder body fill}}%
- \pgfusepath{fill}%
- %
- \pgfpathmoveto{\beforetop}%
- \pgfpatharc{90}{-270}{\xradius and \yradius}%
- \pgfpathclose
- \expandafter\pgfsetfillcolor\expandafter{\pgfkeysvalueof{/pgf/cylinder end fill}}%
- \pgfusepath{fill}%
- }%
- \fi%
- }%
- \anchorborder{%
- \pgfextract@process\externalpoint{}%
- \getcylinderpoints%
- \pgfutil@ifundefined{pgf@cylinder@referencepoint}{\let\referencepoint\centerpoint}{%
- \let\referencepoint\pgf@cylinder@referencepoint}%
- \pgfextract@process\externalpoint{%
- \externalpoint%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \referencepoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
- \pgfmathsubtract@{\pgfmathresult}{\rotate}%
- \ifdim\pgfmathresult pt<0pt\relax%
- \pgfmathadd@{\pgfmathresult}{360}%
- \fi%
- \let\externalangle\pgfmathresult%
- %
- \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\afterbottomanchor}{\centerpoint}}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\beforetopanchor}{\centerpoint}}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathrotatepointaround{%
- \pgfmathpointintersectionoflineandarc%
- {\pgfmathrotatepointaround{\externalpoint}{\centerpoint}{-\rotate}}%
- {\pgfmathrotatepointaround{\referencepoint}{\centerpoint}{-\rotate}}%
- {%
- \beforetop%
- \pgf@xa\pgf@x%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- }%
- {0}{90}{\xradius and \yradius}%
- }{\centerpoint}{\rotate}%
- \else%
- \pgfpointintersectionoflines{%
- \pgfmathrotatepointaround{\pgfpointadd{\afterbottomanchor}{\centerpoint}}%
- {\centerpoint}{\rotate}}{%
- \pgfmathrotatepointaround{\pgfpointadd{\beforetopanchor}{\centerpoint}}%
- {\centerpoint}{\rotate}}%
- {\referencepoint}{\externalpoint}%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\afterbottomanchor\pgf@y-\pgf@y}{\centerpoint}}%
- \ifdim\externalangle pt>\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\beforetopanchor\pgf@y-\pgf@y}{\centerpoint}}%
- \ifdim\externalangle pt>\pgfmathresult pt\relax%
- \pgfmathrotatepointaround{%
- \pgfmathpointintersectionoflineandarc%
- {\pgfmathrotatepointaround{\externalpoint}{\centerpoint}{-\rotate}}%
- {\pgfmathrotatepointaround{\referencepoint}{\centerpoint}{-\rotate}}%
- {%
- \beforetop%
- \pgf@xa\pgf@x%
- \centerpoint
- \advance\pgf@x\pgf@xa%
- }%
- {270}{360}{\xradius and \yradius}%
- }{\centerpoint}{\rotate}%
- \else%
- \pgfpointintersectionoflines{%
- \pgfmathrotatepointaround{\pgfpointadd{\afterbottomanchor\pgf@y-\pgf@y}{\centerpoint}}%
- {\centerpoint}{\rotate}}{%
- \pgfmathrotatepointaround{\pgfpointadd{\beforetopanchor\pgf@y-\pgf@y}{\centerpoint}}%
- {\centerpoint}{\rotate}}%
- {\referencepoint}{\externalpoint}%
- \fi%
- \else%
- \pgfmathrotatepointaround{%
- \pgfmathpointintersectionoflineandarc%
- {\pgfmathrotatepointaround{\externalpoint}{\centerpoint}{-\rotate}}%
- {\pgfmathrotatepointaround{\referencepoint}{\centerpoint}{-\rotate}}%
- {%
- \afterbottom%
- \pgf@xa\pgf@x%
- \centerpoint
- \advance\pgf@x\pgf@xa%
- }%
- {90}{270}{\xradius and \yradius}%
- }{\centerpoint}{\rotate}%
- \fi%
- \fi%
- }
-}
+ \savedmacro\getcylinderpoints{%
+ \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \pgf@x\pgf@xc%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \pgf@y\pgf@yc%
+ \advance\pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y.5\dp\pgfnodeparttextbox%
+ \ifpgfshapeborderusesincircle%
+ \pgfmathsetmacro\rotate{\pgfkeysvalueof{/pgf/shape border rotate}}%
+ \ifdim\pgf@x<\pgf@y%
+ \pgf@x\pgf@y%
+ \else%
+ \pgf@y\pgf@x%
+ \fi%
+ \pgf@x1.414213\pgf@x%
+ \pgf@y1.414213\pgf@y%
+ \else%
+ \pgfmathmod{\pgfkeysvalueof{/pgf/shape border rotate}}{360}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \pgfmathsetcount\c@pgf@counta{+\pgfmathresult}%
+ \advance\c@pgf@counta45\relax%
+ \divide\c@pgf@counta90\relax%
+ \multiply\c@pgf@counta90\relax%
+ \edef\rotate{\the\c@pgf@counta}%
+ \ifnum\c@pgf@counta=90\relax%
+ \pgf@xa\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xa%
+ \pgf@yc\pgf@xc%
+ \else%
+ \ifnum\c@pgf@counta=270\relax%
+ \pgf@xa\pgf@x%
+ \pgf@x\pgf@y%
+ \pgf@y\pgf@xa%
+ \pgf@yc\pgf@xc%
+ \fi%
+ \fi%
+ \fi%
+ \addtosavedmacro\rotate%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \pgfutil@tempdima\pgfshapeaspect\pgf@ya%
+ \pgfutil@tempdimb\pgf@ya%
+ %
+ % Adjust for minimum height.
+ %
+ \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgfutil@tempdimb<.5\pgf@xc\relax%
+ \pgfutil@tempdimb.5\pgf@xc%
+ \pgf@ya\pgfutil@tempdimb%
+ \fi%
+ %
+ % Calculate how far the node contents can extend into the cylinder bottom.
+ %
+ \pgf@yb\pgfutil@tempdimb%
+ \advance\pgf@yb-\pgf@yc%
+ \pgfmathdivide@{\pgfmath@tonumber{\pgf@yb}}{\pgfmath@tonumber{\pgfutil@tempdimb}}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ \let\angle\pgfmathresult%
+ \pgf@xb\pgfmathresult\pgfutil@tempdima%
+ %
+ % Adjust for minimum width.
+ %
+ \pgf@x.5\pgflinewidth%
+ \advance\pgf@x2.0\pgf@xa%
+ \advance\pgf@x3.0\pgfutil@tempdima%
+ \advance\pgf@x-\pgf@xb%
+ \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@x<\pgf@xc%
+ \advance\pgf@xc-\pgf@x%
+ \advance\pgf@xa.5\pgf@xc%
+ \fi%
+ %
+ % Add the larger of the outer sep to the radii.
+ %
+ \pgf@x\pgfutil@tempdima\relax%
+ \pgf@y\pgfutil@tempdimb\relax%
+ \pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgf@xc>\pgf@yc%
+ \advance\pgf@x\pgf@xc%
+ \advance\pgf@y\pgf@xc%
+ \edef\outersep{\the\pgf@xc}%
+ \else%
+ \advance\pgf@x\pgf@yc%
+ \advance\pgf@y\pgf@yc%
+ \edef\outersep{\the\pgf@yc}%
+ \fi%
+ \edef\xradius{\the\pgf@x}%
+ \edef\yradius{\the\pgf@y}%
+ \addtosavedmacro\xradius%
+ \addtosavedmacro\yradius%
+ \addtosavedmacro\outersep%
+ %
+ \pgfextract@process\cylindercenter{%
+ \pgf@x\pgfutil@tempdima%
+ \advance\pgf@x.5\pgflinewidth%
+ \advance\pgf@x\pgf@xb%
+ \pgf@x.5\pgf@x%
+ \pgf@y0pt%
+ }%
+ \addtosavedmacro\cylindercenter%
+ %
+ \pgfextract@process\beforetop{%
+ \pgf@x\pgf@xa%
+ \advance\pgf@x\pgfutil@tempdima%
+ \advance\pgf@x.5\pgflinewidth%
+ \pgf@y\pgf@ya%
+ }%
+ \pgfextract@process\afterbottom{%
+ \pgf@x-\pgf@xa%
+ \advance\pgf@x\pgf@xb%
+ \pgf@y\pgf@ya%
+ }%
+ \addtosavedmacro\beforetop%
+ \addtosavedmacro\afterbottom%
+ \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \pgfextract@process\beforetopanchor{%
+ \beforetop%
+ \advance\pgf@y\pgf@yc%
+ }%
+ \pgfextract@process\afterbottomanchor{%
+ \afterbottom%
+ \advance\pgf@y\pgf@yc%
+ }%
+ \addtosavedmacro\beforetopanchor%
+ \addtosavedmacro\afterbottomanchor%
+ %
+ \beforetopanchor%
+ \advance\pgf@x\xradius\relax%
+ \ifdim\pgf@x>\pgf@y%
+ \edef\externalradius{\the\pgf@x}%
+ \else%
+ \edef\externalradius{\the\pgf@y}%
+ \fi%
+ \addtosavedmacro\externalradius%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{shape center}{%
+ \getcylinderpoints%
+ \pgfmathrotatepointaround{\pgfpointadd{\cylindercenter}{\centerpoint}}%
+ {\centerpoint}{\rotate}%
+ }%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \getcylinderpoints%
+ \let\pgf@cylinder@referencepoint\midpoint%
+ \pgf@anchor@cylinder@border{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{mid west}{%
+ \getcylinderpoints%
+ \let\pgf@cylinder@referencepoint\midpoint%
+ \pgf@anchor@cylinder@border{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \getcylinderpoints%
+ \let\pgf@cylinder@referencepoint\basepoint%
+ \pgf@anchor@cylinder@border{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{base west}{%
+ \getcylinderpoints%
+ \let\pgf@cylinder@referencepoint\basepoint%
+ \pgf@anchor@cylinder@border{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{north}{%
+ \getcylinderpoints%
+ \pgf@anchor@cylinder@border{\pgfqpoint{0pt}{\externalradius}}%
+ }%
+ \anchor{south}{%
+ \getcylinderpoints%
+ \pgf@anchor@cylinder@border{\pgfqpoint{0pt}{-\externalradius}}%
+ }%
+ \anchor{east}{%
+ \getcylinderpoints%
+ \pgf@anchor@cylinder@border{\pgfqpoint{\externalradius}{0pt}}%
+ }%
+ \anchor{west}{%
+ \getcylinderpoints%
+ \pgf@anchor@cylinder@border{\pgfqpoint{-\externalradius}{0pt}}%
+ }%
+ \anchor{north east}{%
+ \getcylinderpoints%
+ \pgf@anchor@cylinder@border{\pgfqpoint{\externalradius}{\externalradius}}%
+ }%
+ \anchor{south west}{%
+ \getcylinderpoints%
+ \pgf@anchor@cylinder@border{\pgfqpoint{-\externalradius}{-\externalradius}}%
+ }%
+ \anchor{south east}{%
+ \getcylinderpoints%
+ \pgf@anchor@cylinder@border{\pgfqpoint{\externalradius}{-\externalradius}}%
+ }%
+ \anchor{north west}{%
+ \getcylinderpoints%
+ \pgf@anchor@cylinder@border{\pgfqpoint{-\externalradius}{\externalradius}}%
+ }%
+ \anchor{before top}{%
+ \getcylinderpoints%
+ \pgfmathrotatepointaround{\pgfpointadd{\beforetopanchor}{\centerpoint}}{\centerpoint}{\rotate}%
+ }%
+ \anchor{top}{%
+ \getcylinderpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \beforetop%
+ \pgf@y0pt\relax%
+ \advance\pgf@x\xradius\relax%
+ }{\centerpoint}}{\centerpoint}{\rotate}%
+ }%
+ \anchor{after top}{%
+ \getcylinderpoints%
+ \pgfmathrotatepointaround{\pgfpointadd{\beforetopanchor\pgf@y-\pgf@y}{\centerpoint}}{\centerpoint}{\rotate}%
+ }%
+ \anchor{before bottom}{%
+ \getcylinderpoints%
+ \pgfmathrotatepointaround{\pgfpointadd{\afterbottomanchor\pgf@y-\pgf@y}{\centerpoint}}{\centerpoint}{\rotate}%
+ }%
+ \anchor{bottom}{%
+ \getcylinderpoints%
+ \pgfmathrotatepointaround{%
+ \pgfpointadd{%
+ \afterbottom%
+ \pgf@y0pt\relax%
+ \advance\pgf@x-\xradius\relax%
+ }{\centerpoint}}{\centerpoint}{\rotate}%
+ }%
+ \anchor{after bottom}{%
+ \getcylinderpoints%
+ \pgfmathrotatepointaround{\pgfpointadd{\afterbottomanchor}{\centerpoint}}{\centerpoint}{\rotate}%
+ }%
+ \backgroundpath{%
+ \getcylinderpoints%
+ {%
+ \pgf@x\xradius\relax%
+ \advance\pgf@x-\outersep\relax%
+ \edef\xradius{\the\pgf@x}%
+ \pgf@y\yradius\relax%
+ \advance\pgf@y-\outersep\relax%
+ \edef\yradius{\the\pgf@y}%
+ \pgftransformshift{\centerpoint}%
+ \pgftransformrotate{\rotate}%
+ \pgfpathmoveto{\afterbottom}%
+ \pgfpatharc{90}{270}{\xradius and \yradius}%
+ \pgfpathlineto{\beforetop\pgf@y-\pgf@y}%
+ \pgfpatharc{-90}{90}{\xradius and \yradius}%
+ \pgfpathclose%
+ \pgfpathmoveto{\beforetop}%
+ \pgfpatharc{90}{270}{\xradius and \yradius}%
+ }%
+ }%
+ \behindbackgroundpath{%
+ \ifpgfcylinderusescustomfill%
+ \getcylinderpoints%
+ \pgf@x\xradius\relax%
+ \advance\pgf@x-\outersep\relax%
+ \edef\xradius{\the\pgf@x}%
+ \pgf@y\yradius\relax%
+ \advance\pgf@y-\outersep\relax%
+ \edef\yradius{\the\pgf@y}%
+ {%
+ \pgftransformshift{\centerpoint}%
+ \pgftransformrotate{\rotate}%
+ \pgfpathmoveto{\afterbottom}%
+ \pgfpatharc{90}{270}{\xradius and \yradius}%
+ \pgfpathlineto{\beforetop\pgf@y-\pgf@y}%
+ \pgfpatharc{270}{90}{\xradius and \yradius}%
+ \pgfpathclose%
+ \expandafter\pgfsetfillcolor\expandafter{\pgfkeysvalueof{/pgf/cylinder body fill}}%
+ \pgfusepath{fill}%
+ %
+ \pgfpathmoveto{\beforetop}%
+ \pgfpatharc{90}{-270}{\xradius and \yradius}%
+ \pgfpathclose
+ \expandafter\pgfsetfillcolor\expandafter{\pgfkeysvalueof{/pgf/cylinder end fill}}%
+ \pgfusepath{fill}%
+ }%
+ \fi%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \getcylinderpoints%
+ \pgfutil@ifundefined{pgf@cylinder@referencepoint}{\let\referencepoint\centerpoint}{%
+ \let\referencepoint\pgf@cylinder@referencepoint}%
+ \pgfextract@process\externalpoint{%
+ \externalpoint%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \referencepoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \pgfmathsubtract@{\pgfmathresult}{\rotate}%
+ \ifdim\pgfmathresult pt<0pt\relax%
+ \pgfmathadd@{\pgfmathresult}{360}%
+ \fi%
+ \let\externalangle\pgfmathresult%
+ %
+ \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\afterbottomanchor}{\centerpoint}}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\beforetopanchor}{\centerpoint}}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathrotatepointaround{%
+ \pgfmathpointintersectionoflineandarc%
+ {\pgfmathrotatepointaround{\externalpoint}{\centerpoint}{-\rotate}}%
+ {\pgfmathrotatepointaround{\referencepoint}{\centerpoint}{-\rotate}}%
+ {%
+ \beforetop%
+ \pgf@xa\pgf@x%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ }%
+ {0}{90}{\xradius and \yradius}%
+ }{\centerpoint}{\rotate}%
+ \else%
+ \pgfpointintersectionoflines{%
+ \pgfmathrotatepointaround{\pgfpointadd{\afterbottomanchor}{\centerpoint}}%
+ {\centerpoint}{\rotate}}{%
+ \pgfmathrotatepointaround{\pgfpointadd{\beforetopanchor}{\centerpoint}}%
+ {\centerpoint}{\rotate}}%
+ {\referencepoint}{\externalpoint}%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\afterbottomanchor\pgf@y-\pgf@y}{\centerpoint}}%
+ \ifdim\externalangle pt>\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\referencepoint}{\pgfpointadd{\beforetopanchor\pgf@y-\pgf@y}{\centerpoint}}%
+ \ifdim\externalangle pt>\pgfmathresult pt\relax%
+ \pgfmathrotatepointaround{%
+ \pgfmathpointintersectionoflineandarc%
+ {\pgfmathrotatepointaround{\externalpoint}{\centerpoint}{-\rotate}}%
+ {\pgfmathrotatepointaround{\referencepoint}{\centerpoint}{-\rotate}}%
+ {%
+ \beforetop%
+ \pgf@xa\pgf@x%
+ \centerpoint
+ \advance\pgf@x\pgf@xa%
+ }%
+ {270}{360}{\xradius and \yradius}%
+ }{\centerpoint}{\rotate}%
+ \else%
+ \pgfpointintersectionoflines{%
+ \pgfmathrotatepointaround{\pgfpointadd{\afterbottomanchor\pgf@y-\pgf@y}{\centerpoint}}%
+ {\centerpoint}{\rotate}}{%
+ \pgfmathrotatepointaround{\pgfpointadd{\beforetopanchor\pgf@y-\pgf@y}{\centerpoint}}%
+ {\centerpoint}{\rotate}}%
+ {\referencepoint}{\externalpoint}%
+ \fi%
+ \else%
+ \pgfmathrotatepointaround{%
+ \pgfmathpointintersectionoflineandarc%
+ {\pgfmathrotatepointaround{\externalpoint}{\centerpoint}{-\rotate}}%
+ {\pgfmathrotatepointaround{\referencepoint}{\centerpoint}{-\rotate}}%
+ {%
+ \afterbottom%
+ \pgf@xa\pgf@x%
+ \centerpoint
+ \advance\pgf@x\pgf@xa%
+ }%
+ {90}{270}{\xradius and \yradius}%
+ }{\centerpoint}{\rotate}%
+ \fi%
+ \fi%
+ }%
+}%
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.misc.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.misc.code.tex
index 5466b1a27f2..fe64c707c1a 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.misc.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.misc.code.tex
@@ -7,28 +7,28 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/shapes/pgflibraryshapes.misc.code.tex,v 1.5 2013/07/18 14:15:25 tantau Exp $
+\ProvidesFileRCS{pgflibraryshapes.misc.code.tex}
\pgfdeclareshape{cross out}
-{
- \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
- \inheritanchorborder[from=rectangle]
- \inheritanchor[from=rectangle]{north}
- \inheritanchor[from=rectangle]{north west}
- \inheritanchor[from=rectangle]{north east}
- \inheritanchor[from=rectangle]{center}
- \inheritanchor[from=rectangle]{west}
- \inheritanchor[from=rectangle]{east}
- \inheritanchor[from=rectangle]{mid}
- \inheritanchor[from=rectangle]{mid west}
- \inheritanchor[from=rectangle]{mid east}
- \inheritanchor[from=rectangle]{base}
- \inheritanchor[from=rectangle]{base west}
- \inheritanchor[from=rectangle]{base east}
- \inheritanchor[from=rectangle]{south}
- \inheritanchor[from=rectangle]{south west}
- \inheritanchor[from=rectangle]{south east}
+{%
+ \inheritsavedanchors[from=rectangle]% % this is nearly a rectangle
+ \inheritanchorborder[from=rectangle]%
+ \inheritanchor[from=rectangle]{north}%
+ \inheritanchor[from=rectangle]{north west}%
+ \inheritanchor[from=rectangle]{north east}%
+ \inheritanchor[from=rectangle]{center}%
+ \inheritanchor[from=rectangle]{west}%
+ \inheritanchor[from=rectangle]{east}%
+ \inheritanchor[from=rectangle]{mid}%
+ \inheritanchor[from=rectangle]{mid west}%
+ \inheritanchor[from=rectangle]{mid east}%
+ \inheritanchor[from=rectangle]{base}%
+ \inheritanchor[from=rectangle]{base west}%
+ \inheritanchor[from=rectangle]{base east}%
+ \inheritanchor[from=rectangle]{south}%
+ \inheritanchor[from=rectangle]{south west}%
+ \inheritanchor[from=rectangle]{south east}%
\foregroundpath{
% store lower right in xa/ya and upper right in xb/yb
\southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
@@ -39,440 +39,440 @@
\pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@ya}}
\pgfsetarrowsstart{}
\pgfsetarrowsend{}
- }
-}
+ }%
+}%
\pgfdeclareshape{strike out}
-{
- \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
- \inheritanchorborder[from=rectangle]
- \inheritanchor[from=rectangle]{north}
- \inheritanchor[from=rectangle]{north west}
- \inheritanchor[from=rectangle]{north east}
- \inheritanchor[from=rectangle]{center}
- \inheritanchor[from=rectangle]{west}
- \inheritanchor[from=rectangle]{east}
- \inheritanchor[from=rectangle]{mid}
- \inheritanchor[from=rectangle]{mid west}
- \inheritanchor[from=rectangle]{mid east}
- \inheritanchor[from=rectangle]{base}
- \inheritanchor[from=rectangle]{base west}
- \inheritanchor[from=rectangle]{base east}
- \inheritanchor[from=rectangle]{south}
- \inheritanchor[from=rectangle]{south west}
- \inheritanchor[from=rectangle]{south east}
+{%
+ \inheritsavedanchors[from=rectangle]% % this is nearly a rectangle
+ \inheritanchorborder[from=rectangle]%
+ \inheritanchor[from=rectangle]{north}%
+ \inheritanchor[from=rectangle]{north west}%
+ \inheritanchor[from=rectangle]{north east}%
+ \inheritanchor[from=rectangle]{center}%
+ \inheritanchor[from=rectangle]{west}%
+ \inheritanchor[from=rectangle]{east}%
+ \inheritanchor[from=rectangle]{mid}%
+ \inheritanchor[from=rectangle]{mid west}%
+ \inheritanchor[from=rectangle]{mid east}%
+ \inheritanchor[from=rectangle]{base}%
+ \inheritanchor[from=rectangle]{base west}%
+ \inheritanchor[from=rectangle]{base east}%
+ \inheritanchor[from=rectangle]{south}%
+ \inheritanchor[from=rectangle]{south west}%
+ \inheritanchor[from=rectangle]{south east}%
\foregroundpath{
\pgfpathmoveto{\southwest}
\pgfpathlineto{\northeast}
\pgfsetarrowsstart{}
\pgfsetarrowsend{}
- }
-}
+ }%
+}%
% Rounded rectangle
\pgfkeys{/pgf/.cd,
- rounded rectangle west arc/.initial=convex,
- rounded rectangle east arc/.initial=convex,
- rounded rectangle left arc/.style={/pgf/rounded rectangle west arc=#1},%
- rounded rectangle right arc/.style={/pgf/rounded rectangle east arc=#1},%
- rounded rectangle arc length/.initial=180%
+ rounded rectangle west arc/.initial=convex,
+ rounded rectangle east arc/.initial=convex,
+ rounded rectangle left arc/.style={/pgf/rounded rectangle west arc=#1},%
+ rounded rectangle right arc/.style={/pgf/rounded rectangle east arc=#1},%
+ rounded rectangle arc length/.initial=180%
}%
\def\pgf@lib@sh@misc@rr@text@concave{concave}%
\def\pgf@lib@sh@misc@rr@text@convex{convex}%
\pgfdeclareshape{rounded rectangle}{%
- \savedmacro\westarc{%
- \edef\westarc{\pgfkeysvalueof{/pgf/rounded rectangle west arc}}%
- }
- \savedmacro\eastarc{%
- \edef\eastarc{\pgfkeysvalueof{/pgf/rounded rectangle east arc}}%
- }
- \savedmacro\roundedrectanglepoints{%
- %
- % Get half the arc angle, a.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/rounded rectangle arc length}}%
- \pgf@x=.5\pgf@x%
- \edef\halfarcangle{\pgfmath@tonumber{\pgf@x}}%
- \addtosavedmacro\halfarcangle%
- %
- % Get the (half) node dimensions x & y.
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \edef\innerxsep{\the\pgf@x}%
- \pgf@xa=0.5\wd\pgfnodeparttextbox%
- \edef\halftextwidth{\the\pgf@xa}%
- \addtosavedmacro\halftextwidth%
- \advance\pgf@x by\pgf@xa%
- %
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \edef\innerysep{\the\pgf@y}%
- \pgf@ya=.5\ht\pgfnodeparttextbox%
- \advance\pgf@ya by.5\dp\pgfnodeparttextbox%
- \edef\halftextheight{\the\pgf@ya}%
- \addtosavedmacro\halftextheight%
- \advance\pgf@y by\pgf@ya%
- %
- % Adjust for minimum height
- %
- \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@y<.5\pgf@yb%
- \pgf@y=.5\pgf@yb%
- \fi%
- \edef\halfheight{\the\pgf@y}%
- \addtosavedmacro\halfheight%
- %
- % Calculate the radius of the arc ends.
- %
- \pgfmathcosec@{\halfarcangle}%
- \pgf@ya=\pgfmathresult\pgf@y%
- \edef\radius{\the\pgf@ya}%
- \addtosavedmacro\radius%
- %
- % Arc width = r - r*cos(a/2).
- %
- \pgfmathcos@{\halfarcangle}%
- \pgf@xa=\pgf@ya%
- \advance\pgf@xa by-\pgfmathresult\pgf@ya%
- %
- % When the node contents are pushed inside a convex arc,
- % the resulting chord has a height r - r*cos(asin(0.5*h/r)).
- %
- \pgfmathdivide{\halftextheight}{\radius}%
- \pgfmathasin@{\pgfmathresult}%
- \pgfmathcos@{\pgfmathresult}%
- \pgf@xb=\pgf@ya%
- \advance\pgf@xb by-\pgfmathresult\pgf@ya%
- %
- % Adjust for minimum width.
- %
- \edef\westarc{\pgfkeysvalueof{/pgf/rounded rectangle west arc}}%
- \edef\eastarc{\pgfkeysvalueof{/pgf/rounded rectangle east arc}}%
- %
- \pgfutil@tempdima=2.0\pgf@x% x still holds the half width.
- \ifx\westarc\pgf@lib@sh@misc@rr@text@concave%
- \advance\pgfutil@tempdima by\pgf@xa%
- \else%
- \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
- \advance\pgfutil@tempdima by\pgf@xb%
- \fi%
- \fi%
- %
- \ifx\eastarc\pgf@lib@sh@misc@rr@text@concave%
- \advance\pgfutil@tempdima by\pgf@xa%
- \else%
- \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
- \advance\pgfutil@tempdima by\pgf@xb%
- \fi%
- \fi%
- %
- \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum width}}%
- \ifdim\pgfutil@tempdima<\pgfutil@tempdimb%
- \advance\pgfutil@tempdimb by-\pgfutil@tempdima%
- \divide\pgfutil@tempdimb by2\relax%
- \edef\xoffset{\the\pgfutil@tempdimb}%
- \else%
- \let\xoffset=\innerxsep%
- \fi%
- %
- % The node is made wider if convex arcs overlap.
- %
- \pgf@x=\halftextwidth\relax%
- \advance\pgf@x by\xoffset\relax%
- \pgf@xc=\pgf@ya%
- \advance\pgf@xc by-\pgf@xb%
- \ifdim\pgf@xc>\pgf@x\relax%
- \advance\pgf@xc by-\pgf@x%
- \advance\pgf@xc by\xoffset\relax%
- \edef\xoffset{\the\pgf@xc}%
- \fi%
- \addtosavedmacro\xoffset%
- %
- \pgf@x=\halftextwidth\relax%
- \advance\pgf@x by\xoffset\relax%
- \edef\halfwidth{\the\pgf@x}%
- \addtosavedmacro\halfwidth%
- %
- \edef\arcwidth{\the\pgf@xa}%
- \addtosavedmacro\arcwidth%
- %
- \edef\chordwidth{\the\pgf@xb}%
- \addtosavedmacro\chordwidth%
- %
- \pgfmathsetlengthmacro\outerxsep{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlengthmacro\outerysep{\pgfkeysvalueof{/pgf/outer ysep}}%
- \addtosavedmacro\outerxsep%
- \addtosavedmacro\outerysep%
- %
- % calculate some horizontal adjustments made for the default miter
- % drawn when an arc meets the north or south side of the node path.
- %
- \ifdim\halfarcangle pt=90pt\relax% Avoid division by zero.
- \def\concavexshift{0pt}%
- \else%
- % For a concave arc: outer xsep * cosec((90-a/2)/2)*cos((90-a/2)/2).
- \pgfmathsubtract@{90}{\halfarcangle}%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \let\angletemp=\pgfmathresult%
- \pgf@x=\outerxsep\relax%
- \pgfmathcosec@{\angletemp}%
- \pgf@x=\pgfmathresult\pgf@x%
- \pgfmathcos@{\angletemp}%
- \pgf@x=\pgfmathresult\pgf@x%
- \edef\concavexshift{\the\pgf@x}%
- \fi%
- \addtosavedmacro\concavexshift%
- %
- \ifdim\halfarcangle pt=90pt\relax% Avoid division by zero.
- \def\convexxshift{0pt}%
- \else%
- % For a convex arc: outer xsep * cosec((90+a/2)/2)*cos((90+a/2)/2).
- \pgfmathadd@{90}{\halfarcangle}%
- \pgfmathdivide@{\pgfmathresult}{2}%
- \let\angletemp=\pgfmathresult%
- \pgf@x=\outerxsep\relax%
- \pgfmathcosec@{\angletemp}%
- \pgf@x=\pgfmathresult\pgf@x%
- \pgfmathcos@{\angletemp}%
- \pgf@x=\pgfmathresult\pgf@x%
- \edef\convexxshift{\the\pgf@x}%
- \fi%
- \addtosavedmacro\convexxshift%
- }%
- \saveddimen\halflinewidth{\pgf@x.5\pgflinewidth}%
- \savedanchor\centerpoint{%
- \pgf@x=.5\wd\pgfnodeparttextbox%
- \pgf@y=.5\ht\pgfnodeparttextbox%
- \advance\pgf@y by-.5\dp\pgfnodeparttextbox%
- }
- \savedanchor\midpoint{%
- \pgf@x=.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \savedanchor\basepoint{%
- \pgf@x=.5\wd\pgfnodeparttextbox%
- \pgf@y=0pt\relax%
- }
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \anchor{mid west}{%
- \csname pgf@anchor@rounded rectangle@west\endcsname%
- \pgf@xc=\pgf@x%
- \midpoint%
- \pgf@x=\pgf@xc%
- }%
- \anchor{mid east}{%
- \csname pgf@anchor@rounded rectangle@east\endcsname%
- \pgf@xc=\pgf@x%
- \midpoint%
- \pgf@x=\pgf@xc%
- }%
- \anchor{base}{\basepoint}%
- \anchor{base west}{%
- \csname pgf@anchor@rounded rectangle@west\endcsname%
- \pgf@xc=\pgf@x%
- \basepoint%
- \pgf@x=\pgf@xc%
- }%
- \anchor{base east}{%
- \csname pgf@anchor@rounded rectangle@east\endcsname%
- \pgf@xc=\pgf@x%
- \basepoint%
- \pgf@x=\pgf@xc%
- }%
- \anchor{north}{%
- \roundedrectanglepoints%
- \pgfpointadd{\centerpoint}{\pgfpoint{+0pt}{\halfheight+\outerysep}}%
- }%
- \anchor{south}{%
- \roundedrectanglepoints%
- \pgfpointadd{\centerpoint}{\pgfpoint{+0pt}{-\halfheight-\outerysep}}%
- }%
- \anchor{west}{%
- \roundedrectanglepoints%
- \pgfpointadd{\centerpoint}{%
- \ifx\westarc\pgf@lib@sh@misc@rr@text@concave%
- \pgfpoint{-\halfwidth-\arcwidth-\concavexshift}{+0pt}%
- \else%
- \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
- \pgfpoint{-\halfwidth-\chordwidth-\outerxsep}{+0pt}%
- \else%
- \pgfpoint{-\halfwidth-\outerxsep}{+0pt}%
- \fi%
- \fi%
- }%
- }%
- \anchor{north west}{%
- \roundedrectanglepoints%
- \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
- \pgfpointadd{\centerpoint}{\pgfpoint{-\halfwidth-\chordwidth+\arcwidth-\convexxshift}{+0pt}}%
- \else%
- \csname pgf@anchor@rounded rectangle@west\endcsname%
- \fi%
- \pgf@xc=\pgf@x%
- \csname pgf@anchor@rounded rectangle@north\endcsname%
- \pgf@x=\pgf@xc%
- }%
- \anchor{south west}{%
- \roundedrectanglepoints%
- \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
- \pgfpointadd{\centerpoint}{\pgfpoint{-\halfwidth-\chordwidth+\arcwidth-\convexxshift}{+0pt}}%
- \else%
- \csname pgf@anchor@rounded rectangle@west\endcsname%
- \fi%
- \pgf@xc=\pgf@x%
- \csname pgf@anchor@rounded rectangle@south\endcsname%
- \pgf@x=\pgf@xc%
- }%
- \anchor{east}{%
- \roundedrectanglepoints%
- \pgfpointadd{\centerpoint}{%
- \ifx\eastarc\pgf@lib@sh@misc@rr@text@concave%
- \pgfpoint{\halfwidth+\arcwidth+\concavexshift}{+0pt}%
- \else%
- \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
- \pgfpoint{\halfwidth+\chordwidth+\outerxsep}{+0pt}%
- \else%
- \pgfpoint{\halfwidth+\outerxsep}{+0pt}%
- \fi%
- \fi%
- }%
- }%
- \anchor{north east}{%
- \roundedrectanglepoints%
- \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
- \pgfpointadd{\centerpoint}{\pgfpoint{\halfwidth+\chordwidth-\arcwidth+\convexxshift}{+0pt}}%
- \else%
- \csname pgf@anchor@rounded rectangle@east\endcsname%
- \fi%
- \pgf@xc=\pgf@x%
- \csname pgf@anchor@rounded rectangle@north\endcsname%
- \pgf@x=\pgf@xc%
- }%
- \anchor{south east}{%
- \roundedrectanglepoints%
- \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
- \pgfpointadd{\centerpoint}{\pgfpoint{\halfwidth+\chordwidth-\arcwidth+\convexxshift}{+0pt}}%
- \else%
- \csname pgf@anchor@rounded rectangle@east\endcsname%
- \fi%
- \pgf@xc=\pgf@x%
- \csname pgf@anchor@rounded rectangle@south\endcsname%
- \pgf@x=\pgf@xc%
- }%
- \backgroundpath{%
- {%
- \roundedrectanglepoints%
- \pgftransformshift{\centerpoint}%
- \pgfpathmoveto{\pgfpoint{0pt}{\halfheight}}%
- \ifx\eastarc\pgf@lib@sh@misc@rr@text@concave%
- \pgfpathlineto{\pgfpoint{\halfwidth+\arcwidth}{+\halfheight}}%
- \pgfpatharc{180-\halfarcangle}{180+\halfarcangle}{+\radius}%
- \else%
- \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
- \pgfpathlineto{\pgfpoint{\halfwidth+\chordwidth-\arcwidth}{+\halfheight}}%
- \pgfpatharc{+\halfarcangle}{+-\halfarcangle}{+\radius}%
- \else%
- \pgfpathlineto{\pgfqpoint{\halfwidth}{\halfheight}}%
- \pgfpathlineto{\pgfqpoint{\halfwidth}{-\halfheight}}%
- \fi%
- \fi%
- \ifx\westarc\pgf@lib@sh@misc@rr@text@concave%
- \pgfpathlineto{\pgfpoint{-\halfwidth-\arcwidth}{+-\halfheight}}%
- \pgfpatharc{+-\halfarcangle}{+\halfarcangle}{+\radius}%
- \else%
- \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
- \pgfpathlineto{\pgfpoint{-\halfwidth-\chordwidth+\arcwidth}{+-\halfheight}}%
- \pgfpatharc{180+\halfarcangle}{180-\halfarcangle}{+\radius}%
- \else%
- \pgfpathlineto{\pgfqpoint{-\halfwidth}{-\halfheight}}%
- \pgfpathlineto{\pgfqpoint{-\halfwidth}{\halfheight}}%
- \fi%
- \fi%
- \pgfpathclose%
- }%
- }
- \anchorborder{%
- \pgfextract@process\externalpoint{%
- \pgfextract@process\externalpoint{}%
- \pgfpointadd{\centerpoint}{\externalpoint}%
- }%
- \roundedrectanglepoints%
- %
- \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
- \let\externalangle=\pgfmathresult%
- \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rounded rectangle@north west\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rounded rectangle@north east\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- % Between north east and east.
- \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
- \pgfextract@process\arccenter{%
- \pgfpointadd{\centerpoint}{\pgfpoint{\halfwidth+\chordwidth-\radius}{+0pt}}%
- }%
- \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
- {\arccenter}{0}{\halfarcangle}{\radius+\outerxsep and \radius+\outerysep}%
- \else%
- \pgfpointintersectionoflines%
- {\csname pgf@anchor@rounded rectangle@north east\endcsname}%
- {\csname pgf@anchor@rounded rectangle@south east\endcsname}%
- {\externalpoint}{\centerpoint}%
- \fi%
- \else%
- % Between north west and north east.
- \pgfpointintersectionoflines%
- {\csname pgf@anchor@rounded rectangle@north east\endcsname}%
- {\csname pgf@anchor@rounded rectangle@north west\endcsname}%
- {\externalpoint}{\centerpoint}%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rounded rectangle@south west\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- % Between south west and north west.
- \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
- \pgfextract@process\arccenter{%
- \pgfpointadd{\centerpoint}{\pgfpoint{-\halfwidth-\chordwidth+\radius}{+0pt}}%
- }%
- \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
- {\arccenter}{180-\halfarcangle}{180+\halfarcangle}{\radius+\outerxsep and \radius+\outerysep}%
- \else%
- \pgfpointintersectionoflines%
- {\csname pgf@anchor@rounded rectangle@north west\endcsname}%
- {\csname pgf@anchor@rounded rectangle@south west\endcsname}%
- {\externalpoint}{\centerpoint}%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rounded rectangle@south east\endcsname}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax%
- % Between south east and south west.
- \pgfpointintersectionoflines%
- {\csname pgf@anchor@rounded rectangle@south east\endcsname}%
- {\csname pgf@anchor@rounded rectangle@south west\endcsname}%
- {\externalpoint}{\centerpoint}%
- \else%
- % Between east and south east.
- \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
- \pgfextract@process\arccenter{%
- \pgfpointadd{\centerpoint}{\pgfpoint{\halfwidth+\chordwidth-\radius}{+0pt}}%
- }%
- \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
- {\arccenter}{360-\halfarcangle}{360}{\radius+\outerxsep and \radius+\outerysep}%
- \else%
- \pgfpointintersectionoflines%
- {\csname pgf@anchor@rounded rectangle@north east\endcsname}%
- {\csname pgf@anchor@rounded rectangle@south east\endcsname}%
- {\externalpoint}{\centerpoint}%
- \fi%
- \fi%
- \fi%
- \fi%
- }
-}
+ \savedmacro\westarc{%
+ \edef\westarc{\pgfkeysvalueof{/pgf/rounded rectangle west arc}}%
+ }%
+ \savedmacro\eastarc{%
+ \edef\eastarc{\pgfkeysvalueof{/pgf/rounded rectangle east arc}}%
+ }%
+ \savedmacro\roundedrectanglepoints{%
+ %
+ % Get half the arc angle, a.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/rounded rectangle arc length}}%
+ \pgf@x=.5\pgf@x%
+ \edef\halfarcangle{\pgfmath@tonumber{\pgf@x}}%
+ \addtosavedmacro\halfarcangle%
+ %
+ % Get the (half) node dimensions x & y.
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \edef\innerxsep{\the\pgf@x}%
+ \pgf@xa=0.5\wd\pgfnodeparttextbox%
+ \edef\halftextwidth{\the\pgf@xa}%
+ \addtosavedmacro\halftextwidth%
+ \advance\pgf@x by\pgf@xa%
+ %
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \edef\innerysep{\the\pgf@y}%
+ \pgf@ya=.5\ht\pgfnodeparttextbox%
+ \advance\pgf@ya by.5\dp\pgfnodeparttextbox%
+ \edef\halftextheight{\the\pgf@ya}%
+ \addtosavedmacro\halftextheight%
+ \advance\pgf@y by\pgf@ya%
+ %
+ % Adjust for minimum height
+ %
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@y<.5\pgf@yb%
+ \pgf@y=.5\pgf@yb%
+ \fi%
+ \edef\halfheight{\the\pgf@y}%
+ \addtosavedmacro\halfheight%
+ %
+ % Calculate the radius of the arc ends.
+ %
+ \pgfmathcosec@{\halfarcangle}%
+ \pgf@ya=\pgfmathresult\pgf@y%
+ \edef\radius{\the\pgf@ya}%
+ \addtosavedmacro\radius%
+ %
+ % Arc width = r - r*cos(a/2).
+ %
+ \pgfmathcos@{\halfarcangle}%
+ \pgf@xa=\pgf@ya%
+ \advance\pgf@xa by-\pgfmathresult\pgf@ya%
+ %
+ % When the node contents are pushed inside a convex arc,
+ % the resulting chord has a height r - r*cos(asin(0.5*h/r)).
+ %
+ \pgfmathdivide{\halftextheight}{\radius}%
+ \pgfmathasin@{\pgfmathresult}%
+ \pgfmathcos@{\pgfmathresult}%
+ \pgf@xb=\pgf@ya%
+ \advance\pgf@xb by-\pgfmathresult\pgf@ya%
+ %
+ % Adjust for minimum width.
+ %
+ \edef\westarc{\pgfkeysvalueof{/pgf/rounded rectangle west arc}}%
+ \edef\eastarc{\pgfkeysvalueof{/pgf/rounded rectangle east arc}}%
+ %
+ \pgfutil@tempdima=2.0\pgf@x% x still holds the half width.
+ \ifx\westarc\pgf@lib@sh@misc@rr@text@concave%
+ \advance\pgfutil@tempdima by\pgf@xa%
+ \else%
+ \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
+ \advance\pgfutil@tempdima by\pgf@xb%
+ \fi%
+ \fi%
+ %
+ \ifx\eastarc\pgf@lib@sh@misc@rr@text@concave%
+ \advance\pgfutil@tempdima by\pgf@xa%
+ \else%
+ \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
+ \advance\pgfutil@tempdima by\pgf@xb%
+ \fi%
+ \fi%
+ %
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgfutil@tempdima<\pgfutil@tempdimb%
+ \advance\pgfutil@tempdimb by-\pgfutil@tempdima%
+ \divide\pgfutil@tempdimb by2\relax%
+ \edef\xoffset{\the\pgfutil@tempdimb}%
+ \else%
+ \let\xoffset=\innerxsep%
+ \fi%
+ %
+ % The node is made wider if convex arcs overlap.
+ %
+ \pgf@x=\halftextwidth\relax%
+ \advance\pgf@x by\xoffset\relax%
+ \pgf@xc=\pgf@ya%
+ \advance\pgf@xc by-\pgf@xb%
+ \ifdim\pgf@xc>\pgf@x\relax%
+ \advance\pgf@xc by-\pgf@x%
+ \advance\pgf@xc by\xoffset\relax%
+ \edef\xoffset{\the\pgf@xc}%
+ \fi%
+ \addtosavedmacro\xoffset%
+ %
+ \pgf@x=\halftextwidth\relax%
+ \advance\pgf@x by\xoffset\relax%
+ \edef\halfwidth{\the\pgf@x}%
+ \addtosavedmacro\halfwidth%
+ %
+ \edef\arcwidth{\the\pgf@xa}%
+ \addtosavedmacro\arcwidth%
+ %
+ \edef\chordwidth{\the\pgf@xb}%
+ \addtosavedmacro\chordwidth%
+ %
+ \pgfmathsetlengthmacro\outerxsep{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlengthmacro\outerysep{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \addtosavedmacro\outerxsep%
+ \addtosavedmacro\outerysep%
+ %
+ % calculate some horizontal adjustments made for the default miter
+ % drawn when an arc meets the north or south side of the node path.
+ %
+ \ifdim\halfarcangle pt=90pt\relax% Avoid division by zero.
+ \def\concavexshift{0pt}%
+ \else%
+ % For a concave arc: outer xsep * cosec((90-a/2)/2)*cos((90-a/2)/2).
+ \pgfmathsubtract@{90}{\halfarcangle}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \let\angletemp=\pgfmathresult%
+ \pgf@x=\outerxsep\relax%
+ \pgfmathcosec@{\angletemp}%
+ \pgf@x=\pgfmathresult\pgf@x%
+ \pgfmathcos@{\angletemp}%
+ \pgf@x=\pgfmathresult\pgf@x%
+ \edef\concavexshift{\the\pgf@x}%
+ \fi%
+ \addtosavedmacro\concavexshift%
+ %
+ \ifdim\halfarcangle pt=90pt\relax% Avoid division by zero.
+ \def\convexxshift{0pt}%
+ \else%
+ % For a convex arc: outer xsep * cosec((90+a/2)/2)*cos((90+a/2)/2).
+ \pgfmathadd@{90}{\halfarcangle}%
+ \pgfmathdivide@{\pgfmathresult}{2}%
+ \let\angletemp=\pgfmathresult%
+ \pgf@x=\outerxsep\relax%
+ \pgfmathcosec@{\angletemp}%
+ \pgf@x=\pgfmathresult\pgf@x%
+ \pgfmathcos@{\angletemp}%
+ \pgf@x=\pgfmathresult\pgf@x%
+ \edef\convexxshift{\the\pgf@x}%
+ \fi%
+ \addtosavedmacro\convexxshift%
+ }%
+ \saveddimen\halflinewidth{\pgf@x.5\pgflinewidth}%
+ \savedanchor\centerpoint{%
+ \pgf@x=.5\wd\pgfnodeparttextbox%
+ \pgf@y=.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y by-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x=.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x=.5\wd\pgfnodeparttextbox%
+ \pgf@y=0pt\relax%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid west}{%
+ \csname pgf@anchor@rounded rectangle@west\endcsname%
+ \pgf@xc=\pgf@x%
+ \midpoint%
+ \pgf@x=\pgf@xc%
+ }%
+ \anchor{mid east}{%
+ \csname pgf@anchor@rounded rectangle@east\endcsname%
+ \pgf@xc=\pgf@x%
+ \midpoint%
+ \pgf@x=\pgf@xc%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base west}{%
+ \csname pgf@anchor@rounded rectangle@west\endcsname%
+ \pgf@xc=\pgf@x%
+ \basepoint%
+ \pgf@x=\pgf@xc%
+ }%
+ \anchor{base east}{%
+ \csname pgf@anchor@rounded rectangle@east\endcsname%
+ \pgf@xc=\pgf@x%
+ \basepoint%
+ \pgf@x=\pgf@xc%
+ }%
+ \anchor{north}{%
+ \roundedrectanglepoints%
+ \pgfpointadd{\centerpoint}{\pgfpoint{+0pt}{\halfheight+\outerysep}}%
+ }%
+ \anchor{south}{%
+ \roundedrectanglepoints%
+ \pgfpointadd{\centerpoint}{\pgfpoint{+0pt}{-\halfheight-\outerysep}}%
+ }%
+ \anchor{west}{%
+ \roundedrectanglepoints%
+ \pgfpointadd{\centerpoint}{%
+ \ifx\westarc\pgf@lib@sh@misc@rr@text@concave%
+ \pgfpoint{-\halfwidth-\arcwidth-\concavexshift}{+0pt}%
+ \else%
+ \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
+ \pgfpoint{-\halfwidth-\chordwidth-\outerxsep}{+0pt}%
+ \else%
+ \pgfpoint{-\halfwidth-\outerxsep}{+0pt}%
+ \fi%
+ \fi%
+ }%
+ }%
+ \anchor{north west}{%
+ \roundedrectanglepoints%
+ \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
+ \pgfpointadd{\centerpoint}{\pgfpoint{-\halfwidth-\chordwidth+\arcwidth-\convexxshift}{+0pt}}%
+ \else%
+ \csname pgf@anchor@rounded rectangle@west\endcsname%
+ \fi%
+ \pgf@xc=\pgf@x%
+ \csname pgf@anchor@rounded rectangle@north\endcsname%
+ \pgf@x=\pgf@xc%
+ }%
+ \anchor{south west}{%
+ \roundedrectanglepoints%
+ \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
+ \pgfpointadd{\centerpoint}{\pgfpoint{-\halfwidth-\chordwidth+\arcwidth-\convexxshift}{+0pt}}%
+ \else%
+ \csname pgf@anchor@rounded rectangle@west\endcsname%
+ \fi%
+ \pgf@xc=\pgf@x%
+ \csname pgf@anchor@rounded rectangle@south\endcsname%
+ \pgf@x=\pgf@xc%
+ }%
+ \anchor{east}{%
+ \roundedrectanglepoints%
+ \pgfpointadd{\centerpoint}{%
+ \ifx\eastarc\pgf@lib@sh@misc@rr@text@concave%
+ \pgfpoint{\halfwidth+\arcwidth+\concavexshift}{+0pt}%
+ \else%
+ \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
+ \pgfpoint{\halfwidth+\chordwidth+\outerxsep}{+0pt}%
+ \else%
+ \pgfpoint{\halfwidth+\outerxsep}{+0pt}%
+ \fi%
+ \fi%
+ }%
+ }%
+ \anchor{north east}{%
+ \roundedrectanglepoints%
+ \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
+ \pgfpointadd{\centerpoint}{\pgfpoint{\halfwidth+\chordwidth-\arcwidth+\convexxshift}{+0pt}}%
+ \else%
+ \csname pgf@anchor@rounded rectangle@east\endcsname%
+ \fi%
+ \pgf@xc=\pgf@x%
+ \csname pgf@anchor@rounded rectangle@north\endcsname%
+ \pgf@x=\pgf@xc%
+ }%
+ \anchor{south east}{%
+ \roundedrectanglepoints%
+ \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
+ \pgfpointadd{\centerpoint}{\pgfpoint{\halfwidth+\chordwidth-\arcwidth+\convexxshift}{+0pt}}%
+ \else%
+ \csname pgf@anchor@rounded rectangle@east\endcsname%
+ \fi%
+ \pgf@xc=\pgf@x%
+ \csname pgf@anchor@rounded rectangle@south\endcsname%
+ \pgf@x=\pgf@xc%
+ }%
+ \backgroundpath{%
+ {%
+ \roundedrectanglepoints%
+ \pgftransformshift{\centerpoint}%
+ \pgfpathmoveto{\pgfpoint{0pt}{\halfheight}}%
+ \ifx\eastarc\pgf@lib@sh@misc@rr@text@concave%
+ \pgfpathlineto{\pgfpoint{\halfwidth+\arcwidth}{+\halfheight}}%
+ \pgfpatharc{180-\halfarcangle}{180+\halfarcangle}{+\radius}%
+ \else%
+ \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
+ \pgfpathlineto{\pgfpoint{\halfwidth+\chordwidth-\arcwidth}{+\halfheight}}%
+ \pgfpatharc{+\halfarcangle}{+-\halfarcangle}{+\radius}%
+ \else%
+ \pgfpathlineto{\pgfqpoint{\halfwidth}{\halfheight}}%
+ \pgfpathlineto{\pgfqpoint{\halfwidth}{-\halfheight}}%
+ \fi%
+ \fi%
+ \ifx\westarc\pgf@lib@sh@misc@rr@text@concave%
+ \pgfpathlineto{\pgfpoint{-\halfwidth-\arcwidth}{+-\halfheight}}%
+ \pgfpatharc{+-\halfarcangle}{+\halfarcangle}{+\radius}%
+ \else%
+ \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
+ \pgfpathlineto{\pgfpoint{-\halfwidth-\chordwidth+\arcwidth}{+-\halfheight}}%
+ \pgfpatharc{180+\halfarcangle}{180-\halfarcangle}{+\radius}%
+ \else%
+ \pgfpathlineto{\pgfqpoint{-\halfwidth}{-\halfheight}}%
+ \pgfpathlineto{\pgfqpoint{-\halfwidth}{\halfheight}}%
+ \fi%
+ \fi%
+ \pgfpathclose%
+ }%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{%
+ \pgfextract@process\externalpoint{}%
+ \pgfpointadd{\centerpoint}{\externalpoint}%
+ }%
+ \roundedrectanglepoints%
+ %
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \let\externalangle=\pgfmathresult%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rounded rectangle@north west\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rounded rectangle@north east\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ % Between north east and east.
+ \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
+ \pgfextract@process\arccenter{%
+ \pgfpointadd{\centerpoint}{\pgfpoint{\halfwidth+\chordwidth-\radius}{+0pt}}%
+ }%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {\arccenter}{0}{\halfarcangle}{\radius+\outerxsep and \radius+\outerysep}%
+ \else%
+ \pgfpointintersectionoflines%
+ {\csname pgf@anchor@rounded rectangle@north east\endcsname}%
+ {\csname pgf@anchor@rounded rectangle@south east\endcsname}%
+ {\externalpoint}{\centerpoint}%
+ \fi%
+ \else%
+ % Between north west and north east.
+ \pgfpointintersectionoflines%
+ {\csname pgf@anchor@rounded rectangle@north east\endcsname}%
+ {\csname pgf@anchor@rounded rectangle@north west\endcsname}%
+ {\externalpoint}{\centerpoint}%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rounded rectangle@south west\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ % Between south west and north west.
+ \ifx\westarc\pgf@lib@sh@misc@rr@text@convex%
+ \pgfextract@process\arccenter{%
+ \pgfpointadd{\centerpoint}{\pgfpoint{-\halfwidth-\chordwidth+\radius}{+0pt}}%
+ }%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {\arccenter}{180-\halfarcangle}{180+\halfarcangle}{\radius+\outerxsep and \radius+\outerysep}%
+ \else%
+ \pgfpointintersectionoflines%
+ {\csname pgf@anchor@rounded rectangle@north west\endcsname}%
+ {\csname pgf@anchor@rounded rectangle@south west\endcsname}%
+ {\externalpoint}{\centerpoint}%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@rounded rectangle@south east\endcsname}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax%
+ % Between south east and south west.
+ \pgfpointintersectionoflines%
+ {\csname pgf@anchor@rounded rectangle@south east\endcsname}%
+ {\csname pgf@anchor@rounded rectangle@south west\endcsname}%
+ {\externalpoint}{\centerpoint}%
+ \else%
+ % Between east and south east.
+ \ifx\eastarc\pgf@lib@sh@misc@rr@text@convex%
+ \pgfextract@process\arccenter{%
+ \pgfpointadd{\centerpoint}{\pgfpoint{\halfwidth+\chordwidth-\radius}{+0pt}}%
+ }%
+ \pgfmathpointintersectionoflineandarc{\externalpoint}{\centerpoint}%
+ {\arccenter}{360-\halfarcangle}{360}{\radius+\outerxsep and \radius+\outerysep}%
+ \else%
+ \pgfpointintersectionoflines%
+ {\csname pgf@anchor@rounded rectangle@north east\endcsname}%
+ {\csname pgf@anchor@rounded rectangle@south east\endcsname}%
+ {\externalpoint}{\centerpoint}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ }%
+}%
@@ -483,74 +483,74 @@
% /pgf/chamfered rectangle xsep : set the extent of the x chamferling.
% /pgf/chamfered rectangle ysep : set the extent of the y chamferling.
-\pgfkeys{/pgf/chamfered rectangle corners/.store in=\pgf@lib@sh@misc@cr@corners}
-\pgfkeys{/tikz/chamfered rectangle corners/.store in=\pgf@lib@sh@misc@cr@corners}
+\pgfkeys{/pgf/chamfered rectangle corners/.store in=\pgf@lib@sh@misc@cr@corners}%
+\pgfkeys{/tikz/chamfered rectangle corners/.store in=\pgf@lib@sh@misc@cr@corners}%
\def\pgf@lib@sh@misc@cr@chamferall{chamfer all}%
-\def\pgf@lib@sh@misc@cr@chamfer{chamfer}
+\def\pgf@lib@sh@misc@cr@chamfer{chamfer}%
\let\pgf@lib@sh@misc@cr@corners\pgf@lib@sh@misc@cr@chamferall
\def\pgf@lib@sh@misc@cr@getcorners{%
- \let\northeastcorner\pgfutil@empty%
- \let\southeastcorner\pgfutil@empty%
- \let\southwestcorner\pgfutil@empty%
- \let\northwestcorner\pgfutil@empty%
- \expandafter\pgfutil@in@\expandafter{\pgf@lib@sh@misc@cr@corners}{chamfer all}%
- \ifpgfutil@in@%
- \let\northeastcorner\pgf@lib@sh@misc@cr@round%
- \let\southeastcorner\pgf@lib@sh@misc@cr@round%
- \let\southwestcorner\pgf@lib@sh@misc@cr@round%
- \let\northwestcorner\pgf@lib@sh@misc@cr@round%
- \let\pgf@next\relax%
- \else%
- \let\pgf@next\pgf@lib@sh@misc@cr@parsecorners%
- \fi%
- \pgf@next}
+ \let\northeastcorner\pgfutil@empty%
+ \let\southeastcorner\pgfutil@empty%
+ \let\southwestcorner\pgfutil@empty%
+ \let\northwestcorner\pgfutil@empty%
+ \expandafter\pgfutil@in@\expandafter{\pgf@lib@sh@misc@cr@corners}{chamfer all}%
+ \ifpgfutil@in@%
+ \let\northeastcorner\pgf@lib@sh@misc@cr@round%
+ \let\southeastcorner\pgf@lib@sh@misc@cr@round%
+ \let\southwestcorner\pgf@lib@sh@misc@cr@round%
+ \let\northwestcorner\pgf@lib@sh@misc@cr@round%
+ \let\pgf@next\relax%
+ \else%
+ \let\pgf@next\pgf@lib@sh@misc@cr@parsecorners%
+ \fi%
+ \pgf@next}%
\def\pgf@lib@sh@misc@cr@parsecorners{%
- \expandafter\pgf@@chamferedrectangle@parsecorners\pgf@lib@sh@misc@cr@corners,\pgf@stop,%
-}
-
+ \expandafter\pgf@@chamferedrectangle@parsecorners\pgf@lib@sh@misc@cr@corners,\pgf@stop,%
+}%
+
\def\pgf@@chamferedrectangle@parsecorners#1,{%
- \ifx#1\pgf@stop%
- \let\pgf@next\relax%
- \else%
- \pgfutil@in@{@#1@}{@north east@@top left@}%
- \ifpgfutil@in@%
- \let\northeastcorner\pgf@lib@sh@misc@cr@chamfer%
- \else%
- \pgfutil@in@{@#1@}{@south east@@bottom right@}%
- \ifpgfutil@in@%
- \let\southeastcorner\pgf@lib@sh@misc@cr@chamfer%
- \else%
- \pgfutil@in@{@#1@}{@south west@@bottom left@}%
- \ifpgfutil@in@%
- \let\southwestcorner\pgf@lib@sh@misc@cr@chamfer%
- \else%
- \pgfutil@in@{@#1@}{@north west@@top right@}%
- \ifpgfutil@in@%
- \let\northwestcorner\pgf@lib@sh@misc@cr@round%
- \fi%
- \fi%
- \fi%
- \fi%
- \let\pgf@next\pgf@@@chamferedrectangle@parsecorners%
- \fi%
- \pgf@next%
-}
+ \ifx#1\pgf@stop%
+ \let\pgf@next\relax%
+ \else%
+ \pgfutil@in@{@#1@}{@north east@@top left@}%
+ \ifpgfutil@in@%
+ \let\northeastcorner\pgf@lib@sh@misc@cr@chamfer%
+ \else%
+ \pgfutil@in@{@#1@}{@south east@@bottom right@}%
+ \ifpgfutil@in@%
+ \let\southeastcorner\pgf@lib@sh@misc@cr@chamfer%
+ \else%
+ \pgfutil@in@{@#1@}{@south west@@bottom left@}%
+ \ifpgfutil@in@%
+ \let\southwestcorner\pgf@lib@sh@misc@cr@chamfer%
+ \else%
+ \pgfutil@in@{@#1@}{@north west@@top right@}%
+ \ifpgfutil@in@%
+ \let\northwestcorner\pgf@lib@sh@misc@cr@round%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \let\pgf@next\pgf@@@chamferedrectangle@parsecorners%
+ \fi%
+ \pgf@next%
+}%
\def\pgf@@@chamferedrectangle@parsecorners{%
- \pgfutil@ifnextchar x{\pgf@@chamferedrectangle@parsecorners}{\pgf@@chamferedrectangle@parsecorners}%
+ \pgfutil@ifnextchar x{\pgf@@chamferedrectangle@parsecorners}{\pgf@@chamferedrectangle@parsecorners}%
}%
\pgfkeys{/pgf/.cd,
- chamfered rectangle angle/.initial=45,%
- chamfered rectangle xsep/.initial=.666ex,%
- chamfered rectangle ysep/.initial=.666ex%
-}
+ chamfered rectangle angle/.initial=45,%
+ chamfered rectangle xsep/.initial=.666ex,%
+ chamfered rectangle ysep/.initial=.666ex%
+}%
\pgfkeys{/pgf/chamfered rectangle sep/.style={%
- /pgf/chamfered rectangle xsep=#1,/pgf/chamfered rectangle ysep=#1}%
-}
+ /pgf/chamfered rectangle xsep=#1,/pgf/chamfered rectangle ysep=#1}%
+}%
@@ -559,569 +559,569 @@
%
%
\pgfdeclareshape{chamfered rectangle}{%
- \savedmacro\getchamferedrectanglepoints{%
- \pgf@lib@sh@misc@cr@getcorners%
- %
- % Get the node dimensions.
- %
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}%
- \advance\pgf@xa.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@ya.5\ht\pgfnodeparttextbox%
- \advance\pgf@ya.5\dp\pgfnodeparttextbox%
- %
- % Get chamfer stuff.
- %
- \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/chamfered rectangle angle}}%
- \ifdim\pgfutil@tempdima<89pt\relax%
- \ifdim\pgfutil@tempdima<1pt\relax%
- \pgfutil@tempdima1pt\relax%
- \fi%
- \else%
- \pgfutil@tempdima89pt\relax%
- \fi%
- \pgfutil@tempdima-\pgfutil@tempdima%
- \advance\pgfutil@tempdima90pt\relax%
- \pgfmathtan@{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \let\tanangle\pgfmathresult%
- \pgfmathcot@{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \let\cotangle\pgfmathresult%
- \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/chamfered rectangle xsep}}%
- \pgf@yc\tanangle\pgf@xb%
- \ifdim\pgf@yc>\pgf@ya%
- \pgf@yc\pgf@ya%
- \pgf@xb\cotangle\pgf@yc%
- \fi%
- \pgfmathcot@{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/chamfered rectangle ysep}}%
- \pgf@xc\cotangle\pgf@yb%
- \ifdim\pgf@xc>\pgf@xa%
- \pgf@xc\pgf@xa%
- \pgf@yb\tanangle\pgf@xc%
- \fi%
- %
- % Check for minimum width and height%
- %
- \pgfutil@tempdima\pgf@xa%
- \advance\pgfutil@tempdima\pgf@xb%
- \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum width}}%
- \ifdim\pgfutil@tempdima<.5\pgfutil@tempdimb%
- \pgf@xa.5\pgfutil@tempdimb%
- \advance\pgf@xa-\pgf@xb%
- \fi%
- \pgfutil@tempdima\pgf@ya%
- \advance\pgfutil@tempdima\pgf@yb%
- \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgfutil@tempdima<.5\pgfutil@tempdimb%
- \pgf@ya.5\pgfutil@tempdimb%
- \advance\pgf@ya-\pgf@yb%
- \fi%
- %
- % Define the background path points.
- %
- \pgfextract@process\centerpoint{%
- \pgfmathsetlength\pgf@x{+.5\wd\pgfnodeparttextbox}%
- \pgfmathsetlength\pgf@y{+.5\ht\pgfnodeparttextbox}%
- \pgfmathaddtolength\pgf@y{+-.5\dp\pgfnodeparttextbox}%
- }%
- \pgfextract@process\beforenortheast{%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@x\pgf@xb%
- \advance\pgf@y\pgf@ya%
- \advance\pgf@y-\pgf@yc%
- }%
- \pgfextract@process\northeast{%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- \ifx\northeastcorner\pgfutil@empty%
- \advance\pgf@x\pgf@xb%
- \advance\pgf@y\pgf@yb%
- \fi%
- }%
- \pgfextract@process\afternortheast{%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@x-\pgf@xc%
- \advance\pgf@y\pgf@ya%
- \advance\pgf@y\pgf@yb%
- }%
- \pgfextract@process\northwest{%
- \centerpoint%
- \advance\pgf@x-\pgf@xa%
- \advance\pgf@y\pgf@ya%
- \ifx\northwestcorner\pgfutil@empty%
- \advance\pgf@x-\pgf@xb%
- \advance\pgf@y\pgf@yb%
- \fi%
- }%
- \pgfextract@process\beforesouthwest{%
- \centerpoint%
- \advance\pgf@x-\pgf@xa%
- \advance\pgf@x-\pgf@xb%
- \advance\pgf@y-\pgf@ya%
- \advance\pgf@y\pgf@yc%
- }%
- \pgfextract@process\southwest{%
- \centerpoint%
- \advance\pgf@x-\pgf@xa%
- \advance\pgf@y-\pgf@ya%
- \ifx\southwestcorner\pgfutil@empty%
- \advance\pgf@x-\pgf@xb%
- \advance\pgf@y-\pgf@yb%
- \fi%
- }%
- \pgfextract@process\aftersouthwest{%
- \centerpoint%
- \advance\pgf@x-\pgf@xa%
- \advance\pgf@x\pgf@xc%
- \advance\pgf@y-\pgf@ya%
- \advance\pgf@y-\pgf@yb%
- }%
- \pgfextract@process\southeast{%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y-\pgf@ya%
- \ifx\southeastcorner\pgfutil@empty%
- \advance\pgf@x\pgf@xb%
- \advance\pgf@y-\pgf@yb%
- \fi%
- }%
- %
- % Calculate the `miter' vectors.
- %
- \pgfmathanglebetweenlines{\beforenortheast}{\afternortheast}{\beforenortheast}%
- {\beforesouthwest\pgf@ya\pgf@y\beforenortheast\pgf@y\pgf@ya}%
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \ifdim\pgfutil@tempdima>180pt\relax%
- \advance\pgfutil@tempdima-180pt\relax%
- \fi%
- \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/outer xsep}}%
- \ifdim\pgfutil@tempdima<90pt\relax%
- \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
- \pgfutil@tempdima0pt\relax%
- \else%
- \pgfutil@tempdima.5\pgfutil@tempdima%
- \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
- \pgfutil@tempdima-\pgfutil@tempdima%
- \advance\pgfutil@tempdima90pt\relax%
- \fi%
- \pgfextract@process\before@ne@anchor{%
- \beforenortheast%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \pgfutil@tempdima-\pgfutil@tempdima%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfextract@process\before@sw@anchor{%
- \beforesouthwest%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \pgfqpointpolar{-\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- %
- \pgfmathanglebetweenlines{\afternortheast}{\aftersouthwest\pgf@xa\pgf@x\afternortheast\pgf@x\pgf@xa}%
- {\afternortheast}{\beforenortheast}%
- \pgfutil@tempdima\pgfmathresult pt\relax%
- \ifdim\pgfutil@tempdima>270pt\relax%
- \advance\pgfutil@tempdima-270pt\relax%
- \fi%
- \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/outer ysep}}%
- \ifdim\pgfutil@tempdima<90pt\relax%
- \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
- \pgfutil@tempdima90pt\relax%
- \else%
- \pgfutil@tempdima.5\pgfutil@tempdima%
- \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
- \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
- \fi%
- %
- \pgfextract@process\after@ne@anchor{%
- \afternortheast%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \pgfutil@tempdima-\pgfutil@tempdima%
- \advance\pgfutil@tempdima180pt\relax%
- \pgfextract@process\after@sw@anchor{%
- \aftersouthwest
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \pgfqpointpolar{-\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \addtosavedmacro\before@ne@anchor%
- \addtosavedmacro\after@ne@anchor%
- \addtosavedmacro\before@sw@anchor%
- \addtosavedmacro\after@sw@anchor%
- \pgfextract@process\ne@anchor{%
- \ifx\northeastcorner\pgfutil@empty%
- \northeast%
- \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \else%
- \pgfpointlineattime{0.5}{\before@ne@anchor}{\after@ne@anchor}%
- \fi%
- }%
- \pgfextract@process\nw@anchor{%
- \ifx\northwestcorner\pgfutil@empty%
- \northwest%
- \pgfmathaddtolength\pgf@x{-\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \else%
- \pgfpointlineattime{0.5}{%
- \before@ne@anchor%
- \pgf@ya\pgf@y
- \before@sw@anchor%
- \pgf@y\pgf@ya%
- }{%
- \after@ne@anchor%
- \pgf@ya\pgf@y
- \after@sw@anchor%
- \pgf@y\pgf@ya%
- }%
- \fi%
- }%
- \pgfextract@process\sw@anchor{%
- \ifx\southwestcorner\pgfutil@empty%
- \southwest%
- \pgfmathaddtolength\pgf@x{-\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathaddtolength\pgf@y{-\pgfkeysvalueof{/pgf/outer ysep}}%
- \else%
- \pgfpointlineattime{0.5}{\before@sw@anchor}{\after@sw@anchor}%
- \fi%
- }%
- \pgfextract@process\se@anchor{%
- \ifx\southeastcorner\pgfutil@empty%
- \southeast%
- \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathaddtolength\pgf@y{-\pgfkeysvalueof{/pgf/outer ysep}}%
- \else%
- \pgfpointlineattime{0.5}{%
- \before@ne@anchor%
- \pgf@xa\pgf@x
- \before@sw@anchor%
- \pgf@x\pgf@xa%
- }{%
- \after@ne@anchor%
- \pgf@xa\pgf@x
- \after@sw@anchor%
- \pgf@x\pgf@xa%
- }%
- \fi%
- }%
- \addtosavedmacro\ne@anchor%
- \addtosavedmacro\nw@anchor%
- \addtosavedmacro\sw@anchor%
- \addtosavedmacro\se@anchor%
- }%
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }%
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+.5ex}%
- }%
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt%
- }%
- \anchor{center}{\centerpoint}%
- \anchor{mid}{\midpoint}%
- \anchor{mid east}{%
- \getchamferedrectanglepoints%
- \midpoint%
- \pgf@ya\pgf@y%
- \pgf@process{%
- \before@sw@anchor%
- \pgf@ya\pgf@y%
- \before@ne@anchor%
- \pgf@y\pgf@ya
- }%
- \ifdim\pgf@ya<\pgf@y%
- \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
- {\before@sw@anchor\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
- {\after@sw@anchor\pgf@ya\pgf@y\after@ne@anchor\pgf@y\pgf@ya}%
- \else%
- \pgf@process{\before@ne@anchor}%
- \ifdim\pgf@ya<\pgf@y%
- \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
- {\before@sw@anchor\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
- {\before@ne@anchor}%
- \else%
- \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
- {\before@ne@anchor}%
- {\after@ne@anchor}%
- \fi%
- \fi%
- }%
- \anchor{mid west}{%
- \getchamferedrectanglepoints%
- \midpoint%
- \pgf@ya\pgf@y%
- \pgf@process{\before@sw@anchor}%
- \ifdim\pgf@ya<\pgf@y%
- \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- {\before@sw@anchor}{\after@sw@anchor}%
- \else%
- \pgf@process{\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- \ifdim\pgf@ya<\pgf@y%
- \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- {\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- {\before@sw@anchor}%
- \else%
- \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- {\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- {\after@ne@anchor\pgf@ya\pgf@y\after@sw@anchor\pgf@y\pgf@ya}%
- \fi%
- \fi%
- }%
- \anchor{base}{\basepoint}%
- \anchor{base east}{%
- \getchamferedrectanglepoints%
- \basepoint%
- \pgf@ya\pgf@y%
- \pgf@process{%
- \before@sw@anchor%
- \pgf@ya\pgf@y%
- \before@ne@anchor%
- \pgf@y\pgf@ya
- }%
- \ifdim\pgf@ya<\pgf@y%
- \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
- {\before@sw@anchor\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
- {\after@sw@anchor\pgf@ya\pgf@y\after@ne@anchor\pgf@y\pgf@ya}%
- \else%
- \pgf@process{\before@ne@anchor}%
- \ifdim\pgf@ya<\pgf@y%
- \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
- {\before@sw@anchor\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
- {\before@ne@anchor}%
- \else%
- \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
- {\before@ne@anchor}%
- {\after@ne@anchor}%
- \fi%
- \fi%
- }%
- \anchor{base west}{%
- \getchamferedrectanglepoints%
- \basepoint%
- \pgf@ya\pgf@y%
- \pgf@process{\before@sw@anchor}%
- \ifdim\pgf@ya<\pgf@y%
- \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- {\before@sw@anchor}{\after@sw@anchor}%
- \else%
- \pgf@process{\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- \ifdim\pgf@ya<\pgf@y%
- \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- {\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- {\before@sw@anchor}%
- \else%
- \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- {\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- {\after@ne@anchor\pgf@ya\pgf@y\after@sw@anchor\pgf@y\pgf@ya}%
- \fi%
- \fi%
- }%
- \anchor{before north east}{\getchamferedrectanglepoints\before@ne@anchor}%
- \anchor{north east}{\getchamferedrectanglepoints\ne@anchor}%
- \anchor{after north east}{\getchamferedrectanglepoints\after@ne@anchor}%
- \anchor{north}{%
- \getchamferedrectanglepoints%
- \centerpoint%
- \pgf@xa\pgf@x%
- \after@ne@anchor%
- \pgf@x\pgf@xa}%
- \anchor{before north west}{%
- \getchamferedrectanglepoints%
- \after@sw@anchor%
- \pgf@xa\pgf@x%
- \after@ne@anchor%
- \pgf@x\pgf@xa}%
- \anchor{north west}{\getchamferedrectanglepoints\nw@anchor}%
- \anchor{after north west}{%
- \getchamferedrectanglepoints%
- \before@sw@anchor%
- \pgf@xa\pgf@x%
- \before@ne@anchor%
- \pgf@x\pgf@xa}%
- \anchor{west}{%
- \getchamferedrectanglepoints%
- \centerpoint%
- \pgf@ya\pgf@y%
- \before@sw@anchor%
- \pgf@y\pgf@ya}%
- \anchor{before south west}{\getchamferedrectanglepoints\before@sw@anchor}%
- \anchor{south west}{\getchamferedrectanglepoints\sw@anchor}%
- \anchor{after south west}{\getchamferedrectanglepoints\after@sw@anchor}%
- \anchor{south}{%
- \getchamferedrectanglepoints%
- \centerpoint%
- \pgf@xa\pgf@x%
- \after@sw@anchor%
- \pgf@x\pgf@xa}%
- \anchor{before south east}{%
- \getchamferedrectanglepoints%
- \after@sw@anchor%
- \pgf@ya\pgf@y%
- \after@ne@anchor%
- \pgf@y\pgf@ya}%
- \anchor{south east}{\getchamferedrectanglepoints\se@anchor}%
- \anchor{after south east}{%
- \getchamferedrectanglepoints%
- \before@sw@anchor%
- \pgf@ya\pgf@y%
- \before@ne@anchor%
- \pgf@y\pgf@ya}%
- \anchor{east}{%
- \getchamferedrectanglepoints%
- \centerpoint%
- \pgf@ya\pgf@y%
- \before@ne@anchor%
- \pgf@y\pgf@ya}%
- \backgroundpath{%
- \pgfpathmoveto{\beforenortheast}%
- \pgfpathlineto{\northeast}%
- \pgfpathlineto{\afternortheast}%
- \pgfpathlineto{\aftersouthwest\pgf@xa\pgf@x\afternortheast\pgf@x\pgf@xa}%
- \pgfpathlineto{\northwest}%
- \pgfpathlineto{\beforesouthwest\pgf@xa\pgf@x\beforenortheast\pgf@x\pgf@xa}%
- \pgfpathlineto{\beforesouthwest}%
- \pgfpathlineto{\southwest}%
- \pgfpathlineto{\aftersouthwest}%
- \pgfpathlineto{\aftersouthwest\pgf@ya\pgf@y\afternortheast\pgf@y\pgf@ya}%
- \pgfpathlineto{\southeast}%
- \pgfpathlineto{\beforesouthwest\pgf@ya\pgf@y\beforenortheast\pgf@y\pgf@ya}%
- \pgfpathclose%
- }
- \anchorborder{%
- \pgfextract@process\externalpoint{%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
- \let\externalangle\pgfmathresult%
- \getchamferedrectanglepoints%
- \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% west.
- \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% north.
- \pgfmathanglebetweenpoints{\centerpoint}{\ne@anchor}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% north east.
- \pgfmathanglebetweenpoints{\centerpoint}{\before@ne@anchor}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% before north east.
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\centerpoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}{\before@ne@anchor}%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\before@ne@anchor}{\ne@anchor}%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\centerpoint}{\after@ne@anchor}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% after north east.
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\ne@anchor}{\after@ne@anchor}%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\after@ne@anchor}{\centerpoint\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
- \fi%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\centerpoint}{\nw@anchor}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% north west.
- \pgfmathanglebetweenpoints{\centerpoint}{\after@sw@anchor\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% before north west.
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\centerpoint\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
- {\after@sw@anchor\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\after@sw@anchor\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
- {\nw@anchor}%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\centerpoint}{\before@sw@anchor\pgf@xa\pgf@x\before@ne@anchor\pgf@x\pgf@xa}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% after north west.
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\nw@anchor}{\before@sw@anchor\pgf@xa\pgf@x\before@ne@anchor\pgf@x\pgf@xa}%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\before@sw@anchor\pgf@xa\pgf@x\before@ne@anchor\pgf@x\pgf@xa}%
- {\before@sw@anchor\pgf@xa\pgf@x\centerpoint\pgf@x\pgf@xa}%
- \fi%
- \fi%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% south.
- \pgfmathanglebetweenpoints{\centerpoint}{\sw@anchor}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% south west.
- \pgfmathanglebetweenpoints{\centerpoint}{\before@sw@anchor}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% before south west.
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\before@sw@anchor\pgf@xa\pgf@x\centerpoint\pgf@x\pgf@xa}%
- {\before@sw@anchor}%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\before@sw@anchor}{\sw@anchor}%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\centerpoint}{\after@sw@anchor}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% after south west.
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\sw@anchor}{\after@sw@anchor}%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\after@sw@anchor}{\centerpoint\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}%
- \fi%
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\centerpoint}{\se@anchor}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% south east.
- \pgfmathanglebetweenpoints{\centerpoint}{\after@ne@anchor\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% before south east.
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\after@ne@anchor\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}%
- {\centerpoint\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\after@ne@anchor\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}{\se@anchor}
- \fi%
- \else%
- \pgfmathanglebetweenpoints{\centerpoint}{\before@ne@anchor\pgf@xa\pgf@x\before@sw@anchor\pgf@x\pgf@xa}%
- \ifdim\externalangle pt<\pgfmathresult pt\relax% after south east.
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\se@anchor}{\before@ne@anchor\pgf@xa\pgf@x\before@sw@anchor\pgf@x\pgf@xa}%
- \else%
- \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
- {\before@ne@anchor\pgf@xa\pgf@x\before@sw@anchor\pgf@x\pgf@xa}%
- {\centerpoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
- \fi%
- \fi%
- \fi%
- \fi%
- }%
-}
+ \savedmacro\getchamferedrectanglepoints{%
+ \pgf@lib@sh@misc@cr@getcorners%
+ %
+ % Get the node dimensions.
+ %
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \advance\pgf@xa.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@ya.5\ht\pgfnodeparttextbox%
+ \advance\pgf@ya.5\dp\pgfnodeparttextbox%
+ %
+ % Get chamfer stuff.
+ %
+ \pgfmathsetlength\pgfutil@tempdima{\pgfkeysvalueof{/pgf/chamfered rectangle angle}}%
+ \ifdim\pgfutil@tempdima<89pt\relax%
+ \ifdim\pgfutil@tempdima<1pt\relax%
+ \pgfutil@tempdima1pt\relax%
+ \fi%
+ \else%
+ \pgfutil@tempdima89pt\relax%
+ \fi%
+ \pgfutil@tempdima-\pgfutil@tempdima%
+ \advance\pgfutil@tempdima90pt\relax%
+ \pgfmathtan@{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \let\tanangle\pgfmathresult%
+ \pgfmathcot@{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \let\cotangle\pgfmathresult%
+ \pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/chamfered rectangle xsep}}%
+ \pgf@yc\tanangle\pgf@xb%
+ \ifdim\pgf@yc>\pgf@ya%
+ \pgf@yc\pgf@ya%
+ \pgf@xb\cotangle\pgf@yc%
+ \fi%
+ \pgfmathcot@{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/chamfered rectangle ysep}}%
+ \pgf@xc\cotangle\pgf@yb%
+ \ifdim\pgf@xc>\pgf@xa%
+ \pgf@xc\pgf@xa%
+ \pgf@yb\tanangle\pgf@xc%
+ \fi%
+ %
+ % Check for minimum width and height%
+ %
+ \pgfutil@tempdima\pgf@xa%
+ \advance\pgfutil@tempdima\pgf@xb%
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum width}}%
+ \ifdim\pgfutil@tempdima<.5\pgfutil@tempdimb%
+ \pgf@xa.5\pgfutil@tempdimb%
+ \advance\pgf@xa-\pgf@xb%
+ \fi%
+ \pgfutil@tempdima\pgf@ya%
+ \advance\pgfutil@tempdima\pgf@yb%
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgfutil@tempdima<.5\pgfutil@tempdimb%
+ \pgf@ya.5\pgfutil@tempdimb%
+ \advance\pgf@ya-\pgf@yb%
+ \fi%
+ %
+ % Define the background path points.
+ %
+ \pgfextract@process\centerpoint{%
+ \pgfmathsetlength\pgf@x{+.5\wd\pgfnodeparttextbox}%
+ \pgfmathsetlength\pgf@y{+.5\ht\pgfnodeparttextbox}%
+ \pgfmathaddtolength\pgf@y{+-.5\dp\pgfnodeparttextbox}%
+ }%
+ \pgfextract@process\beforenortheast{%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@x\pgf@xb%
+ \advance\pgf@y\pgf@ya%
+ \advance\pgf@y-\pgf@yc%
+ }%
+ \pgfextract@process\northeast{%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ \ifx\northeastcorner\pgfutil@empty%
+ \advance\pgf@x\pgf@xb%
+ \advance\pgf@y\pgf@yb%
+ \fi%
+ }%
+ \pgfextract@process\afternortheast{%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@x-\pgf@xc%
+ \advance\pgf@y\pgf@ya%
+ \advance\pgf@y\pgf@yb%
+ }%
+ \pgfextract@process\northwest{%
+ \centerpoint%
+ \advance\pgf@x-\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ \ifx\northwestcorner\pgfutil@empty%
+ \advance\pgf@x-\pgf@xb%
+ \advance\pgf@y\pgf@yb%
+ \fi%
+ }%
+ \pgfextract@process\beforesouthwest{%
+ \centerpoint%
+ \advance\pgf@x-\pgf@xa%
+ \advance\pgf@x-\pgf@xb%
+ \advance\pgf@y-\pgf@ya%
+ \advance\pgf@y\pgf@yc%
+ }%
+ \pgfextract@process\southwest{%
+ \centerpoint%
+ \advance\pgf@x-\pgf@xa%
+ \advance\pgf@y-\pgf@ya%
+ \ifx\southwestcorner\pgfutil@empty%
+ \advance\pgf@x-\pgf@xb%
+ \advance\pgf@y-\pgf@yb%
+ \fi%
+ }%
+ \pgfextract@process\aftersouthwest{%
+ \centerpoint%
+ \advance\pgf@x-\pgf@xa%
+ \advance\pgf@x\pgf@xc%
+ \advance\pgf@y-\pgf@ya%
+ \advance\pgf@y-\pgf@yb%
+ }%
+ \pgfextract@process\southeast{%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y-\pgf@ya%
+ \ifx\southeastcorner\pgfutil@empty%
+ \advance\pgf@x\pgf@xb%
+ \advance\pgf@y-\pgf@yb%
+ \fi%
+ }%
+ %
+ % Calculate the `miter' vectors.
+ %
+ \pgfmathanglebetweenlines{\beforenortheast}{\afternortheast}{\beforenortheast}%
+ {\beforesouthwest\pgf@ya\pgf@y\beforenortheast\pgf@y\pgf@ya}%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \ifdim\pgfutil@tempdima>180pt\relax%
+ \advance\pgfutil@tempdima-180pt\relax%
+ \fi%
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \ifdim\pgfutil@tempdima<90pt\relax%
+ \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
+ \pgfutil@tempdima0pt\relax%
+ \else%
+ \pgfutil@tempdima.5\pgfutil@tempdima%
+ \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
+ \pgfutil@tempdima-\pgfutil@tempdima%
+ \advance\pgfutil@tempdima90pt\relax%
+ \fi%
+ \pgfextract@process\before@ne@anchor{%
+ \beforenortheast%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgfutil@tempdima-\pgfutil@tempdima%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfextract@process\before@sw@anchor{%
+ \beforesouthwest%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \pgfqpointpolar{-\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ %
+ \pgfmathanglebetweenlines{\afternortheast}{\aftersouthwest\pgf@xa\pgf@x\afternortheast\pgf@x\pgf@xa}%
+ {\afternortheast}{\beforenortheast}%
+ \pgfutil@tempdima\pgfmathresult pt\relax%
+ \ifdim\pgfutil@tempdima>270pt\relax%
+ \advance\pgfutil@tempdima-270pt\relax%
+ \fi%
+ \pgfmathsetlength\pgfutil@tempdimb{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \ifdim\pgfutil@tempdima<90pt\relax%
+ \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
+ \pgfutil@tempdima90pt\relax%
+ \else%
+ \pgfutil@tempdima.5\pgfutil@tempdima%
+ \pgfmathcosec@{\pgfmath@tonumber{\pgfutil@tempdima}}%
+ \pgfutil@tempdimb\pgfmathresult\pgfutil@tempdimb%
+ \fi%
+ %
+ \pgfextract@process\after@ne@anchor{%
+ \afternortheast%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \pgfqpointpolar{\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgfutil@tempdima-\pgfutil@tempdima%
+ \advance\pgfutil@tempdima180pt\relax%
+ \pgfextract@process\after@sw@anchor{%
+ \aftersouthwest
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \pgfqpointpolar{-\pgfmath@tonumber{\pgfutil@tempdima}}{\the\pgfutil@tempdimb}%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \addtosavedmacro\before@ne@anchor%
+ \addtosavedmacro\after@ne@anchor%
+ \addtosavedmacro\before@sw@anchor%
+ \addtosavedmacro\after@sw@anchor%
+ \pgfextract@process\ne@anchor{%
+ \ifx\northeastcorner\pgfutil@empty%
+ \northeast%
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \else%
+ \pgfpointlineattime{0.5}{\before@ne@anchor}{\after@ne@anchor}%
+ \fi%
+ }%
+ \pgfextract@process\nw@anchor{%
+ \ifx\northwestcorner\pgfutil@empty%
+ \northwest%
+ \pgfmathaddtolength\pgf@x{-\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \else%
+ \pgfpointlineattime{0.5}{%
+ \before@ne@anchor%
+ \pgf@ya\pgf@y
+ \before@sw@anchor%
+ \pgf@y\pgf@ya%
+ }{%
+ \after@ne@anchor%
+ \pgf@ya\pgf@y
+ \after@sw@anchor%
+ \pgf@y\pgf@ya%
+ }%
+ \fi%
+ }%
+ \pgfextract@process\sw@anchor{%
+ \ifx\southwestcorner\pgfutil@empty%
+ \southwest%
+ \pgfmathaddtolength\pgf@x{-\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathaddtolength\pgf@y{-\pgfkeysvalueof{/pgf/outer ysep}}%
+ \else%
+ \pgfpointlineattime{0.5}{\before@sw@anchor}{\after@sw@anchor}%
+ \fi%
+ }%
+ \pgfextract@process\se@anchor{%
+ \ifx\southeastcorner\pgfutil@empty%
+ \southeast%
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathaddtolength\pgf@y{-\pgfkeysvalueof{/pgf/outer ysep}}%
+ \else%
+ \pgfpointlineattime{0.5}{%
+ \before@ne@anchor%
+ \pgf@xa\pgf@x
+ \before@sw@anchor%
+ \pgf@x\pgf@xa%
+ }{%
+ \after@ne@anchor%
+ \pgf@xa\pgf@x
+ \after@sw@anchor%
+ \pgf@x\pgf@xa%
+ }%
+ \fi%
+ }%
+ \addtosavedmacro\ne@anchor%
+ \addtosavedmacro\nw@anchor%
+ \addtosavedmacro\sw@anchor%
+ \addtosavedmacro\se@anchor%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y.5\ht\pgfnodeparttextbox%
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+.5ex}%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \getchamferedrectanglepoints%
+ \midpoint%
+ \pgf@ya\pgf@y%
+ \pgf@process{%
+ \before@sw@anchor%
+ \pgf@ya\pgf@y%
+ \before@ne@anchor%
+ \pgf@y\pgf@ya%
+ }%
+ \ifdim\pgf@ya<\pgf@y%
+ \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
+ {\before@sw@anchor\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
+ {\after@sw@anchor\pgf@ya\pgf@y\after@ne@anchor\pgf@y\pgf@ya}%
+ \else%
+ \pgf@process{\before@ne@anchor}%
+ \ifdim\pgf@ya<\pgf@y%
+ \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
+ {\before@sw@anchor\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
+ {\before@ne@anchor}%
+ \else%
+ \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
+ {\before@ne@anchor}%
+ {\after@ne@anchor}%
+ \fi%
+ \fi%
+ }%
+ \anchor{mid west}{%
+ \getchamferedrectanglepoints%
+ \midpoint%
+ \pgf@ya\pgf@y%
+ \pgf@process{\before@sw@anchor}%
+ \ifdim\pgf@ya<\pgf@y%
+ \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ {\before@sw@anchor}{\after@sw@anchor}%
+ \else%
+ \pgf@process{\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ \ifdim\pgf@ya<\pgf@y%
+ \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ {\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ {\before@sw@anchor}%
+ \else%
+ \pgfpointintersectionoflines{\midpoint}{\midpoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ {\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ {\after@ne@anchor\pgf@ya\pgf@y\after@sw@anchor\pgf@y\pgf@ya}%
+ \fi%
+ \fi%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \getchamferedrectanglepoints%
+ \basepoint%
+ \pgf@ya\pgf@y%
+ \pgf@process{%
+ \before@sw@anchor%
+ \pgf@ya\pgf@y%
+ \before@ne@anchor%
+ \pgf@y\pgf@ya%
+ }%
+ \ifdim\pgf@ya<\pgf@y%
+ \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
+ {\before@sw@anchor\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
+ {\after@sw@anchor\pgf@ya\pgf@y\after@ne@anchor\pgf@y\pgf@ya}%
+ \else%
+ \pgf@process{\before@ne@anchor}%
+ \ifdim\pgf@ya<\pgf@y%
+ \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
+ {\before@sw@anchor\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
+ {\before@ne@anchor}%
+ \else%
+ \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
+ {\before@ne@anchor}%
+ {\after@ne@anchor}%
+ \fi%
+ \fi%
+ }%
+ \anchor{base west}{%
+ \getchamferedrectanglepoints%
+ \basepoint%
+ \pgf@ya\pgf@y%
+ \pgf@process{\before@sw@anchor}%
+ \ifdim\pgf@ya<\pgf@y%
+ \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ {\before@sw@anchor}{\after@sw@anchor}%
+ \else%
+ \pgf@process{\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ \ifdim\pgf@ya<\pgf@y%
+ \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ {\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ {\before@sw@anchor}%
+ \else%
+ \pgfpointintersectionoflines{\basepoint}{\basepoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ {\before@ne@anchor\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ {\after@ne@anchor\pgf@ya\pgf@y\after@sw@anchor\pgf@y\pgf@ya}%
+ \fi%
+ \fi%
+ }%
+ \anchor{before north east}{\getchamferedrectanglepoints\before@ne@anchor}%
+ \anchor{north east}{\getchamferedrectanglepoints\ne@anchor}%
+ \anchor{after north east}{\getchamferedrectanglepoints\after@ne@anchor}%
+ \anchor{north}{%
+ \getchamferedrectanglepoints%
+ \centerpoint%
+ \pgf@xa\pgf@x%
+ \after@ne@anchor%
+ \pgf@x\pgf@xa}%
+ \anchor{before north west}{%
+ \getchamferedrectanglepoints%
+ \after@sw@anchor%
+ \pgf@xa\pgf@x%
+ \after@ne@anchor%
+ \pgf@x\pgf@xa}%
+ \anchor{north west}{\getchamferedrectanglepoints\nw@anchor}%
+ \anchor{after north west}{%
+ \getchamferedrectanglepoints%
+ \before@sw@anchor%
+ \pgf@xa\pgf@x%
+ \before@ne@anchor%
+ \pgf@x\pgf@xa}%
+ \anchor{west}{%
+ \getchamferedrectanglepoints%
+ \centerpoint%
+ \pgf@ya\pgf@y%
+ \before@sw@anchor%
+ \pgf@y\pgf@ya}%
+ \anchor{before south west}{\getchamferedrectanglepoints\before@sw@anchor}%
+ \anchor{south west}{\getchamferedrectanglepoints\sw@anchor}%
+ \anchor{after south west}{\getchamferedrectanglepoints\after@sw@anchor}%
+ \anchor{south}{%
+ \getchamferedrectanglepoints%
+ \centerpoint%
+ \pgf@xa\pgf@x%
+ \after@sw@anchor%
+ \pgf@x\pgf@xa}%
+ \anchor{before south east}{%
+ \getchamferedrectanglepoints%
+ \after@sw@anchor%
+ \pgf@ya\pgf@y%
+ \after@ne@anchor%
+ \pgf@y\pgf@ya}%
+ \anchor{south east}{\getchamferedrectanglepoints\se@anchor}%
+ \anchor{after south east}{%
+ \getchamferedrectanglepoints%
+ \before@sw@anchor%
+ \pgf@ya\pgf@y%
+ \before@ne@anchor%
+ \pgf@y\pgf@ya}%
+ \anchor{east}{%
+ \getchamferedrectanglepoints%
+ \centerpoint%
+ \pgf@ya\pgf@y%
+ \before@ne@anchor%
+ \pgf@y\pgf@ya}%
+ \backgroundpath{%
+ \pgfpathmoveto{\beforenortheast}%
+ \pgfpathlineto{\northeast}%
+ \pgfpathlineto{\afternortheast}%
+ \pgfpathlineto{\aftersouthwest\pgf@xa\pgf@x\afternortheast\pgf@x\pgf@xa}%
+ \pgfpathlineto{\northwest}%
+ \pgfpathlineto{\beforesouthwest\pgf@xa\pgf@x\beforenortheast\pgf@x\pgf@xa}%
+ \pgfpathlineto{\beforesouthwest}%
+ \pgfpathlineto{\southwest}%
+ \pgfpathlineto{\aftersouthwest}%
+ \pgfpathlineto{\aftersouthwest\pgf@ya\pgf@y\afternortheast\pgf@y\pgf@ya}%
+ \pgfpathlineto{\southeast}%
+ \pgfpathlineto{\beforesouthwest\pgf@ya\pgf@y\beforenortheast\pgf@y\pgf@ya}%
+ \pgfpathclose%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
+ \let\externalangle\pgfmathresult%
+ \getchamferedrectanglepoints%
+ \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\pgf@ya\pgf@y\before@sw@anchor\pgf@y\pgf@ya}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% west.
+ \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% north.
+ \pgfmathanglebetweenpoints{\centerpoint}{\ne@anchor}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% north east.
+ \pgfmathanglebetweenpoints{\centerpoint}{\before@ne@anchor}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% before north east.
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\centerpoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}{\before@ne@anchor}%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\before@ne@anchor}{\ne@anchor}%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\after@ne@anchor}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% after north east.
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\ne@anchor}{\after@ne@anchor}%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\after@ne@anchor}{\centerpoint\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
+ \fi%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\nw@anchor}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% north west.
+ \pgfmathanglebetweenpoints{\centerpoint}{\after@sw@anchor\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% before north west.
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\centerpoint\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
+ {\after@sw@anchor\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\after@sw@anchor\pgf@xa\pgf@x\after@ne@anchor\pgf@x\pgf@xa}%
+ {\nw@anchor}%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\before@sw@anchor\pgf@xa\pgf@x\before@ne@anchor\pgf@x\pgf@xa}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% after north west.
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\nw@anchor}{\before@sw@anchor\pgf@xa\pgf@x\before@ne@anchor\pgf@x\pgf@xa}%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\before@sw@anchor\pgf@xa\pgf@x\before@ne@anchor\pgf@x\pgf@xa}%
+ {\before@sw@anchor\pgf@xa\pgf@x\centerpoint\pgf@x\pgf@xa}%
+ \fi%
+ \fi%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\centerpoint\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% south.
+ \pgfmathanglebetweenpoints{\centerpoint}{\sw@anchor}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% south west.
+ \pgfmathanglebetweenpoints{\centerpoint}{\before@sw@anchor}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% before south west.
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\before@sw@anchor\pgf@xa\pgf@x\centerpoint\pgf@x\pgf@xa}%
+ {\before@sw@anchor}%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\before@sw@anchor}{\sw@anchor}%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\after@sw@anchor}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% after south west.
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\sw@anchor}{\after@sw@anchor}%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\after@sw@anchor}{\centerpoint\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}%
+ \fi%
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\se@anchor}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% south east.
+ \pgfmathanglebetweenpoints{\centerpoint}{\after@ne@anchor\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% before south east.
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\after@ne@anchor\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}%
+ {\centerpoint\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\after@ne@anchor\pgf@xa\pgf@x\after@sw@anchor\pgf@x\pgf@xa}{\se@anchor}
+ \fi%
+ \else%
+ \pgfmathanglebetweenpoints{\centerpoint}{\before@ne@anchor\pgf@xa\pgf@x\before@sw@anchor\pgf@x\pgf@xa}%
+ \ifdim\externalangle pt<\pgfmathresult pt\relax% after south east.
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\se@anchor}{\before@ne@anchor\pgf@xa\pgf@x\before@sw@anchor\pgf@x\pgf@xa}%
+ \else%
+ \pgfpointintersectionoflines{\centerpoint}{\externalpoint}%
+ {\before@ne@anchor\pgf@xa\pgf@x\before@sw@anchor\pgf@x\pgf@xa}%
+ {\centerpoint\pgf@ya\pgf@y\before@ne@anchor\pgf@y\pgf@ya}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ }%
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.multipart.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.multipart.code.tex
index 15d7baf090c..2866923c529 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.multipart.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.multipart.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/shapes/pgflibraryshapes.multipart.code.tex,v 1.2 2010/01/07 01:12:23 vibrovski Exp $
+\ProvidesFileRCS{pgflibraryshapes.multipart.code.tex}
\newbox\pgfnodepartlowerbox
@@ -21,11 +21,11 @@
% Parts: text, lower
\pgfdeclareshape{circle split}
-{
+{%
%
% Node parts
%
- \nodeparts{text,lower}
+ \nodeparts{text,lower}%
%
% Anchors
@@ -46,44 +46,44 @@
\advance\pgf@y by-.5\pgflinewidth%
\advance\pgf@y by-\dp\pgfnodeparttextbox%
\advance\pgf@y by-.5\pgflinewidth%
- }
-
+ }%
+
\saveddimen\radius{%
- %
- % Caculate ``height radius''
+ %
+ % Calculate ``height radius''
%
%\pgf@ya=.5\ht\pgfnodeparttextbox%
% \advance\pgf@ya by.5\dp\pgfnodeparttextbox%
% \advance\pgf@ya by.5\ht\pgfnodepartlowerbox%
% \advance\pgf@ya by.5\dp\pgfnodepartlowerbox%
% \advance\pgf@ya by.5\pgflinewidth%
- %
- % MW: Suggested correction for above calculation: Use the tallest box * 2.
- %
- \pgf@ya=.5\ht\pgfnodeparttextbox%
- \advance\pgf@ya by.5\dp\pgfnodeparttextbox%
- \pgf@yb=.5\ht\pgfnodepartlowerbox%
- \advance\pgf@yb by.5\dp\pgfnodepartlowerbox%
- \ifdim\pgf@ya>\pgf@yb\relax%
- \pgf@ya2.0\pgf@ya\relax%
- \else%
- \pgf@ya2.0\pgf@yb\relax%
- \fi%
- \advance\pgf@ya by.5\pgflinewidth%
+ %
+ % MW: Suggested correction for above calculation: Use the tallest box * 2.
+ %
+ \pgf@ya=.5\ht\pgfnodeparttextbox%
+ \advance\pgf@ya by.5\dp\pgfnodeparttextbox%
+ \pgf@yb=.5\ht\pgfnodepartlowerbox%
+ \advance\pgf@yb by.5\dp\pgfnodepartlowerbox%
+ \ifdim\pgf@ya>\pgf@yb\relax%
+ \pgf@ya2.0\pgf@ya\relax%
+ \else%
+ \pgf@ya2.0\pgf@yb\relax%
+ \fi%
+ \advance\pgf@ya by.5\pgflinewidth%
\pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/inner ysep}}%
\advance\pgf@ya by2\pgf@yb%
- %
- % Caculate ``width radius''
- %
+ %
+ % Calculate ``width radius''
+ %
\pgf@xa=.5\wd\pgfnodeparttextbox%
\ifdim\pgf@xa<.5\wd\pgfnodepartlowerbox%
\pgf@xa=.5\wd\pgfnodepartlowerbox%
\fi%
\pgfmathsetlength\pgf@xb{\pgfkeysvalueof{/pgf/inner xsep}}%
\advance\pgf@xa by\pgf@xb%
- %
+ %
% Calculate length of radius vector:
- %
+ %
\pgf@process{\pgfpointnormalised{\pgfqpoint{\pgf@xa}{\pgf@ya}}}%
\ifdim\pgf@x>\pgf@y%
\c@pgf@counta=\pgf@x%
@@ -105,73 +105,73 @@
\fi%
\fi%
\pgf@x=\pgf@xa%
- %
+ %
% If necessary, adjust radius so that the size requirements are
- % met:
- %
- \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}%
- \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}%
+ % met:
+ %
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/minimum height}}%
\ifdim\pgf@x<.5\pgf@xb%
\pgf@x=.5\pgf@xb%
\fi%
\ifdim\pgf@x<.5\pgf@yb%
\pgf@x=.5\pgf@yb%
\fi%
- %
- % Now, add larger of outer sepearations.
- %
- \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
+ %
+ % Now, add larger of outer separations.
+ %
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\ifdim\pgf@xb<\pgf@yb%
\advance\pgf@x by\pgf@yb%
\else%
\advance\pgf@x by\pgf@xb%
\fi%
- }
+ }%
%
% Anchors
- %
- \inheritanchorborder[from=circle]
- \inheritanchor[from=circle]{north}
- \inheritanchor[from=circle]{north west}
- \inheritanchor[from=circle]{north east}
- \inheritanchor[from=circle]{center}
- \inheritanchor[from=circle]{west}
- \inheritanchor[from=circle]{east}
- \inheritanchor[from=circle]{mid}
- \inheritanchor[from=circle]{mid west}
- \inheritanchor[from=circle]{mid east}
- \inheritanchor[from=circle]{base}
- \inheritanchor[from=circle]{base west}
- \inheritanchor[from=circle]{base east}
- \inheritanchor[from=circle]{south}
- \inheritanchor[from=circle]{south west}
- \inheritanchor[from=circle]{south east}
- \anchor{lower}{\loweranchor}
+ %
+ \inheritanchorborder[from=circle]%
+ \inheritanchor[from=circle]{north}%
+ \inheritanchor[from=circle]{north west}%
+ \inheritanchor[from=circle]{north east}%
+ \inheritanchor[from=circle]{center}%
+ \inheritanchor[from=circle]{west}%
+ \inheritanchor[from=circle]{east}%
+ \inheritanchor[from=circle]{mid}%
+ \inheritanchor[from=circle]{mid west}%
+ \inheritanchor[from=circle]{mid east}%
+ \inheritanchor[from=circle]{base}%
+ \inheritanchor[from=circle]{base west}%
+ \inheritanchor[from=circle]{base east}%
+ \inheritanchor[from=circle]{south}%
+ \inheritanchor[from=circle]{south west}%
+ \inheritanchor[from=circle]{south east}%
+ \anchor{lower}{\loweranchor}%
%
% Background path
%
- \inheritbackgroundpath[from=circle]
+ \inheritbackgroundpath[from=circle]%
\beforebackgroundpath{
\pgfutil@tempdima=\radius%
- \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\ifdim\pgf@xb<\pgf@yb%
\advance\pgfutil@tempdima by-\pgf@yb%
\else%
\advance\pgfutil@tempdima by-\pgf@xb%
\fi%
- \advance\pgfutil@tempdima by-.5\pgflinewidth%
+ \advance\pgfutil@tempdima by-.5\pgflinewidth%
\pgfsetshortenstart{0pt}%
\pgfsetshortenend{0pt}%
- \pgfsetarrows{-}%
+ \pgfsetarrows{-}%
\pgfpathmoveto{\pgfpointadd{\centerpoint}{\pgfqpoint{-1\pgfutil@tempdima}{0pt}}}%
\pgfpathlineto{\pgfpointadd{\centerpoint}{\pgfqpoint{\pgfutil@tempdima}{0pt}}}%
\pgfusepath{stroke}%
- }
-}
+ }%
+}%
%
@@ -181,7 +181,7 @@
\pgfdeclareshape{circle solidus}{%
% Node parts
- \nodeparts{text,lower}%
+ \nodeparts{text,lower}%
% Anchors
% solidus slants at 45 degrees
% text placement minimizes the required radius,
@@ -297,23 +297,23 @@
\pgfpathlineto{\pgfpointadd{\centerpoint}{\pgfqpoint{0.437\pgfutil@tempdima}{0.437\pgfutil@tempdima}}}%
\pgfusepath{stroke}%
}%
-}
+}%
\def\pgf@lib@sh@newbox{\csname newbox\endcsname}% Get round outer.
\def\pgf@lib@sh@toalpha#1{%
- \ifcase#1\relax%
- \or one\or two\or three\or four\or five\or six\or seven\or eight\or nine\or ten%
- \or eleven\or twelve\or thirteen\or fourteen\or fifteen%
- \or sixteen\or seventeen\or eighteen\or nineteen\or twenty%
- \else%
- twenty%
- \fi%
-}
+ \ifcase#1\relax%
+ \or one\or two\or three\or four\or five\or six\or seven\or eight\or nine\or ten%
+ \or eleven\or twelve\or thirteen\or fourteen\or fifteen%
+ \or sixteen\or seventeen\or eighteen\or nineteen\or twenty%
+ \else%
+ twenty%
+ \fi%
+}%
-\def\pgf@lib@sh@getalpha#1#2{\expandafter\edef\expandafter#1\expandafter{\pgf@lib@sh@toalpha{#2}}}
+\def\pgf@lib@sh@getalpha#1#2{\expandafter\edef\expandafter#1\expandafter{\pgf@lib@sh@toalpha{#2}}}%
\newbox\pgfnodeparttwobox
\newbox\pgfnodepartthreebox
@@ -325,25 +325,25 @@
\let\pgfnodepartfourthbox=\pgfnodepartfourbox
\def\pgf@lib@sh@allocateboxes#1{%
- \c@pgf@counta=#1\relax%
- \pgfmathloop%
- \ifnum\c@pgf@counta>4\relax%
- \pgfutil@ifundefined{pgfnodepart\pgf@lib@sh@toalpha{\c@pgf@counta}box}%
- {%
- \expandafter\pgf@lib@sh@newbox\csname pgfnodepart\pgf@lib@sh@toalpha{\c@pgf@counta}box\endcsname%
- }%
- {}%
- \advance\c@pgf@counta by-1\relax%
- \repeatpgfmathloop%
-}
+ \c@pgf@counta=#1\relax%
+ \pgfmathloop%
+ \ifnum\c@pgf@counta>4\relax%
+ \pgfutil@ifundefined{pgfnodepart\pgf@lib@sh@toalpha{\c@pgf@counta}box}%
+ {%
+ \expandafter\pgf@lib@sh@newbox\csname pgfnodepart\pgf@lib@sh@toalpha{\c@pgf@counta}box\endcsname%
+ }%
+ {}%
+ \advance\c@pgf@counta by-1\relax%
+ \repeatpgfmathloop%
+}%
-\def\pgf@lib@sh@rs@lefttext{left}
-\def\pgf@lib@sh@rs@righttext{right}
-\def\pgf@lib@sh@rs@centertext{center}
-\def\pgf@lib@sh@rs@bottomtext{bottom}
-\def\pgf@lib@sh@rs@toptext{top}
-\def\pgf@lib@sh@rs@basetext{base}
-\def\pgf@lib@sh@rs@nonetext{none}
+\def\pgf@lib@sh@rs@lefttext{left}%
+\def\pgf@lib@sh@rs@righttext{right}%
+\def\pgf@lib@sh@rs@centertext{center}%
+\def\pgf@lib@sh@rs@bottomtext{bottom}%
+\def\pgf@lib@sh@rs@toptext{top}%
+\def\pgf@lib@sh@rs@basetext{base}%
+\def\pgf@lib@sh@rs@nonetext{none}%
\newif\ifpgfrectanglesplithorizontal
@@ -353,900 +353,902 @@
\let\pgf@lib@sh@rs@every@emptypart=\pgfutil@empty
\let\pgf@lib@sh@rs@every@part=\pgfutil@empty
-\def\pgf@lib@sh@rs@list@fill{none}
+\def\pgf@lib@sh@rs@list@fill{none}%
\pgfkeys{/pgf/.cd,
- rectangle split parts/.initial=4,
- rectangle split part align/.initial=center,
- rectangle split horizontal/.is if=pgfrectanglesplithorizontal,
- rectangle split ignore empty parts/.is if=pgfrectanglesplitignoreemptyparts,
- rectangle split empty part width/.code={%
- \pgfmathsetlength\pgf@x{#1}
- \edef\pgf@lib@sh@rs@temp{\noexpand\vrule width\the\pgf@x height0ptdepth0pt\relax}%
- \def\pgf@lib@sh@rs@@temp{\def\pgf@lib@sh@rs@every@emptypart}%
- \expandafter\expandafter\expandafter\pgf@lib@sh@rs@@temp\expandafter\expandafter\expandafter{%
- \expandafter\pgf@lib@sh@rs@every@emptypart\pgf@lib@sh@rs@temp}%
- },%
- rectangle split empty part width=1ex,
- rectangle split empty part height/.code={%
- \pgfmathsetlength\pgf@x{#1}
- \edef\pgf@lib@sh@rs@temp{\noexpand\vrule width0ptheight\the\pgf@x depth0pt\relax}%
- \def\pgf@lib@sh@rs@@temp{\def\pgf@lib@sh@rs@every@emptypart}%
- \expandafter\expandafter\expandafter\pgf@lib@sh@rs@@temp\expandafter\expandafter\expandafter{%
- \expandafter\pgf@lib@sh@rs@every@emptypart\pgf@lib@sh@rs@temp}%
- },%
- rectangle split empty part height=1ex,
- rectangle split empty part depth/.code={%
- \pgfmathsetlength\pgf@x{#1}
- \edef\pgf@lib@sh@rs@temp{\noexpand\vrule width0ptheight0ptdepth\the\pgf@x\relax}%
- \def\pgf@lib@sh@rs@@temp{\def\pgf@lib@sh@rs@every@emptypart}%
- \expandafter\expandafter\expandafter\pgf@lib@sh@rs@@temp\expandafter\expandafter\expandafter{%
- \expandafter\pgf@lib@sh@rs@every@emptypart\pgf@lib@sh@rs@temp}%
- },%
- rectangle split empty part depth=0ex,
- rectangle split every empty part/.store in=\pgf@lib@sh@rs@every@emptypart,
- rectangle split part fill/.code=\def\pgf@lib@sh@rs@list@fill{#1}\pgfrectanglesplitusecustomfilltrue,
- rectangle split uses custom fill/.is if=pgfrectanglesplitusecustomfill,
- rectangle split draw splits/.is if=pgfrectanglesplitdrawsplits,
- rectangle split allocate boxes/.code=\pgf@lib@sh@allocateboxes{#1}
-}
+ rectangle split parts/.initial=4,
+ rectangle split part align/.initial=center,
+ rectangle split horizontal/.is if=pgfrectanglesplithorizontal,
+ rectangle split ignore empty parts/.is if=pgfrectanglesplitignoreemptyparts,
+ rectangle split empty part width/.code={%
+ \pgfmathsetlength\pgf@x{#1}
+ \edef\pgf@lib@sh@rs@temp{\noexpand\vrule width\the\pgf@x height0ptdepth0pt\relax}%
+ \def\pgf@lib@sh@rs@@temp{\def\pgf@lib@sh@rs@every@emptypart}%
+ \expandafter\expandafter\expandafter\pgf@lib@sh@rs@@temp\expandafter\expandafter\expandafter{%
+ \expandafter\pgf@lib@sh@rs@every@emptypart\pgf@lib@sh@rs@temp}%
+ },%
+ rectangle split empty part width=1ex,
+ rectangle split empty part height/.code={%
+ \pgfmathsetlength\pgf@x{#1}
+ \edef\pgf@lib@sh@rs@temp{\noexpand\vrule width0ptheight\the\pgf@x depth0pt\relax}%
+ \def\pgf@lib@sh@rs@@temp{\def\pgf@lib@sh@rs@every@emptypart}%
+ \expandafter\expandafter\expandafter\pgf@lib@sh@rs@@temp\expandafter\expandafter\expandafter{%
+ \expandafter\pgf@lib@sh@rs@every@emptypart\pgf@lib@sh@rs@temp}%
+ },%
+ rectangle split empty part height=1ex,
+ rectangle split empty part depth/.code={%
+ \pgfmathsetlength\pgf@x{#1}
+ \edef\pgf@lib@sh@rs@temp{\noexpand\vrule width0ptheight0ptdepth\the\pgf@x\relax}%
+ \def\pgf@lib@sh@rs@@temp{\def\pgf@lib@sh@rs@every@emptypart}%
+ \expandafter\expandafter\expandafter\pgf@lib@sh@rs@@temp\expandafter\expandafter\expandafter{%
+ \expandafter\pgf@lib@sh@rs@every@emptypart\pgf@lib@sh@rs@temp}%
+ },%
+ rectangle split empty part depth=0ex,
+ rectangle split every empty part/.store in=\pgf@lib@sh@rs@every@emptypart,
+ rectangle split part fill/.code=\def\pgf@lib@sh@rs@list@fill{#1}\pgfrectanglesplitusecustomfilltrue,
+ rectangle split uses custom fill/.is if=pgfrectanglesplitusecustomfill,
+ rectangle split draw splits/.is if=pgfrectanglesplitdrawsplits,
+ rectangle split allocate boxes/.code=\pgf@lib@sh@allocateboxes{#1},
+}%
\def\pgf@lib@sh@rs@process@list#1#2{%
- \c@pgf@counta=1\relax%
- \c@pgf@countb=#2\relax%
- \edef\pgf@lib@sh@rs@temp{#1}%
- \expandafter\pgf@lib@sh@rs@@process@list\pgf@lib@sh@rs@temp,\pgf@stop,}
+ \c@pgf@counta=1\relax%
+ \c@pgf@countb=#2\relax%
+ \edef\pgf@lib@sh@rs@temp{#1}%
+ \expandafter\pgf@lib@sh@rs@@process@list\pgf@lib@sh@rs@temp,\pgf@stop,
+}%
\def\pgf@lib@sh@rs@@process@list{%
- \pgfutil@ifnextchar x{\pgf@lib@sh@rs@@@process@list}%
- {\pgf@lib@sh@rs@@@process@list}}
-
+ \pgfutil@ifnextchar x{\pgf@lib@sh@rs@@@process@list}%
+ {\pgf@lib@sh@rs@@@process@list}
+}%
+
\def\pgf@lib@sh@rs@@@process@list#1,{%
- \ifx#1\pgf@stop%
- \let\pgf@next\pgf@lib@sh@rs@@@@process@list%
- \else%
- \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\c@pgf@counta}%
- \def\pgf@lib@sh@rs@lastalign{#1}%
- \pgfutil@namedef{pgf@lib@sh@rs@\pgf@lib@sh@toalpha{\c@pgf@counta}@item}{#1}%
- \let\pgf@next\pgf@lib@sh@rs@@process@list%
- \advance\c@pgf@counta by1\relax%
- \fi%
- \pgf@next}
+ \ifx#1\pgf@stop%
+ \let\pgf@next\pgf@lib@sh@rs@@@@process@list%
+ \else%
+ \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\c@pgf@counta}%
+ \def\pgf@lib@sh@rs@lastalign{#1}%
+ \pgfutil@namedef{pgf@lib@sh@rs@\pgf@lib@sh@toalpha{\c@pgf@counta}@item}{#1}%
+ \let\pgf@next\pgf@lib@sh@rs@@process@list%
+ \advance\c@pgf@counta by1\relax%
+ \fi%
+ \pgf@next}%
\def\pgf@lib@sh@rs@@@@process@list{%
- \pgfmathloop%
- \ifnum\c@pgf@counta>\c@pgf@countb%
- \else%
- \expandafter\edef\csname pgf@lib@sh@rs@\pgf@lib@sh@toalpha{\c@pgf@counta}@item\endcsname%
- {\pgf@lib@sh@rs@lastalign}%
- \advance\c@pgf@counta by1\relax%
- \repeatpgfmathloop%
-}
+ \pgfmathloop%
+ \ifnum\c@pgf@counta>\c@pgf@countb%
+ \else%
+ \expandafter\edef\csname pgf@lib@sh@rs@\pgf@lib@sh@toalpha{\c@pgf@counta}@item\endcsname%
+ {\pgf@lib@sh@rs@lastalign}%
+ \advance\c@pgf@counta by1\relax%
+ \repeatpgfmathloop%
+}%
-\pgf@lib@sh@allocateboxes{20}
+\pgf@lib@sh@allocateboxes{20}%
\pgfdeclareshape{rectangle split}{%
- \savedmacro\rectanglesplitparameters{%
- \pgfmathsetcount\c@pgf@counta{\pgfkeysvalueof{/pgf/rectangle split parts}}%
- \edef\parts{\the\c@pgf@counta}%
- \addtosavedmacro\parts%
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \edef\innerxsep{\the\pgf@x}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \edef\innerysep{\the\pgf@y}%
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \edef\outerxsep{\the\pgf@x}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- \edef\outerysep{\the\pgf@y}%
- \addtosavedmacro\outerxsep%
- \addtosavedmacro\outerysep%
- %
- \pgf@x=0pt\relax% Widest box.
- \pgf@y=0pt\relax% Tallest box.
- %
- \pgfutil@tempdima=0pt\relax% Maximum box height.
- \pgfutil@tempdimb=0pt\relax% Maximum box depth.
- %
- % Get the dimensions of the boxes...
- %
- \pgfmathloop%
- \ifnum\pgfmathcounter>\parts%
- \else%
- \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
- %
- \expandafter\let\expandafter\pgf@lib@sh@box\expandafter=%
- \csname pgfnodepart\pgf@lib@sh@rs@number box\endcsname%
- \pgf@xa=\wd\pgf@lib@sh@box%
- \pgf@ya=\ht\pgf@lib@sh@box%
- \pgf@yb=\dp\pgf@lib@sh@box%
- %
- % Test to see if the box is empty...
- %
- \expandafter\def\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname{\relax}%
- \ifdim\pgf@xa=0pt\relax%
- \ifdim\pgf@ya=0pt\relax%
- \ifdim\pgf@yb=0pt\relax%
- %
- % ...It is. So...
- %
- \ifpgfrectanglesplitignoreemptyparts%
- %
- % ...flag this if we are ignoring parts...
- %
- \expandafter\let\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname=\pgfutil@empty%
- \else%
- %
- % ...otherwise insert the code for every empty part.
- %
- \setbox\pgf@lib@sh@box=\hbox{{\pgf@lib@sh@rs@every@emptypart}}%
- \pgf@xa=\wd\pgf@lib@sh@box%
- \pgf@ya=\ht\pgf@lib@sh@box%
- \pgf@yb=\dp\pgf@lib@sh@box%
- \fi%
- \fi%
- \fi%
- \fi%
- \expandafter\edef\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@number\endcsname{\the\pgf@xa}%
- \expandafter\edef\csname pgf@lib@sh@rs@height@\pgf@lib@sh@rs@number\endcsname{\the\pgf@ya}%
- \expandafter\edef\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@number\endcsname{\the\pgf@yb}%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname%
- %
- % ...saving the widest box...
- %
- \ifdim\pgf@xa>\pgf@x%
- \pgf@x=\pgf@xa%
- \fi%
- %
- % ...the maximum height and depth...
- %
- \ifdim\pgf@ya>\pgfutil@tempdima%
- \pgfutil@tempdima=\pgf@ya%
- \fi%
- \ifdim\pgf@yb>\pgfutil@tempdimb%
- \pgfutil@tempdimb=\pgf@yb%
- \fi%
- %
- % ...and the tallest box.
- %
- \pgf@yc=\pgfutil@tempdima%
- \advance\pgf@yc by\pgfutil@tempdimb%
- \ifdim\pgf@yc>\pgf@y%
- \pgf@y=\pgf@yc%
- \fi%
- \repeatpgfmathloop%
- %
- \edef\pgf@lib@sh@rs@max@width{\the\pgf@x}%
- \edef\pgf@lib@sh@rs@max@totalheight{\the\pgf@y}%
- %
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/minimum width}}%
- \advance\pgf@x by-\innerxsep\relax%
- \advance\pgf@x by-\innerxsep\relax%
- \pgf@xa=\pgf@x%
- \advance\pgf@xa by-\pgf@lib@sh@rs@max@width\relax%
- \ifdim\pgf@xa>0pt\relax%
- \edef\pgf@lib@sh@rs@max@width{\the\pgf@x}%
- \fi%
- %
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/minimum height}}%
- \advance\pgf@y by-\innerysep\relax%
- \advance\pgf@y by-\innerysep\relax%
- \pgf@ya=\pgf@y%
- \advance\pgf@ya by-\pgf@lib@sh@rs@max@totalheight\relax%
- \ifdim\pgf@ya>0pt\relax%
- \edef\pgf@lib@sh@rs@max@totalheight{\the\pgf@y}%
- \fi%
- %
- % Get the alignment of each node part box.
- %
- \pgf@lib@sh@rs@process@list{\pgfkeysvalueof{/pgf/rectangle split part align}}{\parts}%
- %
- % Are we splitting horizontally or vertically?
- %
- \ifpgfrectanglesplithorizontal%
- %
- % Calculate the origins of each node part box.
- %
- \pgf@x=0pt\relax%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\parts%
- \else%
- \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
- %
- \expandafter\let\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname=\pgfutil@empty%
- \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
- \ifpgfrectanglesplitignoreemptyparts%
- \expandafter\let\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname=%
- \pgf@lib@sh@rs@lastanchor%
- \fi%
- \fi%
- %
- % Adjust for alignment.
- %
- \expandafter\ifx\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
- \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname%
- \pgf@lib@sh@rs@bottomtext%
- \pgf@y=\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@number\endcsname\relax%
- \else%
- \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname%
- \pgf@lib@sh@rs@toptext%
- \pgf@y=-\csname pgf@lib@sh@rs@height@\pgf@lib@sh@rs@number\endcsname\relax%
- \advance\pgf@y by\pgf@lib@sh@rs@max@totalheight\relax%
- \else%
- \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname%
- \pgf@lib@sh@rs@basetext%
- \pgf@y=\pgf@lib@sh@rs@max@totalheight\relax%
- \advance\pgf@y by-\pgfutil@tempdima%
- \advance\pgf@y by\pgfutil@tempdimb%
- \divide\pgf@y by2\relax%
- \else%
- \pgf@y=\pgf@lib@sh@rs@max@totalheight\relax%
- \advance\pgf@y by-\csname pgf@lib@sh@rs@height@\pgf@lib@sh@rs@number\endcsname\relax%
- \advance\pgf@y by\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@number\endcsname\relax%
- \divide\pgf@y by2\relax%
- \fi%
- \fi%
- \fi%
- %
- % Re-adjust as the first box is at the origin.
- %
- \ifnum\pgfmathcounter=1\relax%
- \edef\pgf@lib@sh@rs@yoffset{\the\pgf@y}%
- \pgf@y=0pt\relax%
- \pgfextract@process\pgf@lib@sh@rs@anchor@one{}%
- \addtosavedmacro\pgf@lib@sh@rs@anchor@one%
- \let\pgf@lib@sh@rs@lastanchor=\pgf@lib@sh@rs@anchor@one%
- \let\pgf@lib@sh@rs@lastnumber=\pgf@lib@sh@rs@number%
- \else
- \advance\pgf@y by-\pgf@lib@sh@rs@yoffset\relax%
- \advance\pgf@x by\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@lastnumber\endcsname\relax%
- \advance\pgf@x by\innerxsep\relax%
- \advance\pgf@x by\pgflinewidth%
- \advance\pgf@x by\innerxsep\relax%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname{}%
- \expandafter\let\expandafter\pgf@lib@sh@rs@lastanchor\expandafter=%
- \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
- \let\pgf@lib@sh@rs@lastnumber=\pgf@lib@sh@rs@number%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
- \fi%
- \fi%
- \repeatpgfmathloop%
- %
- % Calculate some anchors.
- %
- \pgfextract@process\northeast{%
- \pgf@lib@sh@rs@lastanchor%
- \advance\pgf@x by\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@lastnumber\endcsname\relax%
- \advance\pgf@x by\innerxsep\relax%
- \advance\pgf@x by\outerxsep\relax%
- \pgf@y=\pgf@lib@sh@rs@max@totalheight\relax%
- \advance\pgf@y by-\pgf@lib@sh@rs@yoffset\relax%
- \advance\pgf@y by\innerysep\relax%
- \advance\pgf@y by\outerysep\relax%
- }%
- \addtosavedmacro\northeast%
- \pgfextract@process\southwest{%
- \pgf@lib@sh@rs@anchor@one%
- \advance\pgf@x by-\innerxsep\relax%
- \advance\pgf@x by-\outerxsep\relax%
- \pgf@y=-\pgf@lib@sh@rs@yoffset\relax%
- \advance\pgf@y by-\innerysep\relax%
- \advance\pgf@y by-\outerysep\relax%
- }%
- \addtosavedmacro\southwest%
- %
- \pgfextract@process\centerpoint{%
- \pgfpointadd{\southwest}{\northeast}%
- \divide\pgf@x by2\relax%
- \divide\pgf@y by2\relax%
- }%
- \addtosavedmacro\centerpoint%
- %
- \pgfmathloop%
- \ifnum\pgfmathcounter>\parts%
- \else%
- \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
- %
- \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
- \else%
- \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
- \pgf@xa=\pgf@x%
- \pgf@xb=\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@number\endcsname\relax%
- \advance\pgf@xa by0.5\pgf@xb%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @south\endcsname{%
- \southwest%
- \pgf@x=\pgf@xa%
- }%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @north\endcsname{%
- \northeast%
- \pgf@x=\pgf@xa%
- }%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @north\endcsname%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @south\endcsname%
- \ifnum\pgfmathcounter=\parts%
- \else%
- \advance\pgf@xa by0.5\pgf@xb%
- \advance\pgf@xa by\innerxsep\relax%
- \advance\pgf@xa by.5\pgflinewidth%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@south\endcsname{%
- \southwest%
- \pgf@x=\pgf@xa%
- }%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@north\endcsname{%
- \northeast%
- \pgf@x=\pgf@xa%
- }%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split\endcsname{%
- \centerpoint%
- \pgf@x=\pgf@xa%
- }%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@north\endcsname%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@south\endcsname%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split\endcsname%
- \fi%
- \fi%
- \repeatpgfmathloop%
- \else%
- %
- % Calculate the origins of each node part box.
- %
- \pgf@y=0pt\relax%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\parts%
- \else%
- \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
- %
- \expandafter\let\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname=\pgfutil@empty%
- \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
- \ifpgfrectanglesplitignoreemptyparts%
- \expandafter\let\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname=%
- \pgf@lib@sh@rs@lastanchor%
- \fi%
- \fi%
- %
- % Adjust for alignment.
- %
- \expandafter\ifx\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
- \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname%
- \pgf@lib@sh@rs@lefttext%
- \pgf@x=0pt\relax%
- \else%
- \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname%
- \pgf@lib@sh@rs@righttext%
- \pgf@x=-\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@number\endcsname\relax%
- \advance\pgf@x by\pgf@lib@sh@rs@max@width\relax%
- \else%
- \pgf@x=-\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@number\endcsname\relax%
- \advance\pgf@x by\pgf@lib@sh@rs@max@width\relax%
- \divide\pgf@x by2\relax%
- \fi%
- \fi%
- %
- % Re-adjust as the first box is at the origin.
- %
- \ifnum\pgfmathcounter=1\relax%
- \edef\pgf@lib@sh@rs@xoffset{\the\pgf@x}%
- \pgf@x=0pt\relax%
- \pgfextract@process\pgf@lib@sh@rs@anchor@one{}%
- \addtosavedmacro\pgf@lib@sh@rs@anchor@one%
- \let\pgf@lib@sh@rs@lastanchor=\pgf@lib@sh@rs@anchor@one%
- \let\pgf@lib@sh@rs@lastnumber=\pgf@lib@sh@rs@number%
- \else
- \advance\pgf@x by-\pgf@lib@sh@rs@xoffset\relax%
- \advance\pgf@y by-\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@lastnumber\endcsname\relax%
- \advance\pgf@y by-\innerysep\relax%
- \advance\pgf@y by-\pgflinewidth%
- \advance\pgf@y by-\innerysep\relax%
- \advance\pgf@y by-\csname pgf@lib@sh@rs@height@\pgf@lib@sh@rs@number\endcsname\relax%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname{}%
- \expandafter\let\expandafter\pgf@lib@sh@rs@lastanchor\expandafter=%
- \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
- \let\pgf@lib@sh@rs@lastnumber=\pgf@lib@sh@rs@number%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
- \fi%
- \fi%
- \repeatpgfmathloop%
- %
- % Calculate some anchors.
- %
- \pgfextract@process\northeast{%
- \pgf@x=\pgf@lib@sh@rs@max@width\relax%
- \advance\pgf@x by-\pgf@lib@sh@rs@xoffset\relax%
- \advance\pgf@x by\innerxsep\relax%
- \advance\pgf@x by\outerxsep\relax%
- \pgf@y=\pgf@lib@sh@rs@height@one\relax%
- \advance\pgf@y by\innerysep\relax%
- \advance\pgf@y by\outerysep\relax%
- \advance\pgf@y by.5\pgflinewidth%
- }%
- \addtosavedmacro\northeast%
- \pgfextract@process\southwest{%
- \pgf@lib@sh@rs@lastanchor%
- \pgf@x=-\pgf@lib@sh@rs@xoffset\relax%
- \advance\pgf@x by-\innerxsep\relax%
- \advance\pgf@x by-\outerxsep\relax%
- \advance\pgf@y by-\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@lastnumber\endcsname\relax%
- \advance\pgf@y by-\innerysep\relax%
- \advance\pgf@y by-\outerysep\relax%
- \advance\pgf@y by-.5\pgflinewidth%
- }%
- \addtosavedmacro\southwest%
- %
- \pgfextract@process\centerpoint{%
- \pgfpointadd{\southwest}{\northeast}%
- \divide\pgf@x by2\relax%
- \divide\pgf@y by2\relax%
- }%
- \addtosavedmacro\centerpoint%
- %
- \pgfmathloop%
- \ifnum\pgfmathcounter>\parts%
- \else%
- \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
- %
- \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
- \else%
- \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
- \pgf@ya=\csname pgf@lib@sh@rs@height@\pgf@lib@sh@rs@number\endcsname\relax%
- \advance\pgf@y by0.5\pgf@ya%
- \pgf@ya=\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@number\endcsname\relax%
- \advance\pgf@y by-0.5\pgf@ya%
- \pgf@ya=\pgf@y%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @west\endcsname{%
- \southwest%
- \pgf@y=\pgf@ya%
- }%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @east\endcsname{%
- \northeast%
- \pgf@y=\pgf@ya%
- }%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @east\endcsname%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @west\endcsname%
- \ifnum\pgfmathcounter=\parts%
- \else%
- \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
- \pgf@ya=\pgf@y%
- \advance\pgf@ya by-\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@number\endcsname\relax%
- \advance\pgf@ya by-\innerysep\relax%
- \advance\pgf@ya by-.5\pgflinewidth%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@west\endcsname{%
- \southwest%
- \pgf@y=\pgf@ya%
- }%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@east\endcsname{%
- \northeast%
- \pgf@y=\pgf@ya%
- }%
- \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split\endcsname{%
- \centerpoint%
- \pgf@y=\pgf@ya%
- }%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@east\endcsname%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@west\endcsname%
- \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split\endcsname%
- \fi%
- \fi%
- \repeatpgfmathloop%
- \fi%
- }%
- \savedanchor\basepoint{%
- \pgf@x=0.5\wd\pgfnodeparttextbox%
- \pgf@y=0pt\relax%
- }
- \savedanchor\midpoint{%
- \pgf@x=0.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{+0.5ex}%
- }
- \anchor{center}{%
- \rectanglesplitparameters%
- \centerpoint%
- }%
- \anchor{base}{\basepoint}
- \anchor{base east}{%
- \rectanglesplitparameters%
- \northeast%
- \pgf@y=0pt\relax%
- }%
- \anchor{base west}{%
- \rectanglesplitparameters%
- \southwest%
- \pgf@y=0pt\relax%
- }%
- \anchor{mid}{\midpoint}%
- \anchor{mid east}{%
- \rectanglesplitparameters%
- \northeast%
- \pgf@xa=\pgf@x%
- \midpoint%
- \pgf@x=\pgf@xa%
- }%
- \anchor{mid west}{%
- \rectanglesplitparameters%
- \southwest%
- \pgf@xa=\pgf@x%
- \midpoint%
- \pgf@x=\pgf@xa%
- }%
- \anchor{north}{%
- \rectanglesplitparameters%
- \centerpoint%
- \pgf@xa=\pgf@x%
- \northeast%
- \pgf@x=\pgf@xa%
- }
- \anchor{south}{%
- \rectanglesplitparameters%
- \centerpoint%
- \pgf@xa=\pgf@x%
- \southwest%
- \pgf@x=\pgf@xa%
- }
- \anchor{east}{%
- \rectanglesplitparameters%
- \centerpoint%
- \pgf@ya=\pgf@y%
- \northeast%
- \pgf@y=\pgf@ya%
- }
- \anchor{west}{%
- \rectanglesplitparameters%
- \centerpoint%
- \pgf@ya=\pgf@y%
- \southwest%
- \pgf@y=\pgf@ya%
- }
- \anchor{north east}{%
- \rectanglesplitparameters%
- \northeast%
- }
- \anchor{north west}{%
- \rectanglesplitparameters%
- \northeast%
- \pgf@ya=\pgf@y%
- \southwest%
- \pgf@y=\pgf@ya%
- }
- \anchor{south west}{%
- \rectanglesplitparameters%
- \southwest%
- }
- \anchor{south east}{%
- \rectanglesplitparameters%
- \southwest%
- \pgf@ya=\pgf@y%
- \northeast%
- \pgf@y=\pgf@ya%
- }
- \behindbackgroundpath{%
- \ifpgfrectanglesplitusecustomfill%
- \pgf@lib@sh@rs@process@list{\pgf@lib@sh@rs@list@fill}{\parts}%
- {%
- \ifpgfrectanglesplithorizontal%
- \expandafter\let\expandafter\pgf@lib@sh@rs@fill@bottomleft\expandafter=%
- \csname pgf@anchor@rectangle split@south west\endcsname%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\parts%
- \else%
- \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
- \ifnum\pgfmathcounter=\parts%
- \expandafter\let\expandafter\pgf@lib@sh@rs@fill@topright\expandafter=%
- \csname pgf@anchor@rectangle split@north east\endcsname%
- \else%
- \expandafter\let\expandafter\pgf@lib@sh@rs@fill@topright\expandafter=%
- \csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@number\space split north\endcsname%
- \fi%
- \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
- \else%
- \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname\pgf@lib@sh@rs@nonetext%
- \else%
- \pgfextract@process\pgf@lib@sh@rs@fill@bottomleft{%
- \pgf@lib@sh@rs@fill@bottomleft%
- \advance\pgf@y by\outerysep\relax%
- \ifnum\pgfmathcounter=1\relax%
- \advance\pgf@x by\outerxsep\relax%
- \fi%
- }%
- \pgfextract@process\pgf@lib@sh@rs@fill@topright{%
- \pgf@lib@sh@rs@fill@topright%
- \advance\pgf@y by-\outerysep\relax%
- \ifnum\pgfmathcounter=\parts\relax%
- \advance\pgf@x by-\outerxsep\relax%
- \fi%
- }%
- \ifnum\pgfmathcounter>1\relax%
- \begingroup\pgfsetcornersarced{\pgfpointorigin}%
- \fi%
- \pgfpathmoveto{%
- \pgf@lib@sh@rs@fill@topright%
- \pgf@xa=\pgf@x%
- \pgf@lib@sh@rs@fill@bottomleft%
- \pgf@x=\pgf@xa%
- }%
- \pgfpathlineto{\pgf@lib@sh@rs@fill@bottomleft}%
- \pgfpathlineto{%
- \pgf@lib@sh@rs@fill@bottomleft%
- \pgf@xa=\pgf@x%
- \pgf@lib@sh@rs@fill@topright%
- \pgf@x=\pgf@xa%
- }%
- \ifnum\pgfmathcounter>1\relax%
- \endgroup%
- \fi%
- \ifnum\pgfmathcounter<\parts%
- \begingroup\pgfsetcornersarced{\pgfpointorigin}%
- \fi%
- \pgfpathlineto{\pgf@lib@sh@rs@fill@topright}%
- \pgfpathclose%
- \ifnum\pgfmathcounter<\parts%
- \endgroup%
- \fi%
- \pgfsetfillcolor{\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname}%
- \pgfusepath{fill}%
- \fi%
- \fi%
- \pgfextract@process\pgf@lib@sh@rs@fill@bottomleft{%
- \pgf@lib@sh@rs@fill@bottomleft%
- \pgf@ya=\pgf@y%
- \pgf@lib@sh@rs@fill@topright%
- \pgf@y=\pgf@ya%
- \advance\pgf@y by-\outerysep%
- }%
- \repeatpgfmathloop%
- \else%
- \expandafter\let\expandafter\pgf@lib@sh@rs@fill@topright\expandafter=%
- \csname pgf@anchor@rectangle split@north east\endcsname%
- \pgfmathloop%
- \ifnum\pgfmathcounter>\parts%
- \else%
- \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
- \ifnum\pgfmathcounter=\parts%
- \expandafter\let\expandafter\pgf@lib@sh@rs@fill@bottomleft\expandafter=%
- \csname pgf@anchor@rectangle split@south west\endcsname%
- \else%
- \expandafter\let\expandafter\pgf@lib@sh@rs@fill@bottomleft\expandafter=%
- \csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@number\space split west\endcsname%
- \fi%
- \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
- \else%
- \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname\pgf@lib@sh@rs@nonetext%
- \else%
- \pgfextract@process\pgf@lib@sh@rs@fill@bottomleft{%
- \pgf@lib@sh@rs@fill@bottomleft%
- \advance\pgf@x by\outerxsep\relax%
- \ifnum\parts=1\relax%
- \advance\pgf@y by\outerysep\relax%
- \else%
- \ifnum\pgfmathcounter=\parts
- \advance\pgf@y by\outerysep\relax%
- \fi%
- \fi%
- }%
- \pgfextract@process\pgf@lib@sh@rs@fill@topright{%
- \pgf@lib@sh@rs@fill@topright%
- \advance\pgf@x by-\outerxsep\relax%
- \ifnum\parts=1\relax%
- \advance\pgf@y by-\outerysep\relax%
- \else%
- \ifnum\pgfmathcounter=1\relax%
- \advance\pgf@y by-\outerysep\relax%
- \fi%
- \fi%
- }%
- \pgfpathmoveto{\pgf@lib@sh@rs@fill@bottomleft}%
- \ifnum\pgfmathcounter>1\relax%
- \begingroup\pgfsetcornersarced{\pgfpointorigin}%
- \fi%
- \pgfpathlineto{%
- \pgf@lib@sh@rs@fill@bottomleft%
- \pgf@xa=\pgf@x%
- \pgf@lib@sh@rs@fill@topright%
- \pgf@x=\pgf@xa%
- }%
- \pgfpathlineto{\pgf@lib@sh@rs@fill@topright}%
- \ifnum\pgfmathcounter>1\relax%
- \endgroup%%
- \fi%
- \ifnum\pgfmathcounter<\parts%
- \begingroup\pgfsetcornersarced{\pgfpointorigin}%
- \fi%
- \pgfpathlineto{%
- \pgf@lib@sh@rs@fill@topright%
- \pgf@xa=\pgf@x%
- \pgf@lib@sh@rs@fill@bottomleft%
- \pgf@x=\pgf@xa%
- }%
- \pgfpathclose%
- \ifnum\pgfmathcounter<\parts%
- \endgroup%
- \fi%
- \pgfsetfillcolor{\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname}%
- \pgfusepath{fill}%
- \fi%
- \fi%
- \pgfextract@process\pgf@lib@sh@rs@fill@topright{%
- \pgf@lib@sh@rs@fill@topright%
- \pgf@xa=\pgf@x%
- \pgf@lib@sh@rs@fill@bottomleft%
- \pgf@x=\pgf@xa%
- \advance\pgf@x by\outerxsep\relax%
- }%
- \repeatpgfmathloop%
- \fi%
- }%
- \fi%
- }%
- \backgroundpath{%
- \begingroup%
- \pgfextract@process\southwest{%
- \southwest%
- \advance\pgf@x by\outerxsep\relax%
- \advance\pgf@y by\outerysep\relax%
- }%
- \pgfextract@process\northeast{%
- \northeast%
- \advance\pgf@x by-\outerxsep\relax%
- \advance\pgf@y by-\outerysep\relax%
- }%
- \pgfpathrectangle{\southwest}{\pgfpointdiff{\southwest}{\northeast}}%
- \endgroup%
- \ifpgfrectanglesplitdrawsplits%
- \pgfmathloop%
- \ifnum\pgfmathcounter=\parts%
- \else%
- \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
- %
- \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
- \else%
- \pgfpathmoveto{%
- \ifpgfrectanglesplithorizontal%
- \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@north\endcsname%
- \advance\pgf@y by-\outerysep\relax%
- \else%
- \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@east\endcsname%
- \advance\pgf@x by-\outerxsep\relax%
- \fi%
- }%
- \pgfpathlineto{%
- \ifpgfrectanglesplithorizontal%
- \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@south\endcsname%
- \advance\pgf@y by\outerysep\relax%
- \else%
- \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@west\endcsname%
- \advance\pgf@x by\outerxsep\relax%
- \fi%
- }%
- \fi%
- \repeatpgfmathloop%
- \fi%
- }%
- \anchorborder{%
- \pgfutil@tempdima\pgf@x%
- \pgfutil@tempdimb\pgf@y%
- \rectanglesplitparameters%
- \pgfpointdiff{\southwest}{\northeast}%
- \pgf@x.5\pgf@x%
- \pgf@y.5\pgf@y%
- \edef\pgf@marshall{%
- \noexpand\pgfpointborderrectangle{%
- \noexpand\pgfqpoint{\the\pgfutil@tempdima}{\the\pgfutil@tempdimb}%
- }%
- {%
- \noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}%
- }%
+ \savedmacro\rectanglesplitparameters{%
+ \pgfmathsetcount\c@pgf@counta{\pgfkeysvalueof{/pgf/rectangle split parts}}%
+ \edef\parts{\the\c@pgf@counta}%
+ \addtosavedmacro\parts%
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \edef\innerxsep{\the\pgf@x}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \edef\innerysep{\the\pgf@y}%
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \edef\outerxsep{\the\pgf@x}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \edef\outerysep{\the\pgf@y}%
+ \addtosavedmacro\outerxsep%
+ \addtosavedmacro\outerysep%
+ %
+ \pgf@x=0pt\relax% Widest box.
+ \pgf@y=0pt\relax% Tallest box.
+ %
+ \pgfutil@tempdima=0pt\relax% Maximum box height.
+ \pgfutil@tempdimb=0pt\relax% Maximum box depth.
+ %
+ % Get the dimensions of the boxes...
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\parts%
+ \else%
+ \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
+ %
+ \expandafter\let\expandafter\pgf@lib@sh@box\expandafter=%
+ \csname pgfnodepart\pgf@lib@sh@rs@number box\endcsname%
+ \pgf@xa=\wd\pgf@lib@sh@box%
+ \pgf@ya=\ht\pgf@lib@sh@box%
+ \pgf@yb=\dp\pgf@lib@sh@box%
+ %
+ % Test to see if the box is empty...
+ %
+ \expandafter\def\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname{\relax}%
+ \ifdim\pgf@xa=0pt\relax%
+ \ifdim\pgf@ya=0pt\relax%
+ \ifdim\pgf@yb=0pt\relax%
+ %
+ % ...It is. So...
+ %
+ \ifpgfrectanglesplitignoreemptyparts%
+ %
+ % ...flag this if we are ignoring parts...
+ %
+ \expandafter\let\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname=\pgfutil@empty%
+ \else%
+ %
+ % ...otherwise insert the code for every empty part.
+ %
+ \setbox\pgf@lib@sh@box=\hbox{{\pgf@lib@sh@rs@every@emptypart}}%
+ \pgf@xa=\wd\pgf@lib@sh@box%
+ \pgf@ya=\ht\pgf@lib@sh@box%
+ \pgf@yb=\dp\pgf@lib@sh@box%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \expandafter\edef\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@number\endcsname{\the\pgf@xa}%
+ \expandafter\edef\csname pgf@lib@sh@rs@height@\pgf@lib@sh@rs@number\endcsname{\the\pgf@ya}%
+ \expandafter\edef\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@number\endcsname{\the\pgf@yb}%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname%
+ %
+ % ...saving the widest box...
+ %
+ \ifdim\pgf@xa>\pgf@x%
+ \pgf@x=\pgf@xa%
+ \fi%
+ %
+ % ...the maximum height and depth...
+ %
+ \ifdim\pgf@ya>\pgfutil@tempdima%
+ \pgfutil@tempdima=\pgf@ya%
+ \fi%
+ \ifdim\pgf@yb>\pgfutil@tempdimb%
+ \pgfutil@tempdimb=\pgf@yb%
+ \fi%
+ %
+ % ...and the tallest box.
+ %
+ \pgf@yc=\pgfutil@tempdima%
+ \advance\pgf@yc by\pgfutil@tempdimb%
+ \ifdim\pgf@yc>\pgf@y%
+ \pgf@y=\pgf@yc%
+ \fi%
+ \repeatpgfmathloop%
+ %
+ \edef\pgf@lib@sh@rs@max@width{\the\pgf@x}%
+ \edef\pgf@lib@sh@rs@max@totalheight{\the\pgf@y}%
+ %
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/minimum width}}%
+ \advance\pgf@x by-\innerxsep\relax%
+ \advance\pgf@x by-\innerxsep\relax%
+ \pgf@xa=\pgf@x%
+ \advance\pgf@xa by-\pgf@lib@sh@rs@max@width\relax%
+ \ifdim\pgf@xa>0pt\relax%
+ \edef\pgf@lib@sh@rs@max@width{\the\pgf@x}%
+ \fi%
+ %
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/minimum height}}%
+ \advance\pgf@y by-\innerysep\relax%
+ \advance\pgf@y by-\innerysep\relax%
+ \pgf@ya=\pgf@y%
+ \advance\pgf@ya by-\pgf@lib@sh@rs@max@totalheight\relax%
+ \ifdim\pgf@ya>0pt\relax%
+ \edef\pgf@lib@sh@rs@max@totalheight{\the\pgf@y}%
+ \fi%
+ %
+ % Get the alignment of each node part box.
+ %
+ \pgf@lib@sh@rs@process@list{\pgfkeysvalueof{/pgf/rectangle split part align}}{\parts}%
+ %
+ % Are we splitting horizontally or vertically?
+ %
+ \ifpgfrectanglesplithorizontal%
+ %
+ % Calculate the origins of each node part box.
+ %
+ \pgf@x=0pt\relax%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\parts%
+ \else%
+ \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
+ %
+ \expandafter\let\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname=\pgfutil@empty%
+ \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
+ \ifpgfrectanglesplitignoreemptyparts%
+ \expandafter\let\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname=%
+ \pgf@lib@sh@rs@lastanchor%
+ \fi%
+ \fi%
+ %
+ % Adjust for alignment.
+ %
+ \expandafter\ifx\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
+ \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname%
+ \pgf@lib@sh@rs@bottomtext%
+ \pgf@y=\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@number\endcsname\relax%
+ \else%
+ \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname%
+ \pgf@lib@sh@rs@toptext%
+ \pgf@y=-\csname pgf@lib@sh@rs@height@\pgf@lib@sh@rs@number\endcsname\relax%
+ \advance\pgf@y by\pgf@lib@sh@rs@max@totalheight\relax%
+ \else%
+ \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname%
+ \pgf@lib@sh@rs@basetext%
+ \pgf@y=\pgf@lib@sh@rs@max@totalheight\relax%
+ \advance\pgf@y by-\pgfutil@tempdima%
+ \advance\pgf@y by\pgfutil@tempdimb%
+ \divide\pgf@y by2\relax%
+ \else%
+ \pgf@y=\pgf@lib@sh@rs@max@totalheight\relax%
+ \advance\pgf@y by-\csname pgf@lib@sh@rs@height@\pgf@lib@sh@rs@number\endcsname\relax%
+ \advance\pgf@y by\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@number\endcsname\relax%
+ \divide\pgf@y by2\relax%
+ \fi%
+ \fi%
+ \fi%
+ %
+ % Re-adjust as the first box is at the origin.
+ %
+ \ifnum\pgfmathcounter=1\relax%
+ \edef\pgf@lib@sh@rs@yoffset{\the\pgf@y}%
+ \pgf@y=0pt\relax%
+ \pgfextract@process\pgf@lib@sh@rs@anchor@one{}%
+ \addtosavedmacro\pgf@lib@sh@rs@anchor@one%
+ \let\pgf@lib@sh@rs@lastanchor=\pgf@lib@sh@rs@anchor@one%
+ \let\pgf@lib@sh@rs@lastnumber=\pgf@lib@sh@rs@number%
+ \else
+ \advance\pgf@y by-\pgf@lib@sh@rs@yoffset\relax%
+ \advance\pgf@x by\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@lastnumber\endcsname\relax%
+ \advance\pgf@x by\innerxsep\relax%
+ \advance\pgf@x by\pgflinewidth%
+ \advance\pgf@x by\innerxsep\relax%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname{}%
+ \expandafter\let\expandafter\pgf@lib@sh@rs@lastanchor\expandafter=%
+ \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
+ \let\pgf@lib@sh@rs@lastnumber=\pgf@lib@sh@rs@number%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
+ \fi%
+ \fi%
+ \repeatpgfmathloop%
+ %
+ % Calculate some anchors.
+ %
+ \pgfextract@process\northeast{%
+ \pgf@lib@sh@rs@lastanchor%
+ \advance\pgf@x by\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@lastnumber\endcsname\relax%
+ \advance\pgf@x by\innerxsep\relax%
+ \advance\pgf@x by\outerxsep\relax%
+ \pgf@y=\pgf@lib@sh@rs@max@totalheight\relax%
+ \advance\pgf@y by-\pgf@lib@sh@rs@yoffset\relax%
+ \advance\pgf@y by\innerysep\relax%
+ \advance\pgf@y by\outerysep\relax%
+ }%
+ \addtosavedmacro\northeast%
+ \pgfextract@process\southwest{%
+ \pgf@lib@sh@rs@anchor@one%
+ \advance\pgf@x by-\innerxsep\relax%
+ \advance\pgf@x by-\outerxsep\relax%
+ \pgf@y=-\pgf@lib@sh@rs@yoffset\relax%
+ \advance\pgf@y by-\innerysep\relax%
+ \advance\pgf@y by-\outerysep\relax%
+ }%
+ \addtosavedmacro\southwest%
+ %
+ \pgfextract@process\centerpoint{%
+ \pgfpointadd{\southwest}{\northeast}%
+ \divide\pgf@x by2\relax%
+ \divide\pgf@y by2\relax%
+ }%
+ \addtosavedmacro\centerpoint%
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\parts%
+ \else%
+ \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
+ %
+ \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
+ \else%
+ \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
+ \pgf@xa=\pgf@x%
+ \pgf@xb=\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@number\endcsname\relax%
+ \advance\pgf@xa by0.5\pgf@xb%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @south\endcsname{%
+ \southwest%
+ \pgf@x=\pgf@xa%
+ }%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @north\endcsname{%
+ \northeast%
+ \pgf@x=\pgf@xa%
+ }%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @north\endcsname%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @south\endcsname%
+ \ifnum\pgfmathcounter=\parts%
+ \else%
+ \advance\pgf@xa by0.5\pgf@xb%
+ \advance\pgf@xa by\innerxsep\relax%
+ \advance\pgf@xa by.5\pgflinewidth%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@south\endcsname{%
+ \southwest%
+ \pgf@x=\pgf@xa%
+ }%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@north\endcsname{%
+ \northeast%
+ \pgf@x=\pgf@xa%
+ }%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split\endcsname{%
+ \centerpoint%
+ \pgf@x=\pgf@xa%
+ }%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@north\endcsname%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@south\endcsname%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split\endcsname%
+ \fi%
+ \fi%
+ \repeatpgfmathloop%
+ \else%
+ %
+ % Calculate the origins of each node part box.
+ %
+ \pgf@y=0pt\relax%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\parts%
+ \else%
+ \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
+ %
+ \expandafter\let\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname=\pgfutil@empty%
+ \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
+ \ifpgfrectanglesplitignoreemptyparts%
+ \expandafter\let\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname=%
+ \pgf@lib@sh@rs@lastanchor%
+ \fi%
+ \fi%
+ %
+ % Adjust for alignment.
+ %
+ \expandafter\ifx\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
+ \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname%
+ \pgf@lib@sh@rs@lefttext%
+ \pgf@x=0pt\relax%
+ \else%
+ \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname%
+ \pgf@lib@sh@rs@righttext%
+ \pgf@x=-\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@number\endcsname\relax%
+ \advance\pgf@x by\pgf@lib@sh@rs@max@width\relax%
+ \else%
+ \pgf@x=-\csname pgf@lib@sh@rs@width@\pgf@lib@sh@rs@number\endcsname\relax%
+ \advance\pgf@x by\pgf@lib@sh@rs@max@width\relax%
+ \divide\pgf@x by2\relax%
+ \fi%
+ \fi%
+ %
+ % Re-adjust as the first box is at the origin.
+ %
+ \ifnum\pgfmathcounter=1\relax%
+ \edef\pgf@lib@sh@rs@xoffset{\the\pgf@x}%
+ \pgf@x=0pt\relax%
+ \pgfextract@process\pgf@lib@sh@rs@anchor@one{}%
+ \addtosavedmacro\pgf@lib@sh@rs@anchor@one%
+ \let\pgf@lib@sh@rs@lastanchor=\pgf@lib@sh@rs@anchor@one%
+ \let\pgf@lib@sh@rs@lastnumber=\pgf@lib@sh@rs@number%
+ \else
+ \advance\pgf@x by-\pgf@lib@sh@rs@xoffset\relax%
+ \advance\pgf@y by-\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@lastnumber\endcsname\relax%
+ \advance\pgf@y by-\innerysep\relax%
+ \advance\pgf@y by-\pgflinewidth%
+ \advance\pgf@y by-\innerysep\relax%
+ \advance\pgf@y by-\csname pgf@lib@sh@rs@height@\pgf@lib@sh@rs@number\endcsname\relax%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname{}%
+ \expandafter\let\expandafter\pgf@lib@sh@rs@lastanchor\expandafter=%
+ \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
+ \let\pgf@lib@sh@rs@lastnumber=\pgf@lib@sh@rs@number%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
+ \fi%
+ \fi%
+ \repeatpgfmathloop%
+ %
+ % Calculate some anchors.
+ %
+ \pgfextract@process\northeast{%
+ \pgf@x=\pgf@lib@sh@rs@max@width\relax%
+ \advance\pgf@x by-\pgf@lib@sh@rs@xoffset\relax%
+ \advance\pgf@x by\innerxsep\relax%
+ \advance\pgf@x by\outerxsep\relax%
+ \pgf@y=\pgf@lib@sh@rs@height@one\relax%
+ \advance\pgf@y by\innerysep\relax%
+ \advance\pgf@y by\outerysep\relax%
+ \advance\pgf@y by.5\pgflinewidth%
+ }%
+ \addtosavedmacro\northeast%
+ \pgfextract@process\southwest{%
+ \pgf@lib@sh@rs@lastanchor%
+ \pgf@x=-\pgf@lib@sh@rs@xoffset\relax%
+ \advance\pgf@x by-\innerxsep\relax%
+ \advance\pgf@x by-\outerxsep\relax%
+ \advance\pgf@y by-\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@lastnumber\endcsname\relax%
+ \advance\pgf@y by-\innerysep\relax%
+ \advance\pgf@y by-\outerysep\relax%
+ \advance\pgf@y by-.5\pgflinewidth%
+ }%
+ \addtosavedmacro\southwest%
+ %
+ \pgfextract@process\centerpoint{%
+ \pgfpointadd{\southwest}{\northeast}%
+ \divide\pgf@x by2\relax%
+ \divide\pgf@y by2\relax%
+ }%
+ \addtosavedmacro\centerpoint%
+ %
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\parts%
+ \else%
+ \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
+ %
+ \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
+ \else%
+ \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
+ \pgf@ya=\csname pgf@lib@sh@rs@height@\pgf@lib@sh@rs@number\endcsname\relax%
+ \advance\pgf@y by0.5\pgf@ya%
+ \pgf@ya=\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@number\endcsname\relax%
+ \advance\pgf@y by-0.5\pgf@ya%
+ \pgf@ya=\pgf@y%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @west\endcsname{%
+ \southwest%
+ \pgf@y=\pgf@ya%
+ }%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @east\endcsname{%
+ \northeast%
+ \pgf@y=\pgf@ya%
+ }%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @east\endcsname%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @west\endcsname%
+ \ifnum\pgfmathcounter=\parts%
+ \else%
+ \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number\endcsname%
+ \pgf@ya=\pgf@y%
+ \advance\pgf@ya by-\csname pgf@lib@sh@rs@depth@\pgf@lib@sh@rs@number\endcsname\relax%
+ \advance\pgf@ya by-\innerysep\relax%
+ \advance\pgf@ya by-.5\pgflinewidth%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@west\endcsname{%
+ \southwest%
+ \pgf@y=\pgf@ya%
+ }%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@east\endcsname{%
+ \northeast%
+ \pgf@y=\pgf@ya%
+ }%
+ \expandafter\pgfextract@process\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split\endcsname{%
+ \centerpoint%
+ \pgf@y=\pgf@ya%
+ }%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@east\endcsname%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@west\endcsname%
+ \expandafter\addtosavedmacro\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split\endcsname%
+ \fi%
+ \fi%
+ \repeatpgfmathloop%
+ \fi%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x=0.5\wd\pgfnodeparttextbox%
+ \pgf@y=0pt\relax%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x=0.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{+0.5ex}%
+ }%
+ \anchor{center}{%
+ \rectanglesplitparameters%
+ \centerpoint%
+ }%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{%
+ \rectanglesplitparameters%
+ \northeast%
+ \pgf@y=0pt\relax%
+ }%
+ \anchor{base west}{%
+ \rectanglesplitparameters%
+ \southwest%
+ \pgf@y=0pt\relax%
+ }%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{%
+ \rectanglesplitparameters%
+ \northeast%
+ \pgf@xa=\pgf@x%
+ \midpoint%
+ \pgf@x=\pgf@xa%
+ }%
+ \anchor{mid west}{%
+ \rectanglesplitparameters%
+ \southwest%
+ \pgf@xa=\pgf@x%
+ \midpoint%
+ \pgf@x=\pgf@xa%
+ }%
+ \anchor{north}{%
+ \rectanglesplitparameters%
+ \centerpoint%
+ \pgf@xa=\pgf@x%
+ \northeast%
+ \pgf@x=\pgf@xa%
+ }%
+ \anchor{south}{%
+ \rectanglesplitparameters%
+ \centerpoint%
+ \pgf@xa=\pgf@x%
+ \southwest%
+ \pgf@x=\pgf@xa%
+ }%
+ \anchor{east}{%
+ \rectanglesplitparameters%
+ \centerpoint%
+ \pgf@ya=\pgf@y%
+ \northeast%
+ \pgf@y=\pgf@ya%
+ }%
+ \anchor{west}{%
+ \rectanglesplitparameters%
+ \centerpoint%
+ \pgf@ya=\pgf@y%
+ \southwest%
+ \pgf@y=\pgf@ya%
+ }%
+ \anchor{north east}{%
+ \rectanglesplitparameters%
+ \northeast%
+ }%
+ \anchor{north west}{%
+ \rectanglesplitparameters%
+ \northeast%
+ \pgf@ya=\pgf@y%
+ \southwest%
+ \pgf@y=\pgf@ya%
+ }%
+ \anchor{south west}{%
+ \rectanglesplitparameters%
+ \southwest%
+ }%
+ \anchor{south east}{%
+ \rectanglesplitparameters%
+ \southwest%
+ \pgf@ya=\pgf@y%
+ \northeast%
+ \pgf@y=\pgf@ya%
+ }%
+ \behindbackgroundpath{%
+ \ifpgfrectanglesplitusecustomfill%
+ \pgf@lib@sh@rs@process@list{\pgf@lib@sh@rs@list@fill}{\parts}%
+ {%
+ \ifpgfrectanglesplithorizontal%
+ \expandafter\let\expandafter\pgf@lib@sh@rs@fill@bottomleft\expandafter=%
+ \csname pgf@anchor@rectangle split@south west\endcsname%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\parts%
+ \else%
+ \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
+ \ifnum\pgfmathcounter=\parts%
+ \expandafter\let\expandafter\pgf@lib@sh@rs@fill@topright\expandafter=%
+ \csname pgf@anchor@rectangle split@north east\endcsname%
+ \else%
+ \expandafter\let\expandafter\pgf@lib@sh@rs@fill@topright\expandafter=%
+ \csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@number\space split north\endcsname%
+ \fi%
+ \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
+ \else%
+ \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname\pgf@lib@sh@rs@nonetext%
+ \else%
+ \pgfextract@process\pgf@lib@sh@rs@fill@bottomleft{%
+ \pgf@lib@sh@rs@fill@bottomleft%
+ \advance\pgf@y by\outerysep\relax%
+ \ifnum\pgfmathcounter=1\relax%
+ \advance\pgf@x by\outerxsep\relax%
+ \fi%
+ }%
+ \pgfextract@process\pgf@lib@sh@rs@fill@topright{%
+ \pgf@lib@sh@rs@fill@topright%
+ \advance\pgf@y by-\outerysep\relax%
+ \ifnum\pgfmathcounter=\parts\relax%
+ \advance\pgf@x by-\outerxsep\relax%
+ \fi%
+ }%
+ \ifnum\pgfmathcounter>1\relax%
+ \begingroup\pgfsetcornersarced{\pgfpointorigin}%
+ \fi%
+ \pgfpathmoveto{%
+ \pgf@lib@sh@rs@fill@topright%
+ \pgf@xa=\pgf@x%
+ \pgf@lib@sh@rs@fill@bottomleft%
+ \pgf@x=\pgf@xa%
+ }%
+ \pgfpathlineto{\pgf@lib@sh@rs@fill@bottomleft}%
+ \pgfpathlineto{%
+ \pgf@lib@sh@rs@fill@bottomleft%
+ \pgf@xa=\pgf@x%
+ \pgf@lib@sh@rs@fill@topright%
+ \pgf@x=\pgf@xa%
+ }%
+ \ifnum\pgfmathcounter>1\relax%
+ \endgroup%
+ \fi%
+ \ifnum\pgfmathcounter<\parts%
+ \begingroup\pgfsetcornersarced{\pgfpointorigin}%
+ \fi%
+ \pgfpathlineto{\pgf@lib@sh@rs@fill@topright}%
+ \pgfpathclose%
+ \ifnum\pgfmathcounter<\parts%
+ \endgroup%
+ \fi%
+ \pgfsetfillcolor{\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname}%
+ \pgfusepath{fill}%
+ \fi%
+ \fi%
+ \pgfextract@process\pgf@lib@sh@rs@fill@bottomleft{%
+ \pgf@lib@sh@rs@fill@bottomleft%
+ \pgf@ya=\pgf@y%
+ \pgf@lib@sh@rs@fill@topright%
+ \pgf@y=\pgf@ya%
+ \advance\pgf@y by-\outerysep%
+ }%
+ \repeatpgfmathloop%
+ \else%
+ \expandafter\let\expandafter\pgf@lib@sh@rs@fill@topright\expandafter=%
+ \csname pgf@anchor@rectangle split@north east\endcsname%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter>\parts%
+ \else%
+ \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
+ \ifnum\pgfmathcounter=\parts%
+ \expandafter\let\expandafter\pgf@lib@sh@rs@fill@bottomleft\expandafter=%
+ \csname pgf@anchor@rectangle split@south west\endcsname%
+ \else%
+ \expandafter\let\expandafter\pgf@lib@sh@rs@fill@bottomleft\expandafter=%
+ \csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@number\space split west\endcsname%
+ \fi%
+ \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
+ \else%
+ \expandafter\ifx\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname\pgf@lib@sh@rs@nonetext%
+ \else%
+ \pgfextract@process\pgf@lib@sh@rs@fill@bottomleft{%
+ \pgf@lib@sh@rs@fill@bottomleft%
+ \advance\pgf@x by\outerxsep\relax%
+ \ifnum\parts=1\relax%
+ \advance\pgf@y by\outerysep\relax%
+ \else%
+ \ifnum\pgfmathcounter=\parts
+ \advance\pgf@y by\outerysep\relax%
+ \fi%
+ \fi%
+ }%
+ \pgfextract@process\pgf@lib@sh@rs@fill@topright{%
+ \pgf@lib@sh@rs@fill@topright%
+ \advance\pgf@x by-\outerxsep\relax%
+ \ifnum\parts=1\relax%
+ \advance\pgf@y by-\outerysep\relax%
+ \else%
+ \ifnum\pgfmathcounter=1\relax%
+ \advance\pgf@y by-\outerysep\relax%
+ \fi%
+ \fi%
+ }%
+ \pgfpathmoveto{\pgf@lib@sh@rs@fill@bottomleft}%
+ \ifnum\pgfmathcounter>1\relax%
+ \begingroup\pgfsetcornersarced{\pgfpointorigin}%
+ \fi%
+ \pgfpathlineto{%
+ \pgf@lib@sh@rs@fill@bottomleft%
+ \pgf@xa=\pgf@x%
+ \pgf@lib@sh@rs@fill@topright%
+ \pgf@x=\pgf@xa%
+ }%
+ \pgfpathlineto{\pgf@lib@sh@rs@fill@topright}%
+ \ifnum\pgfmathcounter>1\relax%
+ \endgroup%%
+ \fi%
+ \ifnum\pgfmathcounter<\parts%
+ \begingroup\pgfsetcornersarced{\pgfpointorigin}%
+ \fi%
+ \pgfpathlineto{%
+ \pgf@lib@sh@rs@fill@topright%
+ \pgf@xa=\pgf@x%
+ \pgf@lib@sh@rs@fill@bottomleft%
+ \pgf@x=\pgf@xa%
+ }%
+ \pgfpathclose%
+ \ifnum\pgfmathcounter<\parts%
+ \endgroup%
+ \fi%
+ \pgfsetfillcolor{\csname pgf@lib@sh@rs@\pgf@lib@sh@rs@number @item\endcsname}%
+ \pgfusepath{fill}%
+ \fi%
+ \fi%
+ \pgfextract@process\pgf@lib@sh@rs@fill@topright{%
+ \pgf@lib@sh@rs@fill@topright%
+ \pgf@xa=\pgf@x%
+ \pgf@lib@sh@rs@fill@bottomleft%
+ \pgf@x=\pgf@xa%
+ \advance\pgf@x by\outerxsep\relax%
+ }%
+ \repeatpgfmathloop%
+ \fi%
+ }%
+ \fi%
+ }%
+ \backgroundpath{%
+ \begingroup%
+ \pgfextract@process\southwest{%
+ \southwest%
+ \advance\pgf@x by\outerxsep\relax%
+ \advance\pgf@y by\outerysep\relax%
+ }%
+ \pgfextract@process\northeast{%
+ \northeast%
+ \advance\pgf@x by-\outerxsep\relax%
+ \advance\pgf@y by-\outerysep\relax%
+ }%
+ \pgfpathrectangle{\southwest}{\pgfpointdiff{\southwest}{\northeast}}%
+ \endgroup%
+ \ifpgfrectanglesplitdrawsplits%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter=\parts%
+ \else%
+ \pgf@lib@sh@getalpha\pgf@lib@sh@rs@number{\pgfmathcounter}%
+ %
+ \expandafter\ifx\csname pgf@lib@sh@rs@empty@\pgf@lib@sh@rs@number\endcsname\pgfutil@empty%
+ \else%
+ \pgfpathmoveto{%
+ \ifpgfrectanglesplithorizontal%
+ \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@north\endcsname%
+ \advance\pgf@y by-\outerysep\relax%
+ \else%
+ \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@east\endcsname%
+ \advance\pgf@x by-\outerxsep\relax%
+ \fi%
+ }%
+ \pgfpathlineto{%
+ \ifpgfrectanglesplithorizontal%
+ \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@south\endcsname%
+ \advance\pgf@y by\outerysep\relax%
+ \else%
+ \csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@number @split@west\endcsname%
+ \advance\pgf@x by\outerxsep\relax%
+ \fi%
+ }%
+ \fi%
+ \repeatpgfmathloop%
+ \fi%
+ }%
+ \anchorborder{%
+ \pgfutil@tempdima\pgf@x%
+ \pgfutil@tempdimb\pgf@y%
+ \rectanglesplitparameters%
+ \pgfpointdiff{\southwest}{\northeast}%
+ \pgf@x.5\pgf@x%
+ \pgf@y.5\pgf@y%
+ \edef\pgf@marshall{%
+ \noexpand\pgfpointborderrectangle{%
+ \noexpand\pgfqpoint{\the\pgfutil@tempdima}{\the\pgfutil@tempdimb}%
+ }%
+ {%
+ \noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}%
+ }%
+ }%
+ \pgf@marshall%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \centerpoint%
+ \advance\pgf@x\pgf@xa%
+ \advance\pgf@y\pgf@ya%
+ }%
+ %
+ % Hackery to install the correct number of node parts.
+ %
+ \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@rectangle split\endcsname{%
+ \let\pgf@lib@sh@rs@temp=\pgfutil@empty%
+ \pgfmathloop%
+ \ifnum\pgfmathcounter=\parts%
+ \expandafter\edef\csname pgf@sh@boxes@rectangle split\endcsname%
+ {\pgf@lib@sh@rs@temp\pgf@lib@sh@toalpha{\pgfmathcounter}}%
+ \else%
+ \edef\pgf@lib@sh@rs@temp{\pgf@lib@sh@rs@temp\pgf@lib@sh@toalpha{\pgfmathcounter},}%
+ \repeatpgfmathloop%
}%
- \pgf@marshall%
- \pgf@xa\pgf@x%
- \pgf@ya\pgf@y%
- \centerpoint%
- \advance\pgf@x\pgf@xa%
- \advance\pgf@y\pgf@ya%
- }%
- %
- % Hackery to install the correct number of node parts.
- %
- \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@rectangle split\endcsname{%
- \let\pgf@lib@sh@rs@temp=\pgfutil@empty%
- \pgfmathloop%
- \ifnum\pgfmathcounter=\parts%
- \expandafter\edef\csname pgf@sh@boxes@rectangle split\endcsname%
- {\pgf@lib@sh@rs@temp\pgf@lib@sh@toalpha{\pgfmathcounter}}%
- \else%
- \edef\pgf@lib@sh@rs@temp{\pgf@lib@sh@rs@temp\pgf@lib@sh@toalpha{\pgfmathcounter},}%
- \repeatpgfmathloop%
- }%
-}
+}%
\pgfutil@for\pgf@lib@sh@rs@temp:={one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen,seventeen,eighteen,nineteen,twenty}\do{%
- \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\endcsname{%
- \noexpand\rectanglesplitparameters%
- \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp}{\noexpand\pgf@lib@sh@rs@anchor@one}%
- {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp\noexpand\endcsname}%
- }%
- \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space split\endcsname{%
- \noexpand\rectanglesplitparameters%
- \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split}%
- {\noexpand\centerpoint}%
- {\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split\noexpand\endcsname}%
- }%
- \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space split north\endcsname{%
- \noexpand\rectanglesplitparameters%
- \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@north}%
- {\noexpand\csname pgf@anchor@rectangle split@north\noexpand\endcsname}%
- {\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@north\noexpand\endcsname}%
- }%
- \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space split south\endcsname{%
- \noexpand\rectanglesplitparameters%
- \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@south}%
- {\noexpand\csname pgf@anchor@rectangle split@south\noexpand\endcsname}%
- {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@south\noexpand\endcsname}%
- }%
- \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space north\endcsname{%
- \noexpand\rectanglesplitparameters%
- \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @north}%
- {\noexpand\csname pgf@anchor@rectangle split@north\noexpand\endcsname}%
- {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @north\noexpand\endcsname}%
- }%
- \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space south\endcsname{%
- \noexpand\rectanglesplitparameters%
- \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @south}%
- {\noexpand\csname pgf@anchor@rectangle split@south\noexpand\endcsname}%
- {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @south\noexpand\endcsname}%
- }%
- \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space split east\endcsname{%
- \noexpand\rectanglesplitparameters%
- \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@east}%
- {\noexpand\csname pgf@anchor@rectangle split@east\noexpand\endcsname}%
- {\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@east\noexpand\endcsname}%
- }%
- \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space split west\endcsname{%
- \noexpand\rectanglesplitparameters%
- \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@west}%
- {\noexpand\csname pgf@anchor@rectangle split@west\noexpand\endcsname}%
- {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@west\noexpand\endcsname}%
- }%
- \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space east\endcsname{%
- \noexpand\rectanglesplitparameters%
- \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @east}%
- {\noexpand\csname pgf@anchor@rectangle split@east\noexpand\endcsname}%
- {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @east\noexpand\endcsname}%
- }%
- \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space west\endcsname{%
- \noexpand\rectanglesplitparameters%
- \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @west}%
- {\noexpand\csname pgf@anchor@rectangle split@west\noexpand\endcsname}%
- {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @west\noexpand\endcsname}%
- }%
+ \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\endcsname{%
+ \noexpand\rectanglesplitparameters%
+ \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp}{\noexpand\pgf@lib@sh@rs@anchor@one}%
+ {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp\noexpand\endcsname}%
+ }%
+ \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space split\endcsname{%
+ \noexpand\rectanglesplitparameters%
+ \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split}%
+ {\noexpand\centerpoint}%
+ {\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split\noexpand\endcsname}%
+ }%
+ \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space split north\endcsname{%
+ \noexpand\rectanglesplitparameters%
+ \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@north}%
+ {\noexpand\csname pgf@anchor@rectangle split@north\noexpand\endcsname}%
+ {\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@north\noexpand\endcsname}%
+ }%
+ \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space split south\endcsname{%
+ \noexpand\rectanglesplitparameters%
+ \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@south}%
+ {\noexpand\csname pgf@anchor@rectangle split@south\noexpand\endcsname}%
+ {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@south\noexpand\endcsname}%
+ }%
+ \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space north\endcsname{%
+ \noexpand\rectanglesplitparameters%
+ \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @north}%
+ {\noexpand\csname pgf@anchor@rectangle split@north\noexpand\endcsname}%
+ {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @north\noexpand\endcsname}%
+ }%
+ \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space south\endcsname{%
+ \noexpand\rectanglesplitparameters%
+ \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @south}%
+ {\noexpand\csname pgf@anchor@rectangle split@south\noexpand\endcsname}%
+ {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @south\noexpand\endcsname}%
+ }%
+ \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space split east\endcsname{%
+ \noexpand\rectanglesplitparameters%
+ \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@east}%
+ {\noexpand\csname pgf@anchor@rectangle split@east\noexpand\endcsname}%
+ {\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@east\noexpand\endcsname}%
+ }%
+ \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space split west\endcsname{%
+ \noexpand\rectanglesplitparameters%
+ \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@west}%
+ {\noexpand\csname pgf@anchor@rectangle split@west\noexpand\endcsname}%
+ {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @split@west\noexpand\endcsname}%
+ }%
+ \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space east\endcsname{%
+ \noexpand\rectanglesplitparameters%
+ \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @east}%
+ {\noexpand\csname pgf@anchor@rectangle split@east\noexpand\endcsname}%
+ {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @east\noexpand\endcsname}%
+ }%
+ \expandafter\xdef\csname pgf@anchor@rectangle split@\pgf@lib@sh@rs@temp\space west\endcsname{%
+ \noexpand\rectanglesplitparameters%
+ \noexpand\pgfutil@ifundefined{pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @west}%
+ {\noexpand\csname pgf@anchor@rectangle split@west\noexpand\endcsname}%
+ {\noexpand\csname pgf@lib@sh@rs@anchor@\pgf@lib@sh@rs@temp @west\noexpand\endcsname}%
+ }%
}%
-\pgfutil@namelet{pgf@anchor@rectangle split@text east}{pgf@anchor@rectangle split@one east}
-\pgfutil@namelet{pgf@anchor@rectangle split@text west}{pgf@anchor@rectangle split@one west}
-\pgfutil@namelet{pgf@anchor@rectangle split@text split}{pgf@anchor@rectangle split@one split}
-\pgfutil@namelet{pgf@anchor@rectangle split@text split east}{pgf@anchor@rectangle split@one split east}
-\pgfutil@namelet{pgf@anchor@rectangle split@text split west}{pgf@anchor@rectangle split@one split west}
+\pgfutil@namelet{pgf@anchor@rectangle split@text east}{pgf@anchor@rectangle split@one east}%
+\pgfutil@namelet{pgf@anchor@rectangle split@text west}{pgf@anchor@rectangle split@one west}%
+\pgfutil@namelet{pgf@anchor@rectangle split@text split}{pgf@anchor@rectangle split@one split}%
+\pgfutil@namelet{pgf@anchor@rectangle split@text split east}{pgf@anchor@rectangle split@one split east}%
+\pgfutil@namelet{pgf@anchor@rectangle split@text split west}{pgf@anchor@rectangle split@one split west}%
-\pgfutil@namelet{pgf@anchor@rectangle split@second}{pgf@anchor@rectangle split@two}
-\pgfutil@namelet{pgf@anchor@rectangle split@second east}{pgf@anchor@rectangle split@two east}
-\pgfutil@namelet{pgf@anchor@rectangle split@second west}{pgf@anchor@rectangle split@two west}
-\pgfutil@namelet{pgf@anchor@rectangle split@second split}{pgf@anchor@rectangle split@two split}
-\pgfutil@namelet{pgf@anchor@rectangle split@second split east}{pgf@anchor@rectangle split@two split east}
-\pgfutil@namelet{pgf@anchor@rectangle split@second split west}{pgf@anchor@rectangle split@two split west}
+\pgfutil@namelet{pgf@anchor@rectangle split@second}{pgf@anchor@rectangle split@two}%
+\pgfutil@namelet{pgf@anchor@rectangle split@second east}{pgf@anchor@rectangle split@two east}%
+\pgfutil@namelet{pgf@anchor@rectangle split@second west}{pgf@anchor@rectangle split@two west}%
+\pgfutil@namelet{pgf@anchor@rectangle split@second split}{pgf@anchor@rectangle split@two split}%
+\pgfutil@namelet{pgf@anchor@rectangle split@second split east}{pgf@anchor@rectangle split@two split east}%
+\pgfutil@namelet{pgf@anchor@rectangle split@second split west}{pgf@anchor@rectangle split@two split west}%
-\pgfutil@namelet{pgf@anchor@rectangle split@third}{pgf@anchor@rectangle split@three}
-\pgfutil@namelet{pgf@anchor@rectangle split@third east}{pgf@anchor@rectangle split@three east}
-\pgfutil@namelet{pgf@anchor@rectangle split@third west}{pgf@anchor@rectangle split@three west}
-\pgfutil@namelet{pgf@anchor@rectangle split@third split}{pgf@anchor@rectangle split@three split}
-\pgfutil@namelet{pgf@anchor@rectangle split@third split east}{pgf@anchor@rectangle split@three split east}
-\pgfutil@namelet{pgf@anchor@rectangle split@third split west}{pgf@anchor@rectangle split@three split west}
+\pgfutil@namelet{pgf@anchor@rectangle split@third}{pgf@anchor@rectangle split@three}%
+\pgfutil@namelet{pgf@anchor@rectangle split@third east}{pgf@anchor@rectangle split@three east}%
+\pgfutil@namelet{pgf@anchor@rectangle split@third west}{pgf@anchor@rectangle split@three west}%
+\pgfutil@namelet{pgf@anchor@rectangle split@third split}{pgf@anchor@rectangle split@three split}%
+\pgfutil@namelet{pgf@anchor@rectangle split@third split east}{pgf@anchor@rectangle split@three split east}%
+\pgfutil@namelet{pgf@anchor@rectangle split@third split west}{pgf@anchor@rectangle split@three split west}%
-\pgfutil@namelet{pgf@anchor@rectangle split@fourth}{pgf@anchor@rectangle split@four}
-\pgfutil@namelet{pgf@anchor@rectangle split@fourth east}{pgf@anchor@rectangle split@four east}
-\pgfutil@namelet{pgf@anchor@rectangle split@fourth west}{pgf@anchor@rectangle split@four west}
-\pgfutil@namelet{pgf@anchor@rectangle split@fourth split}{pgf@anchor@rectangle split@four split}
-\pgfutil@namelet{pgf@anchor@rectangle split@fourth split east}{pgf@anchor@rectangle split@four split east}
-\pgfutil@namelet{pgf@anchor@rectangle split@fourth split west}{pgf@anchor@rectangle split@four split west}
+\pgfutil@namelet{pgf@anchor@rectangle split@fourth}{pgf@anchor@rectangle split@four}%
+\pgfutil@namelet{pgf@anchor@rectangle split@fourth east}{pgf@anchor@rectangle split@four east}%
+\pgfutil@namelet{pgf@anchor@rectangle split@fourth west}{pgf@anchor@rectangle split@four west}%
+\pgfutil@namelet{pgf@anchor@rectangle split@fourth split}{pgf@anchor@rectangle split@four split}%
+\pgfutil@namelet{pgf@anchor@rectangle split@fourth split east}{pgf@anchor@rectangle split@four split east}%
+\pgfutil@namelet{pgf@anchor@rectangle split@fourth split west}{pgf@anchor@rectangle split@four split west}%
@@ -1254,101 +1256,101 @@
% Shape: ellipse split.
%
\pgfdeclareshape{ellipse split}{%
- \nodeparts{text,lower}
- \savedanchor\radii{%
- \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \pgf@y2.0\pgf@y%
- \advance\pgf@y.5\pgflinewidth%
- \pgf@xa.5\wd\pgfnodeparttextbox%
- \pgf@xb.5\wd\pgfnodepartlowerbox%
- \advance\pgf@xa\pgf@x%
- \advance\pgf@xb\pgf@x%
- \pgf@ya\ht\pgfnodeparttextbox%
- \advance\pgf@ya\dp\pgfnodeparttextbox%
- \pgf@yb\ht\pgfnodepartlowerbox%
- \advance\pgf@yb\dp\pgfnodepartlowerbox%
- \advance\pgf@ya\pgf@y%
- \advance\pgf@yb\pgf@y%
- \ifdim\pgf@xa>\pgf@xb%
- \pgf@x1.414213\pgf@xa%
- \else%
- \pgf@x1.414213\pgf@xb%
- \fi%
- \ifdim\pgf@ya>\pgf@yb%
- \pgf@y1.414213\pgf@ya%
- \else%
- \pgf@y1.414213\pgf@yb%
- \fi%
- \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
- \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
- \ifdim\pgf@x<.5\pgf@xa%
- \pgf@x.5\pgf@xa%
- \fi%
- \ifdim\pgf@y<.5\pgf@ya%
- \pgf@y.5\pgf@ya%
- \fi%
- \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
- }
- \savedanchor\lower{%
- \pgf@x-.5\wd\pgfnodepartlowerbox%
- \advance\pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
- \pgf@y-2.0\pgf@y%
- \advance\pgf@y-\pgflinewidth%
- \advance\pgf@y-\dp\pgfnodeparttextbox%
- \advance\pgf@y-\ht\pgfnodepartlowerbox%
- }
- \savedanchor\centerpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{-\pgfkeysvalueof{/pgf/inner ysep}}%
- \advance\pgf@y-\dp\pgfnodeparttextbox%
- \advance\pgf@y-.5\pgflinewidth%
- }%
- \savedanchor\basepoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgf@y0pt\relax%
- }%
- \savedanchor\midpoint{%
- \pgf@x.5\wd\pgfnodeparttextbox%
- \pgfmathsetlength\pgf@y{.5ex}%
- }%
- \anchor{center}{\centerpoint}
- \anchor{lower}{\lower}
- \anchor{mid}{\midpoint}
- \anchor{mid east}{\radii\pgf@xa\pgf@x\midpoint\advance\pgf@x\pgf@xa}
- \anchor{mid west}{\radii\pgf@xa\pgf@x\midpoint\advance\pgf@x-\pgf@xa}
- \anchor{base}{\basepoint}
- \anchor{base east}{\radii\pgf@xa\pgf@x\basepoint\advance\pgf@x\pgf@xa}
- \anchor{base west}{\radii\pgf@xa\pgf@x\basepoint\advance\pgf@x-\pgf@xa}
- \anchor{north}{\pgfpointadd{\centerpoint}{\radii\pgf@x0pt}}%
- \anchor{south}{\pgfpointadd{\centerpoint}{\radii\pgf@x0pt\pgf@y-\pgf@y}}%
- \anchor{east}{\pgfpointadd{\centerpoint}{\radii\pgf@y0pt}}%
- \anchor{west}{\pgfpointadd{\centerpoint}{\radii\pgf@x-\pgf@x\pgf@y0pt}}%
- \anchor{north west}{\pgfpointadd{\centerpoint}{\radii\pgf@x-0.707106\pgf@x\pgf@y0.707106\pgf@y}}%
- \anchor{south west}{\pgfpointadd{\centerpoint}{\radii\pgf@x-0.707106\pgf@x\pgf@y-0.707106\pgf@y}}%
- \anchor{north east}{\pgfpointadd{\centerpoint}{\radii\pgf@x0.707106\pgf@x\pgf@y0.707106\pgf@y}}%
- \anchor{south east}{\pgfpointadd{\centerpoint}{\radii\pgf@x0.707106\pgf@x\pgf@y-0.707106\pgf@y}}%
- \backgroundpath{%
- \radii%
- \pgfmathaddtolength\pgf@x{-\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathaddtolength\pgf@y{-\pgfkeysvalueof{/pgf/outer ysep}}%
- \pgfutil@tempdima\pgf@x%
- \pgfutil@tempdimb\pgf@y%
- \pgfpathellipse{\centerpoint}{\pgfqpoint{\the\pgfutil@tempdima}{0pt}}{\pgfqpoint{0pt}{\the\pgfutil@tempdimb}}%
- \pgfpathmoveto{\centerpoint\advance\pgf@x-\pgfutil@tempdima}%
- \pgfpathlineto{\centerpoint\advance\pgf@x\pgfutil@tempdima}%
- }
- \anchorborder{%
- \pgfextract@process\externalpoint{}%
- \radii%
- \edef\pgf@marshal{%
- \noexpand\pgfpointadd{\noexpand\pgfpointborderellipse{\noexpand\externalpoint}%
- {\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}}{\noexpand\centerpoint}%
- }%
- \pgf@marshal%
- }%
-}
+ \nodeparts{text,lower}%
+ \savedanchor\radii{%
+ \pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \pgf@y2.0\pgf@y%
+ \advance\pgf@y.5\pgflinewidth%
+ \pgf@xa.5\wd\pgfnodeparttextbox%
+ \pgf@xb.5\wd\pgfnodepartlowerbox%
+ \advance\pgf@xa\pgf@x%
+ \advance\pgf@xb\pgf@x%
+ \pgf@ya\ht\pgfnodeparttextbox%
+ \advance\pgf@ya\dp\pgfnodeparttextbox%
+ \pgf@yb\ht\pgfnodepartlowerbox%
+ \advance\pgf@yb\dp\pgfnodepartlowerbox%
+ \advance\pgf@ya\pgf@y%
+ \advance\pgf@yb\pgf@y%
+ \ifdim\pgf@xa>\pgf@xb%
+ \pgf@x1.414213\pgf@xa%
+ \else%
+ \pgf@x1.414213\pgf@xb%
+ \fi%
+ \ifdim\pgf@ya>\pgf@yb%
+ \pgf@y1.414213\pgf@ya%
+ \else%
+ \pgf@y1.414213\pgf@yb%
+ \fi%
+ \pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/minimum width}}%
+ \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}%
+ \ifdim\pgf@x<.5\pgf@xa%
+ \pgf@x.5\pgf@xa%
+ \fi%
+ \ifdim\pgf@y<.5\pgf@ya%
+ \pgf@y.5\pgf@ya%
+ \fi%
+ \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
+ }%
+ \savedanchor\lower{%
+ \pgf@x-.5\wd\pgfnodepartlowerbox%
+ \advance\pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}%
+ \pgf@y-2.0\pgf@y%
+ \advance\pgf@y-\pgflinewidth%
+ \advance\pgf@y-\dp\pgfnodeparttextbox%
+ \advance\pgf@y-\ht\pgfnodepartlowerbox%
+ }%
+ \savedanchor\centerpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{-\pgfkeysvalueof{/pgf/inner ysep}}%
+ \advance\pgf@y-\dp\pgfnodeparttextbox%
+ \advance\pgf@y-.5\pgflinewidth%
+ }%
+ \savedanchor\basepoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgf@y0pt\relax%
+ }%
+ \savedanchor\midpoint{%
+ \pgf@x.5\wd\pgfnodeparttextbox%
+ \pgfmathsetlength\pgf@y{.5ex}%
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{lower}{\lower}%
+ \anchor{mid}{\midpoint}%
+ \anchor{mid east}{\radii\pgf@xa\pgf@x\midpoint\advance\pgf@x\pgf@xa}%
+ \anchor{mid west}{\radii\pgf@xa\pgf@x\midpoint\advance\pgf@x-\pgf@xa}%
+ \anchor{base}{\basepoint}%
+ \anchor{base east}{\radii\pgf@xa\pgf@x\basepoint\advance\pgf@x\pgf@xa}%
+ \anchor{base west}{\radii\pgf@xa\pgf@x\basepoint\advance\pgf@x-\pgf@xa}%
+ \anchor{north}{\pgfpointadd{\centerpoint}{\radii\pgf@x0pt}}%
+ \anchor{south}{\pgfpointadd{\centerpoint}{\radii\pgf@x0pt\pgf@y-\pgf@y}}%
+ \anchor{east}{\pgfpointadd{\centerpoint}{\radii\pgf@y0pt}}%
+ \anchor{west}{\pgfpointadd{\centerpoint}{\radii\pgf@x-\pgf@x\pgf@y0pt}}%
+ \anchor{north west}{\pgfpointadd{\centerpoint}{\radii\pgf@x-0.707106\pgf@x\pgf@y0.707106\pgf@y}}%
+ \anchor{south west}{\pgfpointadd{\centerpoint}{\radii\pgf@x-0.707106\pgf@x\pgf@y-0.707106\pgf@y}}%
+ \anchor{north east}{\pgfpointadd{\centerpoint}{\radii\pgf@x0.707106\pgf@x\pgf@y0.707106\pgf@y}}%
+ \anchor{south east}{\pgfpointadd{\centerpoint}{\radii\pgf@x0.707106\pgf@x\pgf@y-0.707106\pgf@y}}%
+ \backgroundpath{%
+ \radii%
+ \pgfmathaddtolength\pgf@x{-\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathaddtolength\pgf@y{-\pgfkeysvalueof{/pgf/outer ysep}}%
+ \pgfutil@tempdima\pgf@x%
+ \pgfutil@tempdimb\pgf@y%
+ \pgfpathellipse{\centerpoint}{\pgfqpoint{\the\pgfutil@tempdima}{0pt}}{\pgfqpoint{0pt}{\the\pgfutil@tempdimb}}%
+ \pgfpathmoveto{\centerpoint\advance\pgf@x-\pgfutil@tempdima}%
+ \pgfpathlineto{\centerpoint\advance\pgf@x\pgfutil@tempdima}%
+ }%
+ \anchorborder{%
+ \pgfextract@process\externalpoint{}%
+ \radii%
+ \edef\pgf@marshal{%
+ \noexpand\pgfpointadd{\noexpand\pgfpointborderellipse{\noexpand\externalpoint}%
+ {\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}}{\noexpand\centerpoint}%
+ }%
+ \pgf@marshal%
+ }%
+}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.symbols.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.symbols.code.tex
index efa492cc024..a6e925346d6 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.symbols.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/shapes/pgflibraryshapes.symbols.code.tex
@@ -7,35 +7,35 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/shapes/pgflibraryshapes.symbols.code.tex,v 1.6 2013/09/11 06:15:59 vibrovski Exp $
+\ProvidesFileRCS{pgflibraryshapes.symbols.code.tex}
\pgfdeclareshape{forbidden sign}
-{
- \inheritsavedanchors[from=circle] % this is nearly a circle
- \inheritanchorborder[from=circle]
- \inheritanchor[from=circle]{north}
- \inheritanchor[from=circle]{north west}
- \inheritanchor[from=circle]{north east}
- \inheritanchor[from=circle]{center}
- \inheritanchor[from=circle]{west}
- \inheritanchor[from=circle]{east}
- \inheritanchor[from=circle]{mid}
- \inheritanchor[from=circle]{mid west}
- \inheritanchor[from=circle]{mid east}
- \inheritanchor[from=circle]{base}
- \inheritanchor[from=circle]{base west}
- \inheritanchor[from=circle]{base east}
- \inheritanchor[from=circle]{south}
- \inheritanchor[from=circle]{south west}
- \inheritanchor[from=circle]{south east}
- \inheritbackgroundpath[from=circle]
+{%
+ \inheritsavedanchors[from=circle]% this is nearly a circle
+ \inheritanchorborder[from=circle]%
+ \inheritanchor[from=circle]{north}%
+ \inheritanchor[from=circle]{north west}%
+ \inheritanchor[from=circle]{north east}%
+ \inheritanchor[from=circle]{center}%
+ \inheritanchor[from=circle]{west}%
+ \inheritanchor[from=circle]{east}%
+ \inheritanchor[from=circle]{mid}%
+ \inheritanchor[from=circle]{mid west}%
+ \inheritanchor[from=circle]{mid east}%
+ \inheritanchor[from=circle]{base}%
+ \inheritanchor[from=circle]{base west}%
+ \inheritanchor[from=circle]{base east}%
+ \inheritanchor[from=circle]{south}%
+ \inheritanchor[from=circle]{south west}%
+ \inheritanchor[from=circle]{south east}%
+ \inheritbackgroundpath[from=circle]%
\foregroundpath{
\centerpoint%
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
\pgfutil@tempdima=\radius%
- \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\ifdim\pgf@xb<\pgf@yb%
\advance\pgfutil@tempdima by-\pgf@yb%
\else%
@@ -45,37 +45,37 @@
\pgfpathlineto{\pgfpointadd{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\pgfqpoint{0.707107\pgfutil@tempdima}{0.707107\pgfutil@tempdima}}}
\pgfsetarrowsstart{}
\pgfsetarrowsend{}
- }
-}
+ }%
+}%
\pgfdeclareshape{correct forbidden sign}
-{
- \inheritsavedanchors[from=circle] % this is nearly a circle
- \inheritanchorborder[from=circle]
- \inheritanchor[from=circle]{north}
- \inheritanchor[from=circle]{north west}
- \inheritanchor[from=circle]{north east}
- \inheritanchor[from=circle]{center}
- \inheritanchor[from=circle]{west}
- \inheritanchor[from=circle]{east}
- \inheritanchor[from=circle]{mid}
- \inheritanchor[from=circle]{mid west}
- \inheritanchor[from=circle]{mid east}
- \inheritanchor[from=circle]{base}
- \inheritanchor[from=circle]{base west}
- \inheritanchor[from=circle]{base east}
- \inheritanchor[from=circle]{south}
- \inheritanchor[from=circle]{south west}
- \inheritanchor[from=circle]{south east}
- \inheritbackgroundpath[from=circle]
+{%
+ \inheritsavedanchors[from=circle]% this is nearly a circle
+ \inheritanchorborder[from=circle]%
+ \inheritanchor[from=circle]{north}%
+ \inheritanchor[from=circle]{north west}%
+ \inheritanchor[from=circle]{north east}%
+ \inheritanchor[from=circle]{center}%
+ \inheritanchor[from=circle]{west}%
+ \inheritanchor[from=circle]{east}%
+ \inheritanchor[from=circle]{mid}%
+ \inheritanchor[from=circle]{mid west}%
+ \inheritanchor[from=circle]{mid east}%
+ \inheritanchor[from=circle]{base}%
+ \inheritanchor[from=circle]{base west}%
+ \inheritanchor[from=circle]{base east}%
+ \inheritanchor[from=circle]{south}%
+ \inheritanchor[from=circle]{south west}%
+ \inheritanchor[from=circle]{south east}%
+ \inheritbackgroundpath[from=circle]%
\foregroundpath{
\centerpoint%
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
\pgfutil@tempdima=\radius%
- \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\ifdim\pgf@xb<\pgf@yb%
\advance\pgfutil@tempdima by-\pgf@yb%
\else%
@@ -85,8 +85,8 @@
\pgfpathlineto{\pgfpointadd{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\pgfqpoint{-0.707107\pgfutil@tempdima}{0.707107\pgfutil@tempdima}}}
\pgfsetarrowsstart{}
\pgfsetarrowsend{}
- }
-}
+ }%
+}%
@@ -107,31 +107,31 @@
\fi%
\pgfkeyslet{/pgf/random starburst}{\pgfmathresult}%
}%
-}
-\pgfkeys{/pgf/random starburst=100}
+}%
+\pgfkeys{/pgf/random starburst=100}%
-\pgfkeys{/pgf/starburst point height/.value required}
+\pgfkeys{/pgf/starburst point height/.value required}%
\pgfkeys{/pgf/starburst point height/.code={%
\pgfmathparse{#1}%
\edef\pgfmathresult{\pgfmathresult pt}%
\pgfkeyslet{/pgf/starburst point height}{\pgfmathresult}%
}%
}%
-\pgfkeys{/pgf/starburst point height=.5cm}
+\pgfkeys{/pgf/starburst point height=.5cm}%
-\pgfkeys{/pgf/starburst points/.value required}
+\pgfkeys{/pgf/starburst points/.value required}%
\pgfkeys{/pgf/starburst points/.code={%
\pgfmathtruncatemacro\pgfmathresult{#1}%
\pgfkeyslet{/pgf/starburst points}{\pgfmathresult}%
- }%
+ }%
}%
-\pgfkeys{/pgf/starburst points=17}
+\pgfkeys{/pgf/starburst points=17}%
\pgfdeclareshape{starburst}{%
\savedmacro\anglestep{%
\pgfmathdivide@{180}{\pgfkeysvalueof{/pgf/starburst points}}%
\let\anglestep\pgfmathresult%
- }
+ }%
\savedmacro\calculatestarburstpoints{%
%
% Get the angle step.
@@ -162,11 +162,11 @@
\pgf@x\pgf@y%
\fi%
\edef\outersep{\the\pgf@x}%
- %
+ %
% Get the node dimensions.
- %
+ %
\pgfmathsetlength\pgf@x{+\pgfkeysvalueof{/pgf/inner xsep}}%
- \pgfmathaddtolength\pgf@x{+.5\wd\pgfnodeparttextbox}%
+ \pgfmathaddtolength\pgf@x{+.5\wd\pgfnodeparttextbox}%
\pgfmathsetlength\pgf@y{+\pgfkeysvalueof{/pgf/inner ysep}}%
\pgfmathaddtolength\pgf@y{+.5\ht\pgfnodeparttextbox}%
\pgfmathaddtolength\pgf@y{+.5\dp\pgfnodeparttextbox}%
@@ -215,15 +215,15 @@
\edef\rotate{\the\c@pgf@counta}%
%
% ...or not.
- %
+ %
\pgf@x=1.41421\pgf@x%
\pgf@y=1.41421\pgf@y%
\fi%
\addtosavedmacro{\rotate}%
- %
+ %
% Adjust innerradius for minimum width and height.
%
- \pgf@xa\pgf@x%
+ \pgf@xa\pgf@x%
\pgfmathsetlength\pgf@xb{+\pgfkeysvalueof{/pgf/starburst point height}}%
\advance\pgf@xa\pgf@xb%
\pgfmathsetlength\pgf@xc{+\pgfkeysvalueof{/pgf/minimum width}}%
@@ -231,14 +231,14 @@
\pgf@x.5\pgf@xc%
\advance\pgf@x-\pgf@xb%
\fi%
- \pgf@ya\pgf@y%
+ \pgf@ya\pgf@y%
\pgfmathsetlength\pgf@yb{+\pgfkeysvalueof{/pgf/starburst point height}}%
\advance\pgf@ya\pgf@yb%
\pgfmathsetlength\pgf@yc{+\pgfkeysvalueof{/pgf/minimum height}}%
\ifdim\pgf@ya<.5\pgf@yc%
\pgf@y.5\pgf@yc%
\advance\pgf@y-\pgf@yb%
- \fi%
+ \fi%
\edef\xinnerradius{\the\pgf@x}%
\edef\yinnerradius{\the\pgf@y}%
\addtosavedmacro{\xinnerradius}%
@@ -255,9 +255,9 @@
%
% Set the seed for the random number generator.
%
- \pgfmathsetseed{\pgfkeysvalueof{/pgf/random starburst}}%
+ \pgfmathsetseed{\pgfkeysvalueof{/pgf/random starburst}}%
%
- % Now create the points on the shape and also
+ % Now create the points on the shape and also
% the miter length and angle for each point.
%
\def\angle{90}% Start at the top.
@@ -270,7 +270,7 @@
% As 3 consecutive points are required to be defined for miter
% calculations, it is necessary to go over the first two points
% again.
- %
+ %
\c@pgf@countc\totalpoints\relax%
\advance\c@pgf@countc2\relax%
\edef\looppoints{\the\c@pgf@countc}%
@@ -280,8 +280,8 @@
%
% Cycle the point definitions.
%
- \let\firstpoint\secondpoint%
- \let\secondpoint\thirdpoint%
+ \let\firstpoint\secondpoint%
+ \let\secondpoint\thirdpoint%
\ifnum\pgfmathcounter>\looppoints%
\else%
\ifnum\pgfmathcounter>\totalpoints%
@@ -324,14 +324,14 @@
\centerpoint%
\advance\pgf@x\pgf@xa%
\advance\pgf@y\pgf@ya%
- }%
+ }%
\fi%
%
% Add the points to the saved macro.
%
\expandafter\let\expandafter\thirdpoint\csname point@\the\c@pgf@counta @\endcsname%
\expandafter\addtosavedmacro\expandafter{\csname point@\the\c@pgf@counta @\endcsname}%
- \fi%
+ \fi%
%
% It is only possible to do the miter calculations if three points are defined.
%
@@ -376,12 +376,12 @@
\expandafter\edef\csname angletoborderpoint@\the\c@pgf@countb @\endcsname{\pgfmathresult}%
\expandafter\addtosavedmacro\expandafter{\csname angletoborderpoint@\the\c@pgf@countb @\endcsname}%
%
- % Rotatee the border points and save.
+ % Rotate the border points and save.
%
\expandafter\pgfextract@process\csname borderpoint@\the\c@pgf@countb @\endcsname{%
\pgfmathrotatepointaround{\borderpoint}{\centerpoint}{\rotate}%
}%
- \expandafter\addtosavedmacro\expandafter{\csname borderpoint@\the\c@pgf@countb @\endcsname}%
+ \expandafter\addtosavedmacro\expandafter{\csname borderpoint@\the\c@pgf@countb @\endcsname}%
%
% Now create the anchors.
%
@@ -405,7 +405,7 @@
\fi%
\fi%
\pgfmathadd@{\angle}{\anglestep}%
- \pgfmathmod@{\pgfmathresult}{360}%
+ \pgfmathmod@{\pgfmathresult}{360}%
\let\angle\pgfmathresult%
\advance\c@pgf@counta1\relax%
\ifnum\c@pgf@counta>\totalpoints%
@@ -416,7 +416,7 @@
\c@pgf@countb1\relax%
\fi%
\repeatpgfmathloop%
- }
+ }%
\savedanchor\centerpoint{%
\pgfmathsetlength\pgf@x{+.5\wd\pgfnodeparttextbox}%
\pgfmathsetlength\pgf@y{+.5\ht\pgfnodeparttextbox}%
@@ -430,42 +430,42 @@
\pgfmathsetlength\pgf@x{+.5\wd\pgfnodeparttextbox}%
\pgf@y0pt\relax%
}%
- \anchor{center}{\centerpoint}
- \anchor{base}{\basepoint}
- \anchor{mid}{\midpoint}
+ \anchor{center}{\centerpoint}%
+ \anchor{base}{\basepoint}%
+ \anchor{mid}{\midpoint}%
\anchor{north}{%
\calculatestarburstpoints%
\csname pgf@anchor@starburst@border\endcsname{\pgfqpoint{0pt}{\externalradius}}%
- }
+ }%
\anchor{south}{%
\calculatestarburstpoints%
\csname pgf@anchor@starburst@border\endcsname{\pgfqpoint{0pt}{-\externalradius}}%
- }
+ }%
\anchor{east}{%
\calculatestarburstpoints%
\csname pgf@anchor@starburst@border\endcsname{\pgfqpoint{\externalradius}{0pt}}%
- }
+ }%
\anchor{west}{%
\calculatestarburstpoints%
\csname pgf@anchor@starburst@border\endcsname{\pgfqpoint{-\externalradius}{0pt}}%
- }
+ }%
\anchor{north west}{%
\calculatestarburstpoints%
\csname pgf@anchor@starburst@border\endcsname{\pgfqpoint{-\externalradius}{\externalradius}}%
- }
+ }%
\anchor{south west}{%
\calculatestarburstpoints%
\csname pgf@anchor@starburst@border\endcsname{\pgfqpoint{-\externalradius}{-\externalradius}}%
- }
+ }%
\anchor{north east}{%
\calculatestarburstpoints%
\csname pgf@anchor@starburst@border\endcsname{\pgfqpoint{\externalradius}{\externalradius}}%
- }
+ }%
\anchor{south east}{%
\calculatestarburstpoints%
\csname pgf@anchor@starburst@border\endcsname{\pgfqpoint{\externalradius}{-\externalradius}}%
- }
- \backgroundpath{%
+ }%
+ \backgroundpath{%
\calculatestarburstpoints%
\pgfmathloop%
\ifnum\pgfmathcounter>\totalpoints%
@@ -479,8 +479,8 @@
%\pgfmathrotatepointaround{\csname point@\pgfmathcounter @\endcsname}{\centerpoint}{\rotate}}%
\csname point@\pgfmathcounter @\endcsname}
\repeatpgfmathloop%
- \pgfpathclose%
- }
+ \pgfpathclose%
+ }%
\anchorborder{%
%
% Save x and y.
@@ -488,7 +488,7 @@
\edef\externalx{\the\pgf@x}%
\edef\externaly{\the\pgf@y}%
%
- % Adjust the location of the external
+ % Adjust the location of the external
% point relative to \centerpoint.
%
\centerpoint%
@@ -544,9 +544,9 @@
\c@pgf@counta\pgfmathcounter%
\else%
\ifdim\externalangle pt<\csname angletoborderpoint@\pgfmathcounter @\endcsname pt\relax%
- \c@pgf@counta\pgfmathcounter%
+ \c@pgf@counta\pgfmathcounter%
\fi%
- \fi%
+ \fi%
\repeatpgfmathloop%
\edef\first{\the\c@pgf@counta}%
\advance\c@pgf@counta-1\relax%
@@ -561,7 +561,7 @@
\pgfpointintersectionoflines{\centerpoint}{\pgfqpoint{\externalx}{\externaly}}%
{\csname borderpoint@\first @\endcsname}{\csname borderpoint@\second @\endcsname}%
}%
-}
+}%
@@ -578,7 +578,7 @@
cloud puffs/.initial=10,
cloud puff arc/.initial=150,
cloud ignores aspect/.is if=pgfcloudignoresaspect,
- cloud anchors use ellipse/.is if=pgfcloudanchorsuseellipse
+ cloud anchors use ellipse/.is if=pgfcloudanchorsuseellipse,
}%
@@ -586,12 +586,12 @@
%
\pgfkeys{/pgf/.cd,
aspect/.code={\pgfsetshapeaspect{#1}},% this for tikz...
- shape aspect/.initial=1,% but this is consistent with other pgfset stuff.
+ shape aspect/.initial=1,% but this is consistent with other pgfset stuff.
shape aspect/.code={%
\pgfkeys{/pgf/aspect=#1}%
\pgfkeyssetvalue{/pgf/shape aspect}{#1}
}%
-}
+}%
\def\pgfsetshapeaspect#1{%
\def\pgfshapeaspect{#1}%
@@ -601,11 +601,11 @@
\c@pgf@counta=\pgfutil@tempdima\relax% 8192*determinant
\pgfutil@tempdima=8192pt%
\divide\pgfutil@tempdima by\c@pgf@counta%
- \edef\pgfshapeaspectinverse{\pgf@sys@tonumber{\pgfutil@tempdima}}
-}
+ \edef\pgfshapeaspectinverse{\pgf@sys@tonumber{\pgfutil@tempdima}}%
+}%
+
+\pgfsetshapeaspect{1}%
-\pgfsetshapeaspect{1}
-%
% Shape cloud.
%
@@ -653,7 +653,7 @@
\edef\yinnerradius{\the\pgf@yc}%
%
% Get the larger of the outer sep.
- %
+ %
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}%
\pgfmathsetlength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}%
\ifdim\pgf@x<\pgf@y%
@@ -667,7 +667,7 @@
% and the radius of that arc, is constant:
%
% g = .5 * sec((180-a)/2)
- %
+ %
\pgfmathsubtract{180}{\arc}%
\pgfmathdivide@{\pgfmathresult}{2}%
\let\tempangle\pgfmathresult%
@@ -677,7 +677,7 @@
\addtosavedmacro\arcradiusquotient%
%
% In addition, the quotient of the distance between the start and
- % end point of a puffs circular arc and the height of that arc
+ % end point of a puffs circular arc and the height of that arc
% (ignoring rotation), is also constant:
%
% h = .5 * (1-sin((180-a)/2))/cos((180-a)/2)
@@ -688,20 +688,20 @@
\let\archeightquotient\pgfmathresult%
\addtosavedmacro\archeightquotient%
%
- % Minimum size is applied to the circum-ellipse (i.e. the ellipse
- % that passes through the extremeties of each puff). Thus, the
- % relationship between the radii of the elliptical incircle ("inellipse"?)
- % of the cloud (x and y) and the radii of the circum-ellispe (X and Y),
- % is given by
+ % Minimum size is applied to the circum-ellipse (i.e. the ellipse
+ % that passes through the extremities of each puff). Thus, the
+ % relationship between the radii of the elliptical incircle ("inellipse"?)
+ % of the cloud (x and y) and the radii of the circum-ellipse (X and Y),
+ % is given by
%
- % X = 2(x*cos(p/2) + ky)
+ % X = 2(x*cos(p/2) + ky)
% Y = 2(y*cos(p/2) + kx)
- %
+ %
% where:
% k = sin(p/2)*((1-cos(a/2))/sin(a/2))
- % p = the angle between each puff (i.e. 360/<puffs>)
+ % p = the angle between each puff (i.e. 360/<puffs>)
% a = the length of arc of the puff.
- %
+ %
\pgfmathdivide{\arc}{2}%
\let\halfarcangle\pgfmathresult%
\pgfmathcos@{\pgfmathresult}%
@@ -747,10 +747,10 @@
\edef\youterradius{\the\pgf@ya}%
\addtosavedmacro\youterradius%
%
- % Now recalculate `in-ellispe' radii:
+ % Now recalculate `in-ellipse' radii:
%
- % x = (X'cos(p/2)-kY')/cos^2(p/2)-k^2,
- % y = (Y'cos(p/2)-kX')/cos^2(p/2)-k^2,
+ % x = (X'cos(p/2)-kY')/cos^2(p/2)-k^2,
+ % y = (Y'cos(p/2)-kX')/cos^2(p/2)-k^2,
%
\pgf@xc\k pt\relax%
\pgf@xc-\k\pgf@xc%
@@ -803,23 +803,23 @@
\addtosavedmacro\cosquarterarc%
\addtosavedmacro\tanquarterarc%
%
- }
+ }%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
\advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ }%
\savedanchor\midpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+.5ex}%
- }
+ }%
\savedanchor\basepoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt%
- }
- \anchor{center}{\centerpoint}
- \anchor{mid}{\midpoint}
- \anchor{base}{\basepoint}
+ }%
+ \anchor{center}{\centerpoint}%
+ \anchor{mid}{\midpoint}%
+ \anchor{base}{\basepoint}%
\anchor{north}{%
\getradii%
\csname pgf@anchor@cloud@border\endcsname{\pgfqpoint{0pt}{\youterradius}}%
@@ -877,9 +877,9 @@
\csname pgf@anchor@cloud@border\endcsname{\pgf@sh}%
}%
%
- % Each `puff' is a circular arc of length a, drawn using two a/2
- % arcs (a < 180), approximated by Bezier curves.
- % Due to TeX rounding errors, it is sometimes necessary to `force'
+ % Each `puff' is a circular arc of length a, drawn using two a/2
+ % arcs (a < 180), approximated by Bezier curves.
+ % Due to TeX rounding errors, it is sometimes necessary to `force'
% the arc to end at a specific point. So...
%
% @article{riskus2006,
@@ -927,7 +927,7 @@
\pgfpointadd{\centerpoint}{%
\pgfpointpolar{+\angle}{+\xinnerradius and +\yinnerradius}%
}%
- }%
+ }%
\fi%
%
% Get some useful cloud parameters from \arcstartpoint and \arcendpoint.
@@ -944,7 +944,7 @@
\pgfmathcos@{\arcrotate}%
\let\cosarcrotate\pgfmathresult%
%
- % Calculate the amount by which to scale the control
+ % Calculate the amount by which to scale the control
% points, in order to approximate an a/2 arc with radius x.
%
\pgf@x\arcradius\relax%
@@ -995,11 +995,11 @@
%
% Get the second control point for the first arc (length a/2)...
%
- \pgfextract@process\controltwo{%
+ \pgfextract@process\controltwo{%
\pgf@x0.55228475pt\relax%
\pgf@x\sinquarterarc\pgf@x% k * sin(a/2)
\pgf@y-0.55228475pt\relax%
- \pgf@y\cosquarterarc\pgf@y% -k * cos(a/2)
+ \pgf@y\cosquarterarc\pgf@y% -k * cos(a/2)
%
% ...scale, rotate and shift.
%
@@ -1032,7 +1032,7 @@
%
% First control point for the second arc...
%
- \pgfextract@process\controlone{%
+ \pgfextract@process\controlone{%
\pgf@x0.55228475pt\relax%
\pgf@x\sinquarterarc\pgf@x% k * sin(a/2)
\pgf@y0.55228475pt\relax%
@@ -1055,11 +1055,11 @@
%
% Second control point for the second arc.
%
- \pgfextract@process\controltwo{%
+ \pgfextract@process\controltwo{%
\pgf@x0.55228475pt\relax%
\pgf@x\sinquarterarc\pgf@x% k * sin(a/2)
\pgf@y-0.55228475pt\relax%
- \pgf@y\cosquarterarc\pgf@y% -k * cos(a/2)
+ \pgf@y\cosquarterarc\pgf@y% -k * cos(a/2)
%
% ...scale, rotate and shift.
%
@@ -1095,7 +1095,7 @@
%
% Get the inner radii and trig. constants.
%
- \getradii%
+ \getradii%
%
%
%
@@ -1116,9 +1116,9 @@
\pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}%
\let\externalangle\pgfmathresult%
%
- % 1. Locate the correct puff:
+ % 1. Locate the correct puff:
%
- % Get end angle of the relavent puff arc.
+ % Get end angle of the relevant puff arc.
%
\pgfmathdivide@{\anglestep}{2}%
\let\halfanglestep\pgfmathresult%
@@ -1136,7 +1136,7 @@
\pgfmathadd@{\endangle}{\anglestep}%
\let\endangle\pgfmathresult%
%
- % Calculate the `miter point'. This is the point between
+ % Calculate the `miter point'. This is the point between
% each puff, and takes into account the outer sep.
%
\pgfextract@process\miterpoint{%
@@ -1210,12 +1210,12 @@
\pgfpointadd{\centerpoint}{%
\pgfpointpolar{+\startangle}{+\xinnerradius and +\yinnerradius}%
}%
- }%
+ }%
\pgfextract@process\arcendpoint{%
\pgfpointadd{\centerpoint}{%
\pgfpointpolar{+\endangle}{+\xinnerradius and +\yinnerradius}%
}%
- }%
+ }%
%
% Get some useful cloud parameters from \arcstartpoint and \arcendpoint.
%
@@ -1232,9 +1232,9 @@
\fi%
%
% 2. Locate the angle on the circular arc which forms the puff.
- %
- % Essentially a binary search to find the angle on the circular
- % arc, which provides the nearset estimate to the border point.
+ %
+ % Essentially a binary search to find the angle on the circular
+ % arc, which provides the nearest estimate to the border point.
%
\let\s\halfcomplementarc% The start of the arc.
\pgfmathadd@{\s}{\arc}%
@@ -1247,7 +1247,7 @@
\pgfmathadd@{\e}{\s}%
\pgfmathdivide@{\pgfmathresult}{2}%
\let\p\pgfmathresult% The point halfway between \s and \e.
- \ifdim\p pt=\s pt\relax%
+ \ifdim\p pt=\s pt\relax%
\else%
%
% Get the point on the circular arc.
@@ -1288,7 +1288,7 @@
\ifdim\pgfmathresult pt<\m pt\relax%
\let\m\pgfmathresult%
\let\n\p%
- \fi%
+ \fi%
\repeatpgfmathloop%
%
% Use the nearest estimate as the anchor angle.
@@ -1304,8 +1304,8 @@
\fi%
}% Again, Phew!
%
- % Now, a sneaky hack. This means an arbitrary `puff' anchors
- % can be used for positiong the cloud shape. This is needed
+ % Now, a sneaky hack. This means an arbitrary `puff' anchors
+ % can be used for positioning the cloud shape. This is needed
% if a cloud is positioned using the `puff <n+1>' anchor, where
% n is the number of puffs of any previously drawn cloud.
%
@@ -1319,12 +1319,12 @@
}%
}{\c@pgf@counta0\relax}%
\advance\c@pgf@counta-1\relax%
- \repeatpgfmathloop%
+ \repeatpgfmathloop%
}%
-}
+}%
% \pgf@sh@@cloudpuffanchor
-%
+%
% Internal macro for calculating the anchors puff 1, puff 2, ... etc.
%
\def\pgf@sh@@cloudpuffanchor#1{%
@@ -1352,7 +1352,7 @@
\pgfpointadd{\centerpoint}{%
\pgfpointpolar{+\angle}{+\xinnerradius and +\yinnerradius}%
}%
- }%
+ }%
%
% Get some useful cloud parameters from \arcstartpoint and \arcendpoint.
%
@@ -1365,11 +1365,11 @@
\pgfpointadd{\circlecenterpoint}{%
\pgfqpointpolar{\anchorangle}{\outerarcradius}%
}%
-}
+}%
% \pgf@sh@cloudpuffparameters
%
-% Internal macro to calculate some common arc parameters which
+% Internal macro to calculate some common arc parameters which
% are required when calculating radii, drawing the background
% path and calculating border anchors.
%
@@ -1411,7 +1411,7 @@
\pgfmathrotatepointaround{\circlecenterpoint}{\pgfpointorigin}{\arcslope}%
}%
}%
-}
+}%
@@ -1427,7 +1427,7 @@
%
\let\pgf@lib@sh@signal@direction=#2%
\edef\pgf@lib@sh@temp{#1}%
- \expandafter\pgf@lib@sh@signal@@parsedirection\pgf@lib@sh@temp\pgf@stop}
+ \expandafter\pgf@lib@sh@signal@@parsedirection\pgf@lib@sh@temp\pgf@stop}%
\def\pgf@lib@sh@signal@@parsedirection#1\pgf@stop{%
\pgfutil@in@{and}{#1}%
@@ -1436,7 +1436,7 @@
\else%
\pgf@lib@sh@signal@@@parsedirection#1 and #1\pgf@lib%
\fi
-}
+}%
\def\pgf@lib@sh@signal@@@parsedirection#1 and #2\pgf@lib{%
\pgfutil@in@{nowhere}{#1}%
\ifpgfutil@in@
@@ -1444,7 +1444,7 @@
\pgf@lib@sh@signal@@@@parsedirection{#1}%
\pgf@lib@sh@signal@@@@parsedirection{#2}%
\fi%
-}
+}%
\def\pgf@lib@sh@signal@@@@parsedirection#1{%
\pgfutil@in@{ #1 }{ east right }%
\ifpgfutil@in@%
@@ -1470,7 +1470,7 @@
\let\pgf@lib@sh@signal@east=\pgf@lib@sh@signal@nowhere%
\let\pgf@lib@sh@signal@west=\pgf@lib@sh@signal@nowhere%
\fi%
-}
+}%
% Keys for signal shape:
@@ -1478,8 +1478,8 @@
\pgfkeys{/pgf/.cd,
signal pointer angle/.initial=90,
signal to/.initial=east,
- signal from/.initial=nowhere
-}
+ signal from/.initial=nowhere,
+}%
\pgfdeclareshape{signal}{%
\savedmacro\installsignalparameters{%
@@ -1490,7 +1490,7 @@
\let\pgf@lib@sh@signal@west=\pgf@lib@sh@signal@nowhere%
%
\pgf@lib@sh@signal@parsedirection{\pgfkeysvalueof{/pgf/signal from}}{\pgf@lib@sh@signal@from}%
- \pgf@lib@sh@signal@parsedirection{\pgfkeysvalueof{/pgf/signal to}}{\pgf@lib@sh@signal@to}%
+ \pgf@lib@sh@signal@parsedirection{\pgfkeysvalueof{/pgf/signal to}}{\pgf@lib@sh@signal@to}%
%
% Define a centerpoint.
%
@@ -1531,7 +1531,7 @@
\fi%
\pgf@yc=\pgf@y%
%
- % Calculate the miter due to the line width, at the pointer apex...
+ % Calculate the miter due to the line width, at the pointer apex...
%
\pgf@x=\cosechalfpointerangle\pgf@y%
\edef\pointerapexmiter{\the\pgf@x}%
@@ -1559,7 +1559,7 @@
\pgfmathsubtract@{90}{\halfpointerangle}%
\pgfmathtan@{\pgfmathresult}%
\pgf@xb=\pgfmathresult\pgf@ya%
- %
+ %
% ...and up.
%
\pgf@yb=\pgfmathresult\pgf@xa%
@@ -1704,7 +1704,7 @@
\addtosavedmacro{\southeast}%
\addtosavedmacro{\northwest}%
%
- % Calculate the `miter vectors' (i.e. +outer sep).
+ % Calculate the `miter vectors' (i.e. +outer sep).
%
\pgfextract@process\northmiter{%
\pgf@x0pt%
@@ -1749,7 +1749,7 @@
\ifx\pgf@lib@sh@signal@east\pgf@lib@sh@signal@to%
\pgfqpointpolar{\complementquarterpointerangle}{\tocornermiter}%
\fi%
- \fi%
+ \fi%
\fi%
\ifx\pgf@lib@sh@signal@north\pgf@lib@sh@signal@from%
\pgfqpointpolar{\complementquarterpointerangle}{\fromcornermiter}%
@@ -1757,7 +1757,7 @@
\ifx\pgf@lib@sh@signal@north\pgf@lib@sh@signal@to%
\pgfqpointpolar{\quarterpointerangle}{\tocornermiter}%
\fi%
- \fi%
+ \fi%
}%
\pgfextract@process\southeastmiter{%
\ifx\pgf@lib@sh@signal@east\pgf@lib@sh@signal@nowhere%
@@ -1770,7 +1770,7 @@
\ifx\pgf@lib@sh@signal@east\pgf@lib@sh@signal@to%
\pgfqpointpolar{-\complementquarterpointerangle}{\tocornermiter}%
\fi%
- \fi%
+ \fi%
\fi%
\ifx\pgf@lib@sh@signal@south\pgf@lib@sh@signal@from%
\pgfqpointpolar{-\complementquarterpointerangle}{\fromcornermiter}
@@ -1778,7 +1778,7 @@
\ifx\pgf@lib@sh@signal@south\pgf@lib@sh@signal@to%
\pgfqpointpolar{-\quarterpointerangle}{\tocornermiter}%
\fi%
- \fi%
+ \fi%
}%
\pgfextract@process\southwestmiter{%
\ifx\pgf@lib@sh@signal@west\pgf@lib@sh@signal@nowhere%
@@ -1793,7 +1793,7 @@
\pgfmathadd@{\complementquarterpointerangle}{180}%
\expandafter\pgfqpointpolar\expandafter{\pgfmathresult}{\tocornermiter}%
\fi%
- \fi%
+ \fi%
\fi%
\ifx\pgf@lib@sh@signal@south\pgf@lib@sh@signal@from%
\pgfmathadd@{\complementquarterpointerangle}{180}%
@@ -1803,7 +1803,7 @@
\pgfmathadd@{\quarterpointerangle}{180}%
\expandafter\pgfqpointpolar\expandafter{\pgfmathresult}{\tocornermiter}%
\fi%
- \fi%
+ \fi%
}%
\pgfextract@process\northwestmiter{%
\ifx\pgf@lib@sh@signal@west\pgf@lib@sh@signal@nowhere%
@@ -1818,7 +1818,7 @@
\pgfmathsubtract@{180}{\complementquarterpointerangle}%
\expandafter\pgfqpointpolar\expandafter{\pgfmathresult}{\tocornermiter}%
\fi%
- \fi%
+ \fi%
\fi%
\ifx\pgf@lib@sh@signal@north\pgf@lib@sh@signal@from%
\pgfmathsubtract@{180}{\complementquarterpointerangle}%
@@ -1828,7 +1828,7 @@
\pgfmathsubtract@{180}{\quarterpointerangle}%
\expandafter\pgfqpointpolar\expandafter{\pgfmathresult}{\tocornermiter}%
\fi%
- \fi%
+ \fi%
}%
\addtosavedmacro{\northmiter}%
\addtosavedmacro{\southmiter}%
@@ -1872,7 +1872,7 @@
\addtosavedmacro{\anchornortheast}%
\addtosavedmacro{\anchorsouthwest}%
\addtosavedmacro{\anchorsoutheast}%
- \addtosavedmacro{\anchornorthwest}%
+ \addtosavedmacro{\anchornorthwest}%
}%
\savedanchor\centerpoint{%
\pgf@x.5\wd\pgfnodeparttextbox%
@@ -1912,7 +1912,7 @@
\let\secondpoint\anchornortheast%
\fi%
\pgfpointintersectionoflines{\basepoint}{\externalpoint}%
- {\firstpoint}{\secondpoint}%
+ {\firstpoint}{\secondpoint}%
}%
\anchor{base west}{%
\installsignalparameters%
@@ -1937,7 +1937,7 @@
\let\secondpoint\anchornorthwest%
\fi%
\pgfpointintersectionoflines{\basepoint}{\externalpoint}%
- {\firstpoint}{\secondpoint}%
+ {\firstpoint}{\secondpoint}%
}%
\anchor{mid}{\midpoint}%
\anchor{mid east}{%
@@ -1963,7 +1963,7 @@
\let\secondpoint\anchornortheast%
\fi%
\pgfpointintersectionoflines{\midpoint}{\externalpoint}%
- {\firstpoint}{\secondpoint}%
+ {\firstpoint}{\secondpoint}%
}%
\anchor{mid west}{%
\installsignalparameters%
@@ -1988,7 +1988,7 @@
\let\secondpoint\anchornorthwest%
\fi%
\pgfpointintersectionoflines{\midpoint}{\externalpoint}%
- {\firstpoint}{\secondpoint}%
+ {\firstpoint}{\secondpoint}%
}%
\anchor{north}{\installsignalparameters\anchornorth}%
\anchor{south}{\installsignalparameters\anchorsouth}%
@@ -2009,7 +2009,7 @@
\pgfpathlineto{\west}%
\pgfpathlineto{\northwest}%
\pgfpathclose%
- }
+ }%
\anchorborder{%
%
% Save x and y.
@@ -2017,7 +2017,7 @@
\edef\externalx{\the\pgf@x}%
\edef\externaly{\the\pgf@y}%
%
- % Adjust the location of the external
+ % Adjust the location of the external
% point relative to \centerpoint.
%
\centerpoint%
@@ -2105,14 +2105,14 @@
tape bend top/.initial=in and out,
tape bend bottom/.initial=in and out,
tape bend/.style={/pgf/tape bend top=#1, /pgf/tape bend bottom=#1},
- tape bend height/.initial=5pt
-}
+ tape bend height/.initial=5pt,
+}%
-\def\pgf@lib@sh@inandouttext{in and out}
-\def\pgf@lib@sh@outandintext{out and in}
-\def\pgf@lib@sh@nonetext{none}
+\def\pgf@lib@sh@inandouttext{in and out}%
+\def\pgf@lib@sh@outandintext{out and in}%
+\def\pgf@lib@sh@nonetext{none}%
-\pgfdeclareshape{tape}{
+\pgfdeclareshape{tape}{%
\savedmacro\tapedimensions{%
\pgfmathsetlength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}%
\advance\pgf@x.5\wd\pgfnodeparttextbox%
@@ -2159,7 +2159,7 @@
\ifx\bottombendstyle\pgf@lib@sh@nonetext%
\else%
\advance\pgf@y-\pgfutil@tempdima%
- \fi%
+ \fi%
%
\pgfutil@tempdima3.414213\pgfutil@tempdima% 1 / (1-sin(45))
\edef\bendyradius{\the\pgfutil@tempdima}%
@@ -2172,7 +2172,7 @@
\edef\innerbendyradius{\the\pgfutil@tempdima}%
\addtosavedmacro\innerbendyradius%
%
- \pgfutil@tempdima0.707106\pgf@x% cos(45)
+ \pgfutil@tempdima0.707106\pgf@x% cos(45)
\edef\bendxradius{\the\pgfutil@tempdima}%
\addtosavedmacro\bendxradius%
\advance\pgfutil@tempdima\outerxsep%
@@ -2213,20 +2213,20 @@
\let\cothalfangleout\pgfmathresult%
\addtosavedmacro\cothalfangleout%
%
- }
+ }%
\savedanchor{\centerpoint}{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y.5\ht\pgfnodeparttextbox%
- \advance\pgf@y-.5\dp\pgfnodeparttextbox%
- }
+ \advance\pgf@y-.5\dp\pgfnodeparttextbox%
+ }%
\savedanchor{\midpoint}{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgfmathsetlength\pgf@y{+0.5ex}%
- }
+ }%
\savedanchor{\basepoint}{%
\pgf@x.5\wd\pgfnodeparttextbox%
\pgf@y0pt%
- }
+ }%
\anchor{center}{\centerpoint}%
\anchor{mid}{\midpoint}%
\anchor{mid east}{\tapedimensions\midpoint\advance\pgf@x\outerhalfwidth}%
@@ -2236,30 +2236,30 @@
\anchor{base west}{\tapedimensions\basepoint\advance\pgf@x-\outerhalfwidth}%
\anchor{north}{%
\csname pgf@anchor@tape@north east\endcsname%
- \pgf@ya\pgf@y%
+ \pgf@ya\pgf@y%
\csname pgf@anchor@tape@north west\endcsname%
- \advance\pgf@ya\pgf@y%
+ \advance\pgf@ya\pgf@y%
\centerpoint%
\pgf@y.5\pgf@ya%
- }
+ }%
\anchor{south}{%
\csname pgf@anchor@tape@south east\endcsname%
- \pgf@ya\pgf@y%
+ \pgf@ya\pgf@y%
\csname pgf@anchor@tape@south west\endcsname%
- \advance\pgf@ya\pgf@y%
+ \advance\pgf@ya\pgf@y%
\centerpoint%
\pgf@y.5\pgf@ya%
- }
+ }%
\anchor{east}{%
\tapedimensions%
\centerpoint%
\advance\pgf@x\outerhalfwidth%
- }
+ }%
\anchor{west}{%
\tapedimensions%
\centerpoint%
\advance\pgf@x-\outerhalfwidth%
- }
+ }%
\anchor{north east}{%
\tapedimensions%
\centerpoint%
@@ -2268,15 +2268,15 @@
\pgf@yc\outerysep%
\ifx\topbendstyle\pgf@lib@sh@inandouttext%
\advance\pgf@y\halfbendheight%
- \advance\pgf@y\cothalfangleout\pgf@yc%
+ \advance\pgf@y\cothalfangleout\pgf@yc%
\else%
- \ifx\topbendstyle\pgf@lib@sh@outandintext%
+ \ifx\topbendstyle\pgf@lib@sh@outandintext%
\advance\pgf@y\halfbendheight%
- \advance\pgf@y\cothalfanglein\pgf@yc%
+ \advance\pgf@y\cothalfanglein\pgf@yc%
\else%
\advance\pgf@y\pgf@yc%
\fi%
- \fi%
+ \fi%
}%
\anchor{north west}{%
\tapedimensions%
@@ -2286,15 +2286,15 @@
\pgf@yc\outerysep%
\ifx\topbendstyle\pgf@lib@sh@inandouttext%
\advance\pgf@y\halfbendheight%
- \advance\pgf@y\cothalfanglein\pgf@yc%
+ \advance\pgf@y\cothalfanglein\pgf@yc%
\else%
\ifx\topbendstyle\pgf@lib@sh@outandintext%
\advance\pgf@y\halfbendheight%
- \advance\pgf@y\cothalfangleout\pgf@yc%
+ \advance\pgf@y\cothalfangleout\pgf@yc%
\else%
\advance\pgf@y\pgf@yc%
\fi%
- \fi%
+ \fi%
}%
\anchor{south east}{%
\tapedimensions%
@@ -2304,15 +2304,15 @@
\pgf@yc\outerysep%
\ifx\topbendstyle\pgf@lib@sh@outandintext%
\advance\pgf@y-\halfbendheight%
- \advance\pgf@y-\cothalfangleout\pgf@yc%
+ \advance\pgf@y-\cothalfangleout\pgf@yc%
\else%
- \ifx\topbendstyle\pgf@lib@sh@inandouttext%
+ \ifx\topbendstyle\pgf@lib@sh@inandouttext%
\advance\pgf@y-\halfbendheight%
- \advance\pgf@y-\cothalfanglein\pgf@yc%
+ \advance\pgf@y-\cothalfanglein\pgf@yc%
\else%
\advance\pgf@y-\pgf@yc%
\fi%
- \fi%
+ \fi%
}%
\anchor{south west}{%
\tapedimensions%
@@ -2322,24 +2322,24 @@
\pgf@yc\outerysep%
\ifx\topbendstyle\pgf@lib@sh@outandintext%
\advance\pgf@y-\halfbendheight%
- \advance\pgf@y-\cothalfanglein\pgf@yc%
+ \advance\pgf@y-\cothalfanglein\pgf@yc%
\else%
\ifx\topbendstyle\pgf@lib@sh@inandouttext%
\advance\pgf@y-\halfbendheight%
- \advance\pgf@y-\cothalfangleout\pgf@yc%
+ \advance\pgf@y-\cothalfangleout\pgf@yc%
\else%
\advance\pgf@y-\pgf@yc%
\fi%
- \fi%
+ \fi%
}%
\backgroundpath{%
\tapedimensions%
%
\pgf@xc\halfwidth%
- \pgf@yc\halfheight%
+ \pgf@yc\halfheight%
%
\pgf@xc\bendxradius%
- \pgf@yc\bendyradius%
+ \pgf@yc\bendyradius%
{%
\pgftransformshift{\centerpoint}%
\pgfpathmoveto{\pgfqpoint{-\halfwidth}{0pt}}%
@@ -2372,8 +2372,8 @@
\fi%
\fi%
\pgfpathclose%
- }%
- }
+ }%
+ }%
\anchorborder{%
\pgf@xa\pgf@x%
\pgf@ya\pgf@y%
@@ -2554,7 +2554,7 @@
\fi%
\fi%
}%
-}
+}%
@@ -2568,36 +2568,36 @@
\pgfkeys{/pgf/.cd,
magnifying glass handle angle/.initial=-45,
- magnifying glass handle aspect/.initial=1.5
-}
+ magnifying glass handle aspect/.initial=1.5,
+}%
\pgfdeclareshape{magnifying glass}
-{
- \inheritsavedanchors[from=circle] % this is nearly a circle
- \inheritanchorborder[from=circle]
- \inheritanchor[from=circle]{north}
- \inheritanchor[from=circle]{north west}
- \inheritanchor[from=circle]{north east}
- \inheritanchor[from=circle]{center}
- \inheritanchor[from=circle]{west}
- \inheritanchor[from=circle]{east}
- \inheritanchor[from=circle]{mid}
- \inheritanchor[from=circle]{mid west}
- \inheritanchor[from=circle]{mid east}
- \inheritanchor[from=circle]{base}
- \inheritanchor[from=circle]{base west}
- \inheritanchor[from=circle]{base east}
- \inheritanchor[from=circle]{south}
- \inheritanchor[from=circle]{south west}
- \inheritanchor[from=circle]{south east}
- \inheritbackgroundpath[from=circle]
+{%
+ \inheritsavedanchors[from=circle]% this is nearly a circle
+ \inheritanchorborder[from=circle]%
+ \inheritanchor[from=circle]{north}%
+ \inheritanchor[from=circle]{north west}%
+ \inheritanchor[from=circle]{north east}%
+ \inheritanchor[from=circle]{center}%
+ \inheritanchor[from=circle]{west}%
+ \inheritanchor[from=circle]{east}%
+ \inheritanchor[from=circle]{mid}%
+ \inheritanchor[from=circle]{mid west}%
+ \inheritanchor[from=circle]{mid east}%
+ \inheritanchor[from=circle]{base}%
+ \inheritanchor[from=circle]{base west}%
+ \inheritanchor[from=circle]{base east}%
+ \inheritanchor[from=circle]{south}%
+ \inheritanchor[from=circle]{south west}%
+ \inheritanchor[from=circle]{south east}%
+ \inheritbackgroundpath[from=circle]%
\foregroundpath{
\centerpoint%
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
\pgfutil@tempdima=\radius%
- \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
- \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
+ \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}%
+ \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}%
\ifdim\pgf@xb<\pgf@yb%
\advance\pgfutil@tempdima by-\pgf@yb%
\else%
@@ -2609,16 +2609,16 @@
{\pgfpointpolar{\pgfkeysvalueof{/pgf/magnifying glass handle angle}}{\pgfutil@tempdima+\pgfutil@tempdima*(\pgfkeysvalueof{/pgf/magnifying glass handle aspect})}}}
\pgfsetarrowsstart{}
\pgfsetarrowsend{}
- }
-}
+ }%
+}%
\pgfkeys{%
/pgf/magnetic tape tail/.initial=0.15,
/pgf/magnetic tape tail extend/.initial=0cm,
-}
-\pgfdeclareshape{magnetic tape}{
- \nodeparts{text}
+}%
+\pgfdeclareshape{magnetic tape}{%
+ \nodeparts{text}%
\savedmacro\installparameters{%
%
\pgf@x=0.5\wd\pgfnodeparttextbox%
@@ -2651,8 +2651,8 @@
\pgfmathparse{max(\pgfkeysvalueof{/pgf/magnetic tape tail extend},0)}%
\edef\tailextend{\pgfmathresult pt}%
%
- \pgfmathparse{min(max(\pgfkeysvalueof{/pgf/magnetic tape tail},0),1)}%
- \pgf@xa=\pgfmathresult\pgf@x%
+ \pgfmathparse{min(max(\pgfkeysvalueof{/pgf/magnetic tape tail},0),1)}%
+ \pgf@xa=\pgfmathresult\pgf@x%
\edef\tailheight{\the\pgf@xa}%
%
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
@@ -2689,38 +2689,38 @@
\addtosavedmacro\tailtopangle%
\addtosavedmacro\tailbottomangle%
\addtosavedmacro\centerpoint%
- }
- \savedanchor{\base}{\pgfqpoint{0.5\wd\pgfnodeparttextbox}{0pt}}
- \savedanchor{\mid}{\pgfqpoint{0.5\wd\pgfnodeparttextbox}{0pt}\pgfmathsetlength\pgf@y{.5ex}}
+ }%
+ \savedanchor{\base}{\pgfqpoint{0.5\wd\pgfnodeparttextbox}{0pt}}%
+ \savedanchor{\mid}{\pgfqpoint{0.5\wd\pgfnodeparttextbox}{0pt}\pgfmathsetlength\pgf@y{.5ex}}%
\anchor{center}{\installparameters\centerpoint}% \addtosavedmacro\outerradius%
- \anchor{base}{\base}
- \anchor{mid}{\mid}
- \anchor{base west}{\installparameters\pgfpointadd{\base}{\pgfqpoint{-\outerradius}{0pt}}}
- \anchor{base east}{\installparameters\pgfpointadd{\base}{\pgfqpoint{\outerradius}{0pt}}}
- \anchor{mid west}{\installparameters\pgfpointadd{\mid}{\pgfqpoint{-\outerradius}{0pt}}}
- \anchor{mid east}{\installparameters\pgfpointadd{\mid}{\pgfqpoint{\outerradius}{0pt}}}
+ \anchor{base}{\base}%
+ \anchor{mid}{\mid}%
+ \anchor{base west}{\installparameters\pgfpointadd{\base}{\pgfqpoint{-\outerradius}{0pt}}}%
+ \anchor{base east}{\installparameters\pgfpointadd{\base}{\pgfqpoint{\outerradius}{0pt}}}%
+ \anchor{mid west}{\installparameters\pgfpointadd{\mid}{\pgfqpoint{-\outerradius}{0pt}}}%
+ \anchor{mid east}{\installparameters\pgfpointadd{\mid}{\pgfqpoint{\outerradius}{0pt}}}%
\anchor{north}{\installparameters%
- \pgfpointadd{\centerpoint}{\pgfqpoint{0pt}{\outerradius}}}
+ \pgfpointadd{\centerpoint}{\pgfqpoint{0pt}{\outerradius}}}%
\anchor{north east}{\installparameters%
- \pgfpointadd{\centerpoint}{\pgfqpointpolar{45}{\outerradius}}}
+ \pgfpointadd{\centerpoint}{\pgfqpointpolar{45}{\outerradius}}}%
\anchor{south}{\installparameters%
- \pgfpointadd{\centerpoint}{\pgfqpoint{0pt}{-\outerradius}}}
+ \pgfpointadd{\centerpoint}{\pgfqpoint{0pt}{-\outerradius}}}%
\anchor{south east}{\installparameters%
- \pgfpointadd{\centerpoint}{\pgfqpoint{\outerradius}{-\outerradius}}}
+ \pgfpointadd{\centerpoint}{\pgfqpoint{\outerradius}{-\outerradius}}}%
\anchor{east}{\installparameters%
- \pgfpointadd{\centerpoint}{\pgfqpoint{\outerradius}{0pt}}}
+ \pgfpointadd{\centerpoint}{\pgfqpoint{\outerradius}{0pt}}}%
\anchor{south west}{\installparameters%
- \pgfpointadd{\centerpoint}{\pgfqpointpolar{225}{\outerradius}}}
+ \pgfpointadd{\centerpoint}{\pgfqpointpolar{225}{\outerradius}}}%
\anchor{west}{\installparameters%
- \pgfpointadd{\centerpoint}{\pgfqpoint{-\outerradius}{0pt}}}
+ \pgfpointadd{\centerpoint}{\pgfqpoint{-\outerradius}{0pt}}}%
\anchor{north west}{\installparameters%
- \pgfpointadd{\centerpoint}{\pgfqpointpolar{135}{\outerradius}}}
+ \pgfpointadd{\centerpoint}{\pgfqpointpolar{135}{\outerradius}}}%
\anchor{tail east}{\installparameters%
- \pgfpointadd{\centerpoint}{\pgfpoint{\radius+\tailextend+\outersep}{-\outerradius+\outersep+\tailheight/2}}}
+ \pgfpointadd{\centerpoint}{\pgfpoint{\radius+\tailextend+\outersep}{-\outerradius+\outersep+\tailheight/2}}}%
\anchor{tail south east}{\installparameters%
- \pgfpointadd{\centerpoint}{\pgfpoint{\radius+\tailextend+\outersep}{-\outerradius}}}
+ \pgfpointadd{\centerpoint}{\pgfpoint{\radius+\tailextend+\outersep}{-\outerradius}}}%
\anchor{tail north east}{\installparameters%
- \pgfpointadd{\centerpoint}{\pgfpoint{\radius+\tailextend+\outersep}{-\outerradius+\outersep+\tailheight+\outersep}}}
+ \pgfpointadd{\centerpoint}{\pgfpoint{\radius+\tailextend+\outersep}{-\outerradius+\outersep+\tailheight+\outersep}}}%
\backgroundpath{
%
\installparameters%
@@ -2733,7 +2733,7 @@
\pgfpathlineto{\pgfpoint{\radius+\tailextend}{-\radius+\tailheight}}%
\pgfpathclose%
}%
- }
+ }%
\anchorborder{%
\pgfextract@process\externalpoint{}%
\installparameters%
@@ -2742,34 +2742,34 @@
\pgfpointadd{\centerpoint}{%
\pgfpointborderellipse%
{\externalpoint}%
- {\pgfqpoint{\outerradius}{\outerradius}}%
+ {\pgfqpoint{\outerradius}{\outerradius}}%
}%
\else%
\ifdim\pgfmathresult pt<\tailbottomangle pt\relax%
\pgfpointadd{\centerpoint}{%
\pgfpointintersectionoflines%
{\externalpoint}{\pgfpointorigin}%
- {\pgfqpoint{0pt}{-\outerradius}}{\pgfqpoint{\outerradius}{-\outerradius}}%
+ {\pgfqpoint{0pt}{-\outerradius}}{\pgfqpoint{\outerradius}{-\outerradius}}%
}%
\else%
\ifdim\pgfmathresult pt<\tailtopangle pt\relax%
\pgfpointadd{\centerpoint}{%
\pgfpointintersectionoflines%
{\externalpoint}{\pgfpointorigin}%
- {\pgfqpoint{\outerradius}{\outerradius}}{\pgfqpoint{\outerradius}{-\outerradius}}%
+ {\pgfqpoint{\outerradius}{\outerradius}}{\pgfqpoint{\outerradius}{-\outerradius}}%
}%
\else%
\pgfpointadd{\centerpoint}{%
\pgfpointborderellipse%
{\externalpoint}%
- {\pgfqpoint{\outerradius}{\outerradius}}%
+ {\pgfqpoint{\outerradius}{\outerradius}}%
}%
\fi%
\fi%
\fi%
- }
-}
+ }%
+}%
% Local Variables:
% tab-width: 2
-% End: \ No newline at end of file
+% End:
diff --git a/Master/texmf-dist/tex/generic/pgf/lua/pgf/manual.lua b/Master/texmf-dist/tex/generic/pgf/lua/pgf/manual.lua
index 583777075df..7142eea3ec5 100644
--- a/Master/texmf-dist/tex/generic/pgf/lua/pgf/manual.lua
+++ b/Master/texmf-dist/tex/generic/pgf/lua/pgf/manual.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/lua/pgf/manual.lua,v 1.1 2013/05/23 20:01:29 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/lua/pgf/manual/DocumentParser.lua b/Master/texmf-dist/tex/generic/pgf/lua/pgf/manual/DocumentParser.lua
index 116809a473c..2f367dfdd4d 100644
--- a/Master/texmf-dist/tex/generic/pgf/lua/pgf/manual/DocumentParser.lua
+++ b/Master/texmf-dist/tex/generic/pgf/lua/pgf/manual/DocumentParser.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/lua/pgf/manual/DocumentParser.lua,v 1.3 2014/02/24 10:40:33 tantau Exp $
+-- @release $Header$
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
index 0c11f544594..fd3eea1b0bf 100644
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
@@ -7,17 +7,20 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ifx\pgfmathsetlength\undefined
+
+% Guard against reading twice
+\ifx\pgfmathloaded\pgfutil@undefined
+ \let\pgfmathloaded=\relax
\else
\expandafter\endinput
\fi
-\input pgfmathcalc.code.tex
-
-\ifx\pgfkeysloaded\undefined
- \let\pgfkeysloaded=\relax
-\else
- \expandafter\input pgfmathfloat.code.tex
+% We need keys:
+\ifx\pgfkeysloaded\pgfutil@undefined
+ \input pgfkeys.code.tex
\fi
+\input pgfmathcalc.code.tex
+\input pgfmathfloat.code.tex
+
\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex
index 34a5e406a68..006d6ea4046 100644
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex
@@ -805,7 +805,7 @@
}
\newif\ifpgfmathfloatround@allow@empty@mantissa
-\def\pgfmathfloatround@mantissa@ONE{1.0}%
+\def\pgfmathfloatround@mantissa@ONE{1pt }%
% #1: sign
% #2: mantissa
@@ -821,10 +821,38 @@
\ifcase#1\relax
\pgfmathprintnumber@fixed@style{#2}#1#2e0\relax%
\expandafter\pgfmathfloatrounddisplaystyle@shared@impl@\expandafter{\pgfmathresult}{#4#6}%
- \or\pgfmathprintnumber@fixed@style{#2}#1#2e0\relax%
- \expandafter\pgfmathfloatrounddisplaystyle@shared@impl@\expandafter{\pgfmathresult}{#4#6}%
- \or\pgfmathprintnumber@fixed@style{-#2}#1#2e0\relax%
- \expandafter\pgfmathfloatrounddisplaystyle@shared@impl@\expandafter{\pgfmathresult}{#4#6}%
+ \or
+ \def\pgfmathfloat@loc@TMPa{1}% "should draw mantissa=1"
+ \ifpgfmathfloatround@allow@empty@mantissa
+ \else
+ \ifdim#2pt=\pgfmathfloatround@mantissa@ONE
+ \def\pgfmathfloat@loc@TMPa{0}% do not draw it.
+ \fi
+ \fi
+ %
+ \if1\pgfmathfloat@loc@TMPa
+ \pgfmathprintnumber@fixed@style{#2}#1#2e0\relax%
+ \expandafter\pgfmathfloatrounddisplaystyle@shared@impl@\expandafter{\pgfmathresult}{#4#6}%
+ \else
+ \def\pgfmathfloat@loc@TMPa{0}%
+ \pgfmathfloatrounddisplaystyle@shared@impl@{#5}{#6}%
+ \fi
+ \or
+ \def\pgfmathfloat@loc@TMPa{1}% "should draw mantissa=1"
+ \ifpgfmathfloatround@allow@empty@mantissa
+ \else
+ \ifdim#2pt=\pgfmathfloatround@mantissa@ONE
+ \def\pgfmathfloat@loc@TMPa{0}% do not draw it.
+ \fi
+ \fi
+ %
+ \if1\pgfmathfloat@loc@TMPa
+ \pgfmathprintnumber@fixed@style{-#2}#1#2e0\relax%
+ \expandafter\pgfmathfloatrounddisplaystyle@shared@impl@\expandafter{\pgfmathresult}{#4#6}%
+ \else
+ \def\pgfmathfloat@loc@TMPa{0}%
+ \pgfmathfloatrounddisplaystyle@shared@impl@{-#5}{#6}%
+ \fi
\or
\pgfmathfloatrounddisplaystyle@shared@impl@@{\hbox{NaN}}{}%
\or
@@ -1049,8 +1077,15 @@
@sci exponent mark=,
}%
},
-% sci may skip mantissa/.is if=pgfmathfloatround@allow@empty@mantissa,
-% sci may skip mantissa/.default=true,
+ retain unit mantissa/.is if=pgfmathfloatround@allow@empty@mantissa,
+ retain unit mantissa/.default=true,
+ retain unit mantissa=true,
+ %
+ % allows to replace the implementation, for example
+ % 'implementation=\num'. This is experimental -- it is inclear
+ % if all consumers work well since they rely on the keys in
+ % /pgf/number format.
+ implementation/.code={\def\pgfmathprintnumber@protected{#1}},
}
@@ -1121,7 +1156,7 @@
}
\def\pgfmathprintnumber@RELATIVE@choice@roundtofixed@warn{%
- \immediate\write16{! Package pgf warning: the use of /pgf/number format/relative is discouraged (buggy). Please use 'relative*' instead or type \string\pgfkeys{/pgf/number format/relative round mode=fixed} into your preamble.}%
+ \pgf@typeout{! Package pgf warning: the use of /pgf/number format/relative is discouraged (buggy). Please use 'relative*' instead or type \string\pgfkeys{/pgf/number format/relative round mode=fixed} into your preamble.}%
\global\let\pgfmathprintnumber@RELATIVE@choice@roundtofixed@warn=\relax
}
@@ -1389,7 +1424,7 @@
\ifnum\pgfmathresultdenom>1000
\pgfutil@ifundefined{FPdiv}{%
\pgfmathfloattosci@\pgfmathfloat@arg
- \immediate\write16{! Package pgf /pgf/number format/frac warning=true: /pgf/number format/frac of `\pgfmathresult' = \the\pgfmathresultnumerator\space / \the\pgfmathresultdenom\space might be large due to instabilities. Try \string\usepackage{fp} to improve accuracy.}%
+ \pgf@typeout{! Package pgf /pgf/number format/frac warning=true: /pgf/number format/frac of `\pgfmathresult' = \the\pgfmathresultnumerator\space / \the\pgfmathresultdenom\space might be large due to instabilities. Try \string\usepackage{fp} to improve accuracy.}%
}{}%
\fi
\fi
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics.code.tex
index f11704c94c2..9094da50dc9 100644
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics.code.tex
@@ -121,4 +121,4 @@
\pgfmath@smuggleone\pgfmathresult
\endgroup}
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex
index 03f9ca270ae..07f7b8b6d90 100644
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex
@@ -39,17 +39,28 @@
\pgfmathdeclarefunction{floor}{1}{%
\begingroup%
\expandafter\pgfmath@x#1pt\relax%
- \afterassignment\pgfmath@gobbletilpgfmath@%
- \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@%
+ \afterassignment\pgfmathfloor@collect@remainder%
+ \expandafter\c@pgfmath@counta\the\pgfmath@x\pgfmath@%
\expandafter\pgfmath@x#1pt\relax%
\ifdim\pgfmath@x<0pt\relax%
- \advance\c@pgfmath@counta by -1\relax%
+ \ifdim\pgfmathfloor@remainder>0pt
+ \advance\c@pgfmath@counta by -1\relax%
+ \else
+ % ok, we stripped only '0'.
+ \fi
\fi%
\pgfmath@x\c@pgfmath@counta pt\relax%
\pgfmath@returnone\pgfmath@x%
\endgroup%
}%
+\def\pgfmathfloor@collect@remainder#1\pgfmath@{%
+ \def\pgfmathfloor@remainder{#1}%
+ \ifx\pgfmathfloor@remainder\pgfutil@empty
+ \def\pgfmathfloor@remainder{0}%
+ \fi
+}%
+
% ceil function.
%
\pgfmathdeclarefunction{ceil}{1}{%
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
index e2c78d1fdf4..0ede2314cfe 100644
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
@@ -160,6 +160,24 @@
\def\pgfmathresultunitscale{1}
+
+% A utility function which evaluates expression '#1' and invokes '#2'
+% if the expression is true and '#3' if it is false.
+\def\pgfmathifexpression#1#2#3{%
+ \pgfmathparse{#1}%
+ \pgfmath@iftrue{#2}{#3}%
+}%
+% Executes '#1' if \pgfmathresult is 'true', '#2' otherwise.
+% WARNING : overwritten in fpu lib!
+\def\pgfmath@iftrue{%
+ \ifdim\pgfmathresult pt=1.0pt %
+ \let\pgfmath@next=\pgfutil@firstoftwo
+ \else
+ \let\pgfmath@next=\pgfutil@secondoftwo
+ \fi
+ \pgfmath@next%
+}%
+
% Stuff for compatability with the calc package.
%
\def\pgfmath@calc@real#1{#1}
@@ -261,6 +279,10 @@
\fi
\pgfmath@parse@next}
+% TT: If false, octal parsing is switched off (needed for time parsing)
+\newif\ifpgfmath@octalparsing
+\pgfmath@octalparsingtrue
+
% I (CJ) *think* it replaces |{| and |}| by |\pgfmath@bgroup| and
% |\pgfmath@egroup|?
\def\pgfmath@parse@@@ifbgroup#1{%
@@ -312,7 +334,9 @@
\let\pgfmath@base=\pgfmath@empty%
\let\pgfmath@token@next=\pgfmath@token%
\if#10% Check for octal prefix.
- \def\pgfmath@base{8}%
+ \ifpgfmath@octalparsing%
+ \def\pgfmath@base{8}%
+ \fi%
\fi%
\let\pgfmath@parse@next=\pgfmath@parse@number%
\else%
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleanimations.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleanimations.code.tex
new file mode 100644
index 00000000000..4860107d1c2
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleanimations.code.tex
@@ -0,0 +1,1314 @@
+% Copyright 2015 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS{pgfmoduleanimations.code.tex}
+
+
+% We need the animation system abstraction:
+
+\input pgfsysanimations.code.tex
+
+
+% Animate an attribute over time
+%
+% #1 = an attribute
+% #2 = configuration keys
+%
+% This command adds animation commands for the attribute given in #1
+% of some future object to the current graphic scope. For instance,
+% when #1 is "fill opacity" then the fill opacity of the object will
+% change over time. The object to which the command refers is
+% specified using a special key in #2.
+%
+% The keys in #2 specify how the changes occur over time. There are a
+% number of keys that have an effect on the animation "as a whole"
+% (like "repeats") while the most central key is the entry key. This
+% key takes two parameters: a time and a value. It specifies that at
+% the given time the attribute should have the specified value. The
+% times must be given in ascending order. Between the times given in
+% this way, the values of the attribute will be interpolated; you can
+% influence the details of how this interpolation is done using
+% additional keys.
+%
+% The keys in #2 are given in key-value syntax and can be given in any
+% order, except that the entry keys must be given in order of
+% ascending times.
+%
+% The syntax of the second parameter of the entry key depends on
+% #1. Currently, these are:
+%
+% Attribute Value Type
+% ---------------------------------------
+% fill opacity scalar
+% stroke opacity scalar
+% opacity scalar
+% visible boolean
+% line width dimension
+% fill color
+% stroke color
+% motion motion
+% translate point
+% scale scaling
+% rotate scalar
+% xskew scalar
+% yskew scalar
+% path path
+% softpath softpath
+% view viewbox
+% dash phase dimension
+% dash pattern dashpattern
+% none any
+%
+% Example:
+%
+% \pgfanimateattribute{fill opacity}{entry={0s}{1}, entry={2s}{0}}
+
+\def\pgfanimateattribute#1#2{%
+ \pgfanimateattributecode{#1}{\pgfkeys{/pgf/animation/.cd,#2}}%
+}
+
+
+% Variant of \pgfanimateattribute
+%
+% #1 = attribute
+% #2 = code
+%
+% Description:
+%
+% A version of \pgfanimateattribute where instead of keys #2 you
+% provide a code #2 that calls the animation keys itself.
+
+\def\pgfanimateattributecode#1#2{%
+ {%
+ \pgfkeys{/pgf/@animation attributes/.cd,#1}%
+ #2%
+ \csname pgf@animation@check@\pgf@animation@attribute\endcsname%
+ \pgfsysanimate{\pgf@animation@attribute}%
+ }%
+}
+
+
+
+% Create a time snapshot
+%
+% #1 = a time
+%
+% Description:
+%
+% This command should be called in a scope prior to all calls of
+% animation commands in that scope. When called, all animations will
+% be "intercepted" and, instead of creating the animation code, normal
+% code will be generated that shows the state of the animation at the
+% specified "moment" #1. Since no animation code is involved, this
+% works with all drivers.
+%
+% The command \pgfsnapshotafter works the same way as \pgfsnapshot,
+% only the timing is slightly different: Conceptually, #1 is
+% interpreted as "#1+epsilon". For instance, if there are two values
+% specified for the time #1, then \pgfsnapshot will use the first
+% while \pgfsnapshotafter will use the second. Likewise, when an
+% animation ends at time #1, \pgfsnapshot will still us the
+% animation's value, while \pgfsnapshotafter will not.
+%
+% Example:
+%
+% {
+% \pgfsnapshot{1.2s}
+% \pgfanimateattribute{fill opacity}{entry={0s}{1}, entry={2s}{0}}
+% \fill (0,0) rectangle (1,1);
+% }
+
+\def\pgfsnapshot#1{\pgfparsetime{#1}\expandafter\pgfsysanimsnapshot\expandafter{\pgftimeresult}}
+\def\pgfsnapshotafter#1{\pgfparsetime{#1}\expandafter\pgfsysanimsnapshotafter\expandafter{\pgftimeresult}}
+
+
+% The animation attributes
+
+\pgfkeys{/pgf/@animation attributes/.cd,
+ visible/.code=\pgf@animate@attr{visibility}{mapped}\def\pgf@anim@map@true{visible}\def\pgf@anim@map@false{hidden},
+ stage/.code=\pgf@animate@attr{visibility}{mapped}\def\pgf@anim@map@true{visible}\def\pgf@anim@map@false{hidden}\pgfsysanimkeybase\pgfsysanimvaltext{hidden},
+ opacity/.code=\pgf@animate@attr{opacity}{scalar},
+ fill opacity/.code=\pgf@animate@attr{fillopacity}{scalar},
+ draw opacity/.code=\pgf@animate@attr{strokeopacity}{scalar},
+ stroke opacity/.style=draw opacity,
+ line width/.code=\pgf@animate@attr{linewidth}{dimension},
+ fill/.code=\pgf@animate@attr{fillcolor}{color},
+ draw/.code=\pgf@animate@attr{strokecolor}{color},
+ color/.code=\pgf@animate@attr{color}{color},
+ stroke/.style=draw,
+ motion/.code=\pgf@animate@attr{motion}{scalar},
+ translate/.code=\pgf@animate@attr{translate}{point},
+ scale/.code=\pgf@animate@attr{scale}{scaling},
+ rotate/.code=\pgf@animate@attr{rotate}{scalar},
+ xskew/.code=\pgf@animate@attr{skewx}{scalar},
+ yskew/.code=\pgf@animate@attr{skewy}{scalar},
+ skew x/.style=xskew,
+ skew y/.style=yskew,
+ path/.code=\pgf@animate@attr{path}{path},
+ softpath/.code=\pgf@animate@attr{path}{softpath},
+ view/.code=\pgf@animate@attr{viewbox}{viewbox},
+ dash/.code=\pgf@animate@attr{dash}{dash},
+ none/.code=\pgf@animate@attr{none}{none},
+}
+
+\def\pgf@animate@attr#1#2{%
+ \def\pgf@animation@attribute{#1}%
+ \expandafter\let\expandafter\pgfanim@type@parser\csname pgfanim@parse@type@#2\endcsname%
+}
+
+
+
+% The time parser
+%
+% #1 = a time
+%
+% This macro parses the time in #1, but adds some support for times:
+%
+% 1) The postfix operator "s" is added, which has no effect.
+% 2) The postfix operator "ms" is added, which devides a number by
+% 1000, so "2ms" equals "0.002".
+% 3) The postfix operator "min" is added, which multiplies a number by
+% 60.
+% 4) The postfix operator "h" is added, which multiplies a number by
+% 3600.
+% 5) The infix operator ":" is redefined, so that it multiplies its
+% first argument by 60 and adds the second. This implies that
+% "1:20" equals "80" and "01:00:00" equals "3600".
+% 6) The parsing of octal numbers is switched off to allow things like
+% "01:08" for 68s.
+
+\def\pgfparsetime#1{%
+ \begingroup%
+ \pgfmathdeclareoperator{s}{@seconds}{1}{postfix}{600}%
+ \pgfmathdeclareoperator{m}{m@encountered}{1}{postfix}{600}%
+ \pgfmathdeclareoperator{i}{i@encountered}{1}{postfix}{600}%
+ \pgfmathdeclareoperator{n}{@minutes}{1}{postfix}{600}%
+ \pgfmathdeclareoperator{h}{@hours}{1}{postfix}{600}%
+ \pgfmathdeclareoperator{:}{time@colon}{2}{infix}{50}%
+ \pgfmath@octalparsingfalse%
+ \pgfmathparse{#1}%
+ \expandafter\endgroup%
+ \expandafter\def\expandafter\pgftimeresult\expandafter{\pgfmathresult}%
+}
+
+\newif\ifpgfanim@m@encountered
+\newif\ifpgfanim@i@encountered
+\pgfmathdeclarefunction{@seconds}{1}{%
+ \begingroup%
+ \expandafter\pgfmath@x#1pt\relax%
+ \ifpgfanim@m@encountered%
+ \divide\pgfmath@x by1000\relax%
+ \fi%
+ \global\pgfanim@m@encounteredfalse%
+ \pgfmath@returnone\pgfmath@x%
+ \endgroup%
+}%
+\pgfmathdeclarefunction{m@encountered}{1}{%
+ \global\pgfanim@m@encounteredtrue%
+ \begingroup%
+ \expandafter\pgfmath@x#1pt\relax%
+ \pgfmath@returnone\pgfmath@x%
+ \endgroup%
+}%
+\pgfmathdeclarefunction{i@encountered}{1}{%
+ \ifpgfanim@m@encountered%
+ \global\pgfanim@m@encounteredfalse%
+ \global\pgfanim@i@encounteredtrue%
+ \else%
+ \pgfmath@error{Unexpected i}{}%
+ \fi%
+ \begingroup%
+ \expandafter\pgfmath@x#1pt\relax%
+ \pgfmath@returnone\pgfmath@x%
+ \endgroup%
+}%
+\pgfmathdeclarefunction{@minutes}{1}{%
+ \ifpgfanim@i@encountered%
+ \global\pgfanim@i@encounteredfalse%
+ \else%
+ \pgfmath@error{Unexpected n}{}%
+ \fi%
+ \begingroup%
+ \expandafter\pgfmath@x#1pt\relax%
+ \pgfmath@x60\pgfmath@x\relax%
+ \pgfmath@returnone\pgfmath@x%
+ \endgroup%
+}%
+\pgfmathdeclarefunction{@hours}{1}{%
+ \begingroup%
+ \expandafter\pgfmath@x#1pt\relax%
+ \pgfmath@x3600\pgfmath@x\relax%
+ \pgfmath@returnone\pgfmath@x%
+ \endgroup%
+}%
+\pgfmathdeclarefunction{time@colon}{2}{%
+ \begingroup%
+ \pgfmath@x=#1pt\relax%
+ \pgfmath@x=60\pgfmath@x\relax%
+ \pgfmath@y=#2pt\relax%
+ \advance\pgfmath@x by\pgfmath@y%
+ \pgfmath@returnone\pgfmath@x%
+ \endgroup%
+}
+
+
+
+% Sets general animation attributes
+%
+% #1 = key-value pairs that are executed for the path /pgf/animation/
+
+\def\pgfanimationset{\pgfqkeys{/pgf/animation}}
+
+
+% Sets the target animation scope that should be animated.
+%
+% #1 = A name that will be used with an idscope.
+%
+% Example:
+%
+% \pgfanimateattribute{fill opacity}{whom=some scope, entry={0s}{1}, entry={1s}{0}}
+% \begin{scope}[name=some scope]
+% \draw (0,0) -- (1,1);
+% \draw (1,0) -- (2,1);
+% \end{scope}
+
+\pgfanimationset{
+ whom/.code={%
+ \pgf@anim@decomp{#1}%
+ \pgfidrefnextuse\pgf@anim@id\pgf@anim@id@name%
+ \expandafter\expandafter\expandafter\pgfsysanimkeywhom\expandafter\expandafter\expandafter{\expandafter\pgf@anim@id\expandafter}\expandafter{\pgf@anim@type}%
+ \let\pgf@anim@whom@id\pgf@anim@id%
+ \let\pgf@anim@whom@type\pgf@anim@type%
+ }
+}
+
+\def\pgf@anim@decomp#1{%
+ \edef\pgf@temp{#1}%
+ \expandafter\pgfutil@in@\expandafter.\expandafter{\pgf@temp}%
+ \ifpgfutil@in@%
+ \expandafter\pgf@anim@decomp@\pgf@temp\pgf@stop%
+ \else%
+ \expandafter\pgf@anim@decomp@\pgf@temp.\pgf@stop%
+ \fi%
+}
+\def\pgf@anim@decomp@#1.#2\pgf@stop{%
+ \def\pgf@anim@id@name{#1}%
+ \def\pgf@anim@type{#2}%
+}
+
+
+% Assigns a name to this animation so that it can be used as an event
+% id in another animation
+%
+% #1 = A name
+%
+% The name "previous" is special and always refers to the most recent
+% animation before the animation currently being constructed.
+%
+% Example:
+%
+% \pgfanimateattribute{fill opacity}{name=anim 1, entry={0s}{1}, entry={1s}{0}}
+% \pgfanimateattribute{fill opacity}{begin on={end,of=anim 1}, entry={0s}{1}, entry={1s}{0}}
+
+\pgfanimationset{
+ name/.code=\pgfuseid{#1}
+}
+
+
+
+
+% Configures whether an animation can be restarted
+%
+% Some animations can restart when certain events take place. This key
+% configures this. Setting it to
+%
+% "true" allows a restart at any time,
+% "false" does not allow a restart,
+% "when not active" allows a restart only, when the element is not
+% active.
+%
+% Example:
+%
+% \pgfanimateattribute{fill opacity}{entry={0s}{1}, entry={1s}{0}, restart=false}
+
+\pgfanimationset{
+ restart/.is choice,
+ restart/.default=true,
+ restart/true/.code=\pgfsysanimkeyrestartalways,
+ restart/false/.code=\pgfsysanimkeyrestartnever,
+ restart/never/.code=\pgfsysanimkeyrestartnever,
+ restart/when not active/.code=\pgfsysanimkeyrestartwhennotactive
+}
+
+
+% Sets the number times an animation should repeat
+%
+% #1 = A string of the following form:
+%
+% [<empty> | <number> | for <time>] ["accumulating"]
+%
+% When empty (the default value) the animation repeats forever.
+%
+% When a <number> is provided, the animation will repeat <number>
+% times, which need not be an integer.
+%
+% When a <time> is given, the repeating will stop after this much time.
+%
+% When the optional "accumulating" is specified, the repeat
+% accumulates, otherwise each repeat begins with the original start
+% value.
+%
+% Example:
+%
+% \pgfanimateattribute{fill opacity}{repeats, entry={0s}{1}, entry={6s}{0}}
+% \pgfanimateattribute{fill opacity}{repeats=2, entry={0s}{1}, entry={6s}{0}}
+% \pgfanimateattribute{fill opacity}{repeats=2 accumulating, entry={0s}{1}, entry={6s}{0}}
+% \pgfanimateattribute{fill opacity}{repeats=for 15s, entry={0s}{1}, entry={6s}{0}}
+
+\pgfanimationset{
+ repeats/.code={%
+ \pgfutil@in@{accumulating\pgf@stop}{#1\pgf@stop}%
+ \ifpgfutil@in@%
+ \pgfsysanimkeyaccumulate%
+ \pgfanim@parse@acc#1\pgf@stop%
+ \else%
+ \pgfsysanimkeynoaccumulate%
+ \pgfanim@parse@noacc{#1}%
+ \fi%
+ },
+ repeats/.default=,
+ repeat/.style={repeats={#1}},
+ repeat/.default=,
+}
+\def\pgfanim@parse@acc#1accumulating\pgf@stop{%
+ \pgfanim@parse@noacc{#1}%
+}
+\def\pgfanim@parse@noacc#1{%
+ \pgfutil@in@{\pgf@stop for}{\pgf@stop#1}%
+ \ifpgfutil@in@%
+ \pgfanim@parse@for#1\pgf@stop%
+ \else%
+ \def\pgf@temp{#1}%
+ \ifx\pgf@temp\pgfutil@empty%
+ \pgfsysanimkeyrepeatindefinite%
+ \else%
+ \pgfmathparse{#1}%
+ \expandafter\pgfsysanimkeyrepeat\expandafter{\pgfmathresult}%
+ \fi%
+ \fi%
+}
+\def\pgfanim@parse@for for#1\pgf@stop{\pgfparsetime{#1}\expandafter\pgfsysanimkeyrepeatdur\expandafter{\pgftimeresult}}
+
+
+
+
+
+% Specifies that an animation should begin or end at a certain time
+% (relative to the current context). The "begin..." options may be
+% used multiple times and their effects accumulate, likewise for the
+% "end..." options.
+%
+% #1 = A time
+%
+% Example:
+%
+% \pgfanimateattribute{fill opacity}{begin=2s, end=2.5s, entry={0s}{1}, entry={1s}{0}}
+
+\pgfanimationset{
+ begin/.code=\pgfparsetime{#1}\expandafter\pgfsysanimkeyoffset\expandafter{\pgftimeresult}{begin},
+ end/.code=\pgfparsetime{#1}\expandafter\pgfsysanimkeyoffset\expandafter{\pgftimeresult}{end},
+}
+
+
+
+% Specifies that an animation should begin (or end) when a certain
+% event takes place.
+%
+% #1 = A list of key-value pairs.
+%
+% The following keys are allowed:
+%
+% event=some event : The begin / end is triggered by that event. The
+% list of allowed events is defined in the SVG
+% standard.
+% of=some name : The event does not refer to the current group,
+% but to the object named "some name", which must
+% previously have been named \pgfuseid. If some
+% name contains a period, the part before the
+% period must be the name of the id, the part
+% following it the type of the id.
+% key=some key : The trigger is some key being pressed
+% repeat=number : The trigger is that an animation has been
+% repeated number times.
+% delay=time : A delay, may be negative.
+%
+% These keys are executed with the path prefix /pgf/animation/events.
+%
+% Some of them are predefined:
+%
+% "click" is a shorthand for "event=click"
+% "focus in" is a shorthand for "event=focusin"
+% "focus out" is a shorthand for "event=focusout"
+% "activate" is a shorthand for "event=activate"
+% "mouse down" is a shorthand for "event=mousedown"
+% "mouse up" is a shorthand for "event=mouseup"
+% "mouse over" is a shorthand for "event=mouseover"
+% "mouse move" is a shorthand for "event=mousemove"
+% "mouse out" is a shorthand for "event=mouseout"
+% "begin" is a shorthand for "event=begin"
+% "end" is a shorthand for "event=end"
+%
+% Example:
+%
+% % Begin after 5s or when clicked:
+% \pgfanimateattribute{fill opacity}{begin=5s, begin on=click, entry={0s}{1}, entry={1s}{0}}
+%
+% % Begin, when an object named "button" is clicked
+% \pgfanimateattribute{fill opacity}{begin on={click, of=button}, entry={0s}{1}, entry={1s}{0}, name=another animation}
+%
+% % Begin 1s after some other animation ends
+% \pgfanimateattribute{fill opacity}{begin on={end, of=another animation, delay=1s}, entry={0s}{1}, entry={1s}{0}}
+
+\pgfanimationset{
+ begin on/.code={\pgfanim@make@event{#1}{begin}},%
+ end on/.code={\pgfanim@make@event{#1}{end}}
+}
+
+\def\pgfanim@make@event#1#2{%
+ \let\pgfanim@event@event\pgfutil@empty%
+ \let\pgf@anim@id\pgfutil@empty%
+ \let\pgf@anim@type\pgfutil@empty%
+ \let\pgfanim@event@key\pgfutil@empty%
+ \let\pgfanim@event@repeat\pgfutil@empty%
+ \let\pgfanim@event@delay\pgfutil@empty%
+ \pgfkeys{/pgf/animation/events/.cd,#1}%
+ \ifx\pgfanim@event@key\pgfutil@empty%
+ \ifx\pgfanim@event@repeat\pgfutil@empty%
+ \ifx\pgfanim@event@event\pgfutil@empty%
+ \pgferror{No event specified}%
+ \else%
+ \pgfsysanimkeyevent{\pgf@anim@id}{\pgf@anim@type}{\pgfanim@event@event}{\pgfanim@event@delay}{#2}%
+ \fi%
+ \else%
+ \pgfsysanimkeyrepeatevent{\pgf@anim@id}{\pgf@anim@type}{\pgfanim@event@repeat}{\pgfanim@event@delay}{#2}%
+ \fi%
+ \else%
+ \pgfsysanimkeyaccesskey{\pgfanim@event@key}{\pgfanim@event@delay}{#2}%
+ \fi%
+}
+
+\pgfkeys{/pgf/animation/events/.cd,
+ event/.store in=\pgfanim@event@event,
+ of/.code={%
+ \pgf@anim@decomp{#1}%
+ \pgfidrefprevuse\pgf@anim@id\pgf@anim@id@name%
+ \ifx\pgf@anim@id\pgfutil@empty%
+ \pgferror{Unknown object/node name '\pgf@anim@id@name'. Did you
+ mean 'of next=\pgf@anim@id@name'?}%
+ \fi%
+ },
+ of next/.code={%
+ \pgf@anim@decomp{#1}%
+ \pgfidrefnextuse\pgf@anim@id\pgf@anim@id@name%
+ },
+ of id/.code=\def\pgf@anim@id{#1},
+ key/.store in=\pgfanim@event@key,
+ repeat/.code=\pgfmathparse{#1}\let\pgfanim@event@repeat\pgfmathresult,
+ delay/.code=\pgfparsetime{#1}\let\pgfanim@event@delay\pgftimeresult,
+ click/.style={event=click},
+ focus in/.style={event=focusin},
+ focus out/.style={event=focusout},
+ mouse down/.style={event=mousedown},
+ mouse up/.style={event=mouseup},
+ mouse over/.style={event=mouseover},
+ mouse move/.style={event=mousemove},
+ mouse out/.style={event=mouseout},
+ begin/.style={event=begin},
+ end/.style={event=end}
+}
+
+
+% Specifies the timeline start for a snapshot
+%
+% #1 = a time
+%
+% Description:
+%
+% What a snapshot is taken of an animation (using \pgfsnapshot), all
+% animations normally start at time 0s. When this key is used, the
+% animation's timeline start is considered to be at moment #1
+% instead.
+
+\pgfanimationset{
+ begin snapshot/.code=
+ \pgfparsetime{#1}\expandafter\pgfsysanimkeysnapshotstart\expandafter{\pgftimeresult}
+}
+
+
+% Specifies the origin for tranforming animations
+%
+% #1 = a pgf point
+%
+% Specifies the origin of transformations (for instance, a rotate will
+% rotate around this point).
+%
+% Example:
+%
+% \pgfanimateattribute{rotate}{entry={0s}{0}, entry={1s}{90}, origin=\pgfpoint{1cm}{1cm}}
+
+\pgfanimationset{
+ origin/.code={%
+ \pgf@process{#1}%
+ \edef\pgf@marshal{%
+ \noexpand\pgfsysanimkeycanvastransform%
+ {\noexpand\pgftransformshift{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}{\noexpand\pgflowlevelsynccm}}%
+ {\noexpand\pgftransforminvert\noexpand\pgflowlevelsynccm}%
+ \noexpand\pgf@anim@save@transform{\noexpand\pgftransformshift{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}%
+ }%
+ \pgf@marshal%
+ }
+}
+
+\pgfsysanimkeycanvastransform{{\pgflowlevelsynccm}}{\pgftransforminvert\pgflowlevelsynccm}%
+
+
+
+% Specifies the tranforming for the animation coordinate system
+%
+% #1 = code that changes the pgf coordinate system
+%
+% Specifies an additional transformation of the coordinate system for
+% animations.
+%
+% Example:
+%
+% \pgfanimateattribute{shift}{entry={0s}{\pgfpointorigin}, entry={1s}{\pgfpoint{1cm}{0cm}}, transform=\pgftransformrotate{30}}
+
+\pgfanimationset{
+ transform/.code={%
+ \pgfsysanimkeycanvastransform{#1{\pgflowlevelsynccm}}{\pgftransforminvert\pgflowlevelsynccm}%
+ \pgf@anim@save@transform{#1}%
+ }
+}
+
+
+
+% Specifies a motion path.
+%
+% #1 = pgf commands for constructing a path
+%
+% Use this key to specify a motion path for the motion attribute. The
+% values of the "entry" key specify fractions along this path.
+%
+% Example:
+%
+% \pgfanimateattribute{motion}{
+% entry={0s}{0}, entry={1s}{1},
+% along=\pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpoint{1cm}{1cm}}
+% }
+
+\pgfanimationset{
+ along/.code=%
+ {%
+ \pgfsyssoftpath@getcurrentpath\pgfanim@save@path%
+ \pgfsyssoftpath@setcurrentpath\pgfutil@empty%
+ #1%
+ \pgfsyssoftpath@getcurrentpath\pgfanim@the@path%
+ \global\let\pgfanim@the@path\pgfanim@the@path%
+ \pgfsyssoftpath@setcurrentpath\pgfanim@save@path%
+ }%
+ \expandafter\pgf@anim@protocol@path@size\pgfanim@the@path\pgf@stop%
+ \expandafter\pgfsysanimkeymovealong\expandafter{\pgfanim@the@path}%
+}
+
+
+% Specifies a motion soft path.
+%
+% #1 = a pgf soft path (result of calling \pgfsyssoftpath@getcurrentpath)
+%
+% Use this key to specify a motion path for the motion attribute when
+% a softpath has already been constructed.
+%
+% Example:
+%
+% \pgfanimateattribute{motion}{entry={0s}{0}, entry={1s}{1},
+% along softpath=\pgfsyssoftpath@movetotoken {0pt}{0pt}\pgfsyssoftpath@linetotoken {10pt}{10pt}}
+
+\pgfanimationset{
+ along softpath/.code=%
+ \pgf@anim@protocol@path@size#1\pgf@stop%
+ \pgfsysanimkeymovealong{#1}%
+}
+
+
+\def\pgf@anim@protocol@path@size{%
+ \pgfutil@ifnextchar\pgf@stop\relax\pgf@anim@protocol@path@size@%
+}
+\def\pgf@anim@protocol@path@size@#1#2#3{%
+ \pgf@protocolanimsizes@direct{#2}{#3}%
+ \pgf@anim@protocol@path@size%
+}
+
+
+% Configures whether the motion is rotated along the path.
+%
+% Example:
+%
+% \pgfanimateattribute{motion}{rotate along, entry={0s}{0}, entry={1s}{1},
+% along=\pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpoint{1cm}{1cm}}}
+
+\pgfanimationset{
+ rotate along/.is choice,
+ rotate along/.default=true,
+ rotate along/true/.code=\pgfsysanimkeyrotatealong,
+ rotate along/false/.code=\pgfsysanimkeynorotatealong,
+}
+
+
+
+% Specifies an entry
+%
+% #1 = A time. This time will be parsed using \pgfparsetime
+% #2 = A value. The format of this value depends on the current type
+% of the animation attribute. (So for an animation of the "fill
+% opacity", #1 must be a scalar value, for an animation of the "fill"
+% color, #1 must be a color, and so on.)
+% If #2 is the special text "current value", then the current
+% value will be used. For SVG, this is allowed only when exactly
+% two entries are specified and this special value is used for
+% the first one.
+%
+% Example:
+%
+% \pgfanimateattribute{fill opacity}{entry={0s}{0}, entry={1s}{1}}
+
+\pgfanimationset{entry/.code 2 args=\pgf@anim@entry{#1}{#2}}
+\def\pgf@anim@entry#1#2{%
+ \pgf@anim@entry@giventrue%
+ \pgfparsetime{#1}%
+ \edef\pgf@marshal{\noexpand\pgfsysanimkeytime{\pgftimeresult}\pgf@anim@entry@spline\pgf@anim@exit@spline}%
+ \pgf@marshal%
+ \def\pgf@temp{#2}%
+ \ifx\pgf@temp\pgf@special@current@text%
+ \pgfsysanimvalcurrent%
+ \else%
+ \pgfanim@type@parser{#2}%
+ \fi%
+}
+\def\pgf@special@current@text{current value}
+\newif\ifpgf@anim@entry@given
+
+
+% Specifies a base value
+%
+% #1 = A value. The format is as for the entry key.
+%
+% Description:
+%
+% Will set the "base" value of the animation, which is a value that is
+% used when the animation is not active.
+%
+% Example:
+%
+% \pgfanimateattribute{fill opacity}{base = 0.5, entry={0s}{0.5}, entry={1s}{1}}
+
+\pgfanimationset{base/.code=\pgf@anim@base{#1}}
+\def\pgf@anim@base#1{%
+ \pgfsysanimkeybase%
+ \pgfanim@type@parser{#1}%
+}
+
+
+% Specifies that there is an entry "at infinity".
+%
+% When an animation ends, its "effect" can either persist or it can be
+% removed. Setting "freeze at end" to true will cause it to persist,
+% otherwise it will be removed.
+%
+% Example:
+%
+% \pgfanimateattribute{fill opacity}{entry={0s}{1}, entry={1s}{0}, freeze at end}
+
+\pgfanimationset{
+ freeze at end/.is choice,
+ freeze at end/.default=true,
+ freeze at end/true/.code=\pgfsysanimkeyfreezeatend,
+ freeze at end/false/.code=\pgfsysanimkeyremoveatend,
+}
+
+
+
+% Specifies an entry or exit spline control
+%
+% #1 = time fraction
+% #2 = attribute fraction
+%
+% Description:
+%
+% Suppose that an animation is supposed to interpolate a attribute's
+% value between the two values "50" and "100" over a time of 10s. The
+% simplest way of doing so is to do a linear interpolation, where the
+% value as, say, 1s is 55, at 2s it is 60, and so on.
+%
+% Unfortunately, the linear interpolation does not "look" nice in many
+% cases since the acceleration of a linear interpolation is zero
+% during the animation, but infinite at the beginning and at the end;
+% which looks "jerky".
+%
+% To avoid this, you can specify that the time--attribute curve should
+% not be a straight line, but rather a curve. You specify this curve
+% using a spline.
+%
+% The most logical "coordinate rectangle" used for this spline in our
+% example would be (0s,50) and (10s,100) and we would like to specify
+% something like "(0s,50) .. controls (5s,50) and (9s,100)
+% .. (10s,100)". This would result in a time--attribute curve where
+% the attribute at 50 changes slowly at 0s and also arrives slowly at
+% 100 at 10s, but speeds up between these values.
+%
+% We call the first control point (5s,50) the "exit control" and call
+% (9s,100) the "entry control": The first control dictates how quickly
+% or slowly a time point is left, the second dictates how quickly or
+% slowly we enter the next one.
+%
+% The control points are, however, not specified in the coordinate
+% system indicated above. Rather, the rectangle (0s,50) to (10s, 100),
+% gets normalized to (0,0) to (1,1). The control point (5s,50) would
+% thus become (0.5,0) and (9s,100) becomes (0.9,1).
+%
+% Example:
+%
+% \pgfanimateattribute{rotate}{
+% exit control={0.5}{0},
+% entry control={0.9}{1},
+% entry={0s}{50},
+% entry={10s}{100}}
+
+\pgfanimationset{
+ entry control/.code 2 args={%
+ \pgfmathsetmacro\pgf@temp@t{#1}%
+ \pgfmathsetmacro\pgf@temp@a{#2}%
+ \edef\pgf@anim@entry@spline{{\pgf@temp@t}{\pgf@temp@a}}%
+ },
+ exit control/.code 2 args={%
+ \pgfmathsetmacro\pgf@temp@t{#1}%
+ \pgfmathsetmacro\pgf@temp@a{#2}%
+ \edef\pgf@anim@exit@spline{{\pgf@temp@t}{\pgf@temp@a}}%
+ },
+ stay/.code=\let\pgf@anim@exit@spline\pgfsys@stay@text,%
+ jump/.code=\let\pgf@anim@entry@spline\pgfsys@jump@text,%
+ linear/.style={entry control={1}{1},exit control={0}{0}}
+}
+\def\pgf@anim@entry@spline@base{{1}{1}}
+\def\pgf@anim@exit@spline@base{{0}{0}}
+
+\def\pgf@anim@reset@linear{\let\pgf@anim@entry@spline\pgf@anim@entry@spline@base\let\pgf@anim@exit@spline\pgf@anim@exit@spline@base}
+\pgf@anim@reset@linear
+
+
+
+% Specifies how much arrow tips should be shortened (as in
+% \pgfsetshortenstart)
+%
+% #1 = an additional shortening distance the path start.
+%
+% Description:
+%
+% Works like \pgfsetshortenstart, only for animated paths.
+
+\pgfanimationset{
+ shorten </.code={%
+ \ifpgf@anim@entry@given%
+ \pgferror{You must specify shorten < prior to the path entries}%
+ \else%
+ \pgfmathsetmacro\pgf@anim@marker@extra@shorten@start{#1}%
+ \edef\pgf@anim@marker@extra@shorten@start{\pgf@anim@marker@extra@shorten@start pt}%
+ \fi%
+ },
+ shorten >/.code={%
+ \ifpgf@anim@entry@given%
+ \pgferror{You must specify shorten < prior to the path entries}%
+ \else%
+ \pgfmathsetmacro\pgf@anim@marker@extra@shorten@end{#1}%
+ \edef\pgf@anim@marker@extra@shorten@end{\pgf@anim@marker@extra@shorten@end pt}%
+ \fi%
+ }
+}
+\def\pgf@anim@marker@extra@shorten@start{0pt}%
+\def\pgf@anim@marker@extra@shorten@end{0pt}%
+\def\pgf@anim@marker@shorten@start{0pt}%
+\def\pgf@anim@marker@shorten@end{0pt}%
+
+% Specifies the arrow tips used for path animations
+%
+% #1 = an arrow specification of the form <start>-<end> as for the
+% command \pgfsetarrows
+%
+% Description:
+%
+% Specifies arrow tips that are used in a path animation. Note that in
+% order to set the arrow tips of a path that is animated, you always
+% have to use this command. In particular, you should *not* set arrow
+% tips for the to-be-animated path, but use this key and the base key
+% to install a base path with arrow tips.
+
+\pgfanimationset{
+ arrows/.code={%
+ \ifpgf@anim@entry@given%
+ \pgferror{You must specify animation arrows prior to the path entries}%
+ \else%
+ \pgf@anim@parser@arrows#1\pgf@stop%
+ \fi%
+ }
+}
+
+\def\pgf@anim@parser@arrows#1-#2\pgf@stop{%
+ \pgf@anim@prepare@arrow@start{#1}%
+ \pgf@anim@prepare@arrow@end{#2}%
+ \expandafter\expandafter\expandafter\pgfsysanimkeytipmarkers\expandafter\expandafter\expandafter{\expandafter\pgf@anim@marker@id@start\expandafter}\expandafter{\pgf@anim@marker@id@end}%
+}
+
+\def\pgf@anim@prepare@arrow@start#1{%
+ \def\pgf@anim@temp{#1}%
+ \ifx\pgf@anim@temp\pgfutil@empty%
+ \let\pgf@anim@marker@id@start\pgfutil@empty%
+ \def\pgf@anim@marker@shorten@start{0pt}%
+ \else%
+ {%
+ \pgfsetarrowsstart{#1}%
+ \pgf@anim@prep@marker@arrow\pgf@start@tip@sequence\pgf@anim@marker@id\pgf@anim@marker@shorten%
+ \global\let\pgf@anim@marker@id@start\pgf@anim@marker@id%
+ \global\let\pgf@anim@temp\pgf@anim@marker@shorten%
+ }%
+ \let\pgf@anim@marker@shorten@start\pgf@anim@temp%
+ \fi%
+}
+
+\def\pgf@anim@prepare@arrow@end#1{%
+ \def\pgf@anim@temp{#1}%
+ \ifx\pgf@anim@temp\pgfutil@empty%
+ \let\pgf@anim@marker@id@end\pgfutil@empty%
+ \def\pgf@anim@marker@shorten@end{0pt}%
+ \else%
+ {%
+ \pgfsetarrowsend{#1}%
+ \pgf@anim@prep@marker@arrow\pgf@end@tip@sequence\pgf@anim@marker@id\pgf@anim@marker@shorten%
+ \global\let\pgf@anim@marker@id@end\pgf@anim@marker@id%
+ }%
+ \let\pgf@anim@marker@shorten@end\pgf@anim@marker@shorten%
+ \fi%
+}
+
+
+% Draw an arrow using markers
+
+\def\pgf@anim@prep@marker@arrow#1#2#3{%
+ % #1 = tip sequence
+ % #2 = macro for storing marker code
+ % #3 = macro for storing shortening length
+ %
+ % First, compute id's:
+ {%
+ \let\pgf@arrow@handle\pgf@anim@marker@id@test%
+ \let\pgf@arrow@handle@dot\relax%?
+ \global\let\pgf@anim@marker@id@list\pgfutil@empty%
+ #1%
+ }%
+ \expandafter\let\expandafter#2\csname pgfanim@marker@cache@\pgf@anim@marker@id@list\endcsname%
+ \expandafter\let\expandafter#3\csname pgfanim@marker@cachel@\pgf@anim@marker@id@list\endcsname%
+ \ifx#2\relax% ok, have to create it!
+ \pgf@relevantforpicturesizefalse%
+ \pgfinterruptpath%
+ \pgf@arrow@compute@shortening{#1}%
+ \xdef#3{\the\pgf@xa}%
+ {%
+ \let\pgf@arrow@handle\pgf@anim@drawer@marker
+ \let\pgf@arrow@handle@dot\relax%
+ \pgfsys@marker@declare#2{%
+ \pgftransformxshift{-\pgf@xb}%
+ \pgftransformxshift{\pgf@xa}%
+ #1%
+ }%
+ }%
+ \endpgfinterruptpath%
+ \expandafter\global\expandafter\let\csname pgfanim@marker@cache@\pgf@anim@marker@id@list\endcsname#2%
+ \expandafter\global\expandafter\let\csname pgfanim@marker@cachel@\pgf@anim@marker@id@list\endcsname#3%
+ \fi%
+}
+
+\def\pgf@anim@marker@id@test#1#2{%
+ \pgfarrows@getid{#1}{#2}%
+ \expandafter\expandafter\expandafter\pgf@arrow@drawer@shift\csname pgf@ar@ends@\pgf@arrow@id\endcsname%
+ \xdef\pgf@anim@marker@id@list{\pgf@anim@marker@id@list:\pgf@arrow@id\ifpgfarrowswap s\else n\fi\pgfarrows@slant w\the\pgf@xc}%
+}
+
+\def\pgf@anim@drawer@marker#1#2{%
+ % Prepare:
+ {%
+ \pgfarrows@getid{#1}{#2}%
+ % Do shift:
+ \expandafter\expandafter\expandafter\pgf@arrow@drawer@shift\csname pgf@ar@ends@\pgf@arrow@id\endcsname%
+ % Do slant:
+ \ifdim\pgfarrows@slant pt=0pt%
+ \else%
+ \pgftransformxslant{\pgfarrows@slant}%
+ \fi%
+ % do swap:
+ \ifpgfarrowswap%
+ \pgftransformyscale{-1}%
+ \fi%
+ {%
+ \csname pgf@ar@saves@\pgf@arrow@id\endcsname%
+ \pgfsys@beginscope%
+ \pgf@arrows@color@setup%
+ \pgflowlevelsynccm\csname pgf@ar@cache@\pgf@arrow@id\endcsname%
+ \pgfsys@endscope%
+ }%
+ \expandafter}%
+ % Transform to next tip:
+ \expandafter\pgftransformxshift\expandafter{\the\pgf@xc}%
+}
+
+
+
+
+
+
+
+
+
+% The parsers
+
+% Parse no value
+%
+% #1 is ignored
+%
+% Example:
+%
+% entry = {0s}{5+6}
+
+\def\pgfanim@parse@type@none#1{%
+ \pgfsysanimvalnone%
+}
+
+% Parse a scalar
+%
+% #1 is a number parsed using \pgfmathparse
+%
+% Example:
+%
+% entry = {0s}{5+6}
+
+\def\pgfanim@parse@type@scalar#1{%
+ \pgfmathparse{#1}%
+ \expandafter\pgfsysanimvalscalar\expandafter{\pgfmathresult}%
+}
+
+
+% Parse a dimension
+%
+% #1 is a number parsed using \pgfmathparse
+%
+% Example:
+%
+% entry = {0s}{5cm + 2pt}
+
+\def\pgfanim@parse@type@dimension#1{%
+ \pgfmathparse{#1}%
+ \expandafter\pgfsysanimvaldimension\expandafter{\pgfmathresult pt}%
+}
+
+
+
+% Parse a mapped text
+%
+% #1 is a text. It is looked up in \pgf@anim@map@#1 and gets replaced
+% by what this macro expands to.
+%
+% Example:
+%
+% entry = {0s}{true}
+
+\def\pgfanim@parse@type@mapped#1{%
+ {%
+ \expandafter\let\expandafter\pgf@temp\csname pgf@anim@map@#1\endcsname\relax%
+ \ifx\pgf@temp\relax%
+ \pgferror{Value '#1' not allowed for an animation for this attribute}%
+ \let\pgf@temp\pgfutil@empty%
+ \fi%
+ \expandafter}%
+ \expandafter\pgfsysanimvaltext\expandafter{\pgf@temp}%
+}
+
+
+% Parse a color
+%
+% #1 is a color
+%
+% entry = {0s}{blue!20}
+
+\def\pgfanim@parse@type@color#1{%
+ \pgfsysanimvalcolor{#1}%
+}
+
+
+% Parse a path
+%
+% #1 is a sequence of pgf path construction commands
+%
+% entry = {0s}{\pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpoint{1cm}{1cm}}}
+
+\def\pgfanim@parse@type@path#1{%
+ {%
+ \pgfsyssoftpath@getcurrentpath\pgfanim@save@path%
+ \pgfsyssoftpath@setcurrentpath\pgfutil@empty%
+ #1%
+ \pgfsyssoftpath@getcurrentpath\pgfanim@the@path%
+ \pgfprocessround{\pgfanim@the@path}{\pgfanim@the@path}%
+ \global\let\pgfanim@the@path\pgfanim@the@path%
+ \pgfsyssoftpath@setcurrentpath\pgfanim@save@path%
+ }%
+ \expandafter\pgfanim@parse@type@softpath\expandafter{\pgfanim@the@path}%
+}
+
+
+% Parse a softpath
+%
+% #1 is a sequence of pgf softpath token commands
+%
+% entry = {0s}{\pgfsyssoftpath@movetotoken {0pt}{0pt}\pgfsyssoftpath@linetotoken {10pt}{10pt}}
+
+\def\pgfanim@parse@type@softpath#1{%
+ {%
+ \def\pgf@anim@path{#1}%
+ % Shorten?
+ \pgf@worryfalse%
+ \pgf@xb=\pgf@anim@marker@extra@shorten@start%
+ \advance\pgf@xb by\pgf@anim@marker@shorten@start%
+ \pgf@xc=\pgf@anim@marker@extra@shorten@end%
+ \advance\pgf@xc by\pgf@anim@marker@shorten@end%
+ \ifdim\pgf@xb=0pt\else\pgf@worrytrue\fi%
+ \ifdim\pgf@xc=0pt\else\pgf@worrytrue\fi%
+ \ifpgf@worry%
+ \edef\pgf@path@shortening@distance@end{\the\pgf@xc}%
+ \edef\pgf@path@shortening@distance@start{\the\pgf@xb}%
+ % Yes! Need to shorten.
+ \pgf@anim@shorten@path%
+ \fi%
+ \expandafter}%
+ \expandafter\pgfsysanimvalpath\expandafter{\pgf@anim@path}%
+}
+
+
+\def\pgf@anim@shorten@path{%
+ \pgf@precise@shorteningfalse%
+ \let\pgf@path@shortening@distance\pgf@path@shortening@distance@end%
+ %
+ % Step 1: Split
+ %
+ \pgfprocesssplitpath{\pgf@anim@path}%
+ \pgfprocesssplitsubpath{\pgfprocessresultpathsuffix}%
+ %
+ % Step 2: extract
+ %
+ \expandafter\pgf@parse@end\pgfprocessresultsubpathsuffix\pgf@stop\pgf@stop\pgf@stop%
+ %
+ % Step 3: prep end
+ %
+ \pgf@prep@end%
+ %
+ % Step 4: shorten end
+ %
+ \ifdim\pgf@path@shortening@distance=0pt\else\pgf@do@shorten@end\fi%
+ %
+ \let\pgf@path@shortening@distance\pgf@path@shortening@distance@start%
+ %
+ % Step 5: extract
+ %
+ \expandafter\pgf@parse@start\pgfprocessresultpathsuffix\pgf@stop\pgf@stop\pgf@stop%
+ %
+ % Step 6: prep start
+ %
+ \pgf@prep@start%
+ %
+ % Step 7: shorten start
+ %
+ \ifdim\pgf@path@shortening@distance=0pt\else\pgf@do@shorten@start\fi%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\pgf@anim@path%
+ \expandafter\expandafter\expandafter{\expandafter\pgfprocessresultpathprefix\pgfprocessresultpathsuffix}%
+}
+
+
+
+% Parse a point
+%
+% #1 is a point
+%
+% entry = {0s}{\pgfpoint{1cm}{2cm}}
+
+\def\pgfanim@parse@type@point#1{%
+ \pgf@process{#1}%
+ \pgf@protocolanimsizes\pgf@x\pgf@y%
+ \expandafter\expandafter\expandafter\pgfsysanimvaltranslate\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgf@x\expandafter}\expandafter{\the\pgf@y}%
+}
+
+
+% Parse a scaling
+%
+% #1 = if #1 contains a comma, the two parts are passed to
+% pgfmathparse, otherwise the whole thing is passed to pgfmathparse.
+%
+% entry = {0s}{2}
+% entry = {0s}{2,1}
+
+\def\pgfanim@parse@type@scaling#1{%
+ \pgfutil@in@{,}{#1}%
+ \ifpgfutil@in@%
+ \pgfanim@unpack@comma#1\pgf@stop%
+ \else%
+ \pgfmathparse{#1}%
+ \expandafter\pgfsysanimvalscale\expandafter{\pgfmathresult}{\pgfmathresult}%
+ \fi%
+}
+\def\pgfanim@unpack@comma#1,#2\pgf@stop{%
+ \pgfmathsetmacro{\pgf@anim@temp@x}{#1}%
+ \pgfmathsetmacro{\pgf@anim@temp@y}{#2}%
+ \expandafter\expandafter\expandafter\pgfsysanimvalscale\expandafter\expandafter\expandafter{\expandafter\pgf@anim@temp@x\expandafter}\expandafter{\pgf@anim@temp@y}%
+}
+
+
+
+% Parse a viewbox
+%
+% #1 consists of two points, each in paranetheses
+%
+% entry = {0s}{{\pgfpoint{1cm}{2cm}}{\pgfpoint{3cm}{4cm}}}
+
+\def\pgfanim@parse@type@viewbox#1{%
+ {%
+ \pgfanim@unpack@viewbox#1%
+ \xdef\pgf@anim@caller{\noexpand\pgfsysanimvalviewbox{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}}%
+ }%
+ \pgf@anim@caller%
+}
+\def\pgfanim@unpack@viewbox#1#2{%
+ \pgfpointtransformed{#2}%
+ \pgf@xa\pgf@x%
+ \pgf@ya\pgf@y%
+ \pgfpointtransformed{#1}%
+ \ifdim\pgf@xa<\pgf@x% swap needed
+ \pgf@xb=\pgf@x%
+ \pgf@x=\pgf@xa%
+ \pgf@xa=\pgf@xb%
+ \fi%
+ \ifdim\pgf@ya<\pgf@y% swap needed
+ \pgf@yb=\pgf@y%
+ \pgf@y=\pgf@ya%
+ \pgf@ya=\pgf@yb%
+ \fi%
+}
+
+
+
+
+% Parse a dash pattern
+%
+% #1,#2 is a dash pattern as in \pgfsetdash
+%
+% entry = {0s}{{{1pt}{2pt}{3pt}{1pt}}{1pt}}
+
+\def\pgfanim@parse@type@dash#1{\pgfanim@parse@type@dash@#1}%
+\def\pgfanim@parse@type@dash@#1#2{%
+ \def\pgf@temp{}%
+ \def\pgf@next{\pgf@strip}%
+ \pgf@strip#1{pgf@stop}%
+ \expandafter\pgfsysanimvaldash\expandafter{\pgf@temp}{#2}%
+}
+
+
+
+
+
+%
+%
+% Bounding box adjustments in animations.
+%
+%
+
+\def\pgf@protocolanimsizes#1#2{%
+ \edef\pgf@temp{\noexpand\pgf@anim@handle@point{\the#1}{\the#2}}%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@protocolanim@list\expandafter\expandafter\expandafter{\expandafter\pgf@protocolanim@list\pgf@temp}%
+}
+\def\pgf@protocolanimsizes@direct#1#2{%
+ \expandafter\def\expandafter\pgf@protocolanim@list\expandafter{\pgf@protocolanim@list\pgf@anim@handle@point{#1}{#2}}%
+}
+\let\pgf@protocolanim@list\pgfutil@empty
+
+\def\pgf@animation@check@translate{%
+ \ifx\pgf@protocolanim@list\pgfutil@empty%
+ \else%
+ \expandafter\expandafter\expandafter\pgf@animation@check@translate@\expandafter\expandafter\expandafter{\expandafter\pgf@protocolanim@list\expandafter}\expandafter{\pgf@anim@saved@transform}%
+ \fi%
+}
+\let\pgf@animation@check@motion\pgf@animation@check@translate
+
+\def\pgf@animation@check@translate@#1#2{%
+ \pgfsys@attach@to@id\pgf@anim@whom@id\pgf@anim@whom@type{%
+ \pgf@size@hookedtrue%
+ {%
+ % Compute bounding box in local coordinate system
+ #2%
+ \pgf@pt@x0pt%
+ \pgf@pt@y0pt%
+ \pgf@picmaxx=-16000pt\relax%
+ \pgf@picminx=16000pt\relax%
+ \pgf@picmaxy=-16000pt\relax%
+ \pgf@picminy=16000pt\relax%
+ #1%
+ \edef\pgf@temp{{\the\pgf@picminx}{\the\pgf@picminy}{\the\pgf@picmaxx}{\the\pgf@picmaxy}}%
+ \expandafter%
+ }\expandafter%
+ \def\expandafter\pgf@temp\expandafter{\pgf@temp}%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@path@size@hook\expandafter\expandafter\expandafter{%
+ \expandafter\pgf@path@size@hook\expandafter\pgf@anim@bb\pgf@temp}%
+ }{}%
+}
+\def\pgf@anim@handle@point#1#2{%
+ \pgf@x#1\pgf@y#2%
+ \pgf@pos@transform\pgf@x\pgf@y%
+ \ifdim\pgf@x<\pgf@picminx\pgf@picminx\pgf@x\fi%
+ \ifdim\pgf@x>\pgf@picmaxx\pgf@picmaxx\pgf@x\fi%
+ \ifdim\pgf@y<\pgf@picminy\pgf@picminy\pgf@y\fi%
+ \ifdim\pgf@y>\pgf@picmaxy\pgf@picmaxy\pgf@y\fi%
+}
+
+\newdimen\pgf@anim@dim
+
+\def\pgf@anim@bb#1#2#3#4{% (#1,#2) lower left, (#3, #4) upper right
+ \pgf@anim@dim\pgf@size@hook@x%
+ \advance\pgf@anim@dim by#1\relax%
+ \ifdim\pgf@anim@dim<\pgf@picminx\global\pgf@picminx\pgf@anim@dim\fi%
+ \pgf@anim@dim\pgf@size@hook@x%
+ \advance\pgf@anim@dim by#3\relax%
+ \ifdim\pgf@anim@dim>\pgf@picmaxx\global\pgf@picmaxx\pgf@anim@dim\fi%
+ \pgf@anim@dim\pgf@size@hook@y%
+ \advance\pgf@anim@dim by#2\relax%
+ \ifdim\pgf@anim@dim<\pgf@picminy\global\pgf@picminy\pgf@anim@dim\fi%
+ \pgf@anim@dim\pgf@size@hook@y%
+ \advance\pgf@anim@dim by#4\relax%
+ \ifdim\pgf@anim@dim>\pgf@picmaxy\global\pgf@picmaxy\pgf@anim@dim\fi%
+}
+
+\def\pgf@anim@save@transform#1{%
+ \def\pgf@anim@saved@transform{#1}%
+}
+\let\pgf@anim@saved@transform\pgfutil@empty%
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex
index f0a28bfff68..cc9ed651c71 100644
--- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmodulebending.code.tex,v 1.18 2013/09/30 18:30:15 tantau Exp $
+\ProvidesFileRCS{pgfmodulebending.code.tex}
%
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex
index f991fdedaef..a1122b91370 100644
--- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledatavisualization.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmoduledatavisualization.code.tex,v 1.50 2015/05/18 17:01:16 tantau Exp $
+\ProvidesFileRCS{pgfmoduledatavisualization.code.tex}
\usepgfmodule{oo,shapes}
\usepgflibrary{fpu}
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex
index c2bf2582a29..500e0c7bad1 100644
--- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduledecorations.code.tex
@@ -797,7 +797,7 @@
\pgf@decorate@movealonginputsegment{\the\pgfdecoratedremainingdistance}%
\pgf@decorate@transformtoinputsegment%
\pgfpointorigin%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
\global\pgf@x\pgf@x%
\global\pgf@y\pgf@y%
}%
@@ -835,7 +835,7 @@
{%
\pgftransforminvert%
\pgfpoint@decorated@pathfirst%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
\global\pgf@x\pgf@x%
\global\pgf@y\pgf@y%
}%
@@ -847,7 +847,7 @@
{%
\pgftransforminvert%
\pgfpoint@decorated@pathlast%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
\global\pgf@x\pgf@x%
\global\pgf@y\pgf@y%
}%
@@ -861,7 +861,7 @@
{%
\pgftransforminvert%
\pgf@decorate@inputsegment@first%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
\global\pgf@x\pgf@x%
\global\pgf@y\pgf@y%
}%
@@ -875,7 +875,7 @@
{%
\pgftransforminvert%
\pgf@decorate@inputsegment@last%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
\global\pgf@x\pgf@x%
\global\pgf@y\pgf@y%
}%
@@ -2188,4 +2188,4 @@
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex
index a9344f6c95c..f3158456ebe 100644
--- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmodulematrix.code.tex,v 1.8 2013/09/17 17:34:00 tantau Exp $
+\ProvidesFileRCS{pgfmodulematrix.code.tex}
\usepgfmodule{shapes}
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulenonlineartransformations.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulenonlineartransformations.code.tex
index 913f2edff9d..7ce4784110f 100644
--- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulenonlineartransformations.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulenonlineartransformations.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmodulenonlineartransformations.code.tex,v 1.4 2013/10/09 18:30:27 tantau Exp $
+\ProvidesFileRCS{pgfmodulenonlineartransformations.code.tex}
%
@@ -45,7 +45,7 @@
\def\pgfpointtransformednonlinear#1{%
\pgf@process{%
#1%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
\pgf@nlt@list%
}
}
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex
index eba114885ea..1cd938af521 100644
--- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex
@@ -298,7 +298,7 @@
% }
% define the method macro and append the method to the method collection
-\def\pgfoo@declaremethod#1(#2)#3{%
+\long\def\pgfoo@declaremethod#1(#2)#3{%
\def\pgfoo@method{#1}%
\ifx\pgfoo@classname\pgfoo@method
\def\pgfoo@method{init}%
@@ -595,15 +595,19 @@
}%
}%
}
-\def\pgfoo@new#1=new #2({%
- \expandafter\ifx\csname pgfooY#2.get id\endcsname\relax%
- \pgferror{Unknown class '#2'}%
+\def\pgfoo@new#1={%
+ \def\pgfutil@reserved@a{#1}%
+ \let\pgfutil@next\pgfoo@@new
+ \futurelet\pgfutil@let@token\pgfutil@ignorespaces}
+\def\pgfoo@@new new #1({%
+ \expandafter\ifx\csname pgfooY#1.get id\endcsname\relax%
+ \pgferror{Unknown class '#1'}%
\else%
- \pgfoo@new@create#1{#2}%
+ \expandafter\pgfoo@new@create\pgfutil@reserved@a{#1}%
{%
\pgfoothis@count\pgfoo@objectcount%
\let\pgfoo@attribute@op\pgfoolet
- \csname pgfooY#2.@pgfoo@process@attributes\endcsname%
+ \csname pgfooY#1.@pgfoo@process@attributes\endcsname%
}%
\let\pgfoo@continue=\pgf@oo@new@cont%
\expandafter\pgfoo@collect@args%
@@ -615,27 +619,26 @@
\aftergroup\pgfoogc% cleanup after group
}
-\def\pgfoo@new@attribute#1=new #2({%
- \expandafter\ifx\csname pgfooY#2.get id\endcsname\relax%
- \pgferror{Unknown class '#2'}%
+\def\pgfoo@new@attribute#1={%
+ \def\pgfutil@reserved@a{#1}%
+ \let\pgfutil@next\pgfoo@@new@attribute
+ \futurelet\pgfutil@let@token\pgfutil@ignorespaces}
+\def\pgfoo@@new@attribute new #1({%
+ \expandafter\ifx\csname pgfooY#1.get id\endcsname\relax%
+ \pgferror{Unknown class '#1'}%
\else%
- \pgfoo@new@create\pgfoo@temp{#2}%
+ \pgfoo@new@create\pgfoo@temp{#1}%
{%
\pgfoothis@count\pgfoo@objectcount%
\let\pgfoo@attribute@op\pgfoolet%
- \csname pgfooY#2.@pgfoo@process@attributes\endcsname%
+ \csname pgfooY#1.@pgfoo@process@attributes\endcsname%
}%
- \pgfoolet{#1}\pgfoo@temp%
+ \expandafter\pgfoolet\expandafter{\pgfutil@reserved@a}\pgfoo@temp%
\let\pgfoo@continue=\pgf@oo@new@cont%
\expandafter\pgfoo@collect@args%
\fi%
}
-\def\pgf@oo@new@cont{%
- \expandafter\pgfoolastobj\expandafter.\expandafter i\expandafter n\expandafter i\expandafter t\expandafter(\the\pgfoo@toks)%
- \aftergroup\pgfoogc% cleanup after group
-}
-
\def\pgfoo@new@create#1#2{%
\advance\pgfoo@objectcount by 1\relax%
\edef\pgfoolastobj{\noexpand\pgfoo@caller{\the\pgfoo@objectcount}}%
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleparser.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleparser.code.tex
index 0a08a5e9d4e..5c248ad9f56 100644
--- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleparser.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleparser.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmoduleparser.code.tex,v 1.2 2013/07/15 12:05:34 tantau Exp $
+\ProvidesFileRCS{pgfmoduleparser.code.tex}
%
% This file defines commands for defining a letter-by-letter parser
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex
index 696608e31e8..6c548160b26 100644
--- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmoduleplot.code.tex,v 1.13 2015/08/03 07:57:07 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfmoduleplot.code.tex}
% PGF's plotting interface works as follows:
@@ -503,7 +503,7 @@
\immediate\pgfutil@write\pgf@plotwrite{\pgf@gnuplot@head}%
\immediate\pgfutil@write\pgf@plotwrite{#2}%
\immediate\closeout\pgf@plotwrite%
- \immediate\pgfutil@write18{%
+ \pgfutil@shellescape{%
\pgfkeysvalueof{/pgf/plot/gnuplot call} \pgf@plotgnuplotfile}%
\fi%
% \let\pgf@savedparsexyline=\pgf@parsexyline%
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
index 6a4d0932393..71a3876da32 100644
--- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmoduleshapes.code.tex,v 1.35 2014/03/21 19:52:38 tantau Exp $
+\ProvidesFileRCS{pgfmoduleshapes.code.tex}
@@ -41,6 +41,9 @@
{\pgferror{Unknown shape ``#1''}}%
{%
{%
+ \ifpgflatenodepositioning%
+ \pgfsys@beginscope%
+ \fi%
\pgf@outer@adjust@hook%
\let\pgf@sh@savedmacros=\pgfutil@empty% MW
\let\pgf@sh@savedpoints=\pgfutil@empty%
@@ -58,7 +61,7 @@
}%
% Save the saved points and the transformation matrix
\edef\pgf@node@name{#3}%
- \ifpgflatenodepositioning
+ \ifpgflatenodepositioning%
\pgf@shapes@late@pos@begin%
\fi%
\ifx\pgf@node@name\pgfutil@empty%
@@ -73,36 +76,39 @@
\expandafter\xdef\csname pgf@sh@pi@\pgf@node@name\endcsname{\pgfpictureid}%
\fi%
\pgfutil@ifundefined{pgf@sh@bbg@#1}{}
- {{\pgfscope\csname pgf@sh@bbg@#1\endcsname\endpgfscope}}%
+ {{\pgfusetype{.behind background}\pgfidscope\pgfscope\csname pgf@sh@bbg@#1\endcsname\endpgfscope\endpgfidscope}}%
\pgfutil@ifundefined{pgf@sh@bg@#1}{%
\global\let\pgfpositionnodelaterpath\pgfutil@empty%
}%
- {\csname pgf@sh@bg@#1\endcsname%
+ {\pgfpushtype%
+ \pgfusetype{.background}\csname pgf@sh@bg@#1\endcsname%
\ifpgflatenodepositioning%
\pgfsyssoftpath@getcurrentpath\pgfpositionnodelaterpath%
\pgfprocessround{\pgfpositionnodelaterpath}{\pgfpositionnodelaterpath}%
\global\let\pgfpositionnodelaterpath\pgfpositionnodelaterpath%
\fi%
- #4}%
+ #4\pgfpoptype}%
\pgfutil@ifundefined{pgf@sh@fbg@#1}{}
- {{\pgfscope\csname pgf@sh@fbg@#1\endcsname\endpgfscope}}%
+ {{\pgfusetype{.before background}\pgfidscope\pgfscope\csname pgf@sh@fbg@#1\endcsname\endpgfscope\endpgfidscope}}%
{%
\expandafter\pgfutil@for\expandafter\pgf@shape@com\expandafter:\expandafter=\csname pgf@sh@boxes@#1\endcsname\do{%
{%
+ \pgfusetype{.\pgf@shape@com}%
\pgftransformshift{\pgf@sh@reanchor{#1}{\pgf@shape@com}}%
- \pgfapproximatenonlineartransformation%
+ \pgfapproximatenonlineartransformation%
\expandafter\pgfqboxsynced\expandafter{\csname pgfnodepart\pgf@shape@com box\endcsname}%
}%
}%
}%
\pgfutil@ifundefined{pgf@sh@bfg@#1}{}%
- {{\pgfscope\csname pgf@sh@bfg@#1\endcsname\endpgfscope}}%
+ {{\pgfusetype{.behind foreground}\pgfidscope\pgfscope\csname pgf@sh@bfg@#1\endcsname\endpgfscope\endpgfidscope}}%
\pgfutil@ifundefined{pgf@sh@fg@#1}{}%
- {\csname pgf@sh@fg@#1\endcsname#4}%
+ {\pgfpushtype\pgfusetype{.foreground}\csname pgf@sh@fg@#1\endcsname#4\pgfpoptype}%
\pgfutil@ifundefined{pgf@sh@ffg@#1}{}%
- {{\pgfscope\csname pgf@sh@ffg@#1\endcsname\endpgfscope}}%
+ {{\pgfusetype{.before foreground}\pgfidscope\pgfscope\csname pgf@sh@ffg@#1\endcsname\endpgfscope\endpgfidscope}}%
\ifpgflatenodepositioning%
\pgf@shapes@late@pos@end%
+ \pgfsys@endscope%
\else%
\expandafter\pgf@nodecallback\expandafter{\pgf@node@name}%
\fi%
@@ -120,9 +126,11 @@
\pgf@relevantforpicturesizetrue%
\setbox\pgfpositionnodelaterbox=\hbox%
\bgroup%
+ \pgfsys@beginscope%
}
\def\pgf@shapes@late@pos@end{%
+ \pgfsys@endscope%
\egroup% Close box
\ifdim\pgf@picminx>\pgf@picmaxx\relax% happens for empty nodes
\def\pgfpositionnodelaterminx{0.0pt}%
@@ -539,15 +547,13 @@
\pgf@sh@reanchor{\csname pgf@sh@ns@#1\endcsname}{#2}%
{%
\pgfsettransform{\csname pgf@sh@nt@#1\endcsname}%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
- \global\pgf@x=\pgf@x%
- \global\pgf@y=\pgf@y%
+ \pgf@pos@transform@glob%
}%
% Add inter picture transformation
\pgf@shape@interpictureshift{#1}%
% Undo current transformation
\pgftransforminvert%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
}%
}%
}
@@ -605,7 +611,7 @@
\pgf@process{\pgfpointtransformed{#2}}%
\pgfsettransform{\csname pgf@sh@nt@#1\endcsname}%
\pgftransforminvert%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
\pgf@xa=\pgf@x%
\pgf@ya=\pgf@y%
\pgf@process{\csname pgf@anchor@\csname pgf@sh@ns@#1\endcsname @center\endcsname}%
@@ -614,7 +620,7 @@
\advance\pgf@ya by-\pgf@y%
\csname pgf@anchor@\csname pgf@sh@ns@#1\endcsname @border\endcsname{\pgfqpoint{\pgf@xa}{\pgf@ya}}%
\pgfsettransform{\csname pgf@sh@nt@#1\endcsname}%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
\global\pgf@x=\pgf@x%
\global\pgf@y=\pgf@y%
}%
@@ -622,7 +628,7 @@
\pgf@shape@interpictureshift{#1}%
% Undo current transformation
\pgftransforminvert%
- \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \pgf@pos@transform@glob%
}%
}%
}
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex
index 5f6479a1d7b..f87a884b417 100644
--- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesnakes.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmodulesnakes.code.tex,v 1.3 2013/07/15 12:05:34 tantau Exp $
+\ProvidesFileRCS{pgfmodulesnakes.code.tex}
\pgfwarning{Snakes have been superseded by decorations. Use the module decorations instead of snakes}
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesorting.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesorting.code.tex
index b85fde14501..497ea8591e8 100644
--- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesorting.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulesorting.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/modules/pgfmodulesorting.code.tex,v 1.1 2008/11/12 23:39:37 tantau Exp $
+\ProvidesFileRCS{pgfmodulesorting.code.tex}
%
% This file defines commands for sorting data. This is useful for 3d plots,
diff --git a/Master/texmf-dist/tex/generic/pgf/pgf.revision.tex b/Master/texmf-dist/tex/generic/pgf/pgf.revision.tex
new file mode 100644
index 00000000000..4651ba8b9c6
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/pgf.revision.tex
@@ -0,0 +1,15 @@
+\begingroup
+\catcode`\-=12
+\catcode`\/=12
+\catcode`\.=12
+\catcode`\:=12
+\catcode`\+=12
+\catcode`\-=12
+\gdef\pgfrevision{3.1}
+\gdef\pgfversion{3.1}
+\gdef\pgfversiondatetime{2019-01-05 11:28:22 +0100}
+\gdef\pgfrevisiondatetime{2019-01-05 11:28:22 +0100}
+\gdef\pgf@glob@TMPa#1-#2-#3 #4\relax{#1/#2/#3}
+\xdef\pgfversiondate{\expandafter\pgf@glob@TMPa\pgfversiondatetime\relax}
+\xdef\pgfrevisiondate{\expandafter\pgf@glob@TMPa\pgfrevisiondatetime\relax}
+\endgroup
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
index 38b32e39b57..01ae33272e7 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgf.cfg,v 1.7 2008/05/14 22:01:48 tantau Exp $
+\ProvidesFileRCS{pgf.cfg}
% Copy this file to somewhere local and uncomment one of the following
% if you do not trust/use/like the automatic driver selection
@@ -18,6 +18,7 @@
% \def\pgfsysdriver{pgfsys-dvipdfmx.def}
% \def\pgfsysdriver{pgfsys-dvips.def}
% \def\pgfsysdriver{pgfsys-pdftex.def}
+% \def\pgfsysdriver{pgfsys-luatex.def}
% \def\pgfsysdriver{pgfsys-tex4ht.def}
% \def\pgfsysdriver{pgfsys-textures.def}
% \def\pgfsysdriver{pgfsys-vtex.def}
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf-via-dvi.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf-via-dvi.def
index 1605a956260..1ba7515684b 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf-via-dvi.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf-via-dvi.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-pdf-via-dvi.def,v 1.8 2013/07/12 13:52:50 tantau Exp $
+\ProvidesFileRCS{pgfsys-common-pdf-via-dvi.def}
% Common driver commands for all drivers that produce pdf via the
% detour of a dvi file
@@ -16,57 +16,6 @@
% Hboxes
-\def\pgfsys@hbox#1{%
- \pgfsys@invoke{q -1 0 0 -1 0 0 cm}%
- \special{pdf: content -1 0 0 -1 0 0 cm 3 Tr q}% translate to
- % original coordinate system and do
- % not show anything
- {\hbox to 0pt{\pgfutil@font@normalfont\pgfutil@selectfont.\hss}}% enforce font change
- \pgfsys@invoke{0 Tr}%
- \pgfsys@invoke{0 J [] 0 d}% reset line cap and dash
- \wd#1=0pt%
- \ht#1=0pt%
- \dp#1=0pt%
- \box#1
- \pgfsys@invoke{n Q Q}%
-}
-\def\pgfsys@hboxsynced#1{%
- {%
- \pgfsys@beginscope%
- \setbox\pgf@hbox=\hbox{%
- \hskip\pgf@pt@x%
- \raise\pgf@pt@y\hbox{%
- \pgf@pt@x=0pt%
- \pgf@pt@y=0pt%
- \special{pdf: content q}%
- \pgflowlevelsynccm%
- \pgfsys@invoke{q -1 0 0 -1 0 0 cm}%
- \special{pdf: content -1 0 0 -1 0 0 cm q}% translate to original coordinate system
- \pgfsys@invoke{0 J [] 0 d}% reset line cap and dash
- \wd#1=0pt%
- \ht#1=0pt%
- \dp#1=0pt%
- \box#1%
- \pgfsys@invoke{n Q Q Q}%
- }%
- \hss%
- }%
- \wd\pgf@hbox=0pt%
- \ht\pgf@hbox=0pt%
- \dp\pgf@hbox=0pt%
- \pgfsys@hbox\pgf@hbox%
- \pgfsys@endscope%
- }%
-}
-
-\def\pgfsys@beginpicture{%
- \pgfsys@invoke{3 Tr}%
- \hbox to 0pt{\pgfutil@font@normalfont\pgfutil@selectfont.\hss}% enforce font change
- \pgfsys@invoke{0 Tr}%
- \special{pdf: content q}}
-\def\pgfsys@endpicture{%
- \pgfsys@invoke{n Q}%
-}
\def\pgfsys@beginpurepicture{\special{pdf: content q}}
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
index 32906ad3b64..ccac27335a3 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-pdf.def,v 1.13 2013/10/10 12:00:15 tantau Exp $
+\ProvidesFileRCS{pgfsys-common-pdf.def}
% Common driver commands for all drivers that produce pdf
@@ -60,6 +60,10 @@
\def\pgfsys@color@gray@stroke#1{\pgfsysprotocol@literal{#1 G}}
\def\pgfsys@color@gray@fill#1{\pgfsysprotocol@literal{#1 g}}
+% Visibility
+\def\pgfsys@begininvisiblescope{\pgfsys@beginscope{\pgfsys@discardpath\pgfsys@clipnext\pgfsys@moveto{0pt}{0pt}\pgfsys@discardpath}}
+\def\pgfsys@endinvisiblescope{\pgfsys@endscope}
+
% Opacity
\def\pgfsys@stroke@opacity#1{%
\expandafter\ifx\csname pgf@sys@pdf@so@#1\endcsname\relax%
@@ -75,6 +79,8 @@
\fi%
\pgfsysprotocol@literal{\csname pgf@sys@pdf@fo@#1\endcsname\space gs}%
}
+
+% Blending
\def\pgfsys@blend@mode#1{%
\expandafter\ifx\csname pgf@sys@pdf@bm@#1\endcsname\relax%
\expandafter\let\expandafter\pgf@temp\csname pgf@sys@pdf@blend@mode@map@#1\endcsname%
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def
index 52e0ef9b224..0f8ce5d0157 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-postscript.def,v 1.22 2008/10/01 14:19:33 tantau Exp $
+\ProvidesFileRCS{pgfsys-common-postscript.def}
% Driver commands for postscript
@@ -100,6 +100,11 @@
\def\pgfsys@beginscope{\pgfsysprotocol@literal{save}}
\def\pgfsys@endscope{\pgfsysprotocol@literal{restore}}
+\newif\ifpgfsys@ps@boxmode
+\def\pgfsys@begin@text{\pgfsys@ps@boxmodetrue}
+\def\pgfsys@end@text{}
+
+
% Graphics state
\def\pgfsys@setdash#1#2{%
\pgfsysprotocol@literalbuffered{[}%
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def
index f2edbedf3c9..4986feaa46e 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def
@@ -7,13 +7,16 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-svg.def,v 1.24 2013/08/28 11:00:54 tantau Exp $
+\ProvidesFileRCS{pgfsys-common-svg.def}
% Driver commands for svg
+
% Helping functions:
+\def\pgf@sys@svg@make@defs#1{\pgf@sys@fail{svg defs}}
+\def\pgf@sys@svg@ref@defs#1{\pgf@sys@fail{svg defs}}
\let\pgf@sys@svgpath=\pgfutil@empty
\def\pgf@sys@svgnum#1{%
{%
@@ -26,7 +29,10 @@
\def\pgf@sys@addtosvgpath#1{\pgfutil@g@addto@macro\pgf@sys@svgpath{#1\space}}
\def\pgf@sys@flushsvgpath{\pgfsysprotocol@literal{\pgf@sys@svgpath}\global\let\pgf@sys@svgpath=\pgfutil@empty}
\def\pgf@sys@svg@gs#1{%
- {\pgfsysprotocol@literal{<g #1>\pgfsys@svg@newline }}\global\advance\pgf@sys@svg@scopecount by1\relax%
+ {%
+ \pgfsysprotocol@literal{<g #1>\pgfsys@svg@newline}%
+ }%
+ \global\advance\pgf@sys@svg@scopecount by1\relax%
}
\newcount\pgf@sys@svg@objectcount
@@ -38,61 +44,92 @@
}
% Path construction:
-\def\pgfsys@lineto#1#2{\pgf@sys@addtosvgpath{L }\pgf@sys@svgnum{#1}\pgf@sys@svgnum{#2}}
-\def\pgfsys@moveto#1#2{\pgf@sys@addtosvgpath{M }\pgf@sys@svgnum{#1}\pgf@sys@svgnum{#2}}
+\def\pgfsys@lineto#1#2{\pgf@sys@addtosvgpath{L}\pgf@sys@svgnum{#1}\pgf@sys@svgnum{#2}}
+\def\pgfsys@moveto#1#2{\pgf@sys@addtosvgpath{M}\pgf@sys@svgnum{#1}\pgf@sys@svgnum{#2}}
\def\pgfsys@curveto#1#2#3#4#5#6{%
- \pgf@sys@addtosvgpath{C }%
+ \pgf@sys@addtosvgpath{C}%
\pgf@sys@svgnum{#1}\pgf@sys@svgnum{#2}%
\pgf@sys@svgnum{#3}\pgf@sys@svgnum{#4}%
\pgf@sys@svgnum{#5}\pgf@sys@svgnum{#6}}
\def\pgfsys@rect#1#2#3#4{%
\pgfsys@moveto{#1}{#2}%
- \pgf@sys@addtosvgpath{h }\pgf@sys@svgnum{#3}%
- \pgf@sys@addtosvgpath{v }\pgf@sys@svgnum{#4}%
- \pgf@sys@addtosvgpath{h }{\pgf@x=#3\pgf@x=-\pgf@x\pgf@sys@svgnum{\pgf@x}}%
+ \pgf@sys@addtosvgpath{h}\pgf@sys@svgnum{#3}%
+ \pgf@sys@addtosvgpath{v}\pgf@sys@svgnum{#4}%
+ \pgf@sys@addtosvgpath{h}{\pgf@x=#3\pgf@x=-\pgf@x\pgf@sys@svgnum{\pgf@x}}%
\pgfsys@closepath}
\def\pgfsys@closepath{\pgf@sys@addtosvgpath{Z}}
% Path usage:
\newif\ifpgf@sys@svg@clipnext
\def\pgf@sys@svg@possiblyclippedpath#1{%
+ \edef\pgf@sys@cacheref{\pgfsys@id@refcurrent}%
+ \pgfsys@if@fresh@currentid{\csname pgf@sys@svg@path@\pgf@sys@cacheref\endcsname}{}%
+ \let\pgfsys@anim@ba@d\pgfutil@empty
+ \csname pgfsys@anim@ba@\pgf@sys@cacheref\endcsname%
\ifpgf@sys@svg@clipnext%
\global\advance\pgf@sys@svg@objectcount by1\relax%
- \pgfsysprotocol@literal{<clipPath id="pgfcp\the\pgf@sys@svg@objectcount">
- <path id="pgfpath\the\pgf@sys@svg@objectcount" d="}%
- \pgf@sys@flushsvgpath%
- \pgfsysprotocol@literal{"/>\pgfsys@svg@newline </clipPath>\pgfsys@svg@newline }
- \pgfsysprotocol@literal{<use xlink:href="\#pgfpath\the\pgf@sys@svg@objectcount" #1/>\pgfsys@svg@newline }%
- \pgf@sys@svg@gs{clip-path="url(\#pgfcp\the\pgf@sys@svg@objectcount)"}
+ \pgfsysprotocol@literal{%
+ <clipPath id="\pgfsys@if@fresh@currentid{\pgf@sys@cacheref}{pgfcp\the\pgf@sys@svg@objectcount}clip">
+ <path id="\pgfsys@if@fresh@currentid{\pgf@sys@cacheref}{pgfcp\the\pgf@sys@svg@objectcount}" d="}%
+ \ifx\pgfsys@anim@ba@d\pgfutil@empty\pgf@sys@flushsvgpath\else\pgfsysprotocol@literal{\pgfsys@anim@ba@d}\fi%
+ \pgfsysprotocol@literal{"/> </clipPath>\pgfsys@svg@newline }
+ \pgfsysprotocol@literal{<use xlink:href="\#\pgfsys@if@fresh@currentid{\pgf@sys@cacheref}{pgfcp\the\pgf@sys@svg@objectcount}" %
+ \ifx\pgfsys@anim@ba@d\pgfutil@empty\else%
+ \ifx\pgfsys@anim@ba@markerstart\pgfutil@empty\else%
+ marker-start="url(\#\pgfsys@anim@ba@markerstart)" %
+ \fi%
+ \ifx\pgfsys@anim@ba@markerend\pgfutil@empty\else%
+ marker-end="url(\#\pgfsys@anim@ba@markerend)" %
+ \fi%
+ \fi%
+ #1/>\pgfsys@svg@newline }%
+ \pgf@sys@svg@gs{clip-path="url(\#\pgfsys@if@fresh@currentid{\pgfsys@id@refcurrent}{pgfcp\the\pgf@sys@svg@objectcount}clip)"}
\pgf@sys@svg@clipnextfalse%
\else%
- \pgfsysprotocol@literal{<path d="}%
- \pgf@sys@flushsvgpath%
- \pgfsysprotocol@literal{" #1/>\pgfsys@svg@newline }
+ \pgfsysprotocol@literal{<path\pgfsys@if@fresh@currentid{ id="\pgfsys@id@refcurrent"}{} d="}%
+ \ifx\pgfsys@anim@ba@d\pgfutil@empty\pgf@sys@flushsvgpath\else\pgfsysprotocol@literal{\pgfsys@anim@ba@d}\fi%
+ \pgfsysprotocol@literal{" %
+ \ifx\pgfsys@anim@ba@d\pgfutil@empty\else%
+ \ifx\pgfsys@anim@ba@markerstart\pgfutil@empty\else%
+ marker-start="url(\#\pgfsys@anim@ba@markerstart)" %
+ \fi%
+ \ifx\pgfsys@anim@ba@markerend\pgfutil@empty\else%
+ marker-end="url(\#\pgfsys@anim@ba@markerend)" %
+ \fi%
+ \fi%
+ #1/>\pgfsys@svg@newline }%
\fi%
+ \pgfsys@invalidate@currentid%
}
-\def\pgfsys@stroke{\pgf@sys@svg@possiblyclippedpath{style="fill:none"}}
-\def\pgfsys@fill{\pgf@sys@svg@possiblyclippedpath{style="stroke:none"}}
+\def\pgfsys@stroke{\pgf@sys@svg@possiblyclippedpath{fill="none"}}
+\def\pgfsys@fill{\pgf@sys@svg@possiblyclippedpath{stroke="none"}}
\def\pgfsys@fillstroke{\pgf@sys@svg@possiblyclippedpath{}}
\def\pgfsys@clipnext{\pgf@sys@svg@clipnexttrue}
\def\pgfsys@discardpath{%
\ifpgf@sys@svg@clipnext%
+ \edef\pgf@sys@cacheref{\pgfsys@id@refcurrent}%
+ \let\pgfsys@anim@ba@d\pgfutil@empty
+ \csname pgfsys@anim@ba@\pgf@sys@cacheref\endcsname%
\global\advance\pgf@sys@svg@objectcount by1\relax%
- \pgfsysprotocol@literal{<clipPath id="pgfcp\the\pgf@sys@svg@objectcount">
- <path d="}%
- \pgf@sys@flushsvgpath%
- \pgfsysprotocol@literal{"/>\pgfsys@svg@newline </clipPath>\pgfsys@svg@newline }
+ \pgfsysprotocol@literal{%
+ <clipPath id="pgfcp\the\pgf@sys@svg@objectcount">%
+ <path\pgfsys@if@fresh@currentid{ id="\pgfsys@id@refcurrent"}{} d="}%
+ \ifx\pgfsys@anim@ba@d\pgfutil@empty\pgf@sys@flushsvgpath\else\pgfsysprotocol@literal{\pgfsys@anim@ba@d}\fi%
+ \pgfsysprotocol@literal{"/> </clipPath>\pgfsys@svg@newline }
\pgf@sys@svg@gs{clip-path="url(\#pgfcp\the\pgf@sys@svg@objectcount)"}
\pgf@sys@svg@clipnextfalse%
\else%
\global\let\pgf@sys@svgpath=\pgfutil@empty
- \fi}
+ \fi%
+ \pgfsys@invalidate@currentid%
+}
% Fill rules:
\def\pgfsys@eoruletrue{\pgf@sys@svg@gs{fill-rule="evenodd"}}
\def\pgfsys@eorulefalse{\pgf@sys@svg@gs{fill-rule="nonzero"}}
% Transparency:
+\def\pgfsys@opacity#1{\pgf@sys@svg@gs{opacity="#1"}}
\def\pgfsys@stroke@opacity#1{\pgf@sys@svg@gs{stroke-opacity="#1"}}
\def\pgfsys@fill@opacity#1{\pgf@sys@svg@gs{fill-opacity="#1"}\def\pgf@sys@svg@opacity{#1}}
\def\pgf@sys@svg@opacity{1}
@@ -107,35 +144,174 @@
% Transformation:
\def\pgfsys@transformcm#1#2#3#4#5#6{%
{\pgf@x=#5\pgf@y=#6%
- \pgf@sys@svg@gs{transform="matrix(#1,#2,#3,#4,\pgf@sys@tonumber{\pgf@x},\pgf@sys@tonumber{\pgf@y})"}}}
+ \edef\pgf@temp{#1,#2,#3,#4}%
+ \ifx\pgf@temp\pgf@sys@svg@idtrans@text%
+ \ifdim\pgf@x=0pt\relax%
+ \ifdim\pgf@y=0pt%
+ \else%
+ \pgf@sys@svg@gs{transform="translate(\pgf@sys@tonumber{\pgf@x},\pgf@sys@tonumber{\pgf@y})"}%
+ \fi%
+ \else%
+ \pgf@sys@svg@gs{transform="translate(\pgf@sys@tonumber{\pgf@x},\pgf@sys@tonumber{\pgf@y})"}%
+ \fi%
+ \else%
+ \pgf@sys@svg@gs{transform="matrix(#1,#2,#3,#4,\pgf@sys@tonumber{\pgf@x},\pgf@sys@tonumber{\pgf@y})"}%
+ \fi}}
+\def\pgfsys@transformshift#1#2{%
+ {\pgf@x=#1\pgf@y=#2%
+ \ifdim\pgf@x=0pt\relax%
+ \ifdim\pgf@y=0pt%
+ \else%
+ \pgf@sys@svg@gs{transform="translate(\pgf@sys@tonumber{\pgf@x},\pgf@sys@tonumber{\pgf@y})"}%
+ \fi%
+ \else%
+ \pgf@sys@svg@gs{transform="translate(\pgf@sys@tonumber{\pgf@x},\pgf@sys@tonumber{\pgf@y})"}%
+ \fi}}
+\def\pgfsys@transformxyscale#1#2{%
+ {\pgf@x=#1pt\pgf@y=#2pt%
+ \pgf@sys@svg@gs{transform="scale(\pgf@sys@tonumber{\pgf@x},\pgf@sys@tonumber{\pgf@y})"}}}
+\def\pgfsys@viewboxmeet{\pgf@sys@svg@viewbox{meet}}
+\def\pgfsys@viewboxslice{\pgf@sys@svg@viewbox{slice}}
+\def\pgf@sys@svg@viewbox#1#2#3#4#5#6#7#8#9{%
+ {%
+ \edef\pgf@sys@cacheref{\pgfsys@id@refcurrent}%
+ \csname pgfsys@anim@ba@\pgf@sys@cacheref\endcsname%
+ \pgf@x#2%
+ \pgf@y#3%
+ \pgf@xa#4%
+ \pgf@ya#5%
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ \pgf@xb#6%
+ \pgf@yb#7%
+ \pgf@xc#8%
+ \pgf@yc#9%
+ \advance\pgf@xc by-\pgf@xb%
+ \advance\pgf@yc by-\pgf@yb%
+ \pgfsysprotocol@literal{<svg
+ overflow="visible"
+ preserveAspectRatio="xMidYMid #1"
+ \pgfsys@if@fresh@currentid{ id="\pgf@sys@cacheref"}{}
+ x="\pgf@sys@tonumber{\pgf@x}"
+ y="\pgf@sys@tonumber{\pgf@y}"
+ width="\pgf@sys@tonumber{\pgf@xa}"
+ height="\pgf@sys@tonumber{\pgf@ya}"
+ viewBox="%
+ \ifx\pgfsys@anim@ba@viewBox\pgfutil@empty%
+ \pgf@sys@tonumber{\pgf@xb} \pgf@sys@tonumber{\pgf@yb} \pgf@sys@tonumber{\pgf@xc} \pgf@sys@tonumber{\pgf@yc}%
+ \else%
+ \pgfsys@anim@ba@viewBox%
+ \fi%
+ ">}%
+ \pgfsys@invalidate@currentid%
+ }%
+}
+\def\pgfsys@endviewbox{\pgfsysprotocol@literal{</svg>}}
+
% Scopes
\newcount\pgf@sys@svg@scopecount
+
+\newif\ifpgfsys@svg@boxmode
+\def\pgfsys@begin@text{\pgfsys@beginscope\pgfsys@svg@boxmodetrue}
+\def\pgfsys@end@text{\pgfsys@endscope}
+
\def\pgfsys@beginscope{%
\edef\pgf@sys@svg@thescopecount{\the\pgf@sys@svg@scopecount}%
\begingroup%
+ \pgf@sys@svg@scopecount=0\relax%
+}
+\def\pgfsys@beginscope@#1{%
+ \edef\pgf@sys@svg@thescopecount{\the\pgf@sys@svg@scopecount}%
+ \begingroup%
\pgf@sys@svg@scopecount=1\relax%
- \pgfsysprotocol@literal{<g>\pgfsys@svg@newline }%
- }
+ \pgfsysprotocol@literal{<g#1>\pgfsys@svg@newline }%
+}
\def\pgfsys@endscope{%
\loop%
+ \ifnum\pgf@sys@svg@scopecount>0\relax%
\pgfsysprotocol@literal{</g>\pgfsys@svg@newline }%
\advance\pgf@sys@svg@scopecount by-1\relax%
- \ifnum\pgf@sys@svg@scopecount>0\relax%
\repeat%
\endgroup%
\global\pgf@sys@svg@scopecount=\pgf@sys@svg@thescopecount\relax%
}
+\newif\ifpgfsys@svg@close@strokenone
+\def\pgfsys@begin@idscope{%
+ \begingroup%
+ \pgfsys@if@fresh@currentid{%
+ \edef\pgf@sys@cacheref{\pgfsys@id@refcurrent}%
+ \let\pgf@sys@svg@ba@gs\pgfutil@empty%
+ \csname pgfsys@anim@ba@\pgf@sys@cacheref\endcsname%
+ \pgfsys@beginscope@{ id="\pgf@sys@cacheref" \pgf@sys@svg@ba@gs\pgfsys@svg@rdf}%
+ \expandafter\let\expandafter\pgf@sys@svg@end@id@scope@code\csname pgf@sys@att@end@\pgfsys@id@refcurrent\endcsname%
+ \let\pgf@sys@svg@end@id@scope\pgfsys@endscope%
+ \csname pgf@sys@att@beg@\pgfsys@id@refcurrent\endcsname%
+ }{%
+ \ifx\pgfsys@svg@rdf\pgfutil@empty%
+ \let\pgf@sys@svg@end@id@scope@code\relax%
+ \let\pgf@sys@svg@end@id@scope\relax%
+ \else%
+ \pgfsys@beginscope@{\pgfsys@svg@rdf}%
+ \let\pgf@sys@svg@end@id@scope@code\relax%
+ \let\pgf@sys@svg@end@id@scope\pgfsys@endscope%
+ \fi%
+ }%
+ \expandafter\global\expandafter\let\csname pgf@sys@att@beg@\pgfsys@id@refcurrent\endcsname\relax%
+ \expandafter\global\expandafter\let\csname pgf@sys@att@end@\pgfsys@id@refcurrent\endcsname\relax%
+ \ifpgfsys@svg@boxmode\pgfsysprotocol@literal{<g stroke="none">}\pgfsys@svg@close@strokenonetrue\fi%
+ \pgfsys@invalidate@currentid%
+ \begingroup%
+ \global\let\pgfsys@svg@rdf\pgfutil@empty%
+}
+\def\pgfsys@end@idscope{%
+ \endgroup%
+ \ifpgfsys@svg@close@strokenone\pgfsysprotocol@literal{</g>}\fi%
+ \pgf@sys@svg@end@id@scope@code%
+ \pgf@sys@svg@end@id@scope%
+ \endgroup%
+}
+\let\pgfsys@svg@rdf\pgfutil@empty%
+
+% IDs
+
+\newcount\pgf@sys@svg@type@count
+
+\def\pgfsys@clean@type#1#2{%
+ \expandafter\let\expandafter#1\csname pgf@sys@svg@lookup@#2\endcsname%
+ \if#1\relax%
+ \global\advance\pgf@sys@svg@type@count by1\relax%
+ \expandafter\xdef\csname pgf@sys@svg@lookup@#2\endcsname{t\the\pgf@sys@svg@type@count}%
+ \expandafter\let\expandafter#1\csname pgf@sys@svg@lookup@#2\endcsname%
+ \fi%
+}
+
+
% Graphics state
\def\pgfsys@setdash#1#2{%
- \edef\pgf@test@dashpattern{#1}%
- \ifx\pgf@test@dashpattern\pgfutil@empty%
- \pgf@sys@svg@gs{stroke-dasharray="none" stroke-dashoffset="#2"}%
- \else%
- \pgf@sys@svg@gs{stroke-dasharray="#1" stroke-dashoffset="#2"}%
- \fi}
-\def\pgfsys@setlinewidth#1{\pgf@sys@svg@gs{stroke-width="#1"}}
+ {%
+ \pgf@xa#2\relax%
+ \edef\pgf@test@dashpattern{#1}%
+ \ifx\pgf@test@dashpattern\pgfutil@empty%
+ \pgf@sys@svg@gs{stroke-dasharray="none" stroke-dashoffset="\pgf@sys@tonumber\pgf@xa"}%
+ \else%
+ \let\pgf@sys@svg@parsed@dash\pgfutil@empty%
+ \expandafter\pgf@sys@svg@parse@dash\pgf@test@dashpattern,\relax%
+ \pgf@sys@svg@gs{stroke-dasharray="\pgf@sys@svg@parsed@dash" stroke-dashoffset="\pgf@sys@tonumber\pgf@xa"}%
+ \fi%
+ }%
+}
+\def\pgf@sys@svg@parse@dash#1,{%
+ \pgf@x#1\relax%
+ \pgfutil@ifnextchar\relax{%
+ \edef\pgf@sys@svg@parsed@dash{\pgf@sys@svg@parsed@dash\pgf@sys@tonumber\pgf@x}%
+ }{%
+ \edef\pgf@sys@svg@parsed@dash{\pgf@sys@svg@parsed@dash\pgf@sys@tonumber\pgf@x,}%
+ \pgf@sys@svg@parse@dash%
+ }%
+}
+\def\pgfsys@setlinewidth#1{{\pgf@x=#1\pgf@sys@svg@gs{stroke-width="\pgf@sys@tonumber{\pgf@x}"}}}
\def\pgfsys@setmiterlimit#1{\pgf@sys@svg@gs{stroke-miterlimit="#1"}}
\def\pgfsys@buttcap{\pgf@sys@svg@gs{stroke-linecap="butt"}}
\def\pgfsys@roundcap{\pgf@sys@svg@gs{stroke-linecap="round"}}
@@ -144,34 +320,88 @@
\def\pgfsys@roundjoin{\pgf@sys@svg@gs{stroke-linejoin="round"}}
\def\pgfsys@beveljoin{\pgf@sys@svg@gs{stroke-linejoin="bevel"}}
+% Invisibility
+\def\pgfsys@begininvisible{\pgfsysprotocol@literal{<g visibility="hidden">\pgfsys@svg@newline }}
+\def\pgfsys@endinvisible{\pgfsysprotocol@literal{</g>}}
+\def\pgfsys@begininvisiblescope{\pgfsys@beginscope@{ visibility="hidden"}}
+\def\pgfsys@endinvisiblescope{\pgfsys@endscope}
+
%
% Color management
%
+\def\pgf@sys@svg@rgb@to@hash#1#2#3{%
+ {%
+ \pgf@sys@svg@do@color{#1}%
+ \let\pgf@sys@svg@ra\pgf@sys@svg@hex@first%
+ \let\pgf@sys@svg@rb\pgf@sys@svg@hex@second%
+ \pgf@sys@svg@do@color{#2}%
+ \let\pgf@sys@svg@ga\pgf@sys@svg@hex@first%
+ \let\pgf@sys@svg@gb\pgf@sys@svg@hex@second%
+ \pgf@sys@svg@do@color{#3}%
+ \let\pgf@sys@svg@ba\pgf@sys@svg@hex@first%
+ \let\pgf@sys@svg@bb\pgf@sys@svg@hex@second%
+ \xdef\pgf@sys@svg@prepared{\pgf@sys@svg@hash\pgf@sys@svg@ra\pgf@sys@svg@rb\pgf@sys@svg@ga\pgf@sys@svg@gb\pgf@sys@svg@ba\pgf@sys@svg@bb}%
+ \ifx\pgf@sys@svg@ra\pgf@sys@svg@rb%
+ \ifx\pgf@sys@svg@ga\pgf@sys@svg@gb%
+ \ifx\pgf@sys@svg@ba\pgf@sys@svg@bb%
+ \xdef\pgf@sys@svg@prepared{\pgf@sys@svg@hash\pgf@sys@svg@ra\pgf@sys@svg@ga\pgf@sys@svg@ba}%
+ \fi%
+ \fi%
+ \fi%
+ }%
+}
+
+\expandafter\def\csname pgf@svg@0\endcsname{0}
+\expandafter\def\csname pgf@svg@1\endcsname{1}
+\expandafter\def\csname pgf@svg@2\endcsname{2}
+\expandafter\def\csname pgf@svg@3\endcsname{3}
+\expandafter\def\csname pgf@svg@4\endcsname{4}
+\expandafter\def\csname pgf@svg@5\endcsname{5}
+\expandafter\def\csname pgf@svg@6\endcsname{6}
+\expandafter\def\csname pgf@svg@7\endcsname{7}
+\expandafter\def\csname pgf@svg@8\endcsname{8}
+\expandafter\def\csname pgf@svg@9\endcsname{9}
+\expandafter\def\csname pgf@svg@10\endcsname{a}
+\expandafter\def\csname pgf@svg@11\endcsname{b}
+\expandafter\def\csname pgf@svg@12\endcsname{c}
+\expandafter\def\csname pgf@svg@13\endcsname{d}
+\expandafter\def\csname pgf@svg@14\endcsname{e}
+\expandafter\def\csname pgf@svg@15\endcsname{f}
+
+\def\pgf@sys@svg@do@color#1{%
+ \pgf@x#1\relax%
+ \c@pgf@counta\pgf@x%
+ \divide\c@pgf@counta by256\relax%
+ \ifnum\c@pgf@counta>255\relax%
+ \c@pgf@counta=255\relax%
+ \fi%
+ \ifnum\c@pgf@counta<0\relax%
+ \c@pgf@counta=0\relax%
+ \fi%
+ \c@pgf@countb\c@pgf@counta\relax%
+ \divide\c@pgf@countb by16\relax%
+ \expandafter\let\expandafter\pgf@sys@svg@hex@first\csname pgf@svg@\the\c@pgf@countb\endcsname%
+ \multiply\c@pgf@countb by16\relax%
+ \advance\c@pgf@counta by-\c@pgf@countb\relax%
+ \expandafter\let\expandafter\pgf@sys@svg@hex@second\csname pgf@svg@\the\c@pgf@counta\endcsname%
+}
+
\def\pgf@sys@svg@color@rgb#1,#2,#3\relax{%
{%
- \pgf@xa=#1pt%
- \pgf@xa=100\pgf@xa%
- \pgf@xb=#2pt%
- \pgf@xb=100\pgf@xb%
- \pgf@xc=#3pt%
- \pgf@xc=100\pgf@xc%
- \xdef\pgf@sys@svg@prepared{rgb(\pgf@sys@tonumber\pgf@xa\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xb\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xc\pgf@sys@svg@percentchar)}%
- }%
+ \pgf@sys@svg@rgb@to@hash{#1pt}{#2pt}{#3pt}%
+ }%
}
\def\pgf@sys@svg@color@cmy#1,#2,#3\relax{%
{%
\pgf@xa=1pt%
\advance\pgf@xa by-#1pt%
- \pgf@xa=100\pgf@xa%
\pgf@xb=1pt%
\advance\pgf@xb by-#2pt%
- \pgf@xb=100\pgf@xb%
\pgf@xc=1pt%
\advance\pgf@xc by-#3pt%
- \pgf@xc=100\pgf@xc%
- \xdef\pgf@sys@svg@prepared{rgb(\pgf@sys@tonumber\pgf@xa\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xb\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xc\pgf@sys@svg@percentchar)}%
+ \pgf@sys@svg@rgb@to@hash{\pgf@xa}{\pgf@xb}{\pgf@xc}%
}%
}
\def\pgf@sys@svg@color@cmyk#1,#2,#3,#4\relax{%
@@ -181,27 +411,26 @@
\pgf@xa=#1\pgf@xa%
\advance\pgf@xa by#4pt%
\advance\pgf@xa by-1pt%
- \pgf@xa=-100\pgf@xa%
+ \pgf@xa=-\pgf@xa%
\pgf@xb=1pt%
\advance\pgf@xb by-#4pt%
\pgf@xb=#2\pgf@xb%
\advance\pgf@xb by#4pt%
\advance\pgf@xb by-1pt%
- \pgf@xb=-100\pgf@xb%
+ \pgf@xb=-\pgf@xb%
\pgf@xc=1pt%
\advance\pgf@xc by-#4pt%
\pgf@xc=#3\pgf@xc%
\advance\pgf@xc by#4pt%
\advance\pgf@xc by-1pt%
- \pgf@xc=-100\pgf@xc%
- \xdef\pgf@sys@svg@prepared{rgb(\pgf@sys@tonumber\pgf@xa\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xb\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xc\pgf@sys@svg@percentchar)}%
+ \pgf@xc=-\pgf@xc%
+ \pgf@sys@svg@rgb@to@hash{\pgf@xa}{\pgf@xb}{\pgf@xc}%
}%
}
\def\pgf@sys@svg@color@gray#1\relax{%
- {%
+ {%
\pgf@xa=#1pt%
- \pgf@xa=100\pgf@xa%
- \xdef\pgf@sys@svg@prepared{rgb(\pgf@sys@tonumber\pgf@xa\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xa\pgf@sys@svg@percentchar,\pgf@sys@tonumber\pgf@xa\pgf@sys@svg@percentchar)}%
+ \pgf@sys@svg@rgb@to@hash{\pgf@xa}{\pgf@xa}{\pgf@xa}%
}%
}
@@ -209,30 +438,100 @@
\ifpgfpicture\pgf@sys@svg@gs{#1}\fi%
}
+\def\pgf@sys@svg@colorpop{\special{color pop}}
+
+
+% RGB
\def\pgfsys@color@rgb@stroke#1#2#3{%
\pgf@sys@svg@color@rgb#1,#2,#3\relax%
+ \let\pgf@sys@svg@last@stroke\pgf@sys@svg@prepared%
\pgf@sys@svg@gs@color{stroke="\pgf@sys@svg@prepared"}}
\def\pgfsys@color@rgb@fill#1#2#3{%
- \pgf@sys@svg@color@rgb#1,#2,#3\relax%
- \pgf@sys@svg@gs@color{fill="\pgf@sys@svg@prepared"}}
+ \ifpgfpicture%
+ \pgf@sys@svg@color@rgb#1,#2,#3\relax%
+ \pgf@sys@svg@gs@color{fill="\pgf@sys@svg@prepared"}%
+ \else%
+ \special{color push rgb #1 #2 #3}%
+ \aftergroup\pgf@sys@svg@colorpop%
+ \fi}
+\def\pgfsys@color@rgb#1#2#3{%
+ \ifpgfpicture%
+ \pgf@sys@svg@color@rgb#1,#2,#3\relax%
+ \let\pgf@sys@svg@last@stroke\pgf@sys@svg@prepared%
+ \pgf@sys@svg@gs@color{\ifpgfsys@svg@boxmode\else stroke="\pgf@sys@svg@prepared" \fi fill="\pgf@sys@svg@prepared"}%
+ \else%
+ \special{color push rgb #1 #2 #3}%
+ \aftergroup\pgf@sys@svg@colorpop%
+ \fi}
+
+%CMYK
\def\pgfsys@color@cmyk@stroke#1#2#3#4{%
\pgf@sys@svg@color@cmyk#1,#2,#3,#4\relax%
+ \let\pgf@sys@svg@last@stroke\pgf@sys@svg@prepared%
\pgf@sys@svg@gs@color{stroke="\pgf@sys@svg@prepared"}}
\def\pgfsys@color@cmyk@fill#1#2#3#4{%
- \pgf@sys@svg@color@cmyk#1,#2,#3,#4\relax%
- \pgf@sys@svg@gs@color{fill="\pgf@sys@svg@prepared"}}
+ \ifpgfpicture%
+ \pgf@sys@svg@color@cmyk#1,#2,#3,#4\relax%
+ \pgf@sys@svg@gs@color{fill="\pgf@sys@svg@prepared"}%
+ \else%
+ \special{color push cmyk #1 #2 #3 #4}%
+ \aftergroup\pgf@sys@svg@colorpop%
+ \fi}
+\def\pgfsys@color@cmyk#1#2#3#4{%
+ \ifpgfpicture%
+ \pgf@sys@svg@color@cmyk#1,#2,#3,#4\relax%
+ \let\pgf@sys@svg@last@stroke\pgf@sys@svg@prepared%
+ \pgf@sys@svg@gs@color{\ifpgfsys@svg@boxmode\else stroke="\pgf@sys@svg@prepared" \fi fill="\pgf@sys@svg@prepared"}%
+ \else%
+ \special{color push cmyk #1 #2 #3 #4}%
+ \aftergroup\pgf@sys@svg@colorpop%
+ \fi}
+
+% CMY
\def\pgfsys@color@cmy@stroke#1#2#3{%
\pgf@sys@svg@color@cmy#1,#2,#3\relax%
+ \let\pgf@sys@svg@last@stroke\pgf@sys@svg@prepared%
\pgf@sys@svg@gs@color{stroke="\pgf@sys@svg@prepared"}}
\def\pgfsys@color@cmy@fill#1#2#3{%
- \pgf@sys@svg@color@cmy#1,#2,#3\relax%
- \pgf@sys@svg@gs@color{fill="\pgf@sys@svg@prepared"}}
+ \ifpgfpicture%
+ \pgf@sys@svg@color@cmy#1,#2,#3\relax%
+ \pgf@sys@svg@gs@color{fill="\pgf@sys@svg@prepared"}
+ \else%
+ \special{color push cmyk #1 #2 #3 0}%
+ \aftergroup\pgf@sys@svg@colorpop%
+ \fi}
+\def\pgfsys@color@cmy#1#2#3{%
+ \ifpgfpicture%
+ \pgf@sys@svg@color@cmy#1,#2,#3\relax%
+ \let\pgf@sys@svg@last@stroke\pgf@sys@svg@prepared%
+ \pgf@sys@svg@gs@color{\ifpgfsys@svg@boxmode\else stroke="\pgf@sys@svg@prepared" \fi fill="\pgf@sys@svg@prepared"}%
+ \else%
+ \special{color push cmyk #1 #2 #3 0}%
+ \aftergroup\pgf@sys@svg@colorpop%
+ \fi}
+
+% gray
\def\pgfsys@color@gray@stroke#1{%
\pgf@sys@svg@color@gray#1\relax%
+ \let\pgf@sys@svg@last@stroke\pgf@sys@svg@prepared%
\pgf@sys@svg@gs@color{stroke="\pgf@sys@svg@prepared"}}
\def\pgfsys@color@gray@fill#1{%
- \pgf@sys@svg@color@gray#1\relax%
- \pgf@sys@svg@gs@color{fill="\pgf@sys@svg@prepared"}}
+ \ifpgfpicture%
+ \pgf@sys@svg@color@gray#1\relax%
+ \pgf@sys@svg@gs@color{fill="\pgf@sys@svg@prepared"}%
+ \else%
+ \special{color push gray #1}%
+ \aftergroup\pgf@sys@svg@colorpop%
+ \fi}
+\def\pgfsys@color@gray#1{%
+ \ifpgfpicture%
+ \pgf@sys@svg@color@gray#1\relax%
+ \let\pgf@sys@svg@last@stroke\pgf@sys@svg@prepared%
+ \pgf@sys@svg@gs@color{\ifpgfsys@svg@boxmode\else stroke="\pgf@sys@svg@prepared" \fi fill="\pgf@sys@svg@prepared"}%
+ \else%
+ \special{color push gray #1}%
+ \aftergroup\pgf@sys@svg@colorpop%
+ \fi}
% Shadings:
@@ -286,7 +585,7 @@
{%
\pgf@parsefunc{#3}%
\global\advance\pgf@sys@svg@objectcount by1\relax%
- \pgf@sys@svg@addtostops{<linearGradient id="pgfsh\the\pgf@sys@svg@objectcount">\noexpand\pgfsys@svg@newline}
+ \pgf@sys@svg@addtostops{<linearGradient id="pgfsh\the\pgf@sys@svg@objectcount">\noexpand\pgfsys@svg@newline}%
\pgf@sys@svg@shading@stops%
\pgf@sys@svg@addtostops{</linearGradient>\noexpand\pgfsys@svg@newline}%
\pgf@process{\pgfpoint{\pgf@sys@shading@end@pos}{#2}}%
@@ -317,7 +616,7 @@
\global\advance\pgf@sys@svg@objectcount by1\relax%
\pgf@sys@svg@addtostops{<linearGradient
id="pgfsh\the\pgf@sys@svg@objectcount"
- gradientTransform="rotate(90)">\noexpand\pgfsys@svg@newline}
+ gradientTransform="rotate(90)">\noexpand\pgfsys@svg@newline}%
\pgf@sys@svg@shading@stops%
\pgf@sys@svg@addtostops{</linearGradient>\noexpand\pgfsys@svg@newline}%
\pgf@process{\pgfpoint{\pgf@sys@shading@end@pos}{#2}}%
@@ -352,7 +651,7 @@
id="pgfsh\the\pgf@sys@svg@objectcount"
fx="\pgf@sys@tonumber\pgf@x"
fy="\pgf@sys@tonumber\pgf@y"
- >\noexpand\pgfsys@svg@newline}
+ >\noexpand\pgfsys@svg@newline}%
\pgf@sys@svg@shading@stops%
\pgf@sys@svg@addtostops{</radialGradient>\noexpand\pgfsys@svg@newline}%
\pgf@xa=\pgf@sys@shading@end@pos%
@@ -373,8 +672,6 @@
% Patterns
-\iffalse % comment until interpage support is available
-
\def\pgfsys@declarepattern#1#2#3#4#5#6#7#8#9{%
% Start building the pattern dictionary:
\pgf@xa=#2\relax%
@@ -385,22 +682,22 @@
\pgf@yc=#7\relax%
\ifnum#9=1\relax%
% Colored. That's easy:
- \pgfsysprotocol@literal{
+ \pgf@sys@svg@make@defs{#1}{
<pattern
id="pgfpat#1"
patternUnits="userSpaceOnUse"
- width="\the\pgf@xc"
- height="\the\pgf@yc">
+ width="\pgf@sys@tonumber\pgf@xc"
+ height="\pgf@sys@tonumber\pgf@yc">
#8
</pattern>}%
\else%
% Uncolored. Yikes!
- \pgfsysprotocol@literal{
+ \pgf@sys@svg@make@defs{#1}{
<pattern
id="pgfpat#1"
patternUnits="userSpaceOnUse"
- width="\the\pgf@xc"
- height="\the\pgf@yc"/>
+ width="\pgf@sys@tonumber\pgf@xc"
+ height="\pgf@sys@tonumber\pgf@yc"/>
<symbol id="pgfsym#1">
#8
</symbol>}%
@@ -413,38 +710,884 @@
\pgfsysprotocol@literal{
<pattern id="pgfupat\the\pgf@sys@svg@objectcount" xlink:href="\#pgfpat#1">
<g stroke="\pgf@sys@svg@prepared" fill="\pgf@sys@svg@prepared"> <use xlink:href="\#pgfsym#1"/> </g>
- </pattern>}
+ </pattern>}%
+ \pgf@sys@svg@ref@defs{#1}%
\pgf@sys@svg@gs@color{fill="url(\#pgfupat\the\pgf@sys@svg@objectcount)"}%
}
\def\pgfsys@setpatterncolored#1{%
+ \pgf@sys@svg@ref@defs{#1}%
\pgf@sys@svg@gs@color{fill="url(\#pgfpat#1)"}%
}
-\fi
-% Fadings
+
+% Animation
+
+\pgfsysanimationsupportedtrue
+
+\let\pgfsys@anim@val@dur\pgfutil@empty
+\let\pgfsys@anim@val@restart\pgfutil@empty
+\let\pgfsys@anim@val@repeatCount\pgfutil@empty
+\let\pgfsys@anim@val@repeatDur\pgfutil@empty
+\let\pgfsys@anim@val@fill\pgfutil@empty
+\let\pgfsys@anim@val@keyTimes\pgfutil@empty
+\let\pgfsys@anim@val@keyPoints\pgfutil@empty
+\let\pgfsys@anim@val@keySplines\pgfutil@empty
+\let\pgfsys@anim@val@begin\pgfutil@empty
+\let\pgfsys@anim@val@end\pgfutil@empty
+\let\pgfsys@anim@val@additive\pgfutil@empty
+\let\pgfsys@anim@val@accumulate\pgfutil@empty
+\def\pgfsys@anim@val@calcMode{spline}
+\let\pgfsys@anim@val@from\pgfutil@empty
+\let\pgfsys@anim@val@to\pgfutil@empty
+\let\pgfsys@anim@val@path\pgfutil@empty
+\let\pgfsys@anim@val@rotate\pgfutil@empty
+\let\pgfsys@anim@val@values\pgfutil@empty
+\def\pgfsys@anim@val@canvas@trans{{}{}}
+\let\pgfsys@anim@val@@id\pgfutil@empty
+\let\pgfsys@anim@val@@type\pgfutil@empty
+\let\pgfsys@anim@val@base\pgfutil@empty
+\let\pgfsys@anim@val@idref\pgfutil@empty
+\expandafter\let\csname pgfsys@anim@val@xlink:href\endcsname\pgfutil@empty
+
+\def\pgf@sys@svg@key#1{%
+ \expandafter\ifx\csname pgfsys@anim@val@#1\endcsname\pgfutil@empty\else%
+ \space#1="\csname pgfsys@anim@val@#1\endcsname"%
+ \fi%
+}
+
+\def\pgf@svg@anim@keys{
+ \pgf@sys@svg@key{dur}%
+ \pgf@sys@svg@key{restart}%
+ \pgf@sys@svg@key{repeatCount}%
+ \pgf@sys@svg@key{repeatDur}%
+ \pgf@sys@svg@key{fill}%
+ \pgf@sys@svg@key{keyTimes}%
+ \pgf@sys@svg@key{keyPoints}%
+ \pgf@sys@svg@key{keySplines}%
+ \pgf@sys@svg@key{begin}%
+ \pgf@sys@svg@key{end}%
+ \pgf@sys@svg@key{additive}%
+ \pgf@sys@svg@key{accumulate}%
+ \pgf@sys@svg@key{calcMode}%
+ \pgf@sys@svg@key{values}%
+ \pgf@sys@svg@key{from}%
+ \pgf@sys@svg@key{to}%
+ \pgf@sys@svg@key{path}%
+ \pgf@sys@svg@key{rotate}%
+ \pgf@sys@svg@key{xlink:href}%
+}
+
+\newif\ifpgf@sys@at@least@one@event
+\def\pgf@sys@svg@do@events#1{%
+ \pgf@sys@at@least@one@eventfalse%
+ \def\pgf@sys@event@target{#1}%
+ \expandafter\expandafter\expandafter\pgf@sys@svg@do@events@now\csname pgf@sys@event@list@#1\endcsname\relax%
+}
+\def\pgf@sys@svg@do@events@now{%
+ \pgfutil@ifnextchar\relax{}{\pgf@sys@svg@do@event}%
+}
+\def\pgf@sys@svg@do@event#1#2#3#4{%
+ \pgf@sys@at@least@one@eventtrue%
+ %
+ {%
+ \edef\pgf@temp{#1}%
+ \ifx\pgf@temp\pgfutil@empty%
+ \else%
+ \pgfsys@register@type{#2}%
+ \def\pgf@temp{\pgfsys@id@ref{#1}{#2}.}%
+ \fi%
+ \edef\pgf@@temp{#4}%
+ \ifx\pgf@@temp\pgfutil@empty%
+ \pgf@x0pt%
+ \else%
+ \pgf@x#4pt%
+ \fi%
+ \ifx\pgf@sys@event@target\pgf@sys@begin@text%
+ \advance\pgf@x by\pgf@xa\relax%
+ \fi\relax%
+ \ifdim\pgf@x<0pt%
+ \edef\pgf@@temp{ \pgf@sys@tonumber\pgf@x s}%
+ \else
+ \edef\pgf@@temp{ +\pgf@sys@tonumber\pgf@x s}%
+ \fi%
+ \xdef\pgf@svg@anim@temp{\pgf@temp#3\pgf@@temp}%
+ }%
+ \pgf@sys@svg@append{\pgf@sys@event@target}{\pgf@svg@anim@temp}%
+ \global\let\pgf@svg@anim@temp\relax%
+ \pgf@sys@svg@do@events@now%
+}
+
+
+\newif\ifpgf@sys@svg@is@sync@base
+\def\pgf@sys@svg@anim#1#2#3{%
+ \ifx\pgfsys@anim@val@@id\pgfutil@empty%
+ \pgferror{Animation misses ``whom''}%
+ \else%
+ {%
+ \ifx\pgfsys@anim@val@base\pgfutil@empty%
+ \else%
+ % Hook into id:
+ \expandafter\let\expandafter\pgf@sys@temp\csname pgfsys@anim@ba@\pgfsys@anim@val@idref\endcsname%
+ \ifx\pgf@sys@temp\relax%
+ \edef\pgf@sys@temp{\global\let\expandafter\noexpand\csname pgfsys@anim@ba@\pgfsys@anim@val@idref\endcsname\relax\noexpand\pgfsys@anim@ba@setup}%
+ \fi%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@sys@temp\expandafter\expandafter\expandafter{\expandafter\pgf@sys@temp\expandafter\def\expandafter#3\expandafter{\pgfsys@anim@val@base}}%
+ \expandafter\global\expandafter\let\csname pgfsys@anim@ba@\pgfsys@anim@val@idref\endcsname\pgf@sys@temp%
+ \fi%
+ \pgf@sys@svg@tl@eval%
+ \pgf@sys@svg@do@events{begin}%
+ \ifpgf@sys@at@least@one@event%
+ \else%
+ \pgf@sys@svg@append{begin}{\ifdim\pgf@xa>0pt+\fi\pgf@sys@tonumber\pgf@xa s}%
+ \fi%
+ \pgf@sys@svg@do@events{end}%
+ #2%
+ % Suppress empty, superfluous animations:
+ \pgfutil@tempswatrue%
+ \pgfsys@if@fresh@currentid{}{%
+ \ifx\pgfsys@anim@val@values\pgfutil@empty%
+ \ifx\pgfsys@anim@val@to\pgfutil@empty%
+ \ifx\pgfsys@anim@val@dur\pgfutil@empty%
+ \pgfutil@tempswafalse%
+ \fi%
+ \fi%
+ \fi}
+ \ifpgfutil@tempswa%
+ \edef\pgf@temp{{<animate #1\pgfsys@if@fresh@currentid{ id="\pgfsys@id@refcurrent"}{}\pgf@svg@anim@keys/>\pgfsys@svg@newline}}%
+ \expandafter\pgfsysprotocol@literal\pgf@temp%
+ \fi%
+ \pgfsys@invalidate@currentid%
+ }%
+ \fi%
+}
+
+\def\pgf@sys@svg@anim@path{%
+ % animate a path...
+ \ifx\pgfsys@anim@val@@id\pgfutil@empty%
+ \pgferror{Animation misses ``whom''}%
+ \else%
+ {%
+ \let\pgf@sys@svg@add@code\pgfutil@empty%
+ %
+ % Setup markers:
+ %
+ % Setup start
+ \ifx\pgf@svg@anim@marker@start\pgfutil@empty%
+ \let\pgf@sys@svg@marker@id@start\pgfutil@empty%
+ \else%
+ \global\advance\pgf@sys@svg@objectcount by1\relax%
+ \edef\pgf@sys@svg@marker@id{pgf\the\pgf@sys@svg@objectcount}%
+ \edef\pgf@sys@svg@add@code{%
+ \noexpand\pgf@sys@svg@ref@defs{pgfs\pgf@svg@anim@marker@start}%
+ \noexpand\pgfsysprotocol@literal{<marker id="\pgf@sys@svg@marker@id" markerUnits="userSpaceOnUse" orient="auto" overflow="visible">
+ <use xlink:href="\#pgfs\pgf@svg@anim@marker@start" transform="scale(-1,-1)"/> </marker>\pgfsys@svg@newline}%
+ }%
+ \let\pgf@sys@svg@marker@id@start\pgf@sys@svg@marker@id%
+ \fi%
+ % Setup end
+ \ifx\pgf@svg@anim@marker@end\pgfutil@empty%
+ \let\pgf@sys@svg@marker@id@end\pgfutil@empty%
+ \else%
+ \global\advance\pgf@sys@svg@objectcount by1\relax%
+ \edef\pgf@sys@svg@marker@id{pgf\the\pgf@sys@svg@objectcount}%
+ \edef\pgf@sys@svg@add@code@{%
+ \noexpand\pgf@sys@svg@ref@defs{pgfs\pgf@svg@anim@marker@end}%
+ \noexpand\pgfsysprotocol@literal{<marker id="\pgf@sys@svg@marker@id" markerUnits="userSpaceOnUse" orient="auto" overflow="visible">
+ <use xlink:href="\#pgfs\pgf@svg@anim@marker@end"/> </marker>\pgfsys@svg@newline}%
+ }%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@sys@svg@add@code\expandafter\expandafter\expandafter{\expandafter\pgf@sys@svg@add@code\pgf@sys@svg@add@code@}%
+ \let\pgf@sys@svg@marker@id@end\pgf@sys@svg@marker@id%
+ \fi%
+ \ifx\pgfsys@anim@val@base\pgfutil@empty%
+ \else%
+ % Hook into id of path:
+ \expandafter\let\expandafter\pgf@sys@temp\csname pgfsys@anim@ba@\pgfsys@anim@val@idref\endcsname%
+ \ifx\pgf@sys@temp\relax%
+ \edef\pgf@sys@temp{\global\let\expandafter\noexpand\csname pgfsys@anim@ba@\pgfsys@anim@val@idref\endcsname\relax\noexpand\pgfsys@anim@ba@setup}%
+ \fi%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@sys@temp\expandafter\expandafter\expandafter{\expandafter\pgf@sys@temp\expandafter\def\expandafter\pgfsys@anim@ba@d\expandafter{\pgfsys@anim@val@base}}%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@sys@temp\expandafter\expandafter\expandafter{\expandafter\pgf@sys@temp\expandafter\def\expandafter\pgfsys@anim@ba@markerstart\expandafter{\pgf@sys@svg@marker@id@start}}%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@sys@temp\expandafter\expandafter\expandafter{\expandafter\pgf@sys@temp\expandafter\def\expandafter\pgfsys@anim@ba@markerend\expandafter{\pgf@sys@svg@marker@id@end}}%
+ \expandafter\global\expandafter\let\csname pgfsys@anim@ba@\pgfsys@anim@val@idref\endcsname\pgf@sys@temp%
+ \fi%
+ \pgf@sys@svg@tl@eval%
+ \pgf@sys@svg@do@events{begin}%
+ \ifpgf@sys@at@least@one@event%
+ \else%
+ \pgf@sys@svg@append{begin}{\ifdim\pgf@xa>0pt+\fi\pgf@sys@tonumber\pgf@xa s}%
+ \fi%
+ \pgf@sys@svg@do@events{end}%
+ % Suppress empty, superfluous animations:
+ \pgfutil@tempswatrue%
+ \pgfsys@if@fresh@currentid{}{%
+ \ifx\pgfsys@anim@val@values\pgfutil@empty%
+ \ifx\pgfsys@anim@val@to\pgfutil@empty%
+ \ifx\pgfsys@anim@val@dur\pgfutil@empty%
+ \pgfutil@tempswafalse%
+ \fi%
+ \fi%
+ \fi}
+ \ifpgfutil@tempswa%
+ % Ok, first, animate the path:
+ \edef\pgf@temp{%
+ {%
+ <animate attributeName="d"\pgfsys@if@fresh@currentid{ id="\pgfsys@id@refcurrent"}{}\pgf@svg@anim@keys/>\pgfsys@svg@newline
+ <animate attributeName="marker-start"\pgfsys@if@fresh@currentid{ id="\pgfsys@id@refcurrent-ms"}{}%
+ \pgf@sys@svg@key{dur}%
+ \pgf@sys@svg@key{restart}%
+ \pgf@sys@svg@key{repeatCount}%
+ \pgf@sys@svg@key{repeatDur}%
+ \pgf@sys@svg@key{fill}%
+ \pgf@sys@svg@key{begin}%
+ \pgf@sys@svg@key{end}%
+ \pgf@sys@svg@key{xlink:href}
+ from="\ifx\pgf@svg@anim@marker@start\pgfutil@empty none\else url(\#\pgf@sys@svg@marker@id@start)\fi"
+ to="\ifx\pgf@svg@anim@marker@start\pgfutil@empty none\else url(\#\pgf@sys@svg@marker@id@start)\fi"
+ />\pgfsys@svg@newline%
+ <animate attributeName="marker-end"\pgfsys@if@fresh@currentid{ id="\pgfsys@id@refcurrent-me"}{}%
+ \pgf@sys@svg@key{dur}%
+ \pgf@sys@svg@key{restart}%
+ \pgf@sys@svg@key{repeatCount}%
+ \pgf@sys@svg@key{repeatDur}%
+ \pgf@sys@svg@key{fill}%
+ \pgf@sys@svg@key{begin}%
+ \pgf@sys@svg@key{end}%
+ \pgf@sys@svg@key{xlink:href}
+ from="\ifx\pgf@svg@anim@marker@end\pgfutil@empty none\else url(\#\pgf@sys@svg@marker@id@end)\fi"
+ to="\ifx\pgf@svg@anim@marker@end\pgfutil@empty none\else url(\#\pgf@sys@svg@marker@id@end)\fi"
+ />\pgfsys@svg@newline%
+ }}%
+ \expandafter\pgfsysprotocol@literal\pgf@temp%
+ \fi%
+ \ifx\pgf@sys@svg@add@code\pgfutil@empty%
+ \else%
+ \expandafter\let\expandafter\pgf@sys@svg@add@code@\csname pgf@sys@svg@path@\pgfsys@id@ref{\pgfsys@anim@val@@id}{\pgfsys@anim@val@@type}\endcsname%
+ \ifx\pgf@sys@svg@add@code@\relax%
+ \else%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@sys@svg@add@code\expandafter\expandafter\expandafter{\expandafter\pgf@sys@svg@add@code\pgf@sys@svg@add@code@}%
+ \fi%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@sys@svg@add@code%
+ \expandafter\expandafter\expandafter{\expandafter\pgf@sys@svg@add@code\expandafter\global\expandafter\let\csname pgf@sys@svg@path@\pgfsys@id@ref{\pgfsys@anim@val@@id}{\pgfsys@anim@val@@type}\endcsname\relax}%
+ \expandafter\global\expandafter\let\csname pgf@sys@svg@path@\pgfsys@id@ref{\pgfsys@anim@val@@id}{\pgfsys@anim@val@@type}\endcsname\pgf@sys@svg@add@code%
+ \fi%
+ \pgfsys@invalidate@currentid%
+ }%
+ \fi%
+}
+
+\def\pgfsys@anim@ba@setup{%
+ \let\pgfsys@anim@ba@opacity\pgfutil@empty%
+ \let\pgfsys@anim@ba@fillopacity\pgfutil@empty%
+ \let\pgfsys@anim@ba@strokeopacity\pgfutil@empty%
+ \let\pgfsys@anim@ba@visibility\pgfutil@empty%
+ \let\pgfsys@anim@ba@strokewidth\pgfutil@empty%
+ \let\pgfsys@anim@ba@fill\pgfutil@empty%
+ \let\pgfsys@anim@ba@stroke\pgfutil@empty%
+ \let\pgfsys@anim@ba@strokedasharray\pgfutil@empty%
+ \let\pgfsys@anim@ba@strokedashoffset\pgfutil@empty%
+ \let\pgf@sys@svg@ba@gs\pgf@sys@svg@ba@gs@do@now%
+}
+\let\pgfsys@anim@ba@opacity\pgfutil@empty%
+\let\pgfsys@anim@ba@fillopacity\pgfutil@empty%
+\let\pgfsys@anim@ba@strokeopacity\pgfutil@empty%
+\let\pgfsys@anim@ba@visibility\pgfutil@empty%
+\let\pgfsys@anim@ba@strokewidth\pgfutil@empty%
+\let\pgfsys@anim@ba@fill\pgfutil@empty%
+\let\pgfsys@anim@ba@stroke\pgfutil@empty%
+\let\pgfsys@anim@ba@viewBox\pgfutil@empty%
+\let\pgfsys@anim@ba@d\pgfutil@empty%
+\let\pgfsys@anim@ba@strokedasharray\pgfutil@empty%
+\let\pgfsys@anim@ba@strokedashoffset\pgfutil@empty%
+\let\pgfsys@anim@ba@markerstart\pgfutil@empty%
+\let\pgfsys@anim@ba@markerendd\pgfutil@empty%
+
+\def\pgf@sys@svg@ba@gs@do@now{%
+ \ifx\pgfsys@anim@ba@fill\pgfutil@empty\else fill="\pgfsys@anim@ba@fill" \fi%
+ \ifx\pgfsys@anim@ba@stroke\pgfutil@empty\else stroke="\pgfsys@anim@ba@stroke" \fi%
+ \ifx\pgfsys@anim@ba@opacity\pgfutil@empty\else opacity="\pgfsys@anim@ba@opacity" \fi%
+ \ifx\pgfsys@anim@ba@fillopacity\pgfutil@empty\else fill-opacity="\pgfsys@anim@ba@fillopacity" \fi%
+ \ifx\pgfsys@anim@ba@strokeopacity\pgfutil@empty\else stroke-opacity="\pgfsys@anim@ba@strokeopacity" \fi%
+ \ifx\pgfsys@anim@ba@visibility\pgfutil@empty\else visibility="\pgfsys@anim@ba@visibility" \fi%
+ \ifx\pgfsys@anim@ba@strokewidth\pgfutil@empty\else stroke-width="\pgfsys@anim@ba@strokewidth" \fi%
+ \ifx\pgfsys@anim@ba@strokedasharray\pgfutil@empty\else stroke-dasharray="\pgfsys@anim@ba@strokedasharray" \fi%
+ \ifx\pgfsys@anim@ba@strokedashoffset\pgfutil@empty\else stroke-dashoffset="\pgfsys@anim@ba@strokedashoffset" \fi%
+}
+
+
+
+\newcount\pgf@sys@svg@canvascount
+\def\pgf@sys@svg@anim@trans#1#2#3{%
+ \ifx\pgfsys@anim@val@@id\pgfutil@empty%
+ \pgferror{Animation misses ``whom''}%
+ \else%
+ {%
+ %
+ \global\advance\pgf@sys@svg@canvascount by1\relax%
+ \pgf@sys@svg@tl@eval%
+ \pgf@sys@svg@do@events{begin}%
+ \ifpgf@sys@at@least@one@event%
+ \else%
+ \pgf@sys@svg@append{begin}{\ifdim\pgf@xa>0pt+\fi\pgf@sys@tonumber\pgf@xa s}%
+ \fi%
+ \pgf@sys@svg@do@events{end}%
+ #2%
+ \pgfsys@register@type{\pgfsys@anim@val@@type}%
+ \pgf@sys@svg@replace{xlink:href}{\#\pgfsys@id@ref{\pgfsys@anim@val@@id canvas\the\pgf@sys@svg@canvascount}{\pgfsys@anim@val@@type}}%
+ \ifx\pgfsys@anim@val@base\pgfutil@empty%
+ \let\pgf@sys@svg@base@trans\pgfutil@empty%
+ \else%
+ \edef\pgf@sys@svg@base@trans{ transform="#3(\pgfsys@anim@val@base)"}%
+ \fi%
+ \pgfsysprotocol@literal{<#1\pgfsys@if@fresh@currentid{ id="\pgfsys@id@refcurrent"}{}\pgf@svg@anim@keys/>\pgfsys@svg@newline}%
+ \pgfsys@invalidate@currentid%
+ \edef\pgf@temp{{\pgfsys@id@ref{\pgfsys@anim@val@@id
+ canvas\the\pgf@sys@svg@canvascount}{\pgfsys@anim@val@@type}}}%
+ \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\pgf@sys@svg@attacher%
+ \expandafter\expandafter\expandafter\pgf@temp\expandafter\pgfsys@anim@val@canvas@trans\expandafter{\pgf@sys@svg@base@trans}%
+ }%
+ \fi%
+}
+
+\newif\ifpgf@sys@svg@called
+\def\pgf@sys@svg@attacher#1#2#3#4{%
+ \toks0{%
+ {%
+ \let\pgfsys@transformcm\pgfsys@anim@transformcm%
+ \global\pgf@sys@svg@calledfalse%
+ #2%
+ \ifpgf@sys@svg@called\else\pgfsysprotocol@literal{<g>}\fi%
+ \pgfsysprotocol@literal{<g id="#1"#4>}
+ {%
+ \global\pgf@sys@svg@calledfalse%
+ #3%
+ \ifpgf@sys@svg@called\else\pgfsysprotocol@literal{<g>}\fi%
+ }%
+ }%
+ }%
+ \edef\pgf@sys@svg@beg{\the\toks0}%
+ \def\pgf@sys@svg@end{\pgfsysprotocol@literal{</g></g></g>\noexpand\pgfsys@svg@newline}}%
+ \expandafter\expandafter\expandafter\pgfsys@attach@to@id%
+ \expandafter\expandafter\expandafter\pgfsys@anim@val@@id%
+ \expandafter\expandafter\expandafter\pgfsys@anim@val@@type%
+ \expandafter\expandafter\expandafter{\expandafter\pgf@sys@svg@beg\expandafter}\expandafter{\pgf@sys@svg@end}%
+}
+
+
+\def\pgfsys@anim@transformcm#1#2#3#4#5#6{%
+ \ifpgf@sys@svg@called%
+ \pgferror{Double transformation calls in animation}%
+ \else%
+ {%
+ \pgf@x=#5\pgf@y=#6%
+ \edef\pgf@temp{ transform="matrix(#1,#2,#3,#4,\pgf@sys@tonumber{\pgf@x},\pgf@sys@tonumber{\pgf@y})"}%
+ \ifx\pgf@temp\pgf@sys@svg@idmat@stext%
+ \let\pgf@temp\pgfutil@empty%
+ \fi%
+ \pgfsysprotocol@literal{<g\pgf@temp>}%
+ }%
+ \global\pgf@sys@svg@calledtrue%
+ \fi%
+}
+\def\pgf@sys@svg@idtrans@text{1.0,0.0,0.0,1.0}
+\def\pgf@sys@svg@idmat@text{transform="matrix(1.0,0.0,0.0,1.0,0.0,0.0)"}
+\def\pgf@sys@svg@idmat@stext{ transform="matrix(1.0,0.0,0.0,1.0,0.0,0.0)"}
+
+\def\pgf@sys@svg@replace#1#2{%
+ \expandafter\edef\csname pgfsys@anim@val@#1\endcsname{#2}%
+}
+
+\def\pgf@sys@svg@append#1#2{%
+ \expandafter\let\expandafter\pgf@svg@anim@temp@\csname pgfsys@anim@val@#1\endcsname%
+ \ifx\pgf@svg@anim@temp@\pgfutil@empty%
+ \expandafter\edef\csname pgfsys@anim@val@#1\endcsname{#2}%
+ \else\ifx\pgf@svg@anim@temp@\relax%
+ \pgfutil@packageerror{pgfsys}{Unknown animation key '#1'}{}
+ \else%
+ \edef\pgf@svg@anim@temp@{\pgf@svg@anim@temp@;#2}%
+ \expandafter\let\csname pgfsys@anim@val@#1\endcsname\pgf@svg@anim@temp@%
+ \fi\fi%
+}
+
+% The actual animate command
+\def\pgfsys@animate#1{%
+ \expandafter\let\expandafter\pgf@sys@temp\csname pgfsys@svg@animate#1\endcsname\relax%
+ \ifx\pgf@sys@temp\relax%
+ \pgf@sys@fail{animation attribute #1}%
+ \else%
+ \pgf@sys@temp%
+ \fi%
+}
+
+
+% The non-transforming animations
+\def\pgfsys@svg@animatenone{}
+\def\pgfsys@svg@animateopacity{\pgf@sys@svg@anim{attributeName="opacity"}{}{\pgfsys@anim@ba@opacity}}
+\def\pgfsys@svg@animatefillopacity{\pgf@sys@svg@anim{attributeName="fill-opacity"}{}{\pgfsys@anim@ba@fillopacity}}
+\def\pgfsys@svg@animatestrokeopacity{\pgf@sys@svg@anim{attributeName="stroke-opacity"}{}{\pgfsys@anim@ba@strokeopacity}}
+\def\pgfsys@svg@animatevisibility{\pgf@sys@svg@anim{attributeName="visibility"}{}{\pgfsys@anim@ba@visibility}}
+\def\pgfsys@svg@animatelinewidth{\pgf@sys@svg@anim{attributeName="stroke-width"}{}{\pgfsys@anim@ba@strokewidth}}
+\def\pgfsys@svg@animatecolor{\pgf@sys@svg@anim{attributeName="fill"}{}{\pgfsys@anim@ba@fill}\pgf@sys@svg@anim{attributeName="stroke"}{}{\pgfsys@anim@ba@stroke}}
+\def\pgfsys@svg@animatefillcolor{\pgf@sys@svg@anim{attributeName="fill"}{}{\pgfsys@anim@ba@fill}}
+\def\pgfsys@svg@animatestrokecolor{\pgf@sys@svg@anim{attributeName="stroke"}{}{\pgfsys@anim@ba@stroke}}
+\def\pgfsys@svg@animateviewbox{\pgf@sys@svg@anim{attributeName="viewBox"}{}{\pgfsys@anim@ba@viewBox}}
+\def\pgfsys@svg@animatepath{\pgf@sys@svg@anim@path}
+\def\pgfsys@svg@animatesyncbase{{\pgf@sys@svg@is@sync@basetrue\pgf@sys@svg@anim{}{}{}}}
+\def\pgfsys@svg@animatedash{%
+ \pgf@svg@anim@prep@dash{\pgfsys@anim@val@base}{\pgfsys@anim@val@base@array}{\pgfsys@anim@val@base@offset}%
+ \let\pgfsys@anim@val@base\pgfsys@anim@val@base@array%
+ \pgf@sys@svg@anim{attributeName="stroke-dasharray"}{%
+ \pgf@svg@anim@prep@dash{\pgfsys@anim@val@from}{\pgfsys@anim@val@from@array}{\pgfsys@anim@val@from@offset}%
+ \pgf@svg@anim@prep@dash{\pgfsys@anim@val@to}{\pgfsys@anim@val@to@array}{\pgfsys@anim@val@to@offset}%
+ \pgf@svg@anim@prep@dash{\pgfsys@anim@val@values}{\pgfsys@anim@val@values@array}{\pgfsys@anim@val@values@offset}%
+ \let\pgfsys@anim@val@from\pgfsys@anim@val@from@array%
+ \let\pgfsys@anim@val@to\pgfsys@anim@val@to@array%
+ \let\pgfsys@anim@val@values\pgfsys@anim@val@values@array%
+ }{\pgfsys@anim@ba@strokedasharray}%
+ \let\pgfsys@anim@val@base\pgfsys@anim@val@base@offset%
+ \pgf@sys@svg@anim{attributeName="stroke-dashoffset"}{%
+ \pgf@svg@anim@prep@dash{\pgfsys@anim@val@from}{\pgfsys@anim@val@from@array}{\pgfsys@anim@val@from@offset}%
+ \pgf@svg@anim@prep@dash{\pgfsys@anim@val@to}{\pgfsys@anim@val@to@array}{\pgfsys@anim@val@to@offset}%
+ \pgf@svg@anim@prep@dash{\pgfsys@anim@val@values}{\pgfsys@anim@val@values@array}{\pgfsys@anim@val@values@offset}%
+ \let\pgfsys@anim@val@from\pgfsys@anim@val@from@offset%
+ \let\pgfsys@anim@val@to\pgfsys@anim@val@to@offset%
+ \let\pgfsys@anim@val@values\pgfsys@anim@val@values@offset%
+ }{\pgfsys@anim@ba@strokedashoffset}%
+}
+
+% The transforming animations
+\def\pgfsys@svg@animatetranslate{\pgf@sys@svg@anim@trans{animateTransform attributeName="transform" type="translate"}{}{translate}}
+\def\pgfsys@svg@animatescale{\pgf@sys@svg@anim@trans{animateTransform attributeName="transform" type="scale"}{}{scale}}
+\def\pgfsys@svg@animaterotate{\pgf@sys@svg@anim@trans{animateTransform attributeName="transform" type="rotate"}{}{rotate}}
+\def\pgfsys@svg@animateskewx{\pgf@sys@svg@anim@trans{animateTransform attributeName="transform" type="skewX"}{}{skewX}}
+\def\pgfsys@svg@animateskewy{\pgf@sys@svg@anim@trans{animateTransform attributeName="transform" type="skewY"}{}{skewY}}
+\def\pgfsys@svg@animatemotion{\pgf@sys@svg@anim@trans{animateMotion}{%
+ \let\pgfsys@anim@val@base\pgfutil@empty%
+ \let\pgfsys@anim@val@keyPoints\pgfsys@anim@val@values%
+ \let\pgfsys@anim@val@values\pgfutil@empty%
+ \ifx\pgfsys@anim@val@keyTimes\pgfutil@empty%
+ \let\pgfsys@anim@val@keyPoints\pgfutil@empty%
+ \fi%
+ }{}}
+
+% The keys
+\def\pgfsys@animation@whom#1#2{%
+ % Animations must "look forward"...
+ \pgfsys@if@fresh@id{#1}{#2}{}{\pgferror{Animations must precede the to-be-animated objects (``whom'')}}%
+ \pgf@sys@svg@replace{@id}{#1}%
+ \pgf@sys@svg@replace{@type}{#2}%
+ \pgf@sys@svg@replace{xlink:href}{\#\pgfsys@id@ref{#1}{#2}}%
+ \pgf@sys@svg@replace{idref}{\pgfsys@id@ref{#1}{#2}}%
+}
+\def\pgfsys@animation@restart@always{\pgf@sys@svg@replace{restart}{always}}
+\def\pgfsys@animation@restart@never{\pgf@sys@svg@replace{restart}{never}}
+\def\pgfsys@animation@restart@whennotactive{\pgf@sys@svg@replace{restart}{whenNotActive}}
+\def\pgfsys@animation@repeat@indefinite{\pgf@sys@svg@replace{repeatCount}{indefinite}}
+\def\pgfsys@animation@repeat#1{\pgf@sys@svg@replace{repeatCount}{#1}}
+\def\pgfsys@animation@repeat@dur#1{\pgf@sys@svg@replace{repeatDur}{#1}}
+\def\pgfsys@animation@freezeatend{\pgf@sys@svg@replace{fill}{freeze}}
+\def\pgfsys@animation@removeatend{\pgf@sys@svg@replace{fill}{remove}}
+\def\pgfsys@animation@canvas@transform#1#2{\def\pgfsys@anim@val@canvas@trans{{#1}{#2}}}
+\def\pgfsys@animation@offset#1#2{\pgfsys@animation@event{}{}{}{#1}{#2}}
+\def\pgfsys@animation@event#1#2#3#4#5{%
+ \expandafter\edef\csname pgf@sys@event@list@#5\endcsname{\csname pgf@sys@event@list@#5\endcsname{#1}{#2}{#3}{#4}}%
+}%
+\def\pgf@sys@event@list@begin{}
+\def\pgf@sys@event@list@end{}
+\def\pgfsys@animation@syncbegin#1#2#3#4{\pgfsys@animation@event{#1}{#2}{begin}{#3}{#4}}
+\def\pgfsys@animation@syncend#1#2#3#4{\pgfsys@animation@event{#1}{#2}{end}{#3}{#4}}
+\def\pgfsys@animation@repeat@event#1#2#3#4#5{\pgfsys@animation@event{#1}{#2}{repeat(#3)}{#4}{#5}}
+\def\pgfsys@animation@accesskey#1#2#3{\pgfsys@animation@event{}{}{accessKey(#1)}{#2}{#3}}
+%\def\pgfsys@animation@sum{\pgf@sys@svg@replace{additive}{sum}}
+%\def\pgfsys@animation@replace{\pgf@sys@svg@replace{additive}{replace}}
+\def\pgfsys@animation@accumulate{\pgf@sys@svg@replace{accumulate}{sum}}
+\def\pgfsys@animation@noaccumulate{\pgf@sys@svg@replace{accumulate}{}}
+\def\pgfsys@animation@rotatealong{\pgf@sys@svg@replace{rotate}{auto}}
+\def\pgfsys@animation@norotatealong{\pgf@sys@svg@replace{rotate}{}}
+\def\pgfsys@animation@movealong#1{%
+ {%
+ \let\pgf@sys@save@svgpath=\pgf@sys@svgpath%
+ \global\let\pgf@sys@svgpath=\pgfutil@empty%
+ \pgfsyssoftpath@getcurrentpath\pgf@sys@save@path%
+ \pgfsyssoftpath@setcurrentpath\pgfutil@empty%
+ #1%
+ \pgfsyssoftpath@invokecurrentpath%
+ \pgfsyssoftpath@setcurrentpath\pgf@sys@save@path%
+ \global\let\pgf@svg@anim@temp\pgf@sys@svgpath%
+ \global\let\pgf@sys@svgpath\pgf@sys@save@svgpath%
+ }%
+ \pgf@sys@svg@replace{path}{\pgf@svg@anim@temp}%
+}
+\def\pgfsys@animation@tip@markers#1#2{%
+ \edef\pgf@svg@anim@marker@start{#1}%
+ \edef\pgf@svg@anim@marker@end{#2}%
+}
+\let\pgf@svg@anim@marker@start\pgfutil@empty
+\let\pgf@svg@anim@marker@end\pgfutil@empty
+
+
+
+% Timelines
+\let\pgf@sys@svg@tl@entries\pgfutil@empty
+\let\pgf@sys@svg@tl@start\pgfutil@empty
+\let\pgf@sys@svg@tl@end\pgfutil@empty
+
+
+\def\pgfsys@animation@time#1#2#3#4#5{%
+ \def\pgf@sys@svg@t{#1}%
+ \let\pgf@sys@last@out@spline\pgf@sys@svg@out@spline%
+ \def\pgf@sys@svg@in@spline{{#2}{#3}}%
+ \def\pgf@sys@svg@out@spline{{#4}{#5}}%
+}
+\def\pgfsys@animation@base{%
+ \let\pgf@sys@svg@t\pgf@sys@svg@base@text%
+}
+\def\pgf@sys@svg@base@text{base}
+
+\def\pgf@sys@svg@entry#1{%
+ \ifx\pgf@sys@svg@t\pgf@sys@svg@base@text%
+ % Ah, base. Save!
+ \edef\pgfsys@anim@val@base{#1}%
+ \else%
+ \ifx\pgf@sys@svg@tl@start\pgfutil@empty%
+ % Ah, first.
+ \let\pgf@sys@svg@tl@start\pgf@sys@svg@t%
+ \edef\pgf@sys@svg@tl@entries{%
+ \noexpand\pgf@sys@svg@add@time{\pgf@sys@svg@t}%
+ \noexpand\pgf@sys@svg@add@value{#1}%
+ }%
+ \else%
+ \ifx\pgf@sys@last@out@spline\pgfsys@stay@text%
+ \ifx\pgf@sys@svg@in@spline\pgfsys@jump@text%
+ {%
+ \pgf@x\pgf@sys@svg@t pt
+ \pgf@xa\pgf@sys@svg@tl@end pt%
+ \advance\pgf@x by\pgf@xa%
+ \pgf@x.5\pgf@x%
+ \edef\pgf@sys@temp{\pgf@sys@tonumber\pgf@x}
+ \expandafter}\expandafter\def\expandafter\pgf@sys@temp\expandafter{\pgf@sys@temp}%
+ \edef\pgf@sys@svg@temp{%
+ \noexpand\pgf@sys@svg@add@time{\pgf@sys@temp}%
+ \noexpand\pgf@sys@svg@add@spline{0}{0}{1}{1}%
+ \noexpand\pgf@sys@svg@add@value{\pgf@sys@svg@last@value}%
+ \noexpand\pgf@sys@svg@add@time{\pgf@sys@temp}%
+ \noexpand\pgf@sys@svg@add@spline{0}{0}{1}{1}%
+ \noexpand\pgf@sys@svg@add@value{#1}%
+ \noexpand\pgf@sys@svg@add@time{\pgf@sys@svg@t}%
+ \noexpand\pgf@sys@svg@add@spline{0}{0}{1}{1}%
+ \noexpand\pgf@sys@svg@add@value{#1}%
+ }%
+ \else
+ \edef\pgf@sys@svg@temp{%
+ \noexpand\pgf@sys@svg@add@time{\pgf@sys@svg@t}%
+ \noexpand\pgf@sys@svg@add@spline{0}{0}{1}{1}%
+ \noexpand\pgf@sys@svg@add@value{\pgf@sys@svg@last@value}%
+ \noexpand\pgf@sys@svg@add@time{\pgf@sys@svg@t}%
+ \noexpand\pgf@sys@svg@add@spline{0}{0}{1}{1}%
+ \noexpand\pgf@sys@svg@add@value{#1}%
+ }%
+ \fi%
+ \else%
+ \ifx\pgf@sys@svg@in@spline\pgfsys@jump@text%
+ \edef\pgf@sys@svg@temp{%
+ \noexpand\pgf@sys@svg@add@time{\pgf@sys@svg@tl@end}%
+ \noexpand\pgf@sys@svg@add@spline{0}{0}{1}{1}%
+ \noexpand\pgf@sys@svg@add@value{#1}%
+ \noexpand\pgf@sys@svg@add@time{\pgf@sys@svg@t}%
+ \noexpand\pgf@sys@svg@add@spline{0}{0}{1}{1}%
+ \noexpand\pgf@sys@svg@add@value{#1}%
+ }%
+ \else%
+ \edef\pgf@sys@svg@temp{%
+ \noexpand\pgf@sys@svg@add@time{\pgf@sys@svg@t}%
+ \noexpand\pgf@sys@svg@add@spline\pgf@sys@last@out@spline\pgf@sys@svg@in@spline%
+ \noexpand\pgf@sys@svg@add@value{#1}%
+ }%
+ \fi%
+ \fi%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\pgf@sys@svg@tl@entries%
+ \expandafter\expandafter\expandafter{\expandafter\pgf@sys@svg@tl@entries\pgf@sys@svg@temp}%
+ \fi%
+ \let\pgf@sys@svg@tl@end\pgf@sys@svg@t%
+ \edef\pgf@sys@svg@last@value{#1}%
+ \fi%
+}
+\newif\ifpgf@sys@svg@do@times
+\def\pgf@sys@svg@tl@eval{%
+ \pgf@xa=0pt%
+ % Overrulings
+ \pgf@sys@svg@do@timestrue%
+ % Ok, we need to compute the time interval
+ \ifx\pgf@sys@svg@tl@end\pgfutil@empty%
+ \else%
+ \ifx\pgf@sys@svg@tl@start\pgfutil@empty\else\pgf@xa=\pgf@sys@svg@tl@start pt\fi%
+ \pgf@xb=\pgf@sys@svg@tl@end pt%
+ \advance\pgf@xb by -\pgf@xa%
+ % Ok, \pgf@xb is now the duration.
+ \ifdim\pgf@xb>0pt\relax%
+ \pgf@sys@svg@replace{dur}{\pgf@sys@tonumber\pgf@xb}%
+ \else%
+ \pgf@sys@svg@replace{dur}{\pgf@sys@svg@indefinitetext}%
+ \fi%
+ % Now, prepare factors
+ \pgf@xc=8192pt%
+ \ifdim\pgf@xb<0.0001pt\relax
+ \pgf@xc=1pt%
+ \pgf@xb=1sp%
+ \else%
+ \divide\pgf@xc by\pgf@xb%
+ \multiply\pgf@xb by\pgf@xc%
+ \divide\pgf@xb by65536%
+ \fi%
+ % Now, run!
+ \pgf@sys@svg@tl@entries%
+ \ifx\pgfsys@anim@val@dur\pgf@sys@svg@indefinitetext%
+ \let\pgfsys@anim@val@from\pgfsys@anim@val@to%
+ \let\pgfsys@anim@val@keyTimes\pgfutil@empty%
+ \let\pgfsys@anim@val@calcMode\pgfutil@empty%
+ \fi%
+ \fi%
+}
+\def\pgf@sys@svg@indefinitetext{indefinite}
+\def\pgf@sys@svg@add@time#1{%
+ \ifpgf@sys@svg@do@times%
+ % Compute fraction:
+ \pgf@yb=#1pt%
+ \advance\pgf@yb by-\pgf@xa%
+ \multiply\pgf@yb by\pgf@xc%
+ \divide\pgf@yb by\pgf@xb%
+ \ifdim\pgf@yb<0pt\pgf@yb=0pt\fi%
+ \ifdim\pgf@yb>1pt\pgf@yb=1pt\fi%
+ \pgf@sys@svg@append{keyTimes}{\pgf@sys@tonumber\pgf@yb}%
+ \fi%
+}
+\def\pgf@sys@svg@add@spline#1#2#3#4{\ifpgf@sys@svg@do@times\pgf@sys@svg@append{keySplines}{#1 #2 #3 #4}\fi}
+\def\pgf@sys@svg@add@value#1{%
+ \ifx\pgfsys@anim@val@values\pgfutil@empty%
+ \ifx\pgfsys@anim@val@to\pgfutil@empty%
+ \pgf@sys@svg@replace{to}{#1}%
+ \else% move
+ \let\pgfsys@anim@val@values\pgfsys@anim@val@to%
+ \let\pgfsys@anim@val@to\pgfutil@empty%
+ \pgf@sys@svg@append{values}{#1}%
+ \fi%
+ \else%
+ \pgf@sys@svg@append{values}{#1}%
+ \fi%
+}
+\def\pgfsys@animation@val@current{\pgf@sys@svg@entry{}}
+\def\pgfsys@animation@val{\pgf@sys@svg@entry{nil}} % will be ignored anyway
+\def\pgfsys@animation@val@text#1{\pgf@sys@svg@entry{#1}}
+\def\pgfsys@animation@val@scalar#1{\pgf@sys@svg@entry{#1}}
+\def\pgfsys@animation@val@dimension#1{%
+ {%
+ \pgf@x=#1\relax%
+ \xdef\pgf@svg@anim@temp{\expandafter\Pgf@geT\the\pgf@x}%
+ }%
+ \pgf@sys@svg@entry{\pgf@svg@anim@temp}%
+}
+\def\pgfsys@animation@val@color@rgb#1#2#3{\pgf@sys@svg@color@rgb#1,#2,#3\relax\pgf@sys@svg@entry{\pgf@sys@svg@prepared}}
+\def\pgfsys@animation@val@color@cmyk#1#2#3#4{\pgf@sys@svg@color@cmyk#1,#2,#3,#4\relax\pgf@sys@svg@entry{\pgf@sys@svg@prepared}}
+\def\pgfsys@animation@val@color@cmy#1#2#3{\pgf@sys@svg@color@cmy#1,#2,#3\relax\pgf@sys@svg@entry{\pgf@sys@svg@prepared}}
+\def\pgfsys@animation@val@color@gray#1{\pgf@sys@svg@color@gray#1\relax\pgf@sys@svg@entry{\pgf@sys@svg@prepared}}
+\def\pgfsys@animation@val@path#1{%
+ {%
+ \let\pgf@sys@save@svgpath=\pgf@sys@svgpath%
+ \global\let\pgf@sys@svgpath=\pgfutil@empty%
+ \pgfsyssoftpath@getcurrentpath\pgf@sys@save@path%
+ \pgfsyssoftpath@setcurrentpath\pgfutil@empty%
+ #1%
+ \pgfsyssoftpath@invokecurrentpath%
+ \pgfsyssoftpath@setcurrentpath\pgf@sys@save@path%
+ \global\let\pgf@svg@anim@temp\pgf@sys@svgpath%
+ \global\let\pgf@sys@svgpath\pgf@sys@save@svgpath%
+ }%
+ \pgf@sys@svg@entry{\pgf@svg@anim@temp}%
+}
+\def\pgfsys@animation@val@translate#1#2{%
+ {%
+ \pgf@x=#1\relax%
+ \pgf@y=#2\relax%
+ \xdef\pgf@svg@anim@temp{\expandafter\Pgf@geT\the\pgf@x,\expandafter\Pgf@geT\the\pgf@y}%
+ }%
+ \pgf@sys@svg@entry{\pgf@svg@anim@temp}%
+}
+\def\pgfsys@animation@val@scale#1#2{\pgf@sys@svg@entry{#1,#2}}
+\def\pgfsys@animation@val@viewbox#1#2#3#4{%
+ {%
+ \pgf@x=#1\relax%
+ \pgf@y=#2\relax%
+ \pgf@xa=#3\relax%
+ \pgf@ya=#4\relax%
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ \xdef\pgf@svg@anim@temp{\expandafter\Pgf@geT\the\pgf@x\space\expandafter\Pgf@geT\the\pgf@y\space\expandafter\Pgf@geT\the\pgf@xa\space\expandafter\Pgf@geT\the\pgf@ya}%
+ }%
+ \pgf@sys@svg@entry{\pgf@svg@anim@temp}%
+}
+\def\pgfsys@animation@val@dash#1#2{%
+ \edef\pgf@test@dashpattern{#1}%
+ \let\pgf@sys@svg@parsed@dash\pgfutil@empty%
+ \ifx\pgf@test@dashpattern\pgfutil@empty%
+ \else%
+ \expandafter\pgf@sys@svg@parse@dash\pgf@test@dashpattern,\relax%
+ \fi%
+ {%
+ \pgf@x=#2\relax%
+ \xdef\pgf@svg@anim@temp{\expandafter\Pgf@geT\the\pgf@x}%
+ }%
+ \pgf@sys@svg@entry{{\pgf@sys@svg@parsed@dash}{\pgf@svg@anim@temp}}%
+}
+
+
+
+\def\pgf@svg@anim@prep@dash#1#2#3{%
+ \let\pgf@svg@anim@dash@array\pgfutil@empty%
+ \let\pgf@svg@anim@dash@offset\pgfutil@empty%
+ % #1 = \pgfsys@anim@val@from or \pgfsys@anim@val@to or \pgfsys@anim@val@values
+ \ifx#1\pgfutil@empty%
+ \else%
+ \expandafter\pgf@svg@anim@prep@dash@parse#1\pgf@stop%
+ \fi%
+ \let#2\pgf@svg@anim@dash@array%
+ \let#3\pgf@svg@anim@dash@offset%
+}
+
+\def\pgf@svg@anim@prep@dash@parse#1#2{%
+ \expandafter\def\expandafter\pgf@svg@anim@dash@array\expandafter{\pgf@svg@anim@dash@array#1}%
+ \expandafter\def\expandafter\pgf@svg@anim@dash@offset\expandafter{\pgf@svg@anim@dash@offset#2}%
+ \pgfutil@ifnextchar;{%
+ \expandafter\def\expandafter\pgf@svg@anim@dash@array\expandafter{\pgf@svg@anim@dash@array;}%
+ \expandafter\def\expandafter\pgf@svg@anim@dash@offset\expandafter{\pgf@svg@anim@dash@offset;}%
+ \expandafter\pgf@svg@anim@prep@dash@parse\pgfutil@gobble%
+ }{%
+ \pgfutil@gobble% done, gobble \pgf@stop
+ }%
+}
+
%
-% Opacity masks
+% Markers
%
-% \def\pgfsys@fadingfrombox#1#2{%
-% \setbox#2=\hbox{%
-% \pgfsys@invoke{<mask id="pgfmask#1">}%
-% \box#2%
-% \pgfsys@invoke{</mask>}%
-% }%
-% \wd#2=0pt%
-% \ht#2=0pt%
-% \dp#2=0pt%
-% \unskip\box#2%
-% }
-% \def\pgfsys@usefading#1#2#3#4#5#6#7{%
-% \pgf@sys@svg@gs@color{mask="url(\#pgfmask#1)"}%
-% }
+
+\def\pgfsys@marker@declare@{%
+ \pgfsysprotocol@setcurrentprotocol\pgfutil@empty%
+ \pgfsys@beginscope@{ id="pgfs\the\pgf@sys@id@count"}%
+ \pgfsysprotocol@literal{\csname pgf@sys@marker@prot@\the\pgf@sys@id@count\endcsname}%
+ \pgfsys@endscope%
+ \pgfsysprotocol@getcurrentprotocol\pgfsys@temp%
+ \pgf@sys@svg@make@defs{pgfs\the\pgf@sys@id@count}{\pgfsys@temp}%
+}
+
+\def\pgfsys@marker@use#1{%
+ \pgf@sys@svg@ref@defs{pgfs#1}%
+ \pgfsysprotocol@literal{<use xlink:href="\#pgfs#1"/>}%
+}
+
+\def\pgfsys@marker@at@begin@usedpath#1{\def\pgf@sys@svg@marker@begin{#1}\let\pgf@sys@svg@marker@begin@use\pgfutil@empty}
+\def\pgfsys@marker@at@end@usedpath#1{\def\pgf@sys@svg@marker@end{#1}\let\pgf@sys@svg@marker@begin@use\pgfutil@empty}
+
+\let\pgf@sys@svg@marker@begin\relax
+\let\pgf@sys@svg@marker@end\relax
+
+\let\pgf@sys@svg@marker@begin@use\pgfutil@empty
+\let\pgf@sys@svg@marker@end@use\pgfutil@empty
+
+\def\pgf@sys@svg@prep@marker#1#2#3#4#5{%
+ \pgf@sys@svg@ref@defs{pgfs#1}%
+ \global\advance\pgf@sys@svg@objectcount by1\relax%
+ \edef\pgf@sys@svg@marker@id{pgf\the\pgf@sys@svg@objectcount}%
+ \pgfsysprotocol@literal{<marker id="\pgf@sys@svg@marker@id" markerUnits="userSpaceOnUse" orient="auto" overflow="visible">
+ <use xlink:href="\#pgfs#1"#2/> </marker>\pgfsys@svg@newline}%
+ \edef#3{marker-#4="url(\#\pgf@sys@svg@marker@id)" }%
+}
+
+
+%
+% RDF
+%
+
+\def\pgf@svg@rdf@init{%
+ \ifx\pgfsys@svg@rdf\pgfutil@empty%
+ % Ok, first, so init
+ \global\let\pgf@svg@rdf@vocab\relax%
+ \global\let\pgf@svg@rdf@about\relax%
+ \global\let\pgf@svg@rdf@content\relax%
+ \global\let\pgf@svg@rdf@datatype\relax%
+ \global\let\pgf@svg@rdf@href\relax%
+ \global\let\pgf@svg@rdf@inlist\relax%
+ \global\let\pgf@svg@rdf@prefix\relax%
+ \global\let\pgf@svg@rdf@property\relax%
+ \global\let\pgf@svg@rdf@rel\relax%
+ \global\let\pgf@svg@rdf@resource\relax%
+ \global\let\pgf@svg@rdf@rev\relax%
+ \global\let\pgf@svg@rdf@src\relax%
+ \global\let\pgf@svg@rdf@typeof\relax%
+ \global\let\pgfsys@svg@rdf\pgfsys@svg@rdf@initial%
+ \fi%
+}
+\def\pgfsys@svg@rdf@initial{%
+ \ifx\pgf@svg@rdf@vocab\relax\else\space vocab="\pgf@svg@rdf@vocab"\fi%
+ \ifx\pgf@svg@rdf@about\relax\else\space about="\pgf@svg@rdf@about"\fi%
+ \ifx\pgf@svg@rdf@datatype\relax\else\space datatype="\pgf@svg@rdf@datatype"\fi%
+ \ifx\pgf@svg@rdf@href\relax\else\space href="\pgf@svg@rdf@href"\fi%
+ \ifx\pgf@svg@rdf@inlist\relax\else\space inlist="\pgf@svg@rdf@inlist"\fi%
+ \ifx\pgf@svg@rdf@prefix\relax\else\space prefix="\pgf@svg@rdf@prefix"\fi%
+ \ifx\pgf@svg@rdf@property\relax\else\space property="\pgf@svg@rdf@property"\fi%
+ \ifx\pgf@svg@rdf@rel\relax\else\space rel="\pgf@svg@rdf@rel"\fi%
+ \ifx\pgf@svg@rdf@resource\relax\else\space resource="\pgf@svg@rdf@resource"\fi%
+ \ifx\pgf@svg@rdf@rev\relax\else\space rev="\pgf@svg@rdf@rev"\fi%
+ \ifx\pgf@svg@rdf@src\relax\else\space src="\pgf@svg@rdf@src"\fi%
+ \ifx\pgf@svg@rdf@typeof\relax\else\space typeof="\pgf@svg@rdf@typeof"\fi%
+ \ifx\pgf@svg@rdf@content\relax\else\space content="\pgf@svg@rdf@content"\fi%
+}
+
+\def\pgfsys@rdf@about#1{\pgf@svg@rdf@init\gdef\pgf@svg@rdf@about{#1}}
+\def\pgfsys@rdf@content#1{\pgf@svg@rdf@init\gdef\pgf@svg@rdf@content{#1}}
+\def\pgfsys@rdf@datatype#1{\pgf@svg@rdf@init\gdef\pgf@svg@rdf@datatype{#1}}
+\def\pgfsys@rdf@href#1{\pgf@svg@rdf@init\gdef\pgf@svg@rdf@href{#1}}
+\def\pgfsys@rdf@inlist{\pgf@svg@rdf@init\let\pgf@svg@rdf@inlist\pgfutil@empty}
+\def\pgfsys@rdf@prefix#1{\pgf@svg@rdf@init%
+ \ifx\pgf@svg@rdf@prefix\relax%
+ \gdef\pgf@svg@rdf@prefix{#1}
+ \else%
+ \expandafter\gdef\expandafter\pgf@svg@rdf@prefix\expandafter{\pgf@svg@rdf@prefix\space#1}%
+ \fi}
+\def\pgfsys@rdf@property#1{\pgf@svg@rdf@init%
+ \ifx\pgf@svg@rdf@property\relax%
+ \gdef\pgf@svg@rdf@property{#1}
+ \else%
+ \expandafter\gdef\expandafter\pgf@svg@rdf@property\expandafter{\pgf@svg@rdf@property\space#1}%
+ \fi}
+\def\pgfsys@rdf@rel#1{\pgf@svg@rdf@init%
+ \ifx\pgf@svg@rdf@rel\relax%
+ \gdef\pgf@svg@rdf@rel{#1}
+ \else%
+ \expandafter\gdef\expandafter\pgf@svg@rdf@rel\expandafter{\pgf@svg@rdf@rel\space#1}%
+ \fi}
+\def\pgfsys@rdf@rev#1{\pgf@svg@rdf@init%
+ \ifx\pgf@svg@rdf@rev\relax%
+ \gdef\pgf@svg@rdf@rev{#1}
+ \else%
+ \expandafter\gdef\expandafter\pgf@svg@rdf@rev\expandafter{\pgf@svg@rdf@rev\space#1}%
+ \fi}
+\def\pgfsys@rdf@typeof#1{\pgf@svg@rdf@init%
+ \ifx\pgf@svg@rdf@typeof\relax%
+ \gdef\pgf@svg@rdf@typeof{#1}
+ \else%
+ \expandafter\gdef\expandafter\pgf@svg@rdf@typeof\expandafter{\pgf@svg@rdf@typeof\space#1}%
+ \fi}
+\def\pgfsys@rdf@resource#1{\pgf@svg@rdf@init\gdef\pgf@svg@rdf@resource{#1}}
+\def\pgfsys@rdf@src#1{\pgf@svg@rdf@init\gdef\pgf@svg@rdf@src{#1}}
+\def\pgfsys@rdf@vocab#1{\pgf@svg@rdf@init\gdef\pgf@svg@rdf@vocab{#1}}
+
+
+
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvi.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvi.def
index 05f647fc796..20ba5f0fdc7 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvi.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvi.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvi.def,v 1.5 2007/06/07 07:41:11 tantau Exp $
+\ProvidesFileRCS{pgfsys-dvi.def}
% Driver commands for pure, ultra-portable dvi, in the tradition of
% old-style LaTeX pictures.
@@ -164,10 +164,12 @@
% Text:
\def\pgfsys@hbox#1{%
+ \pgfsys@begin@idscope%
\wd#1=0pt%
\ht#1=0pt%
\dp#1=0pt%
\pgf@sys@dvi@put{\pgf@sys@dvi@pt@x}{\pgf@sys@dvi@pt@y}{\box#1}%
+ \pgfsys@end@idscope%
}
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfm.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfm.def
index 54cd937a591..cb545f2b66f 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfm.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfm.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvipdfm.def,v 1.22 2014/07/09 14:01:22 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfsys-dvipdfm.def}
% Driver commands for dvipdfm
@@ -21,6 +21,62 @@
% dvipdfm-specific stuff:
%
+\def\pgfsys@hbox#1{%
+ \pgfsys@begin@idscope%
+ \pgfsys@invoke{q -1 0 0 -1 0 0 cm}%
+ \special{pdf: content -1 0 0 -1 0 0 cm 3 Tr q}% translate to
+ % original coordinate system and do
+ % not show anything
+ {\hbox to 0pt{\pgfutil@font@normalfont\pgfutil@selectfont.\hss}}% enforce font change
+ \pgfsys@invoke{0 Tr}%
+ \pgfsys@invoke{0 J [] 0 d}% reset line cap and dash
+ \wd#1=0pt%
+ \ht#1=0pt%
+ \dp#1=0pt%
+ \box#1
+ \pgfsys@invoke{n Q Q}%
+ \pgfsys@end@idscope%
+}
+\def\pgfsys@hboxsynced#1{%
+ {%
+ \pgfsys@begin@idscope%
+ \pgfsys@beginscope%
+ \setbox\pgf@hbox=\hbox{%
+ \hskip\pgf@pt@x%
+ \raise\pgf@pt@y\hbox{%
+ \pgf@pt@x=0pt%
+ \pgf@pt@y=0pt%
+ \special{pdf: content q}%
+ \pgflowlevelsynccm%
+ \pgfsys@invoke{q -1 0 0 -1 0 0 cm}%
+ \special{pdf: content -1 0 0 -1 0 0 cm q}% translate to original coordinate system
+ \pgfsys@invoke{0 J [] 0 d}% reset line cap and dash
+ \wd#1=0pt%
+ \ht#1=0pt%
+ \dp#1=0pt%
+ \box#1%
+ \pgfsys@invoke{n Q Q Q}%
+ }%
+ \hss%
+ }%
+ \wd\pgf@hbox=0pt%
+ \ht\pgf@hbox=0pt%
+ \dp\pgf@hbox=0pt%
+ \pgfsys@hbox\pgf@hbox%
+ \pgfsys@endscope%
+ \pgfsys@end@idscope%
+ }%
+}
+
+\def\pgfsys@beginpicture{%
+ \pgfsys@invoke{3 Tr}%
+ \hbox to 0pt{\pgfutil@font@normalfont\pgfutil@selectfont.\hss}% enforce font change
+ \pgfsys@invoke{0 Tr}%
+ \special{pdf: content q}}
+\def\pgfsys@endpicture{%
+ \pgfsys@invoke{n Q}%
+}
+
\def\pgfsys@invoke#1{\special{pdf: content Q #1 q}} % ugly, but necessary...
\def\pgfsys@papersize#1#2{%
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def
index cf1d5b9fe1e..beadfff3bf1 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvipdfmx.def,v 1.14 2014/07/09 14:01:22 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfsys-dvipdfmx.def}
% Driver commands for dvipdfmx
%
@@ -64,6 +64,7 @@
}
\def\pgfsys@hbox#1{%
+ \pgfsys@begin@idscope%
\pgfsys@beginscope%
\setbox#1=\hbox{\box#1}%
\wd#1=0pt%
@@ -76,11 +77,13 @@
\pgfsys@dvipdfmx@stop@force@reset@color%
\pgfsys@dvipdfmx@unsuspendcontent%
\pgfsys@endscope%
+ \pgfsys@end@idscope%
}
% We cannot use many codes in pgfsys-common-pdf-via-dvi.def.
% So it is rewritten here (with some bugs fixed).
\def\pgfsys@hboxsynced#1{%
+ \pgfsys@begin@idscope%
\pgfsys@beginscope%
\setbox#1=\hbox{\box#1}%
\wd#1=0pt%
@@ -98,6 +101,7 @@
\pgfsys@dvipdfmx@stop@force@reset@color%
\pgfsys@dvipdfmx@unsuspendcontent%
\pgfsys@endscope%
+ \pgfsys@end@idscope%
}
% All text materials between `pdf:bcontent' and `pdf:econtent' are
@@ -469,11 +473,9 @@
%
% Position tracking (needs pdftex >= 1.40.0-alpha-20051205 in dvi mode)
%
-\ifx\pdftexversion\@undefined
+\ifx\pdfsavepos\@undefined
\else
- \ifnum\pdftexversion>139
- \pgf@sys@pdf@dvi@tracker
- \fi
+ \pgf@sys@pdf@dvi@tracker
\fi
\def\pgfsys@papersize#1#2{%
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def
index c3a2b6200f8..b349b07e2f3 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def
@@ -7,11 +7,11 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvips.def,v 1.25 2014/07/09 14:01:22 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfsys-dvips.def}
% Driver commands for dvips
-\def\pgfsys@invoke#1{\special{ps:: #1}}
+\def\pgfsys@invoke#1{\special{ps\ifpgfsys@ps@boxmode\else:\fi: #1}}
\def\pgfsys@outerinvoke#1{\special{ps: #1}}
\def\pgf@sys@postscript@header#1{\pgfutil@insertatbegincurrentpage{\special{! #1}}}
\def\pgf@sys@postscript@object#1{\special{! #1}}
@@ -27,9 +27,10 @@
% dvips-specific stuff:
%
-\def\pgfsys@beginpicture{\special{ps: }\special{ps::[begin]}\pgfsys@invoke{pgfo}}
+\def\pgfsys@beginpicture{\pgfsys@ps@boxmodefalse\special{ps: }\special{ps::[begin]}\pgfsys@invoke{pgfo}}
\def\pgfsys@endpicture{\pgfsys@invoke{pgfc}\special{ps::[end]}}
\def\pgfsys@hbox#1{%
+ \pgfsys@begin@idscope%
\pgfsys@invoke{pgfs}%
\special{ps::[end]}%
\wd#1=0pt%
@@ -38,6 +39,7 @@
\box#1
\special{ps::[begin]}%
\pgfsys@invoke{pgfr}%
+ \pgfsys@end@idscope%
}
\def\pgfsys@begininvisible{%
\special{ps::[begin]}%
@@ -96,17 +98,30 @@
%
-% Position tracking (needs pdftex >= 1.40 in dvi mode)
+% Position tracking (needs pdftex or luatex in dvi mode)
%
-\ifx\pdftexversion\@undefined
+\ifx\savepos\@undefined
+ \ifx\pdfsavepos\@undefined
+ \else
+ \let\pgf@savepos\pdfsavepos
+ \let\pgf@lastxpos\pdflastxpos
+ \let\pgf@lastypos\pdflastypos
+ \fi
+\else
+ \let\pgf@savepos\savepos
+ \let\pgf@lastxpos\lastxpos
+ \let\pgf@lastypos\lastypos
+\fi
+
+
+\ifx\pgf@savepos\@undefined
\else
- \ifnum\pdftexversion>139
\def\pgfsys@markposition#1{%
- \pdfsavepos%
+ \pgf@savepos%
\edef\pgf@temp{#1}%
\expandafter\pgfutil@writetoaux\expandafter{%
- \expandafter\noexpand\expandafter\pgfsyspdfmark\expandafter{\pgf@temp}{\the\pdflastxpos}{\the\pdflastypos}}%
+ \expandafter\noexpand\expandafter\pgfsyspdfmark\expandafter{\pgf@temp}{\the\pgf@lastxpos}{\the\pgf@lastypos}}%
}
\def\pgfsyspdfmark#1#2#3{%
@@ -121,7 +136,6 @@
\def\pgf@sys@pdf@mark@pos@pgfpageorigin{\pgfpointorigin}
- \fi
\fi
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def
index 6225c5abc21..3acef85b177 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvisvgm.def,v 1.3 2013/08/23 09:50:22 tantau Exp $
+\ProvidesFileRCS{pgfsys-dvisvgm.def}
% Driver commands for dvisvgm
@@ -17,12 +17,23 @@
%
\input pgfsys-common-svg.def
+\newif\ifpgf@sys@svg@inpicture
+
+\def\pgf@sys@svg@make@defs#1#2{{\let\#\pgf@sys@svg@hash\special{dvisvgm:rawset #1}\special{dvisvgm:rawdef #2}\special{dvisvgm:endrawset}}}
+\def\pgf@sys@svg@ref@defs#1{\special{dvisvgm:rawput #1}}
\def\pgfsys@invoke#1{{\let\#\pgf@sys@svg@hash\special{dvisvgm:raw #1}}}
-\def\pgfsys@beginpicture{\pgfsys@invoke{<g transform="translate({?x},{?y}) scale(1,-1)">}}
-\def\pgfsys@endpicture{\pgfsys@invoke{</g>}}
+\def\pgfsys@beginpicture{%
+ \special{color push gray 0}% make dvisvgm *not* add anything to text
+ \pgf@sys@svg@inpicturetrue% in a picture
+ \pgfsys@svg@boxmodefalse%
+ \pgfsys@invoke{<g \ifx\pgf@sys@svg@last@stroke\relax\else
+ stroke="\pgf@sys@svg@last@stroke" \fi stroke-miterlimit="10" transform="translate({?x},{?y})scale(0.996264,-0.996264)">}}
+\def\pgfsys@endpicture{\pgfsys@invoke{</g>}\special{color pop}}
\def\pgfsys@svg@newline{{?nl}}
+\let\pgf@sys@svg@last@stroke\relax%
+
\def\pgfsys@hbox#1{%
{%
@@ -30,11 +41,28 @@
\wd#1=0pt%
\ht#1=0pt%
\dp#1=0pt%
- \pgfsetcolor{.}%
- \pgfsys@invoke{<g stroke="none" transform="scale(-1,1) translate({?x},{?y}) scale(-1,-1)">}\box#1\pgfsys@invoke{</g>}%
+ \pgfsys@begin@idscope%
+ \pgfsys@invoke{<g stroke="none" transform="scale(-1.00375,1.00375)translate({?x},{?y})scale(-1,-1)">}\box#1\pgfsys@invoke{</g>}%
+ \pgfsys@end@idscope%
}%
}
+\def\pgfsys@hboxsynced#1{%
+ {%
+ \setbox#1=\hbox{\box#1}%
+ \wd#1=0pt%
+ \ht#1=0pt%
+ \dp#1=0pt%
+ \pgfsys@begin@idscope%
+ \pgfsys@beginscope%
+ \pgflowlevelsynccm%
+ \pgfsys@invoke{<g stroke="none" transform="scale(-1.00375,1.00375)translate({?x},{?y})scale(-1,-1)">}\box#1\pgfsys@invoke{</g>}%
+ \pgfsys@endscope%
+ \pgfsys@end@idscope%
+ }%
+}
+
+
\def\pgfsys@shadingoutsidepgfpicture#1{%
\begingroup%
#1%
@@ -70,6 +98,117 @@
\pgfsysprotocol@literal{</g>}%
}
+
+
+\def\pgfsys@papersize#1#2{%
+ {%
+ \pgf@x#1\relax%
+ \pgf@y#2\relax%
+ \pgf@xa-1in\relax%
+ \special{dvisvgm:bbox fix \pgf@sys@tonumber\pgf@xa\space \pgf@sys@tonumber\pgf@xa\space \pgf@sys@tonumber\pgf@x\space \pgf@sys@tonumber\pgf@y}%
+ }%
+}
+\def\pgfsys@prepare@papersize#1#2{%
+ \expandafter\gdef\expandafter\pgfsys@atbegindocument\expandafter{\pgfsys@atbegindocument\pgfsys@papersize{#1}{#2}}%
+}
+
+
+
+\def\pgfsys@typesetpicturebox#1{%
+ \pgf@ya=\pgf@shift@baseline\relax%
+ \advance\pgf@ya by-\pgf@picminy\relax%
+ %
+ %
+ \advance\pgf@picmaxy by-\pgf@picminy\relax% maxy is now the height
+ \advance\pgf@picmaxx by-\pgf@picminx\relax% maxx is now the width
+ \setbox#1=\hbox{\hskip-\pgf@picminx\lower\pgf@picminy\box#1}%
+ \ht#1=\pgf@picmaxy%
+ \wd#1=\pgf@picmaxx%
+ \dp#1=0pt%
+ \leavevmode%
+ \pgf@xa=\pgf@trimleft@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi%
+ \raise-\pgf@ya\hbox{\ifpgf@sys@svg@inpicture\else\special{dvisvgm:bbox \pgf@sys@tonumber\pgf@picmaxx\space\pgf@sys@tonumber\pgf@picmaxy}\fi\box#1}%
+ \pgf@xa=\pgf@trimright@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi%
+}
+
+
+
+\def\pgfsys@text@to@black@hook{%
+ \let\pgfsys@svg@set@color@orig\set@color%
+ \let\pgfsys@svg@reset@color@orig\reset@color%
+ \def\set@color{\special{dvisvgm:raw <g fill="black">}\pgfsys@svg@set@color@orig}%
+ \def\reset@color{\special{dvisvgm:raw </g>}\pgfsys@svg@reset@color@orig}%
+}
+
+
+
+% Fadings
+
+% FIXME: Correct sizes!
+
+%
+% Opacity masks
+%
+% \def\pgfsys@fadingfrombox#1#2{%
+% \setbox#2=\hbox{%
+% \pgfsys@invoke{<mask id="pgfmask#1">}%
+% \box#2%
+% \pgfsys@invoke{</mask>}%
+% }%
+% \wd#2=0pt%
+% \ht#2=0pt%
+% \dp#2=0pt%
+% \unskip\box#2%
+% }
+% \def\pgfsys@usefading#1#2#3#4#5#6#7{%
+% \pgf@sys@svg@gs@color{mask="url(\#pgfmask#1)"}%
+% }
+
+
+
+
+%
+% Position tracking (needs pdftex or luatex in dvi mode)
+%
+\ifx\savepos\@undefined
+ \ifx\pdfsavepos\@undefined
+ \else
+ \let\pgf@savepos\pdfsavepos
+ \let\pgf@lastxpos\pdflastxpos
+ \let\pgf@lastypos\pdflastypos
+ \fi
+\else
+ \let\pgf@savepos\savepos
+ \let\pgf@lastxpos\lastxpos
+ \let\pgf@lastypos\lastypos
+\fi
+
+
+\ifx\pgf@savepos\@undefined
+\else
+
+\def\pgfsys@markposition#1{%
+ \pgf@savepos%
+ \edef\pgf@temp{#1}%
+ \expandafter\pgfutil@writetoaux\expandafter{%
+ \expandafter\noexpand\expandafter\pgfsyspdfmark\expandafter{\pgf@temp}{\the\pgf@lastxpos}{\the\pgf@lastypos}}%
+}
+
+\def\pgfsyspdfmark#1#2#3{%
+ \expandafter\gdef\csname pgf@sys@pdf@mark@pos@#1\endcsname{\pgfqpoint{#2sp}{#3sp}}%
+ \pgfutil@check@rerun{#1}{{#2}{#3}}%
+}
+
+\def\pgfsys@getposition#1#2{%
+ \edef\pgf@marshal{\let\noexpand#2=\expandafter\noexpand\csname pgf@sys@pdf@mark@pos@#1\endcsname}%
+ \pgf@marshal%
+}
+
+\def\pgf@sys@pdf@mark@pos@pgfpageorigin{\pgfpointorigin}
+
+\fi
+
+
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-luatex.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-luatex.def
index e01c0007da8..24fad51a342 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-luatex.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-luatex.def
@@ -1,12 +1,5 @@
% Copyright 2006 by Till Tantau
%
-% pgfsys-luatex.def
-% converted from pgfsys-pdftex.def by replacing disappeared primitives/vars
-% with their respective replacements, as laid out in the luatex manual.
-% Conversion by Norbert Preining
-%
-% Included into the TeX Live pgf package with agreement of Till Tantau.
-%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
@@ -14,8 +7,13 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-luatex.def,v 1.35 2014/10/11 09:23:31 vibrovski Exp $
+\ProvidesFileRCS{pgfsys-luatex.def}
+\ifnum\luatexversion<95
+ \immediate\write-1{luatex driver of PGF: detected lua version \the\luatexversion; falling back to old pdftex driver^^J}%
+ \input pgfsys-pdftex.def
+ \expandafter\endinput
+\fi
% Driver commands for pdf
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
index 0cc939675f6..f6498264735 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-pdftex.def,v 1.35 2014/10/11 09:23:31 vibrovski Exp $
+\ProvidesFileRCS{pgfsys-pdftex.def}
% Driver commands for pdf
@@ -25,6 +25,7 @@
% Synced hboxes
\def\pgfsys@hboxsynced#1{%
{%
+ \pgfsys@begin@idscope%
\pgfsys@beginscope%
\setbox\pgf@hbox=\hbox{%
\hskip\pgf@pt@x%
@@ -40,6 +41,7 @@
\dp\pgf@hbox=0pt%
\box\pgf@hbox%
\pgfsys@endscope%
+ \pgfsys@end@idscope%
}%
}
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def
index cc5dadb1173..751ab7e6fa7 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-tex4ht.def,v 1.25 2013/08/06 17:46:08 tantau Exp $
+\ProvidesFileRCS{pgfsys-tex4ht.def}
@@ -86,12 +86,13 @@
% class="}{\%s}{-\%s}{x-x-\%d}{}{">}{</span>}
%}
-\def\pgfsys@svg@newline{\Hnewline}
+\def\pgfsys@svg@newline{^^J}
% we don't want tex4ht putting <p> and </p> tags automatically in our svg code and causing invalid xhtml in our svg pictures
\newif\ifpgfsys@CssIncluded@\pgfsys@CssIncluded@false
\def\pgfsys@beginpicture{%
- \EndP\HtmlParOff
+ \pgfsys@svg@boxmodefalse%
+ \EndP\HtmlParOff%
\pgfkeys{/pgf/tex4ht node/escape=false}%
% text only nodes are the default. Advantage : pure svg pictures are
% the default, nicer for text only nodes.
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def
index 0645fb8c51f..033d949baac 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-textures.def,v 1.6 2011/05/13 10:16:37 tantau Exp $
+\ProvidesFileRCS{pgfsys-textures.def}
% Driver commands for textures driver
@@ -36,12 +36,14 @@
\special{rawpostscript pgfbeginpicture}}
\def\pgfsys@endpicture{\special{rawpostscript restore}}
\def\pgfsys@hbox#1{%
+ \pgfsys@begin@idscope%
\pgfsys@invoke{save pgfbeginhbox}%
\wd#1=0pt%
\ht#1=0pt%
\dp#1=0pt%
\box#1%
\pgfsys@invoke{restore}%
+ \pgfsys@end@idscope%
}
\def\pgfsys@begininvisible{%
\special{rawpostscript gsave nulldevice}%
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def
index 5014f48beba..e5e9b1d5df9 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-vtex.def,v 1.10 2013/07/15 12:05:34 tantau Exp $
+\ProvidesFileRCS{pgfsys-vtex.def}
% Driver commands for vtex
@@ -15,8 +15,8 @@
% Invoking things:
\def\pgfsys@invoke#1{\special{pS: grestore #1 gsave}} % to protect against things happeing in between
\def\pgfsys@outerinvoke#1{\special{pS: #1}}
-\def\pgf@sys@postscript@header#1{\special{pS: #1}}
-\def\pgf@sys@postscript@object#1{\special{pS: #1}}
+\def\pgf@sys@postscript@header#1{\immediate\special{pS: #1}}
+\def\pgf@sys@postscript@object#1{\immediate\special{pS: #1}}
%
@@ -81,7 +81,7 @@
\AtBeginDocument{
% Always present specials.
- \special{pS:
+ \immediate\special{pS:
/pgfsc{} bind def% stroke color is empty by default
/pgffc{} bind def% fill color is empty by default
/pgfstr{stroke} bind def%
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def
index e23e48c2f57..a4a49c1faab 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-xetex.def,v 1.11 2014/07/09 14:01:22 cfeuersaenger Exp $
+\ProvidesFileRCS{pgfsys-xetex.def}
\input pgfsys-dvipdfmx.def
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
index e33a132c29b..393a7860608 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys.code.tex,v 1.48 2014/07/09 14:01:22 cfeuersaenger Exp $
+\ProvidesPackageRCS{pgfsys.code.tex}
% Load key mechanism
@@ -17,7 +17,7 @@
\pgfkeys{/pgf/.is family}
\def\pgfset{\pgfqkeys{/pgf}}
-% This is if is needed *very* early
+% This if is needed *very* early
\newif\ifpgfpicture
@@ -93,12 +93,6 @@
-% The following \if decides, whether even-odd filling and clipping is
-% to be used or normal the non-zero winding number rule. See the
-% pdf-documentation for details on what these rules are.
-
-\newif\ifpgfsys@eorule
-
% In the following dummy definitions of the pgf system commands are
@@ -128,6 +122,10 @@
+%
+% Invocation commands
+%
+
\def\pgfsys@invoke{\pgf@sys@fail{invoking specials}}
% This command is used whenever some literal text needs to be inserted
% into the resulting .pdf, .ps, or .dvi file. Note that most
@@ -141,7 +139,6 @@
% been called previously and when the picture has not been suspended
% using \pgfsys@beginhbox.
-
\def\pgfsys@outerinvoke{\pgfsys@invoke}
% This command can be used to insert protocolled graphic commands
% outside any picture. This is extremely dangerous, but sometimes
@@ -319,6 +316,14 @@
% should subsequently be used for clipping. See \pgfsys@clipnext for
% details.
+\def\pgfsys@closestroke{\pgfsys@closepath\pgfsys@stroke}
+% This command should have the same effect as first closing the path
+% and then stroking it.
+
+\newif\ifpgfsys@eorule
+% Decides, whether even-odd filling and clipping is
+% to be used or normal the non-zero winding number rule. See the
+% pdf-documentation for details on what these rules are.
@@ -329,7 +334,8 @@
%
%
\def\pgfsys@setlinewidth#1{\pgf@sys@fail{setting the line width}}
-% Sets the width of lines, when stroked, to #1.
+% Sets the width of lines, when stroked, to #1, which must be a TeX
+% dimension (as text).
\def\pgfsys@buttcap{\pgf@sys@fail{setting the line cap}}
% Sets the cap to a butt cap. See \pgfsys@stroke.
@@ -355,19 +361,19 @@
\def\pgfsys@setdash#1#2{\pgf@sys@fail{setting the dashing pattern}}
% Sets the dashing patter. #1 should be a list of lengths separated by
-% spaces. #2 should be a single dimension.
+% commas. #2 should be a single dimension.
%
% The list of values in #1 is used to determine the lengths of the
% `on' phases of the dashing and of the `off' phases. For example, if
-% #1 is `3pt 4pt', then the dashing pattern is `3pt on followed by 4pt
+% #1 is `3pt,4pt', then the dashing pattern is `3pt on followed by 4pt
% off, followed by 3pt on, followed by 4pt off, and so on'. A pattern
-% of `.5pt 4pt 3pt 1.5pt' means `.5pt on, 4pt off, 3pt on, 1.5pt off, .5pt on,
+% of `.5pt,4pt,3pt,1.5pt' means `.5pt on, 4pt off, 3pt on, 1.5pt off, .5pt on,
% ...'. If the number of entries is odd, the last one is used twice,
% so `3pt' means `3pt on, 3pt off, 3pt on, 3pt off,...'. An empty list
% means `always on'.
%
% The second argument determines the `phase' of the pattern. For
-% example, for a pattern of `3pt 4pt' and a phase of `1pt', the pattern
+% example, for a pattern of `3pt,4pt' and a phase of `1pt', the pattern
% would start: `2pt on, 4pt off, 3pt on, 4pt off, 3pt on, 4pt off...'.
@@ -456,6 +462,11 @@
% tricked. When called, this command should set the current color to
% #1 without causing any change in the color stack.
+\def\pgfsys@text@to@black@hook{}
+% Another slightly obscure command that allows tikz to hack into
+% dvisvgm's color management inside text nodes. The problem is that
+% the color "black" is special for dvisvgm.
+
%
@@ -470,6 +481,66 @@
% transformation matrix is a transformation on a homogeneous
% 2D-coordinate system. See the pdf or postscript manual for details.
+\def\pgfsys@transformshift#1#2{\pgfsys@transformcm{1}{0}{0}{1}{#1}{#2}}
+% This command will change the origin of the low-level coordinate
+% system to (#1,#2).
+
+\def\pgfsys@transformxyscale#1#2{\pgfsys@transformcm{#1}{0}{0}{#2}{0bp}{0bp}}
+% This command will scale the low-level coordinate system (and
+% everything that is drawn) by a factor of #1 in x-directed and #2 in
+% y-direction. Note that this applies to everything, including
+% lines. So a scaled line will have a different width and may even
+% have a different width when going along the x-axis and when going
+% along the y-axis, if the scaling is different in these directions.
+
+\def\pgfsys@viewboxmeet#1#2#3#4#5#6#7#8{\pgfsys@beginscope\pgf@sys@default@viewbox@impl{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{<}}
+% Consider the two rectangles R with lower left corner
+% (#5,#6) and upper right (#7,#8) and S with lower left corner
+% (#1,#2) and upper right (#3,#4). Now, consider the transformation
+% that scales and translates R so that the result T has the same
+% center as S and has maximal size while still being inside S. This
+% transformation gets installed in a new graphics group, which must be
+% ended with a corresponding \pgfsys@endviewbox.
+
+\def\pgfsys@viewboxslice#1#2#3#4#5#6#7#8{\pgfsys@beginscope\pgf@sys@default@viewbox@impl{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{>}}
+% Works like \pgfsys@viewboxmeet, but R3 will have minimal size so
+% that in contains all of R2.
+
+\def\pgfsys@endviewbox{\pgfsys@endscope}
+% Ends a viewbox scope started by either of the previous two commands.
+
+
+\def\pgf@sys@default@viewbox@impl#1#2#3#4#5#6#7#8#9{{%
+ \pgf@x#1%
+ \pgf@y#2%
+ \pgf@xa#3%
+ \pgf@ya#4%
+ \advance\pgf@xa by-\pgf@x%
+ \advance\pgf@ya by-\pgf@y%
+ \pgfmathdivide@\pgf@xa\pgf@ya%
+ \let\aspectr\pgfmathresult%
+ \pgf@xb#5%
+ \pgf@yb#6%
+ \pgf@xc#7%
+ \pgf@yc#8%
+ \advance\pgf@xc by-\pgf@xb%
+ \advance\pgf@yc by-\pgf@yb%
+ \pgfmathdivide@\pgf@xc\pgf@yc%
+ \let\aspects\pgfmathresult%
+ \ifdim\aspectr pt#9\aspects pt%
+ \pgfmathdivide@\pgf@xa\pgf@xc%
+ \else%
+ \pgfmathdivide@\pgf@ya\pgf@yc%
+ \fi%
+ \advance\pgf@x by.5\pgf@xa%
+ \advance\pgf@xb by.5\pgf@xc%
+ \advance\pgf@y by.5\pgf@ya%
+ \advance\pgf@yb by.5\pgf@yc%
+ \pgfsys@transformcm{\pgfmathresult}{0}{0}{\pgfmathresult}{\pgf@x}{\pgf@y}%
+ \pgfsys@transformcm{1}{0}{0}{1}{-\pgf@xb}{-\pgf@yb}%
+ }%
+}
+
@@ -494,6 +565,218 @@
\def\pgfsys@endscope{\pgf@sys@fail{scoping}}
% Restores the last saved graphic state.
+\def\pgfsys@begin@idscope{%
+ \begingroup%
+ \edef\pgf@sys@cacheref{\pgfsys@id@refcurrent}%
+ \expandafter\let\expandafter\pgfsys@beg@save\csname pgf@sys@att@beg@\pgf@sys@cacheref\endcsname%
+ \expandafter\let\expandafter\pgfsys@end@save\csname pgf@sys@att@end@\pgf@sys@cacheref\endcsname%
+ \ifx\pgfsys@beg@save\relax%
+ \ifx\pgfsys@end@save\relax%
+ \else%
+ \pgfsys@call@save%
+ \fi%
+ \else%
+ \pgfsys@call@save%
+ \fi%
+ \pgfsys@invalidate@currentid%
+ \begingroup%
+}
+% Starts an "id scope" where the current value of \pgfsys@use@id and
+% \pgfsys@use@type is used. If the combination has been used before,
+% nothing happens. Otherwise, depending of the driver, a graphic
+% scope may or may not be created. To ensure that a graphic scope is
+% created, use \pgfsys@beginscope additionally.
+
+\def\pgfsys@call@save{%
+ \pgfsys@beginscope%
+ \pgfsys@beg@save%
+ \expandafter\global\expandafter\let\csname pgf@sys@att@beg@\pgfsys@id@refcurrent\endcsname\relax%
+ \expandafter\global\expandafter\let\csname pgf@sys@att@end@\pgfsys@id@refcurrent\endcsname\relax%
+}
+
+\def\pgfsys@end@idscope{
+ \endgroup%
+ \ifx\pgfsys@beg@save\relax%
+ \ifx\pgfsys@end@save\relax%
+ \else%
+ \pgfsys@call@end%
+ \fi%
+ \else%
+ \pgfsys@call@end%
+ \fi%
+ \endgroup
+}
+% Ends an id scope.
+
+\def\pgfsys@call@end{%
+ \pgfsys@end@save%
+ \pgfsys@endscope%
+}
+
+
+\def\pgfsys@begin@text{}
+% Inside a text box you should not use graphics command. However, TikZ
+% needs to insert some color commands at the beginnings of text
+% boxes. For most drivers, this is not a problem; except for SVG,
+% where every change of the graphics state opens a scope and needs a
+% closing scope. This command should be used at the beginning of text
+% boxes containing such color commands and the matching
+% \pgfsys@end@text at the end. If the box does not contain commands
+% that change the graphics state, this command is not needed.
+
+\def\pgfsys@end@text{}
+% Closes a \pgfsys@begin@text.
+
+
+
+%
+%
+% Id management (all of these commands have a default implementation
+% any typically need not be redefined by a driver)
+%
+%
+
+% The id count
+\newcount\pgf@sys@id@count
+
+\def\pgfsys@new@id#1{%
+ \edef#1{pgf\the\pgf@sys@id@count}%
+ \global\advance\pgf@sys@id@count by1\relax%
+}
+% Creates a new id and stores it in the macro #1.
+
+\def\pgfsys@use@id#1{%
+ \edef\pgf@sys@id@current@id{#1}%
+ \let\pgfsys@current@type\pgfutil@empty%
+}
+\let\pgf@sys@id@current@id\pgfutil@empty
+% Sets the id to be used for the next graphic object (group, box, or
+% path). The type is reset to be empty. #1 must be a macro name that
+% has previously been set using \pgfsys@new@id.
+%
+% Each combination of id and type can be used only once, on a second
+% use nothing happens.
+
+\def\pgfsys@clear@id{%
+ \let\pgf@sys@id@current@id\pgfutil@empty%
+}
+% Clears the current id, so nothing can be referenced.
+
+\def\pgfsys@use@type#1{%
+ \edef\pgfsys@current@type{#1}%
+ \pgfsys@register@type\pgfsys@current@type%
+}
+\let\pgfsys@current@type\pgfutil@empty
+% Sets the type to be used for the next graphic object.
+
+\def\pgfsys@append@type#1{%
+ \ifx\pgfsys@current@type\pgfutil@empty%
+ \pgfsys@use@type{#1}%
+ \else%
+ \pgfsys@use@type{\pgfsys@current@type.#1}%
+ \fi%
+}
+% Appends something to the current type
+
+\def\pgfsys@register@type#1{%
+ \expandafter\let\expandafter\pgf@sys@temp\csname pgf@sys@reg@type@#1\endcsname%
+ \ifx\pgf@sys@temp\relax%
+ {%
+ \c@pgf@counta\pgf@sys@type@count\relax%
+ \global\advance\c@pgf@counta by1\relax%
+ \edef\pgf@sys@type@count{\the\c@pgf@counta}%
+ \expandafter\xdef\csname pgf@sys@reg@type@#1\endcsname{y\the\c@pgf@counta}%
+ }%
+ \fi%
+}
+% Registers a type with the system. Must be called before any use of
+% the type
+\def\pgf@sys@reg@type@{}
+\def\pgf@sys@reg@type@background{b}
+\def\pgf@sys@reg@type@path{p}
+\def\pgf@sys@reg@type@text{t}
+\expandafter\def\csname pgf@sys@reg@type@background.path\endcsname{bp}
+\def\pgf@sys@type@count{0}
+
+\def\pgfsys@push@type{%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@sys@typestack%
+ \expandafter\expandafter\expandafter{\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgfsys@current@type%
+ \expandafter\expandafter\expandafter{\expandafter\pgfsys@current@type\expandafter}%
+ \expandafter\def\expandafter\pgf@sys@typestack\expandafter{\pgf@sys@typestack}}%
+}
+\let\pgf@sys@typestack\pgfutil@empty
+% Pushes the current type onto a global stack. This is useful for
+% temporarily changing the type without creating \TeX scopes.
+
+\def\pgfsys@pop@type{\pgf@sys@typestack}
+% Pops the last id from the stack.
+
+\def\pgfsys@id@ref#1#2{#1\csname pgf@sys@reg@type@#2\endcsname}
+% Expands to a text that can be inserted as a reference. #1 must be a
+% reference created \pgfsys@new@id, #2 must be a type that has been
+% registered using \pgfsys@id@register@type.
+
+\def\pgfsys@id@refcurrent{\pgfsys@id@ref{\pgf@sys@id@current@id}{\pgfsys@current@type}}
+% Expands to a text that can be inserted as a reference to the current
+% id-type pair in use.
+
+\def\pgfsys@invalidate@currentid{%
+ \expandafter\global\expandafter\let\csname pgf@sys@id@keylist@\pgfsys@id@refcurrent\endcsname\pgfutil@empty%
+}
+% Mark the current id-type pair as used.
+
+\def\pgfsys@attach@to@id#1#2#3#4{%
+ \pgfsys@register@type{#2}%
+ \expandafter\def\expandafter\pgf@sys@tempbeg\expandafter{\csname pgf@sys@att@beg@\pgfsys@id@ref{#1}{#2}\endcsname}%
+ \expandafter\def\expandafter\pgf@sys@tempend\expandafter{\csname pgf@sys@att@end@\pgfsys@id@ref{#1}{#2}\endcsname}%
+ \expandafter\ifx\pgf@sys@tempbeg\relax%
+ \expandafter\let\pgf@sys@tempbeg\pgfutil@empty%
+ \fi%
+ \expandafter\ifx\pgf@sys@tempend\relax%
+ \expandafter\let\pgf@sys@tempend\pgfutil@empty%
+ \fi%
+ \expandafter\let\expandafter\pgf@sys@tempbeg@cont\pgf@sys@tempbeg%
+ \expandafter\let\expandafter\pgf@sys@tempend@cont\pgf@sys@tempend%
+ \expandafter\expandafter\expandafter\gdef\expandafter\pgf@sys@tempbeg\expandafter{\pgf@sys@tempbeg@cont#3}%
+ \def\pgf@sys@temp{#4}%
+ \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\gdef\expandafter\expandafter\expandafter\pgf@sys@tempend\expandafter\expandafter\expandafter{\expandafter\pgf@sys@temp\pgf@sys@tempend@cont}%
+}
+% Attaches some code to an id-type pair so that when the id's scope
+% gets created, #3 is added at the beginning and #4 is added at the
+% end.
+
+\def\pgfsys@if@fresh@id#1#2#3#4{%
+ \edef\pgf@sys@temp{#1}%
+ \ifx\pgf@sys@temp\pgfutil@empty% empty id always counts as "has been used"
+ #4%
+ \else%
+ \pgfsys@register@type{#2}%
+ \expandafter\ifx\csname pgf@sys@id@keylist@\pgfsys@id@ref{#1}{#2}\endcsname\pgfutil@empty%
+ % has already been used!
+ #4%
+ \else%
+ #3%
+ \fi%
+ \fi%
+}
+% Checks whether a given id-type pair #1-#2 has not been used, yet. If
+% so, #3 is executed, otherwise #4.
+
+\def\pgfsys@if@fresh@currentid#1#2{%
+ \ifx\pgf@sys@id@current@id\pgfutil@empty% empty id always counts as "has been used"
+ #2%
+ \else%
+ \expandafter\ifx\csname pgf@sys@id@keylist@\pgfsys@id@refcurrent\endcsname\pgfutil@empty%
+ % has already been used!
+ #2%
+ \else%
+ #1%
+ \fi%
+ \fi%
+}
+% Checks whether the current id-type pair in use has not been used,
+% yet. If so, #1 is executed, otherwise #2.
+
@@ -515,6 +798,13 @@
%
%
+\def\pgfsys@opacity#1{\pgfsys@stroke@opacity{#1}\pgfsys@fill@opacity{#1}}
+% Ideally, this should sets the opacity of all operations, treating
+% the group as a transparency group with 1 meaning fully opaque, 0
+% meaning fully transparent. Since most drivers do not support this,
+% the fallback is to set the stroke and fill opacity at the same
+% time. This is not quite the same, however.
+
\def\pgfsys@stroke@opacity#1{\pgf@sys@fail{opacity}}
% Sets the opacity of stroking operations. 1 means fully opaque, 0
% means fully transparent.
@@ -659,6 +949,463 @@
% Sets an colored pattern #1 as filling color.
+
+
+
+%
+%
+% Animations
+%
+%
+
+
+\newif\ifpgfsysanimationsupported
+% Will be set to true by a driver when animations are supported. Note
+% that snapshots are always supported.
+
+
+\def\pgfsys@animate#1{\pgf@sys@fail{animations}}
+% Adds an animation of the attribute #1 to the current scope.
+% The configuration of the animation (like start times, etc.) is taken
+% from the current values of the animation keys, which are configured
+% using calls to \pgfsys@animation@..., which setup an animation
+% key for the local scope. This means that you typically setup these
+% keys in a scope and at the end of the scope call \pgfsys@animate.
+%
+% Some keys accumulate (like begin or keytime), most do not. In those
+% cases, the last call overrides the previous one.
+%
+% Not all value types make sense or are allowed, it depends on the
+% specific \pgfsys@animate call.
+%
+% Example:
+%
+% {
+% \pgfsys@animation@offset{10}{begin}%
+% \pgfsys@animation@event{}{click}{1}{begin}%
+% \pgfsys@animation@time{5}{1}{1}{0}{0}
+% \pgfsys@animation@val@scalar{1}
+% \pgfsys@animation@time{8}{1}{1}{0}{0}
+% \pgfsys@animation@val@scalar{0.5}
+% \pgfsys@animation@sum%
+% \pgfsys@animate{fillopacity}%
+% }
+%
+% When a driver does not support a specific attribute #1, it should
+% issue a \pgf@sys@fail. Typical attributes are things like "opacity"
+% or "linewidth" or "dash".
+%
+% The following values are permissible for "#1":
+%
+% "opacity" adds an animation of the opacity.
+% Type: scalar
+%
+% "fillopacity" adds an animation of the fill opacity.
+% Type: scalar
+%
+% "strokeopacity" adds an animation of the stroke opacity.
+% Type: scalar
+%
+% "visibility" adds an animation of the visiblity.
+% Type: text ("visible" or "hidden")
+%
+% "linewidth" adds an animation of the line width.
+% Type: dimension
+%
+% "dash" adds an animation of the dash.
+% Type: dash
+%
+% "translate" adds an animation of the transformation.
+% Type: translate
+%
+% "scale" adds an animation of the transformation.
+% Type: scale
+%
+% "rotate" adds an animation of the transformation.
+% Type: scalar
+%
+% "skewx" adds an animation of the transformation.
+% Type: scalar
+%
+% "skewy" adds an animation of the transformation.
+% Type: scalar
+%
+% "motion" adds a movement along a path.
+% Type: motion
+%
+% "strokecolor" adds an animation of the stroke color.
+% Type: color
+%
+% "fillcolor" adds an animation of the fill color.
+% Type: color
+%
+% "viewbox" adds an animation of the view box.
+% Type: view box
+%
+% "path" adds an animation of the path to the path specified by
+% \pgfsys@animation@whom
+% Type: path
+%
+% "syncbase" adds a sync base to the animation. A sync base does not animate
+% anything by itself, but other animations can begin and end relative
+% to it.
+%
+% "none" supresses the animation
+% Type: any
+
+
+
+
+% Animation timing :
+%
+% You specify an animation using a timeline. A timeline consists of a
+% sequence of times together with values for these times. The times
+% must be given in increasing order. You use the command
+% \pgfsys@animation@time to specify a time and
+% \pgfsys@animation@val@... to specify a value. The time must be
+% specfied first, the time--value is created when the value command is
+% used.
+%
+% Times are given in seconds (so 0.01 is one hundreth of a second).
+%
+% The animation's timeline will start with the first time mentioned
+% (not necessarily zero and not necessarily a positive value) and ends
+% with the last value. The duration is the difference between these
+% two values.
+
+\def\pgfsys@animation@restart@always{}
+% Specifies that the animation can always restart
+
+\def\pgfsys@animation@restart@never{}
+% Specifies that the animation should never restart
+
+\def\pgfsys@animation@restart@whennotactive{}
+% Specifies that the animation should only restart when it is not active
+
+\def\pgfsys@animation@repeat#1{}
+% #1 must be a number
+
+\def\pgfsys@animation@repeat@indefinite{}
+% Repeats forever
+
+\def\pgfsys@animation@repeat@dur#1{}
+% #1 must be a clock value
+
+\def\pgfsys@animation@freezeatend{}
+% Specifies that the last value of the animation remains in force at
+% the end
+
+\def\pgfsys@animation@removeatend{}
+% Specifies that the effect of the animation is removed at the end
+
+\def\pgfsys@animation@time#1#2#3#4#5{}
+% Specifies a time together with spline control points for the entry
+% and the exit to this time. The value #1 is a time in seconds (so 60
+% means 1 minute, 0.001 means one millisecond). The values #2 and #3
+% specify the control point of the spline *entering* the time point,
+% while the values #4 and #5 specify the control point of the spline
+% *leaving* the time point. They are all dimensionless values between
+% 0 and 1. For a linear animation, set the first two to 1 and the last
+% two to 0.
+%
+% Example:
+% \pgfsys@animation@time{5}{1}{1}{0.25}{0.1}
+% \pgfsys@animation@val@scalar{80}
+% \pgfsys@animation@time{8}{.75}{1}{0}{0}
+% \pgfsys@animation@val@scalar{90}
+%
+% In SVG, this will create the following entries:
+% begin = +5s
+% duration = 3s
+% keyTimes = 0;1
+% values = 80;90
+% keySpline = 0.25 0.1 0.75 1
+%
+% For the key spline, note that the entry spline controls of the first
+% time and the exit spline controls of the last point are dropped.
+%
+%
+% When the exit spline takes the special values #4="stay" and #5="0",
+% the attribute's value "stays" until the next value for the next time
+% (it "jumps" to the next value then). This corresponds, roughly, to
+% an "infinite" #4.
+%
+% Similarly, when the entry spline takes the special value #2="jump"
+% and #3="1", the value immediately jumps from the previous value to
+% the next value when the previous value was "created".
+
+\def\pgfsys@stay@text{{stay}{0}}
+\def\pgfsys@jump@text{{jump}{1}}
+
+\def\pgfsys@animation@base{}
+% Think of this command as setting the value of the attribute in the
+% timeline before the timeline starts. Normally, an animation only
+% influences the timeline while the animation is running (which may be
+% forever) and before and after the animation is running, the
+% attribute's value is not modified by the animation (so, it is just
+% inherited from the surrounding scope). When a base value is set,
+% while the animation is not running, this value is used. For most
+% attributes you can achieve the same effect by surrounding the
+% to-be-animated object by a scope and setting the value there, but
+% using bases is often more convenient and, for instance for the
+% visibility attribute, it is necessary to use a base.
+%
+% Note that when a backend driver does not support animations, base
+% values will not be depicted unless a snapshot is used explicitly.
+
+\def\pgfsys@animation@offset#1#2{}
+% #1 must be a value in seconds, #2 is the target "begin" or "end" to
+% which this offset is appended.
+
+\def\pgfsys@animation@syncbegin#1#2#3#4{}
+% #1 is the id of a sync base (obtained by
+% \pgfsys@new@id), #2 is the id type (or empty), #3 is an optional
+% offset, #4 is the target.
+
+\def\pgfsys@animation@syncend#1#2#3#4{}
+% Like the previous command.
+
+\def\pgfsys@animation@event#1#2#3#4#5{}
+% #1 is the optional id of another element (obtained by
+% \pgfsys@new@id), #2 is the optional type of the id, #3 is an event
+% name, #4 is an optional offset, #5 is the target.
+
+\def\pgfsys@animation@repeat@event#1#2#3#4#5{}
+% #1 is the optional id of another element, #2 is the type, #3 is a
+% repeat count, and #4 is an optional offset, #5 is the target.
+
+\def\pgfsys@animation@accesskey#1#2#3{}
+% #1 is a character, #2 is an optional offset, #3 is the target.
+
+\def\pgf@sys@begin@text{begin}
+
+
+% Accumulation
+
+\def\pgfsys@animation@accumulate{}
+% Corresponds to accumulate="sum" in SVG
+
+\def\pgfsys@animation@noaccumulate{}
+% Corresponds to accumulate="none" in SVG
+
+
+% Targeting
+
+\def\pgfsys@animation@whom#1#2{}
+% Sets the target of the animation. #1 must be an id previously
+% created using \pgfsys@new@id and #2 must be empty or a type
+% previously created using \pgfsys@new@id@type
+
+
+% Attribute definitions
+
+\def\pgfsys@animation@rotatealong{}
+% Applicable only to motion animations. Indicates that the
+% to-be-animated group should be rotated automatically so that it
+% points along the path as time progresses.
+
+\def\pgfsys@animation@norotatealong{}
+% Corresponds to rotate="0"
+
+\def\pgfsys@animation@movealong#1{}
+% Applicable only to motion animations. #1 is a softpath along which
+% the movement will be done.
+
+\def\pgfsys@animation@tip@markers#1#2{}
+% Applicable only to path animations. #1 and #2 are markers (declared
+% using \pgfsys@marker@declare) that store marker symbols to be added
+% at the start and at the end of the to-be-animated path. If empty, no
+% markers are added.
+
+\def\pgfsys@animation@canvas@transform#1#2{}
+% #1 is some code that may call \pgfsys@transformcm at most once. It
+% will be executed when a canvas transformation animation is
+% installed for a scope id. #2 is some further codes that may also
+% call \pgfsys@transformcm at most once. It will be installed right
+% after the animation.
+%
+% Typically, #1 is some pgf coordinate shift followed by
+% {\pgflowlevelsynccm} and #2 is \pgftransforminvert followed by
+% \pgflowlevelsynccm.
+
+
+
+% Values
+
+\def\pgfsys@animation@val@current{}
+% The current value of the attribute. At least with SVG, this can only
+% be used for the first value and, then, only if there is only one
+% other value.
+
+\def\pgfsys@animation@val@text#1{}
+% #1 should be some text.
+
+\def\pgfsys@animation@val@scalar#1{}
+% #1 should be a single value.
+
+\def\pgfsys@animation@val@dimension#1{}
+% #1 must be a dimension.
+
+\def\pgfsys@animation@val@color@rgb#1#2#3{}
+% #1,#2,#3 must be an rgb tuple
+
+\def\pgfsys@animation@val@color@cmyk#1#2#3#4{}
+% #1,#2,#3,#4 must be an cmyk tuple
+
+\def\pgfsys@animation@val@color@cmy#1#2#3{}
+% #1,#2,#3 must be an cmy tuple
+
+\def\pgfsys@animation@val@color@gray#1{}
+% #1 must be a gray value
+
+\def\pgfsys@animation@val@path#1{}
+% #1 must consist of path-construction tokens (as returned by the
+% softpath layer)
+
+\def\pgfsys@animation@val@translate#1#2{}
+% #1,#2 must be dimensions
+
+\def\pgfsys@animation@val@scale#1#2{}
+% #1,#2 must be dimensionless
+
+\def\pgfsys@animation@val@viewbox#1#2#3#4{}
+% #1,#2 describe the lower left, #3,#4 the upper right corner of the
+% view box.
+
+\def\pgfsys@animation@val@dash#1#2{}
+% #1,#2 have the syntax of \pgfsys@setdash.
+
+
+
+%
+%
+% Markers
+%
+%
+
+\def\pgfsys@marker@declare#1#2{%
+ {%
+ \pgfpicturetrue%
+ \pgfsysprotocol@getcurrentprotocol\pgfsys@marker@temp%
+ \pgfsysprotocol@setcurrentprotocol\pgfutil@empty%
+ \pgfsysprotocol@bufferedtrue%
+ \pgfsys@beginscope%
+ #2%
+ \pgfsys@endscope%
+ \xdef#1{\the\pgf@sys@id@count}%
+ \expandafter\expandafter\expandafter\global\expandafter\pgfsysprotocol@getcurrentprotocol\csname pgf@sys@marker@prot@#1\endcsname%
+ \pgfsys@marker@declare@% curtesy hook
+ \pgfsysprotocol@setcurrentprotocol\pgfsys@marker@temp%
+ \global\advance\pgf@sys@id@count by1\relax%
+ }%
+}
+\let\pgfsys@marker@declare@\relax
+% Declares a new marker symbol whose code is in #2. #1 should be a
+% macro name, which will be set to a unique
+% value by which the marker can be referenced later on. #2 should be
+% code that, when executed, produces recordable code.
+
+\def\pgfsys@marker@use#1{%
+ \pgfsysprotocol@literal{\csname pgf@sys@marker@prot@#1\endcsname}%
+}
+% Draws the marker symbol not at the end of a path, but simply with
+% the current transformation matrix
+
+
+
+
+
+
+%
+%
+% RDF
+%
+%
+
+\def\pgfsys@rdf@about#1{\pgf@sys@fail{rdf}}
+% Adds the rdf attribute "about" with value #1 to the next
+% idscope. The RDF-spec says: "a SafeCURIEorCURIEorIRI, used for
+% stating what the data is about (a 'subject' in RDF terminology);"
+
+\def\pgfsys@rdf@content#1{\pgf@sys@fail{rdf}}
+% Adds the rdf attribute content with value #1 to the next
+% idscope. The RDF-spec says: "a CDATA string, for supplying
+% machine-readable content for a literal (a 'literal object', in RDF
+% terminology);"
+
+\def\pgfsys@rdf@datatype#1{\pgf@sys@fail{rdf}}
+% Adds the rdf attribute datatype with value #1 to the next
+% idscope. The RDF-spec says: "a TERMorCURIEorAbsIRI representing a
+% datatype, to express the datatype of a literal;"
+
+\def\pgfsys@rdf@href#1{\pgf@sys@fail{rdf}}
+% Adds the rdf attribute href with value #1 to the next idscope
+% The RDF-spec says: "a traditionally navigable IRI for
+% expressing the partner resource of a relationship (a 'resource
+% object', in RDF terminology);"
+
+\def\pgfsys@rdf@inlist{\pgf@sys@fail{rdf}}
+% Adds the rdf attribute inlist to the next idscope. The
+% RDF-spec says: "An attribute used to indicate that the object
+% associated with a rel or property attribute on the same element is
+% to be added to the list for that predicate. The value of this
+% attribute must be ignored. Presence of this attribute causes a list
+% to be created if it does not already exist."
+
+\def\pgfsys@rdf@prefix#1{\pgf@sys@fail{rdf}}
+% Adds #1 to the list of the rdf prefix attribute to the next
+% idscope. Can be called several times, in which case all values of #1
+% are concatenated with whitespaces. The RDF-spec says: "a white space
+% separated list of prefix-name IRI pairs of the form NCName ':' ' '+
+% xsd:anyURI"
+
+\def\pgfsys@rdf@property#1{\pgf@sys@fail{rdf}}
+% Adds #1 to the list of the rdf property attribute to the next
+% idscope. Can be called repeatedly. The RDF-spec says: "a white space
+% separated list of TERMorCURIEorAbsIRIs, used for expressing
+% relationships between a subject and either a resource object if
+% given or some literal text (also a 'predicate');"
+
+\def\pgfsys@rdf@rel#1{\pgf@sys@fail{rdf}}
+% Adds #1 to the list of the rdf rel attribute to the next
+% next idscope. Can be called repeatedly. The
+% RDF-spec says: "a white space separated list of
+% TERMorCURIEorAbsIRIs, used for expressing relationships between two
+% resources ('predicates' in RDF terminology);"
+
+\def\pgfsys@rdf@resource#1{\pgf@sys@fail{rdf}}
+% Adds the rdf attribute resource with value #1 to the next idscope. The
+% RDF-spec says: "a SafeCURIEorCURIEorIRI for expressing the partner
+% resource of a relationship that is not intended to be navigable
+% (e.g., a 'clickable' link) (also an 'object');"
+
+\def\pgfsys@rdf@rev#1{\pgf@sys@fail{rdf}}
+% Adds #1 to the list of the rdf rev attribute to the next
+% idscope. Can be called repeatedly. The
+% RDF-spec says: "a white space separated list of
+% TERMorCURIEorAbsIRIs, used for expressing reverse relationships
+% between two resources (also 'predicates');
+
+\def\pgfsys@rdf@src#1{\pgf@sys@fail{rdf}}
+% Adds an rdf attribute src with value #1 to the next idscope. The
+% RDF-spec says: "an IRI for expressing the partner resource of a
+% relationship when the resource is embedded (also a 'resource
+% object');"
+
+\def\pgfsys@rdf@typeof#1{\pgf@sys@fail{rdf}}
+% Adds #1 to the list of the rdf typeof attribute to the next
+% idscope. Can be called repeatedly. The
+% RDF-spec says: "a white space separated list of TERMorCURIEorAbsIRIs
+% that indicate the RDF type(s) to associate with a subject;"
+
+\def\pgfsys@rdf@vocab#1{\pgf@sys@fail{rdf}}
+% Adds an rdf attribute vocab with value #1 to the next idscope. The
+% RDF-spec says: "an IRI that defines the mapping to use when a TERM
+% is referenced in an attribute value. See General Use of Terms in
+% Attributes and the section on Vocabulary Expansion."
+
+
+
%
%
% Page size stuff
@@ -765,27 +1512,8 @@
% This command has a default implementation.
-
-
-
-\def\pgfsys@closestroke{\pgfsys@closepath\pgfsys@stroke}
-% This command should have the same effect as first closing the path
-% and then stroking it.
-
-
-\def\pgfsys@transformshift#1#2{\pgfsys@transformcm{1}{0}{0}{1}{#1}{#2}}
-% This command will change the origin of the low-level coordinate
-% system to (#1,#2).
-
-\def\pgfsys@transformxyscale#1#2{\pgfsys@transformcm{#1}{0}{0}{#2}{0bp}{0bp}}
-% This command will scale the low-level coordinate system (and
-% everything that is drawn) by a factor of #1 in x-directed and #2 in
-% y-direction. Note that this applies to everything, including
-% lines. So a scaled line will have a different width and may even
-% have a different width when going along the x-axis and when going
-% along the y-axis, if the scaling is different in these directions.
-
\def\pgfsys@hbox#1{%
+ \pgfsys@begin@idscope%
\pgfsys@beginscope%
\setbox#1=\hbox{\box#1}%
\wd#1=0pt%
@@ -793,21 +1521,22 @@
\dp#1=0pt%
\box#1%
\pgfsys@endscope%
+ \pgfsys@end@idscope%
}
% Called to insert a TeX hbox into a pgfpicture.
\def\pgfsys@hboxsynced#1{%
- {\pgfsys@beginscope\pgflowlevelsynccm\pgfsys@hbox#1\pgfsys@endscope}%
-}
-% Called to insert a TeX hbox into a pgfpicture, but with the current
+ \pgfsys@beginscope\pgflowlevelsynccm\pgfsys@hbox#1\pgfsys@endscope%
+}%
+% Called to insert box #1 into a pgfpicture, but with the current
% coordinate transformation matrix synced with the canvas
-% transformation matrix.
+% transformation matrix and surrounded by a scope.
%
% In essence, this command does the same as if you first said
-% \pgflowlevelsynccm and then \pgfsys@hbox. However, a driver may
-% choose to use a ``TeX-translation'' for the translation part of the
+% \pgflowlevelsynccm and then \pgfsys@hbox#1. However, a
+% ``TeX-translation'' is used for the translation part of the
% transformation cm. This will ensure that hyperlinks ``survive'' at
-% least translations.
+% least translations.
\def\pgfsys@pictureboxsynced#1{%
{%
@@ -820,7 +1549,7 @@
% stream. However, the default implementation uses \pgfsys@hboxsynced
% in conjunction with \pgfsys@beginpicture to ensure that, if
% possible, hyperlinks survive in pdfs. Drivers that are sensitive to
-% picture-in-picture scopes shuold replace this implementation by
+% picture-in-picture scopes should replace this implementation by
% \pgfsys@beginscope\pgflowlevelsynccm\box#1\pgfsys@endscope
\def\pgfsys@beginpicture{}
@@ -917,6 +1646,7 @@
\def\pgfsys@defobject#1#2#3#4{%
\pgfsysprotocol@getcurrentprotocol\pgfsys@temp%
{%
+ \pgfpicturetrue%
\pgfsysprotocol@setcurrentprotocol\pgfutil@empty%
\pgfsysprotocol@bufferedtrue%
\pgfsys@beginscope%
@@ -957,12 +1687,19 @@
\def\pgfsys@begininvisible{\pgfsys@transformcm{1}{0}{0}{1}{2000bp}{2000bp}}
% Between this command and the closing endinvisible, all output should
% be suppressed. Nothing should be drawn at all, which includes all
-% paths, images and shadings.
+% paths, images and shadings. This command typically should not open a
+% graphic scope.
\def\pgfsys@endinvisible{\pgfsys@transformcm{1}{0}{0}{1}{-2000bp}{-2000bp}}
% Ends the invisibilty section, unless invisibility blocks have been
% nested. In this case, only the `last' one restores visibility.
+\def\pgfsys@begininvisiblescope{\pgfsys@beginscope\pgfsys@begininvisible}
+% Works like pgfsys@begininvisible, but it may open a graphics scope.
+
+\def\pgfsys@endinvisiblescope{\pgfsys@endinvisible\pgfsys@endscope}
+% Closes the invisibility scope.
+
\def\pgfsys@atbegindocument{}
% This command will be executed at the begin of the document. If for
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysanimations.code.tex b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysanimations.code.tex
new file mode 100644
index 00000000000..12862bee9db
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysanimations.code.tex
@@ -0,0 +1,2009 @@
+% Copyright 2016 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+
+
+% Guard against reading twice
+\ifx\pgfsysanimationsloaded\pgfutil@undefined
+ \let\pgfsysanimationsloaded=\relax
+\else
+ \expandafter\endinput
+\fi
+
+
+% We need some support:
+\usepgfmodule{decorations}
+
+
+% Animation abstraction layer
+%
+% This layer provides an abstraction of the
+% \pgfsys@anim... commands. The idea is to provide an interface that
+% can map animation commands either to "real" animations (for instance
+% in the sense of SVG) or to "snapshots" of animations, which are
+% especially useful for printing. For these snapshots, instead of
+% adding an animation property to a scope, the property is actually
+% set to a certain value computed by \TeX.
+%
+% For each \pgfsys@animation@... command there is a corresponding
+% \pgfsysanim command.
+
+
+% Set the current time to a snapshot time
+%
+% #1 = a global snapshot time (a dimensionless number, measured in
+% seconds).
+%
+% Description:
+%
+% When this command is used in a scope, instead of creating an
+% animation, pgf will insert appropriate commands that show the state
+% of the animation at the given time.
+%
+% The value #1 can be thought of as the "global time", which can be
+% thought of as the time that elapsed since the "onload" event.
+%
+% The command \pgfsysanimsnapshotafter works the same way as
+% pgfsysanimsnapshot, only the time #1 is interpreted as "global time
+% #1 + epsilon". This means that when two or mroe values are specified
+% for time #1, the last of them is used rather than the
+% first. Likewise, when a non-freezing timeline ends at time #1,
+% \pgfsysanimsnapshot will set the value to the last value in the
+% timeline, while \pgfsysanimsnapshotafter removes the animation.
+%
+% The following commands and effect for animations are ignored / not
+% implemented for snapshots (meaning that even if the "real" animation
+% would look in a certain way because of one of the following commands
+% or effects, the snapshot will not reflect this):
+%
+% - Events and restarts are ignored. For the snapshot, all animations
+% start at global time 0, except if the command
+% \pgfsysanimkeysnapshotstart is used to specify a different
+% start for a specific animation.
+% - The "current value" as starting value (pgf has no real chance of
+% determining the correct value of this). Using this with a snapshot
+% will raise an errer.
+%
+% Example:
+%
+% {
+% \pgfsyssnapshot{2}%
+% \pgfsysanimkeytime{0}{1}{1}{0}{0}
+% \pgfsysanimvalscalar{1}
+% \pgfsysanimkeytime{5}{1}{1}{0}{0}
+% \pgfsysanimvalscalar{0}
+% \pgfsysanimkeywhom{\someid}{}
+% \pgfsysanimate{fillopacity}%
+% % Will set the opacity of \someid to 0.6
+% }
+
+\def\pgfsysanimsnapshot#1{%
+ \def\pgfsysanim@snaptime{#1}%
+ \pgfsysanim@snap@firsttrue%
+ \pgfsysanim@is@snaptrue%
+}
+\def\pgfsysanimsnapshotafter#1{%
+ \def\pgfsysanim@snaptime{#1}%
+ \pgfsysanim@snap@firstfalse%
+ \pgfsysanim@is@snaptrue%
+}
+\newif\ifpgfsysanim@is@snap
+\newif\ifpgfsysanim@snap@first
+
+
+
+% Companion for \pgfsys@animate
+%
+% #1 = attribute
+%
+% Description:
+%
+% If not snapshot is set, \pgfsys@animate is simply called. Otherwise,
+% appropriate code is generated that sets the specified attribute of
+% the whom object to the value it would have during the animation at
+% the moment of the snapshot.
+
+\def\pgfsysanimate#1{%
+ \csname pgfsysanim@checks@#1\endcsname%
+ \ifpgfsysanim@is@snap%
+ \pgfsysanim@do@snap{#1}%
+ \else%
+ \pgfsys@animate{#1}%
+ \fi%
+}
+
+\def\pgfsysanim@do@snap#1{%
+ {%
+ \expandafter\ifx\csname pgfsysanim@prep@attr@#1\endcsname\pgfutil@undefined%
+ \else%
+ % First, compute time frame:
+ \pgfsysanim@compute@interval%
+ % Second, compute code:
+ \let\pgfsysanim@code@begin\relax%
+ \let\pgfsysanim@code@end\pgfutil@empty%
+ \csname pgfsysanim@prep@attr@#1\endcsname%
+ \ifx\pgfsysanim@code@begin\relax%
+ \else%
+ % Attach to object:
+ \expandafter\expandafter\expandafter\pgfsysanim@call@attacher%
+ \expandafter\expandafter\expandafter{\expandafter\pgfsysanim@code@begin\expandafter}\expandafter{\pgfsysanim@code@end}{}%
+ \fi%
+ \fi%
+ }%
+}
+\def\pgfsysanim@call@attacher{\pgfsys@attach@to@id{\pgfsysanim@whom@id}{\pgfsysanim@whom@type}}
+
+
+% Do some checks:
+\def\pgfsysanim@checks@path{%
+ \expandafter\global\expandafter\let\csname pgfsysanim@path@is@animated@\pgfsysanim@whom@id @\pgfsysanim@whom@type\endcsname\pgfutil@empty%
+}
+
+
+% Companions for \pgfsys@animation@restart@...
+%
+% Description:
+%
+% These commands just call \pgfsys@animation@restart@... and they are
+% *ignored* when it comes to snapshots.
+
+\def\pgfsysanimkeyrestartalways{\pgfsys@animation@restart@always}
+\def\pgfsysanimkeyrestartnever{\pgfsys@animation@restart@never}
+\def\pgfsysanimkeyrestartwhennotactive{\pgfsys@animation@restart@whennotactive}
+
+
+
+% Companions for \pgfsys@animation@repeat...
+%
+% Description:
+%
+% These commands call \pgfsys@animation@repeat... and, if there is a
+% snapshot installed, the passed values are taken into consideration.
+
+\def\pgfsysanimkeyrepeat#1{%
+ \pgfsys@animation@repeat{#1}%
+ % Snapshot
+ \let\pgfsysanim@snap@repeat@kind\pgfsysanim@snap@repeat@normal%
+ {%
+ \pgf@x#1pt\relax%
+ \expandafter}%
+ \expandafter\def\expandafter\pgfsysanim@snap@repeat@arg\expandafter{\the\pgf@x}%
+}
+\def\pgfsysanimkeyrepeatindefinite{%
+ \pgfsys@animation@repeat@indefinite%
+ % Snapshot
+ \let\pgfsysanim@snap@repeat@kind\pgfsysanim@snap@repeat@indefinite%
+ \let\pgfsysanim@snap@repeat@arg\pgfutil@empty%
+}
+\def\pgfsysanimkeyrepeatdur#1{%
+ \pgfsys@animation@repeat@dur{#1}%
+ % Snapshot
+ \let\pgfsysanim@snap@repeat@kind\pgfsysanim@snap@repeat@dur%
+ {%
+ \pgf@x#1pt\relax%
+ \expandafter}%
+ \expandafter\def\expandafter\pgfsysanim@snap@repeat@arg\expandafter{\the\pgf@x}%
+}
+\def\pgfsysanim@snap@repeat@none{n}%
+\def\pgfsysanim@snap@repeat@normal{m}%
+\def\pgfsysanim@snap@repeat@indefinite{i}%
+\def\pgfsysanim@snap@repeat@dur{d}%
+\let\pgfsysanim@snap@repeat@kind\pgfsysanim@snap@repeat@none
+\let\pgfsysanim@snap@repeat@arg\pgfutil@empty
+
+
+
+% Companions for \pgfsys@animation@freezeatend and
+% \pgfsys@animation@removeatend
+%
+% Description:
+%
+% These commands call the two system commands and, if there is a
+% snapshot installed, the settings are taken into consideration.
+
+\def\pgfsysanimkeyfreezeatend{\pgfsys@animation@freezeatend\pgfsysanim@freezeatendtrue}
+\def\pgfsysanimkeyremoveatend{\pgfsys@animation@removeatend\pgfsysanim@freezeatendfalse}
+\newif\ifpgfsysanim@freezeatend
+
+
+
+% Companion for \pgfsys@animation@time
+%
+% #1 to #5 = as in \pgfsys@animation@time
+%
+% Description:
+%
+% Calls \pgfsys@animation@time. Furthermore, the specified times are
+% recorded so that they can later be analysed for the computation
+% needed for a snapshot.
+
+\def\pgfsysanimkeytime#1#2#3#4#5{%
+ % Setup animation
+ \pgfsys@animation@time{#1}{#2}{#3}{#4}{#5}%
+ % and rember for snapshots
+ \def\pgfsysanim@time{{#1}{#2}{#3}{#4}{#5}}%
+}
+
+
+% Sets the base value
+%
+% Description:
+%
+% This will set the "base" value for an animation, which is installed
+% prior to any animation of the attribute.
+
+\def\pgfsysanimkeybase{%
+ \pgfsys@animation@base%
+ \let\pgfsysanim@time\pgfsysanim@base@text%
+}
+\def\pgfsysanim@base@text{base}%
+
+% Sets the beginning of the timeline for snapshots
+%
+% #1 = a time (a scalar)
+%
+% Description:
+%
+% Sets the start of current animation to #1 for snapshots. For
+% instance, if #1 is 5 (=five seconds), and you say
+% \pgfsysanimsnapshot{6}, the attribute will be set to whatever the
+% animation specifies after one second.
+
+\def\pgfsysanimkeysnapshotstart#1{%
+ \def\pgfsysanim@snapshotstart{#1}%
+}
+\def\pgfsysanim@snapshotstart{0}
+
+
+% Companion for \pgfsys@animation@offset
+%
+% #1, #2 = as in \pgfsys@animation@offset
+%
+% Description:
+%
+% Calls \pgfsys@animation@offset.
+
+\def\pgfsysanimkeyoffset#1#2{%
+ \pgfsys@animation@offset{#1}{#2}%
+}
+
+
+% Companion for \pgfsys@animation@sync(begin|end)
+%
+% #1 to #4 = as in \pgfsys@animation@sync(begin|end)
+%
+% Description:
+%
+% Calls \pgfsys@animation@sync(begin|end).
+
+\def\pgfsysanimkeysyncbegin#1#2#3#4{%
+ \pgfsys@animation@syncbegin{#1}{#2}{#3}{#4}%
+}
+
+\def\pgfsysanimkeysyncend#1#2#3#4{%
+ \pgfsys@animation@syncend{#1}{#2}{#3}{#4}%
+}
+
+
+% Companion for \pgfsys@animation@event
+%
+% #1 to #5 = as in \pgfsys@animation@event
+%
+% Description:
+%
+% Calls \pgfsys@animation@event.
+
+\def\pgfsysanimkeyevent#1#2#3#4#5{%
+ \pgfsys@animation@event{#1}{#2}{#3}{#4}{#5}%
+}
+
+
+% Companion for \pgfsys@animation@repeat@event
+%
+% #1 to #5 = as in \pgfsys@animation@repeat@event
+%
+% Description:
+%
+% Calls \pgfsys@animation@repeat@event.
+
+\def\pgfsysanimkeyrepeatevent#1#2#3#4#5{%
+ \pgfsys@animation@repeat@event{#1}{#2}{#3}{#4}{#5}%
+}
+
+
+
+% Companion for \pgfsys@animation@accesskey
+%
+% #1 to #3 = as in \pgfsys@animation@accesskey
+%
+% Description:
+%
+% Calls \pgfsys@animation@accesskey.
+
+\def\pgfsysanimkeyaccesskey#1#2#3{%
+ \pgfsys@animation@accesskey{#1}{#2}{#3}%
+}
+
+
+
+
+% Companions for \pgfsys@animation@(no)accumulate
+%
+% Description:
+%
+% Calls \pgfsys@animaion@(no)accumulate and records the setting for
+% snapshots.
+
+\def\pgfsysanimkeyaccumulate{\pgfsys@animation@accumulate\pgfsysanim@accumulatetrue}
+\def\pgfsysanimkeynoaccumulate{\pgfsys@animation@noaccumulate\pgfsysanim@accumulatefalse}
+\newif\ifpgfsysanim@accumulate
+
+
+
+
+% Companion for \pgfsys@animation@whom
+%
+% #1 and #2 = as for \pgfsys@animation@whom
+%
+% Description:
+%
+% Calls \pgfsys@animation@whom and records the setting for snapshots.
+
+\def\pgfsysanimkeywhom#1#2{%
+ \pgfsys@register@type{#2}%
+ \pgfsys@animation@whom{#1}{#2}%
+ % Snapshots
+ \def\pgfsysanim@whom@id{#1}%
+ \def\pgfsysanim@whom@type{#2}%
+}
+
+
+
+
+
+% Companions for \pgfsys@animation@rotatealong and
+% \pgfsys@animation@norotatealong
+%
+% Description:
+%
+% Calls the system layer command and records the setting for
+% snapshots.
+
+\def\pgfsysanimkeyrotatealong{\pgfsys@animation@rotatealong\pgfsysanim@rotatealongtrue}
+\def\pgfsysanimkeynorotatealong{\pgfsys@animation@norotatealong\pgfsysanim@rotatealongfalse}
+\newif\ifpgfsysanim@rotatealong
+
+
+% Companion for \pgfsys@animation@movealong
+%
+% #1 = the path
+%
+% Description:
+%
+% Calls the system layer command and records the setting for
+% snapshots.
+
+\def\pgfsysanimkeymovealong#1{%
+ \pgfsys@animation@movealong{#1}%
+ % Snapshot
+ \def\pgfsysanim@snap@movealong{#1}%
+}
+
+
+
+
+% Companion for \pgfsys@animation@tip@markers
+%
+% #1, #2 = the markers
+%
+% Description:
+%
+% Calls the system layer command and records the setting for
+% snapshots.
+
+\def\pgfsysanimkeytipmarkers#1#2{%
+ \pgfsys@animation@tip@markers{#1}{#2}%
+ % Snapshot
+ \def\pgfsysanim@snap@tip@start{#1}%
+ \def\pgfsysanim@snap@tip@end{#2}%
+}
+\let\pgfsysanim@snap@tip@start\pgfutil@empty%
+\let\pgfsysanim@snap@tip@end\pgfutil@empty%
+
+
+% Companion for \pgfsys@animation@canvas@transform
+%
+% Description:
+%
+% Calls the system layer command and records the setting for
+% snapshots.
+
+\def\pgfsysanimkeycanvastransform#1#2{%
+ \pgfsys@animation@canvas@transform{#1}{#2}%
+ % Snapshot
+ \def\pgfsysanim@snap@canvas@transform@pre{#1}%
+ \def\pgfsysanim@snap@canvas@transform@post{#2}%
+}
+\let\pgfsysanim@snap@canvas@transform@pre\relax
+\let\pgfsysanim@snap@canvas@transform@post\relax
+
+
+
+% Companion for \pgfsys@animation@val@current
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% an error results.
+
+\def\pgfsysanimvalcurrent{%
+ \pgfsys@animation@val@current%
+ \ifpgfsysanim@is@snap%
+ \pgferror{You may not use "current value" with an animation snapshot}%
+ \fi%
+}
+
+
+% Supresses the animation value
+%
+% Description:
+%
+% The animation value is simply ignored.
+
+\def\pgfsysanimvalnone{%
+}
+
+
+
+% Companion for \pgfsys@animation@val@text
+%
+% #1 = as for \pgfsys@animation@val@text
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvaltext#1{%
+ \pgfsys@animation@val@text{#1}%
+ \ifpgfsysanim@is@snap%
+ \pgfsysanim@esnap@record{#1}%
+ \fi%
+}
+
+
+
+
+% Companion for \pgfsys@animation@val@scalar
+%
+% #1 = as for \pgfsys@animation@val@scalar
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvalscalar#1{%
+ \pgfsys@animation@val@scalar{#1}%
+ \ifpgfsysanim@is@snap%
+ \pgfsysanim@esnap@record{#1}%
+ \fi%
+}
+
+
+
+% Companion for \pgfsys@animation@val@dimension
+%
+% #1 = as for \pgfsys@animation@val@dimension
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvaldimension#1{%
+ \pgfsys@animation@val@dimension{#1}%
+ \ifpgfsysanim@is@snap%
+ \pgfsysanim@esnap@record{#1}%
+ \fi%
+}
+
+
+
+% Dispatcher for different color values
+%
+% #1 = a color value (like "red" or "black!20")
+%
+% Description:
+%
+% This macro transforms #1 into its correct color model and, then,
+% calls the correct \pgfsysanimcolor... macro.
+
+\def\pgfsysanimvalcolor#1{%
+ \pgfutil@colorlet{pgf@anim@temp}{#1}%
+ \pgfutil@ifundefined{applycolormixins}{}{\applycolormixins{pgf@anim@temp}}%
+ \expandafter\let\expandafter\pgf@sys@temp\csname\string\color@pgf@anim@temp\endcsname
+ \expandafter\pgfanim@parse@type@color@\pgf@sys@temp%
+}
+\def\pgfanim@parse@type@color@#1#2#3#4#5{%
+ \expandafter\ifx\csname pgfsysanimvalcolor#4\endcsname\relax%
+ \pgferror{Unsupported color model `#4'}%
+ \else%
+ \edef\pgf@sys@colmarshal{\expandafter\noexpand\csname pgfsysanimvalcolor#4\endcsname}%
+ \pgf@sys@uncomma#5,,%
+ \pgf@sys@colmarshal%
+ \fi%
+}
+
+\def\pgf@sys@uncomma#1,{%
+ \def\pgf@sys@coltest{#1}%
+ \ifx\pgf@sys@coltest\pgfutil@empty%
+ \else%
+ \expandafter\def\expandafter\pgf@sys@colmarshal\expandafter{\pgf@sys@colmarshal{#1}}%
+ \expandafter\pgf@sys@uncomma%
+ \fi%
+}
+
+
+
+
+% Companion for \pgfsys@animation@val@color@rgb
+%
+% #1, #2, #3 = as for \pgfsys@animation@val@color@rgb
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvalcolorrgb#1#2#3{%
+ \pgfsys@animation@val@color@rgb{#1}{#2}{#3}%
+ \ifpgfsysanim@is@snap%
+ \pgfsysanim@esnap@record{{#1}{#2}{#3}}%
+ \fi%
+}
+
+
+
+% Companion for \pgfsys@animation@val@color@cmyk
+%
+% #1, #2, #3, #4 = as for \pgfsys@animation@val@color@cmyk
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvalcolorcmyk#1#2#3#4{%
+ \pgfsys@animation@val@color@cmyk{#1}{#2}{#3}{#4}%
+ \ifpgfsysanim@is@snap%
+ {%
+ \pgf@xa=1pt%
+ \advance\pgf@xa by-#1pt%
+ \advance\pgf@xa by-#4pt\relax%
+ \ifdim\pgf@xa<0pt\pgf@xa0pt\fi%
+ \pgf@xb=1pt%
+ \advance\pgf@xb by-#1pt%
+ \advance\pgf@xb by-#4pt\relax%
+ \ifdim\pgf@xb<0pt\pgf@xb0pt\fi%
+ \pgf@xc=1pt%
+ \advance\pgf@xc by-#1pt%
+ \advance\pgf@xc by-#4pt\relax%
+ \ifdim\pgf@xc<0pt\pgf@xc0pt\fi%
+ \edef\pgfsys@temp{{\pgf@sys@tonumber\pgf@xa}{\pgf@sys@tonumber\pgf@xb}{\pgf@sys@tonumber\pgf@xc}}%
+ \expandafter}%
+ \expandafter\pgfsysanim@esnap@record\expandafter{\pgfsys@temp}%
+ \fi%
+}
+
+
+% Companion for \pgfsys@animation@val@color@cmy
+%
+% #1, #2, #3 = as for \pgfsys@animation@val@color@cmy
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvalcolorcmy#1#2#3{%
+ \pgfsys@animation@val@color@cmy{#1}{#2}{#3}%
+ \ifpgfsysanim@is@snap%
+ {%
+ \pgf@xa=1pt%
+ \advance\pgf@xa by-#1pt%
+ \pgf@xb=1pt%
+ \advance\pgf@xb by-#1pt%
+ \pgf@xc=1pt%
+ \advance\pgf@xc by-#1pt%
+ \edef\pgfsys@temp{{\pgf@sys@tonumber\pgf@xa}{\pgf@sys@tonumber\pgf@xb}{\pgf@sys@tonumber\pgf@xc}}%
+ \expandafter}%
+ \expandafter\pgfsysanim@esnap@record\expandafter{\pgfsys@temp}%
+ \fi%
+}
+
+
+
+% Companion for \pgfsys@animation@val@color@gray
+%
+% #1 = as for \pgfsys@animation@val@color@gray
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvalcolorgray#1{%
+ \pgfsys@animation@val@color@gray{#1}%
+ \ifpgfsysanim@is@snap%
+ \pgfsysanim@esnap@record{{#1}{#1}{#1}}%
+ \fi%
+}
+
+
+
+% Special companion for \pgfsys@animation@val@path
+%
+% #1 = as for \pgfsys@animation@val@path
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvalpath#1{%
+ \pgfsys@animation@val@path{#1}%
+ \ifpgfsysanim@is@snap%
+ \pgfsysanim@snap@record{#1}%
+ \fi%
+}
+
+
+% Companion for \pgfsys@animation@val@translate
+%
+% #1, #2 = as for \pgfsys@animation@val@translate
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvaltranslate#1#2{%
+ \pgfsys@animation@val@translate{#1}{#2}%
+ \ifpgfsysanim@is@snap%
+ \pgfsysanim@esnap@record{{#1}{#2}}%
+ \fi%
+}
+
+
+
+% Companion for \pgfsys@animation@val@scale
+%
+% #1, #2 = as for \pgfsys@animation@val@scale
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvalscale#1#2{%
+ \pgfsys@animation@val@scale{#1}{#2}%
+ \ifpgfsysanim@is@snap%
+ \pgfsysanim@esnap@record{{#1}{#2}}%
+ \fi%
+}
+
+
+
+% Companion for \pgfsys@animation@val@viewbox
+%
+% #1, #2, #3, #4 = as for \pgfsys@animation@val@viewbox
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvalviewbox#1#2#3#4{%
+ \pgfsys@animation@val@viewbox{#1}{#2}{#3}{#4}%
+ \ifpgfsysanim@is@snap%
+ \pgfsysanim@esnap@record{{#1}{#2}{#3}{#4}}%
+ \fi%
+}
+
+
+
+
+% Companion for \pgfsys@animation@val@dash
+%
+% #1, #2 = as for \pgfsys@animation@val@dash
+%
+% Description:
+%
+% Calls the system layer command. If a snapshot is currently active,
+% the value is recorded in the timeline.
+
+\def\pgfsysanimvaldash#1#2{%
+ \pgfsys@animation@val@dash{#1}{#2}%
+ \ifpgfsysanim@is@snap%
+ \pgfsysanim@esnap@record{{#1}{#2}}%
+ \fi%
+}
+
+
+
+
+
+%
+% Recording mechanism: We record entries in an array.
+%
+
+\def\pgfsysanim@esnap@record#1{% records a new entry for the timeline
+ \edef\pgfsysanim@temp{#1}%
+ \expandafter\pgfsysanim@snap@record\expandafter{\pgfsysanim@temp}%
+}
+\def\pgfsysanim@snap@record#1{% records a new entry for the timeline
+ \ifx\pgfsysanim@time\pgfsysanim@base@text%
+ \def\pgfsysanim@base@value{#1}%
+ \else%
+ \advance\pgfsysanim@snap@count by1\relax%
+ \expandafter\def\expandafter\pgfsysanim@temp\expandafter{\pgfsysanim@time{#1}}%
+ \expandafter\let\csname pgfsysanim@snap@\the\pgfsysanim@snap@count\endcsname\pgfsysanim@temp%
+ \fi%
+}
+\newcount\pgfsysanim@snap@count
+\let\pgfsysanim@base@value\pgfutil@empty%
+
+
+% Compute the time-value interval of the snapshot: Based on the value of \pgfsysanim@snaptime,
+% computes the interval containing the specified time. This interval
+% will start at \pgfsysanim@prev@time and end at
+% \pgfsysanim@next@time. The values will be \pgfsysanim@prev@val and
+% \pgfsysanim@next@val.
+%
+\def\pgfsysanim@compute@interval{%
+ \let\pgfsysanim@prev@val\relax%
+ \let\pgfsysanim@prev@time\relax%
+ \let\pgfsysanim@prev@spline\pgfsysanim@default@spline%
+ \let\pgfsysanim@next@val\relax%
+ \let\pgfsysanim@next@time\relax%
+ \let\pgfsysanim@next@spline\pgfsysanim@default@spline%
+ \let\pgfsysanim@first@time\relax%
+ \let\pgfsysanim@last@time\relax%
+ \let\pgfsysanim@last@val\relax%
+ \ifnum\pgfsysanim@snap@count>0\relax%
+ \pgf@xc\pgfsysanim@snaptime pt\relax%
+ \pgf@x\pgfsysanim@snapshotstart pt\relax%
+ \advance\pgf@xc-\pgf@x\relax%
+ % Compute the start and end times:
+ \pgfsysanim@compute@start@end%
+ \pgfsysanim@compute@value%
+ \fi%
+ % Test whether a valid interval has been found:
+ \pgfsysanim@valid@snapshot@timefalse%
+ \ifx\pgfsysanim@prev@time\relax%
+ \else\ifx\pgfsysanim@next@time\relax%
+ \else\pgfsysanim@valid@snapshot@timetrue%
+ \fi\fi%
+ \ifpgfsysanim@valid@snapshot@time%
+ % ok, computed later
+ \else%
+ \ifx\pgfsysanim@base@value\pgfutil@empty%
+ \else%
+ % Ah, use base value!
+ \let\pgfsysanim@prev@val\pgfsysanim@base@value%
+ \def\pgfsysanim@prev@time{0}%
+ \let\pgfsysanim@prev@spline\pgfsysanim@default@spline%
+ \let\pgfsysanim@next@val\pgfsysanim@base@value%
+ \let\pgfsysanim@next@time\pgfsysanim@prev@time%
+ \let\pgfsysanim@next@spline\pgfsysanim@default@spline%
+ \def\pgfsysanim@first@time{-16382}%
+ \let\pgfsysanim@last@time\pgfsysanim@prev@time%
+ \let\pgfsysanim@last@val\pgfsysanim@base@value%
+ \def\pgfsysanim@frac@a{1}%
+ \def\pgfsysanim@frac@b{0}%
+ \pgfsysanim@valid@snapshot@timetrue% counts as valid!
+ \fi%
+ \fi%
+}
+\newif\ifpgfsysanim@cont%
+\newif\ifpgfsysanim@valid@snapshot@time
+\def\pgfsysanim@default@spline{{0}{0}{1}{1}}
+
+\def\pgfsysanim@compute@start@end{%
+ \expandafter\expandafter\expandafter\pgfsysanim@compute@start\csname pgfsysanim@snap@1\endcsname%
+ \expandafter\expandafter\expandafter\pgfsysanim@compute@end\csname pgfsysanim@snap@\the\pgfsysanim@snap@count\endcsname%
+}
+\def\pgfsysanim@compute@start#1#2#3#4#5#6{%
+ \def\pgfsysanim@first@time{#1}%
+}
+\def\pgfsysanim@compute@end#1#2#3#4#5#6{%
+ \def\pgfsysanim@last@time{#1}%
+ \def\pgfsysanim@last@val{#6}%
+}
+
+
+\def\pgfsysanim@compute@value{%
+ % First, are we before start?
+ \ifdim\pgf@xc<\pgfsysanim@first@time pt\relax%
+ % snapshot time (xc) is before start of animation. So, nothing happens:
+ \else%
+ \ifx\pgfsysanim@snap@repeat@kind\pgfsysanim@snap@repeat@none%
+ \pgfsysanim@handle@repeat@none%
+ \else\ifx\pgfsysanim@snap@repeat@kind\pgfsysanim@snap@repeat@normal%
+ \pgfsysanim@handle@repeat@normal%
+ \else\ifx\pgfsysanim@snap@repeat@kind\pgfsysanim@snap@repeat@indefinite%
+ \pgfsysanim@handle@repeat@indefinite%
+ \else\ifx\pgfsysanim@snap@repeat@kind\pgfsysanim@snap@repeat@dur%
+ \pgfsysanim@handle@repeat@dur%
+ \fi\fi\fi\fi%
+ \fi%
+}
+
+\def\pgfsysanim@handle@repeat@none{%
+ \ifdim\pgf@xc<\pgfsysanim@last@time pt\relax%
+ \pgfsysanim@compute@time%
+ \else%
+ \ifdim\pgf@xc=\pgfsysanim@last@time pt\relax%
+ % A bit tricky:
+ \ifpgfsysanim@snap@first%
+ \pgfsysanim@compute@time%
+ \else%
+ \ifpgfsysanim@freezeatend%
+ \let\pgfsysanim@prev@val\pgfsysanim@last@val%
+ \let\pgfsysanim@prev@time\pgfsysanim@last@time%
+ \let\pgfsysanim@next@val\pgfsysanim@last@val%
+ \let\pgfsysanim@next@time\pgfsysanim@last@time%
+ \fi%
+ \fi%
+ \else%
+ % Called when we are past the end.
+ \ifpgfsysanim@freezeatend%
+ \let\pgfsysanim@prev@val\pgfsysanim@last@val%
+ \let\pgfsysanim@prev@time\pgfsysanim@last@time%
+ \let\pgfsysanim@next@val\pgfsysanim@last@val%
+ \let\pgfsysanim@next@time\pgfsysanim@last@time%
+ \fi%
+ \fi%
+ \fi%
+}
+
+
+\def\pgfsysanim@handle@repeat@indefinite{%
+ \ifdim\pgf@xc<\pgfsysanim@last@time pt\relax%
+ \pgfsysanim@compute@time%
+ \else%
+ % Compute interval length
+ \pgf@xa=\pgfsysanim@last@time pt%
+ \pgf@xb=\pgfsysanim@first@time pt%
+ \advance\pgf@xa by-\pgf@xb%
+ % Compute repeat count and fraction:
+ \pgf@ya\pgf@xc%
+ \advance\pgf@ya by-\pgf@xb%
+ \ifdim\pgf@xa<0.01pt\relax%
+ % Interval too small: Goto end of interval
+ \def\pgfmathresult{1.0}%
+ \else%
+ \pgfmathdivide@{\pgf@ya}{\pgf@xa}%
+ \fi%
+ \pgf@x\pgfmathresult pt\relax%
+ \expandafter\pgfsysanim@splitter\the\pgf@x%
+ \pgf@xc=\pgfsysanim@repeat@frac\pgf@xa%
+ \advance\pgf@xc by\pgf@xb%
+ \pgfsysanim@compute@time%
+ \fi%
+}
+{\catcode`\p=12\catcode`\t=12\gdef\Pgfsysanim@sPliTTer#1.#2pt{\Pgfsysanim@seTTer{#1}{#2}}}
+\let\pgfsysanim@splitter\Pgfsysanim@sPliTTer
+\def\Pgfsysanim@seTTer#1#2{%
+ \def\pgfsysanim@repeat@decimal{#1}%
+ \def\pgfsysanim@repeat@frac{.#2}%
+ \ifdim\pgfsysanim@repeat@frac pt=0pt% goto one before:
+ \c@pgf@counta\pgfsysanim@repeat@decimal%
+ \advance\c@pgf@counta by-1\relax%
+ \edef\pgfsysanim@repeat@decimal{\the\c@pgf@counta}%
+ \def\pgfsysanim@repeat@frac{1}%
+ \fi%
+}
+\def\pgfsysanim@repeat@decimal{0}%
+
+
+\def\pgfsysanim@handle@repeat@normal{%
+ % Compute interval length
+ \pgf@xa=\pgfsysanim@last@time pt%
+ \pgf@xb=\pgfsysanim@first@time pt%
+ \advance\pgf@xa by-\pgf@xb%
+ % Compute repeat count and fraction:
+ \pgf@ya\pgf@xc%
+ \advance\pgf@ya by-\pgf@xb%
+ \ifdim\pgf@xa<0.01pt\relax%
+ % Interval too small: Goto end of interval
+ \def\pgfmathresult{1.0}%
+ \else%
+ \pgfmathdivide@{\pgf@ya}{\pgf@xa}%
+ \fi%
+ \pgf@x\pgfmathresult pt\relax%
+ \expandafter\pgfsysanim@splitter\the\pgf@x%
+ % Cases:
+ \ifdim\pgfmathresult pt<\pgfsysanim@snap@repeat@arg\relax%
+ % Ok! Compute!
+ \pgf@xc=\pgfsysanim@repeat@frac\pgf@xa%
+ \advance\pgf@xc by\pgf@xb%
+ \pgfsysanim@compute@time%
+ \else%
+ % Hmm. Freeze?
+ \ifpgfsysanim@freezeatend%
+ \expandafter\pgfsysanim@splitter\pgfsysanim@snap@repeat@arg%
+ \pgf@xc=\pgfsysanim@repeat@frac\pgf@xa%
+ \advance\pgf@xc by\pgf@xb%
+ \pgfsysanim@compute@time%
+ \else%
+ \ifdim\pgfmathresult pt=\pgfsysanim@snap@repeat@arg\relax%
+ \ifpgfsysanim@snap@first%
+ \expandafter\pgfsysanim@splitter\pgfsysanim@snap@repeat@arg%
+ \pgf@xc=\pgfsysanim@repeat@frac\pgf@xa%
+ \advance\pgf@xc by\pgf@xb%
+ \pgfsysanim@compute@time%
+ \fi%
+ % else: nothing!
+ \fi%
+ \fi%
+ \fi%
+}
+
+\def\pgfsysanim@handle@repeat@dur{%
+ \pgf@yb=\pgfsysanim@first@time pt%
+ \advance\pgf@yb by\pgfsysanim@snap@repeat@arg\relax%
+ \ifdim\pgf@xc<\pgf@yb% inside interval
+ \pgf@xa=\pgfsysanim@last@time pt%
+ \pgf@xb=\pgfsysanim@first@time pt%
+ \advance\pgf@xa by-\pgf@xb%
+ % Compute repeat count and fraction:
+ \pgf@ya\pgf@xc%
+ \advance\pgf@ya by-\pgf@xb%
+ \ifdim\pgf@xa<0.01pt\relax%
+ % Interval too small: Goto end of interval
+ \def\pgfmathresult{1.0}%
+ \else%
+ \pgfmathdivide@{\pgf@ya}{\pgf@xa}%
+ \fi%
+ \pgf@x\pgfmathresult pt\relax%
+ \expandafter\pgfsysanim@splitter\the\pgf@x%
+ %
+ \pgf@xc=\pgfsysanim@repeat@frac\pgf@xa%
+ \advance\pgf@xc by\pgf@xb%
+ \pgfsysanim@compute@time%
+ \else%
+ \ifpgfsysanim@freezeatend%
+ \pgfsysanim@handle@repeat@dur@freeze%
+ \else%
+ \ifdim\pgf@xc=\pgf@yb%
+ \ifpgfsysanim@snap@first%
+ \pgfsysanim@handle@repeat@dur@freeze%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+}
+
+\def\pgfsysanim@handle@repeat@dur@freeze{%
+ \pgf@xa=\pgfsysanim@last@time pt%
+ \pgf@xb=\pgfsysanim@first@time pt%
+ \advance\pgf@xa by-\pgf@xb%
+ % Compute repeat count and fraction:
+ \ifdim\pgf@xa<0.01pt\relax%
+ % Interval too small: Goto end of interval
+ \def\pgfmathresult{1.0}%
+ \else%
+ \pgfmathdivide@{\pgfsysanim@snap@repeat@arg}{\pgf@xa}%
+ \fi%
+ \pgf@x\pgfmathresult pt\relax%
+ \expandafter\pgfsysanim@splitter\the\pgf@x%
+ %
+ \pgf@xc=\pgfsysanim@repeat@frac\pgf@xa%
+ \advance\pgf@xc by\pgf@xb%
+ \pgfsysanim@compute@time%
+}
+
+
+
+
+
+\def\pgfsysanim@compute@time{%
+ % Ok, let us iterate over all points of time.
+ \pgfutil@tempcnta=1\relax%
+ \pgfsysanim@conttrue%
+ \pgfutil@loop%
+ \ifnum\pgfutil@tempcnta>\pgfsysanim@snap@count%
+ \pgfsysanim@contfalse%
+ \else%
+ \expandafter\let\expandafter\pgfsys@temp\csname pgfsysanim@snap@\the\pgfutil@tempcnta\endcsname%
+ \expandafter\pgfsysanim@test@time\pgfsys@temp%
+ \fi%
+ \ifpgfsysanim@cont%
+ \advance\pgfutil@tempcnta by1\relax%
+ \pgfutil@repeat%
+}
+
+
+\def\pgfsysanim@test@time#1#2#3#4#5#6{%
+ % #1 = time in seconds
+ % #2 to #5 = spline controls
+ % #6 = value
+ \ifdim#1pt<\pgf@xc%
+ % snap time not yet reached. Update previous:
+ \def\pgfsysanim@prev@val{#6}%
+ \def\pgfsysanim@prev@time{#1}%
+ \def\pgfsysanim@prev@spline{{#2}{#3}{#4}{#5}}%
+ \else%
+ \ifdim#1pt=\pgf@xc%
+ \ifpgfsysanim@snap@first%
+ \ifx\pgfsysanim@next@val\relax%
+ % first? Save!
+ \def\pgfsysanim@prev@val{#6}%
+ \def\pgfsysanim@prev@time{#1}%
+ \def\pgfsysanim@prev@spline{{#2}{#3}{#4}{#5}}%
+ \let\pgfsysanim@next@val\pgfsysanim@prev@val%
+ \let\pgfsysanim@next@time\pgfsysanim@prev@time%
+ \let\pgfsysanim@next@spline\pgfsysanim@prev@spline%
+ \pgfsysanim@contfalse%
+ % else, do nothing
+ \fi
+ \else%
+ % always overwrite:
+ \def\pgfsysanim@prev@val{#6}%
+ \def\pgfsysanim@prev@time{#1}%
+ \def\pgfsysanim@prev@spline{{#2}{#3}{#4}{#5}}%
+ \let\pgfsysanim@next@val\pgfsysanim@prev@val%
+ \let\pgfsysanim@next@time\pgfsysanim@prev@time%
+ \let\pgfsysanim@next@spline\pgfsysanim@prev@spline%
+ \fi%
+ \else%
+ % we passed the time!
+ \ifx\pgfsysanim@next@val\relax%
+ % first? Then save!
+ \def\pgfsysanim@next@val{#6}%
+ \def\pgfsysanim@next@time{#1}%
+ \def\pgfsysanim@next@spline{{#2}{#3}{#4}{#5}}%
+ \else%
+ % ignore later times!
+ \pgfsysanim@contfalse%
+ \fi%
+ \fi%
+ \fi%
+}
+
+\let\pgfsysanim@prev@val\relax%
+\let\pgfsysanim@prev@time\relax%
+\let\pgfsysanim@next@val\relax%
+\let\pgfsysanim@next@time\relax%
+
+% Help function
+\def\pgfsysanim@attach#1#2#3{%
+ \expandafter\pgfsysanim@prep@beg\expandafter{\pgfsysanim@first@time}{#2}{#3}%
+ \expandafter\def\expandafter\pgfsysanim@code@main\expandafter{\csname pgfsysanim@main@of@\pgfsysanim@whom@id @\pgfsysanim@whom@type @#1\endcsname}%
+ \expandafter\ifx\pgfsysanim@code@main\relax%
+ \edef\pgfsysanim@code@begin{%
+ \let\noexpand\pgfsysanim@c@begin\noexpand\pgfutil@empty%
+ \let\noexpand\pgfsysanim@c@end\noexpand\pgfutil@empty%
+ \pgfsysanim@lasttime-16383pt\relax%
+ \expandafter\noexpand\pgfsysanim@code@main%
+ \global\let\expandafter\noexpand\pgfsysanim@code@main\relax%
+ \noexpand\pgfsysanim@c@begin%
+ }%
+ \let\pgfsysanim@code@end\pgfsysanim@code@closer%
+ \expandafter\global\expandafter\let\pgfsysanim@code@main\pgfutil@empty%
+ \else%
+ \let\pgfsysanim@code@begin\relax%
+ \let\pgfsysanim@code@end\relax%
+ \fi%
+ \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\pgfsysanim@new@main%
+ \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter{\expandafter\pgfsysanim@code@main\pgfsysanim@add@main}
+ \expandafter\global\expandafter\let\pgfsysanim@code@main\pgfsysanim@new@main%
+}
+\def\pgfsysanim@code@closer{\pgfsysanim@c@end}
+
+\def\pgfsysanim@prep@beg#1#2#3{%
+ \edef\pgfsysanim@add@main{%
+ \noexpand\ifdim\pgfsysanim@lasttime>#1pt%
+ % ignore!
+ \noexpand\else%
+ \pgfsysanim@lasttime#1pt%
+ \def\noexpand\pgfsysanim@c@begin{#2}%
+ \def\noexpand\pgfsysanim@c@end{#3}%
+ \noexpand\fi%
+ }
+}
+
+\def\pgfsysanim@prep@beg@special#1#2{%
+ \def\pgfsysanim@add@main{%
+ \ifdim\pgfsysanim@lasttime>#1pt%
+ % ignore!
+ \else%
+ \pgfsysanim@lasttime#1pt%
+ \def\pgfsysanim@c@begin{#2}%
+ \fi%
+ }
+}
+
+
+
+\def\pgfsysanim@attach@special#1#2{%
+ \expandafter\expandafter\expandafter\pgfsysanim@prep@beg@special\expandafter\expandafter\expandafter{\expandafter\pgfsysanim@first@time\expandafter}\expandafter{#2}%
+ \ifx#1\relax%
+ \def#1{%
+ \pgfsysanim@lasttime-16383pt\relax%
+ \let\pgfsysanim@c@begin\pgfutil@empty%
+ }%
+ \fi%
+ \expandafter\expandafter\expandafter\gdef\expandafter\expandafter\expandafter#1\expandafter\expandafter\expandafter{\expandafter#1\pgfsysanim@add@main}%
+}
+
+
+
+\newdimen\pgfsysanim@lasttime
+
+
+\def\pgfsysanim@add@trans{%
+ \ifx\pgfsysanim@snap@canvas@transform@pre\relax%
+ \else%
+ \ifx\pgfsysanim@code@begin\relax%
+ \let\pgfsysanim@code@begin\pgfutil@empty%
+ \fi%
+ \pgfsysanim@add@trans@%
+ \fi%
+}
+\def\pgfsysanim@add@trans@{%
+ \toks0\expandafter{\pgfsysanim@snap@canvas@transform@pre}%
+ \toks1\expandafter{\pgfsysanim@code@begin}%
+ \toks2\expandafter{\pgfsysanim@snap@canvas@transform@post}%
+ \edef\pgfsysanim@code@begin{{\the\toks0 \the\toks1 \the\toks2}}%
+}
+
+% The code for the different attributes
+
+\def\pgfsysanim@prep@attr@opacity{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@scalar%
+ \pgfsysanim@cap@scalar{\pgfsysanim@x@val}{0}{1}%
+ \pgfsysanim@attach{opacity}{\noexpand\pgfsys@opacity{\pgfsysanim@x@val}}{}%
+ \fi%
+}
+
+\def\pgfsysanim@prep@attr@fillopacity{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@scalar%
+ \pgfsysanim@cap@scalar{\pgfsysanim@x@val}{0}{1}%
+ \pgfsysanim@attach{fillopacity}{\noexpand\pgfsys@fill@opacity{\pgfsysanim@x@val}}{}%
+ \fi%
+}
+
+\def\pgfsysanim@prep@attr@strokeopacity{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@scalar%
+ \pgfsysanim@cap@scalar{\pgfsysanim@x@val}{0}{1}%
+ \pgfsysanim@attach{strokeopacity}{\noexpand\pgfsys@stroke@opacity{\pgfsysanim@x@val}}{}%
+ \fi%
+}
+
+\def\pgfsysanim@prep@attr@visibility{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@text%
+ \ifx\pgfsysanim@text@val\pgf@hidden@text%
+ \pgfsysanim@attach{visibility}{\noexpand\pgfsys@begininvisiblescope}{\noexpand\pgfsys@endinvisiblescope}%
+ \else%
+ \pgfsysanim@attach{visibility}{}{}%
+ \fi%
+ \fi%
+}
+\def\pgf@hidden@text{hidden}
+
+\def\pgfsysanim@prep@attr@linewidth{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@dimension%
+ \pgfsysanim@cap@scalar{\pgfsysanim@x@val}{0}{16382}%
+ \pgfsysanim@attach{linewidth}{\noexpand\pgfsys@setlinewidth{\pgfsysanim@x@val pt}}{}%
+ \fi%
+}
+
+\def\pgfsysanim@prep@attr@dash{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@dash%
+ \pgfsysanim@attach{dash}{\noexpand\pgfsys@setdash{\pgfsysanim@dash@vals}{\pgfsysanim@x@val pt}}{}%
+ \fi%
+}
+
+\def\pgfsysanim@prep@attr@translate{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@translate%
+ \edef\pgfsysanim@code@begin{\noexpand\pgfsys@transformshift{\pgfsysanim@x@val pt}{\pgfsysanim@y@val pt}}%
+ \fi%
+ \pgfsysanim@add@trans%
+}
+
+
+\def\pgfsysanim@prep@attr@scale{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@scale%
+ \edef\pgfsysanim@code@begin{\noexpand\pgfsys@transformxyscale{\pgfsysanim@x@val}{\pgfsysanim@y@val}}%
+ \fi%
+ \pgfsysanim@add@trans%
+}
+
+\def\pgfsysanim@prep@attr@rotate{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@scalar%
+ {%
+ \pgfmathsin@{\pgfsysanim@x@val}%
+ \let\pgftransform@sin=\pgfmathresult%
+ \pgfmathcos@{\pgfsysanim@x@val}%
+ \let\pgftransform@cos=\pgfmathresult%
+ \pgf@x=\pgftransform@sin pt%
+ \pgf@xa=-\pgf@x%
+ \edef\pgfsysanim@code@begin{\noexpand\pgfsys@transformcm{\pgftransform@cos}{\pgftransform@sin}{\pgf@sys@tonumber{\pgf@xa}}{\pgftransform@cos}{0pt}{0pt}}%
+ \expandafter}%
+ \expandafter\def\expandafter\pgfsysanim@code@begin\expandafter{\pgfsysanim@code@begin}%
+ \fi%
+ \pgfsysanim@add@trans%
+}
+
+\def\pgfsysanim@prep@attr@skewx{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@scalar%
+ {%
+ \pgfmathtan@{\pgfsysanim@x@val}%
+ \edef\pgfsysanim@code@begin{\noexpand\pgfsys@transformcm{1}{0}{\pgfmathresult}{1}{0pt}{0pt}}%
+ \expandafter}%
+ \expandafter\def\expandafter\pgfsysanim@code@begin\expandafter{\pgfsysanim@code@begin}%
+ \fi%
+ \pgfsysanim@add@trans%
+}
+
+\def\pgfsysanim@prep@attr@skewy{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@scalar%
+ {%
+ \pgfmathtan@{\pgfsysanim@x@val}%
+ \edef\pgfsysanim@code@begin{\noexpand\pgfsys@transformcm{1}{\pgfmathresult}{0}{1}{0pt}{0pt}}%
+ \expandafter}%
+ \expandafter\def\expandafter\pgfsysanim@code@begin\expandafter{\pgfsysanim@code@begin}%
+ \fi%
+ \pgfsysanim@add@trans%
+}
+
+\def\pgfsysanim@prep@attr@motion{%
+ \ifx\pgfsysanim@base@value\pgfutil@empty%
+ \else%
+ \pgferror{You may not provide a base value for a motion}%
+ \let\pgfsysanim@base@value\pgfutil@empty%
+ \fi%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@motion%
+ \expandafter\pgfsysanim@prep@attr@motion@\pgfsysanim@motion@trans%
+ \fi%
+ \pgfsysanim@add@trans%
+}
+\def\pgfsysanim@prep@attr@motion@#1#2#3#4#5#6{%
+ \ifpgfsysanim@rotatealong%
+ \def\pgfsysanim@code@begin{\pgfsys@transformcm{#1}{#2}{#3}{#4}{#5}{#6}}%
+ \else%
+ \def\pgfsysanim@code@begin{\pgfsys@transformshift{#5}{#6}}%
+ \fi%
+}
+
+
+\def\pgfsysanim@prep@attr@strokecolor{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@color%
+ \pgfsysanim@cap@scalar{\pgfsysanim@x@val}{0}{1}%
+ \pgfsysanim@cap@scalar{\pgfsysanim@y@val}{0}{1}%
+ \pgfsysanim@cap@scalar{\pgfsysanim@z@val}{0}{1}%
+ \pgfsysanim@attach{strokecolor}{\noexpand\pgfsys@color@rgb@stroke{\pgfsysanim@x@val}{\pgfsysanim@y@val}{\pgfsysanim@z@val}}{}%
+ \fi%
+}
+
+\def\pgfsysanim@prep@attr@fillcolor{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@color%
+ \pgfsysanim@cap@scalar{\pgfsysanim@x@val}{0}{1}%
+ \pgfsysanim@cap@scalar{\pgfsysanim@y@val}{0}{1}%
+ \pgfsysanim@cap@scalar{\pgfsysanim@z@val}{0}{1}%
+ \pgfsysanim@attach{fillcolor}{\noexpand\pgfsys@color@rgb@fill{\pgfsysanim@x@val}{\pgfsysanim@y@val}{\pgfsysanim@z@val}}{}%
+ \fi%
+}
+
+\def\pgfsysanim@prep@attr@color{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@color%
+ \pgfsysanim@cap@scalar{\pgfsysanim@x@val}{0}{1}%
+ \pgfsysanim@cap@scalar{\pgfsysanim@y@val}{0}{1}%
+ \pgfsysanim@cap@scalar{\pgfsysanim@z@val}{0}{1}%
+ \pgfsysanim@attach{color}{\noexpand\pgfsys@color@rgb{\pgfsysanim@x@val}{\pgfsysanim@y@val}{\pgfsysanim@z@val}}{}%
+ \fi%
+}
+
+\newif\ifpgfsys@animation@view@hooked
+
+\def\pgfsysanim@prep@attr@viewbox{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@viewbox%
+ \pgfsys@attach@to@id{\pgfsysanim@whom@id}{}{%
+ \ifpgfsys@animation@view@hooked%
+ \else%
+ % Hook into viewbox systems layer commands
+ \let\pgfsys@viewboxmeet@orig\pgfsys@viewboxmeet%
+ \let\pgfsys@viewboxmeet\pgfsysanim@hooked@viewboxmeet%
+ \let\pgfsys@viewboxslice@orig\pgfsys@viewboxslice%
+ \let\pgfsys@viewboxslice\pgfsysanim@hooked@viewboxslice%
+ \pgfsys@animation@view@hookedtrue%
+ \fi%
+ }{}{}%
+ \edef\pgfsysanim@temp{{\pgfsysanim@x@val}{\pgfsysanim@y@val}{\pgfsysanim@z@val}{\pgfsysanim@w@val}}%
+ \expandafter\pgfsysanim@attach@special\csname pgfsysanim@hook@for@\pgfsys@id@ref{\pgfsysanim@whom@id}{\pgfsysanim@whom@type}\endcsname\pgfsysanim@temp%
+ \fi%
+}
+\def\pgfsysanim@hooked@viewboxmeet#1#2#3#4#5#6#7#8{%
+ \expandafter\ifx\csname pgfsysanim@hook@for@\pgfsys@id@refcurrent\endcsname\relax%
+ \pgfsys@viewboxmeet@orig{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
+ \else%
+ \csname pgfsysanim@hook@for@\pgfsys@id@refcurrent\endcsname%
+ \ifx\pgfsysanim@c@begin\pgfutil@empty%
+ % should not happen, but, then, ignore
+ \else%
+ \expandafter\pgfsysanim@hooked@viewboxmeet@\pgfsysanim@c@begin{#1}{#2}{#3}{#4}%
+ \fi%
+ \expandafter\global\expandafter\let\csname pgfsysanim@hook@for@\pgfsys@id@refcurrent\endcsname\relax%
+ \fi%
+}
+\def\pgfsysanim@hooked@viewboxmeet@#1#2#3#4#5#6#7#8{%
+ \pgfsys@viewboxmeet@orig{#5}{#6}{#7}{#8}{#1}{#2}{#3}{#4}%
+}
+\def\pgfsysanim@hooked@viewboxslice#1#2#3#4#5#6#7#8{%
+ \expandafter\ifx\csname pgfsysanim@hook@for@\pgfsys@id@refcurrent\endcsname\relax%
+ \pgfsys@viewboxslice@orig{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
+ \else%
+ \csname pgfsysanim@hook@for@\pgfsys@id@refcurrent\endcsname%
+ \expandafter\pgfsysanim@hooked@viewboxslice@\pgfsysanim@c@begin{#1}{#2}{#3}{#4}%
+ \expandafter\global\expandafter\let\csname pgfsysanim@hook@for@\pgfsys@id@refcurrent\endcsname\relax%
+ \fi%
+}
+\def\pgfsysanim@hooked@viewboxslice@#1#2#3#4#5#6#7#8{%
+ \pgfsys@viewboxslice@orig{#5}{#6}{#7}{#8}{#1}{#2}{#3}{#4}%
+}
+
+
+\newif\ifpgfsys@animation@path@hooked
+
+\def\pgfsysanim@prep@attr@path{%
+ \ifpgfsysanim@valid@snapshot@time%
+ \pgfsysanim@comp@path%
+ \pgfsys@attach@to@id{\pgfsysanim@whom@id}{}{%
+ \ifpgfsys@animation@path@hooked%
+ \else%
+ % Hook into path systems layer commands
+ \let\pgfsys@discardpath@orig\pgfsys@discardpath%
+ \let\pgfsys@stroke@orig\pgfsys@stroke%
+ \let\pgfsys@fill@orig\pgfsys@fill%
+ \let\pgfsys@fillstroke@orig\pgfsys@fillstroke%
+ \let\pgfsys@closestroke@orig\pgfsys@closestroke%
+ \let\pgfsys@discardpath\pgfsys@discardpath@hook%
+ \let\pgfsys@stroke\pgfsys@stroke@hook%
+ \let\pgfsys@fill\pgfsys@fill@hook%
+ \let\pgfsys@fillstroke\pgfsys@fillstroke@hook%
+ \let\pgfsys@closestroke\pgfsys@closestroke@hook%
+ \pgfsys@animation@path@hookedtrue%
+ \fi%
+ }{}{}%
+ \expandafter\pgfsysanim@attach@special\csname pgfsysanim@phook@for@\pgfsys@id@ref{\pgfsysanim@whom@id}{\pgfsysanim@whom@type}\endcsname\pgfsysanim@path@all%
+ \fi%
+}
+\def\pgfsys@stroke@hook{\pgfsysanim@with@tipstrue\pgfsysanim@path@hooks\pgfsys@stroke@orig}
+\def\pgfsys@fill@hook{\pgfsysanim@with@tipsfalse\pgfsysanim@path@hooks\pgfsys@fill@orig}
+\def\pgfsys@fillstroke@hook{\pgfsysanim@with@tipstrue\pgfsysanim@path@hooks\pgfsys@fillstroke@orig}
+\def\pgfsys@closestroke@hook{\pgfsysanim@with@tipsfalse\pgfsysanim@path@hooks\pgfsys@closestroke@orig}
+\def\pgfsys@discardpath@hook{\pgfsysanim@with@tipsfalse\pgfsysanim@path@hooks\pgfsys@discardpath@orig}
+
+\newif\ifpgfsysanim@with@tips
+
+\def\pgfsysanim@path@hooks#1{%
+ {%
+ \expandafter\ifx\csname pgfsysanim@phook@for@\pgfsys@id@refcurrent\endcsname\relax%
+ #1%
+ \else%
+ \pgfsys@discardpath@orig%
+ \csname pgfsysanim@phook@for@\pgfsys@id@refcurrent\endcsname%
+ \pgfsysanim@c@begin%
+ \pgfsysanim@path@val%
+ #1%
+ \ifpgfsysanim@with@tips%
+ \ifx\pgfsysanim@path@val\pgfutil@empty\else%
+ \pgfsysanim@prepare@end@of@path%
+ \begingroup%
+ \pgfsysanim@prepare@start@of@path%
+ \pgfsysanim@add@marker@at@start%
+ \endgroup%
+ \pgfsysanim@add@marker@at@end%
+ \fi%
+ \fi%
+ \expandafter\global\expandafter\let\csname pgfsysanim@phook@for@\pgfsys@id@refcurrent\endcsname\relax%
+ \fi%
+ }%
+}
+
+
+\def\pgfsysanim@prepare@start@of@path{%
+ \ifx\pgfsysanim@snap@tip@start\pgfutil@empty\else
+ %
+ % Step 1: Split
+ %
+ \ifx\pgfprocessresultpathsuffix\relax%
+ % Ok, still need to compute the split:
+ \pgfprocesssplitpath{\pgf@arrowpath}%
+ \fi%
+ %
+ % Step 2: extract
+ %
+ \expandafter\pgf@parse@start\pgfprocessresultpathsuffix\pgf@stop\pgf@stop\pgf@stop%
+ %
+ % Step 3: prep
+ %
+ \pgf@prep@start%
+ \fi%
+}
+\def\pgfsysanim@add@marker@at@start{%
+ \ifx\pgfsysanim@snap@tip@start\pgfutil@empty\else
+ %
+ % Step 4: draw
+ %
+ {%
+ \pgftransformreset%
+ \pgftransformarrow{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\pgfqpoint{\pgf@xb}{\pgf@yb}}%
+ \pgfsys@beginscope%
+ \pgflowlevelsynccm%
+ \pgfsys@marker@use{\pgfsysanim@snap@tip@start}%
+ \pgfsys@endscope%
+ }%
+ \fi%
+}
+
+
+\def\pgfsysanim@prepare@end@of@path{%
+ \let\pgfprocessresultpathsuffix\relax% flag that nothing has happened...
+ \let\pgfprocessresultsubpathsuffix\relax%
+ \pgf@precise@shorteningfalse%
+ \edef\pgf@path@shortening@distance{0pt}%
+ \ifx\pgfsysanim@snap@tip@end\pgfutil@empty\else
+ %
+ % Step 1: Split
+ %
+ \pgfprocesssplitpath{\pgfsysanim@path@val}%
+ \pgfprocesssplitsubpath{\pgfprocessresultpathsuffix}%
+ %
+ % Step 2: extract
+ %
+ \expandafter\pgf@parse@end\pgfprocessresultsubpathsuffix\pgf@stop\pgf@stop\pgf@stop%
+ %
+ % Step 3: prep
+ %
+ \pgf@prep@end%
+ \fi%
+}
+\def\pgfsysanim@add@marker@at@end{%
+ \ifx\pgfsysanim@snap@tip@end\pgfutil@empty\else
+ %
+ % Step 4: draw
+ %
+ {%
+ \pgftransformreset%
+ \pgftransformarrow{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\pgfqpoint{\pgf@xb}{\pgf@yb}}%
+ \pgfsys@beginscope%
+ \pgflowlevelsynccm%
+ \pgfsys@marker@use{\pgfsysanim@snap@tip@end}%
+ \pgfsys@endscope%
+ }%
+ \fi%
+}
+
+
+
+%
+% Interpolation functions
+%
+
+% Scalar interpolation
+
+\def\pgfsysanim@comp@scalar{%
+ \pgfsysanim@compute@fractions%
+ \pgfsysanim@mix@scalar%
+ \ifpgfsysanim@accumulate%
+ \ifnum\pgfsysanim@repeat@decimal=0\else%
+ \let\pgfsysanim@frac@b\pgfsysanim@one%
+ \let\pgfsysanim@prev@val\pgfsysanim@x@val%
+ \let\pgfsysanim@frac@a\pgfsysanim@repeat@decimal%
+ \let\pgfsysanim@next@val\pgfsysanim@last@val%
+ \pgfsysanim@mix@scalar%
+ \fi%
+ \fi%
+}
+\def\pgfsysanim@one{1}
+
+\def\pgfsysanim@mix@scalar{%
+ \pgf@x\pgfsysanim@prev@val pt%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y\pgfsysanim@next@val pt%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@x@val{\pgf@sys@tonumber\pgf@x}%
+}
+\def\pgfsysanim@cap@scalar#1#2#3{%
+ \ifdim#1 pt<#2 pt%
+ \def#1{#2}%
+ \else\ifdim#1 pt>#3 pt%
+ \def#1{#3}%
+ \fi\fi%
+}
+
+
+% Scale interpolation
+
+\def\pgfsysanim@comp@scale{%
+ \pgfsysanim@compute@fractions%
+ \expandafter\expandafter\expandafter\pgfsysanim@mix@scale\expandafter\pgfsysanim@prev@val\pgfsysanim@next@val%
+ \ifpgfsysanim@accumulate%
+ \ifnum\pgfsysanim@repeat@decimal=0\else%
+ \let\pgfsysanim@frac@b\pgfsysanim@one%
+ \let\pgfsysanim@frac@a\pgfsysanim@repeat@decimal%
+ \expandafter\pgfsysanim@mix@scale\expandafter\pgfsysanim@x@val\expandafter\pgfsysanim@y@val\pgfsysanim@last@val%
+ \fi%
+ \fi%
+}
+\def\pgfsysanim@mix@scale#1#2#3#4{%
+ \pgf@x#1pt%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#3pt%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@x@val{\pgf@sys@tonumber\pgf@x}%
+ \pgf@x#2pt%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#4pt%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@y@val{\pgf@sys@tonumber\pgf@x}%
+}
+
+
+% Dimension interpolation
+
+\def\pgfsysanim@comp@dimension{%
+ \pgfsysanim@compute@fractions%
+ \pgfsysanim@mix@dimension%
+ \ifpgfsysanim@accumulate%
+ \ifnum\pgfsysanim@repeat@decimal=0\else%
+ \let\pgfsysanim@frac@b\pgfsysanim@one%
+ \def\pgfsysanim@prev@val{\pgfsysanim@x@val pt}%
+ \let\pgfsysanim@frac@a\pgfsysanim@repeat@decimal%
+ \let\pgfsysanim@next@val\pgfsysanim@last@val%
+ \pgfsysanim@mix@dimension%
+ \fi%
+ \fi%
+}
+\def\pgfsysanim@mix@dimension{%
+ \pgf@x\pgfsysanim@prev@val%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y\pgfsysanim@next@val%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@x@val{\pgf@sys@tonumber\pgf@x}%
+}
+
+
+
+% Translate interpolation
+
+\def\pgfsysanim@comp@translate{%
+ \pgfsysanim@compute@fractions%
+ \expandafter\expandafter\expandafter\pgfsysanim@mix@translate\expandafter\pgfsysanim@prev@val\pgfsysanim@next@val%
+ \ifpgfsysanim@accumulate%
+ \ifnum\pgfsysanim@repeat@decimal=0\else%
+ \let\pgfsysanim@frac@b\pgfsysanim@one%
+ \let\pgfsysanim@frac@a\pgfsysanim@repeat@decimal%
+ \edef\pgfsysanim@prev@val{{\pgfsysanim@x@val pt}{\pgfsysanim@y@val pt}}
+ \expandafter\expandafter\expandafter\pgfsysanim@mix@translate\expandafter\pgfsysanim@prev@val\pgfsysanim@last@val%
+ \fi%
+ \fi%
+}
+\def\pgfsysanim@mix@translate#1#2#3#4{%
+ \pgf@x#1%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#3%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@x@val{\pgf@sys@tonumber\pgf@x}%
+ \pgf@x#2%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#4%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@y@val{\pgf@sys@tonumber\pgf@x}%
+}
+
+
+
+% Color interpolation
+
+\def\pgfsysanim@comp@color{%
+ \pgfsysanim@compute@fractions%
+ \expandafter\expandafter\expandafter\pgfsysanim@mix@color\expandafter\pgfsysanim@prev@val\pgfsysanim@next@val%
+ \ifpgfsysanim@accumulate%
+ \ifnum\pgfsysanim@repeat@decimal=0\else%
+ \let\pgfsysanim@frac@b\pgfsysanim@one%
+ \let\pgfsysanim@frac@a\pgfsysanim@repeat@decimal%
+ \expandafter\pgfsysanim@mix@color\expandafter\pgfsysanim@x@val\expandafter\pgfsysanim@y@val\expandafter\pgfsysanim@z@val\pgfsysanim@last@val%
+ \fi%
+ \fi%
+}
+\def\pgfsysanim@mix@color#1#2#3#4#5#6{%
+ \pgf@x#1pt%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#4pt%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@x@val{\pgf@sys@tonumber\pgf@x}%
+ \pgf@x#2pt%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#5pt%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@y@val{\pgf@sys@tonumber\pgf@x}%
+ \pgf@x#3pt%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#6pt%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@z@val{\pgf@sys@tonumber\pgf@x}%
+}
+
+
+% Text interpolation
+
+\def\pgfsysanim@comp@text{%
+ \let\pgfsysanim@text@val\pgfsysanim@prev@val%
+}
+
+
+
+% Dash interpolation
+
+\def\pgfsysanim@comp@dash{%
+ \pgfsysanim@compute@fractions%
+ \expandafter\expandafter\expandafter\pgfsysanim@mix@dash\expandafter\pgfsysanim@prev@val\pgfsysanim@next@val%
+ \ifpgfsysanim@accumulate%
+ \ifnum\pgfsysanim@repeat@decimal=0\else%
+ \let\pgfsysanim@frac@b\pgfsysanim@one%
+ \let\pgfsysanim@frac@a\pgfsysanim@repeat@decimal%
+ \edef\pgfsysanim@prev@val{{\pgfsysanim@dash@vals}{\pgfsysanim@x@val pt}}%
+ \expandafter\expandafter\expandafter\pgfsysanim@mix@dash\expandafter\pgfsysanim@prev@val\pgfsysanim@last@val%
+ \fi%
+ \fi%
+}
+\def\pgfsysanim@mix@dash#1#2#3#4{%
+ \pgf@x#2\relax%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#4\relax%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@x@val{\pgf@sys@tonumber\pgf@x}%
+ \let\pgfsysanim@dash@vals\pgfutil@empty%
+ \pgfsysanim@parse@dash#1,\pgf@stop#3,\pgf@stop%
+}
+\def\pgfsysanim@parse@dash{\pgfutil@ifnextchar\pgf@stop\pgfsysanim@parse@dash@done\pgfsysanim@parse@dash@first}
+\def\pgfsysanim@parse@dash@done\pgf@stop\pgf@stop{}%
+\def\pgfsysanim@parse@dash@first#1,#2\pgf@stop#3\pgf@stop{%
+ \pgf@x#1\relax%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgfsysanim@parse@dash@second#3\pgf@stop{#2}%
+}
+\def\pgfsysanim@parse@dash@second#1,#2\pgf@stop#3{%
+ \pgf@y#1\relax%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \def\pgfsys@temp{#2}%
+ \edef\pgfsysanim@dash@vals{\pgfsysanim@dash@vals\the\pgf@x\ifx\pgfsys@temp\pgfutil@empty\else,\fi}%
+ \pgfsysanim@parse@dash#3\pgf@stop#2\pgf@stop%
+}
+
+
+
+
+% Viewbox interpolation
+
+\def\pgfsysanim@comp@viewbox{%
+ \pgfsysanim@compute@fractions%
+ \expandafter\expandafter\expandafter\pgfsysanim@mix@viewbox\expandafter\pgfsysanim@prev@val\pgfsysanim@next@val%
+ \ifpgfsysanim@accumulate%
+ \pgferror{viewbox animations cannot accumulate / add}%
+ \fi%
+}
+\def\pgfsysanim@mix@viewbox#1#2#3#4#5#6#7#8{%
+ \pgf@x#1%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#5%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@x@val{\the\pgf@x}%
+ \pgf@x#2%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#6%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@y@val{\the\pgf@x}%
+ \pgf@x#3%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#7%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@z@val{\the\pgf@x}%
+ \pgf@x#4%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#8%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@w@val{\the\pgf@x}%
+}
+
+
+
+
+% Path interpolation
+
+\def\pgfsysanim@comp@path{%
+ \pgfsysanim@compute@fractions%
+ \edef\pgfsysanim@path@tips{%
+ \def\noexpand\pgfsysanim@snap@tip@start{\pgfsysanim@snap@tip@start}%
+ \def\noexpand\pgfsysanim@snap@tip@end{\pgfsysanim@snap@tip@end}%
+ }%
+ \let\pgfsysanim@path@val\pgfutil@empty%
+ \expandafter\expandafter\expandafter\pgfsysanim@parse@path\expandafter\pgfsysanim@prev@val\expandafter\pgf@stop\expandafter\relax\pgfsysanim@next@val\pgf@stop\relax%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgfsysanim@path@all\expandafter\expandafter\expandafter{\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgfsysanim@path@val\expandafter\expandafter\expandafter{\expandafter\pgfsysanim@path@val\expandafter}\pgfsysanim@path@tips}%
+ \ifpgfsysanim@accumulate%
+ \pgferror{path animations cannot accumulate / add}%
+ \fi%
+}
+\def\pgfsysanim@parse@path{\pgfutil@ifnextchar\pgf@stop\pgfsysanim@parse@path@done\pgfsysanim@parse@path@first}
+\def\pgfsysanim@parse@path@done\pgf@stop\relax\pgf@stop\relax{}%
+\def\pgfsysanim@parse@path@first{\pgfutil@ifnextchar\bgroup\pgfsysanim@parse@path@first@num\pgfsysanim@parse@path@token}
+\def\pgfsysanim@parse@path@token#1#2\relax#3#4\relax{%
+ \expandafter\def\expandafter\pgfsysanim@path@val\expandafter{\pgfsysanim@path@val#1}%
+ \pgfsysanim@parse@path#2\relax#4\relax%
+}
+\def\pgfsysanim@parse@path@first@num#1#2\relax#3#4\relax{%
+ \pgf@x#1%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y#3%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgfsysanim@path@val\expandafter\expandafter\expandafter{\expandafter\pgfsysanim@path@val\expandafter{\the\pgf@x}}%
+ \pgfsysanim@parse@path#2\relax#4\relax%
+}
+
+
+
+% Motion interpolation
+
+\def\pgfsysanim@comp@motion{%
+ \pgfsysanim@compute@fractions%
+ \pgf@x\pgfsysanim@prev@val pt%
+ \pgf@x\pgfsysanim@frac@b\pgf@x%
+ \pgf@y\pgfsysanim@next@val pt%
+ \advance\pgf@x by\pgfsysanim@frac@a\pgf@y%
+ \edef\pgfsysanim@x@val{\pgf@sys@tonumber\pgf@x}%
+ \ifdim\pgfsysanim@x@val pt=1pt%
+ \def\pgfsysanim@x@val{0.9999}% because of rounding problems in decorations
+ \fi%
+ \pgf@relevantforpicturesizefalse%
+ \pgfdecoratepath{pgfsysanim@motion}{%
+ \pgfsyssoftpath@setcurrentpath\pgfsysanim@snap@movealong%
+ }%
+ \ifpgfsysanim@accumulate%
+ \pgferror{motion animations cannot accumulate / add}%
+ \fi%
+}
+\pgfdeclaredecoration{pgfsysanim@motion}{s}{%
+ \state{s}[width=\pgfsysanim@x@val\pgfdecoratedremainingdistance,next state=final]{}%
+ \state{final}{\pgfgettransform\pgfsysanim@motion@trans\global\let\pgfsysanim@motion@trans\pgfsysanim@motion@trans}%
+}
+
+
+
+
+
+
+% Compute fractions and splines:
+
+\def\pgfsysanim@compute@fractions{%
+ \ifdim\pgf@xc=\pgfsysanim@prev@time pt%
+ \def\pgfsysanim@frac@a{0}%
+ \def\pgfsysanim@frac@b{1}%
+ \else%
+ \pgfmathsubtract@{\pgfsysanim@next@time}{\pgfsysanim@prev@time}%
+ \ifdim\pgfmathresult pt<0.01pt%
+ \def\pgfsysanim@frac@a{0}%
+ \def\pgfsysanim@frac@b{1}%
+ \else%
+ \let\pgfsysanim@divby\pgfmathresult%
+ \pgfmathsubtract@{\pgf@xc}{\pgfsysanim@prev@time}%
+ \pgfmathdivide@{\pgfmathresult}{\pgfsysanim@divby}%
+ \ifdim\pgfmathresult pt<0pt\def\pgfmathresult{0}\fi%
+ \ifdim\pgfmathresult pt>1pt\def\pgfmathresult{1}\fi%
+ \let\pgfsysanim@frac@a\pgfmathresult%
+ \pgfmathsubtract@{1}{\pgfmathresult}%
+ \let\pgfsysanim@frac@b\pgfmathresult%
+ \fi%
+ \fi%
+ \ifdim\pgfsysanim@frac@a pt=0pt%
+ \else\ifdim\pgfsysanim@frac@b pt=0pt%
+ \else%
+ \expandafter\expandafter\expandafter\pgfsysanim@apply@spline\expandafter\pgfsysanim@prev@spline\pgfsysanim@next@spline%
+ \fi\fi%
+}
+
+
+\def\pgfsysanim@apply@spline#1#2#3#4#5#6#7#8{%
+ \edef\pgfsys@temp{#3,#5,#4,#6}%
+ \ifx\pgfsys@temp\pgfsysanim@id@spline%
+ \else%
+ \def\pgfsysanim@prev@out@time{{#3}{#4}}%
+ \def\pgfsysanim@next@in@time{{#5}{#6}}%
+ \ifx\pgfsysanim@prev@out@time\pgfsys@stay@text%
+ \pgfsysanim@jump@splines%
+ \else\ifx\pgfsysanim@next@in@time\pgfsys@jump@text%
+ \pgfsysanim@jump@splines%
+ \else%
+ \pgf@xa#3pt%
+ \pgf@xb#5pt%
+ % #4 is val supoort a
+ % #6 is val support b
+ % our first approximation
+ \let\pgfsysanim@t\pgfsysanim@frac@a%
+ \let\pgfsysanim@s\pgfsysanim@frac@b%
+ \pgfsysanim@eval@spline%
+ \edef\pgfsysanim@ft{\the\pgf@x}%
+ \pgf@x\pgfsysanim@t pt%
+ \advance\pgf@x by256sp%
+ \pgf@y1pt%
+ \advance\pgf@y by-\pgf@x%
+ \edef\pgfsysanim@t{\pgf@sys@tonumber\pgf@x}%
+ \edef\pgfsysanim@s{\pgf@sys@tonumber\pgf@y}%
+ \pgfsysanim@eval@spline%
+ % Ok, now do Newton one step
+ \advance\pgf@x by-\pgfsysanim@ft%
+ \pgf@x256\pgf@x%
+ % \pgf@x is f'(t)
+ % must compute t - (f(t)-frac@a)/f'(t)
+ \pgf@ya\pgfsysanim@ft%
+ \advance\pgf@ya by-\pgfsysanim@frac@a pt%
+ \pgf@yb\pgf@x
+ \pgfmathreciprocal@{\pgf@yb}%
+ \ifdim\pgfmathresult pt>2.5pt%
+ \def\pgfmathresult{2.5}%
+ \fi%
+ \ifdim\pgfmathresult pt<-2.5pt%
+ \def\pgfmathresult{-2.5}%
+ \fi%
+ \pgf@x\pgfsysanim@t pt%
+ \advance\pgf@x by-\pgfmathresult\pgf@ya%
+ % \pgf@x is new t:
+ \pgf@y1pt%
+ \advance\pgf@y by-\pgf@x%
+ \edef\pgfsysanim@t{\pgf@sys@tonumber\pgf@x}%
+ \edef\pgfsysanim@s{\pgf@sys@tonumber\pgf@y}%
+ \pgfsysanim@eval@spline%
+ \edef\pgfsysanim@ft{\the\pgf@x}%
+ \pgf@x\pgfsysanim@t pt%
+ \advance\pgf@x by256sp%
+ \pgf@y1pt%
+ \advance\pgf@y by-\pgf@x%
+ \edef\pgfsysanim@t{\pgf@sys@tonumber\pgf@x}%
+ \edef\pgfsysanim@s{\pgf@sys@tonumber\pgf@y}%
+ \pgfsysanim@eval@spline%
+ % Ok, now do Newton one step2
+ \advance\pgf@x by-\pgfsysanim@ft%
+ \pgf@x256\pgf@x%
+ % \pgf@x is f'(t)
+ % must compute t - (f(t)-frac@a)/f'(t)
+ \pgf@ya\pgfsysanim@ft%
+ \advance\pgf@ya by-\pgfsysanim@frac@a pt%
+ \pgf@yb\pgf@x
+ \pgfmathreciprocal@{\pgf@yb}%
+ \ifdim\pgfmathresult pt>2.5pt%
+ \def\pgfmathresult{2.5}%
+ \fi%
+ \ifdim\pgfmathresult pt<-2.5pt%
+ \def\pgfmathresult{-2.5}%
+ \fi%
+ \pgf@x\pgfsysanim@t pt%
+ \advance\pgf@x by-\pgfmathresult\pgf@ya%
+ % \pgf@x is new t:
+ \pgf@y1pt%
+ \advance\pgf@y by-\pgf@x%
+ \edef\pgfsysanim@t{\pgf@sys@tonumber\pgf@x}%
+ \edef\pgfsysanim@s{\pgf@sys@tonumber\pgf@y}%
+ % Third newton:
+ \pgfsysanim@eval@spline%
+ \edef\pgfsysanim@ft{\the\pgf@x}%
+ \pgf@x\pgfsysanim@t pt%
+ \advance\pgf@x by256sp%
+ \pgf@y1pt%
+ \advance\pgf@y by-\pgf@x%
+ \edef\pgfsysanim@t{\pgf@sys@tonumber\pgf@x}%
+ \edef\pgfsysanim@s{\pgf@sys@tonumber\pgf@y}%
+ \pgfsysanim@eval@spline%
+ % Ok, now do Newton one step2
+ \advance\pgf@x by-\pgfsysanim@ft%
+ \pgf@x256\pgf@x%
+ % \pgf@x is f'(t)
+ % must compute t - (f(t)-frac@a)/f'(t)
+ \pgf@ya\pgfsysanim@ft%
+ \advance\pgf@ya by-\pgfsysanim@frac@a pt%
+ \pgf@yb\pgf@x
+ \pgfmathreciprocal@{\pgf@yb}%
+ \ifdim\pgfmathresult pt>2.5pt%
+ \def\pgfmathresult{2.5}%
+ \fi%
+ \ifdim\pgfmathresult pt<-2.5pt%
+ \def\pgfmathresult{-2.5}%
+ \fi%
+ \pgf@x\pgfsysanim@t pt%
+ \advance\pgf@x by-\pgfmathresult\pgf@ya%
+ % \pgf@x is new t:
+ \pgf@y1pt%
+ \advance\pgf@y by-\pgf@x%
+ \edef\pgfsysanim@t{\pgf@sys@tonumber\pgf@x}%
+ \edef\pgfsysanim@s{\pgf@sys@tonumber\pgf@y}%
+ % now, evaluate target:
+ \pgf@xa#4pt%
+ \pgf@xb#6pt%
+ \pgfsysanim@eval@spline%
+ % \pgf@x is result:
+ \pgf@y1pt%
+ \advance\pgf@y by-\pgf@x%
+ \edef\pgfsysanim@frac@a{\pgf@sys@tonumber\pgf@x}%
+ \edef\pgfsysanim@frac@b{\pgf@sys@tonumber\pgf@y}%
+ \fi\fi%
+ \fi%
+}
+\def\pgfsysanim@id@spline{0,1,0,1}
+
+\def\pgfsysanim@eval@spline{%
+ % Iteration one: (0,#1,#2,1) reduced to (ya,yb,yc)
+ \pgf@ya\pgfsysanim@t\pgf@xa%
+ \pgf@yb\pgfsysanim@t\pgf@xb%
+ \advance\pgf@yb by\pgfsysanim@s\pgf@xa%
+ \pgf@yc\pgfsysanim@t pt%
+ \advance\pgf@yc by\pgfsysanim@s\pgf@xb%
+ % Iteration two: (ya,yb,yc) recuded to (y,xc)
+ \pgf@y\pgfsysanim@t\pgf@yb%
+ \advance\pgf@y by\pgfsysanim@s\pgf@ya%
+ \pgf@xc\pgfsysanim@t\pgf@yc%
+ \advance\pgf@xc by\pgfsysanim@s\pgf@yb%
+ % Iteration three: (y,xc) recuded to (x)
+ \pgf@x\pgfsysanim@t\pgf@xc%
+ \advance\pgf@x by\pgfsysanim@s\pgf@y%
+}
+
+\def\pgfsysanim@jump@splines{%
+ \ifx\pgfsysanim@prev@out@time\pgfsys@stay@text%
+ \ifx\pgfsysanim@next@in@time\pgfsys@jump@text%
+ \ifdim\pgfsysanim@frac@a pt<0.5pt%
+ \def\pgfsysanim@frac@a{0}%
+ \def\pgfsysanim@frac@b{1}%
+ \else%
+ \def\pgfsysanim@frac@a{1}%
+ \def\pgfsysanim@frac@b{0}%
+ \fi%
+ \else%
+ % Only stay, so go to begin
+ \def\pgfsysanim@frac@a{0}%
+ \def\pgfsysanim@frac@b{1}%
+ \fi%
+ \else
+ % Only jump, so go to end
+ \def\pgfsysanim@frac@a{1}%
+ \def\pgfsysanim@frac@b{0}%
+ \fi%
+}
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
index b34ae3bcdc7..09e6eed0a84 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsysprotocol.code.tex,v 1.4 2006/10/16 22:32:59 tantau Exp $
+\ProvidesFileRCS{pgfsysprotocol.code.tex}
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
index 0b6310873ab..c52f4d49de8 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsyssoftpath.code.tex,v 1.9 2013/09/09 10:05:41 tantau Exp $
+\ProvidesFileRCS{pgfsyssoftpath.code.tex}
% This package provides the pgf system path abstraction layer. This
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex
index 7cd2e4e1127..1e4960066ed 100644
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgfcalendar.code.tex,v 1.11 2007/07/23 21:23:14 tantau Exp $
+\ProvidesFileRCS{pgfcalendar.code.tex}
% Translation stuff
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
index e984ca06315..47969aaba48 100644
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
@@ -7,7 +7,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgffor.code.tex,v 1.25 2013/12/13 11:40:27 tantau Exp $
+\ProvidesPackageRCS{pgffor.code.tex}
% pgfmath is needed
\input pgfmath.code.tex
@@ -288,6 +288,15 @@
\def\pgffor@dots@value@process#1{%
\expandafter\pgffor@dots@stripcontext#1\pgffor@@stop%
\expandafter\pgffor@dots@charcheck\pgffor@dotsvalue\pgffor@@stop%
+ \ifpgffor@alphabeticsequence
+ \else
+ \begingroup
+ \pgfkeys{/pgf/fpu/false/.try}%
+ \pgfmathparse{\pgffor@dotsvalue}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+ \let\pgffor@dotsvalue=\pgfmathresult
+ \fi
\let#1=\pgffor@dotsvalue%
}
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
index 3d79735459d..6d9f08fdcba 100644
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
@@ -76,7 +76,11 @@
\pgfkeys@temptoks{#2}\expandafter\edef\csname pgfk@#1\endcsname{\the\pgfkeys@temptoks}%
}
-
+\long\def\pgfkeyssetevalue#1#2{%
+ \pgfkeys@temptoks={#2}%
+ \pgfkeys@temptoks=\scantokens\expandafter{\expandafter{\the\pgfkeys@temptoks}}%
+ \expandafter\edef\csname pgfk@#1\expandafter\endcsname\expandafter{\the\pgfkeys@temptoks}%
+}
% Add text to a key at the end
%
@@ -608,7 +612,7 @@
\long\def\pgfkeysedef#1#2{%
\long\edef\pgfkeys@temp##1\pgfeov{#2}%
\pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}%
- \pgfkeyssetvalue{#1/.@body}{#2}%
+ \pgfkeyssetevalue{#1/.@body}{#2}%
}
@@ -633,11 +637,12 @@
\pgfkeyssetvalue{#1/.@args}{#2\pgfeov}%
\pgfkeyssetvalue{#1/.@body}{#3}%
}
+
\long\def\pgfkeysedefargs#1#2#3{%
\long\edef\pgfkeys@temp#2\pgfeov{#3}%
\pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}%
\pgfkeyssetvalue{#1/.@args}{#2\pgfeov}%
- \pgfkeyssetvalue{#1/.@body}{#3}%
+ \pgfkeyssetevalue{#1/.@body}{#3}%
}
% Like \pgfkeysdefargs, but `#2' is an integer denoting the expected
@@ -677,10 +682,10 @@
% {2}
% }
% ->defargs: 1=`1', 2=`2'
-%--------------------------------------------------
-\long\def\pgfkeysdefnargs#1#2#3{\pgfkeysdefnargs@{#1}{#2}{#3}{\def}}%
-\long\def\pgfkeysedefnargs#1#2#3{\pgfkeysdefnargs@{#1}{#2}{#3}{\edef}}%
-\long\def\pgfkeysdefnargs@#1#2#3#4{%
+% --------------------------------------------------
+\long\def\pgfkeysdefnargs#1#2#3{\pgfkeysdefnargs@{#1}{#2}{#3}{\def}{\pgfkeyssetvalue}}%
+\long\def\pgfkeysedefnargs#1#2#3{\pgfkeysdefnargs@{#1}{#2}{#3}{\edef}{\pgfkeyssetevalue}}%
+\long\def\pgfkeysdefnargs@#1#2#3#4#5{%
\ifcase#2\relax
\pgfkeyssetvalue{#1/.@args}{}%
\or
@@ -714,11 +719,9 @@
\edef\pgfkeys@tempargs{\noexpand\pgfkeysvalueof{#1/.@@body}}%
\def\pgfkeys@temp{\pgfkeysdef{#1}}%
\expandafter\pgfkeys@temp\expandafter{\pgfkeys@tempargs##1}%
- \pgfkeyssetvalue{#1/.@body}{#3}%
+ #5{#1/.@body}{#3}%
}
-
-
% Defining a key command
\pgfkeysdef{/handlers/.code}{\pgfkeysdef{\pgfkeyscurrentpath}{#1}}
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
index ef7411da924..1a413536783 100644
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
@@ -538,7 +538,7 @@
/pgf/key filter handlers/ignore/.code={},
/pgf/key filter handlers/ignore/.install key filter handler,
/pgf/key filter handlers/log/.code={%
- \immediate\write16{LOG: the option '\pgfkeyscurrentkey' (was originally '\pgfkeyscurrentkeyRAW') (case \pgfkeyscasenumber) has not been processed due to pgfkeysfiltered.}%
+ \pgf@typeout{LOG: the option '\pgfkeyscurrentkey' (was originally '\pgfkeyscurrentkeyRAW') (case \pgfkeyscasenumber) has not been processed due to pgfkeysfiltered.}%
},
%
%
@@ -598,7 +598,7 @@
},
/pgf/key filters/active families or no family DEBUG/.code 2 args={%
\if\pgfkeyscasenumber0%
- \immediate\write16{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) invoking unknown handler '#2']}%
+ \pgf@typeout{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) invoking unknown handler '#2']}%
\pgfkeysevalkeyfilterwith{#2}%
\else
\if\pgfkeyscasenumber3%
@@ -609,12 +609,12 @@
\ifpgfkeyssuccess
\pgfkeysisfamilyactive{\pgfkeyspred@TMP}%
\ifpgfkeysfiltercontinue
- \immediate\write16{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) family is ACTIVE]}%
+ \pgf@typeout{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) family is ACTIVE]}%
\else
- \immediate\write16{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) family is NOT active.]}%
+ \pgf@typeout{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) family is NOT active.]}%
\fi
\else% Ok, it does not belong to any family.
- \immediate\write16{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) invoking has-no-family-handler '#1']}%
+ \pgf@typeout{[pgfkeyshasactivefamilyornofamily(\pgfkeyscurrentkey, \pgfkeyscasenumber) invoking has-no-family-handler '#1']}%
\pgfkeysevalkeyfilterwith{#1}%
\fi
\fi
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
index 1f1ba110830..58fa5b0ef74 100644
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
@@ -14,19 +14,28 @@
% string. This command will also be available in plain TeX, where it
% prints out a message to the log.
-
-%\def\pgfversion{3.0.1-cvs}
-\def\pgfversion{3.0.1a}
+\pgfutil@IfFileExists{pgf.revision.tex}{\input pgf.revision.tex } {%
+ \def\pgfrevision{0}%
+ \def\pgfversion{0.0}%
+ \def\pgfversiondatetime{2014-07-01 00:00:00 +100}%
+ \def\pgfrevisiondatetime{2014-07-01 00:00:00 +100}%
+ \def\pgfversiondate{2014/07/01}%
+ \def\pgfrevisiondate{2014/07/01}%
+}
\begingroup
\catcode`\"=12
\pgfutil@IfUndefined{directlua}{}{%
- \directlua{pgf = {}; pgf.pgfversion = "\pgfversion"}%
+ \directlua{pgf = {}; pgf.pgfversion = "\pgfversion"}%
}%
\endgroup
-%\def\pgftypesetversion{\oldstylenums{3}.\oldstylenums{0}.\oldstylenums{1}-cvs}
-\def\pgftypesetversion{\oldstylenums{3}.\oldstylenums{0}.\oldstylenums{1}a}
+% \def\pgftypesetversion{\oldstylenums{3}.\oldstylenums{0}.\oldstylenums{1}}
+% XXX : implement pretty-printing:
+% which is better? 'version' is something like 3.0.1 . revision is
+% 3.0.1-151-g62184b3 which might be better for instable builds
+%\let\pgftypesetversion=\pgfversion
+\let\pgftypesetversion=\pgfrevision
\ifx\pgfrcsloaded\undefined
@@ -35,69 +44,40 @@
\edef\pgfrcsatcode{\the\catcode`\@}
\catcode`\@=11
-% Get date and version from RCS Ids
-\def\pgf@parseid $#1: #2.#3,v #4 #5/#6/#7 #8${%
- \pgf@parsercsfile$#2/$
- \def\pgf@rcssuffix{#3}
- \def\pgf@rcsrevision{#4}
- \def\pgf@rcsdate{#5/#6/#7}
-}
-\def\pgf@parsercsfile$#1/#2${
- \def\pgf@temp{#2}
- \ifx\pgf@temp\pgfutil@empty
- \def\pgf@rcsfile{#1}
- \else
- \pgf@parsercsfile$#2$
- \fi}
-
-\def\ProvidesFileRCS{%
- \def\pgfrcs@marshal{\ProvidesFile{\pgf@rcsfile.\pgf@rcssuffix}}%
- \pgfrcs@parserest%
-}
-\def\ProvidesPackageRCS{%
- \def\pgfrcs@marshal{\ProvidesPackage{\pgf@rcsfile}}%
- \pgfrcs@parserest%
+% not used in PGF, deprecated
+\def\ProvidesFileRCS#1{%
+ \ProvidesFile{#1}[\pgfversiondate\space v\pgfversion\space(\pgfrevision)]%
}
-\def\pgfrcs@parserest{%
- \def\pgf@rcsadditional{}%
- \afterassignment\pgfrcs@checkforoptional\let\next=}
-
-\def\pgfrcs@checkforoptional{%
- \ifx\next[%
- \let\next=\pgfrcs@getoptional%
- \else
- \let\next=\pgfrcs@package%
- \fi%
- \next}%}
-
-\def\pgfrcs@getoptional#1] ${%
- \def\pgf@rcsadditional{#1}%
- \pgfrcs@package%
-}
+\def\pgf@remove@ext#1.#2\relax{%
+ \def\pgfretval{#1}%
+}%
-\def\pgfrcs@package#1${
- \pgf@parseid $#1$
- \pgfrcs@marshal[\pgf@rcsdate\space\pgf@rcsadditional\space(rcs-revision \pgf@rcsrevision)]
+\def\ProvidesPackageRCS#1{%
+ \pgf@remove@ext#1.\relax
+ \edef\pgfrcs@marshal{{\pgfretval}[\pgfversiondate\space v\pgfversion\space(\pgfrevision)]}%
+ \expandafter\ProvidesPackage\pgfrcs@marshal
}
-\def\ProvidesClassRCS $#1$ [#2]{%
- \pgf@parseid $#1$
- \ProvidesClass{\pgf@rcsfile}[\pgf@rcsdate\space#2\space (rcs-revision \pgf@rcsrevision)]
+% not used in PGF, deprecated
+\def\ProvidesClassRCS#1{%
+ \pgf@remove@ext#1.\relax
+ \edef\pgfrcs@marshal{{\pgfretval}[\pgfversiondate\space v\pgfversion\space(\pgfrevision)]}%
+ \expandafter\ProvidesClass\pgfrcs@marshal
}
\ifx\ProvidesPackage\@undefined
- % plain tex
- \def\ProvidesPackage#1[#2]{\wlog{Loading package #1 version #2.}}
+ % plain tex
+ \def\ProvidesPackage#1[#2]{\wlog{Loading package #1 version #2.}}
\fi
\ifx\ProvidesFile\@undefined
- % plain tex
- \def\ProvidesFile#1[#2]{\wlog{Loading file #1 version #2.}}
+ % plain tex
+ \def\ProvidesFile#1[#2]{\wlog{Loading file #1 version #2.}}
\fi
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgfrcs.code.tex,v 1.31 2015/08/07 10:17:34 cfeuersaenger Exp $
+\ProvidesPackageRCS{pgfrcs.code.tex}
\catcode`\@=\pgfrcsatcode
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
index 782d0d44748..b2f55e82923 100644
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
+++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
@@ -35,6 +35,16 @@
% Simple stuff
+% \pgfutil@trimspaces{<token list>}
+%
+% Removes spaces on both sides of <token list>. Same as trimspaces.sty
+\catcode`\Q=3
+\def\pgfutil@trimspaces#1{%
+ \romannumeral-`0\pgfutil@trimspaces@\noexpand#1Q Q}
+\def\pgfutil@trimspaces@#1 Q{\pgfutil@trimspaces@@#1Q}
+\def\pgfutil@trimspaces@@#1Q#2{#1}
+\catcode`\Q=11
+
% \pgfutil@ifundefined{<macro name with backslash>}
% {<is undefined code>}{<is defined code>}
%
@@ -99,6 +109,20 @@
\def\:{\pgfutil@xifnch} \expandafter\gdef\: {\futurelet\pgfutil@let@token\pgfutil@ifnch}
}
+% pgfutil@ignorespaces
+
+\def\pgfutil@ignorespaces
+ {\ifx\pgfutil@let@token\pgfutil@sptoken
+ \expandafter\pgfutil@ignorespaces@helper
+ \else
+ \expandafter\pgfutil@next
+ \fi}
+
+{
+ \def\:{\pgfutil@ignorespaces@helper}
+ \expandafter\gdef\: {\futurelet\pgfutil@let@token\pgfutil@ignorespaces}
+}
+
% pgfutil@in@
\newif\ifpgfutil@in@
@@ -106,13 +130,13 @@
% Usage:
% \pgfutil@in@{one}{three two one}
% \ifpgfutil@in@
-% -> will be true!
+% -> will be true!
% \else
% \fi
%
% \pgfutil@in@{,}{1234,456567}
% \ifpgfutil@in@
-% -> will be true!
+% -> will be true!
% \else
% \fi
\def\pgfutil@in@#1#2{%
@@ -145,7 +169,7 @@
% pgfutil@IfFileExists
-%\chardef\pgfutil@inputcheck0
+\chardef\pgfutil@inputcheck0
\def\pgfutil@IfFileExists#1#2#3{%
\openin\pgfutil@inputcheck=#1 %
\ifeof\pgfutil@inputcheck
@@ -308,58 +332,119 @@
%
\begingroup
- \catcode`\"=12
- \edef\pgf@loc@TMPa{"}%
- %
- % prepares file names by checking for double colons.
- %
- % If '#1' is a usual file name without anything fancy, \pgfretval
- % will simply contain it. However, if '#1' contains double colons
- % (introduces, for example, by pdftex because there are white
- % spaces in '#1'), the routine
- % - removes the double colons,
- % - re-inserts them outside of the string.
- %
- % \pgfutilpreparefilename{file.tex} -> file.tex
- % \pgfutilpreparefilename{"A file name".file} -> "A file name.file"
- %
- % The resulting file name is returned in '\pgfretval',
- % furthermore, a *quoted* version of the file name is returned in
- % \pgfretvalquoted. The latter result is to have some sort of
- % output normalisation: if the file name as such contains double
- % quotes, we don't want to insert another set of them.
- %
- % This special handling has the following purposes:
- % 1. Both, treatment of white spaces and double colons is not
- % properly defined in TeX. Thus, we should only work with them if
- % necessary and maintain backwards compatibility as far as
- % possible.
- % 2. It *should* work if there are spaces.
- %
- \gdef\pgfutilpreparefilename#1{%
- \begingroup
- \ifnum\the\catcode`\"=13
- \pgfutilconvertdcolon
- \fi
- \xdef\pgf@temp{#1}%
- \endgroup
- \expandafter\pgfutil@in@\expandafter"\expandafter{\pgf@temp}%
- \ifpgfutil@in@
- \def\pgf@loc@TMPa{\pgfutilstrreplace{"}{}}%
- \expandafter\pgf@loc@TMPa\expandafter{\pgf@temp}%
- \edef\pgfretval{"\pgfretval"}% re-insert quotes! Otherwise, TeX can't use the file name.
- \let\pgfretvalquoted=\pgfretval
- \else
- \let\pgfretval=\pgf@temp
- \edef\pgfretvalquoted{"\pgfretval"}%
- \fi
- }%
- \catcode`\"=13
- \xdef\pgfutilconvertdcolon{%
- \noexpand\def\noexpand"{\pgf@loc@TMPa}%
- }%
+ \catcode`\"=12
+ \edef\pgf@loc@TMPa{"}%
+ %
+ % prepares file names by checking for double colons.
+ %
+ % If '#1' is a usual file name without anything fancy, \pgfretval
+ % will simply contain it. However, if '#1' contains double colons
+ % (introduces, for example, by pdftex because there are white
+ % spaces in '#1'), the routine
+ % - removes the double colons,
+ % - re-inserts them outside of the string.
+ %
+ % \pgfutilpreparefilename{file.tex} -> file.tex
+ % \pgfutilpreparefilename{"A file name".file} -> "A file name.file"
+ %
+ % The resulting file name is returned in '\pgfretval',
+ % furthermore, a *quoted* version of the file name is returned in
+ % \pgfretvalquoted. The latter result is to have some sort of
+ % output normalisation: if the file name as such contains double
+ % quotes, we don't want to insert another set of them.
+ %
+ % This special handling has the following purposes:
+ % 1. Both, treatment of white spaces and double colons is not
+ % properly defined in TeX. Thus, we should only work with them if
+ % necessary and maintain backwards compatibility as far as
+ % possible.
+ % 2. It *should* work if there are spaces.
+ %
+ \gdef\pgfutilpreparefilename#1{%
+ \begingroup
+ \ifnum\the\catcode`\"=13
+ \pgfutilconvertdcolon
+ \fi
+ \xdef\pgf@temp{#1}%
+ \endgroup
+ \expandafter\pgfutil@in@\expandafter"\expandafter{\pgf@temp}%
+ \ifpgfutil@in@
+ \def\pgf@loc@TMPa{\pgfutilstrreplace{"}{}}%
+ \expandafter\pgf@loc@TMPa\expandafter{\pgf@temp}%
+ \edef\pgfretval{"\pgfretval"}% re-insert quotes! Otherwise, TeX can't use the file name.
+ \let\pgfretvalquoted=\pgfretval
+ \else
+ \let\pgfretval=\pgf@temp
+ \edef\pgfretvalquoted{"\pgfretval"}%
+ \fi
+ }%
+ \catcode`\"=13
+ \xdef\pgfutilconvertdcolon{%
+ \noexpand\def\noexpand"{\pgf@loc@TMPa}%
+ }%
\endgroup
+% Converts an arbitrary command (without arguments) to a string in which all characters
+% have category 12.
+%
+% #1: a macro name (which takes no arguments)
+% #2: a macro name which will be assigned to '#1' converted to string.
+%
+% This uses '\meaning#1' hackery.
+\def\pgfutil@command@to@string#1#2{%
+ \expandafter\pgfutil@command@to@string@@\meaning#1\pgfutil@EOI{#2}%
+}%
+\xdef\pgfutil@glob@TMPa{\meaning\pgfutil@empty}%
+\expandafter\def\expandafter\pgfutil@command@to@string@@\pgfutil@glob@TMPa#1\pgfutil@EOI#2{%
+ \def#2{#1}%
+}%
+\begingroup
+\catcode`\|=0
+\catcode`\\=12
+|gdef|pgfutil@backslash@as@other{\}%
+|endgroup
+
+% Checks if the token sequence #1 (unexpanded) contains a macro and
+% invokes #2 if so and #3 if not.
+\def\pgfutilifcontainsmacro#1#2#3{%
+ \def\pgf@marshal{#1}%
+ \pgfutil@command@to@string\pgf@marshal\pgf@marshal
+ \edef\pgf@marshal{\noexpand\pgfutil@in@{\pgfutil@backslash@as@other}{\pgf@marshal}}%
+ \pgf@marshal
+ \ifpgfutil@in@
+ \def\pgf@marshal{#2}%
+ \else
+ \def\pgf@marshal{#3}%
+ \fi
+ \pgf@marshal
+}%
+
+% Tests if string '#2' starts with pattern '#1'.
+%
+% If so, it executes #3 and defines \pgfretval to contain the
+% suffix which is not equal to #1. Otherwise it executes #4.
+\def\pgfutilifstartswith#1#2#3#4{%
+ \def\pgfutilifstartswith@ ##1#1##2\pgf@EOI{%
+ \def\pgfutil@tmp{##1}%
+ \ifx\pgfutil@tmp\pgfutil@empty
+ % Ah - a hit!
+ %
+ % define \pgfretval to be the suffix...
+ \def\pgfutil@tmp#1####1\pgf@EOI{%
+ \def\pgfretval{####1}%
+ }%
+ \pgfutil@tmp#2\pgf@EOI%
+ %
+ % ... and execute the <true> code:
+ #3\relax%
+ \else
+ % hm. No such prefix.
+ #4\relax%
+ \fi
+ }%
+ \pgfutilifstartswith@#2--#1\pgf@EOI%
+}%
+
% Usage:
% \pgfutilstrreplace{<token>}{<replacement>}{<string>}
%
@@ -369,138 +454,286 @@
% #2: zero, one or more tokens which will be inserted instead of '#1'.
% #3: the string to search in
\long\def\pgfutilstrreplace#1#2#3{%
- \def\pgfretval{}%
- \long\def\pgfutil@search@and@replace@@##1#1##2\pgf@EOI{%
- \expandafter\def\expandafter\pgfretval\expandafter{\pgfretval ##1#2}%
- \pgfutil@search@and@replace@loop{#1}{##2}%
- }%
- \pgfutil@search@and@replace@loop{#1}{#3}%
+ \def\pgfretval{}%
+ \long\def\pgfutil@search@and@replace@@##1#1##2\pgf@EOI{%
+ \expandafter\def\expandafter\pgfretval\expandafter{\pgfretval ##1#2}%
+ \pgfutil@search@and@replace@loop{#1}{##2}%
+ }%
+ \pgfutil@search@and@replace@loop{#1}{#3}%
}
\long\def\pgfutil@search@and@replace@loop#1#2{%
- \pgfutil@in@{#1}{#2}%
- \ifpgfutil@in@
- \def\pgf@loc@TMPa{\pgfutil@search@and@replace@@ #2\pgf@EOI}%
- \else
- \expandafter\def\expandafter\pgfretval\expandafter{\pgfretval #2}%
- \let\pgf@loc@TMPa=\relax
- \fi
- \pgf@loc@TMPa
+ \pgfutil@in@{#1}{#2}%
+ \ifpgfutil@in@
+ \def\pgf@loc@TMPa{\pgfutil@search@and@replace@@ #2\pgf@EOI}%
+ \else
+ \expandafter\def\expandafter\pgfretval\expandafter{\pgfretval #2}%
+ \let\pgf@loc@TMPa=\relax
+ \fi
+ \pgf@loc@TMPa
}%
% Solves a linear equation system of size 2x2 using gauss elimination.
%
% It employs TeX register arithmetics to do so.
% #1: should contain 4 sets of braces with matrix entries,
-% {<a11>}{<a12>}
-% {<a21>}{<a22>}
-% where each entry should be a number without unit.
-% It is acceptable if '#1' is a macro which expands to the expected
-% format.
+% {<a11>}{<a12>}
+% {<a21>}{<a22>}
+% where each entry should be a number without unit.
+% It is acceptable if '#1' is a macro which expands to the expected
+% format.
% #2: should contain 2 sets of braces with the right-hand-side,
-% {<r1>}{<r2>}
-% where each entry should be a number without unit.
-% It is acceptable if '#2' is a macro which expands to the expected
-% format.
+% {<r1>}{<r2>}
+% where each entry should be a number without unit.
+% It is acceptable if '#2' is a macro which expands to the expected
+% format.
%
% It will assign \pgfmathresult to contain two sets of braces with the
% result.
%
% Example:
% \pgfutilsolvetwotwoleq{
-% {0.24}{1}
-% {-0.97}{0}
+% {0.24}{1}
+% {-0.97}{0}
% }{
-% {-7}
-% {18}
+% {-7}
+% {18}
% }
% -> yields \pgfmathresult={−18.55618}{−2.54642}
%
% The algorithm employs column pivotisation.
+%
+% If the matrix is singular, the routine will return {}.
\def\pgfutilsolvetwotwoleq#1#2{%
- \begingroup
- \dimendef\aa=0
- \dimendef\ab=1
- \dimendef\ba=2
- \dimendef\bb=3
- \dimendef\ra=4
- \dimendef\rb=5
- \dimendef\tmpa=6
- \dimendef\tmpb=7
- \edef\pgf@temp{#1}%
- \expandafter\pgfutilsolvetwotwoleq@A\pgf@temp
- \edef\pgf@temp{#2}%
- \expandafter\pgfutilsolvetwotwoleq@r\pgf@temp
- %
- \pgfutilsolvetwotwoleq@ifislarger\aa\ba{%
- % identity "permutation":
- \def\Pa{a}%
- \def\Pb{b}%
- }{%
- % permutation matrix: switch rows!
- \def\Pa{b}%
- \def\Pb{a}%
- }%
- % \pivot := 1/aa
- \pgfmathreciprocal@
- {\csname m\Pa a\endcsname}%
- \let\pivot=\pgfmathresult
- %
- % \factor := 1/aa * ba
- \csname \Pb a\endcsname=\pivot\csname \Pb a\endcsname
- \edef\factor{\expandafter\pgf@sys@tonumber\csname \Pb a\endcsname}%
- %
- % bb -= ba/aa * ab
- \tmpa=-\factor\csname \Pa b\endcsname
- \advance\csname \Pb b\endcsname by\tmpa
- %
- % rb -= ba/aa * ra
- \tmpa=-\factor\csname r\Pa\endcsname
- \advance\csname r\Pb\endcsname by\tmpa
- %
- % xb := rb / bb (the modified rb and modified bb!)
- \pgfmathdivide@
- {\expandafter\pgf@sys@tonumber\csname r\Pb\endcsname}
- {\expandafter\pgf@sys@tonumber\csname \Pb b\endcsname}%
- \expandafter\let\csname pgfmathresult\Pb\endcsname=\pgfmathresult
- %
- % ra -= xb * ab
- \tmpa=\csname pgfmathresult\Pb\endcsname\csname \Pa b\endcsname
- \advance\csname r\Pa\endcsname by-\tmpa
- %
- % xa := 1/aa * ra (the modified ra!)
- \tmpa=\pivot\csname r\Pa\endcsname
- \expandafter\edef\csname pgfmathresult\Pa\endcsname{\pgf@sys@tonumber\tmpa}%
- %
- \edef\pgfmathresult{%
- {\csname pgfmathresult\Pa\endcsname}%
- {\csname pgfmathresult\Pb\endcsname}%
- }%
- \pgfmath@smuggleone\pgfmathresult
- \endgroup
+ \begingroup
+ \dimendef\aa=0
+ \dimendef\ab=1
+ \dimendef\ba=2
+ \dimendef\bb=3
+ \dimendef\ra=4
+ \dimendef\rb=5
+ \dimendef\tmpa=6
+ \dimendef\tmpb=7
+ \edef\pgf@temp{#1}%
+ \expandafter\pgfutilsolvetwotwoleq@A\pgf@temp
+ \edef\pgf@temp{#2}%
+ \expandafter\pgfutilsolvetwotwoleq@r\pgf@temp
+ %
+ \pgfutilsolvetwotwoleq@ifislarger\aa\ba{%
+ % identity "permutation":
+ \def\Pa{a}%
+ \def\Pb{b}%
+ }{%
+ % permutation matrix: switch rows!
+ \def\Pa{b}%
+ \def\Pb{a}%
+ }%
+ % \pivot := 1/aa
+ \tmpa=\csname m\Pa a\endcsname pt %
+ \ifdim\tmpa<0pt \tmpa=-\tmpa\fi
+ \ifdim\tmpa<0.0001pt
+ % singular matrix!
+ \let\pgfmathresult=\pgfutil@empty
+ \else
+ \pgfmathreciprocal@
+ {\csname m\Pa a\endcsname}%
+ \let\pivot=\pgfmathresult
+ %
+ % \factor := 1/aa * ba
+ \csname \Pb a\endcsname=\pivot\csname \Pb a\endcsname
+ \edef\factor{\expandafter\pgf@sys@tonumber\csname \Pb a\endcsname}%
+ %
+ % bb -= ba/aa * ab
+ \tmpa=-\factor\csname \Pa b\endcsname
+ \advance\csname \Pb b\endcsname by\tmpa
+ %
+ % rb -= ba/aa * ra
+ \tmpa=-\factor\csname r\Pa\endcsname
+ \advance\csname r\Pb\endcsname by\tmpa
+ %
+ \tmpa=\csname \Pb b\endcsname%
+ \ifdim\tmpa<0pt \tmpa=-\tmpa\fi
+ \ifdim\tmpa<0.0001pt
+ % singular matrix!
+ \let\pgfmathresult=\pgfutil@empty
+ \else
+ % xb := rb / bb (the modified rb and modified bb!)
+ \pgfmathdivide@
+ {\expandafter\pgf@sys@tonumber\csname r\Pb\endcsname}
+ {\expandafter\pgf@sys@tonumber\csname \Pb b\endcsname}%
+ \expandafter\let\csname pgfmathresult\Pb\endcsname=\pgfmathresult
+ %
+ % ra := ra - xb * ab
+ \tmpa=\csname pgfmathresult\Pb\endcsname\csname \Pa b\endcsname
+ \advance\csname r\Pa\endcsname by-\tmpa
+ %
+ % xa := 1/aa * ra (the modified ra!)
+ \tmpa=\pivot\csname r\Pa\endcsname
+ \expandafter\edef\csname pgfmathresult\Pa\endcsname{\pgf@sys@tonumber\tmpa}%
+ %
+ \edef\pgfmathresult{%
+ {\csname pgfmathresult\Pa\endcsname}%
+ {\csname pgfmathresult\Pb\endcsname}%
+ }%
+ \fi
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
}%
+
\def\pgfutilsolvetwotwoleq@ifislarger#1#2#3#4{%
- \tmpa=#1
- \ifdim\tmpa<0pt
- \multiply\tmpa by-1
- \fi
- \tmpb=#2
- \ifdim\tmpb<0pt
- \multiply\tmpb by-1
- \fi
- \ifdim\tmpa>\tmpb
- #3%
- \else
- #4%
- \fi
+ \tmpa=#1
+ \ifdim\tmpa<0pt
+ \multiply\tmpa by-1
+ \fi
+ \tmpb=#2
+ \ifdim\tmpb<0pt
+ \multiply\tmpb by-1
+ \fi
+ \ifdim\tmpa>\tmpb
+ #3%
+ \else
+ #4%
+ \fi
+}%
+
+\def\pgfutilsolvetwotwoleqfloat@ifislarger#1#2#3#4{%
+ \pgfmathfloatabs@{#1}\let\tmpa=\pgfmathresult
+ \pgfmathfloatabs@{#2}\let\tmpb=\pgfmathresult
+ \pgfmathfloatlessthan@{\tmpb}{\tmpa}%
+ \ifpgfmathfloatcomparison
+ #3%
+ \else
+ #4%
+ \fi
}%
\def\pgfutilsolvetwotwoleq@A#1#2#3#4{%
- \def\maa{#1}\def\mab{#2}%
- \def\mba{#3}\def\mbb{#3}%
- \aa=#1pt \ab=#2pt
- \ba=#3pt \bb=#4pt
+ \def\maa{#1}\def\mab{#2}%
+ \def\mba{#3}\def\mbb{#3}%
+ \aa=#1pt \ab=#2pt
+ \ba=#3pt \bb=#4pt
}
\def\pgfutilsolvetwotwoleq@r#1#2{%
- \ra=#1pt \rb=#2pt
+ \ra=#1pt \rb=#2pt
+}%
+\def\pgfutilsolvetwotwoleqfloat@A#1#2#3#4{%
+ \pgfmathfloatparsenumber{#1}\let\maa=\pgfmathresult
+ \pgfmathfloatparsenumber{#2}\let\mab=\pgfmathresult
+ \pgfmathfloatparsenumber{#3}\let\mba=\pgfmathresult
+ \pgfmathfloatparsenumber{#4}\let\mbb=\pgfmathresult
+}
+\def\pgfutilsolvetwotwoleqfloat@r#1#2{%
+ \pgfmathfloatparsenumber{#1}\let\ra=\pgfmathresult
+ \pgfmathfloatparsenumber{#2}\let\rb=\pgfmathresult
+}%
+
+% Same as \pgfutilsolvetwotwoleq, but using floating point
+% arithmetics. The return value is still in fixed point.
+\def\pgfutilsolvetwotwoleqfloat#1#2{%
+ \begingroup
+ \pgfmathfloatcreate{1}{1.0}{-4}% FIXME : use a smaller threshold for FPU?
+ \let\thresh=\pgfmathresult
+ %
+ \edef\pgf@temp{#1}%
+ \expandafter\pgfutilsolvetwotwoleqfloat@A\pgf@temp
+ \edef\pgf@temp{#2}%
+ \expandafter\pgfutilsolvetwotwoleqfloat@r\pgf@temp
+ %
+ \pgfutilsolvetwotwoleqfloat@ifislarger\maa\mba{%
+ % identity "permutation":
+ \def\Pa{a}%
+ \def\Pb{b}%
+ }{%
+ % permutation matrix: switch rows!
+ \def\Pa{b}%
+ \def\Pb{a}%
+ }%
+ % \pivot := 1/aa
+ \expandafter\pgfmathfloatabs@\expandafter{\csname m\Pa a\endcsname}%
+ \let\tmpa=\pgfmathresult
+ \pgfmathfloatlessthan@{\tmpa}{\thresh}%
+ \ifpgfmathfloatcomparison
+ % singular matrix!
+ \let\pgfmathresult=\pgfutil@empty
+ \else
+ \expandafter\pgfmathfloatreciprocal@\expandafter{\csname m\Pa a\endcsname}%
+ \let\pivot=\pgfmathresult
+ %
+ % \factor := 1/aa * ba
+ \expandafter\pgfmathfloatmultiply@\expandafter{\csname m\Pb a\endcsname}{\pivot}%
+ \let\factor=\pgfmathresult
+ \expandafter\let\csname m\Pb a\endcsname=\factor
+ %
+ % bb -= ba/aa * ab
+ \expandafter\pgfmathfloatmultiply@\expandafter{\csname m\Pa b\endcsname}{\factor}%
+ \let\tmpa=\pgfmathresult
+ \expandafter\pgfmathfloatsubtract@\expandafter{\csname m\Pb b\endcsname}{\tmpa}%
+ \expandafter\let\csname m\Pb b\endcsname=\pgfmathresult
+ %
+ % rb -= ba/aa * ra
+ \expandafter\pgfmathfloatmultiply@\expandafter{\csname r\Pa\endcsname}{\factor}%
+ \let\tmpa=\pgfmathresult
+ \expandafter\pgfmathfloatsubtract@\expandafter{\csname r\Pb\endcsname}{\tmpa}%
+ \expandafter\let\csname r\Pb\endcsname=\pgfmathresult
+ %
+ \expandafter\pgfmathfloatabs@\expandafter{\csname m\Pb b\endcsname}%
+ \let\tmpa=\pgfmathresult
+ \pgfmathfloatlessthan@{\tmpa}{\thresh}%
+ \ifpgfmathfloatcomparison
+ % singular matrix!
+ \let\pgfmathresult=\pgfutil@empty
+ \else
+ % xb := rb / bb (the modified rb and modified bb!)
+ \edef\pgf@marshal{
+ \noexpand\pgfmathfloatdivide@
+ {\csname r\Pb\endcsname}
+ {\csname m\Pb b\endcsname}%
+ }%
+ \pgf@marshal
+ \expandafter\let\csname pgfmathresult\Pb\endcsname=\pgfmathresult
+ \let\tmpa=\pgfmathresult
+ %
+ % ra := ra - xb * ab
+ \expandafter\pgfmathfloatmultiply@\expandafter{\csname m\Pa b\endcsname}{\tmpa}%
+ \let\tmpa=\pgfmathresult
+ \expandafter\pgfmathfloatsubtract@\expandafter{\csname r\Pa\endcsname}{\tmpa}%
+ \expandafter\let\csname r\Pa\endcsname=\pgfmathresult
+ %
+ % xa := 1/aa * ra (the modified ra!)
+ \expandafter\pgfmathfloatmultiply@\expandafter{\csname r\Pa\endcsname}{\pivot}%
+ \expandafter\let\csname pgfmathresult\Pa\endcsname=\pgfmathresult
+ %
+ \edef\pgfmathresult{%
+ {\csname pgfmathresult\Pa\endcsname}%
+ {\csname pgfmathresult\Pb\endcsname}%
+ }%
+ \expandafter\pgfutilsolvetwotwoleqfloat@to@pgf@range\pgfmathresult
+ \fi
+ \fi
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+}%
+
+
+\def\pgfutilsolvetwotwoleqfloat@to@pgf@range#1#2{%
+ \pgfmathfloatcreate{1}{1.6}{4}\let\pgfutilsolvetwotwoleqfloat@to@pgf@range@max=\pgfmathresult
+ \pgfmathfloatabs@{#1}%
+ \expandafter\pgfmathfloatlessthan@\expandafter{\pgfmathresult}{\pgfutilsolvetwotwoleqfloat@to@pgf@range@max}%
+ \ifpgfmathfloatcomparison
+ \pgfmathfloatabs@{#2}%
+ \expandafter\pgfmathfloatlessthan@\expandafter{\pgfmathresult}{\pgfutilsolvetwotwoleqfloat@to@pgf@range@max}%
+ \ifpgfmathfloatcomparison
+ % ok.
+ \pgfmathfloattofixed{#1}\let\tmpa=\pgfmathresult
+ \pgfmathfloattofixed{#2}%
+ \edef\pgfmathresult{{\tmpa}{\pgfmathresult}}%
+ \else
+ % singular (because PGF cannot represent its result
+ \let\pgfmathresult=\pgfutil@empty
+ \fi
+ \else
+ % singular (because PGF cannot represent its result
+ \let\pgfmathresult=\pgfutil@empty
+ \fi
}%
% there are funny programs which overwrite \read and \write (like
@@ -544,18 +777,36 @@
\def\pgfutil@directlua#1{}
\def\pgfutil@luaescapestring#1{}
\fi
+
+
+\def\pgfutil@shellescape@lua@eightseven#1{%
+ \pgfutil@directlua{os.execute("\pgfutil@luaescapestring{#1}")}%
+}%
+\def\pgfutil@shellescape#1{%
+ \immediate\write18{#1}%
+}%
+\pgfutil@IfUndefined{directlua}{%
+}{%
+ \pgfutil@IfUndefined{lastsavedimageresourcepages}{%
+ % Ah - an old version of luatex. It still supports \write18
+ }{%
+ % take the new variant...
+ \let\pgfutil@shellescape=\pgfutil@shellescape@lua@eightseven
+ }%
+}%
+
% End of luatex stuff
% Advances a number stored in a macro and writes the result back into
% the macro.
% #1 is a macro containing a number.
\def\pgfutil@advancestringcounter#1{%
- \begingroup
- \c@pgf@counta=#1\relax
- \advance\c@pgf@counta by1
- \edef#1{\the\c@pgf@counta}%
- \pgfmath@smuggleone#1%
- \endgroup
+ \begingroup
+ \c@pgf@counta=#1\relax
+ \advance\c@pgf@counta by1
+ \edef#1{\the\c@pgf@counta}%
+ \pgfmath@smuggleone#1%
+ \endgroup
}%
\input pgfutil-common-lists.tex
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def
index ebc04d012e9..16ba0611783 100644
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def
+++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def
@@ -17,7 +17,7 @@
\def\pgfutil@aux@read@hook{%
\pgfutil@IfFileExists{\jobname.pgf}{\input \jobname.pgf\relax}{}
\csname newwrite\endcsname\pgfutil@auxout
- \csname openout\endcsname\pgfutil@auxout\jobname.pgf\relax
+ \immediate\csname openout\endcsname\pgfutil@auxout\jobname.pgf\relax
}
\def\pgfutil@writetoaux#1{\write\pgfutil@auxout{#1}}
@@ -27,6 +27,7 @@
\def\pgfutil@emu@rgb#1#2,#3,#4\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#3,#4}}}
\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#2,#2}}}
+\def\pgfutil@emu@cmyk#1#2,#3,#4,#5\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{cmyk}{#2,#3,#4,#5}}}
% no need for x colors (users can load it if needed)
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
index 6c740514bba..aad781a60ef 100644
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
+++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
@@ -28,7 +28,17 @@
\def\pgfutil@definecolor{\definecolor}
\def\pgfutil@color{\color}
-\def\pgfutil@colorlet{\colorlet}
+\def\pgfutil@colorlet#1#2{%
+ % If the color is a defined named color, we have to use the [named]
+ % option for colorlet to force xcolor to perform color model
+ % conversion.
+ \expandafter\ifx\csname\expandafter\string\csname color@#2\endcsname\endcsname\relax
+ \colorlet{#1}{#2}%
+ \else
+ \colorlet[named]{#1}{#2}%
+ \fi
+}
+
\def\pgfutil@extractcolorspec{\extractcolorspec}
\def\pgfutil@convertcolorspec{\convertcolorspec}
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def
index b05887f84cf..3d7573f7071 100644
--- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def
+++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def
@@ -16,7 +16,7 @@
\def\pgfutil@aux@read@hook{
\pgfutil@IfFileExists{\jobname.pgf}{\input \jobname.pgf\relax}{}
\csname newwrite\endcsname\pgfutil@auxout
- \csname openout\endcsname\pgfutil@auxout\jobname.pgf
+ \immediate\csname openout\endcsname\pgfutil@auxout\jobname.pgf
}
\def\pgfutil@writetoaux#1{\write\pgfutil@auxout{#1}}
@@ -160,19 +160,23 @@
\ifx\pdfoutput\relax\alloc@0\count\countdef\insc@unt\pdfoutput\fi
\def\pgfutil@guessdriver{
- \ifx\HCode\@undefined%
- \ifcase\pdfoutput%
- \ifx\XeTeXversion\@undefined
- \def\pgfsysdriver{pgfsys-dvips.def}% hopefully
- \else
- \def\pgfsysdriver{pgfsys-xetex.def}% should be right
- \fi
- \else%
- \def\pgfsysdriver{pgfsys-pdftex.def}% should be right
- \fi%
- \else%
- \def\pgfsysdriver{pgfsys-tex4ht.def}% should be right
- \fi%
+ \ifx\directlua\@undefined
+ \ifx\HCode\@undefined%
+ \ifcase\pdfoutput%
+ \ifx\XeTeXversion\@undefined
+ \def\pgfsysdriver{pgfsys-dvips.def}% hopefully
+ \else
+ \def\pgfsysdriver{pgfsys-xetex.def}% should be right
+ \fi
+ \else%
+ \def\pgfsysdriver{pgfsys-pdftex.def}% should be right
+ \fi%
+ \else%
+ \def\pgfsysdriver{pgfsys-tex4ht.def}% should be right
+ \fi%
+ \else
+ \def\pgfsysdriver{pgfsys-luatex.def}%
+ \fi
}
diff --git a/Master/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty b/Master/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
index 05bc35f3b57..710eea546b4 100644
--- a/Master/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
+++ b/Master/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
@@ -10,7 +10,7 @@
\RequirePackage{pgfrcs}
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/latex/pgf/basiclayer/pgf.sty,v 1.15 2015/08/07 10:17:34 cfeuersaenger Exp $
+\ProvidesPackageRCS{pgf.sty}
\def\pgf@draft{}
\DeclareOption{draft}{\def\pgf@draft{\pgf@draftmodetrue}}
diff --git a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfarrows.sty b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfarrows.sty
index 2c0a90b4fa5..419be0065b2 100644
--- a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfarrows.sty
+++ b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfarrows.sty
@@ -9,7 +9,7 @@
\RequirePackage{pgfrcs}
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/latex/pgf/compatibility/pgfarrows.sty,v 1.3 2006/10/11 15:22:27 tantau Exp $
+\ProvidesPackageRCS{pgfarrows.sty}
\RequirePackage{pgf}
diff --git a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfautomata.sty b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfautomata.sty
index 965fa30fed7..d43cdd4f782 100644
--- a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfautomata.sty
+++ b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfautomata.sty
@@ -9,7 +9,7 @@
\RequirePackage{pgfrcs}
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/latex/pgf/compatibility/pgfautomata.sty,v 1.3 2006/10/11 15:22:27 tantau Exp $
+\ProvidesPackageRCS{pgfautomata.sty}
\RequirePackage{pgf}
diff --git a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
index 09f6fda3149..571f2e5b3c2 100644
--- a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
+++ b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
@@ -9,7 +9,7 @@
\RequirePackage{pgfrcs}
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/latex/pgf/compatibility/pgfcomp-version-0-65.sty,v 1.7 2007/07/03 07:52:35 tantau Exp $
+\ProvidesPackageRCS{pgfcomp-version-0-65.sty}
\def\pgfdirection#1{\csname pgf@direction#1\endcsname}
diff --git a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
index f279fc89112..470868e793b 100644
--- a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
+++ b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
@@ -9,7 +9,7 @@
\RequirePackage{pgfrcs}
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/latex/pgf/compatibility/pgfcomp-version-1-18.sty,v 1.1 2007/07/23 21:23:14 tantau Exp $
+\ProvidesPackageRCS{pgfcomp-version-1-18.sty}
\def\pgfsetshapeinnerxsep#1{\pgfset{inner xsep=#1}}
\def\pgfsetshapeinnerysep#1{\pgfset{inner ysep=#1}}
diff --git a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfheaps.sty b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfheaps.sty
index 9d4a1324025..ed5a95c1530 100644
--- a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfheaps.sty
+++ b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfheaps.sty
@@ -9,7 +9,7 @@
\RequirePackage{pgfrcs}
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/latex/pgf/compatibility/pgfheaps.sty,v 1.3 2006/10/11 15:22:27 tantau Exp $
+\ProvidesPackageRCS{pgfheaps.sty}
\RequirePackage{pgf}
diff --git a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfnodes.sty b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfnodes.sty
index 1308cc761b2..33a76867961 100644
--- a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfnodes.sty
+++ b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfnodes.sty
@@ -9,7 +9,7 @@
\RequirePackage{pgfrcs}
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/latex/pgf/compatibility/pgfnodes.sty,v 1.3 2006/10/11 15:22:27 tantau Exp $
+\ProvidesPackageRCS{pgfnodes.sty}
\RequirePackage{pgf}
diff --git a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfshade.sty b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfshade.sty
index 373fbb06837..29d430e34f7 100644
--- a/Master/texmf-dist/tex/latex/pgf/compatibility/pgfshade.sty
+++ b/Master/texmf-dist/tex/latex/pgf/compatibility/pgfshade.sty
@@ -9,7 +9,7 @@
\RequirePackage{pgfrcs}
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/latex/pgf/compatibility/pgfshade.sty,v 1.3 2006/10/11 15:22:27 tantau Exp $
+\ProvidesPackageRCS{pgfshade.sty}
\RequirePackage{pgf}
diff --git a/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.code.tex b/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.code.tex
index 1c20205676b..5850362e9d5 100644
--- a/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.code.tex
+++ b/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.code.tex
@@ -33,7 +33,7 @@
%
%
-\def\pgfmanual@warning#1{\immediate\write16{! Package pgfmanual Warning: #1}}%
+\def\pgfmanual@warning#1{\pgf@typeout{! Package pgfmanual Warning: #1}}%
\pgfkeys{
diff --git a/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex b/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex
index ba9ed33e243..bdae790399e 100644
--- a/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex
+++ b/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.pdflinks.code.tex
@@ -53,6 +53,13 @@
\newif\ifpgfmanualshowlabels
+% FIXME : \cleanedhypertarget/\cleanedhyperlink have been introduced
+% in http://pgf.cvs.sourceforge.net/viewvc/pgf/pgf/latex/pgf/doc/pgfmanual.pdflinks.code.tex?r1=1.15&r2=1.16
+% but they are not present on my (CFR) system... what problem did they
+% address/how can we satisfy this dependency?
+\pgfutil@IfUndefined{cleanedhypertarget}{\let\cleanedhypertarget=\hypertarget}{}
+\pgfutil@IfUndefined{cleanedhyperlink}{\let\cleanedhyperlink=\hyperlink}{}
+
\pgfkeys{%
/codeexample/prettyprint/cs arguments/pgfkeys/.initial=1,
/codeexample/prettyprint/cs/pgfkeys/.code 2 args={\pgfmanualpdfref{#1}{#1}\{\pgfmanualprettyprintpgfkeys{#2}\pgfmanualclosebrace},
@@ -135,9 +142,9 @@
\gdef\pgfmanualpdf@installreplacements{%
\def\marg##1{{##1}}%
\def\oarg##1{[##1]}%
- \def\meta##1{<##1>}%
+ \def\meta##1{meta(##1)}%
\def\x{x}%
- \def\textbackslash{<CS>}%
+ \def\textbackslash{back/}%
\def\\{\textbackslash}%
\def\space{:}%
\edef\ {\space}%
@@ -231,9 +238,9 @@
\expandafter\gdef\csname pgfd@lbl@\pgfmanualpdflabel@@\endcsname{w}% 1. remember the label AND remember that we "w"rote it into the pdf.
\edef\pgfmanualpdflabel@@{\pgfkeysvalueof{/pdflinks/internal link prefix}.\pgfmanualpdflabel@@}%
\ifvmode%
- \expandafter\hypertarget\expandafter{\pgfmanualpdflabel@@}{#2}%
+ \expandafter\cleanedhypertarget\expandafter{\pgfmanualpdflabel@@}{#2}%
\else%
- {\setbox0=\hbox{\raise1em\hbox{\expandafter\hypertarget\expandafter{\pgfmanualpdflabel@@}{}}}\ht0=0pt\box0}#2%
+ {\setbox0=\hbox{\raise1em\hbox{\expandafter\cleanedhypertarget\expandafter{\pgfmanualpdflabel@@}{}}}\ht0=0pt\box0}#2%
\fi%
\else
#2%
@@ -280,7 +287,7 @@
}%
\def\pgfmanualpdfref@#1#2{%
\pgfkeysgetvalue{/pdflinks/internal link prefix}\pgfmanual@temp
- \expandafter\hyperlink\expandafter{\pgfmanual@temp.#1}{\pgfkeysvalueof{/pdflinks/render hyperlink/.@cmd}{#2}\pgfeov}%
+ \expandafter\cleanedhyperlink\expandafter{\pgfmanual@temp.#1}{\pgfkeysvalueof{/pdflinks/render hyperlink/.@cmd}{#2}\pgfeov}%
\ifpgfmanualshowlabels
\pgfkeysvalueof{/pdflinks/show labels code/.@cmd}{#1}\pgfeov
\fi
diff --git a/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.prettyprinter.code.tex b/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.prettyprinter.code.tex
index 3ef113dc154..f01db1e2cee 100644
--- a/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.prettyprinter.code.tex
+++ b/Master/texmf-dist/tex/latex/pgf/doc/pgfmanual.prettyprinter.code.tex
@@ -425,14 +425,14 @@
}%
\def\pgfmanual@pretty@collectpoint{%
- \let\pgfmanualprettyprinterhandlecollectedargs=\pgfmanual@pretty@collectargs@finish@collectpoint
+ \let\pgfmanualprettyprinterhandlecollectedargsVtwo=\pgfmanual@pretty@collectargs@finish@collectpoint
\expandafter\pgfmanualprettyprintercollectupto\pgfmanual@pretty@rroundbrace
{\afterpgfmanual@pretty@collectpoint}%
}
{
\catcode`\:=12
-\gdef\pgfmanual@pretty@collectargs@finish@collectpoint#1{%
+\gdef\pgfmanual@pretty@collectargs@finish@collectpoint#1#2{%
\expandafter\pgfutil@in@\pgfmanual@pretty@colon{#1}%
\ifpgfutil@in@
\def\pgfmanual@pretty@collectpoint@getcoordsystem##1:##2\relax{%
@@ -449,14 +449,14 @@
\expandafter\def\expandafter\pgfmanual@loc@TMPa\expandafter{\expandafter{\pgfmanual@pretty@glob@TMPa}{##2}}%
\expandafter\pgfmanual@loc@TMPb\pgfmanual@loc@TMPa\pgfeov
}%
- \ifpgfmanualprettyprinterfoundterminator
+ \if1#2%
\pgfmanual@pretty@collectpoint@getcoordsystem#1)\relax
\else
\pgfmanual@pretty@collectpoint@getcoordsystem#1\relax
\fi
\else
\def\pgfmanual@loc@TMPb{\pgfkeysvalueof{/codeexample/prettyprint/point/.@cmd}}%
- \ifpgfmanualprettyprinterfoundterminator
+ \if1#2%
\pgfmanual@loc@TMPb(#1)\pgfeov
\else
\pgfmanual@loc@TMPb(#1\pgfeov
@@ -477,7 +477,7 @@
% a csname may only use letters. And: only letters have a
% positive lcccode!
\ifnum\lccode`#1=0
- \ifx\pgfmanual@loc@TMPb @%
+ \ifx\pgfmanual@loc@TMPb\pgfmanual@attext%
% ok, we may also accept an `@':
\edef\pgfmanual@loc@TMPa{\pgfmanual@loc@TMPa #1}%
\else
@@ -492,6 +492,7 @@
\pgfmanual@pretty@collectcs@loop@NEXT
}%
\def\afterpgfmanual@pretty@cs{\pgfmanual@pretty@mainloop}%
+\def\pgfmanual@attext{@}
\def\pgfmanual@pretty@collectcs@loop@END{%
\pgfkeysifdefined{/codeexample/prettyprint/cs arguments/\pgfmanual@loc@TMPa}{%
@@ -703,12 +704,25 @@
\newif\ifpgfmanualprettyprinterfoundterminator
+\def\pgfmanualprettyprinterhandlecollectedargsVtwo@default#1#2{%
+ \if1#2%
+ \pgfmanualprettyprinterfoundterminatortrue
+ \else
+ \pgfmanualprettyprinterfoundterminatorfalse
+ \fi
+ \pgfmanualprettyprinterhandlecollectedargs{#1}%
+}%
+\def\pgfmanualprettyprintercollectupto@restore@callback{%
+ \let\pgfmanualprettyprinterhandlecollectedargsVtwo=\pgfmanualprettyprinterhandlecollectedargsVtwo@default
+}%
+\pgfmanualprettyprintercollectupto@restore@callback
+
% Collects tokens inside of a token list up to a single delimiting token, dealing with nested
% catcode-12-braces.
%
% #1: is the end token, the delimiter. It won't be collected.
% #2: is code to invoke after
-% \pgfmanualprettyprinterhandlecollectedargs has been invoked.
+% \pgfmanualprettyprinterhandlecollectedargsVtwo has been invoked.
%
% PRECONDITION:
% there is a large token list following
@@ -717,17 +731,17 @@
% POSTCONDITION:
% - the arguments will be collected as
% '<result> := <token list>'
-% and then, \pgfmanualprettyprinterhandlecollectedargs{<result>} will be
-% invoked. Just define \pgfmanualprettyprinterhandlecollectedargs
+% and then,
+% \pgfmanualprettyprinterhandlecollectedargsVtwo{<result>}{<found terminator>? 1 : 0} will be
+% invoked. Just define
+% \pgfmanualprettyprinterhandlecollectedargsVtwo
% properly.
% Then, #2 will be invoked.
-% - The boolean \ifpgfmanualprettyprinterfoundterminator will be set to true if and only if '#1' has been found.
%
% @see \pgfmanualprettyprintercollectargcount for more details.
%
\def\pgfmanualprettyprintercollectupto#1#2{%
\pgfmanualprettyprinterarghasunmatchedbracesfalse
- \pgfmanualprettyprinterfoundterminatortrue
\begingroup
\def\pgfmanual@loc@delimittoken{#1}%
\toksdef\t@afterpgfmanualprettyprinterhandlecollected=10
@@ -756,8 +770,8 @@
\ifnum\c@pgfmanual@pretty@openbracecount>0
\noexpand\pgfmanualprettyprinterarghasunmatchedbracestrue
\fi
- \noexpand\pgfmanualprettyprinterfoundterminatorfalse
- \noexpand\pgfmanualprettyprinterhandlecollectedargs{\the\t@pgfmanual@currentarg}%
+ \noexpand\pgfmanualprettyprinterhandlecollectedargsVtwo{\the\t@pgfmanual@currentarg}{0}%
+ \noexpand\pgfmanualprettyprintercollectupto@restore@callback
\the\t@afterpgfmanualprettyprinterhandlecollected
\noexpand\pgfmanual@EOI% <- put this token back into token list!
}%
@@ -785,7 +799,8 @@
% do NOT include the delimit token.
\edef\pgfmanual@pretty@collectupto@loop@NEXT{%
\noexpand\endgroup
- \noexpand\pgfmanualprettyprinterhandlecollectedargs{\the\t@pgfmanual@currentarg}%
+ \noexpand\pgfmanualprettyprinterhandlecollectedargsVtwo{\the\t@pgfmanual@currentarg}{1}%
+ \noexpand\pgfmanualprettyprintercollectupto@restore@callback
\the\t@afterpgfmanualprettyprinterhandlecollected
}%
\else
@@ -854,13 +869,15 @@
}
\def\pgfmanual@pretty@pgfkeys{%
- \let\pgfmanualprettyprinterhandlecollectedargs=\pgfmanual@pretty@pgfkeys@start
+ \let\pgfmanualprettyprinterhandlecollectedargsVtwo=\pgfmanual@pretty@pgfkeys@start
\pgfmanualprettyprintercollectupto]{\pgfmanual@pretty@mainloop}%%
}%
-\long\def\pgfmanual@pretty@pgfkeys@start#1{%
+\long\def\pgfmanual@pretty@pgfkeys@start#1#2{%
[%
\pgfmanual@pretty@pgfkeys@loop#1\pgfmanual@EOI
- ]%
+ \if1#2%
+ ]%
+ \fi
}%
% iterates through single tokens, detecting key names and values while
% it goes.
@@ -1034,7 +1051,7 @@
\fi
\fi
\if\pgfmanual@pretty@isconsumed0%
- \def\pgfmanualprettyprinterhandlecollectedargs##1{\pgfmanual@pretty@pgfkeys@processvalue{##1}}% the braces will be handled separately.
+ \def\pgfmanualprettyprinterhandlecollectedargsVtwo##1##2{\pgfmanual@pretty@pgfkeys@processvalue{##1}}% the braces will be handled separately.
\def\pgfmanual@pretty@pgfkeys@collectvalue@next{%
\pgfmanualprettyprintercollectupto,{\afterpgfmanual@pretty@collectargs@finish@value}#1%
}%
diff --git a/Master/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex b/Master/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex
index 2488dfa4e79..67d199476ea 100644
--- a/Master/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex
+++ b/Master/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex
@@ -29,6 +29,11 @@
%
% ... also used for \pdf@shellescape.
\usepackage{pdftexcmds}
+\pgfutil@IfFileExists{atveryend.sty}{%
+ \usepackage{atveryend}%
+}{%
+ \message{! Package tikz Warning: \string\usepackage{atveryend} impossible. Automatic resolving of references within external files impossible.}%
+}%
% source generic implementation:
\input tikzexternalshared.code.tex
diff --git a/Master/texmf-dist/tex/latex/pgf/utilities/pgfpages.sty b/Master/texmf-dist/tex/latex/pgf/utilities/pgfpages.sty
index 2144e9c7005..c652a2621b9 100644
--- a/Master/texmf-dist/tex/latex/pgf/utilities/pgfpages.sty
+++ b/Master/texmf-dist/tex/latex/pgf/utilities/pgfpages.sty
@@ -338,6 +338,111 @@
}
+\pgfpagesdeclarelayout{6 on 1}
+{
+ \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
+ \edef\pgfpageoptionwidth{\the\paperheight}
+ \def\pgfpageoptionborder{0pt}
+}
+{
+ \pgfpagesphysicalpageoptions
+ {%
+ logical pages=6,%
+ physical height=\pgfpageoptionheight,%
+ physical width=\pgfpageoptionwidth%
+ }
+ \ifdim\paperheight>\paperwidth\relax
+ % put side-by-side
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpoint{.167\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{2}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{3}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpoint{.833\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{4}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpoint{.167\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{5}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpoint{.5\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{6}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpoint{.833\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \else
+ % stack on top of one another
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpoint{.25\pgfphysicalwidth}{.833\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{2}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpoint{.75\pgfphysicalwidth}{.833\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{3}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{4}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{5}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpoint{.25\pgfphysicalwidth}{.167\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{6}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpoint{.75\pgfphysicalwidth}{.167\pgfphysicalheight}%
+ }%
+ \fi
+}
+
+
\pgfpagesdeclarelayout{8 on 1}
{
\edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
diff --git a/Master/texmf-dist/tex/latex/pgf/utilities/xxcolor.sty b/Master/texmf-dist/tex/latex/pgf/utilities/xxcolor.sty
index 7c2d666b8fc..d085debebdf 100644
--- a/Master/texmf-dist/tex/latex/pgf/utilities/xxcolor.sty
+++ b/Master/texmf-dist/tex/latex/pgf/utilities/xxcolor.sty
@@ -69,7 +69,7 @@
\g@addto@macro\XC@mcolor{%
\ifnum\XC@nummixins>0%
- \pgfutil@namelet{\string\color@XC@mixtmp}{\string\color@.}%
+ \colorlet{XC@mixtmp}{.}%
\applycolormixins{XC@mixtmp}%
\pgfutil@namelet{current@color}{\string\color@XC@mixtmp}%
\fi%
diff --git a/Master/texmf-dist/tex/plain/pgf/basiclayer/pgf.tex b/Master/texmf-dist/tex/plain/pgf/basiclayer/pgf.tex
index 4c4e4c60de6..777bafc505c 100644
--- a/Master/texmf-dist/tex/plain/pgf/basiclayer/pgf.tex
+++ b/Master/texmf-dist/tex/plain/pgf/basiclayer/pgf.tex
@@ -13,7 +13,7 @@
\input pgfrcs.tex
-\ProvidesPackageRCS $Header: /cvsroot/pgf/pgf/plain/pgf/basiclayer/pgf.tex,v 1.10 2008/01/15 17:17:22 tantau Exp $
+\ProvidesPackageRCS{pgf.tex}
\input pgfcore.tex