diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/libraries')
45 files changed, 5995 insertions, 5977 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex deleted file mode 100644 index 9de07884dd5..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex +++ /dev/null @@ -1,842 +0,0 @@ -% 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. -% -% 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.7 2007/06/07 07:41:11 tantau Exp $ - - -% A square bracket shaped arrow - -\pgfarrowsdeclare{[}{]} -{ - \pgfutil@tempdima=1pt% - \advance\pgfutil@tempdima by1.25\pgflinewidth% - \pgfarrowsleftextend{+-\pgfutil@tempdima} - \pgfarrowsrightextend{+.5\pgflinewidth} -} -{ - \pgfutil@tempdima=2pt% - \advance\pgfutil@tempdima by1.5\pgflinewidth% - \pgfutil@tempdimb=\pgfutil@tempdima% - \advance\pgfutil@tempdimb by\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetmiterjoin - \pgfsetbuttcap - \pgfpathmoveto{\pgfqpoint{-.5\pgfutil@tempdimb}{-1\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{0pt}{-1\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{0pt}{\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{-.5\pgfutil@tempdimb}{\pgfutil@tempdima}} - \pgfusepathqstroke -} - -\pgfarrowsdeclarereversed{]}{[}{[}{]} - - -% A round bracket shaped arrow - -\pgfarrowsdeclare{(}{)} -{ - \pgfutil@tempdima=2pt% - \advance\pgfutil@tempdima by1.5\pgflinewidth% - \pgfutil@tempdimb=0.0625\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} - \pgfutil@tempdimb=0.5\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth% - \pgfarrowsleftextend{+-\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=2pt% - \advance\pgfutil@tempdima by1.5\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundcap - \pgfpathmoveto{\pgfqpoint{-.5\pgfutil@tempdima}{-1\pgfutil@tempdima}} - \pgfpathcurveto - {\pgfqpoint{.25\pgfutil@tempdima}{-.5\pgfutil@tempdima}} - {\pgfqpoint{.25\pgfutil@tempdima}{.5\pgfutil@tempdima}} - {\pgfqpoint{-.5\pgfutil@tempdima}{\pgfutil@tempdima}} - \pgfusepathqstroke -} - -\pgfarrowsdeclarereversed{)}{(}{(}{)} - - - - -% A pointed bracket shaped arrow - -\pgfarrowsdeclare{angle 90}{angle 90} -{ - \pgfutil@tempdima=0.3pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfutil@tempdimb=5.5\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth% - \pgfarrowsleftextend{+-\pgfutil@tempdimb} - \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by0.707\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.3pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundcap - \pgfsetmiterjoin - \pgfpathmoveto{\pgfqpoint{-5.5\pgfutil@tempdima}{-6\pgfutil@tempdima}} - \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} - - -\pgfarrowsdeclare{angle 60}{angle 60} -{ - \pgfutil@tempdima=0.3pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfutil@tempdimb=7.29\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth% - \pgfarrowsleftextend{+-\pgfutil@tempdimb} - \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.3pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundcap - \pgfsetmiterjoin - \pgfpathmoveto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{150}{9\pgfutil@tempdima}}} - \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} - - - -\pgfarrowsdeclare{angle 45}{angle 45} -{ - \pgfutil@tempdima=0.3pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfutil@tempdimb=8.705\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth% - \pgfarrowsleftextend{+-\pgfutil@tempdimb} - \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by1.28\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.3pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundcap - \pgfsetmiterjoin - \pgfpathmoveto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{157}{10\pgfutil@tempdima}}} - \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} - - - -% A dot shaped arrow - -\pgfarrowsdeclare{*}{*} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.2\pgflinewidth% - \pgfutil@tempdimb=5.5\pgfutil@tempdima\advance\pgfutil@tempdimb by\pgflinewidth - \pgfarrowsleftextend{+-\pgfutil@tempdimb} - \pgfutil@tempdimb=1.5\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.2\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfpathcircle{\pgfqpoint{-3\pgfutil@tempdima}{0pt}}{+4.5\pgfutil@tempdima} - \pgfusepathqfillstroke -} - - -% An open dot shaped arrow - -\pgfarrowsdeclare{o}{o} -{ - \pgfarrowsleftextend{+-.5\pgflinewidth} - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.2\pgflinewidth% - \pgfutil@tempdimb=9\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.2\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfpathcircle{\pgfqpoint{4.5\pgfutil@tempdima}{0bp}}{4.5\pgfutil@tempdima} - \pgfusepathqstroke -} - - - -% A diamond shaped arrow - -\pgfarrowsdeclare{diamond}{diamond} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.275\pgflinewidth% - \pgfutil@tempdimb=13\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth - \pgfarrowsleftextend{+-\pgfutil@tempdimb} - \pgfutil@tempdimb=1\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.275\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundjoin - \pgfpathmoveto{\pgfqpoint{1\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{-6\pgfutil@tempdima}{4\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{-13\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{-6\pgfutil@tempdima}{-4\pgfutil@tempdima}} - \pgfpathclose - \pgfusepathqfillstroke -} - -\pgfarrowsdeclare{open diamond}{open diamond}%{{-.5bp}{14.5bp}} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.275\pgflinewidth% - \pgfarrowsleftextend{+-.5\pgflinewidth} - \pgfutil@tempdimb=14\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.275\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundjoin - \pgfpathmoveto{\pgfqpoint{14\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{7\pgfutil@tempdima}{4\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{7\pgfutil@tempdima}{-4\pgfutil@tempdima}} - \pgfpathclose - \pgfusepathqstroke -} - - - -% A triangle shaped arrow - -\pgfarrowsdeclare{triangle 90}{triangle 90} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfutil@tempdimb=5.5\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth% - \pgfarrowsleftextend{+-\pgfutil@tempdimb} - \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by0.707\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetmiterjoin - \pgfpathmoveto{\pgfqpoint{-5.5\pgfutil@tempdima}{-6\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{-5.5\pgfutil@tempdima}{6\pgfutil@tempdima}} - \pgfpathclose - \pgfusepathqfillstroke -} - -\pgfarrowsdeclarereversed{triangle 90 reversed}{triangle 90 reversed}{triangle 90}{triangle 90} - - -\pgfarrowsdeclare{triangle 60}{triangle 60} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfutil@tempdimb=7.29\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth% - \pgfarrowsleftextend{+-\pgfutil@tempdimb} - \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetmiterjoin - \pgfpathmoveto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{150}{9\pgfutil@tempdima}}} - \pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0\pgfutil@tempdima}} - \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} - - - - -\pgfarrowsdeclare{triangle 45}{triangle 45} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfutil@tempdimb=8.705\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth% - \pgfarrowsleftextend{+-\pgfutil@tempdimb} - \pgfutil@tempdimb=.5\pgfutil@tempdima\advance\pgfutil@tempdimb by1.28\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetmiterjoin - \pgfpathmoveto{\pgfpointadd{\pgfqpoint{0.5\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{157}{10\pgfutil@tempdima}}} - \pgfpathlineto{\pgfqpoint{0.5\pgfutil@tempdima}{0\pgfutil@tempdima}} - \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} - - - - -\pgfarrowsdeclare{open triangle 90}{open triangle 90} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfarrowsleftextend{+-.5\pgflinewidth} - \pgfutil@tempdimb=6\pgfutil@tempdima\advance\pgfutil@tempdimb by0.707\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetmiterjoin - \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{-6\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{6\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{0\pgfutil@tempdima}{6\pgfutil@tempdima}} - \pgfpathclose - \pgfusepathqstroke -} - -\pgfarrowsdeclare{open triangle 90 reversed}{open triangle 90 reversed} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfarrowsleftextend{+-.707\pgflinewidth} - \pgfutil@tempdimb=6\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetmiterjoin - \pgfpathmoveto{\pgfqpoint{6\pgfutil@tempdima}{-6\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{6\pgfutil@tempdima}{6\pgfutil@tempdima}} - \pgfpathclose - \pgfusepathqstroke -} - - - -\pgfarrowsdeclare{open triangle 60}{open triangle 60} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfarrowsleftextend{+-.5\pgflinewidth} - \pgfutil@tempdimb=7.794\pgfutil@tempdima\advance\pgfutil@tempdimb by\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetmiterjoin - \pgfpathmoveto{\pgfpointadd{\pgfqpoint{7.794\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{150}{9\pgfutil@tempdima}}} - \pgfpathlineto{\pgfqpoint{7.794\pgfutil@tempdima}{0pt}} - \pgfpathlineto{\pgfpointadd{\pgfqpoint{7.794\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-150}{9\pgfutil@tempdima}}} - \pgfpathclose - \pgfusepathqstroke -} - - - -\pgfarrowsdeclare{open triangle 60 reversed}{open triangle 60 reversed} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfarrowsleftextend{+-\pgflinewidth} - \pgfutil@tempdimb=7.794\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetmiterjoin - \pgfpathmoveto{\pgfqpointpolar{30}{9\pgfutil@tempdima}} - \pgfpathlineto{\pgfpointorigin} - \pgfpathlineto{\pgfqpointpolar{-30}{9\pgfutil@tempdima}} - \pgfpathclose - \pgfusepathqstroke -} - - - -\pgfarrowsdeclare{open triangle 45}{open triangle 45} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfarrowsleftextend{+-.5\pgflinewidth} - \pgfutil@tempdimb=9.205\pgfutil@tempdima\advance\pgfutil@tempdimb by1.28\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetmiterjoin - \pgfpathmoveto{\pgfpointadd{\pgfqpoint{9.205\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{157}{10\pgfutil@tempdima}}} - \pgfpathlineto{\pgfqpoint{9.205\pgfutil@tempdima}{0pt}} - \pgfpathlineto{\pgfpointadd{\pgfqpoint{9.205\pgfutil@tempdima}{0pt}}{\pgfqpointpolar{-157}{10\pgfutil@tempdima}}} - \pgfpathclose - \pgfusepathqstroke -} - - - -\pgfarrowsdeclare{open triangle 45 reversed}{open triangle 45 reversed} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfarrowsleftextend{+-1.28\pgflinewidth} - \pgfutil@tempdimb=9.205\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.5pt% - \advance\pgfutil@tempdima by.25\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetmiterjoin - \pgfpathmoveto{\pgfqpointpolar{23}{10\pgfutil@tempdima}} - \pgfpathlineto{\pgfpointorigin} - \pgfpathlineto{\pgfqpointpolar{-23}{10\pgfutil@tempdima}} - \pgfpathclose - \pgfusepathqstroke -} - - - -% A less fleshy variant of LaTeX's orginal arrow type - -\pgfarrowsdeclare{latex'}{latex'} -{ - \pgfutil@tempdima=0.28pt% - \advance\pgfutil@tempdima by.3\pgflinewidth% - \pgfarrowsleftextend{+-4\pgfutil@tempdima} - \pgfarrowsrightextend{+6\pgfutil@tempdima} -} -{ - \pgfutil@tempdima=0.28pt% - \advance\pgfutil@tempdima by.3\pgflinewidth% - \pgfpathmoveto{\pgfqpoint{6\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathcurveto - {\pgfqpoint{3.5\pgfutil@tempdima}{.5\pgfutil@tempdima}} - {\pgfqpoint{-1\pgfutil@tempdima}{1.5\pgfutil@tempdima}} - {\pgfqpoint{-4\pgfutil@tempdima}{3.75\pgfutil@tempdima}} - \pgfpathcurveto - {\pgfqpoint{-1.5\pgfutil@tempdima}{1\pgfutil@tempdima}} - {\pgfqpoint{-1.5\pgfutil@tempdima}{-1\pgfutil@tempdima}} - {\pgfqpoint{-4\pgfutil@tempdima}{-3.75\pgfutil@tempdima}} - \pgfpathcurveto - {\pgfqpoint{-1\pgfutil@tempdima}{-1.5\pgfutil@tempdima}} - {\pgfqpoint{3.5\pgfutil@tempdima}{-.5\pgfutil@tempdima}} - {\pgfqpoint{6\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfusepathqfill -} - -\pgfarrowsdeclarereversed{latex' reversed}{latex' reversed}{latex'}{latex'} - - -% A rounded variant of the stealth arrow - -\pgfarrowsdeclare{stealth'}{stealth'} -{ - \pgfutil@tempdima=0.28pt% - \advance\pgfutil@tempdima by.3\pgflinewidth% - \pgfutil@tempdimb=6\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth% - \pgfarrowsleftextend{+-\pgfutil@tempdimb} - \pgfutil@tempdimb=2\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.28pt% - \advance\pgfutil@tempdima by.3\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundjoin - \pgfpathmoveto{\pgfqpoint{2\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathcurveto - {\pgfqpoint{-.5\pgfutil@tempdima}{.5\pgfutil@tempdima}} - {\pgfqpoint{-3\pgfutil@tempdima}{1.5\pgfutil@tempdima}} - {\pgfqpoint{-6\pgfutil@tempdima}{3.25\pgfutil@tempdima}} - \pgfpathcurveto - {\pgfqpoint{-3\pgfutil@tempdima}{1\pgfutil@tempdima}} - {\pgfqpoint{-3\pgfutil@tempdima}{-1\pgfutil@tempdima}} - {\pgfqpoint{-6\pgfutil@tempdima}{-3.25\pgfutil@tempdima}} - \pgfpathcurveto - {\pgfqpoint{-3\pgfutil@tempdima}{-1.5\pgfutil@tempdima}} - {\pgfqpoint{-.5\pgfutil@tempdima}{-.5\pgfutil@tempdima}} - {\pgfqpoint{2\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathclose - \pgfusepathqfillstroke -} - -\pgfarrowsdeclarereversed{stealth' reversed}{stealth' reversed}{stealth'}{stealth'} - - - -% The two half of the $\to$ arrow - -\pgfarrowsdeclare{left to}{left to} -{ - \pgfutil@tempdima=-0.84pt% - \advance\pgfutil@tempdima by-1.3\pgflinewidth% - \pgfutil@tempdimb=0.21pt% - \advance\pgfutil@tempdimb by.625\pgflinewidth% - \pgfarrowsleftextend{+\pgfutil@tempdima} - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.28pt% - \advance\pgfutil@tempdima by.3\pgflinewidth% - \pgfsetlinewidth{0.8\pgflinewidth} - \pgfsetdash{}{+0pt} - \pgfsetroundcap - \pgfsetroundjoin - \pgfpathmoveto{\pgfqpoint{-3\pgfutil@tempdima}{4\pgfutil@tempdima}} - \pgfpathcurveto - {\pgfqpoint{-2.75\pgfutil@tempdima}{2.5\pgfutil@tempdima}} - {\pgfqpoint{0pt}{0.25\pgfutil@tempdima}} - {\pgfqpoint{0.75\pgfutil@tempdima}{0pt}} - \pgfpathcurveto - {\pgfqpoint{0.55\pgfutil@tempdima}{-0.125\pgflinewidth}} - {\pgfqpoint{0.5\pgfutil@tempdima}{-0.125\pgflinewidth}} - {\pgfqpoint{0.5\pgfutil@tempdima}{-0.125\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{0pt}{-0.125\pgflinewidth}} - \pgfusepathqstroke -} - - -\pgfarrowsdeclare{right to}{right to} -{ - \pgfutil@tempdima=-0.84pt% - \advance\pgfutil@tempdima by-1.3\pgflinewidth% - \pgfutil@tempdimb=0.21pt% - \advance\pgfutil@tempdimb by.625\pgflinewidth% - \pgfarrowsleftextend{+\pgfutil@tempdima} - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.28pt% - \advance\pgfutil@tempdima by.3\pgflinewidth% - \pgfsetlinewidth{0.8\pgflinewidth} - \pgfsetdash{}{+0pt} - \pgfsetroundcap - \pgfsetroundjoin - \pgfpathmoveto{\pgfqpoint{-3\pgfutil@tempdima}{-4\pgfutil@tempdima}} - \pgfpathcurveto - {\pgfqpoint{-2.75\pgfutil@tempdima}{-2.5\pgfutil@tempdima}} - {\pgfqpoint{0pt}{-0.25\pgfutil@tempdima}} - {\pgfqpoint{0.75\pgfutil@tempdima}{0pt}} - \pgfpathcurveto - {\pgfqpoint{0.55\pgfutil@tempdima}{0.125\pgflinewidth}} - {\pgfqpoint{0.5\pgfutil@tempdima}{0.125\pgflinewidth}} - {\pgfqpoint{0.5\pgfutil@tempdima}{0.125\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{0pt}{0.125\pgflinewidth}} - \pgfusepathqstroke -} - - - -% The halfs of the $\to$ arrow reversed - -\pgfarrowsdeclare{left to reversed}{left to reversed} -{ - \pgfutil@tempdima=0.28pt% - \advance\pgfutil@tempdima by.3\pgflinewidth% - \pgfarrowsleftextend{+-.1\pgflinewidth} - \pgfutil@tempdimb=3.75\pgfutil@tempdima\advance\pgfutil@tempdimb by0.9\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.28pt% - \advance\pgfutil@tempdima by.3\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundjoin - \pgfsetbuttcap - \pgfpathmoveto{\pgfqpoint{0.5\pgflinewidth}{0pt}} - \pgfpathlineto{\pgfqpoint{-0.1\pgflinewidth}{0pt}} - \pgfusepathqstroke - \pgfsetroundcap - \pgfsetlinewidth{.8\pgflinewidth} - {\pgftransformxshift{0.625\pgflinewidth} - \pgfpathmoveto{\pgfqpoint{3.75\pgfutil@tempdima}{4\pgfutil@tempdima}} - \pgfpathcurveto{\pgfqpoint{3.5\pgfutil@tempdima}{2.5\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{0.25\pgfutil@tempdima}}{\pgfqpoint{0pt}{0.125\pgflinewidth}} - \pgfpathmoveto{\pgfqpoint{3.75\pgfutil@tempdima}{4\pgfutil@tempdima}} - \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} -{ - \pgfutil@tempdima=0.28pt% - \advance\pgfutil@tempdima by.3\pgflinewidth% - \pgfarrowsleftextend{+-.1\pgflinewidth} - \pgfutil@tempdimb=3.75\pgfutil@tempdima\advance\pgfutil@tempdimb by0.9\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.28pt% - \advance\pgfutil@tempdima by.3\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundjoin - \pgfsetbuttcap - \pgfpathmoveto{\pgfqpoint{0.5\pgflinewidth}{0pt}} - \pgfpathlineto{\pgfqpoint{-0.1\pgflinewidth}{0pt}} - \pgfusepathqstroke - \pgfsetroundcap - \pgfsetlinewidth{.8\pgflinewidth} - {\pgftransformxshift{0.625\pgflinewidth} - \pgfpathmoveto{\pgfqpoint{3.75\pgfutil@tempdima}{-4\pgfutil@tempdima}} - \pgfpathcurveto{\pgfqpoint{3.5\pgfutil@tempdima}{-2.5\pgfutil@tempdima}}{\pgfqpoint{0.75\pgfutil@tempdima}{-0.25\pgfutil@tempdima}}{\pgfqpoint{0pt}{-0.125\pgflinewidth}} - \pgfpathmoveto{\pgfqpoint{3.75\pgfutil@tempdima}{-4\pgfutil@tempdima}} - \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% -} - - - -% A left hook - -\pgfarrowsdeclare{left hook}{left hook} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.2\pgflinewidth% - \pgfarrowsleftextend{+-.5\pgflinewidth} - \pgfutil@tempdimb=3.75\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.2\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundcap - \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{0.75\pgfutil@tempdima}{0\pgfutil@tempdima}} - \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} - - - -% A right hook - -\pgfarrowsdeclare{right hook}{right hook} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.2\pgflinewidth% - \pgfarrowsleftextend{+-.5\pgflinewidth} - \pgfutil@tempdimb=3.75\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.2\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundcap - \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{0.75\pgfutil@tempdima}{0\pgfutil@tempdima}} - \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} - - -% Hooks in both directions - -\pgfarrowsdeclare{hooks}{hooks} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.2\pgflinewidth% - \pgfarrowsleftextend{+-.5\pgflinewidth} - \pgfutil@tempdimb=3.75\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth% - \pgfarrowsrightextend{+\pgfutil@tempdimb} -} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.2\pgflinewidth% - \pgfsetdash{}{+0pt} - \pgfsetroundcap - \pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{0.75\pgfutil@tempdima}{0\pgfutil@tempdima}} - \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}} - \pgfpathmoveto{\pgfqpoint{0.75\pgfutil@tempdima}{0\pgfutil@tempdima}} - \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} - - -% An arrow that looks like a serif of the computer modern font - -\pgfarrowsdeclare{serif cm}{serif cm} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.45\pgflinewidth% - \pgfarrowsleftextend{+-.75\pgfutil@tempdima} - \pgfarrowsrightextend{+.04\pgflinewidth} -} -{ - \pgfutil@tempdima=0.4pt% - \advance\pgfutil@tempdima by.45\pgflinewidth% - \pgftransformxshift{.04\pgflinewidth} - \pgfpathmoveto{\pgfqpoint{-.75\pgfutil@tempdima}{.5\pgflinewidth}} - \pgfpathcurveto - {\pgfqpoint{-.375\pgfutil@tempdima}{.5\pgflinewidth}} - {\pgfqpoint{-.375\pgfutil@tempdima}{.7\pgflinewidth}} - {\pgfqpoint{-.375\pgfutil@tempdima}{1.95\pgfutil@tempdima}} - \pgfpathlineto{\pgfqpoint{0pt}{1.95\pgfutil@tempdima}} - \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}} - \pgfpathcurveto - {\pgfqpoint{-.375\pgfutil@tempdima}{-.7\pgflinewidth}} - {\pgfqpoint{-.375\pgfutil@tempdima}{-.5\pgflinewidth}} - {\pgfqpoint{-.75\pgfutil@tempdima}{-.5\pgflinewidth}} - \pgfpathclose - \pgfusepathqfill -} - - - -% Round cap - -\pgfarrowsdeclare{round cap}{round cap} -{\pgfarrowsleftextend{+0pt}\pgfarrowsrightextend{+\pgflinewidth}} -{ - \pgfsetdash{}{+0pt} - \pgfsetroundcap - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfqpoint{0.5\pgflinewidth}{0pt}} - \pgfusepathqstroke -} - - -% Butt cap - -\pgfarrowsdeclare{butt cap}{butt cap} -{\pgfarrowsleftextend{+-.1\pgflinewidth}\pgfarrowsrightextend{+.5\pgflinewidth}} -{ - \pgfsetdash{}{+0pt} - \pgfsetbuttcap - \pgfpathmoveto{\pgfqpoint{-.1\pgflinewidth}{0pt}} - \pgfpathlineto{\pgfqpoint{0.5\pgflinewidth}{0pt}} - \pgfusepathqstroke -} - - - -% 90 degrees cap - -\pgfarrowsdeclare{triangle 90 cap}{triangle 90 cap} -{\pgfarrowsleftextend{+-.1\pgflinewidth}\pgfarrowsrightextend{+\pgflinewidth}} -{ - \pgfpathmoveto{\pgfqpoint{-.1\pgflinewidth}{0.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{.5\pgflinewidth}{.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{\pgflinewidth}{0pt}} - \pgfpathlineto{\pgfqpoint{.5\pgflinewidth}{-.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{-.1\pgflinewidth}{-0.5\pgflinewidth}} - \pgfusepathqfill -} - - -% reversed 90 degrees cap - -\pgfarrowsdeclare{triangle 90 cap reversed}{triangle 90 cap reversed} -{\pgfarrowsleftextend{+-.1\pgflinewidth}\pgfarrowsrightextend{+\pgflinewidth}} -{ - \pgfpathmoveto{\pgfqpoint{1\pgflinewidth}{0.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{-.1\pgflinewidth}{.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{-.1\pgflinewidth}{-.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{-.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{0.5\pgflinewidth}{0\pgflinewidth}} - \pgfusepathqfill -} - - - -% fast - -\pgfarrowsdeclare{fast cap}{fast cap} -{\pgfarrowsleftextend{+-.1\pgflinewidth}\pgfarrowsrightextend{+2\pgflinewidth}} -{ - \pgfpathmoveto{\pgfqpoint{-.1\pgflinewidth}{0.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{.5\pgflinewidth}{.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{0\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{.5\pgflinewidth}{-.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{-.1\pgflinewidth}{-0.5\pgflinewidth}} - \pgfpathclose - \pgfpathmoveto{\pgfqpoint{1\pgflinewidth}{0.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{1.5\pgflinewidth}{0.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{2\pgflinewidth}{0\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{1.5\pgflinewidth}{-.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{-0.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{1.5\pgflinewidth}{0\pgflinewidth}} - \pgfpathclose - \pgfusepathqfill -} - - -\pgfarrowsdeclare{fast cap reversed}{fast cap reversed} -{\pgfarrowsleftextend{+-.1\pgflinewidth}\pgfarrowsrightextend{+2\pgflinewidth}} -{ - \pgfpathmoveto{\pgfqpoint{-.1\pgflinewidth}{0.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{.5\pgflinewidth}{0\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{-.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{-.1\pgflinewidth}{-0.5\pgflinewidth}} - \pgfpathclose - \pgfpathmoveto{\pgfqpoint{1.5\pgflinewidth}{0.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{2\pgflinewidth}{0.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{1.5\pgflinewidth}{0\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{2\pgflinewidth}{-.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{1.5\pgflinewidth}{-0.5\pgflinewidth}} - \pgfpathlineto{\pgfqpoint{1\pgflinewidth}{0\pgflinewidth}} - \pgfpathclose - \pgfusepathqfill -} - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.footprints.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.footprints.code.tex new file mode 100644 index 00000000000..5cf633d0c59 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.footprints.code.tex @@ -0,0 +1,230 @@ +% Copyright 2008 by Mark Wibrow +% +% 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. + +\usepgfmodule{decorations} + + +% Parameters +\pgfset{ + % Length of a footprint: + /pgf/decoration/foot length/.initial=10pt, + % Distance between two footprints on the same side of the path + /pgf/decoration/stride length/.initial=30pt, + % Double distance between footprint and input path + /pgf/decoration/foot sep/.initial=4pt, + % Rotate feet by this much + /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} + \pgfmathparse{\pgfkeysvalueof{/pgf/decoration/foot length}} + \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} + \pgftransformyshift{\pgfkeysvalueof{/pgf/decoration/foot sep}/2} + \pgfmathparse{\pgfkeysvalueof{/pgf/decoration/foot length}} + \pgftransformscale{\pgfmathresult} + \pgftransformrotate{\pgfkeysvalueof{/pgf/decoration/foot angle}} + \csname pgf@lib@foot@of@\pgfkeysvalueof{/pgf/decoration/foot of}\endcsname + } +} + + + +% 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. +% + + +\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} + \pgfpathmoveto{\pgfqpoint{.86068pt}{0pt}} + \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}} + \pgfpathcurveto{\pgfqpoint{.7586pt}{.31712pt}}{\pgfqpoint{.15495pt}{.37769pt}}{\pgfqpoint{.08621pt}{.68553pt}} + \pgfpathcurveto{\pgfqpoint{.03968pt}{.89374pt}}{\pgfqpoint{.27774pt}{1.1826pt}}{\pgfqpoint{.52614pt}{1.1826pt}} + \pgfpathcurveto{\pgfqpoint{.64834pt}{1.1826pt}}{\pgfqpoint{.78929pt}{1.07226pt}}{\pgfqpoint{.81566pt}{.93248pt}} + \pgfpathcurveto{\pgfqpoint{.8358pt}{.82589pt}}{\pgfqpoint{.57867pt}{.8686pt}}{\pgfqpoint{.58791pt}{.93913pt}} + \pgfpathlineto{\pgfqpoint{.58791pt}{.93913pt}} + \pgfpathclose +} + + + +\def\pgf@lib@foot@of@bird{ + % Coordinates derived from vector image created by Mark Wibrow. + % + \pgftransformcm{0}{.11}{.11}{0}{\pgfqpoint{.37pt}{.52pt}} + \pgfpathmoveto{\pgfqpoint{-.886pt}{1.652pt}} + \pgfpathcurveto{\pgfqpoint{-.4632pt}{2.669pt}}{\pgfqpoint{-.5092pt}{4.3712pt}}{\pgfqpoint{-.4512pt}{5.6734pt}} + \pgfpathcurveto{\pgfqpoint{-.4374pt}{5.9842pt}}{\pgfqpoint{-.3182pt}{6.0686pt}}{\pgfqpoint{-.2484pt}{5.644pt}} + \pgfpathcurveto{\pgfqpoint{-.0534pt}{4.459pt}}{\pgfqpoint{.087pt}{3.0132pt}}{\pgfqpoint{.5206pt}{1.8464pt}} + \pgfpathcurveto{\pgfqpoint{.714pt}{1.326pt}}{\pgfqpoint{.692pt}{1.416pt}}{\pgfqpoint{1.0864pt}{1.759pt}} + \pgfpathcurveto{\pgfqpoint{1.7662pt}{2.3504pt}}{\pgfqpoint{2.665pt}{3.1756pt}}{\pgfqpoint{3.2028pt}{4.02pt}} + \pgfpathcurveto{\pgfqpoint{3.4708pt}{4.4408pt}}{\pgfqpoint{3.4258pt}{4.0814pt}}{\pgfqpoint{3.3366pt}{3.8708pt}} + \pgfpathcurveto{\pgfqpoint{2.9068pt}{2.8562pt}}{\pgfqpoint{.8502pt}{.645pt}}{\pgfqpoint{.4808pt}{-.0864pt}} + \pgfpathcurveto{\pgfqpoint{.0808pt}{-.8788pt}}{\pgfqpoint{.1664pt}{-2.1246pt}}{\pgfqpoint{.0024pt}{-2.7868pt}} + \pgfpathcurveto{\pgfqpoint{-.172pt}{-3.4908pt}}{\pgfqpoint{-.2726pt}{-3.704pt}}{\pgfqpoint{-.3812pt}{-2.9558pt}} + \pgfpathcurveto{\pgfqpoint{-.5316pt}{-1.9202pt}}{\pgfqpoint{-.88pt}{-.256pt}}{\pgfqpoint{-1.332pt}{.128pt}} + \pgfpathcurveto{\pgfqpoint{-1.716pt}{.4542pt}}{\pgfqpoint{-3.7928pt}{2.3136pt}}{\pgfqpoint{-4.5044pt}{3.3524pt}} + \pgfpathcurveto{\pgfqpoint{-4.7618pt}{3.728pt}}{\pgfqpoint{-4.709pt}{3.7864pt}}{\pgfqpoint{-4.4212pt}{3.5818pt}} + \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}} + \pgfpathcurveto{\pgfqpoint{-.1146pt}{.0436pt}}{\pgfqpoint{-.7386pt}{.0178pt}}{\pgfqpoint{-1.319pt}{-1.0288pt}} + \pgfpathcurveto{\pgfqpoint{-1.7922pt}{-1.8822pt}}{\pgfqpoint{-2.072pt}{-1.5488pt}}{\pgfqpoint{-2.9638pt}{-1.968pt}} + \pgfpathcurveto{\pgfqpoint{-3.9244pt}{-2.4198pt}}{\pgfqpoint{-4.4394pt}{-3.348pt}}{\pgfqpoint{-4.1136pt}{-4.041pt}} + \pgfpathcurveto{\pgfqpoint{-3.3862pt}{-5.5882pt}}{\pgfqpoint{-1.6156pt}{-3.83pt}}{\pgfqpoint{-1.1684pt}{-4.312pt}} + \pgfpathcurveto{\pgfqpoint{-.5806pt}{-4.9454pt}}{\pgfqpoint{.5032pt}{-4.8822pt}}{\pgfqpoint{1.1748pt}{-4.2878pt}} + \pgfpathcurveto{\pgfqpoint{1.5822pt}{-3.9272pt}}{\pgfqpoint{2.6524pt}{-5.0652pt}}{\pgfqpoint{3.3506pt}{-4.1066pt}} + \pgfpathcurveto{\pgfqpoint{3.839pt}{-3.4356pt}}{\pgfqpoint{3.1192pt}{-2.249pt}}{\pgfqpoint{2.7312pt}{-1.992pt}} + \pgfpathclose + % + \pgfpathmoveto{\pgfqpoint{5.0576pt}{.4996pt}} + \pgfpathcurveto{\pgfqpoint{4.6056pt}{.6536pt}}{\pgfqpoint{4.0596pt}{.2516pt}}{\pgfqpoint{3.8382pt}{-.398pt}} + \pgfpathcurveto{\pgfqpoint{3.6168pt}{-1.0478pt}}{\pgfqpoint{3.8038pt}{-1.6996pt}}{\pgfqpoint{4.2558pt}{-1.8536pt}} + \pgfpathcurveto{\pgfqpoint{4.7078pt}{-2.0076pt}}{\pgfqpoint{5.2538pt}{-1.6056pt}}{\pgfqpoint{5.4752pt}{-.9558pt}} + \pgfpathcurveto{\pgfqpoint{5.6966pt}{-.3062pt}}{\pgfqpoint{5.5096pt}{.3456pt}}{\pgfqpoint{5.0576pt}{.4996pt}} + \pgfpathclose + % + \pgfpathmoveto{\pgfqpoint{3.1212pt}{3.5542pt}} + \pgfpathcurveto{\pgfqpoint{2.5874pt}{3.6726pt}}{\pgfqpoint{1.975pt}{3.1756pt}}{\pgfqpoint{1.7538pt}{2.4442pt}} + \pgfpathcurveto{\pgfqpoint{1.5324pt}{1.7128pt}}{\pgfqpoint{1.7858pt}{1.0238pt}}{\pgfqpoint{2.3196pt}{.9052pt}} + \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}} + \pgfpathcurveto{\pgfqpoint{-.36942pt}{-.60372pt}}{\pgfqpoint{-.32505pt}{-.54825pt}}{\pgfqpoint{-.27633pt}{-.51192pt}} + \pgfpathcurveto{\pgfqpoint{-.23937pt}{-.48435pt}}{\pgfqpoint{-.17031pt}{-.46539pt}}{\pgfqpoint{-.10611pt}{-.40323pt}} + \pgfpathcurveto{\pgfqpoint{-.04191pt}{-.3411pt}}{\pgfqpoint{.00495pt}{-.27783pt}}{\pgfqpoint{.00495pt}{-.14787pt}} + \pgfpathcurveto{\pgfqpoint{.00495pt}{-.01794pt}}{\pgfqpoint{-.08526pt}{.12648pt}}{\pgfqpoint{-.22194pt}{.22467pt}} + \pgfpathcurveto{\pgfqpoint{-.35862pt}{.32286pt}}{\pgfqpoint{-.40863pt}{.50226pt}}{\pgfqpoint{-.32703pt}{.5979pt}} + \pgfpathcurveto{\pgfqpoint{-.24543pt}{.69354pt}}{\pgfqpoint{-.00564pt}{.66543pt}}{\pgfqpoint{.17172pt}{.53484pt}} + \pgfpathcurveto{\pgfqpoint{.34908pt}{.40422pt}}{\pgfqpoint{.39363pt}{.27192pt}}{\pgfqpoint{.37416pt}{.10971pt}} + \pgfpathcurveto{\pgfqpoint{.35472pt}{-.0525pt}}{\pgfqpoint{.26736pt}{-.46203pt}}{\pgfqpoint{.20175pt}{-.72633pt}} + \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}} + \pgfpathcurveto{\pgfqpoint{-.33078pt}{.70446pt}}{\pgfqpoint{-.37896pt}{.77388pt}}{\pgfqpoint{-.37896pt}{.8595pt}} + \pgfpathcurveto{\pgfqpoint{-.37896pt}{.94509pt}}{\pgfqpoint{-.33078pt}{1.01451pt}}{\pgfqpoint{-.27138pt}{1.01451pt}} + \pgfpathclose + % + \pgfpathmoveto{\pgfqpoint{-.05769pt}{.90573pt}} + \pgfpathcurveto{\pgfqpoint{-.01659pt}{.90573pt}}{\pgfqpoint{.01674pt}{.86445pt}}{\pgfqpoint{.01674pt}{.81354pt}} + \pgfpathcurveto{\pgfqpoint{.01674pt}{.7626pt}}{\pgfqpoint{-.01659pt}{.72132pt}}{\pgfqpoint{-.05769pt}{.72132pt}} + \pgfpathcurveto{\pgfqpoint{-.09879pt}{.72132pt}}{\pgfqpoint{-.13209pt}{.7626pt}}{\pgfqpoint{-.13209pt}{.81354pt}} + \pgfpathcurveto{\pgfqpoint{-.13209pt}{.86445pt}}{\pgfqpoint{-.09879pt}{.90573pt}}{\pgfqpoint{-.05769pt}{.90573pt}} + \pgfpathclose + % + \pgfpathmoveto{\pgfqpoint{.10497pt}{.81636pt}} + \pgfpathcurveto{\pgfqpoint{.14214pt}{.81096pt}}{\pgfqpoint{.16722pt}{.77193pt}}{\pgfqpoint{.16104pt}{.72918pt}} + \pgfpathcurveto{\pgfqpoint{.15483pt}{.68646pt}}{\pgfqpoint{.11964pt}{.65619pt}}{\pgfqpoint{.08247pt}{.66159pt}} + \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 diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.fractals.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.fractals.code.tex new file mode 100644 index 00000000000..22c9d8d1b27 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.fractals.code.tex @@ -0,0 +1,65 @@ +% Copyright 2008 by Mark Wibrow +% +% 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. + +\usepgfmodule{decorations} + + + +\pgfdeclaredecoration{Koch curve type 1}{init} +{ + \state{init}[width=\pgfdecoratedinputsegmentremainingdistance] + { + \pgfpathlineto{\pgfpoint{.33333\pgfdecoratedinputsegmentremainingdistance}{0pt}} + \pgfpathlineto{\pgfpoint{.33333\pgfdecoratedinputsegmentremainingdistance}{.33333\pgfdecoratedinputsegmentremainingdistance}} + \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}} + \pgfpathlineto{\pgfpoint{.25\pgfdecoratedinputsegmentremainingdistance}{.25\pgfdecoratedinputsegmentremainingdistance}} + \pgfpathlineto{\pgfpoint{.5\pgfdecoratedinputsegmentremainingdistance}{.25\pgfdecoratedinputsegmentremainingdistance}} + \pgfpathlineto{\pgfpoint{.5\pgfdecoratedinputsegmentremainingdistance}{0pt}} + \pgfpathlineto{\pgfpoint{.5\pgfdecoratedinputsegmentremainingdistance}{-.25\pgfdecoratedinputsegmentremainingdistance}} + \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 diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.markings.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.markings.code.tex new file mode 100644 index 00000000000..b09975a9aef --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.markings.code.tex @@ -0,0 +1,114 @@ +% Copyright 2008 by Mark Wibrow +% +% 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. + +\usepgfmodule{decorations} + + +% A marking decoration is used to add markings (which are just pgf +% scopes, essentially) at certain positions of a path. + +\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 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@arrowhead#1#2{% + \expandafter\ifx\csname tikz@special@arrow@end#2\endcsname\relax% be nice to TikZ + \pgfsetarrowsend{#2} + \else% + \pgfsetarrowsend{\csname tikz@special@arrow@end#2\endcsname}% + \fi% + \pgf@x=0pt% + \pgf@shorten@end% + \pgftransformxshift{-\pgf@x} + \pgftransformxscale{#1} + \pgflowlevelsynccm% + \pgflowlevelobj{}{\pgf@endarrow}% +} + +\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}{pre} +{ + \state{pre} + [ + width=0pt, + persistent precomputation={% + \pgf@lib@dec@mark@marks\pgf@lib@dec@mark@last% + \let\arrow=\pgf@lib@dec@doarrowhead% + \let\arrowreversed=\pgf@lib@dec@doarrowheadrev% + }, + next state=skipper + ] + {} + + \state{skipper}[width=\pgf@lib@dec@computed@width-\pgfdecoratedcompleteddistance-1sp, + next state=\pgf@lib@dec@next@state]{} + + \state{main} + [ + width=1sp, + next state=pre + ] + {% + \pgfinterruptpath% + \pgfscope% + \let\pgf@lib@dec@mark@marks=\pgfutil@empty% + \pgf@lib@dec@computed@action% + \endpgfscope% + \endpgfinterruptpath% + }% + + \state{final}[width=\pgfdecoratedremainingdistance]{} +} + +\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@parsenum#1{% + \pgfmathparse{#1}% + \ifpgfmathunitsdeclared% + \ifdim\pgfmathresult pt<0pt\relax% + \edef\pgf@lib@dec@computed@width{\pgfdecoratedpathlength\pgfmathresult pt}% + \else% + \edef\pgf@lib@dec@computed@width{\pgfmathresult pt}% + \fi% + \else% + \ifdim\pgfmathresult pt<0pt\relax% + \edef\pgf@lib@dec@computed@width{\pgfdecoratedpathlength\pgfmathresult*\pgfdecoratedpathlength}% + \else% + \edef\pgf@lib@dec@computed@width{\pgfmathresult*\pgfdecoratedpathlength}% + \fi% + \fi% +} + +\def\pgf@lib@dec@mark@last{% + \def\pgf@lib@dec@next@state{final}% +} + + +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathmorphing.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathmorphing.code.tex new file mode 100644 index 00000000000..a6052489796 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathmorphing.code.tex @@ -0,0 +1,299 @@ +% Copyright 2008 by Mark Wibrow +% +% 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. + +\usepgfmodule{decorations} + + +% +% These decorations "morph" paths. That means that the +% orginal 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. +% + + +% +% +% Kind 1: Path morphing straight line decorations +% +% + + +% zigzag decoration. +% +\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} + } +} + + + + +% saw decoration +% +% 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} + {} +} + + + + +% random steps decoration +% +% A decoration that consists of random steps heading towards the target +% +% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength + +\pgfdeclaredecoration{random steps}{start} +{ + \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, + width=+\pgfdecorationsegmentlength] + { + \pgfpathlineto{ + \pgfpointadd + {\pgfpoint{\pgfdecorationsegmentlength}{0pt}} + {\pgfpoint{rand*\pgfdecorationsegmentamplitude}{rand*\pgfdecorationsegmentamplitude}} + } + } + \state{final} + {} +} + + + +% Meta-decoration line zigzag + +\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} + } +} + + + + + +% +% +% Kind 2: Path morphing curved decorations +% +% + + + +% bent decoration +% +% A decoration that looks like someone bent the line a bit. +% +% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentaspect + +\pgfdeclaredecoration{bent}{bent} +{ + \state{bent}[width=+\pgfdecoratedinputsegmentremainingdistance] + { + \pgfpathcurveto + {\pgfqpoint{\pgfdecorationsegmentaspect\pgfdecoratedinputsegmentremainingdistance}{\pgfdecorationsegmentamplitude}} + {\pgfpointadd{\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}} + {\pgfqpoint{-\pgfdecorationsegmentaspect\pgfdecoratedinputsegmentremainingdistance}{\pgfdecorationsegmentamplitude}}} + {\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}} + } + \state{final} + {} +} + + + +% decoration 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] + { + \pgfpathcurveto + {\pgfqpoint{.125\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}} + {\pgfqpoint{.1875\pgfdecorationsegmentlength}{0pt}} + {\pgfqpoint{.3125\pgfdecorationsegmentlength}{0pt}} + } + \state{end up}[width=+.3125\pgfdecorationsegmentlength, + next state=final] + { + \pgfpathcurveto + {\pgfqpoint{.125\pgfdecorationsegmentlength}{-\pgfdecorationsegmentamplitude}} + {\pgfqpoint{.1875\pgfdecorationsegmentlength}{0pt}} + {\pgfqpoint{.3125\pgfdecorationsegmentlength}{0pt}} + } + \state{final} + { + \pgfpathlineto{\pgfpointdecoratedpathlast} + } +} + + +% coil decoration +% +% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength, + +\pgfdeclaredecoration{coil}{coil} +{ + \state{coil}[switch if less than=% + 1.5\pgfdecorationsegmentlength+% + \pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude+% + \pgfdecorationsegmentaspect\pgfdecorationsegmentamplitude to last, + width=+\pgfdecorationsegmentlength] + { + \pgfpathcurveto + {\pgfpoint@oncoil{0 }{ 0.555}{1}} + {\pgfpoint@oncoil{0.445}{ 1 }{2}} + {\pgfpoint@oncoil{1 }{ 1 }{3}} + \pgfpathcurveto + {\pgfpoint@oncoil{1.555}{ 1 }{4}} + {\pgfpoint@oncoil{2 }{ 0.555}{5}} + {\pgfpoint@oncoil{2 }{ 0 }{6}} + \pgfpathcurveto + {\pgfpoint@oncoil{2 }{-0.555}{7}} + {\pgfpoint@oncoil{1.555}{-1 }{8}} + {\pgfpoint@oncoil{1 }{-1 }{9}} + \pgfpathcurveto + {\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] + { + \pgfpathcurveto + {\pgfpoint@oncoil{0 }{ 0.555}{1}} + {\pgfpoint@oncoil{0.445}{ 1 }{2}} + {\pgfpoint@oncoil{1 }{ 1 }{3}} + \pgfpathcurveto + {\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% + \pgf@x=\pgfdecorationsegmentaspect\pgf@x% + \pgf@y=#2\pgfdecorationsegmentamplitude% + \pgf@xa=0.083333333333\pgfdecorationsegmentlength% + \advance\pgf@x by#3\pgf@xa% +} + + +% bumps decoration +% +% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength + +\pgfdeclaredecoration{bumps}{initial} +{ + \state{initial}[auto end on length=+.51\pgfdecorationsegmentlength, + auto corner on length=+.51\pgfdecorationsegmentlength, + width=+.5\pgfdecorationsegmentlength] + { + \pgfpathcurveto + {\pgfqpoint{0pt}{.555\pgfdecorationsegmentamplitude}} + {\pgfqpoint{0.11125\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}} + {\pgfqpoint{.25\pgfdecorationsegmentlength}{\pgfdecorationsegmentamplitude}} + \pgfpathcurveto + {\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 diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathreplacing.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathreplacing.code.tex new file mode 100644 index 00000000000..d07ae8ab6e5 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.pathreplacing.code.tex @@ -0,0 +1,177 @@ +% Copyright 2008 by Mark Wibrow +% +% 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. + +\usepgfmodule{decorations} + + +% +% Path replacing decorations +% +% These decorations change the path by replacing it by another path. +% For instance, a line in the path might be replaced by small +% ticks or unconnected curves or crosses. Applying a chopping +% decoration to a path means that the path can no longer be used for +% filling in the original manner. +% + + + +% +% +% Kind 1: Path chopping with open subpaths +% +% + + +% ticks decoration +% +% 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} + } +} + + + +% expanding waves decoration +% +% 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] + { + \pgfpathmoveto{ + \pgfpointadd + {\pgfqpoint{-\pgfdecoratedcompleteddistance}{0pt}}% + {\pgfpointpolar{\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}}}% + \pgfpatharc{\pgfdecorationsegmentangle}{-\pgfdecorationsegmentangle}{+\pgfdecoratedcompleteddistance}% + } + \state{last}[width=+0pt,next state=final] + { + \pgfpathmoveto{ + \pgfpointadd + {\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} + \pgfpathmoveto{ + \pgfpointadd + {\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} + } +} + + + +% border decoration +% +% 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} + } +} + + + + + + +% brace decorations +% +% Parameters: \pgfdecorationsegmentamplitude + +\pgfdeclaredecoration{brace}{brace} +{ + \state{brace}[width=+\pgfdecoratedremainingdistance,next state=final] + { + \pgfpathmoveto{\pgfpointorigin} + \pgfpathcurveto + {\pgfqpoint{.15\pgfdecorationsegmentamplitude}{.3\pgfdecorationsegmentamplitude}} + {\pgfqpoint{.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}} + {\pgfqpoint{\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}} + { + \pgftransformxshift{+\pgfdecorationsegmentaspect\pgfdecoratedremainingdistance} + \pgfpathlineto{\pgfqpoint{-\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}} + \pgfpathcurveto + {\pgfqpoint{-.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}} + {\pgfqpoint{-.15\pgfdecorationsegmentamplitude}{.7\pgfdecorationsegmentamplitude}} + {\pgfqpoint{0\pgfdecorationsegmentamplitude}{1\pgfdecorationsegmentamplitude}} + \pgfpathcurveto + {\pgfqpoint{.15\pgfdecorationsegmentamplitude}{.7\pgfdecorationsegmentamplitude}} + {\pgfqpoint{.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}} + {\pgfqpoint{\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}} + } + { + \pgftransformxshift{+\pgfdecoratedremainingdistance} + \pgfpathlineto{\pgfqpoint{-\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}} + \pgfpathcurveto + {\pgfqpoint{-.5\pgfdecorationsegmentamplitude}{.5\pgfdecorationsegmentamplitude}} + {\pgfqpoint{-.15\pgfdecorationsegmentamplitude}{.3\pgfdecorationsegmentamplitude}} + {\pgfqpoint{0pt}{0pt}} + } + } + \state{final} + {} +} + + + + +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.shapes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.shapes.code.tex new file mode 100644 index 00000000000..6e1b25101bd --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.shapes.code.tex @@ -0,0 +1,468 @@ +% Copyright 2008 by Mark Wibrow +% +% 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. + +\usepgfmodule{decorations} + + +% Options for shape decorations + +\pgfkeys{ + /pgf/decoration/.cd, + shape/.initial=circle, + anchor/.initial=center, + shape start width/.initial=2.5pt, + shape start height/.initial=2.5pt, + shape end width/.initial=2.5pt, + shape end height/.initial=2.5pt, + shape sep/.store in=\pgf@lib@shapedecoration@sep, + shape sloped/.is if=pgfshapedecorationsloped, + shape scaled/.is if=pgfshapedecorationscaled, + shape evenly spread/.store in=\pgf@lib@shapedecoration@spread, + shape start size/.style={% + shape start width=#1, + shape start height=#1% + },% + shape end size/.style={% + shape end width=#1, + shape end height=#1% + },% + shape size/.style={% + shape start size=#1, + shape end size=#1% + },% + shape width/.style={% + shape start width=#1, + shape end width=#1 + }, + shape height/.style={% + shape start height=#1, + shape end height=#1 + } +} + +\def\pgf@lib@shapedecoration@sep{.25cm, between centers} +\newif\ifpgfshapedecorationsloped +\pgfshapedecorationslopedtrue +\newif\ifpgfshapedecorationscaled +\let\pgf@lib@shapedecoration@spread\pgfutil@empty% + + + +% 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] + { + \pgfpathmoveto{\pgfqpoint{0pt}{\pgf@lib@dec@ssh}} + \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] + { + \pgfpathmoveto{\pgfqpoint{0pt}{\pgf@lib@dec@ssh}} + \pgfpathlineto{\pgfqpoint{\pgf@lib@dec@ssw}{0pt}} + \pgfpathlineto{\pgfqpoint{0pt}{-\pgf@lib@dec@ssh}} + \pgfpathclose + } + \state{skip}[width=\pgfdecoratedremainingdistance] + {} + \state{final} + { + \pgfpathmoveto{\pgfpointdecoratedpathlast} + } +} + + + + +% 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] + { + \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{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} + } +} + + + + + + +% The shape background decoration +% +% 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. +% +% 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 height and width of the shape can be independently or +% simultaneously scaled (linearly) along the path. It is also +% possible to prevent the shapes being sloped parallel to the +% path. + +% internal if +\newif\ifpgf@lib@shapedecoration@betweenborders + +\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. + % + % + % Check the shape exists. + % + \pgfutil@ifundefined{pgf@sh@bg@\pgfkeysvalueof{/pgf/decoration/shape}}{% + \PackageError{PGF}{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 + 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. + % + \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@savedpoints\pgfutil@empty% + \csname pgf@sh@s@\pgfkeysvalueof{/pgf/decoration/shape}\endcsname% + \pgf@sh@savedpoints% + \pgf@sh@savedmacros% + % + % Save the macros and pionts. + % + \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% + % + % Save the dimensions of the shape path. + % + \pgf@x\pgf@picmaxx% + \pgf@y\pgf@picmaxy% + \advance\pgf@x-\pgf@picminx% + \advance\pgf@y-\pgf@picminy% + \xdef\pgf@lib@shapedecoration@shapepathsize{% + \noexpand\pgf@x\the\pgf@x% + \noexpand\pgf@y\the\pgf@y% + }% + \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}}% + \ifpgfshapedecorationscaled% + \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/decoration/shape end width}}% + \else% + \advance\pgf@x\pgf@x% + \fi% + \pgf@x.5\pgf@x% (a+b)/2 + \multiply\pgf@x-\c@pgf@counta% -(n-1)((a+b)/2) + \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 + % (most) inaccuracies. + % + \ifpgfshapedecorationscaled% + \pgf@xa\pgf@lib@shapedecoration@widthchange\relax% + \divide\pgf@xa\c@pgf@counta% + \edef\pgf@lib@shapedecoration@specialwidth{\the\pgf@xa}% + \fi% + \else% + \pgf@lib@shapedecoration@betweenbordersfalse% + \pgf@x\pgfdecoratedremainingdistance% + \ifnum\c@pgf@counta=1\relax% + \pgf@y.5\pgf@x% + \edef\pgf@lib@shapedecoration@initialise{\the\pgf@y}% + \else% + \advance\pgf@x5pt\relax% An arbitrary value >0pt. + \edef\pgf@lib@shapedecoration@initialise{\the\pgf@x}% + \fi% + \fi% + \else% + % + % Between centers. + % + \pgf@x\pgfdecoratedremainingdistance% + \ifnum\c@pgf@counta>1\relax% + \advance\c@pgf@counta-1\relax% + \divide\pgf@x\c@pgf@counta\relax% + \else% + \ifnum\c@pgf@counta=1\relax% + \pgf@y.5\pgf@x% + \edef\pgf@lib@shapedecoration@initialise{\the\pgf@y}% + \else% + \advance\pgf@x5pt\relax% An arbitrary value >0pt. + \edef\pgf@lib@shapedecoration@initialise{\the\pgf@x}% + \fi% + \fi% + \fi% + \edef\pgf@lib@shapedecoration@sep{\the\pgf@x}% + \fi% + }] + {} + \state{before shape} + [ + width=\pgf@lib@shapedecoration@beforeshape-1sp, + next state=shape, + persistent precomputation= + { + \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 + % + % 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. + % + \pgf@x\pgf@lib@shapedecoration@width\relax% + \advance\pgf@x\pgf@lib@shapedecoration@specialwidth\relax% + \pgf@xa\pgf@x% + \advance\pgf@xa-\pgf@lib@shapedecoration@startwidth\relax% + \pgf@xb\pgf@lib@shapedecoration@widthchange\relax% + \pgfmathdivide@{\pgfmath@tonumber{\pgf@xa}}{\pgfmath@tonumber{\pgf@xb}}% + \else% + \pgf@x\pgf@lib@shapedecoration@widthchange\relax% + \pgf@x\pgfmathresult\pgf@x% + \advance\pgf@x\pgf@lib@shapedecoration@startwidth\relax% + \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% + \edef\pgf@lib@shapedecoration@beforeshape{\the\pgf@x}% + \else% + \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% + \pgf@xa\pgf@lib@shapedecoration@width\relax% + \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{% + \pgf@sh@reanchor{\pgfkeysvalueof{/pgf/decoration/shape}}{\pgfkeysvalueof{/pgf/decoration/anchor}}% + \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, + next state=sep, + persistent precomputation= + { + \ifpgf@lib@shapedecoration@betweenborders% + \pgf@x\pgf@lib@shapedecoration@width\relax% + \pgf@x.5\pgf@x% + \edef\pgf@lib@shapedecoration@aftershape{\the\pgf@x}% + \else% + \edef\pgf@lib@shapedecoration@aftershape{0pt}% + \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\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 diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.text.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.text.code.tex new file mode 100644 index 00000000000..b773e36563c --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarydecorations.text.code.tex @@ -0,0 +1,233 @@ +% Copyright 2008 by Mark Wibrow +% +% 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. + +\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} +} +\def\pgf@lib@decorationtextcolor{black} + +% Decorates a path with a text. The path is removed during this +% process + +\pgfdeclaredecoration{text along path}{initial}{ + \state{initial}[width=+0pt, + next state=scan, + persistent precomputation=\let\pgfdecorationrestoftext\pgfdecorationtext] + {} + \state{scan}[width=+0pt, + next state=before typeset, + persistent precomputation= + { + \pgf@lib@decorations@text@scanchar% + \ifvoid\pgf@lib@decorations@text@box% + \setbox\pgf@lib@decorations@text@box\hbox{}% + \wd\pgf@lib@decorations@text@box16383pt\relax% + \fi% + }] + {} + \state{before typeset}[width=+.5\wd\pgf@lib@decorations@text@box, next state=typeset]{} + \state{typeset}[width=+0pt, next state=after typeset] + { + \pgftransformxshift{+-.5\wd\pgf@lib@decorations@text@box}% + \setbox\pgf@hbox\hbox{\copy\pgf@lib@decorations@text@box}% + \pgfqboxsynced\pgf@hbox% + } + \state{after typeset}[width=+.5\wd\pgf@lib@decorations@text@box, next state=scan]{} + \state{final}{} +} + + +% \pgfsetdecoratetextformatdelimiters +% +% Set the delimiters for formatting in the text decoration. +% NB: Catcodes for delimiters should be 11 or 12. +% +% Examples: +% +% \pgfsetdecoratetextformatdelimiters{|}{}% 2nd argument can be empty. +% +% \def\pgfdecoratetext{A big |\color{red}|red|| apple.} +% +% \pgfsetdecoratetextformatdelimiters{[}{]} +% +% \def\pgfdecoratetext{The [\it]very[+\color{green}]green[] sprouts.} +% +\def\pgfsetdecoratetextformatdelimiters#1#2{% + \def\pgf@lib@decorations@text@formatchar{#1}% + \def\pgf@test{#2}% + \ifx\pgf@test\pgfutil@empty% + \def\pgf@lib@decorations@text@collectformat##1#1{% + \pgf@lib@decorations@text@@collectformat##1\pgf@stop}% + \else% + \def\pgf@lib@decorations@text@collectformat##1#2{% + \pgf@lib@decorations@text@@collectformat##1\pgf@stop}% + \fi% +} + +\pgfsetdecoratetextformatdelimiters{|}{} + +\newbox\pgf@lib@decorations@text@box +\newif\ifpgf@lib@decorate@textmathmode + +\let\pgfdecorationtext\pgfutil@empty +\let\pgfdecorationrestoftext\pgfutil@empty% +\let\pgf@lib@decorations@text@format\pgfutil@empty + +\def\pgf@lib@decorations@text@scanchar{% + \ifx\pgfdecorationrestoftext\pgfutil@empty% + \let\pgf@lib@decorations@text@char\pgfutil@empty% + \setbox\pgf@lib@decorations@text@box\box\voidb@x% + \let\pgf@next\relax% + \else% + \let\pgf@next\pgf@lib@decorations@text@@scanchar% + \fi% + \pgf@next} + +\def\pgf@lib@decorations@text@@scanchar{% + \expandafter\pgf@lib@decorations@text@@@scanchar\pgfdecorationrestoftext\pgf@stop} + +\def\pgf@lib@decorations@text@@@scanchar{% + \futurelet\pgf@lib@decorations@lettoken% + \pgf@lib@decorations@text@@@@scanchar} + +\def\pgf@lib@decorations@text@@@@scanchar{% + \ifx\pgf@lib@decorations@lettoken\pgfutil@sptoken% + \let\pgf@next\pgf@lib@decorations@text@insertspace% + \else% + \let\pgf@next\pgf@lib@decorations@text@@@@@scanchar% + \fi% + \pgf@next} + +\def\pgf@lib@decorations@text@@@@@scanchar{% + \pgfutil@ifnextchar\bgroup{\pgf@lib@decorations@text@collectgroup}% + {\pgf@lib@decorations@text@@@@@@scanchar}} + +\def\pgf@lib@decorations@text@collectgroup#1{% + \def\pgf@lib@decorations@text@char{#1}% + \pgf@lib@decorations@text@collectrestoftext} + +\def\pgf@lib@decorations@text@@@@@@scanchar#1{% + \ifx#1\pgf@stop% + \pgf@lib@decorations@text@box\box\voidb@x% + \let\pgf@next\pgf@lib@decorations@text@endoftext% + \else% + \def\pgf@lib@decorations@text@char{#1}% + \ifx#1\space% + \let\pgf@next\pgf@lib@decorations@text@collectrestoftext% + \else% + \ifx#1\ % + \let\pgf@next\pgf@lib@decorations@text@collectrestoftext% + \else% + \ifx\pgf@lib@decorations@text@char\pgf@lib@decorations@text@formatchar% + \let\pgf@next\pgf@lib@decorations@text@collectformat% + \else% + \expandafter\ifcat\noexpand#1\relax% + \let\pgf@next\pgf@lib@decorations@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@decorations@text@@@scanchar% + \else% + \let\pgf@next\pgf@lib@decorations@text@collectrestoftext% + \fi% + \fi% + \fi% + \fi% + \fi% + \fi% + \pgf@next% +} + +\def\pgf@lib@decorations@text@@collectformat{% + \pgfutil@ifnextchar+{\pgf@lib@decorations@text@addtoformat}{\pgf@lib@decorations@text@setformat}} + +\def\pgf@lib@decorations@text@setformat#1\pgf@stop{% + \def\pgf@lib@decorations@text@format{#1}% + \pgf@lib@decorations@text@@@scanchar% +} + +\def\pgf@lib@decorations@text@addtoformat+#1\pgf@stop{% + \expandafter\def\expandafter\pgf@lib@decorations@text@format\expandafter{\pgf@lib@decorations@text@format#1}% + \pgf@lib@decorations@text@@@scanchar% +} + +\def\pgf@lib@decorations@text@insertspace{% + \pgfutil@ifnextchar\bgroup{\pgf@lib@decorations@text@@insertspacegrp}% + {\pgf@lib@decorations@text@@insertspace}} + +\def\pgf@lib@decorations@text@@insertspacegrp#1{% + \pgf@lib@decorations@text@@@@@@scanchar\space{#1}} + +\def\pgf@lib@decorations@text@@insertspace#1{% + \pgf@lib@decorations@text@@@@@@scanchar\space#1} + +\def\pgf@lib@decorations@text@expandcs{% + \expandafter\expandafter\expandafter\pgf@lib@decorations@text@@@@@scanchar% + \pgf@lib@decorations@text@char} + +\def\pgf@lib@decorations@text@endoftext{% + \let\pgfdecoraterestoftext\pgfutil@empty% + \let\pgf@lib@decorations@text@char\pgfutil@empty% +} +\def\pgf@lib@decorations@text@collectrestoftext{% + \pgf@lib@decorations@text@dobox% + \futurelet\pgf@lib@decorations@text@lettoken% + \pgf@lib@decorations@text@@collectrestoftext} + +\def\pgf@lib@decorations@text@@collectrestoftext{% + \ifx\bgroup\pgf@lib@decorations@text@lettoken% + \let\pgf@next\pgf@lib@decorations@text@@@collectrestoftextgrp% + \else% + \let\pgf@next\pgf@lib@decorations@text@@@collectrestoftext% + \fi% + \pgf@next} + +\def\pgf@lib@decorations@text@@@collectrestoftextgrp#1#2\pgf@stop{\def\pgfdecorationrestoftext{{#1}#2}% +} + +\def\pgf@lib@decorations@text@@@collectrestoftext#1\pgf@stop{\def\pgfdecorationrestoftext{#1}} + +{% + \catcode`\$3 % + \gdef\pgf@lib@decorations@mathshift{$}% + \catcode`\$9 $% For editors with annoying syntax highlighting. +}% + +\def\pgf@lib@decorations@text@dobox{% + \setbox\pgf@lib@decorations@text@box\hbox{% + \pgfinterruptpicture% + \begingroup% + \pgfsetcolor{\pgf@lib@decorationtextcolor}% + \ifpgf@lib@decorate@textmathmode\pgf@lib@decorations@mathshift\fi% + \pgf@lib@decorations@text@format\relax% + \pgf@lib@decorations@text@char% + \ifpgf@lib@decorate@textmathmode\pgf@lib@decorations@mathshift\fi% + \endgroup% + \endpgfinterruptpicture% + }% +} + + + + + + +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex new file mode 100644 index 00000000000..39fca783437 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex @@ -0,0 +1,57 @@ +% 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. +% +% 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 $ + + +% Axial fadings + +\pgfdeclarehorizontalshading{pgf@lib@fade@east}{100bp} +{color(0bp)=(pgftransparent!0); color(25bp)=(pgftransparent!0); + 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)} + +\pgfdeclareverticalshading{pgf@lib@fade@north}{100bp} +{color(0bp)=(pgftransparent!0); color(25bp)=(pgftransparent!0); + 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)} + +\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}} + +\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}} + +\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}} + +\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}} diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex deleted file mode 100644 index 92352856dbe..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarypatterns.code.tex +++ /dev/null @@ -1,140 +0,0 @@ -% 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. -% -% 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.8 2007/03/09 17:49:32 tantau Exp $ - - -% 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} -} - -\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} -} - -\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} -} - -\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} -} - -% 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} -} - -\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} -} - - -% Dotted regions - -\pgfdeclarepatternformonly{dots}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{1pt}{1pt}}{\pgfqpoint{3pt}{3pt}}% -{ - \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} -} - - - - -% 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} -} - -\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}} - \pgfpathclose% - \pgfpathmoveto{\pgfqpointpolar{-30}{1mm}} - \pgfpathlineto{\pgfqpointpolar{-270}{1mm}} - \pgfpathlineto{\pgfqpointpolar{-150}{1mm}} - \pgfpathclose% - \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} -} - - - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex deleted file mode 100644 index a0f504431eb..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex +++ /dev/null @@ -1,520 +0,0 @@ -% 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. -% -% 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.9 2007/03/09 17:49:32 tantau Exp $ - -\newif\ifpgf@plot@started - - -% This handler converts each plot stream command into a curveto -% command, except for the first, which is converted to the previously -% specified action. -% -% Example: -% -% \pgfpathmoveto{\pgfpointorigin} -% \pgfsetlinetofirstplotpoint -% \pgfplothandlercurveto -% \pgfplotxyfile{mytable} - -\def\pgfplothandlercurveto{% - \def\pgf@plotstreamstart{% - \global\let\pgf@plotstreampoint=\pgf@plot@curveto@handler@initial% - \global\let\pgf@plotstreamspecial=\pgfutil@gobble% - \global\let\pgf@plotstreamend=\pgf@plot@curveto@handler@finish% - \global\pgf@plot@startedfalse% - }% -} - -\def\pgf@plot@curveto@handler@initial#1{% - \pgf@process{#1}% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@plot@first@action{\pgfqpoint{\pgf@xa}{\pgf@ya}}% - \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}% - \xdef\pgf@plot@curveto@current{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% - % compute difference vector: - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\pgf@plot@curveto@first} - \advance\pgf@xa by-\pgf@x% - \advance\pgf@ya by-\pgf@y% - % compute support directions: - \pgf@xa=\pgf@plottension\pgf@xa% - \pgf@ya=\pgf@plottension\pgf@ya% - % first marshal: - \pgf@process{\pgf@plot@curveto@second}% - \pgf@xb=\pgf@x% - \pgf@yb=\pgf@y% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \advance\pgf@xb by-\pgf@xa% - \advance\pgf@yb by-\pgf@ya% - \advance\pgf@xc by\pgf@xa% - \advance\pgf@yc by\pgf@ya% - \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@curveto@first@support}% - {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@curveto@second}}% - {\pgf@marshal}% - % Prepare next: - \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. -% -% Example: -% -% \pgfsetplottension{0.2} - -\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} - - -% This handler converts the plot stream command into a curveto -% command that is closed using a closepath. -% -% Example: -% -% \pgfpathmoveto{\pgfpointorigin} -% \pgfplothandlerclosedcurve -% \pgfplotxyfile{mytable} - -\def\pgfplothandlerclosedcurve{% - \def\pgf@plotstreamstart{% - \global\let\pgf@plotstreampoint=\pgf@plot@closedcurve@handler@initial% - \global\let\pgf@plotstreamspecial=\pgfutil@gobble% - \global\let\pgf@plotstreamend=\pgf@plot@closedcurve@handler@finish% - }% -} - -\def\pgf@plot@closedcurve@handler@initial#1{% - \pgf@process{#1}% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \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% - \pgf@process{#1}% - \xdef\pgf@plot@closedcurve@current{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% - % compute difference vector: - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\pgf@plot@closedcurve@initial} - \advance\pgf@xa by-\pgf@x% - \advance\pgf@ya by-\pgf@y% - % compute support directions: - \pgf@xa=\pgf@plottension\pgf@xa% - \pgf@ya=\pgf@plottension\pgf@ya% - % first marshal: - \pgf@process{\pgf@plot@closedcurve@after@initial}% - \pgf@xb=\pgf@x% - \pgf@yb=\pgf@y% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \advance\pgf@xb by-\pgf@xa% - \advance\pgf@yb by-\pgf@ya% - \advance\pgf@xc by\pgf@xa% - \advance\pgf@yc by\pgf@ya% - \global\let\pgf@plot@closedcurve@first=\pgf@plot@closedcurve@after@initial% - \global\let\pgf@plot@closedcurve@second=\pgf@plot@closedcurve@current% - \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}% - \xdef\pgf@plot@closedcurve@current{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}% - % compute difference vector: - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\pgf@plot@closedcurve@first} - \advance\pgf@xa by-\pgf@x% - \advance\pgf@ya by-\pgf@y% - % compute support directions: - \pgf@xa=\pgf@plottension\pgf@xa% - \pgf@ya=\pgf@plottension\pgf@ya% - % first marshal: - \pgf@process{\pgf@plot@closedcurve@second}% - \pgf@xb=\pgf@x% - \pgf@yb=\pgf@y% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \advance\pgf@xb by-\pgf@xa% - \advance\pgf@yb by-\pgf@ya% - \advance\pgf@xc by\pgf@xa% - \advance\pgf@yc by\pgf@ya% - \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@closedcurve@first@support}% - {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@closedcurve@second}}% - {\pgf@marshal}% - % Prepare next: - \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 - % - % first, draw line from 2nd last to last: - % - \pgf@process{\pgf@plot@closedcurve@initial}% - % compute difference vector: - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\pgf@plot@closedcurve@first}% - \advance\pgf@xa by-\pgf@x% - \advance\pgf@ya by-\pgf@y% - % compute support directions: - \pgf@xa=\pgf@plottension\pgf@xa% - \pgf@ya=\pgf@plottension\pgf@ya% - % first marshal: - \pgf@process{\pgf@plot@closedcurve@second}% - \pgf@xb=\pgf@x% - \pgf@yb=\pgf@y% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \advance\pgf@xb by-\pgf@xa% - \advance\pgf@yb by-\pgf@ya% - \advance\pgf@xc by\pgf@xa% - \advance\pgf@yc by\pgf@ya% - \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@closedcurve@first@support}% - {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@closedcurve@second}}% - {\pgf@marshal}% - \xdef\pgf@plot@closedcurve@first@support{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - % - % second, draw line from last point to start: - % - \pgf@process{\pgf@plot@closedcurve@after@initial}% - % compute difference vector: - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\pgf@plot@closedcurve@second}% - \advance\pgf@xa by-\pgf@x% - \advance\pgf@ya by-\pgf@y% - % compute support directions: - \pgf@xa=\pgf@plottension\pgf@xa% - \pgf@ya=\pgf@plottension\pgf@ya% - % first marshal: - \pgf@process{\pgf@plot@closedcurve@initial}% - \pgf@xb=\pgf@x% - \pgf@yb=\pgf@y% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \advance\pgf@xb by-\pgf@xa% - \advance\pgf@yb by-\pgf@ya% - \advance\pgf@xc by\pgf@xa% - \advance\pgf@yc by\pgf@ya% - \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgf@plot@closedcurve@first@support}% - {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}{\noexpand\pgf@plot@closedcurve@initial}}% - {\pgf@marshal}% - % - % third, draw line from first to second point: - % - \edef\pgf@marshal{\noexpand\pgfpathcurveto{\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}% - {\noexpand\pgf@plot@closedcurve@after@initial@presupport}{\noexpand\pgf@plot@closedcurve@after@initial}}% - {\pgf@marshal}% - \pgfpathclose% - \fi% -} - - - - - -% This handler converts each point in a stream into a line from the -% $y$-axis to the given points coordinate, resulting in a -% ``comb.'' -% -% Example: -% -% \pgfplothandlerxcomb -% \pgfplotxyfile{mytable} - -\def\pgfplothandlerxcomb{% - \def\pgf@plotstreamstart{% - \global\let\pgf@plotstreampoint=\pgf@plot@xcomb@handler% - \global\let\pgf@plotstreamspecial=\pgfutil@gobble% - \global\let\pgf@plotstreamend=\relax% - }% -} - -\def\pgf@plot@xcomb@handler#1{% - \pgf@process{#1}% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgfpathmoveto{\pgfqpoint{0pt}{\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.'' -% -% Example: -% -% \pgfplothandlerycomb -% \pgfplotxyfile{mytable} - -\def\pgfplothandlerycomb{% - \def\pgf@plotstreamstart{% - \global\let\pgf@plotstreampoint=\pgf@plot@ycomb@handler% - \global\let\pgf@plotstreamspecial=\pgfutil@gobble% - \global\let\pgf@plotstreamend=\relax% - }% -} - -\def\pgf@plot@ycomb@handler#1{% - \pgf@process{#1}% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgfpathmoveto{\pgfqpoint{\pgf@xa}{0pt}}% - \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% -} - - - - - - -% This handler converts each point in a stream into a line from the -% origin to the point's coordinate, resulting in a ``star''. -% -% Example: -% -% \pgfplothandlerpolarcomb -% \pgfplotxyfile{mytable} - -\def\pgfplothandlerpolarcomb{% - \def\pgf@plotstreamstart{% - \global\let\pgf@plotstreampoint=\pgf@plot@polarcomb@handler% - \global\let\pgf@plotstreamspecial=\pgfutil@gobble% - \global\let\pgf@plotstreamend=\relax% - }% -} - -\def\pgf@plot@polarcomb@handler#1{% - \pgf@process{#1}% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgfpathmoveto{\pgfpointorigin}% - \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@ya}}% -} - - - - -% 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). -% Typically, this code will be \pgfuseplotmark{whatever}. -% -% Example: -% -% \pgfplothandlermark{\pgfuseplotmark{*}} -% \pgfplotxyfile{mytable} - -\def\pgfplothandlermark#1{% - \pgf@plothandlermark{% - \ifnum\pgf@plot@mark@count<\pgf@plot@mark@repeat\relax% - \else% - \global\pgf@plot@mark@count=0\relax% - #1% - \fi% - }% -} - -\newcount\pgf@plot@mark@count -\def\pgf@plot@mark@phase{0} - -\def\pgf@plothandlermark#1{% - \def\pgf@plot@mark{#1}% - \def\pgf@plotstreamstart{% - \global\pgf@plot@mark@count=\pgf@plot@mark@repeat\relax% - \global\advance\pgf@plot@mark@count by-\pgf@plot@mark@phase\relax% - \global\let\pgf@plotstreampoint=\pgf@plot@mark@handler% - \global\let\pgf@plotstreamspecial=\pgfutil@gobble% - \global\let\pgf@plotstreamend=\relax% - }% -} - -\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 -% value, only every third point will get a mark. -% -% #1 = repeat count -% -% Example: -% -% \pgfsetplotmarkrepeat{2} - -\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. -% -% #1 = the index of the first point that should be marked. -% -% Example: -% -% \pgfsetplotmarkphase{3} - -\def\pgfsetplotmarkphase#1{\def\pgf@plot@mark@phase{#1}} -\pgfsetplotmarkphase{1} - - - -% This handler draws a given mark at those points whose number is -% given in the (pgffor-like) list. -% -% #1 = some code to be executed at each point (with the coordinate -% system translated to that point). -% Typically, this code will be \pgfuseplotmark{whatever}. -% #2 = list of positions like "1,2,4,...,9,10" -% -% Example: -% -% \pgfplothandlermarklisted{\pgfuseplotmark{*}}{1,2,4,...,9} -% \pgfplotxyfile{mytable} - -\def\pgfplothandlermarklisted#1#2{% - \let\pgf@plot@mark@list=\pgfutil@empty% - \edef\pgf@marshal{\noexpand\foreach\noexpand\pgf@temp in{#2}} - \pgf@marshal{\xdef\pgf@plot@mark@list{\pgf@plot@mark@list(\pgf@temp)}}% - \pgf@plothandlermark{% - \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. -% -% #1 = a plot mark mnemonic -% #2 = code for drawing the mark -% -% Example: -% -% \pgfdeclareplotmark{*}{\pgfpathcircle{\pgfpointorigin}{2pt}\pgfusepathqfill} - -\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, -% for other shapes it should be about half the width/height. -% -% Example: -% -% \pgfsetplotmarksize{1pt} - -\def\pgfsetplotmarksize#1{\pgfmathsetlength\pgfplotmarksize{#1}} - -\newdimen\pgfplotmarksize -\pgfplotmarksize=2pt - - -% Insert a plot mark's code at the origin. -% -% #1 = plot mark mnemonic -% -% Example: -% -% \pgfuseplotmark{*} - -\def\pgfuseplotmark#1{\csname pgf@plot@mark@#1\endcsname} - - -% A stroke-filled circle mark - -\pgfdeclareplotmark{*} -{% - \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize} - \pgfusepathqfillstroke -} - - -% A plus-sign like mark - -\pgfdeclareplotmark{+} -{% - \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}} - \pgfusepathqstroke -} - -% See pgflibraryplotmarks for more plot marks - - - - - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex deleted file mode 100644 index e20805d50a1..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex +++ /dev/null @@ -1,212 +0,0 @@ -% 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. -% -% 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.5 2007/03/09 17:49:32 tantau Exp $ - - -% A stroked circle mark - -\pgfdeclareplotmark{o} -{% - \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize} - \pgfusepathqstroke -} - - - -% A six-pointed star mark - -\pgfdeclareplotmark{asterisk} -{% - \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathmoveto{\pgfqpointpolar{30}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{210}{\pgfplotmarksize}} - \pgfpathmoveto{\pgfqpointpolar{-30}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{-210}{\pgfplotmarksize}} - \pgfusepathqstroke -} - - -% A five-pointed star mark - -\pgfdeclareplotmark{star} -{% - \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{18}{\pgfplotmarksize}} - \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{-54}{\pgfplotmarksize}} - \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}} - \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}} - \pgfusepathqstroke -} - - -% An \oplus mark - -\pgfdeclareplotmark{oplus} -{% - \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize} - \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}} - \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}} - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}} - \pgfusepathqstroke -} - -\pgfdeclareplotmark{oplus*} -{% - \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize} - \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}} - \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}} - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}} - \pgfusepathqfillstroke -} - - -% An \otimes mark - -\pgfdeclareplotmark{otimes} -{% - \pgfpathcircle{\pgfpointorigin}{\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 -} - -\pgfdeclareplotmark{otimes*} -{% - \pgfpathcircle{\pgfpointorigin}{\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}} - \pgfusepathqfillstroke -} - - -% A vertical bar mark - -\pgfdeclareplotmark{|} -{% - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}} - \pgfusepathqstroke -} - - - -% A horizontal bar mark - -\pgfdeclareplotmark{-} -{% - \pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}} - \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}} - \pgfusepathqstroke -} - - -% A square stroked mark - -\pgfdeclareplotmark{square} -{% - \pgfpathrectangle{\pgfqpoint{-\pgfplotmarksize}{-\pgfplotmarksize}}{\pgfqpoint{2\pgfplotmarksize}{2\pgfplotmarksize}}% - \pgfusepathqstroke -} - -% A square stroked-filled mark - -\pgfdeclareplotmark{square*} -{% - \pgfpathrectangle{\pgfqpoint{-\pgfplotmarksize}{-\pgfplotmarksize}}{\pgfqpoint{2\pgfplotmarksize}{2\pgfplotmarksize}}% - \pgfusepathqfillstroke -} - - -% A triangle mark - -\pgfdeclareplotmark{triangle} -{% - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{-30}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{-150}{\pgfplotmarksize}} - \pgfpathclose - \pgfusepathqstroke -} - - -% A stroke-filled triangle mark - -\pgfdeclareplotmark{triangle*} -{% - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{-30}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{-150}{\pgfplotmarksize}} - \pgfpathclose - \pgfusepathqfillstroke -} - - - -% A diamond-shaped mark - -\pgfdeclareplotmark{diamond} -{% - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{.75\pgfplotmarksize}{0pt}} - \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}} - \pgfpathclose - \pgfusepathqstroke -} - - -% A stroke-filled diamond-shaped mark - -\pgfdeclareplotmark{diamond*} -{% - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{.75\pgfplotmarksize}{0pt}} - \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}} - \pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}} - \pgfpathclose - \pgfusepathqfillstroke -} - - - -% A pentagon-shaped mark - -\pgfdeclareplotmark{pentagon} -{% - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{18}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{-54}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}} - \pgfpathclose - \pgfusepathqstroke -} - -% A stroke-filled pentagon-shaped mark - -\pgfdeclareplotmark{pentagon*} -{% - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{18}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{-54}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}} - \pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}} - \pgfpathclose - \pgfusepathqfillstroke -} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.arrows.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.arrows.code.tex deleted file mode 100644 index 2f81d04742f..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.arrows.code.tex +++ /dev/null @@ -1,12 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.arrows.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $ - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.callouts.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.callouts.code.tex new file mode 100644 index 00000000000..5a39a629e07 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.callouts.code.tex @@ -0,0 +1,951 @@ +% Copyright 2007 by Mark Wibrow +% +% 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. + + + +% Keys for callouts +% +% Common to all callouts: +% /pgf/callout absolute pointer +% /pgf/callout relative pointer +% +% ellipse callout only: +% /pgf/callout pointer arc +% +% rectangle callout only: +% /pgf/callout pointer width +% +% cloud callout only: +% /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 +} + + + +\def\pgf@lib@callout@makeabsolutepointer#1{% + \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}} + + +% 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% + \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% + \advance\pgf@y.5\dp\pgfnodeparttextbox% + \pgf@y1.4142136\pgf@y% + \pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/minimum height}}% + \ifdim\pgf@y<.5\pgf@ya% + \pgf@y.5\pgf@ya% + \fi% + % + % ...without outer sep... + % + \edef\xpathradius{\the\pgf@x}% + \edef\ypathradius{\the\pgf@y}% + % + % ...and width outer sep. + % + \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}% + \edef\xradius{\the\pgf@x}% + \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/outer ysep}}% + \edef\yradius{\the\pgf@y}% + % + \addtosavedmacro\xradius% + \addtosavedmacro\xpathradius% + \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% + }% + \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}% + }% + \anchor{mid west}{% + \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}% + }% + \anchor{base west}{% + \ellipsecalloutpoints% + \pgfmathpointintersectionoflineandarc{\basepoint\advance\pgf@x-\xradius}{\basepoint}% + {\centerpoint}{90}{270}{\xradius and \yradius}% + }% + \anchor{north}{% + \ellipsecalloutpoints% + \centerpoint% + \advance\pgf@y\yradius\relax% + } + \anchor{south}{% + \ellipsecalloutpoints% + \centerpoint% + \advance\pgf@y-\yradius\relax% + } + \anchor{east}{% + \ellipsecalloutpoints% + \centerpoint% + \advance\pgf@x\xradius\relax% + } + \anchor{west}{% + \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% + } + \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% + } + \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% + } + \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% + } + \anchor{pointer}{% + \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@test\pgfutil@empty% + \else% + \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@test\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}% + }% +} + +% Internal macro for calculating the points for the +% ellipse callout pointer. +% +% The following must be set up: +% +% \centerpoint - the center of the ellipse. +% \calloutpointer - the location of the callout point. +% \pointerarc - the width of the pointer. +% \xpathradius - the x radius of the ellipse. +% \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% +} + + +% 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. +% 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} + +% 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 +% \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% + }% + }% +}% + +\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% + }% + }% +}% + + +\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@test = the shape name (from \pgfmultipartnode) + % + \ifx\pgf@test\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@test\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}}% + }% + }% +} + + + +% \pgf@lib@rectanglecallout@pointer +% +% Internal macro for calculations relating to the rectangle callout. +% +% Requires the following to be set up: +% +% \calloutpointer - the location of the callout point. +% \xtemp - the half width of the rectangle +% \ytemp - the half height of the rectangle +% \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% +} + + +% Internal macro for parsing the size of +% the cloud callout pointer. +% +% \pgf@x and \pgf@y should be set up as the +% width and height of the main shape. +% +% \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% +} +\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}% +} + +% Shape: cloud callout. +% +\pgfdeclareshape{cloud callout}{% + \savedanchor\calloutpointer{% + \pgfutil@ifundefined{pgf@sh@s@cloud}{% + \PackageError{PGF}{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@test\pgfutil@empty% + \else% + \edef\pgf@sh@@temp{\noexpand\expandafter\noexpand\pgfutil@g@addto@macro\noexpand\csname pgf@sh@np@\pgf@test\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/pgflibraryshapes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.code.tex deleted file mode 100644 index fecbb7df710..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.code.tex +++ /dev/null @@ -1,18 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.code.tex,v 1.12 2007/06/08 11:24:59 tantau Exp $ - -\usepgflibrary{shapes.geometric} -\usepgflibrary{shapes.misc} -\usepgflibrary{shapes.symbols} -\usepgflibrary{shapes.arrows} -\usepgflibrary{shapes.multipart} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.IEC.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.IEC.code.tex new file mode 100644 index 00000000000..881cda69d98 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.IEC.code.tex @@ -0,0 +1,814 @@ +% Copyright 2008 by Mark Wibrow +% +% 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. + + +\pgfkeys{/pgf/.cd, + logic gate input sep/.initial=0.125cm, + logic gate inputs/.initial={normal,normal},% + logic gate inverted radius/.initial=2pt,% + logic gate anchors use bounding box/.is if=pgfgateanchorsuseboundingrectangle,% + and gate IEC symbol/.initial=$\char`\&$, + nand gate IEC symbol/.initial=$\char`\&$, + or gate IEC symbol/.initial=$\geq1$, + nor gate IEC symbol/.initial=$\geq1$, + xor gate IEC symbol/.initial={$=1$}, + xnor gate IEC symbol/.initial={$=1$}, + not gate IEC symbol/.initial=1, + 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} +} + +% Internal macro for parsing inputs. +% +\expandafter\ifx\csname pgf@lib@sh@logicgate@parseinputs\endcsname\relax% +\def\pgf@lib@sh@logicgate@parseinputs#1{% + \edef\pgf@lib@sh@temp{\pgfkeysvalueof{/pgf/logic gate inputs}}% + \c@pgf@counta#1\relax% + \c@pgf@countb0\relax% + \expandafter\pgfutil@in@\expandafter,\expandafter{\pgf@lib@sh@temp}% + \ifpgfutil@in@% + \let\pgf@lib@sh@next\pgf@lib@sh@logicgate@parseinputs@long% + \else% + \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} +% +% The `short' version for input specifcation 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\pgf@stop% +} +\def\pgf@lib@sh@logicgate@parseinputs@@short#1{% + \ifx#1\pgf@stop% + \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}% + \let\pgf@lib@sh@next\relax% + \else% + \ifnum\c@pgf@countb=\c@pgf@counta% + \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}% + \let\pgf@lib@sh@next\relax% + \else% + \advance\c@pgf@countb1\relax% + \expandafter\ifx\pgf@lib@sh@itext#1% + \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{% + \expandafter\def\csname input-\the\c@pgf@countb\endcsname{i}}% + \else% + \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{% + \expandafter\def\csname input-\the\c@pgf@countb\endcsname{n}}% + \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,\pgf@stop,% +} +\def\pgf@lib@sh@logicgate@parseinputs@@long#1,{% + \ifx#1\pgf@stop% + \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}% + \let\pgf@lib@sh@next\relax% + \else% + \ifnum\c@pgf@countb=\c@pgf@counta% + \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}% + \let\pgf@lib@sh@next\relax% + \else% + \advance\c@pgf@countb1\relax% + \def\pgf@lib@sh@temp{#1}% + \ifx\pgf@lib@sh@invertedtext\pgf@lib@sh@temp% + \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{% + \expandafter\def\csname input-\the\c@pgf@countb\endcsname{i}}% + \else% + \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{% + \expandafter\def\csname input-\the\c@pgf@countb\endcsname{n}}% + \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% + +\def\pgf@lib@sh@logicgates@IEC@foregroundpath#1{% + \dimensions% + {% + \pgftransformshift{\centerpoint}% + \edef\pgf@lib@sh@temp{\pgfkeysvalueof{/pgf/logic gate IEC symbol align}}% + \edef\pgf@lib@sh@@temp{/pgf/logic gate IEC symbol align/.cd, \pgf@lib@sh@temp}% + \expandafter\pgfkeys\expandafter{\pgf@lib@sh@@temp}% + \expandafter\pgftext\expandafter[\pgf@lib@sh@temp]{% + \pgfkeysgetvalue{/pgf/logic gate IEC symbol color}{\pgf@lib@sh@temp}% + \ifx\pgf@lib@sh@temp\pgfutil@empty% + \else% + \expandafter\color\expandafter{\pgf@lib@sh@temp}% + \fi% + \pgfkeysvalueof{/pgf/#1 gate IEC symbol}% + }% + }% +} + + +\def\pgf@lib@sh@logicgates@dimensions@IEC#1{% + \pgf@x.5\wd\pgfnodeparttextbox% + \pgf@y.5\ht\pgfnodeparttextbox% + \advance\pgf@y.5\dp\pgfnodeparttextbox% + % + % Adjust for the width of the gate symbol. + % + \setbox\pgf@hbox\hbox{{\pgfkeysvalueof{/pgf/#1 gate IEC symbol}}}% add braces as color-aftergroup-fix TT + \pgf@xa.5\wd\pgf@hbox% + \pgf@ya.5\ht\pgf@hbox% + \advance\pgf@ya.5\dp\pgf@hbox% + \ifdim\pgf@x<\pgf@xa% + \pgf@x\pgf@xa% + \fi% + \ifdim\pgf@y<\pgf@ya% + \pgf@y\pgf@ya% + \fi% + \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/inner xsep}}% + \pgfmathaddtolength\pgf@y{\pgfkeysvalueof{/pgf/inner ysep}}% + % + % Adjust for minimum height and width. + % + \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% + % + % Adjust the height for the number of inputs. + % + \c@pgf@counta\pgf@lib@sh@logicgate@numinputs% + \advance\c@pgf@counta1\relax% + \pgfmathsetlength\pgf@yb{\pgfkeysvalueof{/pgf/logic gate inverted radius}}% + \pgf@yb2.0\pgf@yb% + \advance\pgf@yb\pgflinewidth% + \pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/logic gate input sep}}% + \edef\inputsep{\the\pgf@yc}% + \addtosavedmacro\inputsep% + \ifdim\pgf@yb<\pgf@yc% + \pgf@yb\pgf@yc% + \fi% + \multiply\pgf@yb\c@pgf@counta% + \ifdim\pgf@y<.5\pgf@yb% + \pgf@y.5\pgf@yb% + \fi% + % + \pgf@xa\pgf@y% + \pgfmathaddtolength\pgf@xa{-\pgfkeysvalueof{/pgf/inner xsep}}% + \edef\innerhalfwidth{\the\pgf@xa}% + \addtosavedmacro\innerhalfwidth% + % + \pgf@ya\pgf@y% + \pgfmathaddtolength\pgf@ya{-\pgfkeysvalueof{/pgf/inner ysep}}% + \edef\innerhalfheight{\the\pgf@ya}% + \addtosavedmacro\innerhalfheight% + % + % Take into account the outer sep. + % + \pgfmathaddtolength\pgf@x{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathaddtolength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}% + % + \edef\halfwidth{\the\pgf@x}% + \edef\halfheight{\the\pgf@y}% + \addtosavedmacro\halfwidth% + \addtosavedmacro\halfheight% +}% + +\def\pgf@lib@sh@logicgate@IEC@inputanchor#1{% + \dimensions% + \centerpoint% + \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\halfheight% + \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\halfheight% + \advance\pgf@y-\pgfutil@tempdima% +} + + + +% Shape 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. + % + \pgfmathloop% + \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs% + \else% + \pgfutil@ifundefined{pgf@anchor@and gate IEC@input \pgfmathcounter}{% + \expandafter\xdef\csname pgf@anchor@and gate IEC@input \pgfmathcounter\endcsname{% + \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}% + }% + }{}% + \repeatpgfmathloop% + \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax% + \PackageError{PGF}{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@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 west}{% + \dimensions% + \midpoint% + \advance\pgf@x-\halfwidth}% + \anchor{mid east}{% + \dimensions% + \midpoint% + \advance\pgf@x\halfwidth}% + \anchor{base}{\basepoint} + \anchor{base west}{% + \dimensions% + \basepoint% + \advance\pgf@x-\halfwidth}% + \anchor{base east}{% + \dimensions% + \basepoint% + \advance\pgf@x\halfwidth}% + \anchor{north}{\dimensions\centerpoint\advance\pgf@y\halfheight}% + \anchor{south}{\dimensions\centerpoint\advance\pgf@y-\halfheight}% + \anchor{east}{\dimensions\centerpoint\advance\pgf@x\halfwidth}% + \anchor{west}{\dimensions\centerpoint\advance\pgf@x-\halfwidth}% + \anchor{north east}{\dimensions\centerpoint\advance\pgf@x\halfwidth\advance\pgf@y\halfheight}% + \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} + \backgroundpath{% + \dimensions% + \pgf@xc\halfwidth% + \pgf@yc\halfheight% + \pgfmathaddtolength\pgf@xc{-\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathaddtolength\pgf@yc{-\pgfkeysvalueof{/pgf/outer xsep}}% + {% + \pgftransformshift{\centerpoint}% + \pgfpathrectangle{\pgfqpoint{-\pgf@xc}{-\pgf@yc}}% + {% + \pgf@xc2.0\pgf@xc% + \pgf@yc2.0\pgf@yc% + \pgfqpoint{\pgf@xc}{\pgf@yc}% + }% + \pgfpathclose% + % + % Draw inputs. + % + \pgf@xc-\halfwidth% + \advance\pgf@xc-\invertedradius% + \pgf@yc\halfheight% + \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{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\invertedradius}% + }% + \fi% + \repeatpgfmathloop% + }% + } + \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{and}} + \anchorborder{% + \pgfextract@process\externalpoint{}% + \dimensions% + \pgfpointadd{\centerpoint}{\pgfpointborderrectangle{\externalpoint}{\pgfqpoint{\halfwidth}{\halfheight}}}% + }% +} + + + + + +% Shape 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. + % + \pgfmathloop% + \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs% + \else% + \pgfutil@ifundefined{pgf@anchor@nand gate IEC@input \pgfmathcounter}{% + \expandafter\xdef\csname pgf@anchor@nand gate IEC@input \pgfmathcounter\endcsname{% + \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}% + }% + }{}% + \repeatpgfmathloop% + \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax% + \PackageError{PGF}{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@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} + \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{% + \centerpoint% + \advance\pgf@x\halfwidth% + \advance\pgf@x\invertedradius% + }{+\invertedradius}% + } + \foregroundpath{\pgf@lib@sh@logicgates@IEC@foregroundpath{nand}} + \inheritanchorborder[from=and gate IEC] +} + + + + + +% Shape 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. + % + \pgfmathloop% + \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs% + \else% + \pgfutil@ifundefined{pgf@anchor@or gate IEC@input \pgfmathcounter}{% + \expandafter\xdef\csname pgf@anchor@or gate IEC@input \pgfmathcounter\endcsname{% + \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}% + }% + }{}% + \repeatpgfmathloop% + \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax% + \PackageError{PGF}{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\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] +} + + + + + +% Shape 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. + % + \pgfmathloop% + \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs% + \else% + \pgfutil@ifundefined{pgf@anchor@nor gate IEC@input \pgfmathcounter}{% + \expandafter\xdef\csname pgf@anchor@nor gate IEC@input \pgfmathcounter\endcsname{% + \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}% + }% + }{}% + \repeatpgfmathloop% + \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax% + \PackageError{PGF}{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\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] +} + + + + + +% Shape 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. + % + \pgfmathloop% + \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs% + \else% + \pgfutil@ifundefined{pgf@anchor@xor gate IEC@input \pgfmathcounter}{% + \expandafter\xdef\csname pgf@anchor@xor gate IEC@input \pgfmathcounter\endcsname{% + \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}% + }% + }{}% + \repeatpgfmathloop% + \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax% + \PackageError{PGF}{An xor 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\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] +} + + + + +% Shape 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. + % + \pgfmathloop% + \ifnum\pgfmathcounter>\pgf@lib@sh@logicgate@numinputs% + \else% + \pgfutil@ifundefined{pgf@anchor@xnor gate IEC@input \pgfmathcounter}{% + \expandafter\xdef\csname pgf@anchor@xnor gate IEC@input \pgfmathcounter\endcsname{% + \noexpand\pgf@lib@sh@logicgate@IEC@inputanchor{\pgfmathcounter}% + }% + }{}% + \repeatpgfmathloop% + \ifnum\pgf@lib@sh@logicgate@numinputs<2\relax% + \PackageError{PGF}{A 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\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] +} + + + + +% Shape 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. + % + \expandafter\gdef\csname pgf@anchor@buffer gate IEC@input\endcsname{% + \pgf@lib@sh@logicgate@IEC@inputanchor{1}% + }% + \ifnum\pgf@lib@sh@logicgate@numinputs=0\relax% + \PackageError{PGF}{A buffer gate must have one 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@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] +} + + + + + +% Shape 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}% + % + \pgfutil@ifundefined{pgf@anchor@not gate IEC@input}{% + \expandafter\gdef\csname pgf@anchor@not gate IEC@input\endcsname{% + \pgf@lib@sh@logicgate@IEC@inputanchor{1}% + }}{}% + \ifnum\pgf@lib@sh@logicgate@numinputs=0\relax% + \PackageError{PGF}{A not 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\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 diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.US.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.US.code.tex new file mode 100644 index 00000000000..76d6916bcd5 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.gates.logic.US.code.tex @@ -0,0 +1,2587 @@ +% Copyright 2008 by Mark Wibrow +% +% 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. + + +\newif\ifpgfgateanchorsuseboundingrectangle% + + +% Keys for US/CDH logic gates. +% +\pgfkeys{/pgf/.cd,% + logic gate input sep/.initial=0.125cm, + logic gate inputs/.initial={normal,normal},% + logic gate inverted radius/.initial=2pt,% + logic gate anchors use bounding box/.is if=pgfgateanchorsuseboundingrectangle,% +} + +% 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% +}% + + +% 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% + % +}% + + +% Internal macro for parsing inputs. +% +\expandafter\ifx\csname pgf@lib@sh@logicgate@parseinputs\endcsname\relax% +\def\pgf@lib@sh@logicgate@parseinputs#1{% + \edef\pgf@lib@sh@temp{\pgfkeysvalueof{/pgf/logic gate inputs}}% + \c@pgf@counta#1\relax% + \c@pgf@countb0\relax% + \expandafter\pgfutil@in@\expandafter,\expandafter{\pgf@lib@sh@temp}% + \ifpgfutil@in@% + \let\pgf@lib@sh@next\pgf@lib@sh@logicgate@parseinputs@long% + \else% + \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} +% +% The `short' version for input specifcation 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\pgf@stop% +} +\def\pgf@lib@sh@logicgate@parseinputs@@short#1{% + \ifx#1\pgf@stop% + \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}% + \let\pgf@lib@sh@next\relax% + \else% + \ifnum\c@pgf@countb=\c@pgf@counta% + \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}% + \let\pgf@lib@sh@next\relax% + \else% + \advance\c@pgf@countb1\relax% + \expandafter\ifx\pgf@lib@sh@itext#1% + \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{% + \expandafter\def\csname input-\the\c@pgf@countb\endcsname{i}}% + \else% + \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{% + \expandafter\def\csname input-\the\c@pgf@countb\endcsname{n}}% + \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,\pgf@stop,% +} +\def\pgf@lib@sh@logicgate@parseinputs@@long#1,{% + \ifx#1\pgf@stop% + \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}% + \let\pgf@lib@sh@next\relax% + \else% + \ifnum\c@pgf@countb=\c@pgf@counta% + \edef\pgf@lib@sh@logicgate@numinputs{\the\c@pgf@countb}% + \let\pgf@lib@sh@next\relax% + \else% + \advance\c@pgf@countb1\relax% + \def\pgf@lib@sh@temp{#1}% + \ifx\pgf@lib@sh@invertedtext\pgf@lib@sh@temp% + \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{% + \expandafter\def\csname input-\the\c@pgf@countb\endcsname{i}}% + \else% + \expandafter\pgf@sh@resavedmacro\expandafter{\csname input-\the\c@pgf@countb\endcsname}{% + \expandafter\def\csname input-\the\c@pgf@countb\endcsname{n}}% + \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% + +% Internal macro for calculation input anchors. Used by +% 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% +} + + + + +% 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% + \PackageError{PGF}{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% + } +} + + + + + +% 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% + \PackageError{PGF}{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% +} + + +% 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% + \PackageError{PGF}{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% + }% +} + + + + +% 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% + \PackageError{PGF}{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] +} + + + +% Internal macro for calculation input anchors. Used by +% 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% +} + + + + + +% 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% + \PackageError{PGF}{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% + }% +} + + + + +% 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% + \PackageError{PGF}{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] +} + + + + + + +% Shape not gate US +% +\pgfdeclareshape{not gate US}{% + \expandafter\pgfutil@g@addto@macro\csname pgf@sh@s@not gate US\endcsname{% + \pgf@lib@sh@logicgate@parseinputs{1}% + \ifnum\pgf@lib@sh@logicgate@numinputs=0\relax% + \PackageError{PGF}{A not 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@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% + }% + \anchor{base}{\basepoint}% + \anchor{base east}{% + \basepoint% + \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% + }% + \inheritanchor[from=and gate US]{base} + \anchor{output}{% + \dimensions% + \pgf@xc\halfside% + \centerpoint% + \advance\pgf@x-.166666\pgf@xc% + \pgf@xc2.0\pgf@xc% + \advance\pgf@x.866025\pgf@xc% + \advance\pgf@x\invertedradius% + \advance\pgf@x\outerinvertedradius% + \advance\pgf@x\outerxsep% + } + \anchor{east}{% + \dimensions% + \tipanchor% + \pgf@xa\pgf@x% + \centerpoint% + \advance\pgf@x\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@not 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% + \pgf@ya\pgf@y% + \pgf@process{% + \dimensions% + \tipanchor% + \pgf@xa\pgf@x% + \centerpoint% + \advance\pgf@x\pgf@xa% + }% + \pgf@y\pgf@ya% + \else% + \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@x1pt\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{north east}{% + \dimensions% + \ifpgfgateanchorsuseboundingrectangle% + \csname pgf@anchor@not gate US@north west\endcsname% + \pgf@ya\pgf@y% + \pgf@process{% + \dimensions% + \tipanchor% + \pgf@xa\pgf@x% + \centerpoint% + \advance\pgf@x\pgf@xa% + }% + \pgf@y\pgf@ya% + \else% + \pgfpointintersectionoflines{\centerpoint}{\centerpoint\advance\pgf@x1pt\advance\pgf@y1pt}% + {\csname pgf@anchor@not gate US@north west\endcsname}% + {% + \pgfpointadd{\centerpoint}{% + \tipanchor% + \pgf@xa\outerxsep% + \advance\pgf@x2.350943\pgf@xa% + }% + }% + \fi% + } + \anchor{south west}{% + \dimensions% + \pgf@xa\halfside% + \centerpoint% + \advance\pgf@x-.833333\pgf@xa + \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. + }% + \anchor{north west}{% + \dimensions% + \pgf@xa\halfside% + \centerpoint% + \advance\pgf@x-.833333\pgf@xa + \advance\pgf@x-\outerxsep% + \advance\pgf@y1.166666\pgf@xa% + \pgf@ya\outerysep% + \advance\pgf@y1.565\pgf@ya% Selected by trial and error. + }% + \anchor{input}{% + \dimensions% + \pgf@lib@sh@logicgate@AND@inputanchor{1}% + \pgf@xc\halfside% + \advance\pgf@x.333333\pgf@xc% + }% + \anchor{west}{% + \dimensions% + \pgf@xc\halfside% + \pgf@xc-.833333\pgf@xc% + \advance\pgf@xc-\outerxsep% + \centerpoint% + \advance\pgf@x\pgf@xc% + } + \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}}% + \pgfpathlineto{\tipanchor}% + % + % 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 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{% + \pgfextract@process\externalpoint{}% + \pgfextract@process\externalpoint{\pgfpointadd{\centerpoint}{\externalpoint}}% + \pgfmathanglebetweenpoints{\centerpoint}{\externalpoint}% + \let\externalangle\pgfmathresult% + \dimensions% + \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@not gate US@north west\endcsname}% + \ifdim\externalangle pt<\pgfmathresult pt% + \pgfpointintersectionoflines{\centerpoint}{\externalpoint}% + {\csname pgf@anchor@not gate US@north west\endcsname}% + {% + \pgfpointadd{\centerpoint}{% + \tipanchor% + \pgf@xa\outerxsep% + \advance\pgf@x2.350943\pgf@xa% + }% + }% + \else% + \pgfmathanglebetweenpoints{\centerpoint}{\csname pgf@anchor@not gate US@south west\endcsname}% + \ifdim\externalangle pt<\pgfmathresult pt% + \pgfpointintersectionoflines{\externalpoint}{\centerpoint}% + {\csname pgf@anchor@not gate US@north west\endcsname}% + {\csname pgf@anchor@not gate US@south west\endcsname}% + \else% + \pgfpointintersectionoflines{\centerpoint}{\externalpoint}% + {\csname pgf@anchor@not gate US@south west\endcsname}% + {% + \pgfpointadd{\centerpoint}{% + \tipanchor% + \pgf@xa\outerxsep% + \advance\pgf@x2.350943\pgf@xa% + }% + }% + \fi% + \fi% + }% +} + + + + + +% 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% + \PackageError{PGF}{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% + }% + }% + \inheritanchorborder[from=not 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% + \PackageError{PGF}{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% + \PackageError{PGF}{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 diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.geometric.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.geometric.code.tex deleted file mode 100644 index 802c85a41b9..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.geometric.code.tex +++ /dev/null @@ -1,1229 +0,0 @@ -% Copyright 2006 by Till Tantau and Mark Wibrow -% -% 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[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.geometric.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $ - -\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'' - % - \pgf@y=.5\ht\pgfnodeparttextbox% - \advance\pgf@y by.5\dp\pgfnodeparttextbox% - \pgfmathsetlength\pgf@yb{\pgfshapeinnerysep}% - \advance\pgf@y by\pgf@yb% - % - % Caculate ``width radius'' - % - \pgf@x=.5\wd\pgfnodeparttextbox% - \pgfmathsetlength\pgf@xb{\pgfshapeinnerxsep}% - \advance\pgf@x by\pgf@xb% - % - % Adjust - % - \pgf@x=1.4142136\pgf@x% - \pgf@y=1.4142136\pgf@y% - % - % Adjust hieght, if necessary - % - \pgfmathsetlength\pgf@yc{\pgfshapeminheight}% - \ifdim\pgf@y<.5\pgf@yc% - \pgf@y=.5\pgf@yc% - \fi% - % - % Adjust width, if necessary - % - \pgfmathsetlength\pgf@xc{\pgfshapeminwidth}% - \ifdim\pgf@x<.5\pgf@xc% - \pgf@x=.5\pgf@xc% - \fi% - % - % Add outer sep - % - \pgfmathsetlength{\pgf@xb}{\pgfshapeouterxsep}% - \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}% - \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{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} - \pgf@xa=\pgf@x% - \pgf@process{\centerpoint} - \advance\pgf@x by-\pgf@xa% - \pgfmathsetlength\pgf@y{.5ex} - } - \anchor{base west} - {% - \pgf@process{\radius} - \pgf@xa=\pgf@x% - \pgf@process{\centerpoint} - \advance\pgf@x by-\pgf@xa% - \pgf@y=0pt - } - \anchor{north west} - { - \pgf@process{\radius} - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\centerpoint} - \advance\pgf@x by-0.707107\pgf@xa - \advance\pgf@y by0.707107\pgf@ya - } - \anchor{south west} - { - \pgf@process{\radius} - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \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} - \pgf@xa=\pgf@x% - \pgf@process{\centerpoint} - \advance\pgf@x by\pgf@xa% - \pgfmathsetlength\pgf@y{.5ex} - } - \anchor{base east} - {% - \pgf@process{\radius} - \pgf@xa=\pgf@x% - \pgf@process{\centerpoint} - \advance\pgf@x by\pgf@xa% - \pgf@y=0pt - } - \anchor{north east} - { - \pgf@process{\radius} - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\centerpoint} - \advance\pgf@x by0.707107\pgf@xa - \advance\pgf@y by0.707107\pgf@ya - } - \anchor{south east} - { - \pgf@process{\radius} - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\centerpoint} - \advance\pgf@x by0.707107\pgf@xa - \advance\pgf@y by-0.707107\pgf@ya - } - \anchorborder{ - \edef\pgf@marshal{% - \noexpand\pgfpointborderellipse - {\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}} - {\noexpand\radius}% - }% - \pgf@marshal% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \centerpoint% - \advance\pgf@x by\pgf@xa% - \advance\pgf@y by\pgf@ya% - } - - % - % Background path - % - \backgroundpath - { - \pgf@process{\radius}% - \pgfutil@tempdima=\pgf@x% - \pgfutil@tempdimb=\pgf@y% - \pgfmathsetlength{\pgf@xb}{\pgfshapeouterxsep}% - \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}% - \advance\pgfutil@tempdima by-\pgf@xb% - \advance\pgfutil@tempdimb by-\pgf@yb% - \pgfpathellipse{\centerpoint}{\pgfqpoint{\pgfutil@tempdima}{0pt}}{\pgfqpoint{0pt}{\pgfutil@tempdimb}}% - } -} - - - - -% Set the recommended shape aspect ratio -% -% #1 = aspect ratio -% -% Example: -% -% \pgfsetshapeminwidth{1.5} - -\def\pgfsetshapeaspect#1{% - \def\pgfshapeaspect{#1}% - % Invert - \pgfutil@tempdima=#1pt% - \pgfutil@tempdima=.125\pgfutil@tempdima% - \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}} -} -\pgfsetshapeaspect{1} - - - -\pgfdeclareshape{diamond} -{ - \savedanchor\outernortheast{% - % - % Calculate width and height of the inner rectangle - % - \pgf@xa=.5\wd\pgfnodeparttextbox% - \pgfmathsetlength\pgf@xc{\pgfshapeinnerxsep}% - \advance\pgf@xa by\pgf@xc% - \pgf@ya=.5\ht\pgfnodeparttextbox% - \advance\pgf@ya by.5\dp\pgfnodeparttextbox% - \pgfmathsetlength\pgf@yc{\pgfshapeinnerysep}% - \advance\pgf@ya by\pgf@yc% - % - % Calculate width and height of diamond - % - \pgf@x=\pgf@xa% - \advance\pgf@x by\pgfshapeaspect\pgf@ya% - \pgf@y=\pgfshapeaspectinverse\pgf@xa% - \advance\pgf@y by\pgf@ya% - % - % Check against minimum height/width - % - \pgfmathsetlength\pgf@xb{\pgfshapeminwidth}% - \ifdim\pgf@x<\pgf@xb% - % yes, too small. Enlarge... - \pgf@x=\pgf@xb% - \fi% - \pgfmathsetlength\pgf@yb{\pgfshapeminheight}% - \ifdim\pgf@y<\pgf@yb% - % yes, too small. Enlarge... - \pgf@y=\pgf@yb% - \fi% - % - % Add outer border - % - \pgfmathsetlength\pgf@xa{\pgfshapeouterxsep}% - \advance\pgf@x by\pgf@xa% - \pgfmathsetlength\pgf@ya{\pgfshapeouterysep}% - \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 - % - \anchor{text}{\text}% - \anchor{center}{\pgfpointorigin}% - \anchor{mid}{% - \pgf@process{\text}% - \pgf@x=0pt% - \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} - \anchorborder{% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\outernortheast}% - \ifdim\pgf@xa>0pt% - \else% - \pgf@x=-\pgf@x% - \fi% - \ifdim\pgf@ya>0pt% - \else% - \pgf@y=-\pgf@y% - \fi% - \edef\pgf@marshal{% - \noexpand\pgfpointintersectionoflines - {\noexpand\pgfpointorigin} - {\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}} - {\noexpand\pgfqpoint{\the\pgf@x}{0pt}} - {\noexpand\pgfqpoint{0pt}{\the\pgf@y}}% - }% - \pgf@process{\pgf@marshal}% - } - - % - % Background path - % - \backgroundpath{ - \pgf@process{\outernortheast}% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \pgfmathsetlength{\pgf@xa}{\pgfshapeouterxsep}% - \pgfmathsetlength{\pgf@ya}{\pgfshapeouterysep}% - \advance\pgf@xc by-1.414213\pgf@xa% - \advance\pgf@yc by-1.414213\pgf@ya% - \pgfpathmoveto{\pgfqpoint{\pgf@xc}{0pt}}% - \pgfpathlineto{\pgfqpoint{0pt}{\pgf@yc}}% - \pgfpathlineto{\pgfqpoint{-\pgf@xc}{0pt}}% - \pgfpathlineto{\pgfqpoint{0pt}{-\pgf@yc}}% - \pgfpathclose% - } -} - - - - -% \pgfsetstarpoints -% -% Set the number of points on a star. -% -\def\pgfsetstarpoints#1{% - \pgfmathsetcounter{pgf@counta}{#1}% - \edef\pgfstarpoints{\the\c@pgfmath@counta}} -\pgfsetstarpoints{5} - -% \pgfsetstarpointheight -% -% Set the height of the points (this is the -% distance between the outer and inner point -% radii). -% -\def\pgfsetstarpointheight#1{% - \pgfmathparse{#1}% - \edef\pgfstarpointheight{\pgfmathresult pt}} -\pgfsetstarpointheight{12pt} - -% \pgfsetstarpointratio -% -% Set the ratio between the outer and -% inner point radii. -% -\def\pgfsetstarpointratio#1{% - \pgfmathparse{#1}% - \edef\pgfstarpointratio{\pgfmathresult}% - \def\pgfstarpointheight{-16383pt}% If negative, the ratio is used. -} -\pgfsetstarpointratio{1.75} - -% \pgfsetstarrrotate -% -% Set the angle of rotation of the star -% border. This can be decimal. -% -\def\pgfsetstarrotate#1{% - \pgfmathparse{#1}% - \edef\pgfstarrotate{\pgfmathresult}}% -\pgfsetstarrotate{0} - -% Shape star. -% -\pgfdeclareshape{star}{% - \saveddimen{\points}{\pgf@x\pgfstarpoints pt}% - \saveddimen{\pointratio}{\pgf@x\pgfstarpointratio pt}% - \saveddimen{\rotate}{\pgf@x\pgfstarrotate pt}% - \saveddimen{\pointheight}{\pgf@x\pgfstarpointheight}% - \saveddimen{\minimumsize}{% - \pgfmathsetlength\pgf@x{\pgfshapeminwidth}% - \pgfmathsetlength\pgf@y{\pgfshapeminheight}% - \ifdim\pgf@y>\pgf@x% - \pgf@x\pgf@y% - \fi}% - \saveddimen{\outersep}{% - \pgfmathsetlength\pgf@x{\pgfshapeouterxsep}% - \pgfmathsetlength\pgf@y{\pgfshapeouterysep}% - \ifdim\pgf@y>\pgf@x% - \pgf@x\pgf@y% - \fi}% - \savedanchor{\centerpoint}{% - \pgf@x.5\wd\pgfnodeparttextbox% - \pgf@y.5\ht\pgfnodeparttextbox% - \advance\pgf@y-.5\dp\pgfnodeparttextbox% - }% - \saveddimen{\innerpointradius}{% - % - % The innerpoint radius is the radius of the circle which - % can safely encompass the node textbox. - % - \pgfmathsetlength\pgf@x{\pgfshapeinnerxsep}% - \advance\pgf@x.5\wd\pgfnodeparttextbox% - \pgfmathsetlength\pgf@y{\pgfshapeinnerysep}% - \advance\pgf@y.5\ht\pgfnodeparttextbox% - \ifdim\pgf@y>\pgf@x% - \pgf@x\pgf@y% - \fi% - \pgfmathveclen@{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@x}}% - \pgf@x\pgfmathresult pt\relax% - }% - % - \anchor{center}{\centerpoint}% - \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}% - \anchor{base}{\centerpoint\pgf@y=0pt}% - \anchor{north}{\pgf@anchor@star@border{\pgfpoint{+0pt}{+\outerpointradius}}}% - \anchor{south}{\pgf@anchor@star@border{\pgfpoint{+0pt}{+-\outerpointradius}}}% - \anchor{east}{\pgf@anchor@star@border{\pgfpoint{+\outerpointradius}{+0pt}}}% - \anchor{west}{\pgf@anchor@star@border{\pgfpoint{+-\outerpointradius}{+0pt}}}% - \anchor{north east}{\pgf@anchor@star@border{\pgfpoint{+\outerpointradius}{+\outerpointradius}}}% - \anchor{north west}{\pgf@anchor@star@border{\pgfpoint{+-\outerpointradius}{+\outerpointradius}}}% - \anchor{south east}{\pgf@anchor@star@border{\pgfpoint{+\outerpointradius}{+-\outerpointradius}}}% - \anchor{south west}{\pgf@anchor@star@border{\pgfpoint{+-\outerpointradius}{+-\outerpointradius}}}% - % - \backgroundpath{% - % - % Redefine stuff for ease of use. - % - \pgf@x\points% - \c@pgf@counta\pgf@x% - \divide\c@pgf@counta65536\relax% - \edef\points{\the\c@pgf@counta}% - \pgf@x\rotate% - \edef\rotate{\pgf@sys@tonumber{\pgf@x}}% - \pgf@x\pointratio% - \edef\pointratio{\pgf@sys@tonumber{\pgf@x}}% - % - % Calculate radii. - % - \pgf@x\innerpointradius\relax% - \edef\innerradius{\the\pgf@x}% - \pgf@xa\pointheight\relax% - \ifdim\pgf@xa<0pt\relax% - \pgf@x\pointratio\pgf@x% - \else% - \advance\pgf@x\pgf@xa% - \fi% - \pgf@xb\pgf@x% - \pgf@xc\minimumsize\relax% - \ifdim\pgf@x<.5\pgf@xc% - \pgf@x.5\pgf@xc% - \fi% - \edef\outerradius{\the\pgf@x}% - \ifdim\pgf@x>\pgf@xb% - \ifdim\pgf@xa<0pt\relax% - \pgfmathreciprocal{\pointratio}% - \pgf@xc\pgfmathresult\pgf@x\relax% - \edef\innerradius{\the\pgf@xc}% - \else% - \pgf@xc\pgf@x\relax% - \advance\pgf@xc-\pointheight% - \edef\innerradius{\the\pgf@xc}% - \fi% - \fi% - % - % Get the total number of points (inner + outer)... - % - \c@pgf@counta\points% - \advance\c@pgf@counta\c@pgf@counta% - \edef\numpoints{\the\c@pgf@counta}% - % - % ...and hence the angle between points. - % - \pgf@x360pt\relax% - \divide\pgf@x\c@pgf@counta% - \edef\staranglestep{\the\pgf@x}% - % - % Start at 90 degrees (star always points up)... - % - \pgf@x90pt\relax% - % - % ...unless rotation is applied. - % - \pgf@xa\rotate pt\relax% - \advance\pgf@x\pgf@xa% - \edef\starangle{\the\pgf@x}% - \let\starradius=\outerradius% - % - % Move to first point. - % - \pgfpathmoveto{% - \pgfpointadd{\centerpoint}% - {\pgfpointpolar{+\starangle}{+\starradius}}% - }% - \def\staranchorname{pgf@anchor@star@outer point}% - \pgfmathloop% - % - % Create anchors. Manually \xdef as \gdef is normally used by \anchor. - % - \c@pgf@counta\pgfmathcounter\relax% - \advance\c@pgf@counta1\relax% - \divide\c@pgf@counta2\relax% - \expandafter\xdef\csname\staranchorname\space\the\c@pgf@counta\endcsname{% - \noexpand\pgf@lib@shapesstaranchor{\pgfmathcounter}% - }% - \ifnum\pgfmathcounter=\numpoints\relax% Stop. - \else% - \ifodd\pgfmathcounter% - \let\starradius\innerradius% - \def\staranchorname{pgf@anchor@star@inner point}% - \else% - \let\starradius\outerradius% - \def\staranchorname{pgf@anchor@star@outer point}% - \fi% - \pgf@x\starangle\relax% - \advance\pgf@x\staranglestep\relax% - \edef\starangle{\the\pgf@x}% - \pgfpathlineto{% - \pgfpointadd{\centerpoint}% - {\pgfpointpolar{+\starangle}{+\starradius}}% - }% - \repeatpgfmathloop% - \pgfpathclose% - }% - % - \anchorborder{% - % - % Save x and y. - % - \pgf@xa\pgf@x% - \pgf@ya\pgf@y% - % - % Redefine stuff for ease of use. - % - \pgf@x\points% - \c@pgf@counta\pgf@x% - \divide\c@pgf@counta65536\relax% - \edef\points{\the\c@pgf@counta}% - \pgf@x\rotate% - \edef\rotate{\pgf@sys@tonumber{\pgf@x}}% - \pgf@x\pointratio% - \edef\pointratio{\pgf@sys@tonumber{\pgf@x}}% - % - % Calculate the location of the external - % point relative to the node center. - % - \centerpoint% - \advance\pgf@xa\pgf@x% - \advance\pgf@ya\pgf@y% - \edef\externalx{\the\pgf@xa}% - \edef\externaly{\the\pgf@ya}% - \pgf@process{\pgfpointdiff{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}}% - % - % First approximate the angle of the external point... - % - \pgf@xa\pgf@x% - \pgf@ya\pgf@y% - \pgf@xb\pgf@x% - \pgf@yb\pgf@y% - \ifdim\pgf@xa<0pt\relax% - \pgf@xa-\pgf@xa% - \fi% - \ifdim\pgf@ya<0pt\relax% - \pgf@ya-\pgf@ya% - \fi% - \ifdim\pgf@ya>\pgf@xa% - \pgf@x\pgf@xa% - \pgf@y\pgf@ya% - \else% - \pgf@x\pgf@ya% - \pgf@y\pgf@xa% - \fi% - \ifdim\pgf@y=0pt\relax% - \pgf@x0pt% - \else% - \pgfmathreciprocal@{\pgf@sys@tonumber{\pgf@y}}% - \pgf@x\pgfmathresult\pgf@x% - \fi% - \multiply\pgf@x1000\relax% - \afterassignment\pgfmath@gobbletilpgfmath@% - \expandafter\c@pgf@counta\the\pgf@x\relax\pgfmath@% - \expandafter\pgf@x\csname pgfmath@atan@\the\c@pgf@counta\endcsname pt\relax% - \ifdim\pgfmath@ya>\pgfmath@xa\relax% - \pgf@x-\pgf@x% - \advance\pgf@x90pt% - \fi% - \ifdim\pgf@xb<0pt% - \ifdim\pgf@yb>0pt% - \pgf@x-\pgf@x% - \fi% - \advance\pgf@x180pt\relax% - \else% - \ifdim\pgf@yb<0pt% - \pgf@x-\pgf@x% - \advance\pgf@x360pt\relax% - \fi\fi% - % - % ...then adjust, as star points start at 90 degrees... - % - \advance\pgf@x-90pt\relax% - \ifdim\pgf@x<0pt\relax% - \advance\pgf@x360pt\relax% - \fi% - % - % ...and also for rotation. - % - \advance\pgf@x-\rotate pt\relax% - \ifdim\pgf@x<0pt\relax% - \advance\pgf@x360pt\relax% - \fi% - % - % Now, locate the start and end points on the star border segment... - % - \c@pgf@counta\points\relax% - \pgf@y180pt\relax% - \divide\pgf@y\c@pgf@counta\relax% - \pgfmathreciprocal@{\pgf@sys@tonumber{\pgf@y}}% - \pgf@x\pgfmathresult\pgf@x% - \afterassignment\pgfmath@gobbletilpgfmath@% - \expandafter\c@pgf@counta\the\pgf@x\relax\pgfmath@% - % - % ...and hence, the start and end angles of the star border segment. - % - \pgf@x\pgf@y% - \multiply\pgf@x\c@pgf@counta% - \advance\pgf@x90pt% - \advance\pgf@x\rotate pt\relax% - \edef\firstangle{\the\pgf@x}% - \advance\c@pgf@counta1\relax% - \pgf@x\pgf@y% - \multiply\pgf@x\c@pgf@counta% - \advance\pgf@x\rotate pt\relax% - \advance\pgf@x90pt% - \edef\secondangle{\the\pgf@x}% - % - % Get the radii and add the outer sep... - % - \pgf@x\innerpointradius\relax% - \edef\innerradius{\the\pgf@x}% - \pgf@xa\pointheight\relax% - \ifdim\pgf@xa<0pt\relax% - \pgf@x\pointratio\pgf@x% - \else% - \advance\pgf@x\pgf@xa% - \fi% - \pgf@xb\pgf@x% - \pgf@xc\minimumsize\relax% - \ifdim\pgf@x<.5\pgf@xc% - \pgf@x.5\pgf@xc% - \fi% - \edef\outerradius{\the\pgf@x}% - \ifdim\pgf@x>\pgf@xb% - \ifdim\pgf@xa<0pt\relax% - \pgfmathreciprocal{\pointratio}% - \pgf@xc\pgfmathresult\pgf@x\relax% - \edef\innerradius{\the\pgf@xc}% - \else% - \pgf@xc\pgf@x\relax% - \advance\pgf@xc-\pgf@xb% - \edef\innerradius{\the\pgf@xc}% - \fi% - \fi% - \pgf@xa\outersep\relax% - \pgf@x\outerradius\relax% - \advance\pgf@x\pgf@xa% - \edef\outerradius{\the\pgf@x}% - \pgf@x\innerradius\relax% - \advance\pgf@x\pgf@xa% - \edef\innerradius{\the\pgf@x}% - \ifodd\c@pgf@counta% - \let\firstradii\outerradius% - \let\secondradii\innerradius% - \else% - \let\firstradii\innerradius% - \let\secondradii\outerradius% - \fi% - % - % ...and calculate the point on the intersection of - % the line from the external point to \centerpoint and - % the relevant segment of the star border. - % - \pgfpointintersectionoflines{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}% - {% - \pgfpointadd{\centerpoint}% - {\pgfpointpolar{+\firstangle}{+\firstradii}}% - }% - {% - \pgfpointadd{\centerpoint}% - {\pgfpointpolar{+\secondangle}{+\secondradii}}% - }% - }% -}% - - -% \pgf@lib@shapesstaranchor -% -% Used internally to calculate inner point and -% outer point anchor positions 'on line'. -% -\def\pgf@lib@shapesstaranchor#1{% - % - % Redefine stuff for ease of use. - % - \pgf@x\points% - \c@pgf@counta\pgf@x% - \divide\c@pgf@counta65536\relax% - \edef\points{\the\c@pgf@counta}% - \pgf@x\rotate% - \edef\rotate{\pgf@sys@tonumber{\pgf@x}}% - \pgf@x\pointratio% - \edef\pointratio{\pgf@sys@tonumber{\pgf@x}}% - % - % Caculate radii. - % - \pgf@x\innerpointradius% - \edef\innerradius{\the\pgf@x}% - \pgf@xa\pointheight\relax% - \ifdim\pgf@xa<0pt\relax% - \pgf@x\pointratio\pgf@x% - \else% - \advance\pgf@x\pgf@xa% - \fi% - \pgf@xb\pgf@x% - \pgf@xc\minimumsize\relax% - \ifdim\pgf@x<.5\pgf@xc% - \pgf@x.5\pgf@xc% - \fi% - \edef\outerradius{\the\pgf@x}% - \ifdim\pgf@x>\pgf@xb% - \ifdim\pgf@xa<0pt\relax% - \pgfmathreciprocal{\pointratio}% - \pgf@xc\pgfmathresult\pgf@x\relax% - \edef\innerradius{\the\pgf@xc}% - \else% - \pgf@xc\pgf@x\relax% - \advance\pgf@xc-\pgf@xb% - \edef\innerradius{\the\pgf@xc}% - \fi% - \fi% - % - % Add the outer sep. - % - \pgf@xa\outersep% - \pgf@x\outerradius\relax% - \advance\pgf@x\pgf@xa% - \edef\outerradius{\the\pgf@x}% - \pgf@x\innerradius\relax% - \advance\pgf@x\pgf@xa% - \edef\innerradius{\the\pgf@x}% - % - % Calculate the angle. - % - \c@pgf@counta\points% - \pgf@x180pt\relax% - \divide\pgf@x\c@pgf@counta% - \c@pgf@counta#1\relax% - \advance\c@pgf@counta-1\relax% - \multiply\pgf@x\c@pgf@counta% - \pgf@xa\rotate pt\relax% - \advance\pgf@x\pgf@xa% - \advance\pgf@x90pt\relax% - \edef\starangle{\the\pgf@x}% - \ifodd\c@pgf@counta% - \let\starradius\innerradius% - \else% - \let\starradius\outerradius% - \fi% - \pgfpointadd{\centerpoint}% - {\pgfpointpolar{\starangle}{\starradius}}% -}% - - -% \pgfsetpolygonsides -% -% Set the number of sides on a polygon. -% -\def\pgfsetpolygonsides#1{% - \pgfmathsetcounter{pgf@counta}{#1}% - \edef\pgfpolygonsides{\the\c@pgfmath@counta}} -\pgfsetpolygonsides{6} - -% \pgfsetpolygonrotate -% -% Set the angle of rotation of the polygon -% border. This can be decimal. -% -\def\pgfsetpolygonrotate#1{% - \pgfmathparse{#1}% - \edef\pgfpolygonrotate{\pgfmathresult}}% -\pgfsetpolygonrotate{0} - - -% Regular polygon shape. -% -% -\pgfdeclareshape{regular polygon}{% - % - % Saved dimensions. - % - \saveddimen{\sides}{\pgf@x\pgfpolygonsides pt}% - \saveddimen{\rotate}{\pgf@x\pgfpolygonrotate pt}% - \saveddimen{\minimumsize}{% - \pgfmathsetlength\pgf@x{\pgfshapeminwidth}% - \pgfmathsetlength\pgf@y{\pgfshapeminheight}% - \ifdim\pgf@y>\pgf@x% - \pgf@x\pgf@y% - \fi}% - \saveddimen{\outersep}{% - \pgfmathsetlength\pgf@x{\pgfshapeouterxsep}% - \pgfmathsetlength\pgf@y{\pgfshapeouterysep}% - \ifdim\pgf@y>\pgf@x% - \pgf@x\pgf@y% - \fi}% - \saveddimen{\radius}{% - % - % The radius calculated here is the radius of the circle which - % can safely encompass the node textbox. This corresponds to the - % distance from the centre of the polygon to the mid-point of the - % of the sides of the polygon. The desired radius for the corners - % of the polygon has to calculated `on-line' as the saved dimen - % \sides is not available here. - % - \pgfmathsetlength\pgf@x{\pgfshapeinnerxsep}% - \advance\pgf@x.5\wd\pgfnodeparttextbox% - \pgfmathsetlength\pgf@y{\pgfshapeinnerysep}% - \advance\pgf@y.5\ht\pgfnodeparttextbox% - \ifdim\pgf@y>\pgf@x% - \pgf@x\pgf@y% - \fi% - \pgfmathveclen@{\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@x}}% - \pgf@x\pgfmathresult pt\relax% - }% - - % - % Saved anchors. - % - \savedanchor{\centerpoint}{% - \pgf@x.5\wd\pgfnodeparttextbox% - \pgf@y.5\ht\pgfnodeparttextbox% - \advance\pgf@y-.5\dp\pgfnodeparttextbox% - }% - - % - % Other anchors. - % - \anchor{center}{\centerpoint}% - \anchor{mid}{\centerpoint\pgfmathsetlength\pgf@y{.5ex}}% - \anchor{base}{\centerpoint\pgf@y=0pt}% - \anchor{north}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+0pt}{+\radius}}}% - \anchor{south}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+0pt}{+-\radius}}}% - \anchor{east}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+\radius}{+0pt}}}% - \anchor{west}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+-\radius}{+0pt}}}% - \anchor{north east}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+\radius}{+\radius}}}% - \anchor{north west}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+-\radius}{+\radius}}}% - \anchor{south east}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+\radius}{+-\radius}}}% - \anchor{south west}{\csname pgf@anchor@regular polygon@border\endcsname{\pgfpoint{+-\radius}{+-\radius}}}% - - % - % Background path. - % - \backgroundpath{% - % - % Redefine some stuff for ease of use. - % - \pgf@x\sides% - \c@pgf@counta\pgf@x% - \divide\c@pgf@counta65536\relax% - \edef\sides{\the\c@pgf@counta}% - \pgf@x\rotate% - \edef\rotate{\pgf@sys@tonumber{\pgf@x}}% - % - % Get the inner angle. - % - \pgf@y360pt\relax% - \divide\pgf@y\sides% - \edef\polygonanglestep{\the\pgf@y}% - % - % Now recalculate the polygon *corner* radius. - % - \pgf@y.5\pgf@y% - \pgfmathcos@{\pgf@sys@tonumber{\pgf@y}}% - \pgfmathreciprocal@{\pgfmathresult}% - \pgf@x\radius\relax% - \pgf@x\pgfmathresult\pgf@x% - \pgf@xa\minimumsize\relax% - \ifdim\pgf@x<.5\pgf@xa% - \pgf@x.5\pgf@xa% - \fi% - \edef\polygonradius{\the\pgf@x}% - % - % Every polygon is drawn so that a side is at the bottom... - % - \pgf@x90pt\relax% - \ifodd\sides% - \else% - \advance\pgf@x-\pgf@y% - \fi% - % - % ...unless rotation is applied. - % - \pgf@xa\rotate pt\relax% - \advance\pgf@x\pgf@xa% - \edef\polygonangle{\the\pgf@x}% - % - % Move to first point. - % - \pgfpathmoveto{% - \pgfpointadd{\centerpoint}% - {\pgfpointpolar{+\polygonangle}{+\polygonradius}}% - }% - \pgfmathloop% - % - % Create anchors. Manually \xdef as \gdef is normally used by \anchor. - % - \expandafter\xdef\csname pgf@anchor@regular polygon@corner\space\pgfmathcounter\endcsname{% - \noexpand\pgf@lib@shapescorneranchor{\pgfmathcounter}% - }% - \expandafter\xdef\csname pgf@anchor@regular polygon@side\space\pgfmathcounter\endcsname{% - \noexpand\pgf@lib@shapessideanchor{\pgfmathcounter}% - }% - \ifnum\pgfmathcounter=\sides\relax% Stop. - \else% - \pgf@x\polygonangle\relax% - \advance\pgf@x\polygonanglestep\relax% - \edef\polygonangle{\the\pgf@x}% - \pgfpathlineto{% - \pgfpointadd{\centerpoint}% - {\pgfpointpolar{+\polygonangle}{+\polygonradius}}% - }% - \repeatpgfmathloop% - \pgfpathclose% - }% - - % - % Anchor border. - % - \anchorborder{% - % - % Save the external point. - % - \pgf@xa\pgf@x% - \pgf@ya\pgf@y% - \centerpoint% - \advance\pgf@xa\pgf@x% - \advance\pgf@ya\pgf@y% - \edef\externalx{\the\pgf@xa}% - \edef\externaly{\the\pgf@ya}% - \pgf@process{\pgfpointdiff{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}}% - % - % Approximate the angle of the external point... - % - \pgf@xa\pgf@x% - \pgf@ya\pgf@y% - \pgf@xb\pgf@x% - \pgf@yb\pgf@y% - \ifdim\pgf@xa<0pt\relax% - \pgf@xa-\pgf@xa% - \fi% - \ifdim\pgf@ya<0pt\relax% - \pgf@ya-\pgf@ya% - \fi% - \ifdim\pgf@ya>\pgf@xa% - \pgf@x\pgf@xa% - \pgf@y\pgf@ya% - \else% - \pgf@x\pgf@ya% - \pgf@y\pgf@xa% - \fi% - \ifdim\pgf@y=0pt\relax% - \pgf@x0pt% - \else% - \pgfmathreciprocal@{\pgf@sys@tonumber{\pgf@y}}% - \pgf@x\pgfmathresult\pgf@x% - \fi% - \multiply\pgf@x1000\relax% - \afterassignment\pgfmath@gobbletilpgfmath@% - \expandafter\c@pgf@counta\the\pgf@x\relax\pgfmath@% - \expandafter\pgf@x\csname pgfmath@atan@\the\c@pgf@counta\endcsname pt\relax% - \ifdim\pgfmath@ya>\pgfmath@xa\relax% - \pgf@x-\pgf@x% - \advance\pgf@x90pt% - \fi% - \ifdim\pgf@xb<0pt% - \ifdim\pgf@yb>0pt% - \pgf@x-\pgf@x% - \fi% - \advance\pgf@x180pt\relax% - \else% - \ifdim\pgf@yb<0pt% - \pgf@x-\pgf@x% - \advance\pgf@x360pt\relax% - \fi\fi% - % - % ...(redefine stuff for ease of use)... - % - \pgf@y\sides% - \c@pgf@counta\pgf@y% - \divide\c@pgf@counta65536\relax% - \edef\sides{\the\c@pgf@counta}% - \pgf@y\rotate% - \edef\rotate{\pgf@sys@tonumber{\pgf@y}}% - % - % ...now adjust angle, for the number of polygon sides... - % - \advance\pgf@x-90pt\relax% - \pgf@xa180pt\relax% - \divide\pgf@xa\sides% - % - % ...and for if the there is an even number of sides... - % - \ifodd\sides% - \else% - \advance\pgf@x\pgf@xa% - \fi% - \ifdim\pgf@x<0pt\relax% - \advance\pgf@x360pt\relax% - \fi% - % - % ...and also for rotation. - % - \advance\pgf@x-\rotate pt\relax% - \ifdim\pgf@x<0pt\relax% - \advance\pgf@x360pt\relax% - \fi% - % - % Now, locate the start and end points on the polygon border segment... - % - \c@pgf@counta\sides\relax% - \pgf@y360pt\relax% - \divide\pgf@y\c@pgf@counta\relax% - \pgfmathreciprocal@{\pgf@sys@tonumber{\pgf@y}}% - \pgf@x\pgfmathresult\pgf@x% - \afterassignment\pgfmath@gobbletilpgfmath@% - \expandafter\c@pgf@counta\the\pgf@x\relax\pgfmath@% - % - % ...and hence, the start and end angles of the polygon border segment. - % - \pgf@x\pgf@y% - \multiply\pgf@x\c@pgf@counta% - \advance\pgf@x90pt% - \ifodd\sides% - \else% - \advance\pgf@x-\pgf@xa% - \fi% - \advance\pgf@x\rotate pt\relax% - \edef\firstangle{\the\pgf@x}% - \advance\c@pgf@counta1\relax% - \pgf@x\pgf@y% - \multiply\pgf@x\c@pgf@counta% - \advance\pgf@x\rotate pt\relax% - \advance\pgf@x90pt% - \ifodd\sides% - \else% - \advance\pgf@x-\pgf@xa% - \fi% - \edef\secondangle{\the\pgf@x}% - % - % Get the inner angle. - % - \pgf@y360pt\relax% - \divide\pgf@y\sides% - % - % Now recalculate the polygon *corner* radius... - % - \pgf@y.5\pgf@y% - \pgfmathcos@{\pgf@sys@tonumber{\pgf@y}}% - \pgfmathreciprocal@{\pgfmathresult}% - \pgf@x\radius\relax% - \pgf@x\pgfmathresult\pgf@x% - \edef\polygonradius{\the\pgf@x}% - % - % ...and add the outer sep to the corner radius... - % - \pgf@xa\minimumsize\relax% - \ifdim\pgf@x<.5\pgf@xa% - \pgf@x.5\pgf@xa% - \fi% - \pgf@xa\outersep\relax% - \advance\pgf@x\pgf@xa% - \edef\radius{\the\pgf@x}% - % - % ...and calculate the point on the intersection of - % the line from the external point to \centerpoint and - % the segment of the star border. - % - \pgfpointintersectionoflines{\centerpoint}{\pgfpoint{+\externalx}{+\externaly}}% - {% - \pgfpointadd{\centerpoint}% - {\pgfpointpolar{+\firstangle}{+\radius}}% - }% - {% - \pgfpointadd{\centerpoint}% - {\pgfpointpolar{+\secondangle}{+\radius}}% - }% - }% -}% - - -% \pgf@lib@shapespolygoncorneranchor -% -% Used internally to calculate corner anchor positions. -% -\def\pgf@lib@shapescorneranchor#1{% - % - % Redefine stuff for ease of use. - % - \pgf@y\sides% - \c@pgf@counta\pgf@y% - \divide\c@pgf@counta65536\relax% - \edef\sides{\the\c@pgf@counta}% - \pgf@y\rotate% - \edef\rotate{\pgf@sys@tonumber{\pgf@y}}% - % - % Get the inner angle. - % - \pgf@y360pt\relax% - \divide\pgf@y\sides\relax% - \edef\polgonanglestep{\pgf@sys@tonumber{\pgf@y}}% - % - % Recalculate the polygon corner radius... - % - \pgf@y.5\pgf@y% - \pgfmathcos@{\pgf@sys@tonumber{\pgf@y}}% - \pgfmathreciprocal@{\pgfmathresult}% - \pgf@x\radius\relax% - \pgf@x\pgfmathresult\pgf@x% - \edef\polygonradius{\the\pgf@x}% - % - % ...adjust for minimum size... - % - \pgf@xa\minimumsize\relax% - \ifdim\pgf@x<.5\pgf@xa% - \pgf@x.5\pgf@xa% - \fi% - % - % ...and add the outer sep. - % - \pgf@xa\outersep\relax% - \advance\pgf@x\pgf@xa% - \edef\polygonradius{\the\pgf@x}% - % - % Calculate the angle. - % - \c@pgf@counta#1\relax% - \advance\c@pgf@counta-1\relax% - \pgf@x2.0\pgf@y% - \multiply\pgf@x\c@pgf@counta% - \pgf@xa\rotate pt\relax% - \advance\pgf@x\pgf@xa% - \advance\pgf@x90pt\relax% - \ifodd\sides% - \else% - \advance\pgf@x-\pgf@y% - \fi% - \edef\polygonangle{\the\pgf@x}% - \pgfpointadd{\centerpoint}% - {\pgfpointpolar{\polygonangle}{\polygonradius}}% -}% - -% \pgf@lib@shapespolygonsideanchor -% -% Used internally to calculate side anchor positions. -% -\def\pgf@lib@shapessideanchor#1{% - % - % Redefine stuff for ease of use. - % - \pgf@y\sides% - \c@pgf@counta\pgf@y% - \divide\c@pgf@counta65536\relax% - \edef\sides{\the\c@pgf@counta}% - \pgf@y\rotate% - \edef\rotate{\pgf@sys@tonumber{\pgf@y}}% - % - % Get the inner angle. - % - \pgf@y360pt\relax% - \divide\pgf@y\sides\relax% - \edef\polygonanglestep{\the\pgf@y}% - % - % Recalculate the polygon corner radius... - % - \pgf@y.5\pgf@y% - \pgfmathcos@{\pgf@sys@tonumber{\pgf@y}}% - \pgfmathreciprocal@{\pgfmathresult}% - \pgf@x\radius\relax% - \pgf@x\pgfmathresult\pgf@x% - % - % ...adjust for minimum size... - % - \pgf@xa\minimumsize\relax% - \ifdim\pgf@x<.5\pgf@xa% - \pgf@x.5\pgf@xa% - \fi% - % - % and add the outer sep. - % - \pgf@xa\outersep\relax% - \advance\pgf@x\pgf@xa% - \edef\polygonradius{\the\pgf@x}% - % - % Calculate the angle. - % - \pgf@y\polygonanglestep% - \c@pgf@counta#1\relax% - \advance\c@pgf@counta-1\relax% - \pgf@x\polygonanglestep pt\relax% - \multiply\pgf@x\c@pgf@counta% - \pgf@xa\rotate pt\relax% - \advance\pgf@x\pgf@xa% - \advance\pgf@x90pt\relax% - \ifodd\sides% - \else% - \advance\pgf@x-.5\pgf@y% - \fi% - \edef\firstangle{\the\pgf@x}% - \advance\pgf@x\pgf@y% - \edef\secondangle{\the\pgf@x}% - \pgfpointlineattime{0.5}{% - \pgfpointadd{\centerpoint}{\pgfpointpolar{+\firstangle}{+\polygonradius}}% - }{% - \pgfpointadd{\centerpoint}{\pgfpointpolar{+\secondangle}{+\polygonradius}}% - }% -}% - - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.misc.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.misc.code.tex deleted file mode 100644 index 6dcd610f612..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.misc.code.tex +++ /dev/null @@ -1,70 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.misc.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $ - - -\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} - \foregroundpath{ - % store lower right in xa/ya and upper right in xb/yb - \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y - \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y - \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}} - \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yb}} - \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@yb}} - \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@ya}} - } -} - - -\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} - \foregroundpath{ - \pgfpathmoveto{\southwest} - \pgfpathlineto{\northeast} - } -} - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.multipart.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.multipart.code.tex deleted file mode 100644 index 2299d9520c8..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.multipart.code.tex +++ /dev/null @@ -1,165 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.multipart.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $ - -\newbox\pgfnodepartlowerbox - -% -% A circle that is split in the middle into an upper and a lower part. -% -% This node consists of two parts: The upper (main) part is shown in -% the upper half of the circle. The second part is the (optional) -% lower part. -% -% Parts: text, lower - -\pgfdeclareshape{circle split} -{ - % - % Node parts - % - \nodeparts{text,lower} - - % - % Anchors - % - \savedanchor\centerpoint{% - \pgf@x=.5\wd\pgfnodeparttextbox% - \pgfmathsetlength{\pgf@y}{\pgfshapeinnerysep}% - \pgf@y=-\pgf@y% - \advance\pgf@y by-\dp\pgfnodeparttextbox% - \advance\pgf@y by-.5\pgflinewidth% - }% - \savedanchor\loweranchor{% - \pgf@x=-.5\wd\pgfnodepartlowerbox% - \advance\pgf@x by.5\wd\pgfnodeparttextbox% - \pgfmathsetlength{\pgf@y}{\pgfshapeinnerysep}% - \pgf@y=-2\pgf@y% - \advance\pgf@y by-\ht\pgfnodepartlowerbox% - \advance\pgf@y by-.5\pgflinewidth% - \advance\pgf@y by-\dp\pgfnodeparttextbox% - \advance\pgf@y by-.5\pgflinewidth% - } - - \saveddimen\radius{% - % - % Caculate ``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% - \pgfmathsetlength\pgf@yb{\pgfshapeinnerysep}% - \advance\pgf@ya by2\pgf@yb% - % - % Caculate ``width radius'' - % - \pgf@xa=.5\wd\pgfnodeparttextbox% - \ifdim\pgf@xa<.5\wd\pgfnodepartlowerbox% - \pgf@xa=.5\wd\pgfnodepartlowerbox% - \fi% - \pgfmathsetlength\pgf@xb{\pgfshapeinnerxsep}% - \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% - \ifnum\c@pgf@counta=0\relax% - \else% - \divide\c@pgf@counta by 255\relax% - \pgf@xa=16\pgf@xa\relax% - \divide\pgf@xa by\c@pgf@counta% - \pgf@xa=16\pgf@xa\relax% - \fi% - \else% - \c@pgf@counta=\pgf@y% - \ifnum\c@pgf@counta=0\relax% - \else% - \divide\c@pgf@counta by 255\relax% - \pgf@ya=16\pgf@ya\relax% - \divide\pgf@ya by\c@pgf@counta% - \pgf@xa=16\pgf@ya\relax% - \fi% - \fi% - \pgf@x=\pgf@xa% - % - % If necessary, adjust radius so that the size requirements are - % met: - % - \pgfmathsetlength{\pgf@xb}{\pgfshapeminwidth}% - \pgfmathsetlength{\pgf@yb}{\pgfshapeminheight}% - \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}{\pgfshapeouterxsep}% - \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}% - \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} - - % - % Background path - % - \inheritbackgroundpath[from=circle] - \beforebackgroundpath{ - \pgfutil@tempdima=\radius% - \pgfmathsetlength{\pgf@xb}{\pgfshapeouterxsep}% - \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}% - \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% - \pgfsetshortenstart{0pt}% - \pgfsetshortenend{0pt}% - \pgfsetarrows{-}% - \pgfpathmoveto{\pgfpointadd{\centerpoint}{\pgfqpoint{-1\pgfutil@tempdima}{0pt}}}% - \pgfpathlineto{\pgfpointadd{\centerpoint}{\pgfqpoint{\pgfutil@tempdima}{0pt}}}% - \pgfusepath{stroke}% - } -} - - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.symbols.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.symbols.code.tex deleted file mode 100644 index 50ee3ec9c6b..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryshapes.symbols.code.tex +++ /dev/null @@ -1,50 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryshapes.symbols.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $ - -\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] - \foregroundpath{ - \centerpoint% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \pgfutil@tempdima=\radius% - \pgfmathsetlength{\pgf@xb}{\pgfshapeouterxsep}% - \pgfmathsetlength{\pgf@yb}{\pgfshapeouterysep}% - \ifdim\pgf@xb<\pgf@yb% - \advance\pgfutil@tempdima by-\pgf@yb% - \else% - \advance\pgfutil@tempdima by-\pgf@xb% - \fi% - \pgfpathmoveto{\pgfpointadd{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\pgfqpoint{-0.707107\pgfutil@tempdima}{-0.707107\pgfutil@tempdima}}} - \pgfpathlineto{\pgfpointadd{\pgfqpoint{\pgf@xc}{\pgf@yc}}{\pgfqpoint{0.707107\pgfutil@tempdima}{0.707107\pgfutil@tempdima}}} - } -} - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex deleted file mode 100644 index dde1a6db64c..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarysnakes.code.tex +++ /dev/null @@ -1,424 +0,0 @@ -% 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. -% -% 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.15 2007/03/09 17:49:32 tantau Exp $ - - -\newdimen\pgfsnakesegmentamplitude -\newdimen\pgfsnakesegmentlength -\def\pgfsnakesegmentangle{45} -\def\pgfsnakesegmentobjectlength{\pgfsnakesegmentamplitude} -\def\pgfsnakesegmentaspect{0.5} - -\pgfsnakesegmentlength=10pt -\pgfsnakesegmentamplitude=2.5pt - - - -% snake snake -% -% This snake produces a hopefully optically pleasing squiggly snake. -% -% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentlength - -\pgfdeclaresnake{snake}{initial} -{ - \state{initial}[switch if less than=+.625\pgfsnakesegmentlength to final, - width=+.3125\pgfsnakesegmentlength, - next state=down] - { - \pgfpathcurveto - {\pgfqpoint{.125\pgfsnakesegmentlength}{0pt}} - {\pgfqpoint{.1875\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}} - {\pgfqpoint{.3125\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}} - } - \state{down}[switch if less than=+.8125\pgfsnakesegmentlength to end down, - width=+.5\pgfsnakesegmentlength, - next state=up] - { - \pgfpathcosine{\pgfqpoint{.25\pgfsnakesegmentlength}{-1\pgfsnakesegmentamplitude}} - \pgfpathsine{\pgfqpoint{.25\pgfsnakesegmentlength}{-1\pgfsnakesegmentamplitude}} - } - \state{up}[switch if less than=+.8125\pgfsnakesegmentlength to end up, - width=+.5\pgfsnakesegmentlength, - next state=down] - { - \pgfpathcosine{\pgfqpoint{.25\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}} - \pgfpathsine{\pgfqpoint{.25\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}} - } - \state{end down}[width=+.3125\pgfsnakesegmentlength, - next state=final] - { - \pgfpathcurveto - {\pgfqpoint{.125\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}} - {\pgfqpoint{.1875\pgfsnakesegmentlength}{0pt}} - {\pgfqpoint{.3125\pgfsnakesegmentlength}{0pt}} - } - \state{end up}[width=+.3125\pgfsnakesegmentlength, - next state=final] - { - \pgfpathcurveto - {\pgfqpoint{.125\pgfsnakesegmentlength}{-\pgfsnakesegmentamplitude}} - {\pgfqpoint{.1875\pgfsnakesegmentlength}{0pt}} - {\pgfqpoint{.3125\pgfsnakesegmentlength}{0pt}} - } - \state{final} - { \pgfpathlineto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} } -} - - - - -% zigzag snake -% -% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentlength - -\pgfdeclaresnake{zigzag}{up} -{ - \state{up}[width=+.5\pgfsnakesegmentlength,% - next state=down] - { - \pgfpathlineto{\pgfqpoint{.25\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}} - \pgfpathlineto{\pgfqpoint{.5\pgfsnakesegmentlength}{0pt}} - } - \state{down}[width=+.5\pgfsnakesegmentlength,% - next state=up] - { - \pgfpathlineto{\pgfqpoint{.25\pgfsnakesegmentlength}{-\pgfsnakesegmentamplitude}} - \pgfpathlineto{\pgfqpoint{.5\pgfsnakesegmentlength}{0pt}} - } - \state{final} - { \pgfpathlineto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} } -} - - - -% saw snake -% -% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentlength - -\pgfdeclaresnake{saw}{initial} -{ - \state{initial}[width=+\pgfsnakesegmentlength] - { - \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}} - \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentlength}{0pt}} - } - \state{final} - { - \pgfpathlineto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} - } -} - - -% coil snake -% -% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentlength, - -\pgfdeclaresnake{coil}{coil} -{ - \state{coil}[switch if less than=% - 1.5\pgfsnakesegmentlength+% - \pgfsnakesegmentaspect\pgfsnakesegmentamplitude+% - \pgfsnakesegmentaspect\pgfsnakesegmentamplitude to last, - width=+\pgfsnakesegmentlength] - { - \pgfpathcurveto - {\pgfpoint@oncoil{0 }{ 0.555}{1}} - {\pgfpoint@oncoil{0.445}{ 1 }{2}} - {\pgfpoint@oncoil{1 }{ 1 }{3}} - \pgfpathcurveto - {\pgfpoint@oncoil{1.555}{ 1 }{4}} - {\pgfpoint@oncoil{2 }{ 0.555}{5}} - {\pgfpoint@oncoil{2 }{ 0 }{6}} - \pgfpathcurveto - {\pgfpoint@oncoil{2 }{-0.555}{7}} - {\pgfpoint@oncoil{1.555}{-1 }{8}} - {\pgfpoint@oncoil{1 }{-1 }{9}} - \pgfpathcurveto - {\pgfpoint@oncoil{0.445}{-1 }{10}} - {\pgfpoint@oncoil{0 }{-0.555}{11}} - {\pgfpoint@oncoil{0 }{ 0 }{12}} - } - \state{last}[width=.5\pgfsnakesegmentlength+% - \pgfsnakesegmentaspect\pgfsnakesegmentamplitude+% - \pgfsnakesegmentaspect\pgfsnakesegmentamplitude,next state=final] - { - \pgfpathcurveto - {\pgfpoint@oncoil{0 }{ 0.555}{1}} - {\pgfpoint@oncoil{0.445}{ 1 }{2}} - {\pgfpoint@oncoil{1 }{ 1 }{3}} - \pgfpathcurveto - {\pgfpoint@oncoil{1.555}{ 1 }{4}} - {\pgfpoint@oncoil{2 }{ 0.555}{5}} - {\pgfpoint@oncoil{2 }{ 0 }{6}} - } - \state{final} - { - \pgfpathlineto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} - } -} - -\def\pgfpoint@oncoil#1#2#3{% - \pgf@x=#1\pgfsnakesegmentamplitude% - \pgf@x=\pgfsnakesegmentaspect\pgf@x% - \pgf@y=#2\pgfsnakesegmentamplitude% - \pgf@xa=0.083333333333\pgfsnakesegmentlength% - \advance\pgf@x by#3\pgf@xa% -} - - -% bumps snake -% -% Parameters: \pgfsnakesegmentamplitude, \pgfsnakesegmentlength - -\pgfdeclaresnake{bumps}{initial} -{ - \state{initial}[width=+.5\pgfsnakesegmentlength] - { - \pgfpathcurveto - {\pgfqpoint{0pt}{.555\pgfsnakesegmentamplitude}} - {\pgfqpoint{0.11125\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}} - {\pgfqpoint{.25\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}} - \pgfpathcurveto - {\pgfqpoint{.38875\pgfsnakesegmentlength}{\pgfsnakesegmentamplitude}} - {\pgfqpoint{.5\pgfsnakesegmentlength}{.5\pgfsnakesegmentamplitude}} - {\pgfqpoint{.5\pgfsnakesegmentlength}{0\pgfsnakesegmentamplitude}} - } - \state{final} - { - \pgfpathlineto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} - } -} - - - -% expanding waves snake -% -% Parameters: \pgfsnakesegmentangle, \pgfsnakesegmentlength - -\pgfdeclaresnake{expanding waves}{initial} -{ - \state{initial}[width=+\pgfsnakesegmentlength,next state=wave] - {} - - \state{wave}[switch if less than=+\pgfsnakesegmentlength to last, - width=+\pgfsnakesegmentlength] - { - \pgfpathmoveto{ - \pgfpointadd - {\pgfqpoint{-\pgfsnakecompleteddistance}{0pt}}% - {\pgfpointpolar{\pgfsnakesegmentangle}{+\pgfsnakecompleteddistance}}}% - \pgfpatharc{\pgfsnakesegmentangle}{-\pgfsnakesegmentangle}{+\pgfsnakecompleteddistance}% - } - \state{last}[width=+0pt,next state=final] - { - \pgfpathmoveto{ - \pgfpointadd - {\pgfqpoint{-\pgfsnakecompleteddistance}{0pt}}% - {\pgfpointpolar{\pgfsnakesegmentangle}{+\pgfsnakecompleteddistance}}}% - \pgfpatharc{\pgfsnakesegmentangle}{-\pgfsnakesegmentangle}{+\pgfsnakecompleteddistance}% - } - \state{final} - { - \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} - } -} - - - -% waves snake -% -% Parameters: \pgfsnakesegmentangle, \pgfsnakesegmentlength - -\pgfdeclaresnake{waves}{wave} -{ - \state{wave}[width=\pgfsnakesegmentlength] - { - \pgftransformxshift{+\pgfsnakesegmentlength} - \pgfpathmoveto{ - \pgfpointadd - {\pgfqpoint{-\pgfsnakesegmentobjectlength}{0pt}}% - {\pgfpointpolar{\pgfsnakesegmentangle}{+\pgfsnakesegmentobjectlength}}}% - \pgfpatharc{\pgfsnakesegmentangle}{-\pgfsnakesegmentangle}{+\pgfsnakesegmentobjectlength}% - } - \state{final} - { - \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} - } -} - - -% triangle snakes -% -% Parameters: \pgfsnakesegmentlength, \pgfsnakeobjectsize, \pgfsnakesegmentamplitude - -\pgfdeclaresnake{triangles}{triangle} -{ - \state{triangle}[switch if less than=+\pgfsnakesegmentlength to last, - width=+\pgfsnakesegmentlength] - { - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}} - \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{0pt}} - \pgfpathlineto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}} - \pgfpathclose - } - \state{last}[width=+\pgfsnakesegmentobjectlength,next state=final] - { - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}} - \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{0pt}} - \pgfpathlineto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}} - \pgfpathclose - } - \state{final} - { - \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} - } -} - - - -% crosses snakes -% -% Parameters: \pgfsnakesegmentlength, \pgfsnakeobjectsize, \pgfsnakesegmentamplitude - -\pgfdeclaresnake{crosses}{crosses} -{ - \state{crosses}[switch if less than=+\pgfsnakesegmentlength to last, - width=+\pgfsnakesegmentlength] - { - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}} - \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{-\pgfsnakesegmentamplitude}} - \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}} - \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{\pgfsnakesegmentamplitude}} - } - \state{last}[width=\pgfsnakesegmentobjectlength,next state=final] - { - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}} - \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{-1\pgfsnakesegmentamplitude}} - \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}} - \pgfpathlineto{\pgfqpoint{\pgfsnakesegmentobjectlength}{\pgfsnakesegmentamplitude}} - } - \state{final} - { - \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} - } -} - - - -% ticks snakes -% -% Parameters: \pgfsnakesegmentlength, \pgfsnakesegmentamplitude - -\pgfdeclaresnake{ticks}{ticks} -{ - \state{ticks}[width=+\pgfsnakesegmentlength] - { - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}} - \pgfpathlineto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}} - } - \state{final} - { - \pgfpathmoveto{\pgfqpoint{0pt}{\pgfsnakesegmentamplitude}} - \pgfpathlineto{\pgfqpoint{0pt}{-\pgfsnakesegmentamplitude}} - \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} - } -} - - -% border snake -% -% Parameters: \pgfsnakesegmentlength, \pgfsnakesegmentamplitude, \pgfsnakesegmentangle - -\pgfdeclaresnake{border}{tick} -{ - \state{tick}[switch if less than=+\pgfsnakesegmentlength to last, - width=+\pgfsnakesegmentlength] - { - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpointpolar{\pgfsnakesegmentangle}{+\pgfsnakesegmentamplitude}} - } - \state{last}[width=+\pgfsnakesegmentamplitude,next state=final] - { - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpointpolar{\pgfsnakesegmentangle}{+\pgfsnakesegmentamplitude}} - } - \state{final} - { - \pgfpathmoveto{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} - } -} - - - - -% brace snakes -% -% Parameters: \pgfsnakesegmentamplitude - -\pgfdeclaresnake{brace}{brace} -{ - \state{brace}[width=+\pgfsnakeremainingdistance,next state=final] - { - \pgfpathmoveto{\pgfpointorigin} - \pgfpathcurveto - {\pgfqpoint{.15\pgfsnakesegmentamplitude}{.3\pgfsnakesegmentamplitude}} - {\pgfqpoint{.5\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}} - {\pgfqpoint{\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}} - { - \pgftransformxshift{+\pgfsnakesegmentaspect\pgfsnakeremainingdistance} - \pgfpathlineto{\pgfqpoint{-\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}} - \pgfpathcurveto - {\pgfqpoint{-.5\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}} - {\pgfqpoint{-.15\pgfsnakesegmentamplitude}{.7\pgfsnakesegmentamplitude}} - {\pgfqpoint{0\pgfsnakesegmentamplitude}{1\pgfsnakesegmentamplitude}} - \pgfpathcurveto - {\pgfqpoint{.15\pgfsnakesegmentamplitude}{.7\pgfsnakesegmentamplitude}} - {\pgfqpoint{.5\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}} - {\pgfqpoint{\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}} - } - { - \pgftransformxshift{+\pgfsnakeremainingdistance} - \pgfpathlineto{\pgfqpoint{-\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}} - \pgfpathcurveto - {\pgfqpoint{-.5\pgfsnakesegmentamplitude}{.5\pgfsnakesegmentamplitude}} - {\pgfqpoint{-.15\pgfsnakesegmentamplitude}{.3\pgfsnakesegmentamplitude}} - {\pgfqpoint{0pt}{0pt}} - } - } - \state{final} - {} -} - - - -% 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 - {\pgfqpoint{\pgfsnakesegmentaspect\pgfsnakeremainingdistance}{\pgfsnakesegmentamplitude}} - {\pgfpointadd{\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} - {\pgfqpoint{-\pgfsnakesegmentaspect\pgfsnakeremainingdistance}{\pgfsnakesegmentamplitude}}} - {\pgfqpoint{\pgfsnakeremainingdistance}{0pt}} - } - \state{final} - {} -} - - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikz3d.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikz3d.code.tex deleted file mode 100644 index d980b557feb..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikz3d.code.tex +++ /dev/null @@ -1,105 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikz3d.code.tex,v 1.3 2006/10/11 15:22:26 tantau Exp $ - - - -% New coordinate systems: - -\tikzdeclarecoordinatesystem{xyz cylindrical} -{% - \setkeys{tikzcskeys}{angle=0,radius=0,z=0,#1}% - \pgfpointcylindrical{\tikz@cs@angle}{\tikz@cs@radius}{\tikz@cs@z}% -} - -\tikzdeclarecoordinatesystem{xyz spherical} -{% - \setkeys{tikzcskeys}{angle=0,radius=0,latitude=0,longitude=0,#1}% - \pgfpointspherical{\tikz@cs@angle}{\tikz@cs@latitude}{\tikz@cs@radius}% -} - -\define@key{tikzcskeys}{longitude}{\def\tikz@cs@angle{#1}} -\define@key{tikzcskeys}{latitude}{\def\tikz@cs@latitude{#1}} - - -% Options for transforming into a plane: - -\tikzoption{plane origin}{\def\tikz@plane@origin{\tikz@scan@one@point\@firstofone#1}} -\tikzoption{plane x}{\def\tikz@plane@x{\tikz@scan@one@point\@firstofone#1}} -\tikzoption{plane y}{\def\tikz@plane@y{\tikz@scan@one@point\@firstofone#1}} - -\let\tikz@plane@origin=\pgfpointorigin -\def\tikz@plain@x{\pgfpointxy{1}{0}} -\def\tikz@plain@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 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 -} - - - -% Transformation code - -\def\tikz@canvas@is@plane{ - \pgf@process{\tikz@plane@x}% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\tikz@plane@y}% - \pgf@xb=\pgf@x% - \pgf@yb=\pgf@y% - \pgf@process{\tikz@plane@origin}% - \edef\pgf@marshal{\noexpand\tikz@addtransform{% - \noexpand\pgftransformtriangle - {\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}} - {\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}} - {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}} - \noexpand\pgftransformscale{0.035146}% - \noexpand\pgfsetxvec{\noexpand\pgfpoint{1cm}{0cm}}% - \noexpand\pgfsetyvec{\noexpand\pgfpoint{0cm}{1cm}}% - \noexpand\pgfsetzvec{\noexpand\pgfpoint{0cm}{0cm}}% - }}% - \pgf@marshal% -} - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzarrows.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzarrows.code.tex deleted file mode 100644 index 2ca988c5493..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzarrows.code.tex +++ /dev/null @@ -1,14 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzarrows.code.tex,v 1.2 2006/10/11 15:22:26 tantau Exp $ - -\usepgflibrary{arrows} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzautomata.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzautomata.code.tex deleted file mode 100644 index d30f8abb767..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzautomata.code.tex +++ /dev/null @@ -1,102 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzautomata.code.tex,v 1.3 2006/10/11 15:22:26 tantau Exp $ - - -% Styles for states: - -\tikzstyle{every state}= [] - -\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] - -\tikzstyle{accepting by arrow}= [after node path= -{ - { - [to path= - { - [->,double=none,every accepting by arrow] - -- - ([shift=(\tikz@accepting@angle:\tikz@accepting@distance)]\tikztostart.\tikz@accepting@angle) - node [shape=rectangle,anchor=\tikz@accepting@anchor] {\tikz@accepting@text} - }] - edge () - } -}] -\tikzstyle{every accepting by arrow}=[] -\tikzstyle{accepting by double}= [double,outer sep=.5\pgflinewidth+.3pt] % .3pt is half double width distance - -\tikzstyle{initial by arrow}= [after node path= -{ - { - [to path= - { - [->,double=none,every initial by arrow] - ([shift=(\tikz@initial@angle:\tikz@initial@distance)]\tikztostart.\tikz@initial@angle) - node [shape=rectangle,anchor=\tikz@initial@anchor] {\tikz@initial@text} - -- (\tikztostart)}] - edge () - } -}] -\tikzstyle{every initial by arrow}=[] - - -\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 distance}{\tikzaddafternodepathoption{\def\tikz@initial@distance{#1}}} -\tikzoption{accepting distance}{\tikzaddafternodepathoption{\def\tikz@initial@distance{#1}}} - -\def\tikz@initial@text{start} -\def\tikz@accepting@text{} - -\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@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@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] - -\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] - - -% Defaults: - -\tikzstyle{state}= [state without output] -\tikzstyle{accepting}= [accepting by double] -\tikzstyle{initial}= [initial by arrow] - - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzbackgrounds.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzbackgrounds.code.tex deleted file mode 100644 index 5ae08cdf634..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzbackgrounds.code.tex +++ /dev/null @@ -1,135 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzbackgrounds.code.tex,v 1.5 2007/04/11 13:04:15 tantau Exp $ - - -% Layers - -\pgfdeclarelayer{background} -\pgfsetlayers{background,main} - - -% 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] - -\define@key{tikz}{inner frame sep}{\def\tikz@framexsep{#1}\def\tikz@frameysep{#1}} -\define@key{tikz}{inner frame xsep}{\def\tikz@framexsep{#1}} -\define@key{tikz}{inner frame ysep}{\def\tikz@frameysep{#1}} -\def\tikz@framexsep{1ex} -\def\tikz@frameysep{1ex} - -\define@key{tikz}{outer frame sep}{\def\tikz@outerframexsep{#1}\def\tikz@outerframeysep{#1}} -\define@key{tikz}{outer frame xsep}{\def\tikz@outerframexsep{#1}} -\define@key{tikz}{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] - - - -% Showing background styles - -\tikzstyle{framed}= [style=show background rectangle] -\tikzstyle{gridded}= [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] - - -% Implementation - -\def\tikz@background@save{% - \ifx\tikz@bg@minx\@undefined% - \pgf@xb=\pgf@picminx% - \pgf@yb=\pgf@picminy% - \pgf@xc=\pgf@picmaxx% - \pgf@yc=\pgf@picmaxy% - \pgfmathsetlength{\pgf@x}{\tikz@framexsep}% - \pgfmathsetlength{\pgf@y}{\tikz@frameysep}% - \advance\pgf@xb by-\pgf@x% - \advance\pgf@yb by-\pgf@y% - \advance\pgf@xc by\pgf@x% - \advance\pgf@yc by\pgf@y% - \edef\tikz@bg@minx{\the\pgf@xb}% - \edef\tikz@bg@miny{\the\pgf@yb}% - \edef\tikz@bg@maxx{\the\pgf@xc}% - \edef\tikz@bg@maxy{\the\pgf@yc}% - \pgfmathsetlength{\pgf@x}{\tikz@outerframexsep}% - \pgfmathsetlength{\pgf@y}{\tikz@outerframeysep}% - \advance\pgf@xb by-\pgf@x% - \advance\pgf@yb by-\pgf@y% - \advance\pgf@xc by\pgf@x% - \advance\pgf@yc by\pgf@y% - \edef\tikz@bg@outerminx{\the\pgf@xb}% - \edef\tikz@bg@outerminy{\the\pgf@yb}% - \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/libraries/pgflibrarytikzcalendar.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcalendar.code.tex deleted file mode 100644 index ec8cc93531b..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcalendar.code.tex +++ /dev/null @@ -1,458 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzcalendar.code.tex,v 1.12 2007/03/09 17:49:32 tantau Exp $ - - -\pgfutil@usemodule{pgfcalendar} - - -% -% General options (these options affect all calendars typeset unsind \calendar): -% -% Start, end, and code executed for each current date -% - -\tikzoption{dates}{\tikz@lib@cal@parse#1\relax} -\def\tikz@lib@cal@parse#1to#2\relax{% - \def\tikz@lib@cal@start{#1} - \def\tikz@lib@cal@end{#2}% -} -\tikzoption{execute at begin day scope}{\expandafter\def\expandafter\tikz@atbegin@day\expandafter{\tikz@atbegin@day#1}} -\tikzoption{execute at end day scope}{% - \def\pgf@temp{#1}% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\tikz@atend@day% - \expandafter\expandafter\expandafter{\expandafter\pgf@temp\tikz@atend@day}} -\tikzoption{execute before day scope}{\expandafter\def\expandafter\tikz@before@day\expandafter{\tikz@before@day#1}} -\tikzoption{execute after day scope}{\expandafter\def\expandafter\tikz@after@day\expandafter{\tikz@after@day#1}} - -\let\tikz@atbegin@day=\pgfutil@empty -\let\tikz@atend@day=\pgfutil@empty -\let\tikz@before@day=\pgfutil@empty -\let\tikz@after@day=\pgfutil@empty - - - -% -% Options affecting some calendars: -% - -% -% Shifts and skips -% - -% Shift between days - -\tikzoption{day xshift}{\def\tikz@lib@cal@xshift{#1}} -\tikzoption{day yshift}{\def\tikz@lib@cal@yshift{#1}} - -\def\tikz@lib@cal@yshift{3ex} -\def\tikz@lib@cal@xshift{3.5ex} - - -% Shift between months - -\tikzoption{month xshift}{\def\tikz@lib@cal@month@xshift{#1}} -\tikzoption{month yshift}{\def\tikz@lib@cal@month@yshift{#1}} - -\def\tikz@lib@cal@month@yshift{9ex} -\def\tikz@lib@cal@month@xshift{9ex} - - - - -% Templates for typesetting days, month, years - -\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{month code}{\def\tikzmonthcode{#1}} -\tikzoption{month text}{\def\tikzmonthtext{#1}} -\tikzstyle{every month}=[] - -\tikzoption{year code}{\def\tikzyearcode{#1}} -\tikzoption{year text}{\def\tikzyeartext{#1}} -\tikzstyle{every year}=[] - -\def\tikzdaycode{\node[name=\pgfcalendarsuggestedname,every day]{\tikzdaytext};} -\def\tikzmonthcode{\node[every month]{\tikzmonthtext};} -\def\tikzyearcode{\node[every year]{\tikzyeartext};} - -\def\tikzdaytext{\%d-} -\def\tikzmonthtext{\%mt} -\def\tikzyeartext{\%y0} - - -% Internal option for storing the "width" of a calendar as a number of -% days - -\tikzoption{tikz@lib@cal@width}{\def\tikz@lib@cal@width{#1}} - -\def\tikz@lib@cal@width{1} - -% -% Days on a line -% - -\tikzstyle{day list downward}=[% - execute before day scope={ - \ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{} - {% - % On first of month, except when first date in calendar. - \pgfmathsetlength{\pgf@y}{\tikz@lib@cal@month@yshift}% - \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}=[% - execute before day scope={ - \ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{} - {% - % On first of month, except when first date in calendar. - \pgftransformyshift{\tikz@lib@cal@month@yshift}% - }% - }{}% - }, - execute after day scope={\pgftransformyshift\tikz@lib@cal@yshift}, - tikz@lib@cal@width=1 -] -\tikzstyle{day list right}=[% - execute before day scope={ - \ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{} - {% - % On first of month, except when first date in calendar. - \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}=[% - execute before day scope={ - \ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{} - {% - % On first of month, except when first date in calendar. - \pgfmathsetlength{\pgf@x}{\tikz@lib@cal@month@xshift} - \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... -] - - - -% -% Week list -% - -\tikzstyle{week list}=[% - execute before day scope={% - \ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{} - {% - % On first of month, except when first date in calendar. - \pgfmathsetlength{\pgf@y}{\tikz@lib@cal@month@yshift}% - \pgftransformyshift{-\pgf@y} - }% - }{}% - }, - execute at begin day scope={% - \pgfmathsetlength\pgf@x{\tikz@lib@cal@xshift}% - \pgf@x=\pgfcalendarcurrentweekday\pgf@x% - \pgftransformxshift{\pgf@x}% - }, - execute after day scope={% - \ifdate{Sunday}{% - \pgfmathsetlength{\pgf@y}{\tikz@lib@cal@yshift}% - \pgftransformyshift{-\pgf@y} - }{}% - }, - tikz@lib@cal@width=7 -] - - - -% -% Month list -% - -\tikzstyle{month list}=[% - execute before day scope={% - \ifdate{day of month=1}{\ifdate{equals=\pgfcalendarbeginiso}{} - {% - % On first of month, except when first date in calendar. - \pgfmathsetlength{\pgf@y}{\tikz@lib@cal@month@yshift}% - \pgftransformyshift{-\pgf@y} - }% - }{}% - \ifdate{day of month=1} - {% - \edef\tikz@lib@cal@month@list@start{\pgfcalendarcurrentweekday}% - }{}% - \ifdate{equals=\pgfcalendarbeginiso}% - {% - % Computer day of week for start of month - {% - \c@pgf@counta=\pgfcalendarcurrentjulian% - \advance\c@pgf@counta by-\pgfcalendarcurrentday% - \advance\c@pgf@counta by1\relax% - \pgfcalendarjuliantoweekday{\c@pgf@counta}{\c@pgf@countb}% - \xdef\pgf@temp{\the\c@pgf@countb}% - }% - \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% - \advance\pgf@xb by\tikz@lib@cal@month@list@start\pgf@xa% - \advance\pgf@xb by-\pgf@xa\relax% - \pgftransformxshift{\pgf@xb}% - }, - tikz@lib@cal@width=37 -] - - - - -% -% Month labels -% - -\tikzstyle{month label left}=[% - execute before day scope={\ifdate{day of month=1}{\tikzmonthcode}{}}, - set style={{every month}+=[anchor=base east,xshift=-3.5ex]} -] - -\tikzstyle{month label left vertical}=[% - execute before day scope={\ifdate{day of month=1}{\tikzmonthcode}{}}, - set style={{every month}+=[anchor=base east,xshift=-4.5ex,yshift=2.25ex,rotate=90]} -] - -\tikzstyle{month label right}=[% -execute before day scope={\ifdate{day of month=1}{% - {% - \pgfmathsetlength{\pgf@xa}{\tikz@lib@cal@xshift}% - \pgftransformxshift{\tikz@lib@cal@width\pgf@xa}% - \pgftransformxshift{-\pgf@xa}% - \tikzmonthcode% - }}{}}, - set style={{every month}+=[anchor=base west,xshift=1ex]} -] - -\tikzstyle{month label right vertical}=[% - execute before day scope={\ifdate{day of month=1}{% - {% - \pgfmathsetlength{\pgf@xa}{\tikz@lib@cal@xshift}% - \pgftransformxshift{\tikz@lib@cal@width\pgf@xa}% - \pgftransformxshift{-\pgf@xa}% - \tikzmonthcode% - }}{}}, - set style={{every month}+=[anchor=base west,xshift=2ex,yshift=2.25ex,rotate=-90]} -] - -\tikzstyle{month label above centered}=[% - execute before day scope={% - \ifdate{day of month=1}{% - { - \pgfmathsetlength{\pgf@xa}{\tikz@lib@cal@xshift}% - \pgf@xb=\tikz@lib@cal@width\pgf@xa% - \advance\pgf@xb by-\pgf@xa% - \pgf@xb=.5\pgf@xb% - \pgftransformxshift{\pgf@xb}% - \pgftransformxshift{-1.5ex}% - \pgfmathsetlength{\pgf@y}{\tikz@lib@cal@yshift}% - \pgftransformyshift{1.25\pgf@y} - \tikzmonthcode% - } - }{}}, - set style={{every month}+=[anchor=base]} -] - -\tikzstyle{month label above left}=[% - execute before day scope={% - \ifdate{day of month=1}{% - { - \pgftransformxshift{-3.25ex}% - \pgfmathsetlength{\pgf@y}{\tikz@lib@cal@yshift}% - \pgftransformyshift{1.25\pgf@y} - \tikzmonthcode% - } - }{}}, - set style={{every month}+=[anchor=base west]} -] - - - -\tikzstyle{month label above right}=[% - execute before day scope={% - \ifdate{day of month=1}{% - { - \pgfmathsetlength{\pgf@xa}{\tikz@lib@cal@xshift}% - \pgf@xb=\tikz@lib@cal@width\pgf@xa% - \advance\pgf@xb by-\pgf@xa% - \pgftransformxshift{\pgf@xb}% - \pgfmathsetlength{\pgf@y}{\tikz@lib@cal@yshift}% - \pgftransformyshift{1.25\pgf@y} - \tikzmonthcode% - } - }{}}, - set style={{every month}+=[anchor=base east]} -] - -\tikzstyle{month label below centered}=[% - execute before day scope={% - \ifdate{day of month=1}{% - { - \pgfmathsetlength{\pgf@xa}{\tikz@lib@cal@xshift}% - \pgf@xb=\tikz@lib@cal@width\pgf@xa% - \advance\pgf@xb by-\pgf@xa% - \pgf@xb=.5\pgf@xb% - \pgftransformxshift{\pgf@xb}% - \pgftransformxshift{-1.5ex}% - \pgfmathsetlength{\pgf@y}{\tikz@lib@cal@yshift}% - \pgftransformyshift{-1.25\pgf@y} - \tikzmonthcode% - } - }{}}, - set style={{every month}+=[anchor=base]} -] - -\tikzstyle{month label below left}=[% - execute before day scope={% - \ifdate{day of month=1}{% - { - \pgftransformxshift{-3.25ex}% - \pgfmathsetlength{\pgf@y}{\tikz@lib@cal@yshift}% - \pgftransformyshift{-1.25\pgf@y} - \tikzmonthcode% - } - }{}}, - set style={{every month}+=[anchor=base west]} -] - - - -% -% Code of the actual \calendar command (tikz.code.tex contains \let\calendar=\tikz@lib@cal@calendar): -% - -\def\tikz@lib@cal@calendar{% - \begingroup% - \let\tikz@lib@cal@ifs=\pgfutil@empty% - \tikz@expandcount=1000\relax% - \tikz@setkeys{name=,at={(0,0)}}% - \let\%=\pgfcalendarshorthand% - \tikz@every@style{every calendar}% - \tikz@lib@cal@scanner% -} - -\def\tikz@lib@cal@scanner{% - \afterassignment\tikz@lib@cal@handle\let\@let@token=% -} - -\def\tikz@lib@cal@handle{% - \let\@next=\tikz@lib@cal@expand% - \ifx\@let@token;% - \let\@next=\tikz@lib@cal@stop% - \else% - \ifx\@let@token(%) - \let\@next=\tikz@lib@cal@name% - \else% - \ifx\@let@token a% - \let\@next=\tikz@lib@cal@at% - \else% - \ifx\@let@token[% - \let\@next=\tikz@lib@cal@option% - \else% - \ifx\@let@token i% - \let\@next=\tikz@lib@cal@if% - \fi% - \fi% - \fi% - \fi% - \fi% - \@next% -} -\def\tikz@lib@cal@expand{% - \advance\tikz@expandcount by -1% - \ifnum\tikz@expandcount<0\relax% - \PackageError{tikz}{Giving up on this calendar}{}% - \let\@next=\tikz@lib@cal@end% - \else% - \let\@next=\tikz@lib@cal@@expand - \fi% - \@next} - -\def\tikz@lib@cal@@expand{\expandafter\tikz@lib@cal@scanner\@let@token} - - -\def\tikz@lib@cal@name#1){% - \tikz@setkeys{name=#1}% - \tikz@lib@cal@scanner% -} -\def\tikz@lib@cal@at t#1(#2){% - \tikz@setkeys{at={(#2)}}% - \tikz@lib@cal@scanner% -} -\def\tikz@lib@cal@option#1]{% - \tikz@setkeys{#1}% - \tikz@lib@cal@scanner% -} -\def\tikz@lib@cal@if f#1(#2){% - \pgfutil@ifnextchar[{\tikz@lib@cal@if@opt{#2}}{\tikz@lib@cal@if@code{#2}}}%} - -\def\tikz@lib@cal@if@opt#1[#2]{\tikz@lib@cal@if@code{#1}{\tikz@setkeys{#2}}} -\def\tikz@lib@cal@if@code#1#2{% - \pgfutil@ifnextchar e{\tikz@lib@cal@if@else{#1}{#2}}{\tikz@lib@cal@if@else{#1}{#2}else{}}} - -\def\tikz@lib@cal@if@else#1#2else{% - \pgfutil@ifnextchar[{\tikz@lib@cal@if@else@opt{#1}{#2}}{\tikz@lib@cal@if@else@code{#1}{#2}}}%} -\def\tikz@lib@cal@if@else@opt#1#2[#3]{\tikz@lib@cal@if@else@code{#1}{#2}{\tikz@setkeys{#3}}} -\def\tikz@lib@cal@if@else@code#1#2#3{% - \expandafter\def\expandafter\tikz@lib@cal@ifs\expandafter{\tikz@lib@cal@ifs\ifdate{#1}{#2}{#3}}% - \tikz@lib@cal@scanner% -} -\def\tikz@lib@cal@stop{% - \pgftransformshift{\tikz@node@at}% - \expandafter\pgfcalendar\expandafter{\tikz@fig@name}{\tikz@lib@cal@start}{\tikz@lib@cal@end}% - {% - \tikz@before@day% - \scope% - \tikz@atbegin@day% - \tikz@lib@cal@ifs% - \tikzdaycode% - \tikz@atend@day% - \endscope% - \tikz@after@day% - }% - \endgroup% -} - -\tikzoption{if}{% - \let\tikz@lib@cal@scanner@orig=\tikz@lib@cal@scanner% - \let\tikz@lib@cal@scanner=\relax% - \tikz@lib@cal@if f#1\relax% - \let\tikz@lib@cal@scanner=\tikz@lib@cal@scanner@orig} - - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcoordinatesystems.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcoordinatesystems.code.tex deleted file mode 100644 index 68659de8138..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzcoordinatesystems.code.tex +++ /dev/null @@ -1,24 +0,0 @@ -% Copyright 2007 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[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzmatrix.code.tex,v 1.5 2007/01/08 10:42:19 tantau Exp $ - - - -% Barycentric coordinates -% -% Usage: the argument of the coordinate system expression should be a -% list of comma-separated pairs of the form node=number. For each -% node, the center anchors is weighted by the number. -% -% Exampe: (barycentric cs:a=1,b=1,c=1) yields the weighted middle of -% the three points a.center, b.center, c.center. - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzer.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzer.code.tex deleted file mode 100644 index 3056d59185e..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzer.code.tex +++ /dev/null @@ -1,39 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzer.code.tex,v 1.3 2006/10/11 15:22:26 tantau Exp $ - - -% Styles for entity types: - -\tikzstyle{every entity}= [] -\tikzstyle{entity}= [rectangle,draw, - minimum height=2\baselineskip, - minimum width=4\baselineskip,every entity] - - -% Styles for relationship types: - -\tikzstyle{every relationship}= [] -\tikzstyle{relationship}= [diamond,draw, - minimum size=1.5\baselineskip, - inner sep=1pt, - 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] - - - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzfolding.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzfolding.code.tex deleted file mode 100644 index 25ae5d3e39b..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzfolding.code.tex +++ /dev/null @@ -1,143 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzfolding.code.tex,v 1.3 2007/03/09 17:49:32 tantau Exp $ - - -% -% Length of a standard line in a folding -% - -\tikzoption{folding line length}{\pgfmathsetlength\tikz@lib@fold@length{#1}} -\newdimen\tikz@lib@fold@length -\tikz@lib@fold@length=2cm - - -\def\tikz@lib@fold@pentagon#1#2#3#4#5#6{% - \begin{scope}[xshift=.5\tikz@lib@fold@length,yshift=0.68819\tikz@lib@fold@length] - #1 - \end{scope} - \begin{scope}[shift={(108:\tikz@lib@fold@length)},shift={(36:\tikz@lib@fold@length)},rotate=-36] - #2 - \end{scope} - \begin{scope}[xshift=\tikz@lib@fold@length,shift={(72:\tikz@lib@fold@length)},rotate=-108] - #3 - \end{scope} - \begin{scope}[xshift=\tikz@lib@fold@length,rotate=180] - #4 - \end{scope} - \begin{scope}[rotate=108] - #5 - \end{scope} - \begin{scope}[shift={(108:\tikz@lib@fold@length)},rotate=36] - #6 - \end{scope} -} - - -\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{ - \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);} - -\tikzstyle{every cut}=[] -\tikzstyle{every fold}=[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}} - -\let\tikz@lib@fold@face@A=\pgfutil@empty -\let\tikz@lib@fold@face@B=\pgfutil@empty -\let\tikz@lib@fold@face@C=\pgfutil@empty -\let\tikz@lib@fold@face@D=\pgfutil@empty -\let\tikz@lib@fold@face@E=\pgfutil@empty -\let\tikz@lib@fold@face@F=\pgfutil@empty -\let\tikz@lib@fold@face@G=\pgfutil@empty -\let\tikz@lib@fold@face@H=\pgfutil@empty -\let\tikz@lib@fold@face@I=\pgfutil@empty -\let\tikz@lib@fold@face@J=\pgfutil@empty -\let\tikz@lib@fold@face@K=\pgfutil@empty -\let\tikz@lib@fold@face@L=\pgfutil@empty - -\def\tikzfoldingdodecahedron#1[#2]#3;{% - \begingroup% - \tikz@setkeys{#2}% - \tikz@lib@fold@pentagon{\tikz@lib@fold@face@A} - { - \tikz@lib@fold@pentagon{\tikz@lib@fold@face@B} - { - \tikz@lib@fold@pentagon{\tikz@lib@fold@face@C}{\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@ear@path} - {\tikz@lib@fold@path} - {\tikz@lib@fold@ear@path} - {\tikz@lib@fold@ear@path} - } - { - \tikz@lib@fold@pentagon{\tikz@lib@fold@face@D} - { - \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@ear@path} - {\tikz@lib@fold@path} - {\tikz@lib@fold@cut@path} - {\tikz@lib@fold@cut@path} - } - { - \tikz@lib@fold@pentagon{\tikz@lib@fold@face@F} - { - \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@path} - {\tikz@lib@fold@cut@path} - {\tikz@lib@fold@cut@path} - } - { - \tikz@lib@fold@pentagon{\tikz@lib@fold@face@H} - { - \tikz@lib@fold@pentagon{\tikz@lib@fold@face@I}{\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@path} - {\tikz@lib@fold@cut@path} - {\tikz@lib@fold@cut@path} - } - { - \tikz@lib@fold@pentagon{\tikz@lib@fold@face@J} - { - \tikz@lib@fold@pentagon{\tikz@lib@fold@face@K} - {\tikz@lib@fold@cut@path} - {\tikz@lib@fold@cut@path} - {\tikz@lib@fold@path} - {\tikz@lib@fold@cut@path} - { - \tikz@lib@fold@pentagon{\tikz@lib@fold@face@L}{\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@path} - {\tikz@lib@fold@cut@path} - {\tikz@lib@fold@cut@path} - } - \endgroup -} - - diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmatrix.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmatrix.code.tex deleted file mode 100644 index afb1393dffe..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmatrix.code.tex +++ /dev/null @@ -1,129 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzmatrix.code.tex,v 1.5 2007/01/08 10:42:19 tantau Exp $ - - -% A matrix of nodes contains a node in each cell. - -\tikzstyle{matrix of nodes}=[% - matrix,% - cells={anchor=base},% - nodes={% - execute at begin node=,% - execute at end node=, - name=\tikzmatrixname-\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn% - }, - 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 -] - -\def\tikz@lib@matrix@empty@cell{\iftikz@lib@matrix@empty\node{};\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}} - -\def\tikz@lib@matrix@with@options|#1|{\tikz@lib@matrix@plainfalse\node#1\bgroup} - - -\def\tikz@lib@matrix@normal@start@cell{\pgfutil@ifnextchar\let{\tikz@lib@matrix@check}{\tikz@lib@matrix@plainfalse\node\bgroup}}% - -\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\bgroup\let}% -} - -\def\tikz@lib@matrix@end@cell{% - \iftikz@lib@matrix@plain% - \else% - \expandafter\egroup\expandafter;% - \fi% -} - -% 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} - - -% Same as a matrix of nodes, but switch on math mode in each cell -\tikzstyle{matrix of math nodes}=[% - matrix of nodes, - nodes={% - execute at begin node=$,% - execute at end node=$% - }% -] - - - -% Provide a delimiter - -\tikzoption{left delimiter}{\tikz@add@after@node@path{\tikz@delimiter% - {south east}% - {south west}% - {every delimiter,every left delimiter}% - {south}% - {north}% - {#1}% - {.}% - {\pgf@y}}} - -\tikzoption{right delimiter}{\tikz@add@after@node@path{\tikz@delimiter% - {south west}% - {south east}% - {every delimiter,every right delimiter}% - {south}% - {north}% - {.}% - {#1}% - {\pgf@y}}} - -\tikzoption{above delimiter}{\tikz@add@after@node@path{\tikz@delimiter% - {south east}% - {north west}% - {every delimiter,every above delimiter,rotate=-90}% - {west}% - {east}% - {#1}% - {.}% - {\pgf@x}}} - -\tikzoption{below delimiter}{\tikz@add@after@node@path{\tikz@delimiter% - {south west}% - {south west}% - {every delimiter,every below delimiter,rotate=-90}% - {west}% - {east}% - {.}% - {#1}% - {\pgf@x}}} - -\def\tikz@delimiter#1#2#3#4#5#6#7#8{% - \bgroup - \pgfextra{\let\tikz@save@last@fig@name=\tikz@last@fig@name}% - node[outer sep=0pt,inner sep=0pt,draw=none,fill=none,anchor=#1,at=(\tikz@last@fig@name.#2),#3] - {% - {\nullfont\pgf@process{\pgfpointdiff{\pgfpointanchor{\tikz@last@fig@name}{#4}}{\pgfpointanchor{\tikz@last@fig@name}{#5}}}}% - $\left#6\vcenter{\hrule height .5#8 depth .5#8 width0pt}\right#7$% - } - \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}=[] - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmindmap.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmindmap.code.tex deleted file mode 100644 index a370789d2f0..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzmindmap.code.tex +++ /dev/null @@ -1,351 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzmindmap.code.tex,v 1.21 2007/06/07 07:41:11 tantau Exp $ - - - -% A snake for connecting circle nodes -% -% Parameters: \pgfsnakecirclestartradius, \pgfsnakecircleendradius, -% \pgfsnakesegmentamplitude, \pgfsnakesegmentangle - -\pgfdeclaresnake{circle connection bar}{initial} -{ - \state{initial}[width=0pt,next state=bar] - { - { - \pgftransformxshift{-\pgfsnakecirclestartradius}% - \pgfpathmoveto{\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecirclestartradius}} - \pgfpatharc{\pgfsnakesegmentangle}{-\pgfsnakesegmentangle}{\pgfsnakecirclestartradius} - \pgfutil@tempcnta=-\pgfsnakesegmentangle\relax - \advance\pgfutil@tempcnta by90\relax - \pgfmathsetlength\pgfutil@tempdima{\pgfsnakecirclestartradius} - \pgfmathsetlength\pgfutil@tempdimb{\pgfsnakesegmentamplitude} - \pgfpathcurveto - {\pgfpointadd - {\pgfpointpolar{-\pgfsnakesegmentangle}{\pgfsnakecirclestartradius}} - {\pgfpointpolar{\the\pgfutil@tempcnta}{.25\pgfutil@tempdima}}} - {\pgfqpoint{1.25\pgfutil@tempdima}{-.5\pgfutil@tempdimb}} - {\pgfqpoint{1.5\pgfutil@tempdima}{-.5\pgfutil@tempdimb}} - \pgfpathlineto{\pgfpoint{1.5\pgfutil@tempdima}{.5\pgfutil@tempdimb}} - \pgfutil@tempcnta=\pgfsnakesegmentangle\relax - \advance\pgfutil@tempcnta by-90\relax - \pgfpathcurveto - {\pgfpoint{1.25\pgfutil@tempdima}{.5\pgfutil@tempdimb}} - {\pgfpointadd - {\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecirclestartradius}} - {\pgfpointpolar{\the\pgfutil@tempcnta}{.25\pgfutil@tempdima}}} - {\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecirclestartradius}} - \pgfpathclose - } - } - \state{bar}[width=0pt,next state=end] - { - \pgfmathsetlength\pgfutil@tempdima{\pgfsnakecirclestartradius}% - \pgfmathsetlength\pgfutil@tempdimb{\pgfsnakecircleendradius}% - \pgfmathsetlength\pgf@xc{\pgfsnakesegmentamplitude}% - \pgfpathrectangle - {\pgfqpoint{.5\pgfutil@tempdima}{-.5\pgf@xc}} - {\pgfpoint{\pgfsnakeremainingdistance+-.5\pgfutil@tempdimb+-.5\pgfutil@tempdima}{\pgf@xc}} - } - \state{end}[width=0pt,next state=final] - { - { - \pgftransformxshift{\pgfsnakeremainingdistance}% - \pgftransformxscale{-1}% - \pgftransformxshift{-\pgfsnakecircleendradius}% - \pgfpathmoveto{\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecircleendradius}} - \pgfpatharc{\pgfsnakesegmentangle}{-\pgfsnakesegmentangle}{\pgfsnakecircleendradius} - \pgfutil@tempcnta=-\pgfsnakesegmentangle\relax - \advance\pgfutil@tempcnta by90\relax - \pgfmathsetlength\pgfutil@tempdima{\pgfsnakecircleendradius} - \pgfmathsetlength\pgfutil@tempdimb{\pgfsnakesegmentamplitude}% - \pgfpathcurveto - {\pgfpointadd - {\pgfpointpolar{-\pgfsnakesegmentangle}{\pgfsnakecircleendradius}} - {\pgfpointpolar{\the\pgfutil@tempcnta}{.25\pgfutil@tempdima}}} - {\pgfqpoint{1.25\pgfutil@tempdima}{-.5\pgfutil@tempdimb}} - {\pgfqpoint{1.5\pgfutil@tempdima}{-.5\pgfutil@tempdimb}} - \pgfpathlineto{\pgfpoint{1.5\pgfutil@tempdima}{.5\pgfutil@tempdimb}} - \pgfutil@tempcnta=\pgfsnakesegmentangle\relax - \advance\pgfutil@tempcnta by-90\relax - \pgfpathcurveto - {\pgfpoint{1.25\pgfutil@tempdima}{.5\pgfutil@tempdimb}} - {\pgfpointadd - {\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecircleendradius}} - {\pgfpointpolar{\the\pgfutil@tempcnta}{.25\pgfutil@tempdima}}} - {\pgfpointpolar{\pgfsnakesegmentangle}{\pgfsnakecircleendradius}} - \pgfpathclose - } - } - \state{final} - {} -} - - -\def\pgfsnakecirclestartradius{1cm} -\def\pgfsnakecircleendradius{1cm} -\def\pgfsnakesegmentangle{20} - - - - -% To paths for connecting circle nodes - -\tikzstyle{circle connection bar}= -[to path={ - \pgfextra{\tikz@compute@circle@radii\tikz@compute@segmentamplitude} - [fill=\tikz@concept@color,draw=none] - [snake=circle connection bar] - [every circle connection bar] - -- (\tikztotarget) \tikztonodes -}] -\tikzstyle{every circle connection bar}=[] - -\def\tikz@compute@circle@radii{% - \pgf@process{\pgfpointtransformed{\pgfpointanchor{\tikztostart}{center}}}% - \pgf@xa=\pgf@x% - \pgf@process{\pgfpointtransformed{\pgfpointanchor{\tikztostart}{west}}}% - \advance\pgf@xa by-\pgf@x% - \edef\pgfsnakecirclestartradius{\the\pgf@xa}% - \pgf@process{\pgfpointtransformed{\pgfpointanchor{\tikztotarget}{center}}}% - \pgf@xa=\pgf@x% - \pgf@process{\pgfpointtransformed{\pgfpointanchor{\tikztotarget}{west}}}% - \advance\pgf@xa by-\pgf@x% - \edef\pgfsnakecircleendradius{\the\pgf@xa}% -} -\def\tikz@compute@segmentamplitude{% - \pgf@x=\pgfsnakecirclestartradius\relax% - \ifdim\pgf@x>\pgfsnakecircleendradius\relax% - \pgf@x=\pgfsnakecircleendradius\relax% - \fi% - \pgf@x=.175\pgf@x\relax% - \edef\pgfsnakesegmentamplitude{\the\pgf@x}% -} - - -% Switch color in a mindmap - -\tikzoption{circle connection bar switch color}{\tikz@parse@switch#1\pgf@unique} -\def\tikz@parse@switch from (#1) to (#2)\pgf@unique{% - \def\tikz@to@path{% - \pgfextra{% - \pgfutil@colorlet{tikz@switch@from}{#1}% - \pgfutil@colorlet{tikz@switch@to}{#2}% - \tikz@compute@circle@radii\tikz@compute@segmentamplitude% - \tikz@compute@rotation% - } - [fill=none,draw=none] - [snake=circle connection bar] - [every circle connection bar] - -- (\tikztotarget) \tikztonodes - [shading=tikz@shade@bar] - } -} - -\tikzoption{concept color}{% - \let\tikz@old@concept@color=\tikz@concept@color% - \def\tikz@edge@to@parent@path{ - (\tikzparentnode) - 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(45bp)=(tikz@switch@from); - color(50bp)=(tikz@switch@to); - color(100bp)=(tikz@switch@to)} - -\def\tikz@compute@rotation{% - \pgf@process{\pgfpointnormalised{\pgfpointdiff{\pgfpointanchor{\tikztostart}{center}}{\pgfpointanchor{\tikztotarget}{center}}}}% - \pgf@ya=-\pgf@y% - \edef\pgf@marshal{% - \noexpand\pgfsetadditionalshadetransform{% - \noexpand\pgftransformcm - {\pgf@sys@tonumber{\pgf@x}}{\pgf@sys@tonumber{\pgf@y}}% - {\pgf@sys@tonumber{\pgf@ya}}{\pgf@sys@tonumber{\pgf@x}}% - {\noexpand\pgfpointorigin}% - }% - }% - \pgf@marshal% -} - - - - -% A concept node - -\tikzstyle{concept}= [circle,fill=\tikz@concept@color,draw=\tikz@concept@color,every concept] -\tikzstyle{every concept}= [] - -\def\tikz@concept@color{black} - -\tikzstyle{tikz@concept@setting}=[edge from parent path={(\tikzparentnode) to [circle connection bar] (\tikzchildnode)}] -\tikzstyle{tikz@concept@color@set}=[] - - -\tikzstyle{extra concept}= [concept color=black!50,level 2 concept,concept,every extra concept] -\tikzstyle{every extra concept}=[] - -\tikzstyle{concept connection}=[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,% - set style={{every child}+=[style=tikz@concept@setting,style=tikz@concept@color@set]},% - style=root concept, - set style={{level 1}+=[style=level 1 concept]}, - set style={{level 2}+=[style=level 2 concept]}, - set style={{level 3}+=[style=level 3 concept]}, - set style={{level 4}+=[style=level 4 concept]}, - 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{large mindmap}= - [% - set style={{root concept}=[minimum size=5.6cm,text width=4.5cm,font=\pgfutil@font@Large]}, - set style={{level 1 concept}=[% - minimum size=3.2cm, - level distance=7cm, - text width=2.8cm, - sibling angle=60, - font=]},% - set style={{level 2 concept}=[% - minimum size=2.45cm,% - level distance=4cm,% - text width=2.2cm,% - sibling angle=60,% - font=\pgfutil@font@small% - ]},% - set style={{level 3 concept}=[% - minimum size=1.63cm,% - text width=1.4cm,% - level distance=3.38cm,% - sibling angle=30,% - font=\pgfutil@font@scriptsize]},% - set style={{level 4 concept}=[% - minimum size=1.27cm,% - text width=1cm, - level distance=2.60cm,% - sibling angle=30,% - font=\pgfutil@font@tiny]},% - mindmap,% - line width=2pt - ] - -\tikzstyle{huge mindmap}= - [% - set style={{root concept}=[minimum size=8cm,text width=7cm,font=\pgfutil@font@huge]}, - set style={{level 1 concept}+=[% - minimum size=4.5cm, - level distance=10cm, - text width=4cm, - sibling angle=60, - font=\pgfutil@font@large]},% - set style={{level 2 concept}+=[% - minimum size=3.5cm,% - level distance=5.8cm,% - text width=3cm,% - sibling angle=60,% - font=% - ]},% - set style={{level 3 concept}+=[% - minimum size=2.3cm,% - text width=2cm,% - level distance=4.8cm,% - sibling angle=30,% - font=\pgfutil@font@footnotesize]},% - set style={{level 4 concept}+=[% - minimum size=1.7cm,% - text width=1.4cm, - level distance=3.7cm,% - sibling angle=30,% - font=\pgfutil@font@scriptsize]},% - mindmap,% - 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}=[] - - - -\tikz@orig@define@key{tikz@mm@anno}{title}{\def\tikzmindmapinserttitle{#1}} -\tikz@orig@define@key{tikz@mm@anno}{number}{\def\tikzmindmapinsertnumber{#1}} -\tikz@orig@define@key{tikz@mm@anno}{url}{\def\tikz@mm@url{#1}} -\tikz@orig@define@key{tikz@mm@anno}{date}{\def\tikz@mm@date{#1}} - -\def\tikz@mindmap@annotation[#1]{% - {% - \let\tikz@mm@at=\pgfutil@empty% - \let\tikz@mm@name=\pgfutil@empty% - \let\tikzmindmapinserttitle=\pgfutil@empty% - \let\tikzmindmapinsertnumber=\pgfutil@empty% - \tikz@orig@setkeys*{tikz@mm@anno}{#1}% - \edef\tikz@marshal{% - \noexpand\node% - [% - \XKV@rm,% - annotation,% - ]% - {% - \ifx\tikz@mm@url\pgfutil@empty\else% - \fi% - }% - }% - % - }% - \pgfutil@ifnextchar;{\pgfutil@gobble}{}% -} - - -\endinput - diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpatterns.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpatterns.code.tex deleted file mode 100644 index 7766f66d8d5..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpatterns.code.tex +++ /dev/null @@ -1,14 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzpatterns.code.tex,v 1.2 2006/10/11 15:22:26 tantau Exp $ - -\usepgflibrary{patterns} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpetri.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpetri.code.tex deleted file mode 100644 index 172f9b991d1..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzpetri.code.tex +++ /dev/null @@ -1,146 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzpetri.code.tex,v 1.5 2007/03/09 17:49:32 tantau Exp $ - - -% Styles for places: - -\tikzstyle{every place}= [] -\tikzstyle{place}= [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] - - -% Styles for relationship types: - -\tikzstyle{pre}= [<-,shorten <=1pt] -\tikzstyle{post}= [->,shorten >=1pt] -\tikzstyle{pre and post}= [<->,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] - -\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=] - -\tikzoption{tokens}{% - \ifnum#1>0\relax% - \tikz@add@after@node@path{% - {[children are tokens]child foreach \tikz@dummy in {1,...,#1} {node[token]{}}}}% - \fi} - -\tikzoption{colored tokens}{% - \tikz@add@after@node@path{% - {[children are tokens]child foreach \tikz@child@color in {#1} {node[token,\tikz@child@color]{}}}}% - } - -\tikzoption{structured tokens}{% - \tikz@add@after@node@path{% - {[children are tokens]child foreach \tikz@child@name in {#1} {node[token]{\tikz@child@name}}}}% - } - - -\def\tikz@grow@tokens{% - \pgfmathsetlength{\pgf@xa}{\tikz@token@distance}% - \pgfmathsetlength{\pgf@ya}{\tikz@token@distance}% - \pgf@xc=0pt% - \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} - -% Two tokens -\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} - -% 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} - -% 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} - -% 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} - -% 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} - -% 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} - -% 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} - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplothandlers.code.tex deleted file mode 100644 index d9179187394..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplothandlers.code.tex +++ /dev/null @@ -1,14 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzplothandlers.code.tex,v 1.2 2006/10/11 15:22:26 tantau Exp $ - -\usepgflibrary{plothandlers} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplotmarks.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplotmarks.code.tex deleted file mode 100644 index 4455e03aac2..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzplotmarks.code.tex +++ /dev/null @@ -1,14 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzplotmarks.code.tex,v 1.2 2006/10/11 15:22:26 tantau Exp $ - -\usepgflibrary{plotmarks} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.arrows.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.arrows.code.tex deleted file mode 100644 index d96884ab716..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.arrows.code.tex +++ /dev/null @@ -1,14 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.arrows.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $ - -\usepgflibrary{shapes.arrows} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.code.tex deleted file mode 100644 index 0ad52cfb429..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.code.tex +++ /dev/null @@ -1,18 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.code.tex,v 1.3 2007/06/08 11:24:59 tantau Exp $ - -\usetikzlibrary{shapes.geometric} -\usetikzlibrary{shapes.misc} -\usetikzlibrary{shapes.symbols} -\usetikzlibrary{shapes.arrows} -\usetikzlibrary{shapes.multipart} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.geometric.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.geometric.code.tex deleted file mode 100644 index 76e2e2967b9..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.geometric.code.tex +++ /dev/null @@ -1,23 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.geometric.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $ - - -\tikzoption{star points}{\pgfsetstarpoints{#1}} -\tikzoption{star rotate}{\pgfsetstarrotate{#1}} -\tikzoption{star point height}{\pgfsetstarpointheight{#1}} -\tikzoption{star point ratio}{\pgfsetstarpointratio{#1}} - -\tikzoption{regular polygon sides}{\pgfsetpolygonsides{#1}} -\tikzoption{regular polygon rotate}{\pgfsetpolygonrotate{#1}} - -\usepgflibrary{shapes.geometric} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.misc.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.misc.code.tex deleted file mode 100644 index 92d9102c986..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.misc.code.tex +++ /dev/null @@ -1,14 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.misc.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $ - -\usepgflibrary{shapes.misc} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.multipart.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.multipart.code.tex deleted file mode 100644 index f9f29dbaea3..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.multipart.code.tex +++ /dev/null @@ -1,14 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.multipart.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $ - -\usepgflibrary{shapes.multipart} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.symbols.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.symbols.code.tex deleted file mode 100644 index 9760b07fc8b..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzshapes.symbols.code.tex +++ /dev/null @@ -1,14 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzshapes.symbols.code.tex,v 1.1 2007/06/08 11:24:59 tantau Exp $ - -\usepgflibrary{shapes.symbols} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzsnakes.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzsnakes.code.tex deleted file mode 100644 index 0274721bd36..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikzsnakes.code.tex +++ /dev/null @@ -1,14 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikzsnakes.code.tex,v 1.2 2006/10/11 15:22:26 tantau Exp $ - -\usepgflibrary{snakes} - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztopaths.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztopaths.code.tex deleted file mode 100644 index 6c720fdc95f..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztopaths.code.tex +++ /dev/null @@ -1,378 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikztopaths.code.tex,v 1.7 2007/06/07 07:41:11 tantau Exp $ - - -% Straight to - -\tikzstyle{line to}= [to path={-- (\tikztotarget) \tikztonodes}] - - -% Curved to - -\tikzstyle{every curve to}= [] -\tikzstyle{curve to}= [to path=\tikz@to@curve@path] - -\tikzoption{bend angle}{\def\tikz@to@bend{#1}} - -\tikzoption{bend left}[]{% - \def\pgf@temp{#1}% - \ifx\pgf@temp\pgfutil@empty% - \else% - \def\tikz@to@bend{#1}% - \fi% - \let\tikz@to@out=\tikz@to@bend% - \c@pgf@counta=180\relax% - \advance\c@pgf@counta by-\tikz@to@out\relax% - \edef\tikz@to@in{\the\c@pgf@counta}% - \tikz@to@switch@on% - \tikz@to@relativetrue% -} - -\tikzoption{bend right}[]{% - \def\pgf@temp{#1}% - \ifx\pgf@temp\pgfutil@empty% - \else% - \def\tikz@to@bend{#1}% - \fi% - % Now, negate - \c@pgf@counta=\tikz@to@bend\relax% - \c@pgf@counta=-\c@pgf@counta\relax% - \edef\tikz@to@out{\the\c@pgf@counta}% - \c@pgf@counta=180\relax% - \advance\c@pgf@counta by-\tikz@to@out\relax% - \edef\tikz@to@in{\the\c@pgf@counta}% - \tikz@to@switch@on% - \tikz@to@relativetrue% -} - -\tikzoption{relative}[true]{\csname tikz@to@relative#1\endcsname} -\newif\iftikz@to@relative -\tikz@to@relativefalse - -\tikzoption{in}{\def\tikz@to@in{#1}\tikz@to@switch@on} -\tikzoption{out}{\def\tikz@to@out{#1}\tikz@to@switch@on} - -\tikzoption{in looseness}{\tikz@to@set@in@looseness{#1}} -\tikzoption{out looseness}{\tikz@to@set@out@looseness{#1}} -\tikzoption{looseness}{\tikz@to@set@in@looseness{#1}\tikz@to@set@out@looseness{#1}} - -\tikzoption{in control}{\tikz@to@set@in@control{#1}} -\tikzoption{out control}{\tikz@to@set@out@control{#1}} -\tikzoption{controls}{\tikz@to@parse@controls#1\pgf@stop} - -\tikzoption{in min distance}{\tikz@to@set@distances{#1}{}{}{}} -\tikzoption{in max distance}{\tikz@to@set@distances{}{#1}{}{}} -\tikzoption{in distance}{\tikz@to@set@distances{#1}{#1}{}{}} -\tikzoption{out min distance}{\tikz@to@set@distances{}{}{#1}{}} -\tikzoption{out max distance}{\tikz@to@set@distances{}{}{}{#1}} -\tikzoption{out distance}{\tikz@to@set@distances{}{}{#1}{#1}} -\tikzoption{min distance}{\tikz@to@set@distances{#1}{}{#1}{}} -\tikzoption{max distance}{\tikz@to@set@distances{}{#1}{}{#1}} -\tikzoption{distance}{\tikz@to@set@distances{#1}{#1}{#1}{#1}} - -\def\tikz@to@set@distances#1#2#3#4{% - \tikz@to@setifnotempy{#1}{\tikz@to@in@min}{\let\tikz@to@end@compute=\tikz@to@end@compute@looseness}% - \tikz@to@setifnotempy{#2}{\tikz@to@in@max}{\let\tikz@to@end@compute=\tikz@to@end@compute@looseness}% - \tikz@to@setifnotempy{#3}{\tikz@to@out@min}{\let\tikz@to@start@compute=\tikz@to@start@compute@looseness}% - \tikz@to@setifnotempy{#4}{\tikz@to@out@max}{\let\tikz@to@start@compute=\tikz@to@start@compute@looseness}% - \tikz@to@switch@on% -} - -\def\tikz@to@setifnotempy#1#2#3{% - \def\pgf@temp{#1}% - \ifx\pgf@temp\pgfutil@empty\else\def#2{#1}#3\fi% -} - - -\def\tikz@to@set@in@looseness#1{% - \def\tikz@to@in@looseness{#1}% - \let\tikz@to@end@compute=\tikz@to@end@compute@looseness% - \tikz@to@switch@on% -} -\def\tikz@to@set@out@looseness#1{% - \def\tikz@to@out@looseness{#1}% - \let\tikz@to@start@compute=\tikz@to@start@compute@looseness% - \tikz@to@switch@on% -} - -\def\tikz@to@parse@controls#1and#2\pgf@stop{\tikz@to@set@in@control{#2}\tikz@to@set@out@control{#1}} - -\def\tikz@to@set@in@control#1{% - \def\tikz@to@in@control{#1}% - \let\tikz@to@end@compute=\tikz@to@end@compute@control% - \tikz@to@switch@on% -} -\def\tikz@to@set@out@control#1{% - \def\tikz@to@out@control{#1}% - \let\tikz@to@start@compute=\tikz@to@start@compute@control% - \tikz@to@switch@on% -} - - -\def\tikz@to@bend{30} - -\def\tikz@to@out{45} -\def\tikz@to@in{135} - -\def\tikz@to@out@looseness{1} -\def\tikz@to@in@looseness{1} - -\def\tikz@to@in@min{0pt} -\def\tikz@to@in@max{10000pt} -\def\tikz@to@out@min{0pt} -\def\tikz@to@out@max{10000pt} - -\def\tikz@to@switch@on{\let\tikz@to@path=\tikz@to@curve@path} - -\def\tikz@to@curve@path{% - [every curve to] - \pgfextra{\iftikz@to@relative\tikz@to@compute@relative\else\tikz@to@compute\fi} - \tikz@computed@path - \tikztonodes% -} - -\def\tikz@to@modify#1#2{% - \pgfutil@ifundefined{pgf@sh@ns@#1} - {}% - {\edef#1{#1.#2}} -}% - -\def\tikz@to@compute{% - \let\tikz@tofrom=\tikztostart% - \let\tikz@toto=\tikztotarget% - \tikz@to@modify\tikz@tofrom\tikz@to@out% - \tikz@to@modify\tikz@toto\tikz@to@in% - \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% - \tikz@to@compute@distance% - \fi% - \fi% - \tikz@to@start@compute% - \tikz@to@end@compute% - \edef\tikz@computed@path{.. controls \tikz@computed@start and \tikz@computed@end .. (\tikz@toto)} -} - -\def\tikz@to@compute@distance{\tikz@scan@one@point\tikz@@to@compute@distance(\tikz@tofrom)} -\def\tikz@@to@compute@distance#1{% - \def\tikz@first@point{#1}% - \tikz@scan@one@point\tikz@@@to@compute@distance(\tikz@toto)} -\def\tikz@@@to@compute@distance#1{% - \def\tikz@second@point{#1}% - \tikz@to@compute@distance@main% -} -\def\tikz@to@compute@distance@main{% - \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% - \ifnum\c@pgf@counta=0\relax% - \else% - \divide\c@pgf@counta by 255\relax% - \pgf@xa=16\pgf@xa\relax% - \divide\pgf@xa by\c@pgf@counta% - \pgf@xa=16\pgf@xa\relax% - \fi% - \else% - \c@pgf@counta=\pgf@y% - \ifnum\c@pgf@counta=0\relax% - \else% - \divide\c@pgf@counta by 255\relax% - \pgf@ya=16\pgf@ya\relax% - \divide\pgf@ya by\c@pgf@counta% - \pgf@xa=16\pgf@ya\relax% - \fi% - \fi% - \pgf@x=0.3915\pgf@xa% - \pgf@xa=\tikz@to@out@looseness\pgf@x% - \pgf@xb=\tikz@to@in@looseness\pgf@x% - % Adjust as necessary - \pgfmathsetlength{\pgf@ya}{\tikz@to@out@min} - \ifdim\pgf@xa<\pgf@ya% - \pgf@xa=\pgf@ya% - \fi% - \pgfmathsetlength{\pgf@ya}{\tikz@to@out@max} - \ifdim\pgf@xa>\pgf@ya% - \pgf@xa=\pgf@ya% - \fi% - \pgfmathsetlength{\pgf@ya}{\tikz@to@in@min} - \ifdim\pgf@xb<\pgf@ya% - \pgf@xb=\pgf@ya% - \fi% - \pgfmathsetlength{\pgf@ya}{\tikz@to@in@max} - \ifdim\pgf@xb>\pgf@ya% - \pgf@xb=\pgf@ya% - \fi% -} - -\def\tikz@to@start@compute@looseness{% - \edef\tikz@computed@start{([shift=(\tikz@to@out:\the\pgf@xa)]\tikz@tofrom)}% -} -\def\tikz@to@end@compute@looseness{% - \edef\tikz@computed@end{([shift=(\tikz@to@in:\the\pgf@xb)]\tikz@toto)}% -} -\def\tikz@to@start@compute@control{% - \let\tikz@computed@start=\tikz@to@out@control% -} -\def\tikz@to@end@compute@control{% - \let\tikz@computed@end=\tikz@to@in@control% -} - -\let\tikz@to@start@compute=\tikz@to@start@compute@looseness% -\let\tikz@to@end@compute=\tikz@to@end@compute@looseness% - - - - -% Relative curves - -\def\tikz@to@compute@relative{% - \tikz@scan@one@point\tikz@@to@compute@relative(\tikztostart)% -} -\def\tikz@@to@compute@relative#1{% - \def\tikz@tofrom{#1}% - \tikz@scan@one@point\tikz@@@to@compute@relative(\tikztotarget)% -} -\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% - \let\tikz@tostart@tikz=\pgfutil@empty - }% - {% - % Start computation of new start. - {% - \tikz@tofrom% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - {% - \pgftransformreset% - \pgftransformshift{\pgfqpoint{\pgf@xc}{\pgf@yc}}% - \pgftransformrotate{\tikz@to@out}% - \pgftransformshift{\pgfqpoint{-\pgf@xc}{-\pgf@yc}}% - \pgf@process{\pgfpointtransformed{\tikz@toto}}% - }% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \pgfpointshapeborder{\tikztostart}{\pgfqpoint{\pgf@xc}{\pgf@yc}}% - \xdef\tikz@tofrom@smuggle{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}} - }% - \let\tikz@first@point=\tikz@tofrom@smuggle% - \tikz@first@point% - \edef\tikz@tostart@tikz{(\the\pgf@x,\the\pgf@y)}% - }% - \pgfutil@ifundefined{pgf@sh@ns@\tikztotarget} - {% - \let\tikz@second@point=\tikz@toto% - }% - {% - % Start computation of new target. - {% - \tikz@toto% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - {% - \pgftransformreset% - \pgftransformshift{\pgfqpoint{\pgf@xc}{\pgf@yc}}% - \pgftransformrotate{180}% - \pgftransformrotate{\tikz@to@in}% - \pgftransformshift{\pgfqpoint{-\pgf@xc}{-\pgf@yc}}% - \pgf@process{\pgfpointtransformed{\tikz@tofrom}}% - }% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \pgfpointshapeborder{\tikztotarget}{\pgfqpoint{\pgf@xc}{\pgf@yc}}% - \xdef\tikz@toto@smuggle{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}} - }% - \let\tikz@second@point=\tikz@toto@smuggle% - }% - \tikz@second@point% - \edef\tikz@totarget@tikz{(\the\pgf@x,\the\pgf@y)}% - % - % Compute distances - % - \tikz@to@compute@distance@main% - \edef\tikz@to@first@distance{\the\pgf@xa}% - \edef\tikz@to@second@distance{\the\pgf@xb}% - % - % Next step: Establish a transformed coordinate system so that the (modified) - % start is at the origin and the (modified) target is at (1,0) - % - \pgftransformreset% - \pgf@process{\tikz@first@point}% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\tikz@second@point}% - \advance\pgf@x by-\pgf@xa% - \advance\pgf@y by-\pgf@ya% - \pgfpointnormalised{}% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \pgf@xb=-\pgf@x% - \pgf@yb=-\pgf@y% - % - % Now compute the control points. - % - {% - \pgftransformshift{\tikz@first@point}% - \pgftransformcm{\pgf@sys@tonumber\pgf@xc}{\pgf@sys@tonumber\pgf@yc}{\pgf@sys@tonumber\pgf@yb}{\pgf@sys@tonumber\pgf@xc}% - {\pgfpointorigin}% - \pgf@process{\pgfpointtransformed{\pgfpointpolar{\tikz@to@out}{\tikz@to@first@distance}}}% - \xdef\tikz@computed@start{(\the\pgf@x,\the\pgf@y)}% - } - {% - \pgftransformshift{\tikz@second@point}% - \pgftransformcm{\pgf@sys@tonumber\pgf@xc}{\pgf@sys@tonumber\pgf@yc}{\pgf@sys@tonumber\pgf@yb}{\pgf@sys@tonumber\pgf@xc}% - {\pgfpointorigin}% - \pgf@process{\pgfpointtransformed{\pgfpointpolar{\tikz@to@in}{\tikz@to@second@distance}}}% - \xdef\tikz@computed@end{(\the\pgf@x,\the\pgf@y)}% - } - \xdef\tikz@computed@path{ - \tikz@tostart@tikz - .. controls \tikz@computed@start and \tikz@computed@end .. - \tikz@totarget@tikz}% - \endgroup -} - - - -% Loops - -\tikzstyle{loop}= [to path={ - \pgfextra{\let\tikztotarget=\tikztostart} - [looseness=8,min distance=5mm,every loop] - \tikz@to@curve@path - }] - -\tikzstyle{every loop}= [->,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] - - - - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztrees.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztrees.code.tex deleted file mode 100644 index cba3a725ad1..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibrarytikztrees.code.tex +++ /dev/null @@ -1,118 +0,0 @@ -% 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. -% -% See the file doc/generic/pgf/licenses/LICENSE for more details. - -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibrarytikztrees.code.tex,v 1.8 2007/03/09 17:49:32 tantau Exp $ - - - -% -% Three point growth -% - -\define@key{tikz}{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}% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{\tikz@tree@left@child}% - \pgf@xb=\pgf@x% - \pgf@yb=\pgf@y% - \advance\pgf@xb by-\pgf@xa% - \advance\pgf@yb by-\pgf@ya% - \pgf@process{\tikz@tree@right@child}% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \advance\pgf@xc by-\pgf@xa% - \advance\pgf@yc by-\pgf@ya% - \advance\pgf@xc by-\pgf@xb% - \advance\pgf@yc by-\pgf@yb% - \advance\tikznumberofchildren by-1\relax% - \pgf@xb=\tikznumberofchildren\pgf@xb\relax% - \pgf@yb=\tikznumberofchildren\pgf@yb\relax% - \advance\tikznumberofcurrentchild by-1\relax% - \pgf@xc=\tikznumberofcurrentchild\pgf@xc\relax% - \pgf@yc=\tikznumberofcurrentchild\pgf@yc\relax% - \advance\pgf@xa by\pgf@xb% - \advance\pgf@xa by\pgf@xc% - \advance\pgf@ya by\pgf@yb% - \advance\pgf@ya by\pgf@yc% - \edef\pgf@temp{\noexpand\pgftransformshift{\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}}% - \pgf@temp% -} - -% -% Circle grow -% - -\tikzstyle{grow cyclic}=[growth function=\tikz@grow@circle] - -\define@key{tikz}{sibling angle}{\edef\tikz@sibling@angle{#1}} -\def\tikz@sibling@angle{20} - -\def\tikz@grow@circle{% - \c@pgf@counta=\tikz@sibling@angle\relax% - \c@pgf@countb=\tikz@sibling@angle\relax% - \divide\c@pgf@counta by2\relax% - \multiply\c@pgf@countb by\tikznumberofcurrentchild\relax% - \c@pgf@countc=-\c@pgf@counta\relax - \multiply\c@pgf@countc by\tikznumberofchildren\relax% - \advance\c@pgf@countc by-\c@pgf@counta\relax - \advance\c@pgf@countc by\c@pgf@countb\relax - \pgftransformrotate{\the\c@pgf@countc}% - \pgftransformxshift{\the\tikzleveldistance}% -} - -\tikzoption{counterclockwise from}{\let\tikz@grow=\tikz@grow@circle@from\def\tikz@grow@circle@from@start{#1}} - -\def\tikz@grow@circle@from{% - \c@pgf@counta=\tikz@sibling@angle\relax% - \multiply\c@pgf@counta by\tikznumberofcurrentchild\relax% - \advance\c@pgf@counta by-\tikz@sibling@angle\relax% - \advance\c@pgf@counta by\tikz@grow@circle@from@start\relax% - \pgftransformshift{\pgfpointpolar{\the\c@pgf@counta}{\the\tikzleveldistance}}% -} - -\tikzoption{clockwise from}{\let\tikz@grow=\tikz@grow@circle@from@\def\tikz@grow@circle@from@start{#1}} - -\def\tikz@grow@circle@from@{% - \c@pgf@counta=\tikz@sibling@angle\relax% - \multiply\c@pgf@counta by-\tikznumberofcurrentchild\relax% - \advance\c@pgf@counta by\tikz@sibling@angle\relax% - \advance\c@pgf@counta by\tikz@grow@circle@from@start\relax% - \pgftransformshift{\pgfpointpolar{\the\c@pgf@counta}{\the\tikzleveldistance}}% -} - - - -% -% Connections -% - -\tikzstyle{edge from parent fork down}= - [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)}] - -\tikzstyle{edge from parent fork left}= - [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 |