summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex65
1 files changed, 60 insertions, 5 deletions
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 3440477499e..f9795dc4a99 100644
--- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex
@@ -1,9 +1,13 @@
-\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarysnakes.code.tex,v 1.9 2005/10/13 10:12:31 tantau Exp $
-
-% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+% Copyright 2006 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.
%
-% This program can be redistributed and/or modified under the terms
-% of the GNU Public License, version 2.
+% 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.14 2006/10/11 15:22:26 tantau Exp $
\newdimen\pgfsnakesegmentamplitude
@@ -280,6 +284,35 @@
+% crosses snakes
+%
+% Parameters: \pgfsnakesegmentlength, \pgfsnakeobjectsize, \pgfsnakesegmentamplitude
+
+\pgfdeclaresnake{crosses}{crosses}
+{
+ \state{crosses}[switch if less than=\pgfsnakesegmentlength to last,
+ width=\pgfsnakesegmentlength]
+ {
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgfsnakesegmentamplitude}}
+ \pgfpathlineto{\pgfpoint{\pgfsnakesegmentobjectlength}{-\pgfsnakesegmentamplitude}}
+ \pgfpathmoveto{\pgfpoint{0pt}{-\pgfsnakesegmentamplitude}}
+ \pgfpathlineto{\pgfpoint{\pgfsnakesegmentobjectlength}{\pgfsnakesegmentamplitude}}
+ }
+ \state{last}[width=\pgfsnakesegmentobjectlength,next state=final]
+ {
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgfsnakesegmentamplitude}}
+ \pgfpathlineto{\pgfpoint{\pgfsnakesegmentobjectlength}{-\pgfsnakesegmentamplitude}}
+ \pgfpathmoveto{\pgfpoint{0pt}{-\pgfsnakesegmentamplitude}}
+ \pgfpathlineto{\pgfpoint{\pgfsnakesegmentobjectlength}{\pgfsnakesegmentamplitude}}
+ }
+ \state{final}
+ {
+ \pgfpathmoveto{\pgfpoint{\pgfsnakeremainingdistance}{0pt}}
+ }
+}
+
+
+
% ticks snakes
%
% Parameters: \pgfsnakesegmentlength, \pgfsnakesegmentamplitude
@@ -366,4 +399,26 @@
+% bent snake
+%
+% A snake that looks like someone bent the line a bit.
+%
+% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentaspect
+
+\pgfdeclaresnake{bent}{bent}
+{
+ \state{bent}[width=\pgfsnakeremainingdistance,next state=final]
+ {
+ \pgfpathcurveto
+ {\pgfpoint{\pgfsnakesegmentaspect\pgfsnakeremainingdistance}{\pgfsnakesegmentamplitude}}
+ {\pgfpointadd{\pgfpoint{\pgfsnakeremainingdistance}{0pt}}
+ {\pgfpoint{-\pgfsnakesegmentaspect\pgfsnakeremainingdistance}{\pgfsnakesegmentamplitude}}}
+ {\pgfpoint{\pgfsnakeremainingdistance}{0pt}}
+ }
+ \state{final}
+ {}
+}
+
+
+
\endinput