summaryrefslogtreecommitdiff
path: root/tex/context/base/meta-ini.tex
blob: d635571eefb0e1fd13e309826bf0ce4208ab9bff (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
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
%D \module
%D   [       file=meta-ini,
%D        version=1999.07.10,
%D          title=\METAPOST\ Graphics, 
%D       subtitle=Initialization, 
%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. 

\writestatus{loading}{MetaPost Graphics / Initializations}

\unprotect 

\startmessages  dutch  library: metapost
  title: metapost
      1: metapost bibliotheek -- wordt geladen
\stopmessages

\startmessages  english  library: metapost
  title: metapost
      1: loading metapost library --
\stopmessages

\startmessages  german  library: metapost
  title: metapost
      1: loading metapost library --
\stopmessages

\startmessages  czech  library: metapost
  title: metapost
      1: loading metapost library --
\stopmessages

\startmessages  italian  library: metapost
  title: metapost
      1: caricamento della libreria metapost --
\stopmessages

\startmessages  norwegian  library: metapost
  title: metapost
      1: metapost bibliotek -- blir lest inn
\stopmessages

\startmessages  romanian  library: metapost
  title: metapost
      1: se incarca biblioteca metapost --
\stopmessages

%D This module extends the functionality of the support module
%D \type {supp-mps}, the module that is responsible for
%D \METAPOST\ inclusion in \CONTEXT. Some basic macros will be
%D extended. Since some support is depends on \METAPOST\
%D macros. so let's first preload a few auxiliary \METAPOST\
%D files. 

\appendtoks 
  if unknown context_tool : input mp-tool ; fi ;  
  if unknown context_spec : input mp-spec ; fi ;  
  if unknown context_grph : input mp-grph ; fi ;  
\to \MPinitializations 

%D Since we want lables to follow the document settings, we 
%D also set the font related variables.

\appendtoks
  defaultfont  := "\truefontname{Regular}" ;
  defaultscale := \the\bodyfontsize/10pt ; % not good yet
\to \MPinitializations

%D In order to support fancy text features (like outline 
%D fonts), we set: 

\appendtoks
  graphictextformat := "context" ; 
  graphictextdirective "\the\everyMPTEXgraphic" ; 
\to \MPinitializations

%D Some safeguards: 

\appendtoks \let\handlecompoundcharacter\string \to \everyMPgraphic

%D We save the number of graphics for the sake of \TEXEXEC.

\newcounter\totalnumberofMPgraphics 
\def\thecurrentMPgraphic{\the\currentMPgraphic}

\appendtoks 
  \savecurrentvalue\totalnumberofMPgraphics\thecurrentMPgraphic
\to \everybye

%D \macros
%D   {setupMPvariables}
%D
%D When we build collections of \METAPOST\ graphics, like
%D background and buttons, the need for passing settings
%D arises. By (mis|)|using the local prefix that belongs to
%D \type {\framed}, we get a rather natural interface to
%D backgrounds. To prevent conflicts, we will use the \type
%D {-} in \METAPOST\ specific variables, like:
%D
%D \starttypen
%D \setupMPvariables[meta:button][size=20pt]
%D \stoptypen

\def\@@meta{meta:}

\def\setupMPvariables%
  {\dodoubleempty\dosetupMPvariables}

\def\dosetupMPvariables[#1][#2]%
  {\ifsecondargument
     \getrawparameters[#1:][#2]%
   \else
     \getrawparameters[\@@meta][#1]%
   \fi}

\let\@@framed\s!unknown

\def\MPvariable#1%
  {\getvalue{\ifundefined{\@@framed\@@meta#1}\else\@@framed\fi\@@meta#1}}

\let\MPvar\MPvariable

%D \macros 
%D   {startuniqueMPgraphic, uniqueMPgraphic}
%D
%D This macros is probably of most use to myself, since I like
%D to use graphics that adapt themselves. The next \METAPOST\
%D kind of graphic is both unique and reused when possible. 
%D 
%D \starttypen 
%D \defineoverlay[example][\uniqueMPgraphic{test}]
%D
%D \startuniqueMPgraphic {test}
%D   draw unitsquare xscaled \overlaywidth yscaled \overlayheight ; 
%D \stopuniqueMPgraphic 
%D \stoptypen

%D For educational purposes, we show the original version 
%D first. This one used a rather simple method for determining 
%D the uniqueness. 
%D
%D \starttypen 
%D \long\def\startuniqueMPgraphic#1#2\stopuniqueMPgraphic%
%D   {\setvalue{MP:#1}%
%D      {\startreusableMPgraphic{\overlaystamp:#1}#2\stopreusableMPgraphic
%D       \reuseMPgraphic{\overlaystamp:#1}}}
%D 
%D \def\uniqueMPgraphic#1%
%D   {\getvalue{MP:#1}}
%D \stoptypen 
 
\def\overlaystamp% watch the \MPcolor, since colors can be redefined
  {\overlaywidth:\overlayheight:\overlaydepth
  :\MPcolor{\overlaycolor}:\MPcolor{\overlaylinecolor}}
 
%D A better approach is to let additional variables play a role
%D in determining the uniqueness. In the next macro, the
%D second, optional, argument is used to guarantee the
%D uniqueness, as well as prepare variables for passing them to
%D \METAPOST. 
%D 
%D \starttypen
%D \startuniqueMPgraphic{meta:hash}{gap,angle,...}
%D \stoptypen
%D
%D The calling macro also accepts a second argument. For
%D convenient use in overlay definitions, we use \type {{}}
%D instead of \type {[]}.
%D
%D \starttypen
%D \uniqueMPgraphic{meta:hash}{gap=10pt,angle=30}
%D \stoptypen

\def\handleuniqueMPgraphic#1#2#3%
  {\def\@@meta{#1:}%
   \extendMPoverlaystamp{#2}% incl prepare
  %\startreusableMPgraphic{\overlaystamp:#1}#3\stopreusableMPgraphic
  %\getvalue{MP:\overlaystamp:#1}} % no \reuseMPgraphic, else wrong \@@meta
   \ifundefined{MP:\overlaystamp:#1}%
     \enableincludeMPgraphics
     \startMPgraphic#3\stopMPgraphic
     \doifobjectssupportedelse{}{\useMPboxfalse}%
     \ifuseMPbox
       \douseMPbox{MP:\overlaystamp:#1}%
     \else
       \nouseMPbox{MP:\overlaystamp:#1}%
     \fi
   \fi
   \getvalue{MP:\overlaystamp:#1}}

\long\def\startuniqueMPgraphic%
  {\dodoublegroupempty\dostartuniqueMPgraphic}

\long\def\dostartuniqueMPgraphic#1#2#3\stopuniqueMPgraphic%
  {\setvalue{MP:#1}{\handleuniqueMPgraphic{#1}{#2}{#3}}}

\unexpanded\def\uniqueMPgraphic%
  {\dodoublegroupempty\douniqueMPgraphic}

\def\douniqueMPgraphic#1#2%
%  {{\def\@@meta{#1:}\setupMPvariables[#2]\getvalue{MP:#1}{}}}
  {{\setupMPvariables[#1][#2]\getvalue{MP:#1}{}}}

\long\def\handleuseMPgraphic#1#2#3%
  {\bgroup
   \def\@@meta{#1:}%
   \prepareMPvariables{#2}%
   \enableincludeMPgraphics
   \startMPgraphic#3\stopMPgraphic
   \loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}%
   \deallocateMPslot\currentMPgraphic
   \placeMPgraphic
   \egroup}

\long\def\startuseMPgraphic% 
  {\dodoublegroupempty\dostartuseMPgraphic}

\long\def\dostartuseMPgraphic#1#2#3\stopuseMPgraphic% 
  {\long\setgvalue{MP:#1}{\handleuseMPgraphic{#1}{#2}{#3}}}

\long\def\startusableMPgraphic% % redundant but handy 
  {\dodoublegroupempty\dostartusableMPgraphic}

\long\def\dostartusableMPgraphic#1#2#3\stopusableMPgraphic% 
  {\long\setgvalue{MP:#1}{\handleuseMPgraphic{#1}{#2}{#3}}}

\long\def\handlereusableMPgraphic#1#2#3%
  {\bgroup
   \def\@@meta{#1:}%
   \prepareMPvariables{#2}%
   \enableincludeMPgraphics
   \startMPgraphic#3\stopMPgraphic
   \doifobjectssupportedelse{}{\useMPboxfalse}%
   \ifuseMPbox
     \douseMPbox{MP:#1}%
   \else
     \nouseMPbox{MP:#1}%
   \fi
   \getvalue{MP:#1}%
   \egroup}

\long\def\startreusableMPgraphic%
  {\dodoublegroupempty\dostartreusableMPgraphic}

\long\def\dostartreusableMPgraphic#1#2#3\stopreusableMPgraphic%
  {\ifundefined{MP:#1}%
     \long\setgvalue{MP:#1}{\handlereusableMPgraphic{#1}{#2}{#3}}%
   \fi}

\unexpanded\def\useMPgraphic%
  {\dodoublegroupempty\douseMPgraphic}

\def\douseMPgraphic#1#2%
  {{\setupMPvariables[#1][#2]\getvalue{MP:#1}{}}}

\let\reuseMPgraphic\useMPgraphic

\def\enableincludeMPgraphics%
  {\let\handleuseMPgraphic     \thirdofthreearguments
   \let\handlereusableMPgraphic\thirdofthreearguments}

%D One way of defining a stamp is: 
%D 
%D \starttypen 
%D \def\extendMPoverlaystamp#1%
%D   {\def\docommando##1%
%D      {\edef\overlaystamp{\overlaystamp:\MPvariable{##1}}}%
%D    \processcommalist[#1]\docommando}
%D \stoptypen 

%D Since we need to feed \METAPOST\ with expanded dimensions,
%D we introduce a dedicated expansion engine.

\def\prepareMPvariable#1%
  {\ifundefined{\@@framed\@@meta#1}%
     \doprepareMPvariable{\@@meta#1}%
   \else
     \doprepareMPvariable{\@@framed\@@meta#1}%
   \fi}

\def\doprepareMPvariable#1%
  {\doifelsenothing{\getvalue{#1}}
     {\setevalue{#1}{\MPcolor{black}}}
     {\edef\!!stringa{\getvalue{#1}}%
      \convertcommand\!!stringa\to\ascii % otherwise problems 
      \doifcolorelse{\ascii}             % with 2\bodyfontsize
        {\setevalue{#1}{\MPcolor{\getvalue{#1}}}}
        {\setbox\scratchbox=\hbox{\scratchdimen=\getvalue{#1}sp}%
         \ifdim\wd\scratchbox=\zeropoint
           \scratchcounter=\getvalue{#1}\relax
           \setevalue{#1}{\the\scratchcounter}%
         \else
           \scratchdimen=\getvalue{#1}\relax
           \setevalue{#1}{\the\scratchdimen}%
         \fi}}}

%D We redefine \type {\extendMPoverlaystamp} to preprocess
%D variables using \type {\prepareMPvariable}.

\def\extendMPoverlaystamp#1%
  {\def\docommando##1%
     {\prepareMPvariable{##1}%
      \edef\overlaystamp{\overlaystamp:\MPvariable{##1}}}%
   \processcommalist[#1]\docommando}

\def\prepareMPvariables#1%
  {\processcommalist[#1]\prepareMPvariable}

%D \macros
%D   {MPdatafile}
%D
%D We redefine a macro from \type {supp-mps.tex}: 

\def\MPdatafile%
  {\bufferprefix mpd-\the\currentMPgraphic.mpd}

%D We also have to make sure that \METAPOST\ knows this: 

\appendtoks 
  if not known _data_prefix_ :
    string _data_prefix_ , _data_suffix_ ; 
  fi ;
  _data_prefix_ := "\bufferprefix mpd-" ; 
  _data_suffix_ := ".mpd" ; 
\to \MPinitializations 

%D \macros
%D   {getMPdata}
%D
%D The current data is loaded with: 

\def\getMPdata%
  {\startreadingfile
   \readlocfile{\MPdatafile}{}{}%
   \stopreadingfile}

%D When we collect graphics in one file, we run into 
%D troubles, since \METAPOST\ has a built in limit (of 4) 
%D on the number of files it can handle. It's therefore 
%D better to collect all data in one file and filter it. 

\def\getMPdata%
  {\long\def\MPdata##1##2%
     {\ifnum##1=\currentMPgraphic\relax##2\fi}%
   \startreadingfile
   \readlocfile{\MPgraphicfile.mpd}{}{}%
   \stopreadingfile}

%D We have to enable this mechanism with: 

\appendtoks 
  boolean collapse_data ; collapse_data := true ;
  _data_suffix_ := ".mpd" ; % overloads previous one 
\to \MPinitializations 

%D For the moment, the next one is a private macro: 

\def\processMPbuffer%
  {\dosingleempty\doprocessMPbuffer}

\def\doprocessMPbuffer[#1]%
  {\doifelsenothing{#1}
     {\doprocessMPbuffer[\jobname]}
     {\bgroup
      \let\par\empty
      \!!toksa=\emptytoks
      \def\copyMPbufferline{\expandafter\appendtoks\fileline\to\!!toksa}%
      \def\dodoprocessMPbuffer##1%
        {\doprocessfile\scratchread{\TEXbufferfile{##1}}\copyMPbufferline}%
      \processcommalist[#1]\dodoprocessMPbuffer
      \ifMPrun
        \@EA\startMPrun\the\!!toksa\stopMPrun
      \else
        \@EA\startuseMPgraphic\@EA{\@EA\s!dummy\@EA}\the\!!toksa\stopuseMPgraphic
        \useMPgraphic{\s!dummy}%
      \fi
      \egroup}}

%D \macros 
%D   {startMPenvironment, resetMPenvironment}
%D
%D In order to synchronize the main \TEX\ run and the runs 
%D local to \METAPOST, environments can be passed. 

\ifx\everyMPTEXgraphic\undefined
  \newtoks\everyMPTEXgraphic
\fi 

\def\startMPenvironment%                % second arg gobbles spaces, so
  {\dodoubleempty\dostartMPenvironment} % that reset gives \emptytoks

\long\def\dostartMPenvironment[#1][#2]#3\stopMPenvironment%
  {\doif{#1}{\s!reset}{\resetMPenvironment}% % reset mp toks
   \doif{#1}{\v!globaal}{#3}%                % use in main doc too
   \doif{#1}{+}{#3}%                         % use in main doc too
   \convertargument#3\to\ascii
   \expandafter\appendtoks\ascii\to\everyMPTEXgraphic}

\def\resetMPenvironment%
  {\everyMPTEXgraphic=\emptytoks % = is really needed ! 
   \startMPenvironment
     \global\loadfontdefinitionfileoncetrue
   \stopMPenvironment} 

\startMPenvironment
  \global\loadfontdefinitionfileoncetrue
\stopMPenvironment

%D This command takes \type {[reset]} as optional 
%D argument. 
%D
%D \starttypen 
%D \startMPenvironment
%D   \setupbodyfont[pos,14.4pt]
%D \stopMPenvironment
%D
%D \startMPcode
%D   draw btex \sl Hans Hagen etex scaled 5 ; 
%D \stopMPcode
%D \stoptypen 
%D
%D The \type {\resetMPenvironment} is a quick way to erase 
%D the token list. 

%D We don't want spurious files, do we? 

\def\initializeMPgraphics% \unlinkfile{\MPgraphicfile.mp} -> empty file 
  {%\ifx\bufferprefix\empty \else 
     \immediate\openout\MPwrite\MPgraphicfile.mp
     \immediate\write\MPwrite{end.}%
     \immediate\closeout\MPwrite 
   }%\fi}
 
%D Loading specific \METAPOST\ related definitions is 
%D accomplished by: 

\def\douseMPlibrary#1%
  {\doifundefined{\c!file\f!javascriptprefix#1}
     {\setvalue{\c!file\f!javascriptprefix#1}{}
      \makeshortfilename[\f!metapostprefix#1]
      \showmessage{\m!metapost}{1}{#1}
      \startreadingfile
      \readsysfile{\shortfilename}{}{}
      \stopreadingfile}}

\def\useMPlibrary[#1]%
  {\processcommalist[#1]\douseMPlibrary}

%D \macros
%D   {setMPtext, MPtext, MPstring, MPbetex}
%D
%D To be documented: 
%D
%D \starttyping
%D \setMPtext{identifier}{text}
%D
%D \MPtext  {identifier}
%D \MPstring{identifier}
%D \MPbetex {identifier}
%D \stoptyping 

\def\@@MPT{@MPT@}

\def\forceMPTEXgraphic%
  {\long\def\checkMPTEXgraphic##1{\global\MPTEXgraphictrue}}

\def\setMPtext#1#2%
  {%\forceMPTEXgraphic
   \convertargument#2\to\ascii
   \setevalue{\@@MPT#1}{\ascii}}

\def\MPtext  #1{\getvalue{\@@MPT#1}} 
\def\MPstring#1{"\getvalue{\@@MPT#1}"} 
\def\MPbetex #1{btex \getvalue{\@@MPT#1} etex}

%D Unfortunately \METAPOST\ does not have \CMYK\ support 
%D built in, but by means of specials we can supply the 
%D information needed to handle them naturaly. 

\newif\ifMPcmyk \MPcmyktrue 

\appendtoks
  cmykcolors := \ifMPcmyk true \else false \fi ;   
\to \MPinitializations 

%D In order to communicate conveniently with the \TEX\ 
%D engine, we introduce some typesetting variables. 

\startuseMPgraphic{init data}
  color OverlayColor, OverlayLineColor ;
  %
  OverlayWidth     := \overlaywidth ; 
  OverlayHeight    := \overlayheight ; 
  OverlayDepth     := \overlayheight ; 
  OverlayColor     := \MPcolor{\overlaycolor} ; 
  OverlayLineWidth := \overlaylinewidth ;
  OverlayLineColor := \MPcolor{\overlaylinecolor} ; 
  %
  BaseLineSkip := \the\baselineskip ;
  LineHeight   := \the\baselineskip ; 
  BodyFontSize := \the\bodyfontsize ;
  %
  StrutHeight := \strutheight ;
  StrutDepth  := \strutdepth ;
  %
  CurrentWidth  := \the\hsize ;
  CurrentHeight := \the\vsize ;
  %
  EmWidth  := \the\fontdimen6\font ;
  ExHeight := \the\fontdimen5\font ;
  % 
  PageNumber     := \the\realpageno ;
  RealPageNumber := \the\pageno ;
  LastPageNumber := \lastpage ; 
\stopuseMPgraphic

\appendtoks 
  \includeMPgraphic{init data} 
\to \MPinitializations

% this will become (more efficient) 
%
% \startuseMPgraphic{init data}
%   tx1 := \the\baselineskip ;
%   tx2 := \the\baselineskip ; 
%   tx3 := \the\bodyfontsize ;
%   tx4 := \strutheight ;
%   tx5 := \strutdepth ;
%   tx6 := \the\hsize ;
%   tx7 := \the\vsize ;
%   tx8 := \the\fontdimen6\font ;
%   tx9 := \the\fontdimen5\font ;
% \stopuseMPgraphic
% 
% def map_tx_variables = 
%   BaseLineSkip  := tx1 ;
%   LineHeight    := tx2 ;
%   BodyFontSize  := tx3 ;
%   StrutHeight   := tx4 ;
%   StrutDepth    := tx5 ;
%   CurrentWidth  := tx6 ;
%   Currentheight := tx7 ;
%   EmWidth       := tx8 ;
%   ExHeight      := tx9 ;
% enddef ; 
%
% extra_begin_fig .... 

%D Alas, the prologue settings differ per driver. 

\ifx\undefined\MPprologues \def\MPprologues{0} \fi 

\appendtoks 
  prologues := \MPprologues ; 
\to \MPinitializations

\appendtoks
  \def\MPprologues{0}%
  \def\MPOSTdriver{dvips}%
\to \everyresetspecials

%D \macros 
%D   {PDFMPformoffset}
%D
%D In \PDF, forms are clipped and therefore we have to take 
%D precautions to get this right. Since this is related to 
%D objects, we use the same offset as used there.  

\def\PDFMPformoffset{\objectoffset}

%D \macros 
%D   {insertMPfile}
%D
%D Bypassing the special driver and figure mechanism is not
%D that nice but saves upto 5\% time in embedding \METAPOST\
%D graphics by using the low level \PDF\ converter directly,
%D given of course that we use \PDFTEX. As a result we need to
%D fool around with the object trigger. 

\def\insertMPfile#1#2%
  {\ifx\pdfoutput\undefined 
     \doinsertMPfile{#1}%   
   \else\ifcase\pdfoutput   
     \doinsertMPfile{#1}%  
   \else                   
     \doiffileelse{#1}    
       {{\chardef\makeMPintoPDFobject=2 % in order to handle specials 
         \convertMPtoPDF{#1}{1}{1}}}
       {\doinsertMPfile{#1}}%
   \fi\fi}

%D We also take care of disabling fancy figure features, that
%D can terribly interfere when dealing with symbols, 
%D background graphics and running (postponed) graphics. 
%D You won't believe me if I tell you what funny side effects 
%D can occur. One took me over a day to uncover when 
%D processing the screen version of the \METAFUN\ manual. 

\def\doinsertMPfile#1%
  {\externalfigure
     [#1]
     [\c!type=\c!mps,\c!object=\v!nee,
      \c!reset=\v!ja,\c!symbool=\v!ja,
      \c!maxbreedte=,\c!maxhoogte=,
      \c!kader=\v!uit,\c!achtergrond=]}

\protect \endinput

% also: 
%
% linecap  := rounded ;
% linejoin := rounded ; 
% drawoptions () ;