diff options
author | Karl Berry <karl@freefriends.org> | 2008-02-15 00:18:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-02-15 00:18:10 +0000 |
commit | dd68c1b077b027da97d1d4d5c7cb2e019bd58325 (patch) | |
tree | a2923577a6848c0a4341d06fd955bf2d41d931cf /Master/texmf-dist/tex/generic/context | |
parent | 1eb8d4fb119786820e35b966a795ad48d3ae7d8f (diff) |
pdftex/graphics update
git-svn-id: svn://tug.org/texlive/trunk@6632 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/context')
-rw-r--r-- | Master/texmf-dist/tex/generic/context/mptopdf.tex | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/context/mptopdf.tex b/Master/texmf-dist/tex/generic/context/mptopdf.tex index 84a8aa380b8..bb9f27d0cc6 100644 --- a/Master/texmf-dist/tex/generic/context/mptopdf.tex +++ b/Master/texmf-dist/tex/generic/context/mptopdf.tex @@ -112,6 +112,7 @@ \def\processMPfile#1 % {\pdfoutput=1 + \pdfpkresolution600 \pdfcompresslevel=9 \chardef\makeMPintoPDFobject=1 \hsize=100in @@ -143,4 +144,32 @@ %D file can be converted to \EPS\ using for instance the %D \PDFTOPS\ program (in \WEBC) or \GHOSTSCRIPT. +%D A few helpers: + +{\catcode`\.=12 + \catcode`\p=12 + \catcode`\t=12 + \gdef\WITHOUTPT#1pt{#1}} + +\def\withoutpt#1% + {\expandafter\WITHOUTPT#1} + +\def\negatecolorcomponent#1% #1 = \macro + {\scratchdimen1pt\advance\scratchdimen-#1\onepoint + \ifdim\scratchdimen<\zeropoint\scratchdimen\zeropoint\fi + \edef#1{\withoutpt\the\scratchdimen}} + +\let\negatedcolorcomponent\firstofoneargument + +\def\negatedcolorcomponent#1% + {\ifdim\dimexpr1pt-#1pt\relax<\zeropoint + 0pt% + \else + \expandafter\withoutpt\the\dimexpr1pt-#1pt\relax + \fi} + +\def\negatecolorcomponent#1% #1 = \macro + {\edef#1{\negatedcolorcomponent{#1}}} + + \dump |