diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-postscript.def | 88 |
1 files changed, 77 insertions, 11 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 81b062a6a6e..89d1d34f958 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,11 +1,13 @@ -\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>. +% Copyright 2006 by Till Tantau % -% This program can be redistributed and/or modified under the terms -% of the GNU Public License, version 2. - +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the file doc/generic/pgf/licenses/LICENSE for more details. +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-common-postscript.def,v 1.14 2006/10/11 15:22:26 tantau Exp $ % Driver commands for postscript @@ -155,7 +157,7 @@ \expandafter\xdef\csname#1\endcsname{\the\pgf@objectcount}% \pgfsysprotocol@getcurrentprotocol\pgfsys@temp% {% - \pgfsysprotocol@setcurrentprotocol\@empty% + \pgfsysprotocol@setcurrentprotocol\pgf@empty% \pgfsysprotocol@bufferedtrue% #4% \pgfsysprotocol@getcurrentprotocol\pgfsys@@temp% @@ -166,7 +168,7 @@ \def\pgfsys@useobject#1#2{% \pgfsysprotocol@getcurrentprotocol\pgfsys@temp% {% - \pgfsysprotocol@setcurrentprotocol\@empty% + \pgfsysprotocol@setcurrentprotocol\pgf@empty% \pgfsysprotocol@bufferedfalse% #2% \pgfsysprotocol@invokecurrentprotocol% @@ -187,7 +189,7 @@ \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@rect{0pt}{0pt}{\the\pgf@max}{\the\pgf@xa}% \noexpand\pgfsys@clipnext% \noexpand\pgfsys@discardpath% \noexpand\pgfsys@invoke{\pgf@domb\space \pgf@sys@tonumber{\pgf@x} pgfH \pgf@psfuncs\space pop}% @@ -206,7 +208,7 @@ \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@rect{0pt}{0pt}{\the\pgf@xa}{\the\pgf@max}% \noexpand\pgfsys@clipnext% \noexpand\pgfsys@discardpath% \noexpand\pgfsys@invoke{\pgf@domb\space \pgf@sys@tonumber{\pgf@x} pgfV \pgf@psfuncs\space pop}% @@ -218,6 +220,8 @@ {% \pgf@parsefunc{#3}% \pgf@process{#2}% + \pgf@sys@bp@correct{\pgf@x}% + \pgf@sys@bp@correct{\pgf@y}% \pgf@xa=2\pgf@max% \pgf@sys@bp@correct{\pgf@max}% \advance\pgf@x by \pgf@max% @@ -233,7 +237,69 @@ }% } -\AtBeginDocument{ +% +% Patterns +% + + +\def\pgfsys@declarepattern#1#2#3#4#5#6#7#8#9{% + % Start building the pattern dictionary: + \pgf@xa=#2\relax% + \pgf@ya=#3\relax% + \pgf@xb=#4\relax% + \pgf@yb=#5\relax% + \pgf@xc=#6\relax% + \pgf@yc=#7\relax% + \pgf@sys@bp@correct\pgf@xa% + \pgf@sys@bp@correct\pgf@ya% + \pgf@sys@bp@correct\pgf@xb% + \pgf@sys@bp@correct\pgf@yb% + \pgf@sys@bp@correct\pgf@xc% + \pgf@sys@bp@correct\pgf@yc% + \pgfsys@outerinvoke{ + save true setglobal globaldict begin /pgfpat#1 + { + \ifnum#9=0 [/Pattern /DeviceRGB] \else /Pattern \fi\space + setcolorspace + gsave + initgraphics + << + /Type /Pattern + /PatternType 1 + /PaintType \ifnum#9=0 2 \else 1 \fi + /TilingType 1 + /BBox [\pgf@sys@tonumber\pgf@xa\space\pgf@sys@tonumber\pgf@ya\space\pgf@sys@tonumber\pgf@xb\space\pgf@sys@tonumber\pgf@yb] + /XStep \pgf@sys@tonumber\pgf@xc\space + /YStep \pgf@sys@tonumber\pgf@yc\space + /PaintProc + { begin 2 dict begin #8\space end end } bind + >> + matrix + makepattern + %/pgfpat#1\space exch def + grestore + setcolor + } bind def end restore + }% +} + +\def\pgfsys@setpatternuncolored#1#2#3#4{% + \pgfsysprotocol@literal{/pgffc{#2 #3 #4 pgfpat#1}def}% +% [/Pattern /DeviceRGB] setcolorspace +% #2 #3 #4 pgfpat#1\space setcolor +% }def}% + \pgf@fillcolortrue% +} + +\def\pgfsys@setpatterncolored#1{% + \pgfsysprotocol@literal{/pgffc{pgfpat#1}def}%/Pattern setcolorspace +% pgfpat#1\space setcolor}def}% + \pgf@fillcolortrue% +} + + + +\def\pgfsys@atbegindocument{% % Parameters to horizontal pre axishade: \pgf@domb x \pgf@sys@postscript@header{/pgfH{% /pgfheight exch def 0.75 setlinewidth [] 0 setdash |