summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.pathreplacing.code.tex163
1 files changed, 88 insertions, 75 deletions
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