summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/xypic/xytpic.doc
blob: 02cddcb977f94f035ff0d7a77f2bdbbb156c124e (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
%% $Id: xytpic.doc,v 3.3 1996/12/18 09:50:38 ross Exp $
%%
%% Xy-pic ``tpic'' TPIC backend, for lines, curves and fills.
%% Copyright (c) 1995-1996	Ross Moore	<ross@mpce.mq.edu.au>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1996	Kristoffer H. Rose	<krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi

\xyprovide{tpic}{TPIC backend}{\stripRCS$Revision: 3.3 $}%
 {Ross Moore}{ross@mpce.mq.edu.au}%
 {Mathematics Department, Macquarie University, NSW~2109, Australia}

\DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifx\undefined\TPIC \def\TPIC{{\smc tpic}}\fi
This option allows the \Xy-pic fonts to be replaced by \TPIC\ |\special|s,
when used with a dvi-driver capable of supporting them. Extra capabilities
include smoother lines, evenly spaced dotted/dashed curves, variable
line-widths, gray-scale fills of circles, ellipses and polygonal regions. 

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\paragraph*{Header:}\leavevmode
\DOCHEADER
\DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Use of \TPIC\ |\special|s offers an alternative to the \Xy-pic fonts. However
they require a dvi-driver that is capable of recognizing and interpreting
them. One such viewer is |xdvik|, Karl Berry's modification to the |xdvi|
viewer on \unix\ systems running X-windows or a derivative.  |dvipsk|, Karl
Berry's modification to |dvips| also handles \TPIC\ |\special|s, so
|xdvik|/|dvipsk| is an good combination for quality screen-display and
\PS\ printing. 

Once loaded using |\xyoption{tpic}|, with an appropriate <driver> also
specified either already or subsequently, the following commands are
available to turn the \TPIC\ backend off/on.
%
\begin{defs}
|\NoTPICspecials| & turns off \TPIC\ specials.\kern-50pt\cr
|\UseTPICspecials| & reinstates \TPIC\ specials.\kern-30pt
\end{defs}

\DOCMODE(
\xynew@{if}\ifTPICspecials@
\xydef@\UseTPICspecials{\TPICspecials@true}
\xydef@\NoTPICspecials{\TPICspecials@false}
\DOCMODE)

\DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

There is a limit to the number of points allowable in a path. For paths 
constructed by \Xy-pic, which includes spline curves, when the limit 
is reached the path is automatically flushed and a new path commenced.
The following command can be used to customise this limit---initially
set at $300$ for use with \xdvi---to suit alternative <driver>s.
%
\begin{defs}
|\maxTPICpoints{|<num>|}| & set maximum for paths
\end{defs}

\DOCMODE(
\xynew@{count}\xytpic@cnt
\xydef@\xytpic@max{300}
\xydef@\maxTPICpoints#1{\count@=#1 \relax
 \ifnum\count@>\tw@ \edef\xytpic@max{\the\count@}%
 \else\expandafter\xyTPICmaxwarning@\expandafter{\the\count@}\fi}
\xydef@\xyTPICmaxwarning@#1{max points must be at least 2, #1 invalid}
\DOCMODE)

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Each object involving \TPIC\ |\special|s must set the style, using
|\xytpic@set@| to store a macro as the expansion of |\xytpic@style@@|.
Currently this is global, since a \TPIC\ object must be completed once
it has been started --- perhaps this is not necessary.

Note that |\xytpic@set@| uses |\xdef|, but has a |\noexpand| in its 
expansion; this forces expansion of the argument, when there is one,
to the control sequence passed as the first token following |\xytpic@set@|.

\DOCMODE(
\xydef@\xytpic@style@@{\xytpic@fp}
\xydef@\xytpic@reset@{\gdef\xytpic@style@@{\xytpic@fp}%
 \global\xytpic@cnt=\z@ }
\xydef@\xytpic@set@#1{\xdef\xytpic@style@@{\noexpand#1}}
\DOCMODE)

Here are the actual |\specials| that get placed in the dvi-file.

