Debian Codegraph @

texmf-dist/tex/generic/pgf/systemlayer/pgfsys-vtex.def

raw
1 % Copyright 2019 by Till Tantau
2 %
3 % This file may be distributed and/or modified
4 %
5 % 1. under the LaTeX Project Public License and/or
6 % 2. under the GNU Public License.
7 %
8 % See the file doc/generic/pgf/licenses/LICENSE for more details.
9
10 \ProvidesFileRCS{pgfsys-vtex.def}
11
12 \pgfutil@packagewarning
13 {pgfsys-vtex.def}%
14 {This driver is deprecated and will be removed by the end of 2022.
15 Please switch to another TeX engine}
16
17 % Driver commands for vtex
18
19 % Invoking things:
20 \def\pgfsys@invoke#1{\special{pS: grestore #1 gsave}} % to protect against things happeing in between
21 \def\pgfsys@outerinvoke#1{\special{pS: #1}}
22 \def\pgf@sys@postscript@header#1{\immediate\special{pS: #1}}
23 \def\pgf@sys@postscript@object#1{\immediate\special{pS: #1}}
24
25
26 %
27 % Load common postscript commands:
28 %
29 \input pgfsys-common-postscript.def
30
31
32 %
33 % vtex-specific stuff:
34 %
35
36
37 % Starting and ending a picture:
38 \def\pgfsys@beginpicture{\special{pS:
39 save
40 /pgfx currentpoint /pgfy exch def def
41 currentpoint translate
42 gsave}%
43 \let\set@color=\pgf@sys@vtex@set@color%
44 \let\reset@color=\pgf@sys@vtex@reset@color%
45 }
46 \def\pgf@sys@vtex@setcolor#1{%
47 \pgfutil@colorlet{pgf@tempcolor}{#1}%
48 \pgfutil@ifundefined{applycolormixins}{}{\applycolormixins{pgf@tempcolor}}%
49 \expandafter\expandafter\expandafter\pgf@sys@vtex@@setcolor\csname\string\color@pgf@tempcolor\endcsname%
50 }
51 \def\pgf@sys@vtex@@setcolor#1#2#3#4#5{%
52 \pgfsysps@color@resetnow%
53 \expandafter\ifx\csname pgfsys@color@#4\endcsname\relax%
54 \pgferror{Unsupported color model `#4'. Sorry}%
55 \else%
56 \edef\pgf@colmarshal{\expandafter\noexpand\csname pgfsys@color@#4\endcsname}%
57 \pgf@uncomma#5,,%
58 \pgf@colmarshal%
59 \fi}
60 \def\pgf@sys@vtex@set@color{\pgf@sys@vtex@setcolor{.}\aftergroup\reset@color}
61 \def\pgf@sys@vtex@reset@color{\pgf@sys@vtex@setcolor{.}}
62 \def\pgfsys@endpicture{\special{pS:
63 newpath
64 grestore
65 newpath
66 restore}}
67
68 % Graphics:
69 \def\pgfsys@imagesuffixlist{.epsi:.eps:.ps:.pdf:}
70
71 % Starting and ending a box:
72 \def\pgfsys@hbox#1{%
73 \pgfsys@invoke{save pgfx neg pgfy neg translate}%
74 \wd#1=0pt%
75 \ht#1=0pt%
76 \dp#1=0pt%
77 \box#1
78 \pgfsys@invoke{restore}%
79 }
80
81 \def\pgfsys@color@unstacked#1{\special{pS: \XC@usecolor{#1}}}
82
83 \def\pgfsys@fill@opacity#1{\pgf@sys@fail{opacity}}
84 \def\pgfsys@stroke@opacity#1{\pgf@sys@fail{opacity}}
85
86 \AtBeginDocument{
87 % Always present specials.
88 \immediate\special{pS:
89 /pgfsc{} bind def% stroke color is empty by default
90 /pgffc{} bind def% fill color is empty by default
91 /pgfstr{stroke} bind def%
92 /pgffill{fill} bind def%
93 /pgfeofill{eofill} bind def%
94 /pgfe{moveto dup 0 rlineto exch 0 exch rlineto neg 0 rlineto closepath} bind def% rectangle
95 /pgfw{setlinewidth} bind def % setlinewidth
96 }
97 }
98
99 % vtex commands for changing the paper size
100 \def\pgfsys@papersize#1#2{\mediawidth#1\mediaheight#2}
101
102
103
104
105
106 \endinput
107
108 %%% Local Variables:
109 %%% mode: latex
110 %%% End: