summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-02-24 18:22:07 +0000
committerKarl Berry <karl@freefriends.org>2008-02-24 18:22:07 +0000
commitac768be5ab2e638802806ac364ca4402e8e9935e (patch)
treebf26e0d972206f02cda2535e35dd8c2a33c04eaa /Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def
parentbc195e7c0fe9d96cd9b6c0230da50da6fc28de26 (diff)
pgf 2.0, third try
git-svn-id: svn://tug.org/texlive/trunk@6747 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def99
1 files changed, 99 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def
new file mode 100644
index 00000000000..742b4a6fef3
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def
@@ -0,0 +1,99 @@
+% Copyright 2006 by Till Tantau
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-vtex.def,v 1.8 2007/12/12 16:57:17 tantau Exp $
+
+
+% Driver commands for vtex
+
+% Invoking things:
+\def\pgfsys@invoke#1{\special{pS: grestore #1 gsave}} % to protect against things happeing in between
+\def\pgfsys@outerinvoke#1{\special{pS: #1}}
+\def\pgf@sys@postscript@header#1{\special{pS: #1}}
+\def\pgf@sys@postscript@object#1{\special{pS: #1}}
+
+
+%
+% Load common postscript commands:
+%
+\input pgfsys-common-postscript.def
+
+
+%
+% vtex-specific stuff:
+%
+
+
+% Starting and ending a picture:
+\def\pgfsys@beginpicture{\special{pS:
+ save
+ /pgfx currentpoint /pgfy exch def def
+ currentpoint translate
+ gsave}%
+ \let\set@color=\pgf@sys@vtex@set@color%
+ \let\reset@color=\pgf@sys@vtex@reset@color%
+}
+\def\pgf@sys@vtex@setcolor#1{%
+ \pgfutil@colorlet{pgf@tempcolor}{#1}%
+ \pgfutil@ifundefined{applycolormixins}{}{\applycolormixins{pgf@tempcolor}}%
+ \expandafter\expandafter\expandafter\pgf@sys@vtex@@setcolor\csname\string\color@pgf@tempcolor\endcsname%
+}
+\def\pgf@sys@vtex@@setcolor#1#2#3#4#5{%
+ \pgfsysps@color@resetnow%
+ \expandafter\ifx\csname pgfsys@color@#4\endcsname\relax%
+ \PackageError{pgfbase}{Unsupported color model `#4'. Sorry}{}%
+ \else%
+ \edef\pgf@colmarshal{\expandafter\noexpand\csname pgfsys@color@#4\endcsname}%
+ \pgf@uncomma#5,,%
+ \pgf@colmarshal%
+ \fi}
+\def\pgf@sys@vtex@set@color{\pgf@sys@vtex@setcolor{.}\aftergroup\reset@color}
+\def\pgf@sys@vtex@reset@color{\pgf@sys@vtex@setcolor{.}}
+\def\pgfsys@endpicture{\special{pS:
+ newpath
+ grestore
+ newpath
+ restore}}
+
+% Graphics:
+\def\pgfsys@imagesuffixlist{.epsi:.eps:.ps:.pdf:}
+
+% Starting and ending a box:
+\def\pgfsys@hbox#1{%
+ \pgfsys@invoke{save pgfx neg pgfy neg translate}%
+ \wd#1=0pt%
+ \ht#1=0pt%
+ \dp#1=0pt%
+ \box#1
+ \pgfsys@invoke{restore}%
+}
+
+\def\pgfsys@color@unstacked#1{\special{pS: \XC@usecolor{#1}}}
+
+\def\pgfsys@fill@opacity#1{\pgf@sys@fail{opacity}}
+\def\pgfsys@stroke@opacity#1{\pgf@sys@fail{opacity}}
+
+\AtBeginDocument{
+ % Always present specials.
+ \special{pS:
+ /pgfsc{} bind def% stroke color is empty by default
+ /pgffc{} bind def% fill color is empty by default
+ /pgfstr{stroke} bind def%
+ /pgffill{fill} bind def%
+ /pgfeofill{eofill} bind def%
+ /pgfe{moveto dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath} bind def% rectangle
+ /pgfw{setlinewidth} bind def % setlinewidth
+ }
+}
+
+\endinput
+
+%%% Local Variables:
+%%% mode: latex
+%%% End: