summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-luatex.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-17 20:39:38 +0000
committerKarl Berry <karl@freefriends.org>2018-10-17 20:39:38 +0000
commitf5112bd8d60b74a14f806899d414c8142393529d (patch)
tree5035aa544fa08a5f109e03bc31b234c86676d813 /Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-luatex.def
parent53312354ee2651c6a8b030318aeca118329236d5 (diff)
pgf-cmykshadings (17oct18)
git-svn-id: svn://tug.org/texlive/trunk@48924 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-luatex.def')
-rw-r--r--Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-luatex.def169
1 files changed, 169 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-luatex.def b/Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-luatex.def
new file mode 100644
index 00000000000..08ab12cce8b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-luatex.def
@@ -0,0 +1,169 @@
+%%
+%% This is file `pgfsys-cmykshadings-luatex.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% pgf-cmykshadings.dtx (with options: `luatex-driver')
+%%
+%% This is a generated file.
+%%
+%% Copyright (c) 2018 David Purton <dcpurton@marshwiggle.net>
+%%
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work is "maintained" (as per the LPPL maintenance status)
+%% by David Purton.
+%%
+%% This work consists of the files pgf-cmykshadings.ins,
+%% pgf-cmykshadings.dtx, README.md, and the derived files
+%% - pgf-cmykshadings.sty
+%% - pgfsys-cmykshadings-pdftex.def
+%% - pgfsys-cmykshadgins-xetex.def
+%% - pgfsys-cmykshadings-luatex.def
+%% - pgfsys-cmykshadings-dvipdfmx.def
+%% - pgf-cmykshadings.pdf
+%%
+%%
+%% Substantial parts of the code for this package are taken from the pgf
+%% package files pgfcoreshade.code.tex, pgfsys-pdftex.def,
+%% pgfsys-luatex.def, and pgfsys-dvipdfmx.def copyright (c) 2006 Till
+%% Tantau and then slightly modified to support CMYK and grayscale
+%% shadings.
+%%
+\ProvidesFile{pgfsys-cmykshadings-luatex.def}%
+ [2018/10/17 CMYK shadings support for PGF luatex driver (DCP)]
+\def\pgfsys@horishading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \pgfmathparse{#2}%
+ \setbox\pgfutil@tempboxa=\hbox to\pgf@max{%
+ \vbox to\pgfmathresult pt{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
+ \pgf@process{\pgfpoint{\pgf@max}{#2}}%
+ \immediate\saveboxresource resources {%
+ /Shading << /Sh << /ShadingType 2
+ /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\useboxresource\the\lastsavedboxresourceindex}%
+ \expandafter\xdef\csname @pgfshading#1@model!\endcsname{%
+ \pgf@shading@model}%
+ }%
+}
+\def\pgfsys@vertshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \pgfmathparse{#2}%
+ \setbox\pgfutil@tempboxa=\hbox to\pgfmathresult pt{%
+ \vbox to\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
+ \pgf@process{\pgfpoint{#2}{\pgf@max}}%
+ \immediate\saveboxresource resources {%
+ /Shading << /Sh << /ShadingType 2
+ /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\useboxresource\the\lastsavedboxresourceindex}%
+ \expandafter\xdef\csname @pgfshading#1@model!\endcsname{%
+ \pgf@shading@model}%
+ }%
+}
+\def\pgfsys@radialshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \setbox\pgfutil@tempboxa=\hbox to2\pgf@max{%
+ \vbox to2\pgf@max{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
+ \pgf@process{#2}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{\pgfpoint{\pgf@max}{\pgf@max}}%
+ \advance\pgf@xa by \pgf@x%
+ \advance\pgf@ya by \pgf@y%
+ \pgf@sys@bp@correct{\pgf@x}%
+ \pgf@sys@bp@correct{\pgf@y}%
+ \pgf@sys@bp@correct{\pgf@xa}%
+ \pgf@sys@bp@correct{\pgf@ya}%
+ \immediate\saveboxresource resources {%
+ /Shading << /Sh << /ShadingType 3
+ /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\useboxresource\the\lastsavedboxresourceindex}%
+ \expandafter\xdef\csname @pgfshading#1@model!\endcsname{%
+ \pgf@shading@model}%
+ }%
+}
+\def\pgfsys@functionalshading#1#2#3#4{%
+ {%
+ \pgf@process{#2}%
+ \pgf@xa=\pgf@x%
+ \pgf@ya=\pgf@y%
+ \pgf@process{#3}%
+ \pgf@xb=\pgf@x%
+ \pgf@yb=\pgf@y%
+ \advance\pgf@x by-\pgf@xa%
+ \advance\pgf@y by-\pgf@ya%
+ \setbox\pgfutil@tempboxa=\hbox to\pgf@x{%
+ \vbox to\pgf@y{\vfil\pgfsys@invoke{/Sh sh}}\hfil}%
+ \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@xc=-\pgf@xa%
+ \pgf@yc=-\pgf@ya%
+ % Now build the function
+ \pdfextension obj
+ stream
+ attr
+ {
+ /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 [\pgf@shading@functional@range]
+ }
+ {{#4}}%
+ \edef\pgf@temp@num{\the\numexpr\pdffeedback lastobj\relax}%
+ \saveboxresource resources {%
+ /Shading << /Sh << /ShadingType 1
+ /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
+ >> >>}\pgfutil@tempboxa% <<
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{%
+ \leavevmode%
+ \noexpand\useboxresource\the\lastsavedboxresourceindex%
+ \noexpand\pdfextension refobj \pgf@temp@num%
+ }%
+ \expandafter\xdef\csname @pgfshading#1@model!\endcsname{%
+ \pgf@shading@model}%
+ }%
+}
+%%
+%%
+%% End of file `pgfsys-cmykshadings-luatex.def'.