\DOCMODE(
\xydef@\xytpic@pn#1{\xyTPIC@special{pn #1}}
\xydef@\xytpic@pa#1#2{\global\advance\xytpic@cnt\@ne\relax
 \ifnum\xytpic@cnt=\xytpic@max\relax \xyTPIC@special{pa #1 #2}%
  \kern-\X@c\raise-\Y@c\hbox{\xytpic@style@@}\kern\X@c
% \xytpic@ip
 \global\xytpic@cnt=\@ne \relax\fi \xyTPIC@special{pa #1 #2}}
\xydef@\xytpic@fp{\xyTPIC@special{fp}}
\xydef@\xytpic@ip{\xyTPIC@special{ip}}
\xydef@\xytpic@da#1{\xyTPIC@special{da #1}}
\xydef@\xytpic@dt#1{\xyTPIC@special{dt #1}}
\xydef@\xytpic@sp#1{\xyTPIC@special{sp #1}}
\xydef@\xytpic@ar#1#2#3#4#5#6{\xyTPIC@special{ar #1 #2 #3 #4 #5 #6}}
\xydef@\xytpic@ia#1#2#3#4#5#6{\xyTPIC@special{ia #1 #2 #3 #4 #5 #6}}
\xydef@\xytpic@sh#1{\xyTPIC@special{sh #1}}
%\xydef@\xytpic@psb#1{\xyTPIC@special{:[begin] #1}}
%\xydef@\xytpic@pse#1{\xyTPIC@special{:[end]}}
%
\xydef@\xytpic@wh{\xyTPIC@special{sh 0}}  % obsolete
\xydef@\xytpic@bk{\xyTPIC@special{sh 1}}  % obsolete

\xydef@\xyTPIC@special#1{\special{#1}}
\xydef@\xyTPIC@noisy#1{\W@{TPIC: #1}\special{#1}}
\xydef@\NoisyTPIC{\let\xyTPIC@special=\xyTPIC@noisy}
\DOCMODE)

Some effects may require a \TPIC\ |\special| to be placed both
before and after the <object>.

\DOCMODE(
\xydef@\xyTPICsplit@#1#2{\setboxz@h{#1\boxz@#2}}%
\DOCMODE)

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\TPIC\ uses units of `milli-inches' for coordinates,
but inches for dot-separations and dash-length.

\DOCMODE(
\xydef@\xytpic@pt#1{\dimen@=#1\divide\dimen@ by72 %
 \multiply\dimen@ by 1000 \advance\dimen@.5\p@
 \count@=\dimen@ \divide\count@\p@ }
\xydef@\xytpic@in#1{\dimen@=#1\divide\dimen@ by72 %
 \edef\next@{\expandafter\removePT@\the\dimen@}}%
\DOCMODE)

The \TPIC\ location is calculated relative to the current \TeX\ reference
point. Hence most \TPIC\ objects start at the $(0,0)$ location.

\DOCMODE(
\xydef@\xytpic@dot@@{\xytpic@pa00}
\xydef@\xytpic@width@{\xytpic@pt{\xylinethick@}%
 \expandafter\xytpic@pn\expandafter{\the\count@}}
%\xylet@\xytpic@width@=\relax

\xydef@\xytpic@line{%
 \xytpic@dot@@ \xytpic@pt{-\d@X}\count@@=\count@
 \xytpic@pt\d@Y \edef\next@{{\the\count@@}{\the\count@}}%
 \expandafter\xytpic@pa\next@ \xytpic@style@@ \xytpic@reset@ }

\xydef@\xytpic@solid@@{\xytpic@set@\xytpic@fp}
\xydef@\xytpic@dashed@@{\xytpic@in\xydashl@ \xytpic@dad}
\xydef@\xytpic@dotted@@{\dimen@=.5\xydashl@ \xytpic@in\dimen@ \xytpic@dtd}
\xydef@\xytpic@dad{\expandafter\xytpic@set@\expandafter{%
  \expandafter\xytpic@da\expandafter{\next@}}}
\xydef@\xytpic@dtd{\expandafter\xytpic@set@\expandafter{%
  \expandafter\xytpic@dt\expandafter{\next@}}}

\xydef@\xytpic@polysolid@{\xytpic@set@\xytpic@fp}
\xydef@\xytpic@polydashed@#1{\count@=#1 \xytpic@dad}
\xydef@\xytpic@polydotted@#1{\count@=#1 \xytpic@dtd}
\xydef@\xytpic@postpoly@{\xytpic@style@@ \xytpic@reset@}
\DOCMODE)

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\paragraph*{re-bindings}

This is similar to the mechanism used by the \PS\ back-end to rebind
``hooks'' to incorporate a switch according to the current value of
|\ifTPICspecials@|.

\DOCMODE(
\xydef@\TPICalternative@#1#2{%
\expandafter\global\expandafter\let\csname origxy#2@\endcsname=#1%
 \xdef#1{\noexpand\ifTPICspecials@
   \noexpand\expandafter\expandafter\noexpand\csname xytpic@#2@\endcsname
  \noexpand\else
   \noexpand\expandafter\expandafter\noexpand\csname origxy#2@\endcsname
  \noexpand\fi}}%
\DOCMODE)

Allow only one instance of |\setupxyTPIC@|; thereafter simply do
|\reloadxyTPIC@| to turn on anything that has been turned off.

\DOCMODE(
\xydef@\setupxyTPIC@{\xywarning@{using TPIC specials}%
 \TPICalternative@{\solid@}{solid}%
 \TPICalternative@{\dash@}{dashed}%
 \TPICalternative@{\point@}{point}%
 \TPICalternative@{\circhar@@}{circhar}%
 \TPICalternative@{\splinesolid@}{splinesolid}%
% \TPICalternative@{\splinedashed@}{splinedashed}%
% \TPICalternative@{\splinedotted@}{splinedotted}%
 \xywithoption{frame}{\xyinputorelse@{xytp-f}{}\xyuncatcodes}%
 \let\setupxyTPIC@=\reloadxyTPIC@ 
 \activateTPIC@ }

\xydef@\xyunloadTPIC@{\xywarning@{TPIC specials turned off}%
 \xywithoption{curve}{\xysetup@@\uninstallTPICcurves@ }%
 \xywithoption{line}{\xysetup@@\uninstallTPICline@ }%
 \xywithoption{frame}{\xysetup@@\uninstallTPICframes@ }%
 \TPICspecials@false
 \let\setupxyTPIC@=\reloadxyTPIC@ }

\xydef@\activateTPIC@{%
 \xywithoption{line}{\xysetup@@\installTPICline@}%
 \xywithoption{curve}{\xysetup@@\installTPICcurves@}%
 \xywithoption{frame}{\xysetup@@\installTPICframes@}%
 \TPICspecials@true }

\xydef@\reloadxyTPIC@{\xywarning@{TPIC specials back on}\activateTPIC@ }
\DOCMODE)

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\paragraph*{straight lines}

\DOCMODE(
\xydef@\xytpic@solid@{%
 \ifInvisible@ \let\next@=\no@@
 \else \DN@{\xyTPICstraight@{\xytpic@solid@@ \xytpic@line}}\fi
 \next@ }

\xydef@\xytpic@dashed@{\line@
 \def\Connect@@{\xyTPICstraight@{\xytpic@dashed@@ \xytpic@line}}}

\xydef@\xytpic@point@{\xytpic@dot@@\xytpic@fp\egroup
 \Invisible@false \Hidden@false \def\Leftness@{.5}\def\Upness@{.5}\ctipEdge@
 \def\Drop@@{\styledboxz@}%
 \def\Connect@@{\xyTPICstraight@{\xytpic@dotted@@ \xytpic@line}}}

\xydef@\xyTPICstraight@#1{\setupDirection@
 \edef\Creset@@{\cfromthec@ \pfromthep@ \DirectionfromtheDirection@}%
 \DN@##1##2{\def\checkoverlap@@{%
  \ifdim##1\X@p>##1\X@c \let\next@=\relax \fi
  \ifdim##2\Y@p>##2\Y@c \let\next@=\relax \fi}}%
 \edef\nextii@{{\sd@X}{\sd@Y}}\expandafter\next@\nextii@
 \noCshavep@@ \edef\Cshavep@@{\pfromthep@ \noexpand\resetDirection@}%
 \noCshavec@@ \edef\Cshavec@@{\cfromthec@ \noexpand\resetDirection@}%
 \ifHidden@\else
  \ifdim\Y@c>\Y@max \Y@max=\Y@c \fi  \ifdim\Y@p>\Y@max \Y@max=\Y@p \fi
  \ifdim\Y@c<\Y@min \Y@min=\Y@c \fi  \ifdim\Y@p<\Y@min \Y@min=\Y@p \fi
  \ifdim\X@c>\X@max \X@max=\X@c \fi  \ifdim\X@p>\X@max \X@max=\X@p \fi
  \ifdim\X@c<\X@min \X@min=\X@c \fi  \ifdim\X@p<\X@min \X@min=\X@p \fi \fi
 \ifInvisible@\let\next@=\relax	\else
  \DN@{\setboxz@h{\kern\X@c \raise\Y@c\hbox{#1}}%
   \ht\z@=\z@ \wd\z@=\z@ \dp\z@=\z@ {\Drop@@}}%
 \fi 
 \checkoverlap@@
 \ifdim\d@X=\z@ \ifdim\d@Y=\z@ \DN@{\relax}\fi\fi \next@
 \def\Cslidep@@{\noCslidep@@}\def\Cslidec@@{\noCslidec@@}%
 \def\Calong@@{\noCalong@@}\Creset@@ }
\DOCMODE)

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\paragraph*{spline curves}

\DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\noindent
Of the curves defined in the |xycurve| extension, only solid spline curves 
are supported. This is done by treating the spline as a polygon (poly-line) 
with many segments. The dotted or dashed variants do not work correctly. 

Implementations of \TPIC\ draw dashed polygons such that the start and 
finish of each segment is solid. Since these segments can be very short, 
the effect is simply to create a solid line. Similarly the shortness of the 
segments tends to give nothing at all for large portions of a dotted curve.
What is needed is an implementation whereby the on/off nature of a dashed
or dotted polygon is determined by the accumulated length, not the length 
along just the current segment.

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DOCMODE(
\xydef@\xytpic@splinesolid@{\xyTPICspline@\xytpic@fp }
\xydef@\xytpic@splinedashed@{\xytpic@in\xydashl@\expandafter\xyTPICspline@
 \expandafter{\expandafter\xytpic@da\expandafter{\next@}}}
\xydef@\xytpic@splinedotted@{\xytpic@in{.5\xydashl@}\expandafter\xyTPICspline@
 \expandafter{\expandafter\xytpic@dt\expandafter{\next@}}}

\xydef@\xyTPICspline@#1{\setbox\splinebox@=\copy\voidb@x %\zerodot
 \SloppyCurves %\splinetol@=\xydashl@  % \xytpic@ip
 \global\xytpic@cnt=\@ne \xytpic@set@{#1}%
 \def\splineextra@@{\xyTPICspline@dot}%
 \def\xycrvdrop@{ }\def\xycrvconn@{}\splineset@@ \xytpic@style@@}

\xydef@\xyTPICspline@dot{\xytpic@pt{\X@c}\count@@=\count@
 \xytpic@pt{-\Y@c}\edef\next@{{\the\count@@}{\the\count@}}%
 \expandafter\xytpic@pa\next@ }
\DOCMODE)

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\paragraph*{line width}

\DOCMODE(
\xydef@\xyTPIClinewidth@#1{\xytpic@pt{#1}\edef\next@{\the\count@}}

\xydef@\installTPICline@{%
 \let\xylinewidth@@=\xylinewidth@
 \let\xylineSpecial@@=\xytpic@pn
 \let\transxyline@@=\xyTPIClinewidth@ }

\xydef@\uninstallTPICline@{\UnloadLine@}%
\DOCMODE)

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\paragraph*{circles and ellipses}

Here we catch circles and ellipses specified using the |\xycircle| command
from the |xycurve| extension. Since TPIC supports only solid circles, 
we catch it only when the <style> is either |{}| or |{-}|.

\DOCMODE(
\xydef@\xydoTPICcircle@#1{\DN@{#1}%
 \ifx\next@\empty\DN@{\xyTPICfullcircle@}%
 \else\expandafter\DNii@\expandafter{\addDASH@{}}%
  \ifx\next@\nextii@\DN@{\L@=\R@ \xyTPICfullcircle@}%
 \else\DN@{\dosolidcircle@{#1}}\fi\fi \next@ }

\xydef@\xyTPICfullcircle@{\xyTPICpartcircle@{00}0\twoPi@}%

\xydef@\xyTPICpartcircle@#1#2#3{%
 \xytpic@pt{\R@}\expandafter\DNii@\expandafter{\the\count@}%
 \xytpic@pt{\L@}\edef\next@{#1{\nextii@}{\the\count@}{#2}{#3}}%
 \expandafter\xytpic@ar\next@ }

\xydef@\qartPi@{0.7853981}
\xydef@\tartPi@{2.3561944}
\DOCMODE)

This replaces just the font character, called using |\circhar@@#1|.

\DOCMODE(
\xydef@\xytpic@circhar@#1{\xytpic@width@\ifcase#1%
  \xytpic@pt{\R@}\edef\next@{{{\the\count@}0}}%
  \expandafter\xyTPICcirchar@i\next@{\tartPi@}{\fullPi@}\kern\partroottwo\R@
 \or
  \xytpic@pt{\halfroottwo\R@}\edef\next@{{{\the\count@}0}}%
  \expandafter\xyTPICcirchar@i\next@{\halfPi@}{\tartPi@}\kern\halfroottwo\R@
 \or
  \xytpic@pt{\z@}\edef\next@{{{\the\count@}0}}%
  \expandafter\xyTPICcirchar@i\next@{\qartPi@}{\halfPi@}\kern\halfroottwo\R@
 \or
  \xytpic@pt{-\halfroottwo\R@}\edef\next@{{{\the\count@}0}}%
  \expandafter\xyTPICcirchar@i\next@0{\qartPi@}\kern\partroottwo\R@
 \or
  \xytpic@pt{-\halfroottwo\R@}\edef\next@{{{\the\count@}0}}%
  \expandafter\xyTPICcirchar@i\next@{-\qartPi@}0\kern\partroottwo\R@
 \or
  \xytpic@pt{\z@}\edef\next@{{{\the\count@}0}}%
  \expandafter\xyTPICcirchar@i\next@{-\halfPi@}{-\qartPi@}\kern\halfroottwo\R@
 \or
  \xytpic@pt{\halfroottwo\R@}\edef\next@{{{\the\count@}0}}%
  \expandafter\xyTPICcirchar@i\next@{-\tartPi@}{-\halfPi@}\kern\halfroottwo\R@
 \or
  \xytpic@pt{\R@}\edef\next@{{{\the\count@}0}}%
  \expandafter\xyTPICcirchar@i\next@{-\fullPi@}{-\tartPi@}\kern\partroottwo\R@
 \fi}

\xydef@\xyTPICcirchar@i#1#2#3{\L@=\R@ \xyTPICpartcircle@{#1}{#2}{#3}}
\DOCMODE)

\paragraph*{quadratic splines}

\DOCMODE(
\xydef@\xyTPIC@spline@ii@{\DN@{\xy@spline@ii}%
 \ifx\splineSTYLE@\empty\DN@{\xyTPICqspline@{0}}%
 \else\expandafter\DNii@\expandafter{\addDASH@{}}%
 \ifx\splineSTYLE@\nextii@\DN@{\xyTPICqspline@{0}}%
 \else\expandafter\DNii@\expandafter{\addDOT@{}}%
 \ifx\splineSTYLE@\nextii@\DN@{\xyTPICqspline@{-.5}}%
 \else\expandafter\expandafter\expandafter\DNii@\expandafter\expandafter
  \expandafter{\expandafter\addDASH@\addDASH@{}}%
 \ifx\splineSTYLE@\nextii@\DN@{\xyTPICqspline@{}}%
 \fi\fi\fi\fi
 \next@ }%

\xydef@\xyTPIC@accumulate{\xytpic@pt\X@c \count@@=\count@ 
 \xytpic@pt{-\Y@c}\edef\next@{{\the\count@@}{\the\count@}}%
 \expandafter\xytpic@pa\next@ }

\xydef@\xyTPICqspline@#1{\xytpic@width@
 \xytpic@in{#1\xydashl@}\expandafter\gdef\expandafter\xytpic@style@@
  \expandafter{\expandafter\xytpic@sp\expandafter{\next@}}%
 \save@ \cfromp@ \xyTPIC@accumulate
  \edef\smapp@@{\s@bot}\smapxy@i{\xyTPIC@accumulate}%
 \leave@ \xyTPIC@accumulate \xytpic@style@@ \xytpic@reset@
 \enter@{}\xy@spline@x }
\DOCMODE)

\DOCMODE(
\xydef@\installTPICcurves@{%
 \let\dosolidcircle@@=\xydoTPICcircle@
 \let\xy@spline@ii@@=\xyTPIC@spline@ii@
 }
\xydef@\uninstallTPICcurves@{%
 \let\dosolidcircle@@=\dosolidcircle@
 \let\xy@spline@ii@@=\xy@spline@ii }
\DOCMODE)

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\paragraph*{frames}
\DOCMODE(
 \xywithoption{frame}{\xyinputorelse@{xytp-f}{}}
\DOCMODE)

Implement color fills by reading from a |\TPICfillcolor|.
Implement pattern fills by reading from a |\TPICfillpatt|.
Read these whenever a fill is requested.


\DOCMODE(
\xydef@\uninstallTPICframes@{\UnloadFrames@}
\DOCMODE)

\DOCMODE2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DOCMODE(
\xyendinput

% $Log: xytpic.doc,v $
% Revision 3.3  1996/12/18  09:50:38  ross
% adjusted Drop@@ for styles
% minor improvements to file-loading commands
%
% Revision 3.2  1995/09/19  18:21:41  ross
% Bug fix release.
%
% Revision 3.1  1995/09/05  20:36:33  ross
% Release!
%
% Revision 3.0  1995/07/07  20:13:19  ross
% Major release w/new User's Guide!
%
% Revision 2.13  1995/07/04  15:04:51  ross
% Ready for release of v3.
%
% NEW for version 3.1 by Ross Moore  1995/03/18.
% replaces xyps-col.doc
%
\DOCMODE)

\DOCMODE3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Tell Emacs that this is a LaTeX document and how it is formatted:
% Local Variables:
% mode:latex
% fill-column:77
% fill-prefix:""
% End: