From ba9472aebfed07843bc4faa00c7b96bc86194691 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 4 Oct 2006 08:43:01 +0000 Subject: Fix ctan2tds for pgf installation comment powerdot-doc-vn in tpm-ctan-check, it always breaks Update of the following packages: labelcas pstricks-add sectionbox ltxmisc frenchle flowfram verse emulateapj pst-pdf poemscol babelbib dk-bib breakurl screenplay ncctools xkeyval bibleref muthesis pst-labo pgf ncclatex active-conf xcolor commath lineno dottex makeplo git-svn-id: svn://tug.org/texlive/trunk@2240 c570f23f-e606-0410-a88d-b1316a301751 --- .../generic/pgf/basiclayer/pgfbaselayers.code.tex | 8 +- .../generic/pgf/basiclayer/pgfbasesnakes.code.tex | 8 +- .../tex/generic/pgf/basiclayer/pgfcore.code.tex | 4 +- .../pgf/basiclayer/pgfcorepathconstruct.code.tex | 826 +++++++++++++++++++++ .../basiclayer/pgfcorepathconstruction.code.tex | 826 --------------------- .../generic/pgf/basiclayer/pgfcorescopes.code.tex | 12 +- .../tex/generic/pgf/frontendlayer/tikz.code.tex | 26 +- .../pgf/systemlayer/pgfsys-common-postscript.def | 170 ++++- .../generic/pgf/systemlayer/pgfsys-common-svg.def | 4 +- .../tex/generic/pgf/systemlayer/pgfsys-dvips.def | 170 +---- .../tex/generic/pgf/systemlayer/pgfsys-tex4ht.def | 36 +- .../generic/pgf/systemlayer/pgfsys-textures.def | 85 +++ .../tex/generic/pgf/systemlayer/pgfsys-vtex.def | 97 +++ .../generic/pgf/utilities/pgf-latex-emulation.tex | 16 +- .../tex/generic/pgf/utilities/pgfrcs.code.tex | 4 +- 15 files changed, 1263 insertions(+), 1029 deletions(-) create mode 100644 Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex delete mode 100644 Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruction.code.tex create mode 100644 Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def create mode 100644 Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def (limited to 'Master/texmf-dist/tex/generic/pgf') diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaselayers.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaselayers.code.tex index 8e6e97b8017..d97d742934e 100644 --- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaselayers.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbaselayers.code.tex @@ -1,4 +1,4 @@ -\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfbaselayers.code.tex,v 1.1 2005/08/13 18:59:56 tantau Exp $ +\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfbaselayers.code.tex,v 1.2 2005/10/24 15:14:48 tantau Exp $ % Copyright 2005 by Till Tantau . % @@ -17,10 +17,10 @@ % \pgfdeclarelayer{background} \def\pgfdeclarelayer#1{% - \expandafter\newbox\csname pgf@layerbox@#1\endcsname% - \expandafter\newbox\csname pgf@layerboxsaved@#1\endcsname% + \expandafter\pgf@newbox\csname pgf@layerbox@#1\endcsname% + \expandafter\pgf@newbox\csname pgf@layerboxsaved@#1\endcsname% } - +\let\pgf@newbox=\newbox % avoid plain TeX outer problem % Sets the layers that compose the picture % diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasesnakes.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasesnakes.code.tex index 7403f2a7b8e..00169368ae1 100644 --- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasesnakes.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfbasesnakes.code.tex @@ -1,4 +1,4 @@ -\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfbasesnakes.code.tex,v 1.5 2005/10/10 08:38:29 tantau Exp $ +\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfbasesnakes.code.tex,v 1.6 2005/10/25 08:18:14 tantau Exp $ % Copyright 2005 by Till Tantau . % @@ -14,7 +14,7 @@ % % #1 = snake name % #1 = initial state -% #3= states of the snake +% #3 = states of the snake % % % This command declares a new snake for later use. The second @@ -273,7 +273,7 @@ \expandafter\expandafter\expandafter\pgf@marshal \expandafter\expandafter\expandafter{\csname pgf@snake@@\pgf@snake@name @\pgf@snake@current@state @options\endcsname}% \ifx\pgf@snake@next\relax% - \pgf@snake@next=\pgf@snake@do@code% + \let\pgf@snake@next=\pgf@snake@do@code% \fi% \pgf@snake@next% } @@ -291,7 +291,7 @@ \advance\pgfsnakecompleteddistance by\pgf@xa% % Next iteration: \let\pgf@snake@current@state=\pgf@snake@next@state% - \pgf@snake@run + \pgf@snake@run% } \define@key{pgfsnake}{width}{% diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex index 3496b92cf6d..0a3df3dec31 100644 --- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex @@ -1,4 +1,4 @@ -\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcore.code.tex,v 1.2 2005/07/06 15:58:57 tantau Exp $ +\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcore.code.tex,v 1.3 2005/10/25 08:18:14 tantau Exp $ % Copyright 2005 by Till Tantau . % @@ -9,7 +9,7 @@ \input pgfcoremath.code.tex \input pgfcorepoints.code.tex -\input pgfcorepathconstruction.code.tex +\input pgfcorepathconstruct.code.tex \input pgfcorepathusage.code.tex \input pgfcorescopes.code.tex \input pgfcoregraphicstate.code.tex diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex new file mode 100644 index 00000000000..97df7f0cf34 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex @@ -0,0 +1,826 @@ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex,v 1.1 2005/10/25 08:18:14 tantau Exp $ + +% Copyright 2005 by Till Tantau . +% +% This program can be redistributed and/or modified under the terms +% of the GNU Public License, version 2. + +\newdimen\pgf@path@lastx +\newdimen\pgf@path@lasty + + + +% Replace corners by arcs. +% +% #1 = in-size of arc +% #2 = out-size of arc +% +% Description: +% +% This command influences path construction command like +% \pgfpathlineto or \pgfpatharc. It will cause the corners at the end +% of these commands to be replaced by little arcs. If the +% corner is a 90 degrees corner and if #1=#2, a quarter-circle of +% radius #1 is put in place of the corner. If #1 and #2 are different, +% the quarter circle will instead by a quarter ellipse. If the angle +% is different from 90 degrees, a deformed quarter circle will +% result, which may or may not be desirable. For a ``perfect'' arc you +% must use the \pgfpatharc command. +% +% +% Example: One rounded corner. +% +% \pgfpathmoveto{\pgfpointxy{0}{0}} +% \pgfsetcornersarced{4pt}{4pt} +% \pgfpathlineto{\pgfpointxy{0}{1}} +% \pgfpathlineto{\pgfpointxy{1}{1}} +% \pgfstroke +% +% Example: A rounded rectangle +% +% \pgfsetcornersarced{4pt}{4pt} +% \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{1cm}{1cm}} +% \pgfstroke +% +% Example: A rounded triangles +% +% \pgfsetcornersarced{4pt}{4pt} +% \pgfpathmoveto{\pgfpointorigin} +% \pgfpathlineto{\pgfpoint{1cm}{0cm}} +% \pgfpathlineto{\pgfpoint{1cm}{1cm}} +% \pgfpathclose +% \pgfstroke + +\newif\ifpgf@arccorners + +\def\pgfsetcornersarced#1{% + \pgf@process{#1}% + \edef\pgf@corner@arc{{\the\pgf@x}{\the\pgf@y}}% + \pgf@arccornerstrue% + \ifdim\pgf@x=0pt% + \ifdim\pgf@y=0pt\relax% + \pgf@arccornersfalse% + \fi% + \fi% +} + +\def\pgf@roundcornerifneeded{% + \ifpgf@arccorners\expandafter\pgfsyssoftpath@specialround\pgf@corner@arc\fi% +} + + +% Move current point to #1. +% +% #1 = new current point +% +% Example: +% +% \pgfpathmoveto{\pgfxy(0,0)} +% \pgfpathlineto{\pgfxy(0,1)} +% \pgfstroke + +\def\pgfpathmoveto#1{% + \pgfpointtransformed{#1}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgfsyssoftpath@moveto{\the\pgf@x}{\the\pgf@y}% + \global\pgf@path@lastx=\pgf@x% + \global\pgf@path@lasty=\pgf@y% +} + +\def\pgf@protocolsizes#1#2{% + \ifpgf@relevantforpicturesize% + \ifdim#1<\pgf@picminx\global\pgf@picminx#1\fi% + \ifdim#1>\pgf@picmaxx\global\pgf@picmaxx#1\fi% + \ifdim#2<\pgf@picminy\global\pgf@picminy#2\fi% + \ifdim#2>\pgf@picmaxy\global\pgf@picmaxy#2\fi% + \fi% + \ifdim#1<\pgf@pathminx\global\pgf@pathminx#1\fi% + \ifdim#1>\pgf@pathmaxx\global\pgf@pathmaxx#1\fi% + \ifdim#2<\pgf@pathminy\global\pgf@pathminy#2\fi% + \ifdim#2>\pgf@pathmaxy\global\pgf@pathmaxy#2\fi% +} + + +\def\pgf@resetpathsizes{% + \global\pgf@pathmaxx=-16000pt\relax% + \global\pgf@pathminx=16000pt\relax% + \global\pgf@pathmaxy=-16000pt\relax% + \global\pgf@pathminy=16000pt\relax% +} + +\def\pgf@getpathsizes#1{% + \edef#1{{\the\pgf@pathmaxx}{\the\pgf@pathminx}{\the\pgf@pathmaxy}{\the\pgf@pathminy}}% +} +\def\pgf@setpathsizes#1{% + \expandafter\pgf@@setpathsizes#1% +} +\def\pgf@@setpathsizes#1#2#3#4{% + \global\pgf@pathmaxx=#1\relax% + \global\pgf@pathminx=#2\relax% + \global\pgf@pathmaxy=#3\relax% + \global\pgf@pathminy=#4\relax% +} + + + + + +% Append a line from the current point to #1 to the current path. +% +% #1 = end of line +% +% Example: +% +% \pgfpathmoveto{\pgfxy(0,0)} +% \pgfpathlineto{\pgfxy(0,1)} +% \pgfstroke + +\def\pgfpathlineto#1{% + \pgfpointtransformed{#1}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@roundcornerifneeded% + \pgfsyssoftpath@lineto{\the\pgf@x}{\the\pgf@y}% + \global\pgf@path@lastx=\pgf@x% + \global\pgf@path@lasty=\pgf@y% +} + + + +% Close the current path. +% +% Example: +% +% % Draws two triangles +% \pgfpathmoveto{\pgfxy(0,0)} +% \pgfpathlineto{\pgfxy(0,1)} +% \pgfpathlineto{\pgfxy(1,0)} +% \pgfclosepath +% \pgfpathmoveto{\pgfxy(2,0)} +% \pgfpathlineto{\pgfxy(2,1)} +% \pgfpathlineto{\pgfxy(3,0)} +% \pgfpathclose +% \pgfstroke + +\def\pgfpathclose{% + \pgf@roundcornerifneeded% + \pgfsyssoftpath@closepath% +} + + +% Append a bezier spline from the current point to #3 with control +% points #1 and #2 to the current path. +% +% #1 = first control point +% #2 = second control point +% #3 = end point +% +% Example: +% +% \pgfpathmoveto{\pgfxy(0,0)} +% \pgfpathcurveto{\pgfxy(0,1)}{\pgfxy(1,1)}{\pgfxy(1,2)} +% \pgfstroke + +\def\pgfpathcurveto#1#2#3{% + \pgfpointtransformed{#3}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@xb=\pgf@x% + \pgf@yb=\pgf@y% + \pgfpointtransformed{#2}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@xa=\pgf@x% + \pgf@ya=\pgf@y% + \pgfpointtransformed{#1}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@roundcornerifneeded% + \pgfsyssoftpath@curveto{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}{\the\pgf@xb}{\the\pgf@yb}% + \global\pgf@path@lastx=\pgf@xb% + \global\pgf@path@lasty=\pgf@yb% +} + +% Append an arc to the current point, where the current point is at +% angle #1 and the end is at angle #2. If #2 > #1, the arc is drawn +% counter-clockwise, otherwise it is clockwise. +% +% #1 = angle of first point +% #2 = angle of second point +% #3 = radius or x-radius/y-radius +% +% Example: +% +% \pgfpathmoveto{\pgfxy(0,0)} +% \pgfpatharc{0}{90}{2cm} +% \pgfstroke + +\def\pgfpatharc#1#2#3{% + \pgf@setcounter{pgf@countc}{#1}% + \pgf@setcounter{pgf@countd}{#2}% + \ifnum\c@pgf@countc>360\relax% + \advance\c@pgf@countc by-360\relax% + \fi% + \ifnum\c@pgf@countc<-360\relax% + \advance\c@pgf@countc by360\relax% + \fi% + \ifnum\c@pgf@countd>360\relax% + \advance\c@pgf@countd by-360\relax% + \fi% + \ifnum\c@pgf@countd<-360\relax% + \advance\c@pgf@countd by360\relax% + \fi% + \loop% + \@tempcnta=\c@pgf@countc\relax% + \advance\@tempcnta by-\c@pgf@countd\relax% + \ifnum\@tempcnta<0\relax% + \@tempcnta=-\@tempcnta\relax% + \fi% + \ifnum\@tempcnta>90\relax% + \ifnum\c@pgf@countd>\c@pgf@countc\relax% + \@tempcnta=\c@pgf@countc\relax% + \advance\@tempcnta by 90\relax% + \expandafter\pgf@arc\expandafter{\expandafter\c@pgf@countc\expandafter}\expandafter{\the\@tempcnta}{#3}% + \advance\c@pgf@countc by 90\relax% + \else + \@tempcnta=\c@pgf@countc\relax% + \advance\@tempcnta by -90\relax% + \expandafter\pgf@arc\expandafter{\expandafter\c@pgf@countc\expandafter}\expandafter{\the\@tempcnta}{#3}% + \advance\c@pgf@countc by -90\relax% + \fi% + \repeat% + \pgf@roundcornerifneeded% + \pgf@arc{\c@pgf@countc}{\c@pgf@countd}{#3}% +} + +\def\pgf@arc#1#2#3{% + \in@/{#3}% + \ifin@% + \pgf@@arc{#1}{#2}#3\@@% + \else + \pgf@@arc{#1}{#2}#3/#3\@@% + \fi% +} + +\def\pgf@@arc#1#2#3/#4\@@{% + \setlength{\@tempdima}{#3}% + \setlength{\@tempdimb}{#4}% + \@tempcnta=#1\relax% + \@tempcntb=#2\relax% + \advance\@tempcntb by-\@tempcnta\relax% + \ifnum\@tempcntb<0\relax% + \@tempcntb=-\@tempcntb\relax% + \fi% + \ifnum\@tempcntb>85\relax% hackery to correct the control points + \@tempdima=0.0555\@tempdima\relax% + \@tempdimb=0.0555\@tempdimb\relax% + \else% + \ifnum\@tempcntb>75\relax% + \@tempdima=0.055\@tempdima\relax% + \@tempdimb=0.055\@tempdimb\relax% + \else% + \ifnum\@tempcntb>60\relax% + \@tempdima=0.0545\@tempdima\relax% + \@tempdimb=0.0545\@tempdimb\relax% + \else% + \@tempdima=0.054\@tempdima\relax% + \@tempdimb=0.054\@tempdimb\relax% + \fi% + \fi% + \fi + \@tempdima=\@tempcntb\@tempdima\relax% + \divide\@tempdima by 9\relax% + \@tempdimb=\@tempcntb\@tempdimb\relax% + \divide\@tempdimb by 9\relax% + %.. controls +(\@tempcnta+90:\@tempdima) and +(\@tempcntb-90:\@tempdima) .. +(-(#1:#3)+(#2:#3))% + % store first support vector in xa/ya: + \@tempcnta=#1\relax% + \ifnum#2>#1\relax% + \advance\@tempcnta by 90\relax% + \else% + \advance\@tempcnta by -90\relax% + \fi% + \pgfpointtransformed{\pgfpointpolar{\@tempcnta}{\@tempdima/\@tempdimb}}% + \advance\pgf@x by-\pgf@pt@x% + \advance\pgf@y by-\pgf@pt@y% + \pgf@xa=\pgf@path@lastx% + \pgf@ya=\pgf@path@lasty% + \advance\pgf@xa by \pgf@x% + \advance\pgf@ya by \pgf@y% + % store target in xb/yb: + \@tempcnta=#1\relax% + \pgfpointtransformed{\pgfpointpolar{\@tempcnta}{#3/#4}}% + \pgf@xb=\pgf@path@lastx% + \pgf@yb=\pgf@path@lasty% + \advance\pgf@xb by -\pgf@x% + \advance\pgf@yb by -\pgf@y% + \@tempcnta=#2\relax% + \pgfpointtransformed{\pgfpointpolar{\@tempcnta}{#3/#4}}% + \advance\pgf@xb by \pgf@x% + \advance\pgf@yb by \pgf@y% + % store second support xc/yc: + \@tempcnta=#2\relax% + \ifnum#2>#1\relax% + \advance\@tempcnta by -90\relax% + \else% + \advance\@tempcnta by 90\relax% + \fi% + \pgfpointtransformed{\pgfpointpolar{\@tempcnta}{\@tempdima/\@tempdimb}}% + \advance\pgf@x by-\pgf@pt@x% + \advance\pgf@y by-\pgf@pt@y% + \pgf@xc=\pgf@xb\relax% + \pgf@yc=\pgf@yb\relax% + \advance \pgf@xc by \pgf@x\relax% + \advance \pgf@yc by \pgf@y\relax% + \pgfsyssoftpath@curveto{\the\pgf@xa}{\the\pgf@ya}{\the\pgf@xc}{\the\pgf@yc}{\the\pgf@xb}{\the\pgf@yb}% + \global\pgf@path@lastx=\pgf@xb% + \global\pgf@path@lasty=\pgf@yb% + \pgf@protocolsizes{\pgf@xa}{\pgf@ya}% + \pgf@protocolsizes{\pgf@xb}{\pgf@yb}% + \pgf@protocolsizes{\pgf@xc}{\pgf@yc}% +} + +% Append an ellipse to the current path. +% +% #1 = center +% #2 = first axis +% #3 = second axis +% +% Example: +% +% % Add a circle of radius 3cm around the origin +% \pgfpathellipse{\pgforigin}{\pgfxy(2,0)}{\pgfxy(0,1)} +% +% % Draw a non-filled circle of radius 1cm around the point (1,1) +% \pgfpathellipse{\pgfxy(1,1)}{\pgfxy(1,1)}{\pgfxy(-2,2)} +% \pgfstroke + +\def\pgfpathellipse#1#2#3{% + \pgfpointtransformed{#1}% store center in xc/yc + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgfpointtransformed{#2}% + \pgf@xa=\pgf@x% store first axis in xa/ya + \pgf@ya=\pgf@y% + \advance\pgf@xa by-\pgf@pt@x% + \advance\pgf@ya by-\pgf@pt@y% + \pgfpointtransformed{#3}% + \pgf@xb=\pgf@x% store second axis in xb/yb + \pgf@yb=\pgf@y% + \advance\pgf@xb by-\pgf@pt@x% + \advance\pgf@yb by-\pgf@pt@y% + {% + \advance\pgf@xa by\pgf@xc% + \advance\pgf@ya by\pgf@yc% + \pgfsyssoftpath@moveto{\the\pgf@xa}{\the\pgf@ya}% + \pgf@protocolsizes{\pgf@xa}{\pgf@ya}% + }% + \pgf@x=0.555\pgf@xb% first arc + \pgf@y=0.555\pgf@yb% + \advance\pgf@x by\pgf@xa% + \advance\pgf@y by\pgf@ya% + \advance\pgf@x by\pgf@xc% + \advance\pgf@y by\pgf@yc% + \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@x=0.555\pgf@xa% + \pgf@y=0.555\pgf@ya% + \advance\pgf@x by\pgf@xb% + \advance\pgf@y by\pgf@yb% + {% + \advance\pgf@x by\pgf@xc% + \advance\pgf@y by\pgf@yc% + \advance\pgf@xb by\pgf@xc% + \advance\pgf@yb by\pgf@yc% + \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xb}{\the\pgf@yb}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@protocolsizes{\pgf@xb}{\pgf@yb}% + }% + \pgf@xa=-\pgf@xa% flip first axis + \pgf@ya=-\pgf@ya% + \pgf@x=0.555\pgf@xa% second arc + \pgf@y=0.555\pgf@ya% + \advance\pgf@x by\pgf@xb% + \advance\pgf@y by\pgf@yb% + \advance\pgf@x by\pgf@xc% + \advance\pgf@y by\pgf@yc% + \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@x=0.555\pgf@xb% + \pgf@y=0.555\pgf@yb% + \advance\pgf@x by\pgf@xa% + \advance\pgf@y by\pgf@ya% + {% + \advance\pgf@x by\pgf@xc% + \advance\pgf@y by\pgf@yc% + \advance\pgf@xa by\pgf@xc% + \advance\pgf@ya by\pgf@yc% + \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@protocolsizes{\pgf@xa}{\pgf@ya}% + }% + \pgf@xb=-\pgf@xb% flip second axis + \pgf@yb=-\pgf@yb% + \pgf@x=0.555\pgf@xb% third arc + \pgf@y=0.555\pgf@yb% + \advance\pgf@x by\pgf@xa% + \advance\pgf@y by\pgf@ya% + \advance\pgf@x by\pgf@xc% + \advance\pgf@y by\pgf@yc% + \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@x=0.555\pgf@xa% + \pgf@y=0.555\pgf@ya% + \advance\pgf@x by\pgf@xb% + \advance\pgf@y by\pgf@yb% + {% + \advance\pgf@x by\pgf@xc% + \advance\pgf@y by\pgf@yc% + \advance\pgf@xb by\pgf@xc% + \advance\pgf@yb by\pgf@yc% + \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xb}{\the\pgf@yb}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@protocolsizes{\pgf@xb}{\pgf@yb}% + }% + \pgf@xa=-\pgf@xa% flip first axis once more + \pgf@ya=-\pgf@ya% + \pgf@x=0.555\pgf@xa% fourth arc + \pgf@y=0.555\pgf@ya% + \advance\pgf@x by\pgf@xb% + \advance\pgf@y by\pgf@yb% + \advance\pgf@x by\pgf@xc% + \advance\pgf@y by\pgf@yc% + \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@x=0.555\pgf@xb% + \pgf@y=0.555\pgf@yb% + \advance\pgf@x by\pgf@xa% + \advance\pgf@y by\pgf@ya% + {% + \advance\pgf@x by\pgf@xc% + \advance\pgf@y by\pgf@yc% + \advance\pgf@xa by\pgf@xc% + \advance\pgf@ya by\pgf@yc% + \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \pgf@protocolsizes{\pgf@xa}{\pgf@ya}% + }% + \pgfsyssoftpath@closepath% + \pgfsyssoftpath@moveto{\the\pgf@xc}{\the\pgf@yc}% +} + + + +% Append a circle to the current path +% +% #1 = center +% #2 = radius +% +% Example: +% +% % Append a circle of radius 3cm around the the point (1,1) +% \pgfpathcircle{\pgxy(1,1)}{3cm} + +\def\pgfpathcircle#1#2{\pgfpathellipse{#1}{\pgfpoint{#2}{0pt}}{\pgfpoint{0pt}{#2}}} + + + +% Append a rectangle to the current path +% +% #1 = lower left corner point of rectangle +% #2 = width and height vector +% +% Example: +% +% % A rectangle with corners (2,2) and (3,3) +% \pgfpathrectangle{\pgfpointxy{2}{2}}{\pgfpointxy{1}{1}} + +\def\pgfpathrectangle{% + \let\pgfrect@next=\pgf@specialrect% + \ifpgf@pt@identity% + \ifpgf@arccorners% + \else% + \let\pgfrect@next=\pgf@normalrect% + \fi% + \fi% + \pgfrect@next% +} + +\def\pgf@normalrect#1#2{% + \pgf@process{#2}% + \pgf@xa=\pgf@x% + \pgf@ya=\pgf@y% + \pgfpointtransformed{#1}% + \pgfsyssoftpath@rect{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + \advance\pgf@x by\pgf@xa\relax% + \advance\pgf@y by\pgf@ya\relax% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% +} + +\def\pgf@specialrect#1#2{% + \pgf@process{#2}% + \pgf@xa=\pgf@x% + \pgf@ya=\pgf@y% + \pgf@process{#1}% + \pgf@xb=\pgf@x% + \pgf@yb=\pgf@y% + \advance\pgf@xa by\pgf@xb% + \advance\pgf@ya by\pgf@yb% + \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}% + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}% + \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}% + \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}% + \pgfpathclose% + \pgfpathmoveto{\pgfpoint{\pgf@xb}{\pgf@xb}}% +} + +% Append a rectangle to the current path +% +% #1 = one corner of the rectangle +% #2 = opposite corner of the rectangle +% +% Example: +% +% % A rectangle with corners (2,2) and (3,3) +% \pgfpathrectanglecorners{\pgfpointxy{2}{2}}{\pgfpointxy{3}{3}} + +\def\pgfpathrectanglecorners#1#2{% + \pgf@process{#2}% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@process{#1}% + \advance\pgf@xc by-\pgf@x% + \advance\pgf@yc by-\pgf@y% + \pgfpathrectangle{#1}{\pgfpoint{\pgf@xc}{\pgf@yc}}% +} + + +% Append a grid to the current path. +% +% #1 = lower left point of grid +% #2 = upper right point of grid +% +% Options: +% +% stepx = x-step dimension (default 1cm) +% stepy = y-step dimension (default 1cm) +% step = dimesion vector +% +% Example: +% +% \pgfsetlinewidth{0.8pt} +% \pgfgrid{\pgfxy(0,0)}{\pgfxy(3,2)} +% \pgfsetlinewidth{0.4pt} +% \pgfgrid[stepx=1cm,stepy=1cm]{\pgfxy(0,0)}{\pgfxy(3,2)} + +\define@key{pgfbase}{stepx}{\setlength{\pgf@x}{#1}\relax} +\define@key{pgfbase}{stepy}{\setlength{\pgf@y}{#1}\relax} +\define@key{pgfbase}{step}{\pgf@process{#1}} + +\def\pgfpathgrid{\@ifnextchar[{\pgf@pathgrid}{\pgf@pathgrid[]}} +\def\pgf@pathgrid[#1]#2#3{% + \setkeys{pgfbase}{stepx=1cm,stepy=1cm}% + \setkeys{pgfbase}{#1}% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@process{#3}% + \pgf@xb=\pgf@x% + \pgf@yb=\pgf@y% + \pgf@process{#2}% + \pgf@xa=\pgf@x\relax% + \pgf@ya=\pgf@y\relax% + {% + % compute bounding box + % first corner + \pgf@x=\pgf@xb% + \pgf@y=\pgf@yb% + \pgf@pos@transform{\pgf@x}{\pgf@y}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + % second corner + \pgf@x=\pgf@xb% + \pgf@y=\pgf@ya% + \pgf@pos@transform{\pgf@x}{\pgf@y}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + % third corner + \pgf@x=\pgf@xa% + \pgf@y=\pgf@yb% + \pgf@pos@transform{\pgf@x}{\pgf@y}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + % fourth corner + \pgf@x=\pgf@xa% + \pgf@y=\pgf@ya% + \pgf@pos@transform{\pgf@x}{\pgf@y}% + \pgf@protocolsizes{\pgf@x}{\pgf@y}% + }% + \c@pgf@counta=\pgf@y\relax% + \c@pgf@countb=\pgf@yc\relax% + \divide\c@pgf@counta by\c@pgf@countb\relax% + \pgf@y=\c@pgf@counta\pgf@yc\relax% + \ifdim\pgf@y<\pgf@ya% + \advance\pgf@y by\pgf@yc% + \fi% + \loop% horizontal lines + {% + \pgf@xa=\pgf@x% + \pgf@ya=\pgf@y% + \pgf@pos@transform{\pgf@xa}{\pgf@ya} + \pgfsyssoftpath@moveto{\the\pgf@xa}{\the\pgf@ya}% + \pgf@xa=\pgf@xb% + \pgf@ya=\pgf@y% + \pgf@pos@transform{\pgf@xa}{\pgf@ya} + \pgfsyssoftpath@lineto{\the\pgf@xa}{\the\pgf@ya}% + }% + \advance\pgf@y by\pgf@yc% + \ifdim\pgf@y<\pgf@yb% + \repeat% + \advance\pgf@y by-0.01pt\relax% + \ifdim\pgf@y<\pgf@yb% + {% + \pgf@xa=\pgf@x% + \pgf@ya=\pgf@y% + \pgf@pos@transform{\pgf@xa}{\pgf@ya} + \pgfsyssoftpath@moveto{\the\pgf@xa}{\the\pgf@ya}% + \pgf@xa=\pgf@xb% + \pgf@ya=\pgf@y% + \pgf@pos@transform{\pgf@xa}{\pgf@ya} + \pgfsyssoftpath@lineto{\the\pgf@xa}{\the\pgf@ya}% + }% + \fi% + \c@pgf@counta=\pgf@x\relax% + \c@pgf@countb=\pgf@xc\relax% + \divide\c@pgf@counta by\c@pgf@countb\relax% + \pgf@x=\c@pgf@counta\pgf@xc\relax% + \ifdim\pgf@x<\pgf@xa% + \advance\pgf@x by\pgf@xc% + \fi% + \loop% vertical lines + {% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@ya% + \pgf@pos@transform{\pgf@xc}{\pgf@yc} + \pgfsyssoftpath@moveto{\the\pgf@xc}{\the\pgf@yc}% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@yb% + \pgf@pos@transform{\pgf@xc}{\pgf@yc} + \pgfsyssoftpath@lineto{\the\pgf@xc}{\the\pgf@yc}% + }% + \advance\pgf@x by\pgf@xc% + \ifdim\pgf@x<\pgf@xb% + \repeat% + \advance\pgf@x by-0.01pt\relax% + \ifdim\pgf@x<\pgf@xb% + {% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@ya% + \pgf@pos@transform{\pgf@xc}{\pgf@yc} + \pgfsyssoftpath@moveto{\the\pgf@xc}{\the\pgf@yc}% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@yb% + \pgf@pos@transform{\pgf@xc}{\pgf@yc} + \pgfsyssoftpath@lineto{\the\pgf@xc}{\the\pgf@yc}% + }% + \fi% +} + + + +% Append two half-parabolas to the path +% +% #1 = bend (relative to current point) +% #2 = end point (relative to bend point) +% +% Description: +% +% This command appends a half-parabola that starts at the current point +% and has its bend at #1+current point. Then, a second parabola is +% appended that starts at #1+current point, where it also has its +% minimum/maximum, and ends at #1+current point+#2, which becomes the +% new current point. +% +% By setting #2 = (0,0) you draw only a half parabola that goes from the +% current point to the bend; by setting #1 = (0,0) +% you draw a half parabola that going to current point + #2 and has its +% bend at the current point. +% +% Examples: +% +% % Half-parabola going ``up and right'' +% \pgfpathmoveto{\pgfpointorigin} +% \pgfpathparabola{\pgfpointorigin}{\pgfpoint{2cm}{4cm}} +% +% % Half-parabola going ``down and right'' +% \pgfpathmoveto{\pgfpointorigin} +% \pgfpathparabola{\pgfpoint{-2cm}{4cm}}}{\pgfpointorigin} +% +% % Full parabola +% \pgfpathmoveto{\pgfpointorigin} +% \pgfpathparabola{\pgfpoint{-2cm}{4cm}}{\pgfpoint{2cm}{4cm}} + +\def\pgfpathparabola#1#2{% + {% + \pgf@process{#2}% untransformed + \pgf@xb=\pgf@x% + \pgf@yb=\pgf@y% + \pgf@process{#1}% untransformed + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \@tempswatrue% + \ifdim\pgf@xb=0pt\relax% + \ifdim\pgf@yb=0pt\relax% + \@tempswafalse% + \fi% + \fi% + {% + \if@tempswa% + \pgf@arccornersfalse + \else% + \fi% + \@tempswatrue% + \ifdim\pgf@xc=0pt\relax% + \ifdim\pgf@yc=0pt\relax% + \@tempswafalse% + \fi% + \fi% + \if@tempswa + {% + \pgf@pt@x=\pgf@path@lastx% + \pgf@pt@y=\pgf@path@lasty% + \pgfpathcurveto% + {\pgfpoint{.1125\pgf@xc}{.225\pgf@yc}}% found by trial and error + {\pgfpoint{.5\pgf@xc}{\pgf@yc}}% found by trial and error + {\pgfpoint{\pgf@xc}{\pgf@yc}}% + }% + \fi% + }% + \if@tempswa% + \pgf@xc=\pgf@xb% + \pgf@yc=\pgf@yb% + {% + \pgf@pt@x=\pgf@path@lastx% + \pgf@pt@y=\pgf@path@lasty% + \pgfpathcurveto% + {\pgfpoint{.5\pgf@xc}{0\pgf@yc}}% found by trial and error + {\pgfpoint{.8875\pgf@xc}{.775\pgf@yc}}% found by trial and error + {\pgfpoint{\pgf@xc}{\pgf@yc}}% + }% + \fi% + }% +} + + + + +% Append a sine curve between 0 and \pi/2 to the path. +% +% #1 = vector, describing the width and height of the curve +% +% Description: +% +% This command appends a sine curve in the interval 0 and \pi/2 to the +% current path. The sine curve ends at currentpoint+#1. +% +% Examples: +% +% % One complete sine in the interval [0,\pi] +% \pgfpathmoveto{\pgfpointorigin} +% \pgfpathsine{\pgfpoint{1.57cm}{1cm}} +% \pgfpathcosine{\pgfpoint{3.141cm}{0cm}} + +\def\pgfpathsine#1{% + {% + \pgf@process{#1}% untransformed + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@pt@x=\pgf@path@lastx% evil trickery to transform to the last point + \pgf@pt@y=\pgf@path@lasty% + \pgfpathcurveto% + {\pgfpoint{.31830988618\pgf@xc}{.5\pgf@yc}}% found by trial and error + {\pgfpoint{.63502822294\pgf@xc}{\pgf@yc}}% found by trial and error + {\pgfpoint{\pgf@xc}{\pgf@yc}}% + }% +} + +% Append a cosine curve between 0 and \pi/2 to the path. +% +% #1 = vector, describing the width and height of the curve +% +% Examples: +% +% % One complete sine in the interval [0,\pi] +% \pgfpathmoveto{\pgfpointorigin} +% \pgfpathsine{\pgfpoint{1.57cm}{1cm}} +% \pgfpathcosine{\pgfpoint{3.141cm}{0cm}} + +\def\pgfpathcosine#1{% + {% + \pgf@process{#1}% untransformed + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgf@pt@x=\pgf@path@lastx% evil trickery to transform to the last point + \pgf@pt@y=\pgf@path@lasty% + \pgfpathcurveto% + {\pgfpoint{.36497177706\pgf@xc}{0pt}}% found by trial and error + {\pgfpoint{.68169011382\pgf@xc}{.5\pgf@yc}}% found by trial and error + {\pgfpoint{\pgf@xc}{\pgf@yc}}% + }% +} + + +\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruction.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruction.code.tex deleted file mode 100644 index b96bf719320..00000000000 --- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruction.code.tex +++ /dev/null @@ -1,826 +0,0 @@ -\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorepathconstruction.code.tex,v 1.2 2005/09/30 07:14:03 tantau Exp $ - -% Copyright 2005 by Till Tantau . -% -% This program can be redistributed and/or modified under the terms -% of the GNU Public License, version 2. - -\newdimen\pgf@path@lastx -\newdimen\pgf@path@lasty - - - -% Replace corners by arcs. -% -% #1 = in-size of arc -% #2 = out-size of arc -% -% Description: -% -% This command influences path construction command like -% \pgfpathlineto or \pgfpatharc. It will cause the corners at the end -% of these commands to be replaced by little arcs. If the -% corner is a 90 degrees corner and if #1=#2, a quarter-circle of -% radius #1 is put in place of the corner. If #1 and #2 are different, -% the quarter circle will instead by a quarter ellipse. If the angle -% is different from 90 degrees, a deformed quarter circle will -% result, which may or may not be desirable. For a ``perfect'' arc you -% must use the \pgfpatharc command. -% -% -% Example: One rounded corner. -% -% \pgfpathmoveto{\pgfpointxy{0}{0}} -% \pgfsetcornersarced{4pt}{4pt} -% \pgfpathlineto{\pgfpointxy{0}{1}} -% \pgfpathlineto{\pgfpointxy{1}{1}} -% \pgfstroke -% -% Example: A rounded rectangle -% -% \pgfsetcornersarced{4pt}{4pt} -% \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{1cm}{1cm}} -% \pgfstroke -% -% Example: A rounded triangles -% -% \pgfsetcornersarced{4pt}{4pt} -% \pgfpathmoveto{\pgfpointorigin} -% \pgfpathlineto{\pgfpoint{1cm}{0cm}} -% \pgfpathlineto{\pgfpoint{1cm}{1cm}} -% \pgfpathclose -% \pgfstroke - -\newif\ifpgf@arccorners - -\def\pgfsetcornersarced#1{% - \pgf@process{#1}% - \edef\pgf@corner@arc{{\the\pgf@x}{\the\pgf@y}}% - \pgf@arccornerstrue% - \ifdim\pgf@x=0pt% - \ifdim\pgf@y=0pt\relax% - \pgf@arccornersfalse% - \fi% - \fi% -} - -\def\pgf@roundcornerifneeded{% - \ifpgf@arccorners\expandafter\pgfsyssoftpath@specialround\pgf@corner@arc\fi% -} - - -% Move current point to #1. -% -% #1 = new current point -% -% Example: -% -% \pgfpathmoveto{\pgfxy(0,0)} -% \pgfpathlineto{\pgfxy(0,1)} -% \pgfstroke - -\def\pgfpathmoveto#1{% - \pgfpointtransformed{#1}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgfsyssoftpath@moveto{\the\pgf@x}{\the\pgf@y}% - \global\pgf@path@lastx=\pgf@x% - \global\pgf@path@lasty=\pgf@y% -} - -\def\pgf@protocolsizes#1#2{% - \ifpgf@relevantforpicturesize% - \ifdim#1<\pgf@picminx\global\pgf@picminx#1\fi% - \ifdim#1>\pgf@picmaxx\global\pgf@picmaxx#1\fi% - \ifdim#2<\pgf@picminy\global\pgf@picminy#2\fi% - \ifdim#2>\pgf@picmaxy\global\pgf@picmaxy#2\fi% - \fi% - \ifdim#1<\pgf@pathminx\global\pgf@pathminx#1\fi% - \ifdim#1>\pgf@pathmaxx\global\pgf@pathmaxx#1\fi% - \ifdim#2<\pgf@pathminy\global\pgf@pathminy#2\fi% - \ifdim#2>\pgf@pathmaxy\global\pgf@pathmaxy#2\fi% -} - - -\def\pgf@resetpathsizes{% - \global\pgf@pathmaxx=-16000pt\relax% - \global\pgf@pathminx=16000pt\relax% - \global\pgf@pathmaxy=-16000pt\relax% - \global\pgf@pathminy=16000pt\relax% -} - -\def\pgf@getpathsizes#1{% - \edef#1{{\the\pgf@pathmaxx}{\the\pgf@pathminx}{\the\pgf@pathmaxy}{\the\pgf@pathminy}}% -} -\def\pgf@setpathsizes#1{% - \expandafter\pgf@@setpathsizes#1% -} -\def\pgf@@setpathsizes#1#2#3#4{% - \global\pgf@pathmaxx=#1\relax% - \global\pgf@pathminx=#2\relax% - \global\pgf@pathmaxy=#3\relax% - \global\pgf@pathminy=#4\relax% -} - - - - - -% Append a line from the current point to #1 to the current path. -% -% #1 = end of line -% -% Example: -% -% \pgfpathmoveto{\pgfxy(0,0)} -% \pgfpathlineto{\pgfxy(0,1)} -% \pgfstroke - -\def\pgfpathlineto#1{% - \pgfpointtransformed{#1}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@roundcornerifneeded% - \pgfsyssoftpath@lineto{\the\pgf@x}{\the\pgf@y}% - \global\pgf@path@lastx=\pgf@x% - \global\pgf@path@lasty=\pgf@y% -} - - - -% Close the current path. -% -% Example: -% -% % Draws two triangles -% \pgfpathmoveto{\pgfxy(0,0)} -% \pgfpathlineto{\pgfxy(0,1)} -% \pgfpathlineto{\pgfxy(1,0)} -% \pgfclosepath -% \pgfpathmoveto{\pgfxy(2,0)} -% \pgfpathlineto{\pgfxy(2,1)} -% \pgfpathlineto{\pgfxy(3,0)} -% \pgfpathclose -% \pgfstroke - -\def\pgfpathclose{% - \pgf@roundcornerifneeded% - \pgfsyssoftpath@closepath% -} - - -% Append a bezier spline from the current point to #3 with control -% points #1 and #2 to the current path. -% -% #1 = first control point -% #2 = second control point -% #3 = end point -% -% Example: -% -% \pgfpathmoveto{\pgfxy(0,0)} -% \pgfpathcurveto{\pgfxy(0,1)}{\pgfxy(1,1)}{\pgfxy(1,2)} -% \pgfstroke - -\def\pgfpathcurveto#1#2#3{% - \pgfpointtransformed{#3}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@xb=\pgf@x% - \pgf@yb=\pgf@y% - \pgfpointtransformed{#2}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgfpointtransformed{#1}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@roundcornerifneeded% - \pgfsyssoftpath@curveto{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}{\the\pgf@xb}{\the\pgf@yb}% - \global\pgf@path@lastx=\pgf@xb% - \global\pgf@path@lasty=\pgf@yb% -} - -% Append an arc to the current point, where the current point is at -% angle #1 and the end is at angle #2. If #2 > #1, the arc is drawn -% counter-clockwise, otherwise it is clockwise. -% -% #1 = angle of first point -% #2 = angle of second point -% #3 = radius or x-radius/y-radius -% -% Example: -% -% \pgfpathmoveto{\pgfxy(0,0)} -% \pgfpatharc{0}{90}{2cm} -% \pgfstroke - -\def\pgfpatharc#1#2#3{% - \pgf@setcounter{pgf@countc}{#1}% - \pgf@setcounter{pgf@countd}{#2}% - \ifnum\c@pgf@countc>360\relax% - \advance\c@pgf@countc by-360\relax% - \fi% - \ifnum\c@pgf@countc<-360\relax% - \advance\c@pgf@countc by360\relax% - \fi% - \ifnum\c@pgf@countd>360\relax% - \advance\c@pgf@countd by-360\relax% - \fi% - \ifnum\c@pgf@countd<-360\relax% - \advance\c@pgf@countd by360\relax% - \fi% - \loop% - \@tempcnta=\c@pgf@countc\relax% - \advance\@tempcnta by-\c@pgf@countd\relax% - \ifnum\@tempcnta<0\relax% - \@tempcnta=-\@tempcnta\relax% - \fi% - \ifnum\@tempcnta>90\relax% - \ifnum\c@pgf@countd>\c@pgf@countc\relax% - \@tempcnta=\c@pgf@countc\relax% - \advance\@tempcnta by 90\relax% - \expandafter\pgf@arc\expandafter{\expandafter\c@pgf@countc\expandafter}\expandafter{\the\@tempcnta}{#3}% - \advance\c@pgf@countc by 90\relax% - \else - \@tempcnta=\c@pgf@countc\relax% - \advance\@tempcnta by -90\relax% - \expandafter\pgf@arc\expandafter{\expandafter\c@pgf@countc\expandafter}\expandafter{\the\@tempcnta}{#3}% - \advance\c@pgf@countc by -90\relax% - \fi% - \repeat% - \pgf@roundcornerifneeded% - \pgf@arc{\c@pgf@countc}{\c@pgf@countd}{#3}% -} - -\def\pgf@arc#1#2#3{% - \in@/{#3}% - \ifin@% - \pgf@@arc{#1}{#2}#3\@@% - \else - \pgf@@arc{#1}{#2}#3/#3\@@% - \fi% -} - -\def\pgf@@arc#1#2#3/#4\@@{% - \setlength{\@tempdima}{#3}% - \setlength{\@tempdimb}{#4}% - \@tempcnta=#1\relax% - \@tempcntb=#2\relax% - \advance\@tempcntb by-\@tempcnta\relax% - \ifnum\@tempcntb<0\relax% - \@tempcntb=-\@tempcntb\relax% - \fi% - \ifnum\@tempcntb>85\relax% hackery to correct the control points - \@tempdima=0.0555\@tempdima\relax% - \@tempdimb=0.0555\@tempdimb\relax% - \else% - \ifnum\@tempcntb>75\relax% - \@tempdima=0.055\@tempdima\relax% - \@tempdimb=0.055\@tempdimb\relax% - \else% - \ifnum\@tempcntb>60\relax% - \@tempdima=0.0545\@tempdima\relax% - \@tempdimb=0.0545\@tempdimb\relax% - \else% - \@tempdima=0.054\@tempdima\relax% - \@tempdimb=0.054\@tempdimb\relax% - \fi% - \fi% - \fi - \@tempdima=\@tempcntb\@tempdima\relax% - \divide\@tempdima by 9\relax% - \@tempdimb=\@tempcntb\@tempdimb\relax% - \divide\@tempdimb by 9\relax% - %.. controls +(\@tempcnta+90:\@tempdima) and +(\@tempcntb-90:\@tempdima) .. +(-(#1:#3)+(#2:#3))% - % store first support vector in xa/ya: - \@tempcnta=#1\relax% - \ifnum#2>#1\relax% - \advance\@tempcnta by 90\relax% - \else% - \advance\@tempcnta by -90\relax% - \fi% - \pgfpointtransformed{\pgfpointpolar{\@tempcnta}{\@tempdima/\@tempdimb}}% - \advance\pgf@x by-\pgf@pt@x% - \advance\pgf@y by-\pgf@pt@y% - \pgf@xa=\pgf@path@lastx% - \pgf@ya=\pgf@path@lasty% - \advance\pgf@xa by \pgf@x% - \advance\pgf@ya by \pgf@y% - % store target in xb/yb: - \@tempcnta=#1\relax% - \pgfpointtransformed{\pgfpointpolar{\@tempcnta}{#3/#4}}% - \pgf@xb=\pgf@path@lastx% - \pgf@yb=\pgf@path@lasty% - \advance\pgf@xb by -\pgf@x% - \advance\pgf@yb by -\pgf@y% - \@tempcnta=#2\relax% - \pgfpointtransformed{\pgfpointpolar{\@tempcnta}{#3/#4}}% - \advance\pgf@xb by \pgf@x% - \advance\pgf@yb by \pgf@y% - % store second support xc/yc: - \@tempcnta=#2\relax% - \ifnum#2>#1\relax% - \advance\@tempcnta by -90\relax% - \else% - \advance\@tempcnta by 90\relax% - \fi% - \pgfpointtransformed{\pgfpointpolar{\@tempcnta}{\@tempdima/\@tempdimb}}% - \advance\pgf@x by-\pgf@pt@x% - \advance\pgf@y by-\pgf@pt@y% - \pgf@xc=\pgf@xb\relax% - \pgf@yc=\pgf@yb\relax% - \advance \pgf@xc by \pgf@x\relax% - \advance \pgf@yc by \pgf@y\relax% - \pgfsyssoftpath@curveto{\the\pgf@xa}{\the\pgf@ya}{\the\pgf@xc}{\the\pgf@yc}{\the\pgf@xb}{\the\pgf@yb}% - \global\pgf@path@lastx=\pgf@xb% - \global\pgf@path@lasty=\pgf@yb% - \pgf@protocolsizes{\pgf@xa}{\pgf@ya}% - \pgf@protocolsizes{\pgf@xb}{\pgf@yb}% - \pgf@protocolsizes{\pgf@xc}{\pgf@yc}% -} - -% Append an ellipse to the current path. -% -% #1 = center -% #2 = first axis -% #3 = second axis -% -% Example: -% -% % Add a circle of radius 3cm around the origin -% \pgfpathellipse{\pgforigin}{\pgfxy(2,0)}{\pgfxy(0,1)} -% -% % Draw a non-filled circle of radius 1cm around the point (1,1) -% \pgfpathellipse{\pgfxy(1,1)}{\pgfxy(1,1)}{\pgfxy(-2,2)} -% \pgfstroke - -\def\pgfpathellipse#1#2#3{% - \pgfpointtransformed{#1}% store center in xc/yc - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \pgfpointtransformed{#2}% - \pgf@xa=\pgf@x% store first axis in xa/ya - \pgf@ya=\pgf@y% - \advance\pgf@xa by-\pgf@pt@x% - \advance\pgf@ya by-\pgf@pt@y% - \pgfpointtransformed{#3}% - \pgf@xb=\pgf@x% store second axis in xb/yb - \pgf@yb=\pgf@y% - \advance\pgf@xb by-\pgf@pt@x% - \advance\pgf@yb by-\pgf@pt@y% - {% - \advance\pgf@xa by\pgf@xc% - \advance\pgf@ya by\pgf@yc% - \pgfsyssoftpath@moveto{\the\pgf@xa}{\the\pgf@ya}% - \pgf@protocolsizes{\pgf@xa}{\pgf@ya}% - }% - \pgf@x=0.555\pgf@xb% first arc - \pgf@y=0.555\pgf@yb% - \advance\pgf@x by\pgf@xa% - \advance\pgf@y by\pgf@ya% - \advance\pgf@x by\pgf@xc% - \advance\pgf@y by\pgf@yc% - \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@x=0.555\pgf@xa% - \pgf@y=0.555\pgf@ya% - \advance\pgf@x by\pgf@xb% - \advance\pgf@y by\pgf@yb% - {% - \advance\pgf@x by\pgf@xc% - \advance\pgf@y by\pgf@yc% - \advance\pgf@xb by\pgf@xc% - \advance\pgf@yb by\pgf@yc% - \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xb}{\the\pgf@yb}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@protocolsizes{\pgf@xb}{\pgf@yb}% - }% - \pgf@xa=-\pgf@xa% flip first axis - \pgf@ya=-\pgf@ya% - \pgf@x=0.555\pgf@xa% second arc - \pgf@y=0.555\pgf@ya% - \advance\pgf@x by\pgf@xb% - \advance\pgf@y by\pgf@yb% - \advance\pgf@x by\pgf@xc% - \advance\pgf@y by\pgf@yc% - \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@x=0.555\pgf@xb% - \pgf@y=0.555\pgf@yb% - \advance\pgf@x by\pgf@xa% - \advance\pgf@y by\pgf@ya% - {% - \advance\pgf@x by\pgf@xc% - \advance\pgf@y by\pgf@yc% - \advance\pgf@xa by\pgf@xc% - \advance\pgf@ya by\pgf@yc% - \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@protocolsizes{\pgf@xa}{\pgf@ya}% - }% - \pgf@xb=-\pgf@xb% flip second axis - \pgf@yb=-\pgf@yb% - \pgf@x=0.555\pgf@xb% third arc - \pgf@y=0.555\pgf@yb% - \advance\pgf@x by\pgf@xa% - \advance\pgf@y by\pgf@ya% - \advance\pgf@x by\pgf@xc% - \advance\pgf@y by\pgf@yc% - \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@x=0.555\pgf@xa% - \pgf@y=0.555\pgf@ya% - \advance\pgf@x by\pgf@xb% - \advance\pgf@y by\pgf@yb% - {% - \advance\pgf@x by\pgf@xc% - \advance\pgf@y by\pgf@yc% - \advance\pgf@xb by\pgf@xc% - \advance\pgf@yb by\pgf@yc% - \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xb}{\the\pgf@yb}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@protocolsizes{\pgf@xb}{\pgf@yb}% - }% - \pgf@xa=-\pgf@xa% flip first axis once more - \pgf@ya=-\pgf@ya% - \pgf@x=0.555\pgf@xa% fourth arc - \pgf@y=0.555\pgf@ya% - \advance\pgf@x by\pgf@xb% - \advance\pgf@y by\pgf@yb% - \advance\pgf@x by\pgf@xc% - \advance\pgf@y by\pgf@yc% - \edef\pgf@temp{{\the\pgf@x}{\the\pgf@y}}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@x=0.555\pgf@xb% - \pgf@y=0.555\pgf@yb% - \advance\pgf@x by\pgf@xa% - \advance\pgf@y by\pgf@ya% - {% - \advance\pgf@x by\pgf@xc% - \advance\pgf@y by\pgf@yc% - \advance\pgf@xa by\pgf@xc% - \advance\pgf@ya by\pgf@yc% - \expandafter\pgfsyssoftpath@curveto\pgf@temp{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@protocolsizes{\pgf@xa}{\pgf@ya}% - }% - \pgfsyssoftpath@closepath% - \pgfsyssoftpath@moveto{\the\pgf@xc}{\the\pgf@yc}% -} - - - -% Append a circle to the current path -% -% #1 = center -% #2 = radius -% -% Example: -% -% % Append a circle of radius 3cm around the the point (1,1) -% \pgfpathcircle{\pgxy(1,1)}{3cm} - -\def\pgfpathcircle#1#2{\pgfpathellipse{#1}{\pgfpoint{#2}{0pt}}{\pgfpoint{0pt}{#2}}} - - - -% Append a rectangle to the current path -% -% #1 = lower left corner point of rectangle -% #2 = width and height vector -% -% Example: -% -% % A rectangle with corners (2,2) and (3,3) -% \pgfpathrectangle{\pgfpointxy{2}{2}}{\pgfpointxy{1}{1}} - -\def\pgfpathrectangle{% - \let\pgfrect@next=\pgf@specialrect% - \ifpgf@pt@identity% - \ifpgf@arccorners% - \else% - \let\pgfrect@next=\pgf@normalrect% - \fi% - \fi% - \pgfrect@next% -} - -\def\pgf@normalrect#1#2{% - \pgf@process{#2}% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgfpointtransformed{#1}% - \pgfsyssoftpath@rect{\the\pgf@x}{\the\pgf@y}{\the\pgf@xa}{\the\pgf@ya}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \advance\pgf@x by\pgf@xa\relax% - \advance\pgf@y by\pgf@ya\relax% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% -} - -\def\pgf@specialrect#1#2{% - \pgf@process{#2}% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@process{#1}% - \pgf@xb=\pgf@x% - \pgf@yb=\pgf@y% - \advance\pgf@xa by\pgf@xb% - \advance\pgf@ya by\pgf@yb% - \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}% - \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}% - \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}% - \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}}% - \pgfpathclose% - \pgfpathmoveto{\pgfpoint{\pgf@xb}{\pgf@xb}}% -} - -% Append a rectangle to the current path -% -% #1 = one corner of the rectangle -% #2 = opposite corner of the rectangle -% -% Example: -% -% % A rectangle with corners (2,2) and (3,3) -% \pgfpathrectanglecorners{\pgfpointxy{2}{2}}{\pgfpointxy{3}{3}} - -\def\pgfpathrectanglecorners#1#2{% - \pgf@process{#2}% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \pgf@process{#1}% - \advance\pgf@xc by-\pgf@x% - \advance\pgf@yc by-\pgf@y% - \pgfpathrectangle{#1}{\pgfpoint{\pgf@xc}{\pgf@yc}}% -} - - -% Append a grid to the current path. -% -% #1 = lower left point of grid -% #2 = upper right point of grid -% -% Options: -% -% stepx = x-step dimension (default 1cm) -% stepy = y-step dimension (default 1cm) -% step = dimesion vector -% -% Example: -% -% \pgfsetlinewidth{0.8pt} -% \pgfgrid{\pgfxy(0,0)}{\pgfxy(3,2)} -% \pgfsetlinewidth{0.4pt} -% \pgfgrid[stepx=1cm,stepy=1cm]{\pgfxy(0,0)}{\pgfxy(3,2)} - -\define@key{pgfbase}{stepx}{\setlength{\pgf@x}{#1}\relax} -\define@key{pgfbase}{stepy}{\setlength{\pgf@y}{#1}\relax} -\define@key{pgfbase}{step}{\pgf@process{#1}} - -\def\pgfpathgrid{\@ifnextchar[{\pgf@pathgrid}{\pgf@pathgrid[]}} -\def\pgf@pathgrid[#1]#2#3{% - \setkeys{pgfbase}{stepx=1cm,stepy=1cm}% - \setkeys{pgfbase}{#1}% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \pgf@process{#3}% - \pgf@xb=\pgf@x% - \pgf@yb=\pgf@y% - \pgf@process{#2}% - \pgf@xa=\pgf@x\relax% - \pgf@ya=\pgf@y\relax% - {% - % compute bounding box - % first corner - \pgf@x=\pgf@xb% - \pgf@y=\pgf@yb% - \pgf@pos@transform{\pgf@x}{\pgf@y}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - % second corner - \pgf@x=\pgf@xb% - \pgf@y=\pgf@ya% - \pgf@pos@transform{\pgf@x}{\pgf@y}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - % third corner - \pgf@x=\pgf@xa% - \pgf@y=\pgf@yb% - \pgf@pos@transform{\pgf@x}{\pgf@y}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - % fourth corner - \pgf@x=\pgf@xa% - \pgf@y=\pgf@ya% - \pgf@pos@transform{\pgf@x}{\pgf@y}% - \pgf@protocolsizes{\pgf@x}{\pgf@y}% - }% - \c@pgf@counta=\pgf@y\relax% - \c@pgf@countb=\pgf@yc\relax% - \divide\c@pgf@counta by\c@pgf@countb\relax% - \pgf@y=\c@pgf@counta\pgf@yc\relax% - \ifdim\pgf@y<\pgf@ya% - \advance\pgf@y by\pgf@yc% - \fi% - \loop% horizontal lines - {% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@pos@transform{\pgf@xa}{\pgf@ya} - \pgfsyssoftpath@moveto{\the\pgf@xa}{\the\pgf@ya}% - \pgf@xa=\pgf@xb% - \pgf@ya=\pgf@y% - \pgf@pos@transform{\pgf@xa}{\pgf@ya} - \pgfsyssoftpath@lineto{\the\pgf@xa}{\the\pgf@ya}% - }% - \advance\pgf@y by\pgf@yc% - \ifdim\pgf@y<\pgf@yb% - \repeat% - \advance\pgf@y by-0.01pt\relax% - \ifdim\pgf@y<\pgf@yb% - {% - \pgf@xa=\pgf@x% - \pgf@ya=\pgf@y% - \pgf@pos@transform{\pgf@xa}{\pgf@ya} - \pgfsyssoftpath@moveto{\the\pgf@xa}{\the\pgf@ya}% - \pgf@xa=\pgf@xb% - \pgf@ya=\pgf@y% - \pgf@pos@transform{\pgf@xa}{\pgf@ya} - \pgfsyssoftpath@lineto{\the\pgf@xa}{\the\pgf@ya}% - }% - \fi% - \c@pgf@counta=\pgf@x\relax% - \c@pgf@countb=\pgf@xc\relax% - \divide\c@pgf@counta by\c@pgf@countb\relax% - \pgf@x=\c@pgf@counta\pgf@xc\relax% - \ifdim\pgf@x<\pgf@xa% - \advance\pgf@x by\pgf@xc% - \fi% - \loop% vertical lines - {% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@ya% - \pgf@pos@transform{\pgf@xc}{\pgf@yc} - \pgfsyssoftpath@moveto{\the\pgf@xc}{\the\pgf@yc}% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@yb% - \pgf@pos@transform{\pgf@xc}{\pgf@yc} - \pgfsyssoftpath@lineto{\the\pgf@xc}{\the\pgf@yc}% - }% - \advance\pgf@x by\pgf@xc% - \ifdim\pgf@x<\pgf@xb% - \repeat% - \advance\pgf@x by-0.01pt\relax% - \ifdim\pgf@x<\pgf@xb% - {% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@ya% - \pgf@pos@transform{\pgf@xc}{\pgf@yc} - \pgfsyssoftpath@moveto{\the\pgf@xc}{\the\pgf@yc}% - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@yb% - \pgf@pos@transform{\pgf@xc}{\pgf@yc} - \pgfsyssoftpath@lineto{\the\pgf@xc}{\the\pgf@yc}% - }% - \fi% -} - - - -% Append two half-parabolas to the path -% -% #1 = bend (relative to current point) -% #2 = end point (relative to bend point) -% -% Description: -% -% This command appends a half-parabola that starts at the current point -% and has its bend at #1+current point. Then, a second parabola is -% appended that starts at #1+current point, where it also has its -% minimum/maximum, and ends at #1+current point+#2, which becomes the -% new current point. -% -% By setting #2 = (0,0) you draw only a half parabola that goes from the -% current point to the bend; by setting #1 = (0,0) -% you draw a half parabola that going to current point + #2 and has its -% bend at the current point. -% -% Examples: -% -% % Half-parabola going ``up and right'' -% \pgfpathmoveto{\pgfpointorigin} -% \pgfpathparabola{\pgfpointorigin}{\pgfpoint{2cm}{4cm}} -% -% % Half-parabola going ``down and right'' -% \pgfpathmoveto{\pgfpointorigin} -% \pgfpathparabola{\pgfpoint{-2cm}{4cm}}}{\pgfpointorigin} -% -% % Full parabola -% \pgfpathmoveto{\pgfpointorigin} -% \pgfpathparabola{\pgfpoint{-2cm}{4cm}}{\pgfpoint{2cm}{4cm}} - -\def\pgfpathparabola#1#2{% - {% - \pgf@process{#2}% untransformed - \pgf@xb=\pgf@x% - \pgf@yb=\pgf@y% - \pgf@process{#1}% untransformed - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \@tempswatrue% - \ifdim\pgf@xb=0pt\relax% - \ifdim\pgf@yb=0pt\relax% - \@tempswafalse% - \fi% - \fi% - {% - \if@tempswa% - \pgf@arccornersfalse - \else% - \fi% - \@tempswatrue% - \ifdim\pgf@xc=0pt\relax% - \ifdim\pgf@yc=0pt\relax% - \@tempswafalse% - \fi% - \fi% - \if@tempswa - {% - \pgf@pt@x=\pgf@path@lastx% - \pgf@pt@y=\pgf@path@lasty% - \pgfpathcurveto% - {\pgfpoint{.1125\pgf@xc}{.225\pgf@yc}}% found by trial and error - {\pgfpoint{.5\pgf@xc}{\pgf@yc}}% found by trial and error - {\pgfpoint{\pgf@xc}{\pgf@yc}}% - }% - \fi% - }% - \if@tempswa% - \pgf@xc=\pgf@xb% - \pgf@yc=\pgf@yb% - {% - \pgf@pt@x=\pgf@path@lastx% - \pgf@pt@y=\pgf@path@lasty% - \pgfpathcurveto% - {\pgfpoint{.5\pgf@xc}{0\pgf@yc}}% found by trial and error - {\pgfpoint{.8875\pgf@xc}{.775\pgf@yc}}% found by trial and error - {\pgfpoint{\pgf@xc}{\pgf@yc}}% - }% - \fi% - }% -} - - - - -% Append a sine curve between 0 and \pi/2 to the path. -% -% #1 = vector, describing the width and height of the curve -% -% Description: -% -% This command appends a sine curve in the interval 0 and \pi/2 to the -% current path. The sine curve ends at currentpoint+#1. -% -% Examples: -% -% % One complete sine in the interval [0,\pi] -% \pgfpathmoveto{\pgfpointorigin} -% \pgfpathsine{\pgfpoint{1.57cm}{1cm}} -% \pgfpathcosine{\pgfpoint{3.141cm}{0cm}} - -\def\pgfpathsine#1{% - {% - \pgf@process{#1}% untransformed - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \pgf@pt@x=\pgf@path@lastx% evil trickery to transform to the last point - \pgf@pt@y=\pgf@path@lasty% - \pgfpathcurveto% - {\pgfpoint{.31830988618\pgf@xc}{.5\pgf@yc}}% found by trial and error - {\pgfpoint{.63502822294\pgf@xc}{\pgf@yc}}% found by trial and error - {\pgfpoint{\pgf@xc}{\pgf@yc}}% - }% -} - -% Append a cosine curve between 0 and \pi/2 to the path. -% -% #1 = vector, describing the width and height of the curve -% -% Examples: -% -% % One complete sine in the interval [0,\pi] -% \pgfpathmoveto{\pgfpointorigin} -% \pgfpathsine{\pgfpoint{1.57cm}{1cm}} -% \pgfpathcosine{\pgfpoint{3.141cm}{0cm}} - -\def\pgfpathcosine#1{% - {% - \pgf@process{#1}% untransformed - \pgf@xc=\pgf@x% - \pgf@yc=\pgf@y% - \pgf@pt@x=\pgf@path@lastx% evil trickery to transform to the last point - \pgf@pt@y=\pgf@path@lasty% - \pgfpathcurveto% - {\pgfpoint{.36497177706\pgf@xc}{0pt}}% found by trial and error - {\pgfpoint{.68169011382\pgf@xc}{.5\pgf@yc}}% found by trial and error - {\pgfpoint{\pgf@xc}{\pgf@yc}}% - }% -} - - -\endinput diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex index 2f68e256038..f0b862575b7 100644 --- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex @@ -1,4 +1,4 @@ -\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorescopes.code.tex,v 1.9 2005/10/14 13:13:23 tantau Exp $ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorescopes.code.tex,v 1.12 2005/11/15 17:46:37 tantau Exp $ % Copyright 2005 by Till Tantau . % @@ -195,9 +195,10 @@ \def\pgf@picture{% \setbox\pgfpic\hbox to0pt\bgroup% \begingroup% - \color{.}% \pgfsys@beginpicture% \pgfsys@beginscope% + \begingroup% + \color{.}% \pgfsetlinewidth{0.4pt}% \pgftransformreset% \pgfsyssoftpath@setcurrentpath\@empty% @@ -216,10 +217,13 @@ % Shift baseline outside: \global\let\pgf@shift@baseline=\pgf@baseline% \endgroup% + \hss% \egroup% \pgf@insertlayers% \endgroup% - \pgfsys@discardpath\pgfsys@endscope% + \pgfsys@discardpath% + \endgroup% + \pgfsys@endscope% \pgfsys@endpicture% \endgroup% \hss @@ -289,6 +293,7 @@ \pgfsyssoftpath@getcurrentpath\pgf@interrupt@path% \pgfsyssoftpath@setcurrentpath\@empty% \edef\pgfscope@linewidth{\the\pgflinewidth}% + \let\pgf@interrupt@lastmoveto=\pgfsyssoftpath@lastmoveto% \begingroup% } \def\endpgfinterruptpath @@ -299,6 +304,7 @@ \pgf@setpathsizes\pgf@interrupt@pathsizes% \global\pgf@path@lastx=\pgf@interrupt@savex% \global\pgf@path@lasty=\pgf@interrupt@savey% + \global\let\pgfsyssoftpath@lastmoveto=\pgf@interrupt@lastmoveto% \endgroup% } diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz.code.tex index 0002a30507b..8541b57607a 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz.code.tex @@ -1,4 +1,4 @@ -\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz.code.tex,v 1.32 2005/10/18 08:03:44 tantau Exp $ +\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz.code.tex,v 1.35 2005/11/09 15:49:25 tantau Exp $ % Copyright 2005 by Till Tantau . % @@ -362,7 +362,7 @@ \def\tikz@test{#3}% \ifx\tikz@test\@empty% \else% - \pgf@x=#3\relax% + \setlength{\pgf@x}{#3}% \pgf@x=#2\pgf@x\relax% \edef\tikz@marshal{\noexpand\tikz@addtransform{% \expandafter\noexpand\csname pgftransform#1shift\endcsname{\the\pgf@x}}}% @@ -383,6 +383,7 @@ % Text options \define@key{tikz}{text}{\def\tikz@textcolor{#1}} \define@key{tikz}{font}{\def\tikz@textfont{#1}} +\define@key{tikz}{text opacity}{\def\tikz@textopacity{#1}} \define@key{tikz}{text width}{\def\tikz@text@width{#1}} \define@key{tikz}{text ragged}[]% {\def\tikz@text@action{\raggedright\rightskip\z@ plus2em \spaceskip.3333em \xspaceskip.5em\relax}} @@ -408,6 +409,7 @@ \let\tikz@text@width=\@empty \let\tikz@textcolor=\@empty \let\tikz@textfont=\@empty +\let\tikz@textopacity=\@empty \def\tikz@text@action{\raggedright\rightskip\z@ plus2em \spaceskip.3333em \xspaceskip.5em\relax} @@ -1495,6 +1497,16 @@ \fi% } +% snake or lineto? +\def\tikz@path@close#1{% + \iftikz@snaked% + \pgfpathsnakesto{\tikz@presnake,{\tikz@snake}{\tikz@mainsnakelength},\tikz@postsnake}{#1}% + \pgfpathclose% + \else% + \pgfpathclose% + \fi% +} + % Syntax for lineto horizontal/vertical: % -| @@ -1570,7 +1582,7 @@ {\tikz@@close c}}% \def\tikz@@close cycle{% \tikz@flush@moveto% - \pgfpathclose% + \tikz@path@close{\expandafter\pgfpoint\pgfsyssoftpath@lastmoveto}% \def\pgfstrokehook{}% \let\tikz@timer=\@undefined% \tikz@scan@next@command% @@ -1710,8 +1722,7 @@ \tikz@path@lineto{\pgfpoint{\pgf@xa}{\tikz@lasty}}% \tikz@path@lineto{\pgfpoint{\tikz@lastx}{\tikz@lasty}}% \tikz@path@lineto{\pgfpoint{\tikz@lastx}{\pgf@ya}}% - \tikz@path@lineto{\pgfpoint{\pgf@xa}{\pgf@ya}}% - \pgfpathclose% + \tikz@path@close{\pgfpoint{\pgf@xa}{\pgf@ya}}% \pgfpathmoveto{\pgfpoint{\tikz@lastx}{\tikz@lasty}}% \def\pgfstrokehook{}% \tikz@scan@next@command% @@ -2048,6 +2059,11 @@ \setbox\pgfnodeparttextbox=\hbox% \bgroup% \tikz@every@style{every text node part}% + \ifx\tikz@textopacity\@empty% + \else% + \pgfsetfillopacity{\tikz@textopacity}% + \pgfsetstrokeopacity{\tikz@textopacity}% + \fi% \pgfinterruptpicture% \ifx\tikz@text@width\@empty% \else% diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def index 0f6981d04da..81b062a6a6e 100644 --- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def +++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def @@ -1,4 +1,4 @@ -\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-postscript.def,v 1.6 2005/10/18 18:03:38 tantau Exp $ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-postscript.def,v 1.7 2005/10/25 08:18:14 tantau Exp $ % Copyright 2005 by Till Tantau . % @@ -148,6 +148,174 @@ \pgfsysprotocol@literal{#1 .pgfsetstrokeopacityalpha} } +% Objects +\newcount\pgf@objectcount +\def\pgfsys@defobject#1#2#3#4{% + \global\advance\pgf@objectcount by 1% + \expandafter\xdef\csname#1\endcsname{\the\pgf@objectcount}% + \pgfsysprotocol@getcurrentprotocol\pgfsys@temp% + {% + \pgfsysprotocol@setcurrentprotocol\@empty% + \pgfsysprotocol@bufferedtrue% + #4% + \pgfsysprotocol@getcurrentprotocol\pgfsys@@temp% + \pgf@sys@postscript@object{/pgf\csname#1\endcsname{gsave exec \pgfsys@@temp\space grestore} bind def}% + }% + \pgfsysprotocol@setcurrentprotocol\pgfsys@temp% +} +\def\pgfsys@useobject#1#2{% + \pgfsysprotocol@getcurrentprotocol\pgfsys@temp% + {% + \pgfsysprotocol@setcurrentprotocol\@empty% + \pgfsysprotocol@bufferedfalse% + #2% + \pgfsysprotocol@invokecurrentprotocol% + \pgfsys@invoke{pgf\csname#1\endcsname}% + }% + \pgfsysprotocol@setcurrentprotocol\pgfsys@temp} + +% Shadings + +\def\pgfsys@horishading#1#2#3{% + {% + \pgf@parsefunc{#3}% + \setlength\pgf@x{#2}% + \pgf@xa=\pgf@x% + \pgf@sys@bp@correct{\pgf@x}% + \pgf@y=\pgf@max% + \pgf@sys@bp@correct{\pgf@y}% + \expandafter\xdef\csname @pgfshading#1!\endcsname{\hbox to \the\pgf@max{% + \noexpand\vrule width0pt height\the\pgf@xa% + \noexpand\pgfsys@beginpurepicture% + \noexpand\pgfsys@rect{0pt}{0pt}{\the\pgf@y}{\the\pgf@x}% + \noexpand\pgfsys@clipnext% + \noexpand\pgfsys@discardpath% + \noexpand\pgfsys@invoke{\pgf@domb\space \pgf@sys@tonumber{\pgf@x} pgfH \pgf@psfuncs\space pop}% + \hss% + \noexpand\pgfsys@endpurepicture}}% + }% +} +\def\pgfsys@vertshading#1#2#3{% + {% + \pgf@parsefunc{#3}% + \setlength\pgf@x{#2}% + \pgf@xa=\pgf@x% + \pgf@sys@bp@correct{\pgf@x}% + \pgf@y=\pgf@max% + \pgf@sys@bp@correct{\pgf@y}% + \expandafter\xdef\csname @pgfshading#1!\endcsname{\hbox to\the\pgf@xa{% + \noexpand\vrule width0pt height\the\pgf@max% + \noexpand\pgfsys@beginpurepicture% + \noexpand\pgfsys@rect{0pt}{0pt}{\the\pgf@x}{\the\pgf@y}% + \noexpand\pgfsys@clipnext% + \noexpand\pgfsys@discardpath% + \noexpand\pgfsys@invoke{\pgf@domb\space \pgf@sys@tonumber{\pgf@x} pgfV \pgf@psfuncs\space pop}% + \hss% + \noexpand\pgfsys@endpurepicture}}% + }% +} +\def\pgfsys@radialshading#1#2#3{% + {% + \pgf@parsefunc{#3}% + \pgf@process{#2}% + \pgf@xa=2\pgf@max% + \pgf@sys@bp@correct{\pgf@max}% + \advance\pgf@x by \pgf@max% + \advance\pgf@y by \pgf@max% + \expandafter\xdef\csname @pgfshading#1!\endcsname{\hbox to \the\pgf@xa{% + \noexpand\vrule width0pt height\the\pgf@xa% + \noexpand\pgfsys@beginpurepicture% + \noexpand\pgfsys@invoke{% + \pgf@domb\space \pgf@sys@tonumber{\pgf@y} \pgf@sys@tonumber{\pgf@x} \pgf@sys@tonumber{\pgf@max} pgfR1 + \pgf@psfuncs\space \pgf@firstcolor\space \pgf@doma\space pgfR2}% + \hss% + \noexpand\pgfsys@endpurepicture}}% + }% +} + +\AtBeginDocument{ + % Parameters to horizontal pre axishade: \pgf@domb x + \pgf@sys@postscript@header{/pgfH{% + /pgfheight exch def 0.75 setlinewidth [] 0 setdash + /pgfshade {pgfA} def /pgfdir { dup 0 moveto + dup 5 index lineto } bind def} bind def}% + + % Parameters to vertical pre axishade: \pgf@domb x + \pgf@sys@postscript@header{/pgfV{% + /pgfheight exch def 0.75 setlinewidth [] 0 setdash + /pgfshade {pgfA} def /pgfdir { dup 0 exch moveto dup 5 index + exch lineto } bind def} bind def}% + + % Parameters to axishade: end x, start x, r-, g-, b- of first color, r-, g-, b- of second color + % Stack afterwards: end x + \pgf@sys@postscript@header{/pgfA{ + /pgfdiff 8 index round cvi 8 index round cvi sub 2 mul 1 add def + 2 index 6 index sub pgfdiff div % put red-step on stack + 2 index 6 index sub pgfdiff div % put green-step on stack + 2 index 6 index sub pgfdiff div % put green-step on stack + pgfheight 9 index 9 index 9 index 14 index + pgfdiff { + 3 index 3 index 3 index setrgbcolor % Set color + pgfdir + stroke + 4 -1 roll 7 index add % red += incred + 4 -1 roll 6 index add % green += incgreen + 4 -1 roll 5 index add % blue += incblue + 4 -1 roll .5 sub % x += 0.5 + } repeat + mark 15 1 roll cleartomark exch pop % leave only start x on stack + }bind def } + + % Parameters to radialshade pre: \pgf@domb y x max + \pgf@sys@postscript@header{/pgfR1{ + newpath dup dup dup 0 360 arc clip newpath + dup /pgfendx exch def + /pgfendy exch def + 0.875 setlinewidth + [] 0 setdash + /pgfshade {pgfR} def + /pgfstartx exch def + /pgfstarty exch def + /pgfdiffx pgfendx pgfstartx sub def + /pgfdiffy pgfendy pgfstarty sub def + dup /pgfdomb exch def + }bind def } + + % Parameters to radialshade post: \pgf@firstcolor \pgf@doma + \pgf@sys@postscript@header{/pgfR2{ + newpath 0.5 add pgfcircx pgfcircy 3 2 roll 0 360 arc + setrgbcolor fill pop}bind def }% + + % Parameters to radialshade: end x, start x, r-, g-, b- of first color, r-, g-, b- of second color + % Stack afterwards: end x + \pgf@sys@postscript@header{/pgfR{ + /pgfdiff 8 index round cvi 8 index round cvi sub 4 mul 1 add def + /pgfcircx pgfstartx 9 index pgfdiffx pgfdomb div mul add def + /pgfcircy pgfstarty 9 index pgfdiffy pgfdomb div mul add def + /pgfcircxe pgfstartx 8 index pgfdiffx pgfdomb div mul add def + /pgfcircye pgfstarty 8 index pgfdiffy pgfdomb div mul add def + /pgfxstep pgfcircxe pgfcircx sub pgfdiff div def + /pgfystep pgfcircye pgfcircy sub pgfdiff div def + 2 index 6 index sub pgfdiff div % put red-step on stack + 2 index 6 index sub pgfdiff div % put green-step on stack + 2 index 6 index sub pgfdiff div % put green-step on stack + 8 index 8 index 8 index 13 index + pgfdiff { + 3 index 3 index 3 index setrgbcolor % Set color + pgfcircx pgfcircy 2 index 0 360 arc closepath + stroke + 4 -1 roll 6 index add % red += incred + 4 -1 roll 5 index add % green += incgreen + 4 -1 roll 4 index add % blue += incblue + 4 -1 roll .25 sub % x += 0.25 + /pgfcircx pgfcircx pgfxstep add def + /pgfcircy pgfcircy pgfystep add def + } repeat + mark 14 1 roll cleartomark exch pop % leave only start x on stack + }bind def} +} + + \endinput %%% Local Variables: diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def index 19a98a6bf60..0046ff5a2c1 100644 --- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def +++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-svg.def @@ -1,4 +1,4 @@ -\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-svg.def,v 1.12 2005/10/06 13:16:09 tantau Exp $ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-svg.def,v 1.13 2005/11/15 17:46:37 tantau Exp $ % Copyright 2005 by Till Tantau . % @@ -106,7 +106,7 @@ \pgfsysprotocol@literal{\Hnewline }% \advance\pgf@sys@svg@scopecount by-1\relax% \ifnum\pgf@sys@svg@scopecount>0\relax% - \repeat% + \repeat% \endgroup% \global\pgf@sys@svg@scopecount=\pgf@sys@svg@thescopecount\relax% } diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def index e6ef83b5ade..75e0a857445 100644 --- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def +++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def @@ -1,4 +1,4 @@ -\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvips.def,v 1.9 2005/10/18 18:03:38 tantau Exp $ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvips.def,v 1.10 2005/10/25 08:18:14 tantau Exp $ % Copyright 2005 by Till Tantau . % @@ -10,6 +10,12 @@ % Driver commands for dvips +\def\pgfsys@invoke#1{\special{ps:: #1}} +\def\pgfsys@outerinvoke#1{\special{ps: #1}} +\def\pgf@sys@postscript@header#1{\special{! #1}} +\def\pgf@sys@postscript@object#1{\special{! #1}} + + % % Load common postscript commands: % @@ -19,8 +25,6 @@ % % dvips-specific stuff: % -\def\pgfsys@invoke#1{\special{ps:: #1}} -\def\pgfsys@outerinvoke#1{\special{ps: #1}} \def\pgfsys@beginpicture{\special{ps: }\special{ps::[begin]}\pgfsys@invoke{pgfo}} \def\pgfsys@endpicture{\pgfsys@invoke{pgfc}\special{ps::[end]}} @@ -44,87 +48,7 @@ \special{ps::[end]}% } \def\pgfsys@color@unstacked#1{\special{ps: \XC@usecolor{#1}}} -\newcount\pgf@objectcount -\def\pgfsys@defobject#1#2#3#4{% - \global\advance\pgf@objectcount by 1 - \expandafter\xdef\csname#1\endcsname{\the\pgf@objectcount} - \pgfsysprotocol@getcurrentprotocol\pgfsys@temp% - {% - \pgfsysprotocol@setcurrentprotocol\@empty% - \pgfsysprotocol@bufferedtrue% - #4% - \pgfsysprotocol@getcurrentprotocol\pgfsys@@temp% - \special{! /pgf\csname#1\endcsname{gsave exec \pgfsys@@temp\space grestore} bind def}% - }% - \pgfsysprotocol@setcurrentprotocol\pgfsys@temp% -} -\def\pgfsys@useobject#1#2{% - \pgfsysprotocol@getcurrentprotocol\pgfsys@temp% - {% - \pgfsysprotocol@setcurrentprotocol\@empty% - \pgfsysprotocol@bufferedfalse% - #2% - \pgfsysprotocol@invokecurrentprotocol% - \pgfsys@invoke{pgf\csname#1\endcsname}% - }% - \pgfsysprotocol@setcurrentprotocol\pgfsys@temp} \def\pgfsys@imagesuffixlist{epsi:eps:ps} -\def\pgfsys@horishading#1#2#3{% - {% - \pgf@parsefunc{#3}% - \setlength\pgf@x{#2}% - \pgf@xa=\pgf@x% - \pgf@sys@bp@correct{\pgf@x}% - \pgf@y=\pgf@max% - \pgf@sys@bp@correct{\pgf@y}% - \expandafter\xdef\csname @pgfshading#1!\endcsname{\hbox to \the\pgf@max{% - \noexpand\vrule width0pt height\the\pgf@xa% - \noexpand\pgfsys@beginpurepicture% - \noexpand\pgfsys@rect{0pt}{0pt}{\the\pgf@y}{\the\pgf@x}% - \noexpand\pgfsys@clipnext% - \noexpand\pgfsys@discardpath% - \noexpand\pgfsys@invoke{\pgf@domb\space \pgf@sys@tonumber{\pgf@x} pgfH \pgf@psfuncs\space pop}% - \hss% - \noexpand\pgfsys@endpurepicture}}% - }% -} -\def\pgfsys@vertshading#1#2#3{% - {% - \pgf@parsefunc{#3}% - \setlength\pgf@x{#2}% - \pgf@xa=\pgf@x% - \pgf@sys@bp@correct{\pgf@x}% - \pgf@y=\pgf@max% - \pgf@sys@bp@correct{\pgf@y}% - \expandafter\xdef\csname @pgfshading#1!\endcsname{\hbox to\the\pgf@xa{% - \noexpand\vrule width0pt height\the\pgf@max% - \noexpand\pgfsys@beginpurepicture% - \noexpand\pgfsys@rect{0pt}{0pt}{\the\pgf@x}{\the\pgf@y}% - \noexpand\pgfsys@clipnext% - \noexpand\pgfsys@discardpath% - \noexpand\pgfsys@invoke{\pgf@domb\space \pgf@sys@tonumber{\pgf@x} pgfV \pgf@psfuncs\space pop}% - \hss% - \noexpand\pgfsys@endpurepicture}}% - }% -} -\def\pgfsys@radialshading#1#2#3{% - {% - \pgf@parsefunc{#3}% - \pgf@process{#2}% - \pgf@xa=2\pgf@max% - \pgf@sys@bp@correct{\pgf@max}% - \advance\pgf@x by \pgf@max% - \advance\pgf@y by \pgf@max% - \expandafter\xdef\csname @pgfshading#1!\endcsname{\hbox to \the\pgf@xa{% - \noexpand\vrule width0pt height\the\pgf@xa% - \noexpand\pgfsys@beginpurepicture% - \noexpand\pgfsys@invoke{% - \pgf@domb\space \pgf@sys@tonumber{\pgf@y} \pgf@sys@tonumber{\pgf@x} \pgf@sys@tonumber{\pgf@max} pgfR1 - \pgf@psfuncs\space \pgf@firstcolor\space \pgf@doma\space pgfR2}% - \hss% - \noexpand\pgfsys@endpurepicture}}% - }% -} \AtBeginDocument{ % Always present specials. @@ -155,86 +79,6 @@ /pgfsoa 1 def end } - - % Parameters to horizontal pre axishade: \pgf@domb x - \special{! /pgfH{% - /pgfheight exch def 0.75 setlinewidth [] 0 setdash - /pgfshade {pgfA} def /pgfdir { dup 0 moveto - dup 5 index lineto } bind def} B}% - - % Parameters to vertical pre axishade: \pgf@domb x - \special{! /pgfV{% - /pgfheight exch def 0.75 setlinewidth [] 0 setdash - /pgfshade {pgfA} def /pgfdir { dup 0 exch moveto dup 5 index - exch lineto } bind def} B}% - - % Parameters to axishade: end x, start x, r-, g-, b- of first color, r-, g-, b- of second color - % Stack afterwards: end x - \special{! /pgfA{ - /pgfdiff 8 index round cvi 8 index round cvi sub 2 mul 1 add def - 2 index 6 index sub pgfdiff div % put red-step on stack - 2 index 6 index sub pgfdiff div % put green-step on stack - 2 index 6 index sub pgfdiff div % put green-step on stack - pgfheight 9 index 9 index 9 index 14 index - pgfdiff { - 3 index 3 index 3 index setrgbcolor % Set color - pgfdir - stroke - 4 -1 roll 7 index add % red += incred - 4 -1 roll 6 index add % green += incgreen - 4 -1 roll 5 index add % blue += incblue - 4 -1 roll .5 sub % x += 0.5 - } repeat - mark 15 1 roll cleartomark exch pop % leave only start x on stack - }B } - - % Parameters to radialshade pre: \pgf@domb y x max - \special{! /pgfR1{ - newpath dup dup dup 0 360 arc clip newpath - dup /pgfendx exch def - /pgfendy exch def - 0.875 setlinewidth - [] 0 setdash - /pgfshade {pgfR} def - /pgfstartx exch def - /pgfstarty exch def - /pgfdiffx pgfendx pgfstartx sub def - /pgfdiffy pgfendy pgfstarty sub def - dup /pgfdomb exch def - }B } - - % Parameters to radialshade post: \pgf@firstcolor \pgf@doma - \special{! /pgfR2{ - newpath 0.5 add pgfcircx pgfcircy 3 2 roll 0 360 arc - setrgbcolor fill pop}B }% - - % Parameters to radialshade: end x, start x, r-, g-, b- of first color, r-, g-, b- of second color - % Stack afterwards: end x - \special{! /pgfR{ - /pgfdiff 8 index round cvi 8 index round cvi sub 4 mul 1 add def - /pgfcircx pgfstartx 9 index pgfdiffx pgfdomb div mul add def - /pgfcircy pgfstarty 9 index pgfdiffy pgfdomb div mul add def - /pgfcircxe pgfstartx 8 index pgfdiffx pgfdomb div mul add def - /pgfcircye pgfstarty 8 index pgfdiffy pgfdomb div mul add def - /pgfxstep pgfcircxe pgfcircx sub pgfdiff div def - /pgfystep pgfcircye pgfcircy sub pgfdiff div def - 2 index 6 index sub pgfdiff div % put red-step on stack - 2 index 6 index sub pgfdiff div % put green-step on stack - 2 index 6 index sub pgfdiff div % put green-step on stack - 8 index 8 index 8 index 13 index - pgfdiff { - 3 index 3 index 3 index setrgbcolor % Set color - pgfcircx pgfcircy 2 index 0 360 arc closepath - stroke - 4 -1 roll 6 index add % red += incred - 4 -1 roll 5 index add % green += incgreen - 4 -1 roll 4 index add % blue += incblue - 4 -1 roll .25 sub % x += 0.25 - /pgfcircx pgfcircx pgfxstep add def - /pgfcircy pgfcircy pgfystep add def - } repeat - mark 14 1 roll cleartomark exch pop % leave only start x on stack - }B} } \endinput diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def index f7864d34070..016f909d24f 100644 --- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def +++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def @@ -1,4 +1,4 @@ -\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-tex4ht.def,v 1.8 2005/08/13 18:59:56 tantau Exp $ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-tex4ht.def,v 1.9 2005/11/15 17:46:37 tantau Exp $ % Copyright 2005 by Till Tantau . % @@ -57,16 +57,36 @@ \ifdim\pgf@y<1pt% \pgf@y=1pt% \fi% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgfsysprotocol@flushcurrentprotocol% \HCode{

