summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/oberdiek/pdfrender.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/oberdiek/pdfrender.sty')
-rw-r--r--Master/texmf-dist/tex/generic/oberdiek/pdfrender.sty775
1 files changed, 775 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/pdfrender.sty b/Master/texmf-dist/tex/generic/oberdiek/pdfrender.sty
new file mode 100644
index 00000000000..5b6e07a2083
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/oberdiek/pdfrender.sty
@@ -0,0 +1,775 @@
+%%
+%% This is file `pdfrender.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% pdfrender.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2010 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%%
+%% 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. This version of this license is in
+%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Heiko Oberdiek.
+%%
+%% The Base Interpreter refers to any `TeX-Format',
+%% because some files are installed in TDS:tex/generic//.
+%%
+%% This work consists of the main source file pdfrender.dtx
+%% and the derived files
+%% pdfrender.sty, pdfrender.pdf, pdfrender.ins, pdfrender.drv,
+%% pdfrender-test1.tex, pdfrender-test2.tex,
+%% pdfrender-test3.tex, pdfrender-test4.tex,
+%% pdfrender-test5.tex.
+%%
+\begingroup
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\let\expandafter\x\csname ver@pdfrender.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \else
+ \catcode35 6 % #
+ \expandafter\ifx\csname PackageInfo\endcsname\relax
+ \def\x#1#2{%
+ \immediate\write-1{Package #1 Info: #2.}%
+ }%
+ \else
+ \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
+ \fi
+ \x{pdfrender}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup
+\begingroup
+ \catcode35 6 % #
+ \catcode40 12 % (
+ \catcode41 12 % )
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode47 12 % /
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode91 12 % [
+ \catcode93 12 % ]
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \def\x#1#2#3[#4]{\endgroup
+ \immediate\write-1{Package: #3 #4}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@pdfrender.sty\endcsname
+\ProvidesPackage{pdfrender}%
+ [2010/01/28 v1.2 Access to some PDF graphics parameters (HO)]
+\begingroup
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \def\x{\endgroup
+ \expandafter\edef\csname PdfRender@AtEnd\endcsname{%
+ \catcode35 \the\catcode35\relax
+ \catcode64 \the\catcode64\relax
+ \catcode123 \the\catcode123\relax
+ \catcode125 \the\catcode125\relax
+ }%
+ }%
+\x
+\catcode35 6 % #
+\catcode64 11 % @
+\catcode123 1 % {
+\catcode125 2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\PdfRender@AtEnd{%
+ \PdfRender@AtEnd
+ \catcode#1 \the\catcode#1\relax
+ }%
+ \catcode#1 #2\relax
+}
+\TMP@EnsureCode{10}{12}% ^^J
+\TMP@EnsureCode{36}{3}% $
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{43}{12}% +
+\TMP@EnsureCode{44}{12}% ,
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{58}{12}% :
+\TMP@EnsureCode{59}{12}% ;
+\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{63}{12}% ?
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\TMP@EnsureCode{94}{7}% ^ (superscript)
+\TMP@EnsureCode{96}{12}% `
+\TMP@EnsureCode{124}{12}% |
+\def\PdfRender@AtEndHook{}
+\expandafter\def\expandafter\PdfRender@AtEnd\expandafter{%
+ \expandafter\PdfRender@AtEndHook
+ \PdfRender@AtEnd
+ \endinput
+}
+\def\PdfRender@newif#1{%
+ \expandafter\edef\csname PdfRender@#1true\endcsname{%
+ \let
+ \expandafter\noexpand\csname ifPdfRender@#1\endcsname
+ \noexpand\iftrue
+ }%
+ \expandafter\edef\csname PdfRender@#1false\endcsname{%
+ \let
+ \expandafter\noexpand\csname ifPdfRender@#1\endcsname
+ \noexpand\iffalse
+ }%
+ \csname PdfRender@#1false\endcsname
+}
+\PdfRender@newif{Stack}
+\PdfRender@newif{Match}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \def\PdfRender@RequirePackage#1[#2]{%
+ \expandafter\def\expandafter\PdfRender@AtEndHook\expandafter{%
+ \PdfRender@AtEndHook
+ \ltx@ifpackagelater{#1}{#2}{}{%
+ \@PackageWarningNoLine{pdfrender}{%
+ You have requested version\MessageBreak
+ `#2' of package `#1',\MessageBreak
+ but only version\MessageBreak
+ `\csname ver@#1.\ltx@pkgextension\endcsname'\MessageBreak
+ is available%
+ }%
+ }%
+ }%
+ \input #1.sty\relax
+ }%
+\else
+ \let\PdfRender@RequirePackage\RequirePackage
+\fi
+\PdfRender@RequirePackage{ifpdf}[2010/01/28]
+\PdfRender@RequirePackage{infwarerr}[2007/09/09]
+\PdfRender@RequirePackage{ltxcmds}[2010/01/28]
+\ifpdf
+ \ltx@IfUndefined{pdfcolorstackinit}{%
+ \@PackageWarning{pdfrender}{%
+ Missing \string\pdfcolorstackinit
+ }%
+ }{%
+ \PdfRender@Stacktrue
+ }%
+ \ltx@IfUndefined{pdfmatch}{%
+ \@PackageInfoNoLine{pdfrender}{%
+ \string\pdfmatch\ltx@space not found. %
+ Therefore the values\MessageBreak
+ of some parameters are not validated%
+ }%
+ }{%
+ \PdfRender@Matchtrue
+ }%
+\else
+ \@PackageWarning{pdfrender}{%
+ Missing pdfTeX in PDF mode%
+ }%
+ \ltx@IfUndefined{newcommand}{%
+ \def\pdfrender#1{}%
+ \long\def\textpdfrender#1#2{#2}%
+ }{%
+ \newcommand*{\pdfrender}[1]{}%
+ \newcommand{\textpdfrender}[2]{#2}%
+ }%
+ \expandafter\PdfRender@AtEnd
+\fi
+\ltx@ifpackageloaded{color}{}{%
+ \def\color@setgroup{\begingroup\set@color}%
+ \let\color@begingroup\begingroup
+ \def\color@endgroup{\endgraf\endgroup}%
+ \def\color@hbox{\hbox\bgroup\color@begingroup}%
+ \def\color@vbox{\vbox\bgroup\color@begingroup}%
+ \def\color@endbox{\color@endgroup\egroup}%
+ \ltx@ifundefined{bgroup}{%
+ \let\bgroup={\let\egroup=}%
+ }{}%
+ \ltx@ifundefined{endgraf}{%
+ \let\endgraf=\par
+ }{}%
+}
+\def\PdfRender@NormalColorHook{}
+\def\PdfRender@ColorSetGroupHook{}
+\def\PdfRender@TestBox#1{%
+ \setbox0=\color@hbox#1\color@endbox
+}
+\def\PdfRender@PatchNormalColor{%
+ \ltx@ifundefined{normalcolor}{%
+ \gdef\normalcolor{\PdfRender@NormalColorHook}%
+ }{%
+ \begingroup
+ \def\PdfRender@NormalColorHook{\let\PdfRender@temp=Y}%
+ \PdfRender@TestBox{%
+ \let\set@color\relax
+ \normalcolor
+ \ifx\PdfRender@temp Y%
+ \else
+ \ltx@GlobalAppendToMacro\normalcolor{%
+ \PdfRender@NormalColorHook
+ }%
+ \fi
+ }%
+ \endgroup
+ }%
+ \ifx\@nodocument\relax
+ \global\let\PdfRender@PatchNormalColor\relax
+ \fi
+}%
+\def\PdfRender@PatchColorSetGroup{%
+ \begingroup
+ \def\PdfRender@ColorSetGroupHook{\let\PdfRender@temp=Y}%
+ \PdfRender@TestBox{%
+ \let\set@color\relax
+ \color@setgroup\color@endgroup
+ \ifx\PdfRender@temp Y%
+ \else
+ \ltx@GlobalAppendToMacro\color@setgroup{%
+ \PdfRender@ColorSetGroupHook
+ }%
+ \fi
+ }%
+ \endgroup
+ \ifx\@nodocument\relax
+ \global\let\PdfRender@PatchColorSetGroup\relax
+ \fi
+}%
+\def\PdfRender@PatchColor{%
+ \PdfRender@PatchNormalColor
+ \PdfRender@PatchColorSetGroup
+}
+\PdfRender@PatchColor
+\ltx@IfUndefined{AtBeginDocument}{}{%
+ \AtBeginDocument{\PdfRender@PatchColor}%
+}
+\ltx@IfUndefined{AfterPackage}{%
+}{%
+ \AfterPackage{color}{\PdfRender@PatchColor}%
+ \AfterPackage{xcolor}{\PdfRender@PatchColor}%
+ \AfterPackage{etoolbox}{%
+ \AfterEndPreamble{\PdfRender@PatchColor}%
+ }%
+}%
+\ltx@IfUndefined{AfterEndPreamble}{%
+}{%
+ \AfterEndPreamble{\PdfRender@PatchColor}%
+}%
+
+\PdfRender@RequirePackage{kvsetkeys}[2010/01/28]
+\def\PdfRender@texorpdfstring{%
+ \ltx@IfUndefined{texorpdfstring}\ltx@firstoftwo\texorpdfstring
+}
+\ltx@IfUndefined{DeclareRobustCommand}%
+\ltx@firstoftwo\ltx@secondoftwo
+{%
+ \def\pdfrender#1%
+}{%
+ \newcommand{\pdfrender}{}%
+ \DeclareRobustCommand*{\pdfrender}[1]%
+}%
+{%
+ \PdfRender@texorpdfstring{%
+ \PdfRender@PatchNormalColor
+ \global\let\PdfRender@FillColor\ltx@empty
+ \global\let\PdfRender@StrokeColor\ltx@empty
+ \kvsetkeys{PDFRENDER}{#1}%
+ \PdfRender@SetColor
+ }{}%
+}
+\ltx@IfUndefined{DeclareRobustCommand}%
+\ltx@firstoftwo\ltx@secondoftwo
+{%
+ \long\def\textpdfrender#1#2%
+}{%
+ \newcommand{\textpdfrender}{}%
+ \DeclareRobustCommand{\textpdfrender}[2]%
+}%
+{%
+ \PdfRender@texorpdfstring{%
+ \begingroup
+ \pdfrender{#1}%
+ #2%
+ \endgroup
+ }{#2}%
+}
+\PdfRender@newif{Values}
+\def\PdfRender@NewClassValues#1#2#3#4{%
+ \PdfRender@Valuestrue
+ \PdfRender@NewClass{#1}{#2}{#3}{#4}{}%
+}
+\def\PdfRender@NewClass#1#2#3#4#5{%
+ \PdfRender@newif{Active#1}%
+ \expandafter\def\csname PdfRender@Default#1\endcsname{#2}%
+ \expandafter\let\csname PdfRender@Current#1\expandafter\endcsname
+ \csname PdfRender@Default#1\endcsname
+ \ifPdfRender@Stack
+ \expandafter\edef\csname PdfRender@Init#1\endcsname{%
+ \global\chardef
+ \expandafter\noexpand\csname PdfRender@Stack#1\endcsname=%
+ \noexpand\pdfcolorstackinit page direct{%
+ \noexpand#3%
+ \expandafter\noexpand\csname PdfRender@Default#1\endcsname
+ }\relax
+ \noexpand\@PackageInfo{pdfrender}{%
+ New color stack `#1' = \noexpand\number
+ \expandafter\noexpand\csname PdfRender@Stack#1\endcsname
+ }%
+ \gdef\expandafter\noexpand\csname PdfRender@Init#1\endcsname{}%
+ }%
+ \expandafter\edef\csname PdfRender@Set#1\endcsname{%
+ \expandafter\noexpand\csname PdfRender@Init#1\endcsname
+ \noexpand\pdfcolorstack
+ \expandafter\noexpand\csname PdfRender@Stack#1\endcsname
+ push{%
+ #3{\expandafter\noexpand\csname PdfRender@Current#1\endcsname}%
+ }%
+ \noexpand\aftergroup
+ \expandafter\noexpand\csname PdfRender@Reset#1\endcsname
+ }%
+ \expandafter\edef\csname PdfRender@Reset#1\endcsname{%
+ \expandafter\noexpand\csname PdfRender@Init#1\endcsname
+ \noexpand\pdfcolorstack
+ \expandafter\noexpand\csname PdfRender@Stack#1\endcsname
+ pop\relax
+ }%
+ \else
+ \expandafter\edef\csname PdfRender@Set#1\endcsname{%
+ \noexpand\pdfliteral direct{%
+ #3{\expandafter\noexpand\csname PdfRender@Current#1\endcsname}%
+ }%
+ \noexpand\aftergroup
+ \expandafter\noexpand\csname PdfRender@Reset#1\endcsname
+ }%
+ \expandafter\edef\csname PdfRender@Reset#1\endcsname{%
+ \noexpand\pdfliteral direct{%
+ #3{\expandafter\noexpand\csname PdfRender@Current#1\endcsname}%
+ }%
+ }%
+ \fi
+ \expandafter\edef\csname PdfRender@Normal#1\endcsname{%
+ \let
+ \expandafter\noexpand\csname PdfRender@Current#1\endcsname
+ \expandafter\noexpand\csname PdfRender@Default#1\endcsname
+ \noexpand\PdfRender@Set{#1}%
+ }%
+ \expandafter\ltx@GlobalAppendToMacro\expandafter\PdfRender@NormalColorHook
+ \expandafter{%
+ \csname PdfRender@Normal#1\endcsname
+ }%
+ \ltx@GlobalAppendToMacro\PdfRender@ColorSetGroupHook{%
+ \PdfRender@Set{#1}%
+ }%
+ \ifPdfRender@Values
+ \kv@parse@normalized{#4}{%
+ \expandafter\let\csname PdfRender@#1@\kv@key\endcsname\kv@key
+ \ifx\kv@value\relax
+ \else
+ \expandafter\let\csname PdfRender@#1@\kv@value\endcsname\kv@key
+ \fi
+ \ltx@gobbletwo
+ }%
+ \PdfRender@define@key{PDFRENDER}{#1}{%
+ \global\csname PdfRender@Active#1true\endcsname
+ \def\PdfRender@Current{##1}%
+ \PdfRender@SetValidateValues{#1}%
+ }%
+ \PdfRender@Valuesfalse
+ \else
+ \PdfRender@define@key{PDFRENDER}{#1}{%
+ \global\csname PdfRender@Active#1true\endcsname
+ \expandafter\def\csname PdfRender@Current#1\endcsname{##1}%
+ \ltx@IfUndefined{PdfRender@PostProcess#1}{%
+ }{%
+ \csname PdfRender@PostProcess#1\endcsname
+ }%
+ \PdfRender@SetValidate{#1}{#4}{#5}%
+ }%
+ \fi
+}%
+\ltx@IfUndefined{define@key}{%
+ \def\PdfRender@define@key#1#2{%
+ \expandafter\def\csname KV@#1@#2\endcsname##1%
+ }%
+}{%
+ \let\PdfRender@define@key\define@key
+}
+\def\PdfRender@Set#1{%
+ \csname ifPdfRender@Active#1\endcsname
+ \csname PdfRender@Set#1\expandafter\endcsname
+ \fi
+}
+\def\PdfRender@Reset#1{%
+ \csname ifPdfRender@Active#1\endcsname
+ \csname PdfRender@Reset#1\expandafter\endcsname
+ \fi
+}
+\def\PdfRender@ErrorInvalidValue#1{%
+ \PackageError{pdfrender}{%
+ Ignoring parameter setting for `#1'\MessageBreak
+ because of invalid value %
+ `\csname PdfRender@Current#1\endcsname'%
+ }\@ehc
+ \expandafter\let\csname PdfRender@Current#1\endcsname\ltx@empty
+}%
+\ifPdfRender@Match
+ \def\PdfRender@SetValidate#1#2#3{%
+ \ifnum\pdfmatch{^(#2)$}{\csname PdfRender@Current#1\endcsname}=1 %
+ \csname PdfRender@Set#1\expandafter\endcsname
+ \else
+ \PdfRender@ErrorInvalidValue{#1}%
+ \fi
+ }%
+\else
+ \def\PdfRender@SetValidate#1#2#3{%
+ \expandafter\let\expandafter\PdfRender@Current
+ \csname PdfRender@Current#1\endcsname
+ #3%
+ \ifx\PdfRender@Current\@empty
+ \PdfRender@ErrorInvalidValue{#1}%
+ \else
+ \csname PdfRender@Set#1\expandafter\endcsname
+ \fi
+ }%
+\fi
+\def\PdfRender@SetValidateValues#1{%
+ \ltx@IfUndefined{PdfRender@#1@\PdfRender@Current}{%
+ \expandafter\let\csname PdfRender@Current#1\endcsname
+ \PdfRender@Current
+ \PdfRender@ErrorInvalidValue{#1}%
+ }{%
+ \expandafter\edef\csname PdfRender@Current#1\endcsname{%
+ \csname PdfRender@#1@\PdfRender@Current\endcsname
+ }%
+ \csname PdfRender@Set#1\endcsname
+ }%
+}
+\def\PdfRender@OpValue#1#2{#2\ltx@space#1}%
+\def\PdfRender@OpName#1#2{/#2\ltx@space#1}%
+\PdfRender@NewClassValues{TextRenderingMode}%
+ {0}%
+ {\PdfRender@OpValue{Tr}}{%
+ 0=Fill,%
+ 1=Stroke,%
+ 2=FillStroke,%
+ 3=Invisible,%
+ 4=FillClip,%
+ 5=StrokeClip,%
+ 6=FillStrokeClip,%
+ 7=Clip,%
+}%
+\PdfRender@NewClass{LineWidth}{1}{\PdfRender@OpValue{w}}{%
+ [0-9]+\string\.?[0-9]*|\string\.[0-9]+%
+}{}%
+\ltx@IfUndefined{dimexpr}{%
+ \def\PdfRender@dimexpr{}%
+}{%
+ \let\PdfRender@dimexpr\dimexpr
+}
+\def\PdfRender@PostProcessLineWidth{%
+ \begingroup
+ \afterassignment\PdfRender@@PostProcessLineWidth
+ \dimen0=\PdfRender@dimexpr\PdfRender@CurrentLineWidth bp %
+ \PdfRender@let\PdfRender@relax\PdfRender@relax
+}
+\let\PdfRender@let\let
+\let\PdfRender@relax\relax
+\def\PdfRender@@PostProcessLineWidth#1\PdfRender@let{%
+ \ifx\\#1\\%
+ \endgroup
+ \else
+ \dimen0=.996264\dimen0 % 72/72.27
+ \edef\x{\endgroup
+ \def\noexpand\PdfRender@CurrentLineWidth{%
+ \strip@pt\dimen0%
+ }%
+ }%
+ \expandafter\x
+ \fi
+}
+\PdfRender@NewClassValues{LineCapStyle}{0}{\PdfRender@OpValue{J}}{%
+ 0=Butt,%
+ 1=Round,%
+ 2=ProjectingSquare,%
+}%
+\PdfRender@NewClassValues{LineJoinStyle}{0}{\PdfRender@OpValue{j}}{%
+ 0=Miter,%
+ 1=Round,%
+ 2=Bevel,%
+}%
+\PdfRender@NewClass{MiterLimit}{10}{\PdfRender@OpValue{M}}{%
+ [0-9]*[1-9][0-9]*\string\.?[0-9]*|%
+ [0-9]*\string\.?[0-9]*[1-9][0-9]*%
+}{}%
+\PdfRender@NewClass{Flatness}{0}{\PdfRender@OpValue{i}}{%
+ 100(\string\.0*)?|[0-9][0-9](\string\.[0-9]*)?|\string\.[0-9]+%
+}{}%
+\PdfRender@NewClass{LineDashPattern}{[]0}{\PdfRender@OpValue{d}}{%
+ \string\[%
+ ( ?([0-9]+\string\.?[0-9]*|\string\.[0-9]+) ?)*%
+ \string\] ?%
+ ([0-9]+\string\.?[0-9]*|\string\.[0-9]+)%
+}{}%
+\PdfRender@NewClassValues{RenderingIntent}%
+ {RelativeColorimetric}%
+ {\PdfRender@OpName{ri}}{%
+ AbsoluteColorimetric,%
+ RelativeColorimetric,%
+ Saturation,%
+ Perceptual,%
+}%
+\PdfRender@define@key{PDFRENDER}{FillColor}{%
+ \begingroup
+ \def\PdfRender@Color{#1}%
+ \ifx\PdfRender@Color\ltx@empty
+ \global\let\PdfRender@FillColor\ltx@empty
+ \else
+ \PdfRender@ColorAvailable{%
+ \PdfRender@TestBox{%
+ \expandafter\PdfRender@TryColor\PdfRender@Color\ltx@empty
+ \PdfRender@GetFillColor
+ \ifx\PdfRender@FillColor\ltx@empty
+ \@PackageWarning{pdfrender}{%
+ Cannot extract fill color\MessageBreak
+ from value `#1'%
+ }%
+ \fi
+ }%
+ }%
+ \fi
+ \endgroup
+}
+\PdfRender@define@key{PDFRENDER}{StrokeColor}{%
+ \begingroup
+ \def\PdfRender@Color{#1}%
+ \ifx\PdfRender@Color\ltx@empty
+ \global\let\PdfRender@StrokeColor\ltx@empty
+ \else
+ \PdfRender@ColorAvailable{%
+ \PdfRender@TestBox{%
+ \expandafter\PdfRender@TryColor\PdfRender@Color\ltx@empty
+ \PdfRender@GetStrokeColor
+ \ifx\PdfRender@StrokeColor\ltx@empty
+ \@PackageWarning{pdfrender}{%
+ Cannot extract stroke color\MessageBreak
+ from value `#1'%
+ }%
+ \fi
+ }%
+ }%
+ \fi
+ \endgroup
+}
+\def\PdfRender@ColorAvailable{%
+ \@ifundefined{set@color}{%
+ \@PackageError{pdfrender}{%
+ Ignoring color options, because neither\MessageBreak
+ package `color' nor package `xcolor' is loaded%
+ }\@ehc
+ \global\let\PdfRender@ColorAvailable\ltx@gobble
+ }{%
+ \global\let\PdfRender@ColorAvailable\ltx@firstofone
+ }%
+ \PdfRender@ColorAvailable
+}
+\def\PdfRender@TryColor{%
+ \@ifnextchar[\color\PdfRender@@TryColor
+}
+\def\PdfRender@@TryColor#1\ltx@empty{%
+ \expandafter\color\expandafter{\PdfRender@Color}%
+}
+\def\PdfRender@SetColor{%
+ \chardef\PdfRender@NeedsCurrentColor=0 %
+ \ifx\PdfRender@FillColor\ltx@empty
+ \ifx\PdfRender@StrokeColor\ltx@empty
+ \else
+ \edef\PdfRender@CurrentColor{%
+ \noexpand\PdfRender@FillColor\ltx@space\PdfRender@StrokeColor
+ }%
+ \chardef\PdfRender@NeedsCurrentColor=1 %
+ \fi
+ \else
+ \ifx\PdfRender@StrokeColor\ltx@empty
+ \edef\PdfRender@CurrentColor{%
+ \PdfRender@FillColor\ltx@space\noexpand\PdfRender@StrokeColor
+ }%
+ \chardef\PdfRender@NeedsCurrentColor=2 %
+ \else
+ \edef\current@color{%
+ \PdfRender@FillColor\ltx@space\PdfRender@StrokeColor
+ }%
+ \set@color
+ \fi
+ \fi
+ \ifnum\PdfRender@NeedsCurrentColor=1 %
+ \PdfRender@GetFillColor
+ \ifx\PdfRender@FillColor\ltx@empty
+ \@PackageWarning{pdfrender}{%
+ Cannot extract current fill color%
+ }%
+ \else
+ \edef\current@color{\PdfRender@CurrentColor}%
+ \set@color
+ \fi
+ \else
+ \ifnum\PdfRender@NeedsCurrentColor=2 %
+ \PdfRender@GetStrokeColor
+ \ifx\PdfRender@StrokeColor\ltx@empty
+ \@PackageWarning{pdfrender}{%
+ Cannot extract current stroke color%
+ }%
+ \else
+ \edef\current@color{\PdfRender@CurrentColor}%
+ \set@color
+ \fi
+ \fi
+ \fi
+}
+\edef\PdfRender@PatternFillColor{ % space
+ (%
+ [0-9\string\.]+ g|%
+ [0-9\string\.]+ [0-9\string\.]+ [0-9\string\.]+ rg|%
+ [0-9\string\.]+ [0-9\string\.]+ %
+ [0-9\string\.]+ [0-9\string\.]+ k%
+ ) % space
+ (.*)$%
+}
+\edef\PdfRender@PatternStrokeColor{ % space
+ (%
+ [0-9\string\.]+ G|%
+ [0-9\string\.]+ [0-9\string\.]+ [0-9\string\.]+ RG|%
+ [0-9\string\.]+ [0-9\string\.]+ %
+ [0-9\string\.]+ [0-9\string\.]+ K%
+ ) % space
+ (.*)$%
+}
+\def\PdfRender@MatchPattern#1{%
+ \ifnum\pdfmatch{\PdfRender@Pattern}{\PdfRender@String}=1 %
+ \xdef#1{%
+ \expandafter\strip@prefix\pdflastmatch 1%
+ }%
+ \edef\PdfRender@String{%
+ \expandafter\strip@prefix\pdflastmatch 2%
+ }%
+ \ifx\PdfRender@String\ltx@empty
+ \else
+ \expandafter\expandafter\expandafter\PdfRender@MatchPattern
+ \expandafter\expandafter\expandafter#1%
+ \fi
+ \fi
+}
+\def\PdfRender@GetFillColor{%
+ \global\let\PdfRender@FillColor\ltx@empty
+ \begingroup
+ \ifPdfRender@Match
+ \let\PdfRender@Pattern\PdfRender@PatternFillColor
+ \edef\PdfRender@String{\ltx@space\current@color\ltx@space}%
+ \PdfRender@MatchPattern\PdfRender@FillColor
+ \else
+ \edef\current@color{\current@color\ltx@space}%
+ \let\PdfRender@OP\relax
+ \PdfRender@FindOp{g}0%
+ \PdfRender@FindOp{G}1%
+ \PdfRender@FindOp{rg}0%
+ \PdfRender@FindOp{RG}1%
+ \PdfRender@FindOp{k}0%
+ \PdfRender@FindOp{K}1%
+ \PdfRender@FilterOp 0\PdfRender@FillColor
+ \fi
+ \endgroup
+}
+\def\PdfRender@GetStrokeColor{%
+ \global\let\PdfRender@StrokeColor\ltx@empty
+ \begingroup
+ \ifPdfRender@Match
+ \let\PdfRender@Pattern\PdfRender@PatternStrokeColor
+ \edef\PdfRender@String{\ltx@space\current@color\ltx@space}%
+ \PdfRender@MatchPattern\PdfRender@StrokeColor
+ \else
+ \edef\current@color{\current@color\ltx@space}%
+ \let\PdfRender@OP\relax
+ \PdfRender@FindOp{g}0%
+ \PdfRender@FindOp{G}1%
+ \PdfRender@FindOp{rg}0%
+ \PdfRender@FindOp{RG}1%
+ \PdfRender@FindOp{k}0%
+ \PdfRender@FindOp{K}1%
+ \PdfRender@FilterOp 1\PdfRender@StrokeColor
+ \fi
+ \endgroup
+}
+\ifPdfRender@Match
+ \expandafter\PdfRender@AtEnd
+\fi
+\def\PdfRender@FindOp#1#2{%
+ \def\PdfRender@temp##1 #1 ##2\@nil{%
+ ##1%
+ \ifx\\##2\\%
+ \expandafter\@gobble
+ \else
+ \PdfRender@OP{#1}#2%
+ \expandafter\@firstofone
+ \fi
+ {%
+ \PdfRender@temp##2\@nil
+ }%
+ }%
+ \edef\current@color{%
+ \@firstofone{\expandafter\PdfRender@temp\current@color} #1 \@nil
+ }%
+}
+\def\PdfRender@FilterOp#1#2{%
+ \expandafter\PdfRender@@FilterOp\expandafter#1\expandafter#2%
+ \current@color\PdfRender@OP{}{}%
+}
+\def\PdfRender@@FilterOp#1#2#3\PdfRender@OP#4#5{%
+ \ifx\\#4#5\\%
+ \else
+ \ifnum#1=#5 %
+ \xdef#2{#3 #4}%
+ \fi
+ \expandafter\PdfRender@@FilterOp\expandafter#1\expandafter#2%
+ \fi
+}
+\PdfRender@AtEnd
+\endinput
+%%
+%% End of file `pdfrender.sty'.