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