| 1 |
% eepic Version 1.1e < Dec 21, 1999 > |
| 2 |
% Updated by Piet van Oostrum <[email protected]> |
| 3 |
% eepic Version 1.1c < Nov 25, 1998 > |
| 4 |
% Updated by Piet van Oostrum <[email protected]> |
| 5 |
% eepic Version 1.1b < Febrary 7, 1988 > |
| 6 |
% Written by Conrad Kwok |
| 7 |
% |
| 8 |
% Internet : [email protected] |
| 9 |
% csnet : [email protected] |
| 10 |
% csnet : kwok%[email protected] |
| 11 |
% UUCP : ...!ucbvax!ucdavis!iris!kwok |
| 12 |
% |
| 13 |
% The macros are in public domain. |
| 14 |
% You may distribute or modify it in any ways you like. |
| 15 |
% Please report any bugs, enhancements, comments, suggestions, etc. |
| 16 |
% |
| 17 |
% This style file modify some of the commands in epic[1] and LaTeX[2] such |
| 18 |
% that \special commands will be generated in drawing lines if approriate. |
| 19 |
% The \special commands generated is the subset of the \specials used |
| 20 |
% by tpic[3]. |
| 21 |
% |
| 22 |
% [1] epic is written by Sunil Podar. Please read epic.sty for the |
| 23 |
% copyright notice. |
| 24 |
% [2] LaTeX is written by Leslie Lamport. Please read the book LaTeX |
| 25 |
% [3] tpic is modified from pic by Tim Morgan |
| 26 |
% |
| 27 |
%% This file contains extensions of the following epic commands: |
| 28 |
%% \dottedline \dashline \drawline |
| 29 |
%% \jput |
| 30 |
%% |
| 31 |
%% It also contains extensions of the following LaTeX commands: |
| 32 |
%% \circle \line \oval |
| 33 |
%% |
| 34 |
%% New commands include: |
| 35 |
%% \Thicklines \arc \ellipse |
| 36 |
%% \path \spline \allinethickness |
| 37 |
%% |
| 38 |
%% New commands for eepic 1.1 |
| 39 |
%% \blacken \whiten \shade |
| 40 |
%% \texture \filltype{type} type=black|white|shade |
| 41 |
%% |
| 42 |
%% For documentation, please see the accompanying manual |
| 43 |
%% |
| 44 |
%% Change Log; |
| 45 |
%% o (October 2, 88) |
| 46 |
%% Fixed the problem of \line (\@sline). When both x and y are |
| 47 |
%% large, it produced 'bad character code' error. |
| 48 |
%% |
| 49 |
%% o (January 17, 89) |
| 50 |
%% Add commands \blacken, \whiten, \shade, \texture |
| 51 |
%% |
| 52 |
%% o (January 17, 89) |
| 53 |
%% Add \filltype{xxxxx} |
| 54 |
%% xxxxx - black, white, shade |
| 55 |
%% |
| 56 |
\typeout{% |
| 57 |
Extension to Epic and LaTeX. Version 1.1e - Released Dec 21, 1999} |
| 58 |
% |
| 59 |
\newcount\@gphlinewidth |
| 60 |
\newcount\@eepictcnt |
| 61 |
\newdimen\@tempdimc |
| 62 |
\@gphlinewidth\@wholewidth \divide\@gphlinewidth 4736 |
| 63 |
|
| 64 |
%% Redefine \thinlines, \thicklines |
| 65 |
%% See also latex.tex |
| 66 |
\def\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc |
| 67 |
\@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth |
| 68 |
\@gphlinewidth\@wholewidth \divide\@gphlinewidth 4736\relax} |
| 69 |
\def\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw |
| 70 |
\@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth |
| 71 |
\@gphlinewidth\@wholewidth \divide\@gphlinewidth 4736 |
| 72 |
\advance\@gphlinewidth\@ne % Make the output looks better |
| 73 |
\relax} |
| 74 |
%% |
| 75 |
%% To indicate whether the dot character is defined in the dotted join |
| 76 |
%% environment or not (\@ifnodotdef) |
| 77 |
\newif\if@nodotdef \global\@nodotdeftrue |
| 78 |
%% |
| 79 |
%% Redefine \dottedjoin |
| 80 |
\def\dottedjoin{\global\@jointhemtrue \global\@joinkind=0\relax |
| 81 |
\bgroup\@ifnextchar[{\global\@nodotdeffalse\@idottedjoin}% |
| 82 |
{\global\@nodotdeftrue\@idottedjoin[\@empty]}} |
| 83 |
%%---------------------------------------------------------------------- |
| 84 |
%% Redefine \jput |
| 85 |
\long\def\jput(#1,#2)#3{\@killglue\raise#2\unitlength\hbox to \z@{\hskip |
| 86 |
#1\unitlength #3\hss}% |
| 87 |
\if@jointhem \if@firstpoint \gdef\x@one{#1} \gdef\y@one{#2} \global\@firstpointfalse |
| 88 |
\else\ifcase\@joinkind |
| 89 |
\if@nodotdef |
| 90 |
\@spdottedline{\dotgap@join\unitlength}% |
| 91 |
(\x@one\unitlength ,\y@one\unitlength)(#1\unitlength,#2\unitlength) |
| 92 |
\else |
| 93 |
\@dottedline[\dotchar@join]{\dotgap@join\unitlength}% |
| 94 |
(\x@one\unitlength,\y@one\unitlength)(#1\unitlength,#2\unitlength) |
| 95 |
\fi |
| 96 |
\or\@dashline[\dashlinestretch]{\dashlen@join\unitlength}[\dotgap@join]% |
| 97 |
(\x@one,\y@one)(#1,#2) |
| 98 |
\else\@drawline[\drawlinestretch](\x@one,\y@one)(#1,#2)\fi |
| 99 |
\gdef\x@one{#1}\gdef\y@one{#2}% |
| 100 |
\fi |
| 101 |
\fi\ignorespaces} |
| 102 |
%% |
| 103 |
%% Redefine \dottedline to generate special whenever possible. |
| 104 |
\def\dottedline{\@ifnextchar [{\@idottedline}{\@ispdottedline}} |
| 105 |
%% Similar to \@idottedline but it generate \special |
| 106 |
\def\@ispdottedline#1(#2,#3){\@ifnextchar (% |
| 107 |
{\@iispdottedline{#1}(#2,#3)}{\relax}} |
| 108 |
\def\@iispdottedline#1(#2,#3)(#4,#5){\@spdottedline{#1\unitlength}% |
| 109 |
(#2\unitlength,#3\unitlength)(#4\unitlength,#5\unitlength)% |
| 110 |
\@ispdottedline{#1}(#4,#5)} |
| 111 |
% |
| 112 |
\def\@spdottedline#1(#2,#3)(#4,#5){% |
| 113 |
\@killglue % This line added by Piet van Oostrum, Dec 21, 1999. |
| 114 |
\@tempcnta \@gphlinewidth\relax |
| 115 |
\advance\@tempcnta by 2 % solely for better output |
| 116 |
\special{pn \the\@tempcnta}% |
| 117 |
\@tempdimc=#2\relax |
| 118 |
\@tempcnta \@tempdimc\relax \advance\@tempcnta 2368 \divide\@tempcnta 4736 |
| 119 |
\@tempdimc=#3\relax |
| 120 |
\@tempcntb -\@tempdimc\relax\advance\@tempcntb -2368 \divide\@tempcntb 4736 |
| 121 |
\@paspecial{\the\@tempcnta}{\the\@tempcntb}% |
| 122 |
\@tempdimc=#4\relax |
| 123 |
\@tempcnta \@tempdimc\relax \advance\@tempcnta 2368 \divide\@tempcnta 4736 |
| 124 |
\@tempdimc=#5\relax |
| 125 |
\@tempcntb -\@tempdimc\relax\advance\@tempcntb -2368 \divide\@tempcntb 4736 |
| 126 |
\@paspecial{\the\@tempcnta}{\the\@tempcntb}% |
| 127 |
\@tempdimc=#1\relax |
| 128 |
%% |
| 129 |
%% Generate the pen width in terms of inch with 3 decimal digit. |
| 130 |
\@tempcnta \@tempdimc\relax \advance\@tempcnta 2368 \divide\@tempcnta 4736 |
| 131 |
%% \@tempcnta contain the pen width in terms of thousandth of a inch |
| 132 |
%% Then it is converted back to inch. I know the way I use is dumb but |
| 133 |
%% I cannot think of any better method |
| 134 |
\@tempcntb \@tempcnta\relax \divide\@tempcntb 1000 |
| 135 |
\multiply \@tempcntb 1000 \advance\@tempcnta -\@tempcntb |
| 136 |
\divide\@tempcntb 1000 |
| 137 |
\ifnum\@tempcnta < 10 |
| 138 |
\special{dt \the\@tempcntb.00\the\@tempcnta}% |
| 139 |
\else\ifnum\@tempcnta < 100 |
| 140 |
\special{dt \the\@tempcntb.0\the\@tempcnta}% |
| 141 |
\else |
| 142 |
\special{dt \the\@tempcntb.\the\@tempcnta}% |
| 143 |
\fi\fi |
| 144 |
\ignorespaces |
| 145 |
} |
| 146 |
% |
| 147 |
\def\@iiidashline[#1]#2[#3](#4,#5)(#6,#7){% |
| 148 |
\@dashline[#1]{#2\unitlength}[#3](#4,#5)(#6,#7)% |
| 149 |
\@iidashline[#1]{#2}[#3](#6,#7)} |
| 150 |
% |
| 151 |
%% Redefine \@dashline |
| 152 |
\long\def\@dashline[#1]#2[#3](#4,#5)(#6,#7){{% |
| 153 |
\x@diff=#6\unitlength \advance\x@diff by -#4\unitlength |
| 154 |
\y@diff=#7\unitlength \advance\y@diff by -#5\unitlength |
| 155 |
%% correction to get actual width since the dash-length as taken in arguement |
| 156 |
%% is the center-to-center of the end-points. |
| 157 |
\@tempdima=#2\relax \advance\@tempdima -\@wholewidth |
| 158 |
\sqrtandstuff{\x@diff}{\y@diff}{\@tempdima}% |
| 159 |
\ifnum\num@segments <3 \num@segments=3\fi% min number of dashes I can plot |
| 160 |
% is 2, 1 at either end, thus min num@segments is 3 (including 'empty dash'). |
| 161 |
\@tempdima=\x@diff \@tempdimb=\y@diff |
| 162 |
\divide\@tempdimb by\num@segments |
| 163 |
\divide\@tempdima by\num@segments |
| 164 |
%% ugly if-then-else. If optional dotgap specified, then use it otherwise |
| 165 |
%% make a solid dash. |
| 166 |
{\ifx#3\@empty \relax |
| 167 |
\ifdim\@tempdima < 0pt \x@diff=-\@tempdima\else\x@diff=\@tempdima\fi |
| 168 |
\ifdim\@tempdimb < 0pt \y@diff=-\@tempdimb\else\y@diff=\@tempdimb\fi |
| 169 |
\global\setbox\@dotbox\hbox{% |
| 170 |
\@absspdrawline(0pt,0pt)(\@tempdima,\@tempdimb)}% |
| 171 |
\else\global\setbox\@dotbox\hbox{% |
| 172 |
\@spdottedline{#3\unitlength}(0pt,0pt)(\@tempdima,\@tempdimb)}% |
| 173 |
\fi}% |
| 174 |
\advance\x@diff by -\@tempdima % both have same sign |
| 175 |
\advance\y@diff by -\@tempdimb |
| 176 |
% |
| 177 |
%%here we correct the number of dashes to be put by reducing them |
| 178 |
%%appropriately. (num@segments*\@wholewidth) is in some way the slack we |
| 179 |
%%have,and division by dash-length gives the reduction. reduction = |
| 180 |
%%(2*num@segments*\@wholewidth)/dash-length |
| 181 |
%% (num@segments includes empty ones) |
| 182 |
\@tempdima=\num@segments\@wholewidth \@tempdima=2\@tempdima |
| 183 |
\@tempcnta\@tempdima\relax \@tempdima=#2\relax \@tempdimb=0.5\@tempdima |
| 184 |
\@tempcntb\@tempdimb\relax \advance\@tempcnta by \@tempcntb % round-off error |
| 185 |
\divide\@tempcnta by\@tempdima \advance\num@segments by -\@tempcnta |
| 186 |
% |
| 187 |
\ifnum #1=0 \relax\else\ifnum #1 < -100 |
| 188 |
\typeout{***dashline: reduction > -100 percent implies blankness!***} |
| 189 |
\else\num@segmentsi=#1 \advance\num@segmentsi by 100 |
| 190 |
\multiply\num@segments by\num@segmentsi \divide\num@segments by 100 |
| 191 |
\fi\fi |
| 192 |
% |
| 193 |
\divide\num@segments by 2 % earlier num@segments included 'empty dashes' too. |
| 194 |
\ifnum\num@segments >0 % if =0 then don't divide => \x@diff & \y@diff |
| 195 |
\divide\x@diff by\num@segments% remain same. |
| 196 |
\divide\y@diff by\num@segments |
| 197 |
\advance\num@segments by\@ne %for the last segment for which I subtracted |
| 198 |
%\@tempdima & \@tempdimb from \x@diff & \y@diff |
| 199 |
\else\num@segments=2 % one at each end. |
| 200 |
\fi |
| 201 |
%%\typeout{num@segments finally = \the\num@segments} |
| 202 |
%% equiv to \multiput(#4,#5)(\x@diff,\y@diff){\num@segments}{\copy\@dotbox} |
| 203 |
%% with arguements in absolute dimensions. |
| 204 |
\@xdim=#4\unitlength \@ydim=#5\unitlength |
| 205 |
\@killglue |
| 206 |
\loop \ifnum\num@segments > 0 |
| 207 |
\unskip\raise\@ydim\hbox to\z@{\hskip\@xdim \copy\@dotbox\hss}% |
| 208 |
\advance\num@segments \m@ne\advance\@xdim\x@diff\advance\@ydim\y@diff% |
| 209 |
\repeat}% |
| 210 |
\ignorespaces} |
| 211 |
%% redefine \@drawline |
| 212 |
% |
| 213 |
\def\@drawline[#1](#2,#3)(#4,#5){{% |
| 214 |
\@drawitfalse\@horvlinefalse |
| 215 |
\ifnum#1 <0 \relax\else\@horvlinetrue\fi |
| 216 |
\if@horvline |
| 217 |
\@spdrawline(#2,#3)(#4,#5) |
| 218 |
\else\@drawittrue\fi |
| 219 |
%%------------------------------- |
| 220 |
\if@drawit |
| 221 |
\ifnum #1=0 \relax \else\ifnum #1 < -99 |
| 222 |
\typeout{***drawline: reduction <= -100 percent implies blankness!***}% |
| 223 |
\else\num@segmentsi=#1 \advance\num@segmentsi by 50 |
| 224 |
\multiply\num@segmentsi 2 |
| 225 |
\fi\fi |
| 226 |
\@dashline[\num@segmentsi]{10pt}[\@empty](#2,#3)(#4,#5) |
| 227 |
\fi}\ignorespaces}% for \if@drawit |
| 228 |
% |
| 229 |
\def\@spdrawline(#1,#2)(#3,#4){% |
| 230 |
\@absspdrawline(#1\unitlength,#2\unitlength)(#3\unitlength,#4\unitlength) |
| 231 |
\ignorespaces |
| 232 |
} |
| 233 |
\def\@absspdrawline(#1,#2)(#3,#4){% |
| 234 |
\@killglue % This line added by Piet van Oostrum, Dec 21, 1999. |
| 235 |
\special{pn \the\@gphlinewidth}% |
| 236 |
\@tempdimc=#1\relax |
| 237 |
\@tempcnta \@tempdimc\relax \advance\@tempcnta 2368 \divide\@tempcnta 4736 |
| 238 |
\@tempdimc=#2\relax |
| 239 |
\@tempcntb -\@tempdimc\relax \advance\@tempcntb -2368 \divide\@tempcntb 4736 |
| 240 |
\@paspecial{\the\@tempcnta}{\the\@tempcntb}% |
| 241 |
\@tempdimc=#3\relax |
| 242 |
\@tempcnta\@tempdimc\relax \advance\@tempcnta 2368 \divide\@tempcnta 4736 |
| 243 |
\@tempdimc=#4\relax |
| 244 |
\@tempcntb -\@tempdimc\relax \advance\@tempcntb -2368 \divide\@tempcntb 4736 |
| 245 |
\@paspecial{\the\@tempcnta}{\the\@tempcntb}% |
| 246 |
\special{fp}% |
| 247 |
\ignorespaces |
| 248 |
} |
| 249 |
%%---------------------------------------------------------------------- |
| 250 |
\def\@paspecial#1#2{% |
| 251 |
\special{pa #1 #2}% |
| 252 |
} |
| 253 |
%% |
| 254 |
%% Functions below modify the LaTeX commands and some additional commands |
| 255 |
%% are not supported by LaTeX nor epic such as ThickLines and arc. |
| 256 |
%% |
| 257 |
%% The macros are for use with LaTeX picture environment |
| 258 |
%% By including the macro file, you can draw |
| 259 |
%% 1) \line in any slope |
| 260 |
%% 2) \circle with any radius |
| 261 |
%% 3) \ellipse with any x-axis and y-axis length |
| 262 |
%% 4) Circular \arc by giving starting and ending angle (in radius) |
| 263 |
%% |
| 264 |
%% Furthermore you may draw lines in any thickness. |
| 265 |
%% |
| 266 |
%% |
| 267 |
%% Redefine \thinlines, \thicklines and define \Thickline |
| 268 |
%% See also latex.tex |
| 269 |
\def\Thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw |
| 270 |
\@wholewidth\fontdimen8\tenlnw \@wholewidth 1.5\@wholewidth |
| 271 |
\@halfwidth .5\@wholewidth |
| 272 |
\@gphlinewidth\@wholewidth \divide\@gphlinewidth 4736\relax} |
| 273 |
%% |
| 274 |
%% Generate the \special command for drawing arc |
| 275 |
\def\@circlespecial#1#2#3#4{% |
| 276 |
\special{pn \the\@gphlinewidth}% |
| 277 |
\special{ar 0 0 #1 #2 #3 #4} |
| 278 |
} |
| 279 |
%% |
| 280 |
%% Command for drawing an arc. Elliptical arc command can be generated |
| 281 |
%% but all iptex program I saw so far does not support that. |
| 282 |
\def\@arc#1#2#3#4{% |
| 283 |
%% convert TeX dimension to length in terms thousandth of an inch |
| 284 |
\@tempdima #1\unitlength |
| 285 |
\@tempdimb #2\unitlength |
| 286 |
\@tempcnta\@tempdima \advance\@tempcnta 4736 \divide\@tempcnta 9473 |
| 287 |
\@tempcntb\@tempdimb \advance\@tempcntb 4736 \divide\@tempcntb 9473 |
| 288 |
\setbox\@tempboxa\hbox{% |
| 289 |
\@circlespecial{\the\@tempcnta}{\the\@tempcntb}{#3}{#4}}% |
| 290 |
\wd\@tempboxa\z@ \box\@tempboxa} |
| 291 |
%% |
| 292 |
%% Command for drawing Circle and Ellipse in terms of \@arc |
| 293 |
%% replace original \circle |
| 294 |
\def\circle{% |
| 295 |
\@ifstar{\copy\@filltype\@circle}{\@circle}} |
| 296 |
\def\@circle#1{\@arc{#1}{#1}{0}{6.2832}} |
| 297 |
\def\ellipse{% |
| 298 |
\@ifstar{\copy\@filltype\@ellipse}{\@ellipse}} |
| 299 |
\def\@ellipse#1#2{{\@arc{#1}{#2}{0}{6.2832}}} |
| 300 |
\def\arc#1#2#3{\@arc{#1}{#1}{#2}{#3}} |
| 301 |
%% |
| 302 |
%% Generate \special commands for drawing line |
| 303 |
\def\@linespecial#1#2{% |
| 304 |
\special{pn \the\@gphlinewidth}% |
| 305 |
\special{pa 0 0}% |
| 306 |
\special{pa #1 #2}% |
| 307 |
\special{fp}% |
| 308 |
} |
| 309 |
%% Replace original \line. Only change is to call \@ssline instead |
| 310 |
%% of \@sline. For description, see latex.tex |
| 311 |
\def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax |
| 312 |
\@linelen=#3\unitlength |
| 313 |
\ifnum\@xarg =0 \@vline |
| 314 |
\else \ifnum\@yarg =0 \@hline \else \@ssline\fi |
| 315 |
\fi} |
| 316 |
%% |
| 317 |
\def\@ssline{% |
| 318 |
\ifnum\@xarg< 0 |
| 319 |
\@negargtrue \@xarg -\@xarg \@tempdima -\@linelen |
| 320 |
\else |
| 321 |
\@negargfalse \@tempdima\@linelen |
| 322 |
\fi |
| 323 |
%% truncation is used in arithmetic |
| 324 |
\@tempcnta\@linelen \divide\@tempcnta 4736 |
| 325 |
\@yyarg -\@yarg \multiply\@yyarg \@tempcnta \divide\@yyarg\@xarg |
| 326 |
\if@negarg |
| 327 |
\@tempcnta -\@tempcnta |
| 328 |
\fi |
| 329 |
\setbox\@linechar\hbox{\@linespecial{\the\@tempcnta}{\the\@yyarg}}% |
| 330 |
\wd\@linechar\@tempdima |
| 331 |
\@clnht\@linelen |
| 332 |
\multiply\@clnht\@yarg |
| 333 |
\divide\@clnht\@xarg |
| 334 |
\ifnum\@yarg< 0 |
| 335 |
\@clnht -\@clnht |
| 336 |
\ht\@linechar\z@ \dp\@linechar\@clnht |
| 337 |
\else |
| 338 |
\ht\@linechar\@clnht \dp\@linechar\z@ |
| 339 |
\fi |
| 340 |
\box\@linechar |
| 341 |
} |
| 342 |
%% |
| 343 |
%% Replace original \@sline |
| 344 |
\def\@sline{% |
| 345 |
\@ssline |
| 346 |
%% Codes below (till end of the command) is only necessary |
| 347 |
%% when used with \@svector |
| 348 |
\if@negarg |
| 349 |
\@yyarg -\@yarg |
| 350 |
\else |
| 351 |
\@yyarg \@yarg |
| 352 |
\fi |
| 353 |
\setbox\@linechar\hbox{\@linefnt\@getlinechar(\@xarg,\@yyarg)}% |
| 354 |
\ifnum\@yarg> 0 |
| 355 |
\let\@upordown\raise |
| 356 |
\advance\@clnht -\ht\@linechar |
| 357 |
\else |
| 358 |
\let\@upordown\lower |
| 359 |
\fi |
| 360 |
\if@negarg \kern\wd\@linechar \fi |
| 361 |
} |
| 362 |
%% |
| 363 |
\def\spline(#1,#2){% |
| 364 |
\@killglue % This line added by Piet van Oostrum, Dec 21, 1999. |
| 365 |
\special{pn \the\@gphlinewidth}% |
| 366 |
\@spline(#1,#2)% |
| 367 |
} |
| 368 |
\def\@spline(#1,#2){% |
| 369 |
\@tempdima #1\unitlength |
| 370 |
\@tempdimb #2\unitlength |
| 371 |
\@tempcnta \@tempdima \advance\@tempcnta 2368 \divide\@tempcnta 4736 |
| 372 |
\@tempcntb -\@tempdimb \advance\@tempcntb -2368 \divide\@tempcntb 4736 |
| 373 |
\@paspecial{\the\@tempcnta}{\the\@tempcntb}% |
| 374 |
\@ifnextchar ({\@spline}{\special{sp}}% |
| 375 |
} |
| 376 |
\def\path(#1,#2){% |
| 377 |
\@killglue % This line added by Piet van Oostrum, Dec 20, 1999. |
| 378 |
\special{pn \the\@gphlinewidth}% |
| 379 |
\@path(#1,#2)% |
| 380 |
} |
| 381 |
\def\@path(#1,#2){% |
| 382 |
\@tempdima #1\unitlength |
| 383 |
\@tempdimb #2\unitlength |
| 384 |
\@tempcnta \@tempdima \advance\@tempcnta 2368 \divide\@tempcnta 4736 |
| 385 |
\@tempcntb -\@tempdimb \advance\@tempcntb -2368 \divide\@tempcntb 4736 |
| 386 |
\@paspecial{\the\@tempcnta}{\the\@tempcntb}% |
| 387 |
\@ifnextchar ({\@path}{\special{fp}}% |
| 388 |
} |
| 389 |
|
| 390 |
%%%%%%%%%% Beginning of \oval %%%%%%%%%%%%%%% |
| 391 |
\newdimen\maxovaldiam \maxovaldiam 40pt\relax |
| 392 |
|
| 393 |
\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen |
| 394 |
\@ovttrue \@ovbtrue \@ovltrue \@ovrtrue |
| 395 |
\@tfor\@tempa :=#3\do{\csname @ov\@tempa false\endcsname}\@ovxx |
| 396 |
#1\unitlength \@ovyy #2\unitlength |
| 397 |
\@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi |
| 398 |
\@ovro \ifdim \@tempdimb>\maxovaldiam \maxovaldiam\else\@tempdimb\fi\relax |
| 399 |
\divide \@ovro \tw@ |
| 400 |
\@ovdx\@ovxx \divide\@ovdx \tw@ |
| 401 |
\@ovdy\@ovyy \divide\@ovdy \tw@ |
| 402 |
\setbox\@tempboxa \hbox{% |
| 403 |
\if@ovr \@ovverta\fi |
| 404 |
\if@ovl \kern \@ovxx \@ovvertb\kern -\@ovxx \fi |
| 405 |
\if@ovt \@ovhorz \kern -\@ovxx \fi |
| 406 |
\if@ovb \raise \@ovyy \@ovhorz \fi}% Update by Piet van Oostrum (% added) |
| 407 |
\ht\@tempboxa\z@ \dp\@tempboxa\z@ |
| 408 |
\@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}% |
| 409 |
\endgroup} |
| 410 |
|
| 411 |
\def\@qcirc#1#2#3#4{% |
| 412 |
\special{pn \the\@gphlinewidth}% |
| 413 |
\@eepictcnt \@gphlinewidth \divide\@eepictcnt 2 |
| 414 |
\@tempcnta #1 |
| 415 |
\advance\@tempcnta 2368 \divide\@tempcnta 4736 |
| 416 |
\advance\@tempcnta\@eepictcnt |
| 417 |
\@tempcntb #2 \divide\@tempcntb 4736 \advance\@tempcntb 2 |
| 418 |
\hbox{% |
| 419 |
\@qcircspecial{\the\@tempcnta}{-\the\@eepictcnt}{\the\@tempcntb}{#3}{#4}}% |
| 420 |
} |
| 421 |
\def\@qcircspecial#1#2#3#4#5{\special{ar #1 #2 #3 #3 #4 #5}} |
| 422 |
|
| 423 |
\def\@ovverta{\vbox to \@ovyy{% |
| 424 |
\if@ovb |
| 425 |
\kern \@ovro |
| 426 |
\@qcirc{\@ovro}{\@ovro}{3.1416}{4.7124}\nointerlineskip |
| 427 |
\else |
| 428 |
\kern \@ovdy |
| 429 |
\fi |
| 430 |
\leaders\vrule width \@wholewidth\vfil \nointerlineskip |
| 431 |
\if@ovt |
| 432 |
\@qcirc{\@ovro}{\@ovro}{1.5708}{3.1416}\nointerlineskip |
| 433 |
\kern \@ovro |
| 434 |
\else |
| 435 |
\kern \@ovdy |
| 436 |
\fi |
| 437 |
}\kern -\@wholewidth} |
| 438 |
|
| 439 |
\def\@ovvertb{\vbox to \@ovyy{% |
| 440 |
\if@ovb |
| 441 |
\kern \@ovro |
| 442 |
\@qcirc{-\@ovro}{\@ovro}{4.6124}{6.2832}\nointerlineskip |
| 443 |
\else |
| 444 |
\kern \@ovdy |
| 445 |
\fi |
| 446 |
\leaders\vrule width \@wholewidth\vfil \nointerlineskip |
| 447 |
\if@ovt |
| 448 |
\@qcirc{-\@ovro}{\@ovro}{0}{1.6708}\nointerlineskip |
| 449 |
\kern \@ovro |
| 450 |
\else |
| 451 |
\kern \@ovdy |
| 452 |
\fi |
| 453 |
}\kern -\@wholewidth} |
| 454 |
|
| 455 |
\def\@ovhorz{\hbox to \@ovxx{% |
| 456 |
\if@ovr \kern \@ovro\else \kern \@ovdx \fi |
| 457 |
\leaders \hrule height \@wholewidth \hfil |
| 458 |
\if@ovl \kern \@ovro\else \kern \@ovdx \fi |
| 459 |
}} |
| 460 |
%%%%%%%%% End of \oval %%%%%%%%%%%%%% |
| 461 |
|
| 462 |
\def\allinethickness#1{\let\@linefnt\tenlnw \let\@circlefnt\tencircw |
| 463 |
\@wholewidth #1 \@halfwidth .5\@wholewidth |
| 464 |
\@gphlinewidth\@wholewidth \divide\@gphlinewidth 4736\relax} |
| 465 |
|
| 466 |
\def\blacken{\special{bk}} |
| 467 |
\def\whiten{\special{wh}} |
| 468 |
\def\shade{\special{sh}} |
| 469 |
\def\texture#1{\special{tx #1}\ignorespaces} |
| 470 |
%% |
| 471 |
\newbox\@filltype |
| 472 |
\setbox\@filltype\hbox{\special{bk}} |
| 473 |
\def\filltype#1{\@nameuse{ft@#1}} |
| 474 |
\def\ft@black{\setbox\@filltype\hbox{\special{bk}}} |
| 475 |
\def\ft@white{\setbox\@filltype\hbox{\special{wh}}} |
| 476 |
\def\ft@shade{\setbox\@filltype\hbox{\special{sh}}} |
| 477 |
%% |