diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex | 75 |
1 files changed, 38 insertions, 37 deletions
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 cc9ed651c71..888db712043 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmodulebending.code.tex @@ -14,8 +14,8 @@ % This file defines commands for drawing bending arrows and lines. % -\usepgfmodule{nonlineartransformations} -\usepgflibrary{curvilinear} +\usepgfmodule{nonlineartransformations}% +\usepgflibrary{curvilinear}% % Configuration options for arrow tips: @@ -25,13 +25,14 @@ /pgf/arrow keys/flex/.default=1, /pgf/arrow keys/flex'/.code=\pgfarrowsaddtooptions{\pgf@arrows@the@rigidity#1pt\let\pgf@arrow@flex@mode\pgf@arrow@mode@is@flex@prime}, /pgf/arrow keys/flex'/.default=1, - /pgf/arrow keys/bend/.code=\pgfarrowsaddtooptions{\let\pgf@arrow@flex@mode\pgf@arrow@mode@is@bend} -} + /pgf/arrow + keys/bend/.code=\pgfarrowsaddtooptions{\let\pgf@arrow@flex@mode\pgf@arrow@mode@is@bend}, +}% -\def\pgf@arrow@mode@is@flex{1} -\def\pgf@arrow@mode@is@flex@prime{2} -\def\pgf@arrow@mode@is@bend{3} +\def\pgf@arrow@mode@is@flex{1}% +\def\pgf@arrow@mode@is@flex@prime{2}% +\def\pgf@arrow@mode@is@bend{3}% \newdimen\pgf@arrows@the@rigidity @@ -39,21 +40,21 @@ % % Handle the end of a curve % -% +% -% First, the preparation. This is, essenatially, setting up the +% First, the preparation. This is, essentially, setting up the % nonlinear transformation \def\pgf@prep@curveend{ \pgftransformreset% \pgfsetcurvilinearbeziercurve{\pgfpointlastonpath}{\pgfpointsecondlastonpath}{\pgfpointthirdlastonpath}{\pgfpointfourthlastonpath} -} +}% % Second, the shortening. \def\pgf@do@shorten@curvedend{% \expandafter\expandafter\expandafter\pgf@do@shorten@curvedend@unpack\expandafter\pgfpointfourthlastonpath\pgfpointthirdlastonpath% -} +}% \def\pgf@do@shorten@curvedend@unpack\pgfqpoint#1#2\pgfqpoint#3#4{% \pgf@process{\pgfcurvilineardistancetotime{\pgf@path@shortening@distance}}% % Compute new curve: @@ -73,13 +74,13 @@ \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\pgfprocessresultpathsuffix% \expandafter\expandafter\expandafter{\expandafter\pgfprocessresultsubpathprefix\pgfprocessresultsubpathsuffix}% -} +}% % Third, the drawing \def\pgf@do@draw@curvedend{% \pgf@do@draw@curved\pgf@end@tip@sequence% -} +}% \def\pgf@do@draw@curved#1{% {% @@ -89,7 +90,7 @@ \let\pgf@arrow@handle@dot\relax% #1% }% -} +}% \def\pgf@draw@curved#1#2{% % Prepare: @@ -105,9 +106,9 @@ \ifcase\pgf@arrow@flex@mode\relax% \expandafter\expandafter\expandafter\pgf@arrow@drawer@rigid\csname pgf@ar@visual@\pgf@arrow@id\endcsname% like flex \or% - \expandafter\expandafter\expandafter\pgf@arrow@drawer@rigid\csname pgf@ar@visual@\pgf@arrow@id\endcsname% + \expandafter\expandafter\expandafter\pgf@arrow@drawer@rigid\csname pgf@ar@visual@\pgf@arrow@id\endcsname% \or% - \expandafter\expandafter\expandafter\pgf@arrow@drawer@rigid\csname pgf@ar@ends@\pgf@arrow@id\endcsname% + \expandafter\expandafter\expandafter\pgf@arrow@drawer@rigid\csname pgf@ar@ends@\pgf@arrow@id\endcsname% \or% \pgf@arrow@drawer@bend% \fi% @@ -116,8 +117,8 @@ \expandafter}% % Transform to next tip: \expandafter\pgf@xb\the\pgf@xb% -} -\def\pgf@falsetext{false} +}% +\def\pgf@falsetext{false}% \def\pgf@arrow@drawer@rigid@shift#1#2#3{% tip end, back end, line end, sep % Let xa be the actual back end of the current arrow plus the back end: @@ -127,14 +128,14 @@ \pgf@x#1% \advance\pgf@x by\pgfarrowsep% \advance\pgf@xb by-\pgf@x% -} +}% \def\pgf@arrow@drawer@bend{% \pgftransformnonlinear{\pgf@arrow@bending@mode{\pgf@x}{\pgf@y}} \pgftransformscale{-1}% \pgftransformxshift{-\pgf@xa}% - % Do slant: + % Do slant: \ifdim\pgfarrows@slant pt=0pt% \else% \pgftransformxslant{\pgfarrows@slant}% @@ -150,7 +151,7 @@ \endpgfscope% }% \pgf@arrows@bending@hull% -} +}% \def\pgf@arrow@drawer@rigid#1#2#3{% (rigid) start, (rigid) end, dummy % Compute the rigid positions: @@ -169,7 +170,7 @@ \pgf@xc#1% \pgf@xc-\pgf@xc% \pgftransformxshift{+\pgf@xc}% - % Do slant: + % Do slant: \ifdim\pgfarrows@slant pt=0pt% \else% \pgftransformxslant{\pgfarrows@slant}% @@ -183,7 +184,7 @@ \pgflowlevelsynccm\csname pgf@ar@cache@\pgf@arrow@id\endcsname% \endpgfscope% \pgf@arrows@rigid@hull% -} +}% \def\pgf@bending@do@tangent{% \pgf@xb\pgf@xa% @@ -210,7 +211,7 @@ \advance\pgf@xb by-\pgf@xa% \advance\pgf@yb by-\pgf@ya% \pgf@process{\pgfpointnormalised{\pgf@x=\pgf@xb\pgf@y=\pgf@yb}} -} +}% \def\pgf@bending@possible@degenerate{% \ifx\pgf@curvilinear@line@a\pgf@curvilinear@line@b% degenerate! @@ -231,7 +232,7 @@ \else% \pgf@bending@do@tangent@normal% \fi% -} +}% \def\pgf@bending@do@flex{ \pgf@xb\pgf@xa% @@ -248,7 +249,7 @@ \pgf@process{\pgfpointcurveattime{\pgf@xb}{\pgf@curvilinear@line@a}{\pgf@curvilinear@line@b}{\pgf@curvilinear@line@c}{\pgf@curvilinear@line@d}}% \pgf@xb\pgf@x\pgf@yb\pgf@y% \pgftransformarrow{\pgfqpoint{\pgf@xb}{\pgf@yb}}{\pgfqpoint{\pgf@xc}{\pgf@yc}}% -} +}% @@ -266,20 +267,20 @@ \pgf@temp% \pgf@arrow@bending@update@bb% \fi% - \fi% -} + \fi% +}% \def\pgf@arrow@bending@hull@point@first#1#2{% \pgfpointtransformednonlinear{\pgfqpoint{#1}{#2}}% \pgf@xa\pgf@x\pgf@xb\pgf@x% \pgf@ya\pgf@y\pgf@yb\pgf@y% \let\pgf@arrow@hull@point\pgf@arrow@bending@hull@point@other% -} +}% \def\pgf@arrow@bending@hull@point@other#1#2{% \pgfpointtransformednonlinear{\pgfqpoint{#1}{#2}}% \ifdim\pgf@x<\pgf@xa\pgf@xa\pgf@x\else\ifdim\pgf@x>\pgf@xb\pgf@xb\pgf@x\fi\fi% \ifdim\pgf@y<\pgf@ya\pgf@ya\pgf@y\else\ifdim\pgf@y>\pgf@yb\pgf@yb\pgf@y\fi\fi% -} +}% \def\pgf@arrow@bending@update@bb{% \ifdim\pgf@picmaxx=-16000pt\relax% @@ -293,7 +294,7 @@ \ifdim\pgf@xb>\pgf@picmaxx\global\pgf@picmaxx\pgf@xb\fi% \ifdim\pgf@yb>\pgf@picmaxy\global\pgf@picmaxy\pgf@yb\fi% \fi% -} +}% @@ -302,21 +303,21 @@ % % Handle the start of a curve % -% +% -% First, the preparation. +% First, the preparation. \def\pgf@prep@curvedstart{ \pgftransformreset% \pgfsetcurvilinearbeziercurve{\pgfpointfirstonpath}{\pgfpointsecondonpath}{\pgfpointthirdonpath}{\pgfpointfourthonpath}% -} +}% % Second, the shortening. \def\pgf@do@shorten@curvedstart{% \expandafter\expandafter\expandafter\pgf@do@shorten@curvedstart@unpack\expandafter\pgfpointthirdonpath\pgfpointfourthonpath% -} +}% \def\pgf@do@shorten@curvedstart@unpack\pgfqpoint#1#2\pgfqpoint#3#4{% \pgf@process{\pgfcurvilineardistancetotime{\pgf@path@shortening@distance}}% % Compute new curve: @@ -339,14 +340,14 @@ \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\pgfprocessresultpathsuffix% \expandafter\expandafter\expandafter{\expandafter\pgfprocessresultpathsuffix\pgfsubpathend}% -} +}% % Third, the drawing \def\pgf@do@draw@curvedstart{% \pgf@do@draw@curved\pgf@start@tip@sequence% -} +}% |