summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:46:03 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:46:03 +0000
commit873660d1a83ece926fe7206288dda9c36b349c1b (patch)
treea48f77125c309a355b5d0eb58d6b24446abe9d62 /Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
parent2939242967231097459df0fc3150fabc2f639111 (diff)
generic 1
git-svn-id: svn://tug.org/texlive/trunk@613 c570f23f-e606-0410-a88d-b1316a301751
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.def169
1 files changed, 169 insertions, 0 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
new file mode 100644
index 00000000000..79697fbb9f6
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
@@ -0,0 +1,169 @@
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-pdftex.def,v 1.4 2005/10/06 13:16:09 tantau Exp $
+
+% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the GNU Public License, version 2.
+
+
+
+
+% Driver commands for pdf
+
+%
+% Load common pdf commands:
+%
+\input pgfsys-common-pdf.def
+
+%
+% pdftex-specific stuff:
+%
+\def\pgfsys@invoke#1{\pdfliteral{#1}}
+
+\def\pgfsys@hboxsynced#1{%
+ {%
+ \pgfsys@beginscope%
+ \setbox\pgf@hbox=\hbox{%
+ \hskip\pgf@pt@x%
+ \raise\pgf@pt@y\hbox{%
+ \pgf@pt@x=0pt%
+ \pgf@pt@y=0pt%
+ \pgflowlevelsynccm%
+ \pgfsys@hbox#1}%
+ \hss%
+ }%
+ \wd\pgf@hbox=0pt%
+ \ht\pgf@hbox=0pt%
+ \dp\pgf@hbox=0pt%
+ \box\pgf@hbox%
+ \pgfsys@endscope%
+ }%
+}
+
+\let\pgf@sys@pgf@resource@list=\@empty%
+\def\pgf@sys@pdf@addtopageresources#1{%
+ \xdef\pgf@sys@pgf@resource@list{\pgf@sys@pgf@resource@list\space#1}%
+ \edef\pgf@temp{{<<\pgf@sys@pgf@resource@list>>}}%
+ \expandafter\immediate\expandafter\pdfobj\pgf@temp%
+ \edef\pgf@temp{{/ExtGState \the\pdflastobj\space 0 R}}
+ \expandafter\global\expandafter\pdfpageresources\pgf@temp%
+}
+
+
+\def\pgfsys@imagesuffixlist{pdf:jpg:jpeg:png}
+\def\pgfsys@defineimage{% width, height, page number
+ \ifx\pgf@imagewidth\@empty\else\edef\pgf@imagewidth{ width \pgf@imagewidth }\fi%
+ \ifx\pgf@imageheight\@empty\else\edef\pgf@imageheight{ height \pgf@imageheight }\fi%
+ \ifx\pgf@imagepage\@empty\else\edef\pgf@imagepage{ page \pgf@imagepage }\fi%
+ \ifx\pdfximage\@undefined% old version of pdflatex
+ \ifx\pgf@imagepage\@empty\else%
+ \PackageWarning{pgf}{Page selection not supported. Ignoring
+ page selection}%
+ \fi%
+ \setbox\@tempboxa=\hbox{%
+ \pdfimage \pgf@imageheight \pgf@imagewidth {\pgf@filename}}%
+ \pdfform\@tempboxa%
+ \edef\pgf@image{\noexpand\pdfrefform\the\pdflastform}%
+ \else% new version
+ {\pdfximage \pgf@imageheight \pgf@imagewidth attr
+ {\pgf@imageinterpolate\space\pgf@imagemask} \pgf@imagepage
+ {\pgf@filename}}%
+ \edef\pgf@image{\noexpand\pdfrefximage\the\pdflastximage}%
+ \fi
+}%
+\def\pgfsys@definemask{%
+ \ifx\pgf@maskmatte\@empty%
+ \else%
+ \edef\pgf@maskmatte{/Matte [\pgf@maskmatte]}%
+ \fi%
+ \edef\pgf@attr{{\pgf@maskmatte\space /Decode [1 0]}}%
+ \immediate\pdfximage attr \pgf@attr {\pgf@filename}%
+ \edef\pgf@mask{\the\pdflastximage}%
+}
+\def\pgfsys@horishading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \setbox\@tempboxa=\hbox to\pgf@max{\vbox to#2{\vfil\pdfliteral{/Sh sh}}\hfil}%
+ \pgf@process{\pgfpoint{\pgf@max}{#2}}%
+ \pdfxform resources {%
+ /Shading << /Sh << /ShadingType 2
+ /ColorSpace /DeviceRGB
+ /Domain [\pgf@pdfparseddomain]
+ /Coords [\pgf@doma\space0 \pgf@domb\space0]
+ /Function \pgf@pdfparsedfunction
+ /Extend [false false] >> >>}\@tempboxa%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}%
+ }%
+}
+\def\pgfsys@vertshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \setbox\@tempboxa=\hbox to#2{\vbox to\pgf@max{\vfil\pdfliteral{/Sh sh}}\hfil}%
+ \pgf@process{\pgfpoint{#2}{\pgf@max}}%
+ \pdfxform resources {%
+ /Shading << /Sh << /ShadingType 2
+ /ColorSpace /DeviceRGB
+ /Domain [\pgf@pdfparseddomain]
+ /Coords [0 \pgf@doma\space0 \pgf@domb]
+ /Function \pgf@pdfparsedfunction
+ /Extend [false false] >> >>}\@tempboxa%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}%
+ }%
+}
+\def\pgfsys@radialshading#1#2#3{%
+ {%
+ \pgf@parsefunc{#3}%
+ \setbox\@tempboxa=\hbox to2\pgf@max{\vbox to2\pgf@max{\vfil\pdfliteral{/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%
+ \pdfxform resources {%
+ /Shading << /Sh << /ShadingType 3
+ /ColorSpace /DeviceRGB
+ /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] >> >>}\@tempboxa%
+ \expandafter\xdef\csname @pgfshading#1!\endcsname{\leavevmode\noexpand\pdfrefxform\the\pdflastxform}%
+ }%
+}%
+
+ % XForm version, crashes ghostview.
+ %\def\pgfsys@defobject#1#2#3#4{%
+ % \pgf@process{#2}
+ % \setbox\pgfobjectbox\hbox{\raise-\pgf@y\hbox{\hskip-\pgf@x\relax#4}}
+ % \pgf@process{#3}
+ % \pgf@xa=\pgf@x
+ % \pgf@ya=\pgf@y
+ % \pgf@process{#2}
+ % \advance\pgf@xa by-\pgf@x
+ % \advance\pgf@ya by-\pgf@y
+ % \wd\pgfobjectbox=\pgf@xa
+ % \dp\pgfobjectbox=0pt
+ % \ht\pgfobjectbox=\pgf@ya
+ % \pdfxform\pgfobjectbox
+ % \expandafter\xdef\csname#1\endcsname{\the\pdflastxform}
+ % \expandafter\xdef\csname pgf@trans#1\endcsname
+ % {{\pgfget x}{\pgfget y}}}
+ %\def\pgfsys@useobject#1#2{%
+ % \setbox\pgfobjectbox\hbox{\pdfrefxform \csname#1\endcsname}%
+ % \dp\pgfobjectbox=0pt%
+ % \ht\pgfobjectbox=0pt%
+ % \wd\pgfobjectbox=0pt%
+ % \pgfsys@discardpath%
+ % \pgfsys@beginscope%
+ % #2%
+ % \edef\pgf@temp{{1}{0}{0}{1}\csname pgf@trans#1\endcsname}%
+ % \expandafter\pgfsys@transform\pgf@temp%
+ % \box\pgfobjectbox%
+ % \pgfsys@endscope}
+
+\endinput
+
+
+%%% Local Variables:
+%%% mode: latex
+%%% End: