diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-dvipdfmx.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-dvipdfmx.def | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-dvipdfmx.def b/Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-dvipdfmx.def new file mode 100644 index 00000000000..fe46ff69fa3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/pgf-cmykshadings/pgfsys-cmykshadings-dvipdfmx.def @@ -0,0 +1,184 @@ +%% +%% This is file `pgfsys-cmykshadings-dvipdfmx.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pgf-cmykshadings.dtx (with options: `dvipdfmx-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-dvipdfmx.def}% + [2018/10/17 CMYK shadings support for PGF dvipdfmx driver (DCP)] +\def\pgfsys@horishading#1#2#3{% + {% + \pgf@parsefunc{#3}% + \pgfmathparse{#2}% + \pgf@process{\pgfpoint{\pgf@max}{#2}}% + \edef\@tempa{\noexpand\pgfutil@insertatbegincurrentpagefrombox{% + \special{pdf:bxobj @pgfshade\the\pgfsys@objnum\space + width \the\pgf@max\space height \pgfmathresult pt}% + \special{pdf:put @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] >> >> + >>}% + \pgfsys@invoke{/Sh sh}% + \special{pdf:exobj}}}\@tempa% << + \expandafter\xdef\csname @pgfshading#1!\endcsname{% + \hbox to\the\pgf@max{\vbox to\pgfmathresult pt{% + \vfil\special{pdf:uxobj @pgfshade\the\pgfsys@objnum}}\hfil}}% + \expandafter\xdef\csname @pgfshading#1@model!\endcsname{% + \pgf@shading@model}% + }% + \global\advance\pgfsys@objnum\@ne% +} +\def\pgfsys@vertshading#1#2#3{% + {% + \pgf@parsefunc{#3}% + \pgfmathparse{#2}% + \pgf@process{\pgfpoint{\pgf@max}{#2}}% + \edef\@tempa{\noexpand\pgfutil@insertatbegincurrentpagefrombox{% + \special{pdf:bxobj @pgfshade\the\pgfsys@objnum\space + width \pgfmathresult pt\space height \the\pgf@max}% + \special{pdf:put @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] >> >> + >>}% + \pgfsys@invoke{/Sh sh}% + \special{pdf:exobj}}}\@tempa% << + \expandafter\xdef\csname @pgfshading#1!\endcsname{% + \hbox to\pgfmathresult pt{\vbox to\the\pgf@max{% + \vfil\special{pdf:uxobj @pgfshade\the\pgfsys@objnum}}\hfil}}% + \expandafter\xdef\csname @pgfshading#1@model!\endcsname{% + \pgf@shading@model}% + }% + \global\advance\pgfsys@objnum\@ne% +} +\def\pgfsys@radialshading#1#2#3{% + {% + \pgf@parsefunc{#3}% + \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}% + \pgfutil@tempdima=2\pgf@max% + \edef\@tempa{\noexpand\pgfutil@insertatbegincurrentpagefrombox{% + \special{pdf:bxobj @pgfshade\the\pgfsys@objnum\space + width \the\pgfutil@tempdima\space height \the\pgfutil@tempdima}% + \special{pdf:put @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] >> >> + >>}% + \pgfsys@invoke{/Sh sh}% + \special{pdf:exobj}}}\@tempa% << + \expandafter\xdef\csname @pgfshading#1!\endcsname{% + \hbox to\the\pgfutil@tempdima{\vbox to\the\pgfutil@tempdima{% + \vfil\special{pdf:uxobj @pgfshade\the\pgfsys@objnum}}\hfil}}% + \expandafter\xdef\csname @pgfshading#1@model!\endcsname{% + \pgf@shading@model}% + }% + \global\advance\pgfsys@objnum\@ne% +} +\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% + \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 + \edef\@tempa{\noexpand\pgfutil@insertatbegincurrentpagefrombox{% + \special{pdf:stream @pgfstream\the\pgfsys@objnum\space({#4}) + <</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]>>}}}\@tempa% + \edef\@tempa{\noexpand\pgfutil@insertatbegincurrentpagefrombox{% + \special{pdf:bxobj @pgfshade\the\pgfsys@objnum\space + width \the\pgf@x\space height \the\pgf@y}% + \special{pdf:put @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 @pgfstream\the\pgfsys@objnum>> >> >>}% + \pgfsys@invoke{/Sh sh}% + \special{pdf:exobj}}}\@tempa% << + \expandafter\xdef\csname @pgfshading#1!\endcsname{% + \leavevmode\hbox to\the\pgf@x{\vbox to\the\pgf@y{% + \vfil\special{pdf:uxobj @pgfshade\the\pgfsys@objnum}}\hfil}}% + \expandafter\xdef\csname @pgfshading#1@model!\endcsname{% + \pgf@shading@model}% + }% + \global\advance\pgfsys@objnum\@ne% +} +%% +%% +%% End of file `pgfsys-cmykshadings-dvipdfmx.def'. |