SVG-Viewer needed.

}% + width="}% + % Calculate pixel coordinates (this does not really make sense, but + % we have to do it anyway). Assume 96dpi. + \pgf@x=1.3333333\pgf@x% + \pgf@y=1.3333333\pgf@y% + % Add one pixel for security: + \advance\pgf@x by1pt% + \advance\pgf@y by1pt% + \pgf@sys@pt\pgf@x% + \pgfsysprotocol@flushcurrentprotocol% + \pgfsys@invoke{" height="}% + \pgf@sys@pt\pgf@y% + \pgfsysprotocol@flushcurrentprotocol% + \pgfsys@invoke{" type="image/svg+xml">

SVG-Viewer needed.

}% \special{t4ht>\jobname-\the\pgf@sys@svg@picnum.svg}% - \pgfsys@invoke{\Hnewline \Hnewline }% + \pgfsys@invoke{">\Hnewline \Hnewline }% \setlength\pgf@x{\pgf@shift@baseline}% \advance\pgf@x by-\pgf@picminy\relax% \advance\pgf@picmaxy by-\pgf@picminy\relax% maxy is now the height @@ -92,7 +112,7 @@ \fi% tweak for TikZ \HCode{. +% +% This program can be redistributed and/or modified under the terms +% of the GNU Public License, version 2. + + + + +% Driver commands for textures driver + + +\def\pgfsys@invoke#1{\special{rawpostscript #1}} +\def\pgf@sys@postscript@header#1{\special{prepostscript #1}} +\def\pgf@sys@postscript@object#1{\special{rawpostscript #1}} + + +% +% Load common postscript commands: +% +\input pgfsys-common-postscript.def + + +% +% textures-specific stuff: +% + +\def\pgfsys@beginpicture{% + \special{rawpostscript save}% + \special{rawpostscript save pgfgetcoords}% + \special{postscript}% here come the coordiantes + \special{rawpostscript restore}% + \special{rawpostscript pgfbeginpicture}} +\def\pgfsys@endpicture{\special{rawpostscript restore}} +\def\pgfsys@hbox#1{% + \pgfsys@invoke{save pgfbeginhbox}% + \wd#1=0pt% + \ht#1=0pt% + \dp#1=0pt% + \box#1% + \pgfsys@invoke{restore}% +} +\def\pgfsys@begininvisible{% + \special{rawpostscript gsave nulldevice}% +} +\def\pgfsys@endinvisible{% + \special{rawpostscript grestore}% +} +\def\pgfsys@color@unstacked#1{\special{rawpostscript \XC@usecolor{#1}}} + +\def\pgfsys@imagesuffixlist{epsi:eps:ps} + +\AtBeginDocument{ + % Always present specials. + \special{prepostscript + /pgfsc{}bind def% stroke color is empty by default + /pgffc{}bind def% fill color is empty by default + /pgfe{moveto dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath}bind def% rectangle + /pgfstr{stroke}bind def% + /pgffill{fill}bind def% + /pgfeofill{eofill}bind def% + /pgfw{setlinewidth}bind def% setlinewidth + /pgfgetcoords{/sps{globaldict begin /pgfgy exch def /pgfgx exch def + end pop pop}def/eps{}def userdict begin}bind def + /pgfbeginpicture{/pgfx pgfgx def /pgfy pgfgy def pgfx pgfy translate 1 1 72.27 72 div mul2 neg scale}bind def + /pgfbeginhbox{1 1 72 72.27 div mul2 neg scale + pgfx neg pgfy neg translate + pgffoa .setopacityalpha}bind def% save + /.setopacityalpha where {pop} {/.setopacityalpha{pop}def} ifelse % install .setopacityalpha + /.pgfsetfillopacityalpha{/pgffoa exch def + /pgffill{gsave pgffoa .setopacityalpha fill 1 .setopacityalpha newpath fill grestore}bind def + /pgfeofill{gsave pgffoa .setopacityalpha eofill1 .setopacityalpha newpath eofill grestore}bind def}bind def + /.pgfsetstrokeopacityalpha{/pgfsoa exch def + /pgfstr{gsave pgfsoa .setopacityalpha stroke grestore}bind def}bind def + /pgffoa 1 def + /pgfsoa 1 def + } +} + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% End: diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def new file mode 100644 index 00000000000..197a3e14e0a --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def @@ -0,0 +1,97 @@ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-vtex.def,v 1.4 2005/10/25 08:39:23 tantau Exp $ + +% Copyright 2005 by Till Tantau . +% +% This program can be redistributed and/or modified under the terms +% of the GNU Public License, version 2. + + + + +% Driver commands for vtex + +% Invoking things: +\def\pgfsys@invoke#1{\special{pS: grestore #1 gsave}} % to protect against things happeing in between +\def\pgfsys@outerinvoke#1{\special{pS: #1}} +\def\pgf@sys@postscript@header#1{\special{pS: #1}} +\def\pgf@sys@postscript@object#1{\special{pS: #1}} + + +% +% Load common postscript commands: +% +\input pgfsys-common-postscript.def + + +% +% vtex-specific stuff: +% + + +% Starting and ending a picture: +\def\pgfsys@beginpicture{\special{pS: + save + /pgfx currentpoint /pgfy exch def def + currentpoint translate + gsave}% + \let\set@color=\pgf@sys@vtex@set@color% + \let\reset@color=\pgf@sys@vtex@reset@color% +} +\def\pgf@sys@vtex@setcolor#1{% + \colorlet{pgf@tempcolor}{#1}% + \@ifundefined{applycolormixins}{}{\applycolormixins{pgf@tempcolor}}% + \expandafter\expandafter\expandafter\pgf@sys@vtex@@setcolor\csname\string\color@pgf@tempcolor\endcsname% +} +\def\pgf@sys@vtex@@setcolor#1#2#3#4#5{% + \pgfsysps@color@resetnow% + \expandafter\ifx\csname pgfsys@color@#4\endcsname\relax% + \PackageError{pgfbase}{Unsupported color model `#4'. Sorry}{}% + \else% + \edef\pgf@colmarshal{\expandafter\noexpand\csname pgfsys@color@#4\endcsname}% + \pgf@uncomma#5,,% + \pgf@colmarshal% + \fi} +\def\pgf@sys@vtex@set@color{\pgf@sys@vtex@setcolor{.}\aftergroup\reset@color} +\def\pgf@sys@vtex@reset@color{\pgf@sys@vtex@setcolor{.}} +\def\pgfsys@endpicture{\special{pS: + newpath + grestore + newpath + restore}} + +% Graphics: +\def\pgfsys@imagesuffixlist{epsi:eps:ps:pdf} + +% Starting and ending a box: +\def\pgfsys@hbox#1{% + \pgfsys@invoke{save pgfx neg pgfy neg translate}% + \wd#1=0pt% + \ht#1=0pt% + \dp#1=0pt% + \box#1 + \pgfsys@invoke{restore}% +} + +\def\pgfsys@color@unstacked#1{\special{pS: \XC@usecolor{#1}}} + +\def\pgfsys@fill@opacity#1{\pgf@sys@fail{opacity}} +\def\pgfsys@stroke@opacity#1{\pgf@sys@fail{opacity}} + +\AtBeginDocument{ + % Always present specials. + \special{pS: + /pgfsc{} bind def% stroke color is empty by default + /pgffc{} bind def% fill color is empty by default + /pgfstr{stroke} bind def% + /pgffill{fill} bind def% + /pgfeofill{eofill} bind def% + /pgfe{moveto dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath} bind def% rectangle + /pgfw{setlinewidth} bind def % setlinewidth + } +} + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% End: diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgf-latex-emulation.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgf-latex-emulation.tex index 46ee571bf7d..139ac162264 100644 --- a/Master/texmf-dist/tex/generic/pgf/utilities/pgf-latex-emulation.tex +++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgf-latex-emulation.tex @@ -53,10 +53,8 @@ \xdef#1{\the\toks@}% \endgroup} \long\def\mbox#1{\leavevmode\hbox{#1}} -\begingroup \def\:{\global\let\@sptoken= } \: \def\:{\@xifnch} \expandafter\def\: {\futurelet\@let@token\@ifnch} -\endgroup \def\@nnil{\@nil} \def\@fornoop#1\@@#2#3{} \long\def\@for#1:=#2\do#3{% @@ -106,7 +104,8 @@ \def\newcounter#1{\expandafter\alloc@\expandafter0\expandafter\count\expandafter\countdef\expandafter\insc@unt\csname c@#1\endcsname}% \def\setcounter#1#2{\global\csname c@#1\endcsname#2\relax}% \def\addtocounter#1#2{\global\advance\csname c@#1\endcsname #2\relax} -\def\setlength#1#2{#1#2\relax} +\newskip\pgf@length@skip +\def\setlength#1#2{\pgf@length@skip#2\relax#1\pgf@length@skip} \def\addtolength#1#2{\advance#1 #2\relax} @@ -146,17 +145,15 @@ \definecolor{brown}{rgb}{0.75,0.5,0.25} \def\color#1{% + \colorlet{.}{#1}% \pgfsysprotocol@getcurrentprotocol\pgf@emu@temp% {% \pgfsysprotocol@setcurrentprotocol\@empty% \pgfsysprotocol@bufferedtrue% - \pgfsetcolor{#1}% + \pgfsetcolor{.}% \expandafter\pgfsys@outerinvoke\expandafter{\pgfsysprotocol@currentprotocol}% }% \pgfsysprotocol@setcurrentprotocol\pgf@emu@temp% - \edef\pgf@marshal{\noexpand\let\expandafter\noexpand\csname\string\color@.\endcsname=% - \expandafter\noexpand\csname\string\color@#1\endcsname}% - \pgf@marshal% \aftergroup\reset@color% } \def\reset@color{% @@ -173,11 +170,12 @@ \def\colorlet#1#2{% - \in@!{#2}% + \edef\pgf@marshal{#2}% + \expandafter\in@\expandafter!\expandafter{\pgf@marshal}% \ifin@% % compute mixture {% - \pgf@emu@mix#2!white!\@nil% + \expandafter\pgf@emu@mix\pgf@marshal!white!\@nil% \xdef\pgf@marshal{\noexpand\def\expandafter\noexpand\csname\string\color@#1\endcsname{% \noexpand\xcolor@{}{}{rgb}{\pgf@sys@tonumber\pgf@xa,\pgf@sys@tonumber\pgf@xb,\pgf@sys@tonumber\pgf@xc}}}% }% diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex index 3686eec117b..b744514f544 100644 --- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex @@ -9,7 +9,7 @@ % prints out a message to the log. -\def\pgfversion{1.00} +\def\pgfversion{1.01} \ifx\pgfrcsloaded\undefined @@ -77,7 +77,7 @@ \def\ProvidesFile#1[#2]{\wlog{Loading file #1 version #2.}} \fi -\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgfrcs.code.tex,v 1.7 2005/10/23 16:16:21 tantau Exp $ +\ProvidesPackageRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/utilities/pgfrcs.code.tex,v 1.8 2005/11/14 17:37:52 tantau Exp $ \catcode`\@=\pgfrcsatcode -- cgit v1.2.3