Debian Codegraph @

texmf-dist/tex/latex-dev/graphics/pctexps.def

raw
1 %%
2 %% This is file `pctexps.def',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% drivers.dtx (with options: `pctexps,color3,colorfix')
8 %%
9 %% drivers.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
10 %% Copyright (C) 1995 1996 1997 1998 1999 David Carlisle
11 %% Copyright (C) 2000-2026 LaTeX Project
12 %% The LaTeX Project and any individual authors listed elsewhere
13 %% in this file.
14 %%
15 %% This file is part of the Standard LaTeX `Graphics Bundle'.
16 %% It may be distributed under the terms of the LaTeX Project Public
17 %% License, as described in lppl.txt in the base LaTeX distribution.
18 %% Either version 1.3 or, at your option, any later version.
19 %%
20 \ProvidesFile{pctexps.def}
21 [2016/06/17 v3.0m Driver-dependent file (DPC,SPQR)]
22 \def\c@lor@arg#1{%
23 \dimen@#1\p@
24 \ifdim\dimen@<\z@\dimen@\maxdimen\fi
25 \ifdim\dimen@>\p@
26 \PackageError{color}{Argument `#1' not in range [0,1]}\@ehd
27 \fi}
28 \def\color@gray#1#2{%
29 \c@lor@arg{#2}%
30 \edef#1{#2 setgray}%
31 }
32 \def\color@cmyk#1#2{\c@lor@@cmyk#2\@@#1}
33 \def\c@lor@@cmyk#1,#2,#3,#4\@@#5{%
34 \c@lor@arg{#4}%
35 \c@lor@arg{#1}%
36 \c@lor@arg{#2}%
37 \c@lor@arg{#3}%
38 \edef#5{#1 #2 #3 #4 setcmykcolor}%
39 }
40 \def\color@rgb#1#2{\c@lor@@rgb#2\@@#1}
41 \def\c@lor@@rgb#1,#2,#3\@@#4{%
42 \c@lor@arg{#1}%
43 \c@lor@arg{#2}%
44 \c@lor@arg{#3}%
45 \edef#4{#1 #2 #3 setrgbcolor}%
46 }
47 \def\color@RGB#1#2{\c@lor@@RGB#2\@@#1}
48 \def\c@lor@@RGB#1,#2,#3\@@#4{%
49 \c@lor@RGB@rgb{#1}\@tempa
50 \c@lor@RGB@rgb{#2}\@tempb
51 \c@lor@RGB@rgb{#3}\@tempc
52 \c@lor@@rgb\@tempa,\@tempb,\@tempc\@@#4%
53 }
54 \def\c@lor@RGB@rgb#1#2{%
55 \dimen@#1\p@
56 \divide\dimen@\@cclv
57 \edef#2{\strip@pt\dimen@}}
58 \def\color@hsb#1#2{\c@lor@@hsb#2\@@#1}
59 \def\c@lor@@hsb#1,#2,#3\@@#4{%
60 \c@lor@arg{#1}%
61 \c@lor@arg{#2}%
62 \c@lor@arg{#3}%
63 \edef#4{#1 #2 #3 sethsbcolor}%
64 }
65 \def\color@named#1#2{\c@lor@@named#2,,\@@#1}
66 \def\c@lor@@named#1,#2,#3\@@#4{%
67 \@ifundefined{col@#1}%
68 {\PackageError{color}{Undefined color `#1'}\@ehd}%
69 {\edef#4{\csname col@#1\endcsname}}%
70 }
71 \def\c@lor@to@ps#1\@@{#1}
72 \def\current@color{0 setgray}
73 \def\set@color{%
74 \Gin@PS@raw{\current@color}\aftergroup\reset@color}
75 \def\reset@color{\Gin@PS@raw{\current@color}}
76 \def\set@page@color{%
77 \c@lor@special\sixt@@n{background color ignored: \current@color}}
78 \def\define@color@named#1#2{%
79 \expandafter\edef\csname col@#1\endcsname{#2}}
80 \AtBeginDocument{%
81 \let\@ldc@l@r\color
82 \def\color{\if@inlabel\leavevmode\fi\@ldc@l@r}%
83 \let\@lduseb@x\usebox
84 \def\usebox#1{\@lduseb@x{#1}\set@color}}
85 \def\Ginclude@eps#1{%
86 \message{<#1>}%
87 \ifGin@clip
88 \typeout{no clipping support in pctexps}%
89 \fi
90 \Gin@[email protected]\Gin@req@width
91 \Gin@[email protected]\Gin@req@height
92 \special{ps:#1\space x=\strip@pt\Gin@req@width cm,
93 y=\strip@pt\Gin@req@height cm}}
94 \def\Ginclude@ps#1{%
95 \message{<#1>}%
96 \ifGin@clip
97 \typeout{no clipping support in pctexps}%
98 \fi
99 \hbox{\kern-\Gin@llx bp\raise-\Gin@lly bp\hbox{\special{ps:#1}}}%
100 \typeout{^^J%
101 ---------------------------------------------------------^^J%
102 .ps graphics without bounding box information cannot be^^J%
103 scaled. If the file actually contains the information,^^J%
104 please rename the file to .eps file extension.^^J%
105 ---------------------------------------------------------^^J}}
106 \def\Gin@extensions{.eps,.ps}
107 \@namedef{Gin@[email protected]}#1{{ps}{.ps}{#1}}
108 \@namedef{Gin@[email protected]}#1{{eps}{.eps}{#1}}
109 \def\Gin@PS@raw#1{\special{ps::#1}}
110 \def\Grot@start{%
111 \special{ps::gsave currentpoint
112 currentpoint translate \Grot@angle\space
113 rotate neg exch neg exch translate}}
114 \def\Grot@end{\special{ps:: currentpoint grestore moveto}}
115 \def\Gscale@start{\special{ps:: currentpoint currentpoint translate
116 \Gscale@x\space \Gscale@y\space scale neg exch neg exch translate}}
117 \def\Gscale@end{\special{ps:: currentpoint currentpoint translate
118 1 \Gscale@x\space div 1 \Gscale@y\space div scale
119 neg exch neg exch translate}}
120 \endinput
121 %%
122 %% End of file `pctexps.def'.