blob: beec95493e2c4d4c910ee1976c0af5f5efac2b5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
%D \module
%D [ file=spec-yy,
%D version=1996.01.25,
%D title=\CONTEXT\ Special Macros,
%D subtitle=\YandY's \DVIPSONE\ and \DVIWINDO,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
%D \macros
%D {dostartgraymode,dostopgraymode,
%D dostartrgbcolormode,dostartcmykcolormode,dostartgraycolormode,dostopcolormode,
%D doinsertfile}
%D
%D We implement a nice and simple figure||insertion special
%D and make use of \YandY's color specials. Otherwise \DVIWINDO\
%D would not show colors.
\startspecials[yandy]
\def\@@insertpostscriptliteral {ps: }
\def\@@insertpostscriptretain {" } % this was: {postscript}
\definespecial\dostartgraymode#1%
{\special{color gray #1}}
\definespecial\dostopgraymode%
{\special{color gray 0}}
\definespecial\dostartrgbcolormode#1#2#3%
{\special{color rgb #1 #2 #3}}
\definespecial\dostartcmykcolormode#1#2#3#4%
{\special{color cmyk #1 #2 #3 #4}}
\definespecial\dostartgraycolormode#1%
{\special{color gray #1}}
\definespecial\dostopcolormode%
{\special{color gray 0}}
% \definefileinsertion{yy}{eps}%
% {\PointsToBigPoints\@@DriverImageWidth \width
% \PointsToBigPoints\@@DriverImageHeight\height
% \special
% {psfile=\@@DriverImageFile\space
% %hscale=100\space
% %vscale=100\space
% hoffset=\width\space
% voffset=\height}}
\definefileinsertion{tr}{eps}
{\bgroup
\PointsToWholeBigPoints\@@DriverImageWidth \width
\PointsToWholeBigPoints\@@DriverImageHeight\height
\special
{PSfile="\@@DriverImageFile"\space
llx=\EPSllx\space
lly=\EPSlly\space
urx=\EPSurx\space
ury=\EPSury\space
\ifdim\@@DriverImageWidth >\zeropoint rwi=\width 0\space\fi
\ifdim\@@DriverImageHeight>\zeropoint rhi=\height0 \fi}%
\egroup}
\definefileinsertion{yy}{mps}
{\hbox
{\includeMPfonts \@@DriverImageFile
\convertMPcolors\@@DriverImageFile
\dofileinsertion{yy}{eps}}}
\definefileinsertion{yy}{tif}
{\special{insertimage:
\@@DriverImageFile \space
\@@DriverImageWidth\space
\@@DriverImageHeight}}
\definespecial\doinsertfile
{\dofileinsertion{yy}\@@DriverImageType}
\def\MPprologues{1}
\def\MPOSTdriver{dvipsone}
\stopspecials
\endinput
|