diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/systemlayer')
6 files changed, 388 insertions, 174 deletions
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 <tantau@cs.tu-berlin.de>. % @@ -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 <tantau@cs.tu-berlin.de>. % @@ -106,7 +106,7 @@ \pgfsysprotocol@literal{</g>\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 <tantau@cs.tu-berlin.de>. % @@ -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 <tantau@cs.tu-berlin.de>. % @@ -57,16 +57,36 @@ \ifdim\pgf@y<1pt% \pgf@y=1pt% \fi% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgfsysprotocol@flushcurrentprotocol% \HCode{<object data="\jobname-\the\pgf@sys@svg@picnum.svg" - width="\the\pgf@x" height="\the\pgf@y" - type="image/svg+xml"><p>SVG-Viewer needed.</p></object>}% + 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"><p>SVG-Viewer needed.</p></object>}% \special{t4ht>\jobname-\the\pgf@sys@svg@picnum.svg}% - \pgfsys@invoke{<svg width="\the\pgf@x" height="\the\pgf@y" viewBox="}% - \pgf@sys@pt{\pgf@xa}\pgf@sys@pt{\pgf@ya}\pgf@sys@pt{\pgf@x}\pgf@sys@pt{\pgf@y}% + \pgfsys@invoke{<svg xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" width="\the\pgf@xc" + height="\the\pgf@yc" viewBox="}% + \pgf@sys@pt{\pgf@xa}\pgf@sys@pt{\pgf@ya}\pgf@sys@pt{\pgf@xc}\pgf@sys@pt{\pgf@yc}% \pgfsysprotocol@flushcurrentprotocol% \pgf@ya=-\pgf@ya% - \pgfsys@invoke{">\Hnewline <g transform="translate(0,\the\pgf@yb) scale(1,-1) - translate(0,\the\pgf@ya)">\Hnewline }% + \pgfsys@invoke{">\Hnewline <g transform="translate(0,} + \pgf@sys@pt\pgf@yb\pgfsysprotocol@flushcurrentprotocol% + \pgfsys@invoke{) scale(1,-1) translate(0,}% + \pgf@sys@pt\pgf@ya\pgfsysprotocol@flushcurrentprotocol% + \pgfsys@invoke{)">\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{<text style="stroke:none" - transform="scale(1,-1) translate(\the\pgf@x,0pt)" + transform="scale(1,-1) translate(\pgf@sys@tonumber{\pgf@x},0)" text-anchor="middle" }% \ifx\f@size\@empty% diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def new file mode 100644 index 00000000000..34448c295a0 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-textures.def @@ -0,0 +1,85 @@ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-textures.def,v 1.2 2005/11/09 08:52:19 tantau Exp $ + +% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>. +% +% 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 <tantau@cs.tu-berlin.de>. +% +% 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: |