diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def index f6498264735..58b414b69d8 100644 --- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def +++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def @@ -1,4 +1,5 @@ % Copyright 2006 by Till Tantau +% CMYK and grayscale shadings adaptation copyright 2019 by David Purton % % This file may be distributed and/or modified % @@ -32,7 +33,7 @@ \raise\pgf@pt@y\hbox{% \pgf@pt@x=0pt% \pgf@pt@y=0pt% - \pgflowlevelsynccm% + \pgflowlevelsynccm% \pgfsys@hbox#1}% \hss% }% @@ -84,13 +85,14 @@ \pgf@process{\pgfpoint{\pgf@max}{#2}}% \immediate\pdfxform resources {% /Shading << /Sh << /ShadingType 2 - /ColorSpace /DeviceRGB + /ColorSpace \pgf@shading@device\space /Domain [\pgf@pdfparseddomain] /Coords [\pgf@doma\space0 \pgf@domb\space0] /Function \pgf@pdfparsedfunction /Extend [false false] >> >>}\pgfutil@tempboxa% << - \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}% + \xdef\pgfutil@tempa{\hbox{\noexpand\pdfrefxform\the\pdflastxform}}% }% + \global\expandafter\let\csname @pgfshading#1!\endcsname=\pgfutil@tempa } \def\pgfsys@vertshading#1#2#3{% {% @@ -100,13 +102,14 @@ \pgf@process{\pgfpoint{#2}{\pgf@max}}% \immediate\pdfxform resources {% /Shading << /Sh << /ShadingType 2 - /ColorSpace /DeviceRGB + /ColorSpace \pgf@shading@device\space /Domain [\pgf@pdfparseddomain] /Coords [0 \pgf@doma\space0 \pgf@domb] /Function \pgf@pdfparsedfunction /Extend [false false] >> >>}\pgfutil@tempboxa% << - \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}% + \xdef\pgfutil@tempa{\hbox{\noexpand\pdfrefxform\the\pdflastxform}}% }% + \global\expandafter\let\csname @pgfshading#1!\endcsname=\pgfutil@tempa } \def\pgfsys@radialshading#1#2#3{% {% @@ -124,13 +127,14 @@ \pgf@sys@bp@correct{\pgf@ya}% \immediate\pdfxform resources {% /Shading << /Sh << /ShadingType 3 - /ColorSpace /DeviceRGB + /ColorSpace \pgf@shading@device\space /Domain [\pgf@pdfparseddomain] /Coords [\pgf@sys@tonumber{\pgf@xa} \pgf@sys@tonumber{\pgf@ya} \pgf@doma\space \pgf@sys@tonumber{\pgf@x} \pgf@sys@tonumber{\pgf@y} \pgf@domb] /Function \pgf@pdfparsedfunction /Extend [true false] >> >>}\pgfutil@tempboxa% << - \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}% + \xdef\pgfutil@tempa{\hbox{\noexpand\pdfrefxform\the\pdflastxform}}% }% + \global\expandafter\let\csname @pgfshading#1!\endcsname=\pgfutil@tempa }% \def\pgfsys@functionalshading#1#2#3#4{% {% @@ -156,23 +160,23 @@ { /FunctionType 4 /Domain [\pgf@sys@tonumber{\pgf@xa}\space\pgf@sys@tonumber{\pgf@xb}\space\pgf@sys@tonumber{\pgf@ya}\space\pgf@sys@tonumber{\pgf@yb}] - /Range [0 1 0 1 0 1] + /Range [\pgf@shading@functional@range] } {{#4}}% \edef\pgf@temp@num{\the\pdflastobj}% \pdfxform resources {% /Shading << /Sh << /ShadingType 1 - /ColorSpace /DeviceRGB + /ColorSpace \pgf@shading@device\space /Matrix [1 0 0 1 \pgf@sys@tonumber{\pgf@xc}\space\pgf@sys@tonumber{\pgf@yc}] /Domain [\pgf@sys@tonumber{\pgf@xa}\space\pgf@sys@tonumber{\pgf@xb}\space\pgf@sys@tonumber{\pgf@ya}\space\pgf@sys@tonumber{\pgf@yb}] - /Function \pgf@temp@num\space 0 R + /Function \pgf@temp@num\space 0 R >> >>}\pgfutil@tempboxa% << - \expandafter\xdef\csname @pgfshading#1!\endcsname{% - \leavevmode% + \xdef\pgfutil@tempa{\hbox{% \noexpand\pdfrefxform\the\pdflastxform% \noexpand\pdfrefobj\pgf@temp@num% - }% + }}% }% + \global\expandafter\let\csname @pgfshading#1!\endcsname=\pgfutil@tempa } @@ -182,7 +186,7 @@ \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@ya=#3\relax% \pgf@xb=#4\relax% \pgf@yb=#5\relax% \pgf@xc=#6\relax% @@ -206,7 +210,7 @@ /YStep \pgf@sys@tonumber\pgf@yc\space /Resources << >> %<< } - {#8}% + {#8}% \pgfutil@addpdfresource@patterns{/pgfpat#1\space \the\pdflastobj\space 0 R}% } @@ -230,7 +234,7 @@ \def\pgfsys@declarepattern@meta#1#2#3#4#5#6#7{% % Start building the pattern dictionary: \pgf@xa=#2\relax% - \pgf@ya=#3\relax% + \pgf@ya=#3\relax% \pgf@xb=#4\relax% \pgf@yb=#5\relax% \pgf@xc=#6\relax% @@ -262,7 +266,7 @@ /Matrix [#2\space#3\space#4\space#5\space\pgf@sys@tonumber\pgfutil@tempdima\space\pgf@sys@tonumber\pgfutil@tempdimb] /Resources << >> %<< } - {#8}% + {#8}% \pgfutil@addpdfresource@patterns{/pgfpat#1\space \the\pdflastobj\space 0 R}% } @@ -347,7 +351,7 @@ /CS /DeviceGray >> }% << - \pgfutil@tempboxa% + \pgfutil@tempboxa% \pgfutil@addpdfresource@extgs{% /pgfsmask\the\pdflastxform\space << @@ -422,12 +426,12 @@ \pgfutil@addpdfresource@colorspaces{ /pgfprgb [/Pattern /DeviceRGB] } \def\pgfsys@color@unstacked#1{% - \pdfliteral{\csname\string\color@#1\endcsname}% + \pdfliteral{\csname\string\color@#1\endcsname}% } \endinput -%%% Local Variables: +%%% Local Variables: %%% mode: latex -%%% End: +%%% End: |