File: diagram.html

package info (click to toggle)
tklib 0.7%2B20210111-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 17,676 kB
  • sloc: tcl: 82,240; sh: 5,801; ansic: 792; pascal: 359; makefile: 70; sed: 53; exp: 21
file content (2591 lines) | stat: -rw-r--r-- 149,737 bytes parent folder | download
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
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
<!DOCTYPE html><html><head>
<title>diagram - Documentation toolbox</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'diagram.man' by tcllib/doctools with format 'html'
   -->
<!-- diagram.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tklib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">diagram(n) 0.3 tklib &quot;Documentation toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>diagram - Diagram drawing</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Class API</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object API</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Language Reference</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Elements</a></li>
<li class="doctools_subsection"><a href="#subsection4">Attributes</a></li>
<li class="doctools_subsection"><a href="#subsection5">Corners</a></li>
<li class="doctools_subsection"><a href="#subsection6">Named directions</a></li>
<li class="doctools_subsection"><a href="#subsection7">Miscellaneous Commands</a></li>
<li class="doctools_subsection"><a href="#subsection8">Variables</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Diagram Classes</a></li>
<li class="doctools_section"><a href="#section5">References</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">Tk 8.5</b></li>
<li>package require <b class="pkgname">diagram 1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::diagram</b> <i class="arg">objectName</i> <i class="arg">canvas</i> <span class="opt">?<i class="arg">script</i>?</span></a></li>
<li><a href="#2"><i class="arg">diagramObject</i> <b class="method">new direction</b> <i class="arg">name</i> <span class="opt">?<i class="arg">key</i> <i class="arg">value</i>...?</span></a></li>
<li><a href="#3"><i class="arg">diagramObject</i> <b class="method">new element</b> <i class="arg">name</i> <i class="arg">attributes</i> <i class="arg">cmdprefix</i></a></li>
<li><a href="#4"><i class="arg">diagramObject</i> <b class="method">new alias</b> <i class="arg">name</i> <i class="arg">cmdprefix</i></a></li>
<li><a href="#5"><i class="arg">diagramObject</i> <b class="method">new command</b> <i class="arg">name</i> <i class="arg">arguments</i> <i class="arg">body</i></a></li>
<li><a href="#6"><i class="arg">diagramObject</i> <b class="method">new attribute</b> <i class="arg">name</i> <span class="opt">?<i class="arg">key</i> <i class="arg">value</i>...?</span></a></li>
<li><a href="#7"><i class="arg">diagramObject</i> <b class="method">unknown attribute</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#8"><i class="arg">diagramObject</i> <b class="method">draw</b> <i class="arg">script</i></a></li>
<li><a href="#9"><b class="cmd"><a href="../../../../index.html#key76">arc</a></b> <i class="arg">attr</i>...</a></li>
<li><a href="#10"><b class="cmd"><a href="../../../../index.html#key71">arrow</a></b> <i class="arg">attr</i>...</a></li>
<li><a href="#11"><b class="cmd">--&gt;</b> <i class="arg">attr</i>...</a></li>
<li><a href="#12"><b class="cmd">&lt;--&gt;</b> <i class="arg">attr</i>...</a></li>
<li><a href="#13"><b class="cmd">&lt;--&gt;</b> <i class="arg">attr</i>...</a></li>
<li><a href="#14"><b class="cmd">block</b> <i class="arg">script</i> <i class="arg">attr</i>...</a></li>
<li><a href="#15"><b class="cmd"><a href="../../../../index.html#key67">box</a></b> <i class="arg">attr</i>...</a></li>
<li><a href="#16"><b class="cmd"><a href="../../../../index.html#key81">circle</a></b> <i class="arg">attr</i>...</a></li>
<li><a href="#17"><b class="cmd">O</b> <i class="arg">attr</i>...</a></li>
<li><a href="#18"><b class="cmd"><a href="../../../../index.html#key82">diamond</a></b> <i class="arg">attr</i>...</a></li>
<li><a href="#19"><b class="cmd">&lt;&gt;</b> <i class="arg">attr</i>...</a></li>
<li><a href="#20"><b class="cmd"><a href="../../../../index.html#key66">drum</a></b> <i class="arg">attr</i>...</a></li>
<li><a href="#21"><b class="cmd"><a href="../../../../index.html#key84">ellipse</a></b> <i class="arg">attr</i>...</a></li>
<li><a href="#22"><b class="cmd"><a href="../../../../index.html#key77">line</a></b> <i class="arg">attr</i>...</a></li>
<li><a href="#23"><b class="cmd">--</b> <i class="arg">attr</i>...</a></li>
<li><a href="#24"><b class="cmd"><a href="../../../../index.html#key85">move</a></b> <i class="arg">attr</i></a></li>
<li><a href="#25"><b class="cmd"><a href="../../../../index.html#key70">spline</a></b> <i class="arg">attr</i>...</a></li>
<li><a href="#26"><b class="cmd"><a href="../../../../index.html#key21">text</a></b> <i class="arg">attr</i>...</a></li>
<li><a href="#27"><b class="cmd">west</b></a></li>
<li><a href="#28"><b class="cmd">w</b></a></li>
<li><a href="#29"><b class="cmd">left</b></a></li>
<li><a href="#30"><b class="cmd">l</b></a></li>
<li><a href="#31"><b class="cmd">south</b></a></li>
<li><a href="#32"><b class="cmd">s</b></a></li>
<li><a href="#33"><b class="cmd">down</b></a></li>
<li><a href="#34"><b class="cmd">bottom</b></a></li>
<li><a href="#35"><b class="cmd">bot</b></a></li>
<li><a href="#36"><b class="cmd">b</b></a></li>
<li><a href="#37"><b class="cmd">east</b></a></li>
<li><a href="#38"><b class="cmd">e</b></a></li>
<li><a href="#39"><b class="cmd">right</b></a></li>
<li><a href="#40"><b class="cmd">r</b></a></li>
<li><a href="#41"><b class="cmd">north</b></a></li>
<li><a href="#42"><b class="cmd">n</b></a></li>
<li><a href="#43"><b class="cmd">up</b></a></li>
<li><a href="#44"><b class="cmd">top</b></a></li>
<li><a href="#45"><b class="cmd">t</b></a></li>
<li><a href="#46"><b class="cmd">northwest</b></a></li>
<li><a href="#47"><b class="cmd">nw</b></a></li>
<li><a href="#48"><b class="cmd">up-left</b></a></li>
<li><a href="#49"><b class="cmd">upleft</b></a></li>
<li><a href="#50"><b class="cmd">leftup</b></a></li>
<li><a href="#51"><b class="cmd">northeast</b></a></li>
<li><a href="#52"><b class="cmd">ne</b></a></li>
<li><a href="#53"><b class="cmd">up-right</b></a></li>
<li><a href="#54"><b class="cmd">upright</b></a></li>
<li><a href="#55"><b class="cmd">rightup</b></a></li>
<li><a href="#56"><b class="cmd">southwest</b></a></li>
<li><a href="#57"><b class="cmd">sw</b></a></li>
<li><a href="#58"><b class="cmd">down-left</b></a></li>
<li><a href="#59"><b class="cmd">downleft</b></a></li>
<li><a href="#60"><b class="cmd">leftdown</b></a></li>
<li><a href="#61"><b class="cmd">southeast</b></a></li>
<li><a href="#62"><b class="cmd">se</b></a></li>
<li><a href="#63"><b class="cmd">down-right</b></a></li>
<li><a href="#64"><b class="cmd">downright</b></a></li>
<li><a href="#65"><b class="cmd">rightdown</b></a></li>
<li><a href="#66"><i class="arg">number</i> <b class="const">cm</b></a></li>
<li><a href="#67"><i class="arg">number</i> <b class="const">mm</b></a></li>
<li><a href="#68"><i class="arg">number</i> <b class="const">inch</b></a></li>
<li><a href="#69"><i class="arg">number</i> <b class="const">pt</b></a></li>
<li><a href="#70"><i class="arg">number</i> <i class="arg">number</i></a></li>
<li><a href="#71"><b class="cmd">by</b> <i class="arg">distance</i> <i class="arg">direction</i></a></li>
<li><a href="#72"><i class="arg">point1</i> <b class="cmd">+</b> <i class="arg">point2</i></a></li>
<li><a href="#73"><i class="arg">point1</i> <b class="cmd">-</b> <i class="arg">point2</i></a></li>
<li><a href="#74"><i class="arg">point</i> <b class="cmd">by</b> <i class="arg">distance</i> <i class="arg">direction</i></a></li>
<li><a href="#75"><i class="arg">point1</i> <b class="cmd">|</b> <i class="arg">point2</i></a></li>
<li><a href="#76"><i class="arg">n</i> <b class="cmd">between</b> <i class="arg">poin1</i> <i class="arg">point2</i></a></li>
<li><a href="#77"><b class="cmd">intersect</b> <i class="arg">elem1</i> <i class="arg">elem2</i></a></li>
<li><a href="#78"><i class="arg">element</i> <b class="cmd">names</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#79"><i class="arg">element</i> <i class="arg">corner</i></a></li>
<li><a href="#80"><i class="arg">element</i> <i class="arg">corner1</i> <i class="arg">corner2</i>...</a></li>
<li><a href="#81"><i class="arg">element</i> <span class="opt">?<i class="arg">corner1</i>... <span class="opt">?<b class="method">names</b> <span class="opt">?<i class="arg">pattern</i>?</span>?</span>]?</span></a></li>
<li><a href="#82"><b class="cmd"><b class="variable">n</b>th</b> <span class="opt">?<i class="arg">corner</i>?</span></a></li>
<li><a href="#83"><b class="cmd"><b class="variable">n</b>th</b> <b class="cmd">last</b> <span class="opt">?<i class="arg">corner</i>?</span></a></li>
<li><a href="#84"><b class="cmd"><b class="variable">n</b>th</b> <i class="arg">shape</i> <span class="opt">?<i class="arg">corner</i>?</span></a></li>
<li><a href="#85"><b class="cmd"><b class="variable">n</b>th</b> <b class="cmd">last</b> <i class="arg">shape</i> <span class="opt">?<i class="arg">corner</i>?</span></a></li>
<li><a href="#86"><b class="cmd">last</b> <span class="opt">?<i class="arg">corner</i>?</span></a></li>
<li><a href="#87"><b class="cmd">last</b> <i class="arg">shape</i> <span class="opt">?<i class="arg">corner</i>?</span></a></li>
<li><a href="#88"><b class="cmd">1st</b></a></li>
<li><a href="#89"><b class="cmd">2nd</b></a></li>
<li><a href="#90"><b class="cmd">3rd</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Welcome to <b class="package">diagram</b>, a package for the easy construction of
diagrams (sic), i.e. 2D vector graphics, sometimes also called <i class="term">pictures</i>.
Note that this package is not a replacement for <b class="package"><a href="../../../../index.html#key30">Tk</a></b>'s canvas,
but rather a layer sitting on top of it, to make it easier to use.
In other words, using the canvas as the core graphics engine <b class="package">diagram</b> abstracts away from the minutiae of handling coordinates to
position and size the drawn elements, allowing the user to concentrate
on the content of the diagram instead.</p>
<p>This is similar to Brian Kernighan's PIC language for troff, which is
the spiritual ancestor of this package.</p>
<p>This document contains the reference to the API and drawing (language)
commands. Its intended audience are users of the package wishing to
refresh their memory.
Newcomers should read the <i class="term">Diagram Language Tutorial</i> first.
Developers wishing to work on the internals of the package and its
supporting packages should look at section
	<span class="sectref"><a href="#section4">Diagram Classes</a></span>
first, and then the comments in the sources of the packages itself.</p>
<p>In the remainder of the document we first describe the APIs of the
diagram class and its instances, followed by the language reference
for the drawing language itself.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Class API</a></h3>
<p>The package exports the API described here.</p>
<dl class="doctools_definitions">
	
<dt><a name="1"><b class="cmd">::diagram</b> <i class="arg">objectName</i> <i class="arg">canvas</i> <span class="opt">?<i class="arg">script</i>?</span></a></dt>
<dd><p>The command creates a new instance of a diagram
		controller and returns the fully qualified name of the
		object command as its result.
		The new instance is connected to the specified
		<i class="arg">canvas</i> object, which is used as the diagrams
		graphics engine. This is usually an instance of Tk's
		canvas, however any object which is API compatible to
		Tk's canvas can be used here.</p>
<p>The API of this object command is described in the
		following section, <span class="sectref"><a href="#subsection2">Object API</a></span>. It may be
		used to invoke various operations on the object.</p>
<p>If the <i class="arg">script</i> argument is specified then method
		<b class="method">draw</b> will be invoked on it.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object API</a></h3>
<p>Instances of the diagram class support the following
	    methods:</p>
<dl class="doctools_definitions">
	
<dt><a name="2"><i class="arg">diagramObject</i> <b class="method">new direction</b> <i class="arg">name</i> <span class="opt">?<i class="arg">key</i> <i class="arg">value</i>...?</span></a></dt>
<dd><p>This method defines a new named direction and its
		attributes. The latter is given through the
		<i class="arg">key</i>/<i class="arg">value</i> pairs coming after the <i class="arg">name</i>.</p>
<p>Users are mostly free to specify arbitrary attributes
		with whatever meaning they desire. The exception are
		the names <em>angle</em> and <em>opposite</em>. They are
		special to the diagram package and have a fixed meaning.</p>
<dl class="doctools_definitions">
	
<dt>angle</dt>
<dd><p>This attribute specifies the angle of the direction in
		degrees, where 0 points east (to the right) and 90 points
		north (up).</p></dd>
<dt>opposite</dt>
<dd><p>This attribute specifies the name of the direction
		which should be considered as complementary to the
		named one.</p></dd>
</dl></dd>
<dt><a name="3"><i class="arg">diagramObject</i> <b class="method">new element</b> <i class="arg">name</i> <i class="arg">attributes</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>This method defines a new graphics element for the
		drawing language. I.e. <i class="arg">name</i> will become a new
		command in the language, and the specified command
		prefix (<i class="arg">cmdprefix</i>) will be called to perform
		the actual drawing.</p>
<p><i class="arg">attributes</i> specifies the set of attributes for which
		data has to be available. I.e. the system will run the
		...-callbacks for these attributes.
		See the method <b class="method">new attribute</b> for more information
		on attribute definitions.</p>
<p>The command prefix is expected to conform to the
		following signature:</p>
<dl class="doctools_definitions">
	
<dt><b class="cmd">cmdprefix</b> <i class="arg">canvas</i> <i class="arg">attributes</i></dt>
<dd><p>Where <i class="arg">canvas</i> is the handle of the canvas widget
		to draw to, and <i class="arg">attributes</i> is a dictionary
		holding the attributes for the element, be they
		user-specified, or defaults.</p>
<p>The results of the command has to be a list containing
		at least two and at most four items. These are, in order:</p>
<ol class="doctools_enumerated">
		
<li><p>The list of canvas items the drawn element consists of.</p></li>
<li><p>The dictionary of named locations in the element, its
			<i class="term">corners</i>.</p></li>
<li><p>An optional mode, either &quot;relative&quot; or &quot;absolute&quot;.
			When not returned &quot;relative&quot; is assumed. In the
			case of a relative element position the attributes
			&quot;with&quot; and &quot;at&quot; are used to determine the final
			position of the new element.</p></li>
<li><p>An optional name of a direction. If not the
			empty string this is handed to the automatic
			layouter as the new direction to follow.</p></li>
</ol></dd>
</dl></dd>
<dt><a name="4"><i class="arg">diagramObject</i> <b class="method">new alias</b> <i class="arg">name</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>This method defines a new command for the drawing
		language. I.e. <i class="arg">name</i> will become a new command in
		the language, and the specified command prefix
		(<i class="arg">cmdprefix</i>) will be called on use of this new
		command. Any arguments given to the command are
		simply passed to the prefix. There is no fixed siganture.</p>
<p>Note that the prefix is run in the context of the
		drawing language, allowing the direct use of any
		existing commands.</p></dd>
<dt><a name="5"><i class="arg">diagramObject</i> <b class="method">new command</b> <i class="arg">name</i> <i class="arg">arguments</i> <i class="arg">body</i></a></dt>
<dd><p>This is like <b class="method">new alias</b> except that the new
		command is defined as a procedure in the language's
		context, with regular argument list and body.</p></dd>
<dt><a name="6"><i class="arg">diagramObject</i> <b class="method">new attribute</b> <i class="arg">name</i> <span class="opt">?<i class="arg">key</i> <i class="arg">value</i>...?</span></a></dt>
<dd><p>This method defines a new named attribute which can be
		used by graphical elements. The handling of the
		attribute by the processor is declared through the
		<i class="arg">key</i>/<i class="arg">value</i> pairs coming after the <i class="arg">name</i>.</p>
<p>The accepted keys and their meanings are:</p>
<dl class="doctools_definitions">
		
<dt><b class="const">key</b></dt>
<dd><p>The value of this key is the name of the key
			under which the attribute's value shall be
			stored in the attribute dictionary given to
			the drawing command after attribute processing
			is complete.</p>
<p>This key is optional. If it is not specified it
			defaults to the name of the attribute.</p></dd>
<dt><b class="const">get</b></dt>
<dd><p>The value of this key is a command prefix
			which will be invoked to retrieve the
			attribute's argument(s) from the command
			line.</p>
<p>This key is optional. If it is not specified a
			default is used which takes the single word
			after the attribute name as the attribute's
			value.</p>
<p>The signature of the command prefix is</p>
<dl class="doctools_definitions">
			
<dt><b class="cmd">cmdprefix</b> <i class="arg">wordqueue</i></dt>
<dd><p>Where <i class="arg">wordqueue</i> is the handle of
				a queue object conforming to the API
				of the queues provided by package
				<b class="package">struct::queue</b>. This queue
				contains the not-yet-processed part of
				the attribute definitions, with one
				entry per word, with the first entry
				the word <em>after</em> name of the
				attribute. In other words, the
				attribute's name has already been
				removed from the queue.</p>
<p>The result of the command is the value
				of the attribute, which may have been
				taken from the queue, or not.</p></dd>
</dl></dd>
<dt><b class="const">transform</b></dt>
<dd><p>The value of this key is a command prefix
			which will be invoked to transform the
			retrieved value (See <b class="const">get</b>) into their
			final form.</p>
<p>This key is optional. If it is not specified
			no transformation is done.
			The signature of the command prefix is</p>
<dl class="doctools_definitions">
			
<dt><b class="cmd">cmdprefix</b> <i class="arg">value</i></dt>
<dd><p>Where <i class="arg">value</i> is the value to transform.</p>
<p>The result of the command is the final
				value of the attribute.</p></dd>
</dl></dd>
<dt><b class="const">type</b></dt>
<dd><p>The value of this key is a command prefix
			which will be invoked to validate the
			attribute's argument(s).</p>
<p>This key is optional. If it is not specified
			no validation is done.</p>
<p>The signature of the command prefix is that of
			snit validation types. See the documentation
			of the <b class="package"><a href="../../../../index.html#key20">snit</a></b> package.</p></dd>
<dt><b class="const">merge</b></dt>
<dd><p>The value of this key is a command prefix
			which will be invoked to insert the
			transformed and validated attribute value into
			the dictionary of collected attributes.</p>
<p>This key is optional. If it is not specified
			a default merge is chosen, based on the data
			for key <b class="const">aggregate</b>, see below.
			The signature of the command prefix is</p>
<dl class="doctools_definitions">
			
<dt><b class="cmd">cmdprefix</b> <i class="arg">value</i> <i class="arg">dict</i></dt>
<dd><p>Where <i class="arg">value</i> is the value to
				insert, and <i class="arg">dict</i> the dictionary
				of attributes and values collected so
				far.</p>
<p>The result of the command is the new
				dictionary of attributes.</p></dd>
</dl></dd>
<dt><b class="const">aggregate</b></dt>
<dd><p>The value of this key is a boolean flag. It
			has an effect if and only if the key <b class="const">merge</b> was not specified. This key is
			optional. If it is not specified it defaults
			to <b class="const">False</b>.</p>
<p>If the key is effective, the value of <b class="const">False</b> means that the attribute's value is
			<em>set</em> into the dictionary using the value
			of key <i class="arg">key</i> (see above) as index,
			<em>overwriting</em> any previously specified value.</p>
<p>If the key is effective, the value of <b class="const">True</b> means that the attribute's value is
			<em>added</em> to the dictionary using the value
			of key <i class="arg">key</i> (see above) as index,
			<em>extending</em> any previously specified value.
			This means that the final value of the
			attribute as seen after processing will be a
			list of the collected values.</p></dd>
<dt><b class="const">default</b></dt>
<dd><p>The value of this key is a command prefix
			which will be invoked after collection of
			attributes has been completed and this
			attribute is in the list of required
			attributes for the drawing element (See
			argument <i class="arg">attributes</i> of method
			<b class="method">new element</b>).</p>
<p>Note that the connection is made through the
			value of key <i class="arg">key</i>, not through the
			attribute name per se.</p>
<p>Further note that this command prefix is
			invoked even if a user specified attribute
			value is present. This allows the command
			to go beyond simply setting defaults, it
			can calculate and store derived values as
			well.</p>
<p>This key is optional. If an element requires
			this attribute, but <i class="arg">default</i> is not
			specified then nothing will be done.</p>
<p>The signature of the command prefix is</p>
<dl class="doctools_definitions">
			
<dt><b class="cmd">cmdprefix</b> <b class="method">init</b></dt>
<dd><p>This method is run when the attribute
				is defined, its responsibility is to
				initialize anything in the language
				namespace for the attribute and
				default processing.</p>
<p>The result of this method is ignored.</p></dd>
<dt><b class="cmd">cmdprefix</b> <b class="method">fill</b> <i class="arg">varname</i></dt>
<dd><p>This method is run to put defaults, or
				derived values into the attribute dictionary
				named by <i class="arg">varname</i>. This variable will
				be found in the calling context.</p>
<p>The result of this method is ignored.</p></dd>
<dt><b class="cmd">cmdprefix</b> <b class="method">set</b> <i class="arg">name</i> <i class="arg">value</i></dt>
<dd><p>This method is run to push current a
				attribute value into the language
				namespace, to make it the new default.</p>
<p>The result of this method is ignored.</p></dd>
</dl></dd>
<dt><b class="const">linked</b></dt>
<dd><p>This key is effective if and only if key
			<b class="const">default</b> is not specified. In that
			case is supplies a default handling for
			<b class="const">default</b>, linking the attribute to a
			variable in the language context.</p>
<p>The value for this key is a 2-element list
			containing the name of the variable to link
			to, and its initial value, in this order.</p></dd>
</dl></dd>
<dt><a name="7"><i class="arg">diagramObject</i> <b class="method">unknown attribute</b> <i class="arg">cmdprefix</i></a></dt>
<dd><p>This method registers the command prefix with the
		subsystem processing the attributes for element
		commands, telling it to call it when it encounters an
		attribute it is unable to handle on its on.</p>
<p>It is allowed to register more than callback, these
		will be called in order of registration (i.e. first to
		last), until one of the callbacks accepts the current
		input.
		The command prefix is expected to conform to the
		following signature:</p>
<dl class="doctools_definitions">
		
<dt><b class="cmd">cmdprefix</b> <i class="arg">wordqueue</i></dt>
<dd><p>Where <i class="arg">wordqueue</i> is the handle of a queue
			object conforming to the API of the queues
			provided by package <b class="package">struct::queue</b>.
			This queue contains the not-yet-processed part
			of the attribute definitions, with one entry
			per word, with the first entry the name of the
			attribute which could not be processed.</p>
<p>The results of the command has to be a boolean
			value where <b class="const">True</b> signals that this
			callback has accepted the attribute, processed
			it, and the new state of the <i class="arg">wordqueue</i>
			is where the general processing shall continue.</p>
<p>Given the signature the command has basically
			two ways of handling (rewriting) the attributes
			it recognizes:</p>
<ol class="doctools_enumerated">
			
<li><p>Replace the attribute (and arguments)
				with a different attribute and arguments.</p></li>
<li><p>Push additional words in front to get
				the general processing unstuck.</p></li>
</ol></dd>
</dl></dd>
<dt><a name="8"><i class="arg">diagramObject</i> <b class="method">draw</b> <i class="arg">script</i></a></dt>
<dd><p>This method runs the given <i class="arg">script</i> in the
		context of the drawing language definitions.
		See section <span class="sectref"><a href="#section3">Language Reference</a></span> for
		details on the available commands.</p>
<p><em>Note</em> that <i class="arg">script</i> is <em>trusted</em>.
		It is executed in the current interpreter with
		access to its full abilities.
		For the execution of untrusted diagram scripts this
		interpreter should be a safe one.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Language Reference</a></h2>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Elements</a></h3>
<p>This section lists the commands for the predefined drawing elements,
aka shapes. These commands are all defined in the language's context.
All commands of this section return the handle of the newly created
element as their result. This handle also exists as a command which
can be used to query the element for its corners (names, values).
See section <span class="sectref"><a href="#subsection7">Miscellaneous Commands</a></span>.
<img alt="figure-02-basic-shapes" src="../../../../image/figure-02-basic-shapes.png"></p>
<dl class="doctools_definitions">
<dt><a name="9"><b class="cmd"><a href="../../../../index.html#key76">arc</a></b> <i class="arg">attr</i>...</a></dt>
<dd><p><img alt="figure-02-arc" src="../../../../image/figure-02-arc.png">
An open element with the corresponding corners, i.e. &quot;start&quot;, &quot;end&quot;,
and &quot;center&quot;.
Note however that it also has the compass rose of closed elements as
its corners, with the center of the arc's circle as the center of the
compass and the other points on the circle the arc is part of.
It handles the attributes</p>
<dl class="doctools_definitions">
<dt><b class="cmd">anchor</b> <i class="arg">name</i></dt>
<dd></dd>
<dt><b class="cmd">ljust</b></dt>
<dd></dd>
<dt><b class="cmd">rjust</b></dt>
<dd></dd>
<dt><b class="cmd">above</b></dt>
<dd></dd>
<dt><b class="cmd">below</b></dt>
<dd><p><img alt="figure-22-text-anchoring-3" src="../../../../image/figure-22-text-anchoring-3.png">
Specifies the anchor of the text which is to be placed at the
element's center, by name. I.e. this attribute defines the text's
position relative to the element's center.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">anchor</b>, which itself defaults to
<b class="const">center</b>.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetAnchor.htm">Tk_GetAnchor</a>.
The commands without arguments are all shorthands with the anchor
implied. Note that they do not combine, only the last is used. For
comined directions the main attribute command, <b class="cmd">anchor</b> has to be
used.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ljust</b></dt>
<dd><p>&quot;anchor west&quot;</p></dd>
<dt><b class="cmd">rjust</b></dt>
<dd><p>&quot;anchor east&quot;</p></dd>
<dt><b class="cmd">above</b></dt>
<dd><p>&quot;anchor south&quot;</p></dd>
<dt><b class="cmd">below</b></dt>
<dd><p>&quot;anchor north&quot;</p></dd>
</dl></dd>
<dt><b class="cmd">clockwise</b></dt>
<dd></dd>
<dt><b class="cmd">cw</b></dt>
<dd><p>Specifies the direction of the <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> element, here going
clockwise.
The complementary attribute is <b class="cmd">counterclockwise</b>.
If not specified the system falls back to the value taken from the
language variable <b class="variable">clockwise</b>, which itself defaults to 
<b class="const">false</b>, for counter-clockwise direction.</p></dd>
<dt><b class="cmd">color</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linecolor</b>, which itself defaults to <b class="const">black</b>.</p></dd>
<dt><b class="cmd">counterclockwise</b></dt>
<dd></dd>
<dt><b class="cmd">ccw</b></dt>
<dd><p>Specifies the direction of the <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> element, here
counter-clockwise.
The complementary attribute is <b class="cmd">clockwise</b>.
If not specified the system falls back to the value taken from the
language variable <b class="variable">clockwise</b>, which itself defaults to 
<b class="const">false</b>, for counter-clockwise direction.</p></dd>
<dt><b class="cmd">fillcolor</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the inside of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">fillcolor</b>, which itself defaults to the empty
string, signaling &quot;no filling&quot;.</p></dd>
<dt><b class="cmd">from</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location where the <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> element begins.
Defaults to the current location as maintained by the layouting
system.</p></dd>
<dt><b class="cmd">justify</b> <b class="const">left</b>|<b class="const">center</b>|<b class="const">right</b></dt>
<dd><p>Specifies how multi-line text associated with the element is
positioned within its box.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">justify</b>, which itself defaults to
<b class="const">left</b>.
The legal values are <b class="const">left</b>, <b class="const">right</b>, and <b class="const">center</b>.</p></dd>
<dt><b class="cmd">radius</b> <i class="arg">length</i></dt>
<dd><p>Specifies the radius of the <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> element, or rather, the radius
of the circle the shown arc is a part of.
If not specified the system falls back to the value taken from the
language variable <b class="variable">arcradius</b>, which itself defaults to the pixel
equivalent of <b class="const">1 cm</b>.</p></dd>
<dt><b class="cmd">stroke</b> <i class="arg">width</i></dt>
<dd><p><img alt="figure-20-style-stroke" src="../../../../image/figure-20-style-stroke.png">
Specifies the width of the lines drawn for the the element, in pixels.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linewidth</b>, which itself defaults to <b class="const">1</b>.</p></dd>
<dt><b class="cmd">style</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-18-style-dash" src="../../../../image/figure-18-style-dash.png">
Specifies the style used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linestyle</b>, which itself defaults to
<b class="const">solid</b> lines.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetDash.htm">Tk_GetDash</a>,
and additionally all which are listed below:</p>
<dl class="doctools_definitions">
<dt><b class="const">solid</b>, empty string</dt>
<dd><p>Draw solid line.</p></dd>
<dt><b class="const">dash</b>, <b class="const">dashed</b>, <b class="const">-</b></dt>
<dd><p>Draw a dashed line.</p></dd>
<dt><b class="const">dot</b>, <b class="const">dotted</b>, <b class="const">.</b></dt>
<dd><p>Draw a dotted line.</p></dd>
<dt><b class="const">dash-dot</b>, <b class="const">-.</b></dt>
<dd><p>Draw a dash-dotted line</p></dd>
<dt><b class="const">dash-dot-dot</b>, <b class="const">-..</b></dt>
<dd><p>Draw a dash-dot-dotted line.</p></dd>
</dl>
<p>Note that the values &quot;solid&quot;, &quot;dot(ted)&quot;, &quot;dash(ed)&quot;, &quot;dash-dot&quot;, and
&quot;dash-dot-dot&quot; are all accepted as shorthands for the <b class="cmd">style</b>
command using them as argument.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key21">text</a></b> <i class="arg">string</i></dt>
<dd><p>Specifies the text to associate with the element.
Defaults to nothing.
When specified multiple times the actually shown text is the
concatenation of the individual strings, vertically stacked, with the
first string specified being the topmost element.</p></dd>
<dt><b class="cmd">textcolor</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the color used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textcolor</b>, which itself defaults to
<b class="const">black</b>.</p></dd>
<dt><b class="cmd">textfont</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the font used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textfont</b>, which itself defaults to
<b class="const">Helvetica 12pt</b>.</p></dd>
<dt><b class="cmd">to</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location where the <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> element ends.
Defaults to a location such that a 90-degree arc is drawn in the
chosen direction, starting at <b class="cmd">from</b>.</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd"><a href="../../../../index.html#key71">arrow</a></b> <i class="arg">attr</i>...</a></dt>
<dd></dd>
<dt><a name="11"><b class="cmd">--&gt;</b> <i class="arg">attr</i>...</a></dt>
<dd></dd>
<dt><a name="12"><b class="cmd">&lt;--&gt;</b> <i class="arg">attr</i>...</a></dt>
<dd></dd>
<dt><a name="13"><b class="cmd">&lt;--&gt;</b> <i class="arg">attr</i>...</a></dt>
<dd><p><img alt="figure-02-arrow" src="../../../../image/figure-02-arrow.png">
An alias for the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element (see below), with the attribute
<b class="cmd">arrowhead</b> preset to <b class="const">-&gt;</b>, <b class="const">&lt;-&gt;</b>, or <b class="const">&lt;-</b>.  The
<b class="cmd"><a href="../../../../index.html#key71">arrow</a></b> is equivalent to <b class="cmd">--&gt;</b>.</p></dd>
<dt><a name="14"><b class="cmd">block</b> <i class="arg">script</i> <i class="arg">attr</i>...</a></dt>
<dd><p>A closed element with the corresponding corners, i.e. the eight
directions of the compass rose, and &quot;center&quot;.
The main effect is the aggregration of all elements created by the
<i class="arg">script</i> into one element.
This also means that while the elements created by the script are
visible in the element history while the script is executing,
afterward the history contains only the block itself, and not the
elements it is composed of.</p>
<p>The script has access to the current state of all variables in the
language context.
Any changes to the variables will be reverted after execution of the
block.
However, also, any variables set in the script will be exported as
corners of the element, allowing users to define their own named
locations in the block.</p>
<p>Regarding the layout mechanism any changes made by the script are
reverted after the element is done.
In other words, a block is an implicit <b class="cmd">group</b>.</p>
<p>Blocks handle all attributes, propgating their settings into the
script as the default values active during script execution.</p></dd>
<dt><a name="15"><b class="cmd"><a href="../../../../index.html#key67">box</a></b> <i class="arg">attr</i>...</a></dt>
<dd><p><img alt="figure-02-box" src="../../../../image/figure-02-box.png">
A closed element with the corresponding corners, i.e. the eight
directions of the compass rose, and &quot;center&quot;.
It handles the attributes</p>
<dl class="doctools_definitions">
<dt><b class="cmd">anchor</b> <i class="arg">name</i></dt>
<dd></dd>
<dt><b class="cmd">ljust</b></dt>
<dd></dd>
<dt><b class="cmd">rjust</b></dt>
<dd></dd>
<dt><b class="cmd">above</b></dt>
<dd></dd>
<dt><b class="cmd">below</b></dt>
<dd><p><img alt="figure-22-text-anchoring-3" src="../../../../image/figure-22-text-anchoring-3.png">
Specifies the anchor of the text which is to be placed at the
element's center, by name. I.e. this attribute defines the text's
position relative to the element's center.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">anchor</b>, which itself defaults to
<b class="const">center</b>.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetAnchor.htm">Tk_GetAnchor</a>.
The commands without arguments are all shorthands with the anchor
implied. Note that they do not combine, only the last is used. For
comined directions the main attribute command, <b class="cmd">anchor</b> has to be
used.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ljust</b></dt>
<dd><p>&quot;anchor west&quot;</p></dd>
<dt><b class="cmd">rjust</b></dt>
<dd><p>&quot;anchor east&quot;</p></dd>
<dt><b class="cmd">above</b></dt>
<dd><p>&quot;anchor south&quot;</p></dd>
<dt><b class="cmd">below</b></dt>
<dd><p>&quot;anchor north&quot;</p></dd>
</dl></dd>
<dt><b class="cmd">at</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location of the element's corner named by the attribute
<b class="cmd">with</b>.
Defaults to the current location as maintained by the layouting
system.</p></dd>
<dt><b class="cmd">color</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linecolor</b>, which itself defaults to <b class="const">black</b>.</p></dd>
<dt><b class="cmd">fillcolor</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the inside of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">fillcolor</b>, which itself defaults to the empty
string, signaling &quot;no filling&quot;.</p></dd>
<dt><b class="cmd">height</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">ht</b> <i class="arg">length</i></dt>
<dd><p>Specifies the height of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">boxheight</b>, which itself defaults to the
pixel equivalent of <b class="const">2 cm</b>.</p></dd>
<dt><b class="cmd">justify</b> <b class="const">left</b>|<b class="const">center</b>|<b class="const">right</b></dt>
<dd><p>Specifies how multi-line text associated with the element is
positioned within its box.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">justify</b>, which itself defaults to
<b class="const">left</b>.
The legal values are <b class="const">left</b>, <b class="const">right</b>, and <b class="const">center</b>.</p></dd>
<dt><b class="cmd">slant</b> <i class="arg">angle</i></dt>
<dd><p>Specifies the angle by which the <b class="cmd"><a href="../../../../index.html#key67">box</a></b> element is slanted, in
degrees.
If not specified the system falls back to the value taken from the
language variable <b class="variable">slant</b>, which itself defaults to <b class="const">90</b>,
i.e. vertical, no slant.
0 degrees is slanting straight east, pointing to the right.
90 degrees is slanting to the north, pointing straight up.</p></dd>
<dt><b class="cmd">stroke</b> <i class="arg">width</i></dt>
<dd><p><img alt="figure-20-style-stroke" src="../../../../image/figure-20-style-stroke.png">
Specifies the width of the lines drawn for the the element, in pixels.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linewidth</b>, which itself defaults to <b class="const">1</b>.</p></dd>
<dt><b class="cmd">style</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-18-style-dash" src="../../../../image/figure-18-style-dash.png">
Specifies the style used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linestyle</b>, which itself defaults to
<b class="const">solid</b> lines.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetDash.htm">Tk_GetDash</a>,
and additionally all which are listed below:</p>
<dl class="doctools_definitions">
<dt><b class="const">solid</b>, empty string</dt>
<dd><p>Draw solid line.</p></dd>
<dt><b class="const">dash</b>, <b class="const">dashed</b>, <b class="const">-</b></dt>
<dd><p>Draw a dashed line.</p></dd>
<dt><b class="const">dot</b>, <b class="const">dotted</b>, <b class="const">.</b></dt>
<dd><p>Draw a dotted line.</p></dd>
<dt><b class="const">dash-dot</b>, <b class="const">-.</b></dt>
<dd><p>Draw a dash-dotted line</p></dd>
<dt><b class="const">dash-dot-dot</b>, <b class="const">-..</b></dt>
<dd><p>Draw a dash-dot-dotted line.</p></dd>
</dl>
<p>Note that the values &quot;solid&quot;, &quot;dot(ted)&quot;, &quot;dash(ed)&quot;, &quot;dash-dot&quot;, and
&quot;dash-dot-dot&quot; are all accepted as shorthands for the <b class="cmd">style</b>
command using them as argument.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key21">text</a></b> <i class="arg">string</i></dt>
<dd><p>Specifies the text to associate with the element.
Defaults to nothing.
When specified multiple times the actually shown text is the
concatenation of the individual strings, vertically stacked, with the
first string specified being the topmost element.</p></dd>
<dt><b class="cmd">textcolor</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the color used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textcolor</b>, which itself defaults to
<b class="const">black</b>.</p></dd>
<dt><b class="cmd">textfont</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the font used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textfont</b>, which itself defaults to
<b class="const">Helvetica 12pt</b>.</p></dd>
<dt><b class="cmd">width</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">wid</b> <i class="arg">length</i></dt>
<dd><p>Specifies the width of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">boxwidth</b>, which itself defaults to the pixel
equivalent of <b class="const">2 cm</b>.</p></dd>
<dt><b class="cmd">with</b> <i class="arg">corner</i></dt>
<dd><p>Specifies the corner of the element to place at the location given by
the attribute <b class="cmd">at</b>.
Defaults to the current corner as maintained by the layouting system,
except if the value for <b class="cmd">at</b> was specified by the user. In that
case it defaults to <b class="const">center</b>.</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd"><a href="../../../../index.html#key81">circle</a></b> <i class="arg">attr</i>...</a></dt>
<dd></dd>
<dt><a name="17"><b class="cmd">O</b> <i class="arg">attr</i>...</a></dt>
<dd><p><img alt="figure-02-circle" src="../../../../image/figure-02-circle.png">
A closed element with the corresponding corners, i.e. the eight
directions of the compass rose, and &quot;center&quot;.
It handles the attributes</p>
<dl class="doctools_definitions">
<dt><b class="cmd">anchor</b> <i class="arg">name</i></dt>
<dd></dd>
<dt><b class="cmd">ljust</b></dt>
<dd></dd>
<dt><b class="cmd">rjust</b></dt>
<dd></dd>
<dt><b class="cmd">above</b></dt>
<dd></dd>
<dt><b class="cmd">below</b></dt>
<dd><p><img alt="figure-22-text-anchoring-3" src="../../../../image/figure-22-text-anchoring-3.png">
Specifies the anchor of the text which is to be placed at the
element's center, by name. I.e. this attribute defines the text's
position relative to the element's center.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">anchor</b>, which itself defaults to
<b class="const">center</b>.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetAnchor.htm">Tk_GetAnchor</a>.
The commands without arguments are all shorthands with the anchor
implied. Note that they do not combine, only the last is used. For
comined directions the main attribute command, <b class="cmd">anchor</b> has to be
used.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ljust</b></dt>
<dd><p>&quot;anchor west&quot;</p></dd>
<dt><b class="cmd">rjust</b></dt>
<dd><p>&quot;anchor east&quot;</p></dd>
<dt><b class="cmd">above</b></dt>
<dd><p>&quot;anchor south&quot;</p></dd>
<dt><b class="cmd">below</b></dt>
<dd><p>&quot;anchor north&quot;</p></dd>
</dl></dd>
<dt><b class="cmd">at</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location of the element's corner named by the attribute
<b class="cmd">with</b>.
Defaults to the current location as maintained by the layouting
system.</p></dd>
<dt><b class="cmd">color</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linecolor</b>, which itself defaults to <b class="const">black</b>.</p></dd>
<dt><b class="cmd">diameter</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">diam</b> <i class="arg">length</i></dt>
<dd><p>Specifies the diameter of the <b class="cmd"><a href="../../../../index.html#key81">circle</a></b> element, as an alternative
way to specify its <b class="cmd">radius</b>.
Effective if and only if the radius was not specified. I.e. if both
diameter and radius are specified then the radius infomration has
precendence.
This attribute has no default, because the defaults are taken from the
radius.</p></dd>
<dt><b class="cmd">fillcolor</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the inside of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">fillcolor</b>, which itself defaults to the empty
string, signaling &quot;no filling&quot;.</p></dd>
<dt><b class="cmd">justify</b> <b class="const">left</b>|<b class="const">center</b>|<b class="const">right</b></dt>
<dd><p>Specifies how multi-line text associated with the element is
positioned within its box.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">justify</b>, which itself defaults to
<b class="const">left</b>.
The legal values are <b class="const">left</b>, <b class="const">right</b>, and <b class="const">center</b>.</p></dd>
<dt><b class="cmd">radius</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">rad</b> <i class="arg">length</i></dt>
<dd><p>Specifies the radius of the <b class="cmd"><a href="../../../../index.html#key81">circle</a></b> element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">circleradius</b>, which itself defaults to the
pixel equivalent of <b class="const">1 cm</b>.</p></dd>
<dt><b class="cmd">stroke</b> <i class="arg">width</i></dt>
<dd><p><img alt="figure-20-style-stroke" src="../../../../image/figure-20-style-stroke.png">
Specifies the width of the lines drawn for the the element, in pixels.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linewidth</b>, which itself defaults to <b class="const">1</b>.</p></dd>
<dt><b class="cmd">style</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-18-style-dash" src="../../../../image/figure-18-style-dash.png">
Specifies the style used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linestyle</b>, which itself defaults to
<b class="const">solid</b> lines.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetDash.htm">Tk_GetDash</a>,
and additionally all which are listed below:</p>
<dl class="doctools_definitions">
<dt><b class="const">solid</b>, empty string</dt>
<dd><p>Draw solid line.</p></dd>
<dt><b class="const">dash</b>, <b class="const">dashed</b>, <b class="const">-</b></dt>
<dd><p>Draw a dashed line.</p></dd>
<dt><b class="const">dot</b>, <b class="const">dotted</b>, <b class="const">.</b></dt>
<dd><p>Draw a dotted line.</p></dd>
<dt><b class="const">dash-dot</b>, <b class="const">-.</b></dt>
<dd><p>Draw a dash-dotted line</p></dd>
<dt><b class="const">dash-dot-dot</b>, <b class="const">-..</b></dt>
<dd><p>Draw a dash-dot-dotted line.</p></dd>
</dl>
<p>Note that the values &quot;solid&quot;, &quot;dot(ted)&quot;, &quot;dash(ed)&quot;, &quot;dash-dot&quot;, and
&quot;dash-dot-dot&quot; are all accepted as shorthands for the <b class="cmd">style</b>
command using them as argument.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key21">text</a></b> <i class="arg">string</i></dt>
<dd><p>Specifies the text to associate with the element.
Defaults to nothing.
When specified multiple times the actually shown text is the
concatenation of the individual strings, vertically stacked, with the
first string specified being the topmost element.</p></dd>
<dt><b class="cmd">textcolor</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the color used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textcolor</b>, which itself defaults to
<b class="const">black</b>.</p></dd>
<dt><b class="cmd">textfont</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the font used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textfont</b>, which itself defaults to
<b class="const">Helvetica 12pt</b>.</p></dd>
<dt><b class="cmd">with</b> <i class="arg">corner</i></dt>
<dd><p>Specifies the corner of the element to place at the location given by
the attribute <b class="cmd">at</b>.
Defaults to the current corner as maintained by the layouting system,
except if the value for <b class="cmd">at</b> was specified by the user. In that
case it defaults to <b class="const">center</b>.</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd"><a href="../../../../index.html#key82">diamond</a></b> <i class="arg">attr</i>...</a></dt>
<dd></dd>
<dt><a name="19"><b class="cmd">&lt;&gt;</b> <i class="arg">attr</i>...</a></dt>
<dd><p><img alt="figure-02-diamond" src="../../../../image/figure-02-diamond.png">
A closed element with the corresponding corners, i.e. the eight
directions of the compass rose, and &quot;center&quot;.
It handles the attributes</p>
<dl class="doctools_definitions">
<dt><b class="cmd">anchor</b> <i class="arg">name</i></dt>
<dd></dd>
<dt><b class="cmd">ljust</b></dt>
<dd></dd>
<dt><b class="cmd">rjust</b></dt>
<dd></dd>
<dt><b class="cmd">above</b></dt>
<dd></dd>
<dt><b class="cmd">below</b></dt>
<dd><p><img alt="figure-22-text-anchoring-3" src="../../../../image/figure-22-text-anchoring-3.png">
Specifies the anchor of the text which is to be placed at the
element's center, by name. I.e. this attribute defines the text's
position relative to the element's center.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">anchor</b>, which itself defaults to
<b class="const">center</b>.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetAnchor.htm">Tk_GetAnchor</a>.
The commands without arguments are all shorthands with the anchor
implied. Note that they do not combine, only the last is used. For
comined directions the main attribute command, <b class="cmd">anchor</b> has to be
used.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ljust</b></dt>
<dd><p>&quot;anchor west&quot;</p></dd>
<dt><b class="cmd">rjust</b></dt>
<dd><p>&quot;anchor east&quot;</p></dd>
<dt><b class="cmd">above</b></dt>
<dd><p>&quot;anchor south&quot;</p></dd>
<dt><b class="cmd">below</b></dt>
<dd><p>&quot;anchor north&quot;</p></dd>
</dl></dd>
<dt><b class="cmd">aspect</b> <i class="arg">number</i></dt>
<dd><p>Specifies the aspect ratio, i.e ratio of width to height, of the
<b class="cmd"><a href="../../../../index.html#key82">diamond</a></b> element.
The manner in which a default is calculated when not specified also
depends on the specifications of the attributes <b class="cmd">width</b> and
<b class="cmd">height</b>, if any.</p>
<p>If both <b class="cmd">width</b>, and <b class="cmd">height</b> are specified then any
specification of <b class="cmd">aspect</b> is ignored, as it is implicitly defined
in the width and height as well, and this takes precedence. A missing
specification is ignored in that case well, i.e. no defaults are
required.</p>
<p>If the <b class="cmd">aspect</b> is specified, and one of the attributes
<b class="cmd">width</b> or <b class="cmd">height</b>, then the missing attribute is calculated
from the two which are specified. No defaults are required for these
cases either.</p>
<p>If only one of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">aspect</b>, the value taken
from the language variable <b class="variable">diamondaspect</b>, which itselfs defaults
to <b class="const">2</b>.</p>
<p>If none of of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">width</b>, the value taken
from the language variable <b class="variable">boxwidth</b>, which itselfs defaults to
the pixel equivalent of <b class="const">2 cm</b>. For the aspect it uses either
the user-specified value or the default taken as described in the
previous paragraph.</p></dd>
<dt><b class="cmd">at</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location of the element's corner named by the attribute
<b class="cmd">with</b>.
Defaults to the current location as maintained by the layouting
system.</p></dd>
<dt><b class="cmd">color</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linecolor</b>, which itself defaults to <b class="const">black</b>.</p></dd>
<dt><b class="cmd">fillcolor</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the inside of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">fillcolor</b>, which itself defaults to the empty
string, signaling &quot;no filling&quot;.</p></dd>
<dt><b class="cmd">height</b> <i class="arg">length</i></dt>
<dd><p>Specifies the height of the <b class="cmd"><a href="../../../../index.html#key82">diamond</a></b> element.
The manner in which a default is calculated when not specified also
depends on the specifications of the attributes <b class="cmd">aspect</b> and
<b class="cmd">width</b>, if any.</p>
<p>If both <b class="cmd">width</b>, and <b class="cmd">height</b> are specified then any
specification of <b class="cmd">aspect</b> is ignored, as it is implicitly defined
in the width and height as well, and this takes precedence. A missing
specification is ignored in that case well, i.e. no defaults are
required.</p>
<p>If the <b class="cmd">aspect</b> is specified, and one of the attributes
<b class="cmd">width</b> or <b class="cmd">height</b>, then the missing attribute is calculated
from the two which are specified. No defaults are required for these
cases either.</p>
<p>If only one of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">aspect</b>, the value taken
from the language variable <b class="variable">diamondaspect</b>, which itselfs defaults
to <b class="const">2</b>.</p>
<p>If none of of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">width</b>, the value taken
from the language variable <b class="variable">boxwidth</b>, which itselfs defaults to
the pixel equivalent of <b class="const">2 cm</b>. For the aspect it uses either
the user-specified value or the default taken as described in the
previous paragraph.</p></dd>
<dt><b class="cmd">justify</b> <b class="const">left</b>|<b class="const">center</b>|<b class="const">right</b></dt>
<dd><p>Specifies how multi-line text associated with the element is
positioned within its box.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">justify</b>, which itself defaults to
<b class="const">left</b>.
The legal values are <b class="const">left</b>, <b class="const">right</b>, and <b class="const">center</b>.</p></dd>
<dt><b class="cmd">stroke</b> <i class="arg">width</i></dt>
<dd><p><img alt="figure-20-style-stroke" src="../../../../image/figure-20-style-stroke.png">
Specifies the width of the lines drawn for the the element, in pixels.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linewidth</b>, which itself defaults to <b class="const">1</b>.</p></dd>
<dt><b class="cmd">style</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-18-style-dash" src="../../../../image/figure-18-style-dash.png">
Specifies the style used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linestyle</b>, which itself defaults to
<b class="const">solid</b> lines.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetDash.htm">Tk_GetDash</a>,
and additionally all which are listed below:</p>
<dl class="doctools_definitions">
<dt><b class="const">solid</b>, empty string</dt>
<dd><p>Draw solid line.</p></dd>
<dt><b class="const">dash</b>, <b class="const">dashed</b>, <b class="const">-</b></dt>
<dd><p>Draw a dashed line.</p></dd>
<dt><b class="const">dot</b>, <b class="const">dotted</b>, <b class="const">.</b></dt>
<dd><p>Draw a dotted line.</p></dd>
<dt><b class="const">dash-dot</b>, <b class="const">-.</b></dt>
<dd><p>Draw a dash-dotted line</p></dd>
<dt><b class="const">dash-dot-dot</b>, <b class="const">-..</b></dt>
<dd><p>Draw a dash-dot-dotted line.</p></dd>
</dl>
<p>Note that the values &quot;solid&quot;, &quot;dot(ted)&quot;, &quot;dash(ed)&quot;, &quot;dash-dot&quot;, and
&quot;dash-dot-dot&quot; are all accepted as shorthands for the <b class="cmd">style</b>
command using them as argument.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key21">text</a></b> <i class="arg">string</i></dt>
<dd><p>Specifies the text to associate with the element.
Defaults to nothing.
When specified multiple times the actually shown text is the
concatenation of the individual strings, vertically stacked, with the
first string specified being the topmost element.</p></dd>
<dt><b class="cmd">textcolor</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the color used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textcolor</b>, which itself defaults to
<b class="const">black</b>.</p></dd>
<dt><b class="cmd">textfont</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the font used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textfont</b>, which itself defaults to
<b class="const">Helvetica 12pt</b>.</p></dd>
<dt><b class="cmd">width</b> <i class="arg">length</i></dt>
<dd><p>Specifies the width of the <b class="cmd"><a href="../../../../index.html#key82">diamond</a></b> element.
The manner in which a default is calculated when not specified also
depends on the specifications of the attributes <b class="cmd">aspect</b> and
<b class="cmd">height</b>, if any.</p>
<p>If both <b class="cmd">width</b>, and <b class="cmd">height</b> are specified then any
specification of <b class="cmd">aspect</b> is ignored, as it is implicitly defined
in the width and height as well, and this takes precedence. A missing
specification is ignored in that case well, i.e. no defaults are
required.</p>
<p>If the <b class="cmd">aspect</b> is specified, and one of the attributes
<b class="cmd">width</b> or <b class="cmd">height</b>, then the missing attribute is calculated
from the two which are specified. No defaults are required for these
cases either.</p>
<p>If only one of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">aspect</b>, the value taken
from the language variable <b class="variable">diamondaspect</b>, which itselfs defaults
to <b class="const">2</b>.</p>
<p>If none of of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">width</b>, the value taken
from the language variable <b class="variable">boxwidth</b>, which itselfs defaults to
the pixel equivalent of <b class="const">2 cm</b>. For the aspect it uses either
the user-specified value or the default taken as described in the
previous paragraph.</p></dd>
<dt><b class="cmd">with</b> <i class="arg">corner</i></dt>
<dd><p>Specifies the corner of the element to place at the location given by
the attribute <b class="cmd">at</b>.
Defaults to the current corner as maintained by the layouting system,
except if the value for <b class="cmd">at</b> was specified by the user. In that
case it defaults to <b class="const">center</b>.</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd"><a href="../../../../index.html#key66">drum</a></b> <i class="arg">attr</i>...</a></dt>
<dd><p><img alt="figure-02-drum" src="../../../../image/figure-02-drum.png">
A closed element with the corresponding corners, i.e. the eight
directions of the compass rose, and &quot;center&quot;.
It handles the attributes</p>
<dl class="doctools_definitions">
<dt><b class="cmd">anchor</b> <i class="arg">name</i></dt>
<dd></dd>
<dt><b class="cmd">ljust</b></dt>
<dd></dd>
<dt><b class="cmd">rjust</b></dt>
<dd></dd>
<dt><b class="cmd">above</b></dt>
<dd></dd>
<dt><b class="cmd">below</b></dt>
<dd><p><img alt="figure-22-text-anchoring-3" src="../../../../image/figure-22-text-anchoring-3.png">
Specifies the anchor of the text which is to be placed at the
element's center, by name. I.e. this attribute defines the text's
position relative to the element's center.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">anchor</b>, which itself defaults to
<b class="const">center</b>.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetAnchor.htm">Tk_GetAnchor</a>.
The commands without arguments are all shorthands with the anchor
implied. Note that they do not combine, only the last is used. For
comined directions the main attribute command, <b class="cmd">anchor</b> has to be
used.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ljust</b></dt>
<dd><p>&quot;anchor west&quot;</p></dd>
<dt><b class="cmd">rjust</b></dt>
<dd><p>&quot;anchor east&quot;</p></dd>
<dt><b class="cmd">above</b></dt>
<dd><p>&quot;anchor south&quot;</p></dd>
<dt><b class="cmd">below</b></dt>
<dd><p>&quot;anchor north&quot;</p></dd>
</dl></dd>
<dt><b class="cmd">aspect</b> <i class="arg">number</i></dt>
<dd><p>Specifies the aspect ratio, i.e ratio of width to height, of the
ellipses which are used to draw the top and bottom of the <b class="cmd"><a href="../../../../index.html#key66">drum</a></b>
element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">drumaspect</b>, which itself defaults to
<b class="const">0.35</b>.</p></dd>
<dt><b class="cmd">at</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location of the element's corner named by the attribute
<b class="cmd">with</b>.
Defaults to the current location as maintained by the layouting
system.</p></dd>
<dt><b class="cmd">color</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linecolor</b>, which itself defaults to <b class="const">black</b>.</p></dd>
<dt><b class="cmd">fillcolor</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the inside of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">fillcolor</b>, which itself defaults to the empty
string, signaling &quot;no filling&quot;.</p></dd>
<dt><b class="cmd">height</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">ht</b> <i class="arg">length</i></dt>
<dd><p>Specifies the height of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">boxheight</b>, which itself defaults to the
pixel equivalent of <b class="const">2 cm</b>.</p></dd>
<dt><b class="cmd">justify</b> <b class="const">left</b>|<b class="const">center</b>|<b class="const">right</b></dt>
<dd><p>Specifies how multi-line text associated with the element is
positioned within its box.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">justify</b>, which itself defaults to
<b class="const">left</b>.
The legal values are <b class="const">left</b>, <b class="const">right</b>, and <b class="const">center</b>.</p></dd>
<dt><b class="cmd">stroke</b> <i class="arg">width</i></dt>
<dd><p><img alt="figure-20-style-stroke" src="../../../../image/figure-20-style-stroke.png">
Specifies the width of the lines drawn for the the element, in pixels.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linewidth</b>, which itself defaults to <b class="const">1</b>.</p></dd>
<dt><b class="cmd">style</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-18-style-dash" src="../../../../image/figure-18-style-dash.png">
Specifies the style used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linestyle</b>, which itself defaults to
<b class="const">solid</b> lines.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetDash.htm">Tk_GetDash</a>,
and additionally all which are listed below:</p>
<dl class="doctools_definitions">
<dt><b class="const">solid</b>, empty string</dt>
<dd><p>Draw solid line.</p></dd>
<dt><b class="const">dash</b>, <b class="const">dashed</b>, <b class="const">-</b></dt>
<dd><p>Draw a dashed line.</p></dd>
<dt><b class="const">dot</b>, <b class="const">dotted</b>, <b class="const">.</b></dt>
<dd><p>Draw a dotted line.</p></dd>
<dt><b class="const">dash-dot</b>, <b class="const">-.</b></dt>
<dd><p>Draw a dash-dotted line</p></dd>
<dt><b class="const">dash-dot-dot</b>, <b class="const">-..</b></dt>
<dd><p>Draw a dash-dot-dotted line.</p></dd>
</dl>
<p>Note that the values &quot;solid&quot;, &quot;dot(ted)&quot;, &quot;dash(ed)&quot;, &quot;dash-dot&quot;, and
&quot;dash-dot-dot&quot; are all accepted as shorthands for the <b class="cmd">style</b>
command using them as argument.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key21">text</a></b> <i class="arg">string</i></dt>
<dd><p>Specifies the text to associate with the element.
Defaults to nothing.
When specified multiple times the actually shown text is the
concatenation of the individual strings, vertically stacked, with the
first string specified being the topmost element.</p></dd>
<dt><b class="cmd">textcolor</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the color used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textcolor</b>, which itself defaults to
<b class="const">black</b>.</p></dd>
<dt><b class="cmd">textfont</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the font used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textfont</b>, which itself defaults to
<b class="const">Helvetica 12pt</b>.</p></dd>
<dt><b class="cmd">width</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">wid</b> <i class="arg">length</i></dt>
<dd><p>Specifies the width of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">boxwidth</b>, which itself defaults to the pixel
equivalent of <b class="const">2 cm</b>.</p></dd>
<dt><b class="cmd">with</b> <i class="arg">corner</i></dt>
<dd><p>Specifies the corner of the element to place at the location given by
the attribute <b class="cmd">at</b>.
Defaults to the current corner as maintained by the layouting system,
except if the value for <b class="cmd">at</b> was specified by the user. In that
case it defaults to <b class="const">center</b>.</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd"><a href="../../../../index.html#key84">ellipse</a></b> <i class="arg">attr</i>...</a></dt>
<dd><p><img alt="figure-02-ellipse" src="../../../../image/figure-02-ellipse.png">
A closed element with the corresponding corners, i.e. the eight
directions of the compass rose, and &quot;center&quot;.
It handles the attributes</p>
<dl class="doctools_definitions">
<dt><b class="cmd">anchor</b> <i class="arg">name</i></dt>
<dd></dd>
<dt><b class="cmd">ljust</b></dt>
<dd></dd>
<dt><b class="cmd">rjust</b></dt>
<dd></dd>
<dt><b class="cmd">above</b></dt>
<dd></dd>
<dt><b class="cmd">below</b></dt>
<dd><p><img alt="figure-22-text-anchoring-3" src="../../../../image/figure-22-text-anchoring-3.png">
Specifies the anchor of the text which is to be placed at the
element's center, by name. I.e. this attribute defines the text's
position relative to the element's center.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">anchor</b>, which itself defaults to
<b class="const">center</b>.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetAnchor.htm">Tk_GetAnchor</a>.
The commands without arguments are all shorthands with the anchor
implied. Note that they do not combine, only the last is used. For
comined directions the main attribute command, <b class="cmd">anchor</b> has to be
used.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ljust</b></dt>
<dd><p>&quot;anchor west&quot;</p></dd>
<dt><b class="cmd">rjust</b></dt>
<dd><p>&quot;anchor east&quot;</p></dd>
<dt><b class="cmd">above</b></dt>
<dd><p>&quot;anchor south&quot;</p></dd>
<dt><b class="cmd">below</b></dt>
<dd><p>&quot;anchor north&quot;</p></dd>
</dl></dd>
<dt><b class="cmd">at</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location of the element's corner named by the attribute
<b class="cmd">with</b>.
Defaults to the current location as maintained by the layouting
system.</p></dd>
<dt><b class="cmd">color</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linecolor</b>, which itself defaults to <b class="const">black</b>.</p></dd>
<dt><b class="cmd">fillcolor</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the inside of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">fillcolor</b>, which itself defaults to the empty
string, signaling &quot;no filling&quot;.</p></dd>
<dt><b class="cmd">height</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">ht</b> <i class="arg">length</i></dt>
<dd><p>Specifies the height of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">boxheight</b>, which itself defaults to the
pixel equivalent of <b class="const">2 cm</b>.</p></dd>
<dt><b class="cmd">justify</b> <b class="const">left</b>|<b class="const">center</b>|<b class="const">right</b></dt>
<dd><p>Specifies how multi-line text associated with the element is
positioned within its box.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">justify</b>, which itself defaults to
<b class="const">left</b>.
The legal values are <b class="const">left</b>, <b class="const">right</b>, and <b class="const">center</b>.</p></dd>
<dt><b class="cmd">stroke</b> <i class="arg">width</i></dt>
<dd><p><img alt="figure-20-style-stroke" src="../../../../image/figure-20-style-stroke.png">
Specifies the width of the lines drawn for the the element, in pixels.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linewidth</b>, which itself defaults to <b class="const">1</b>.</p></dd>
<dt><b class="cmd">style</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-18-style-dash" src="../../../../image/figure-18-style-dash.png">
Specifies the style used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linestyle</b>, which itself defaults to
<b class="const">solid</b> lines.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetDash.htm">Tk_GetDash</a>,
and additionally all which are listed below:</p>
<dl class="doctools_definitions">
<dt><b class="const">solid</b>, empty string</dt>
<dd><p>Draw solid line.</p></dd>
<dt><b class="const">dash</b>, <b class="const">dashed</b>, <b class="const">-</b></dt>
<dd><p>Draw a dashed line.</p></dd>
<dt><b class="const">dot</b>, <b class="const">dotted</b>, <b class="const">.</b></dt>
<dd><p>Draw a dotted line.</p></dd>
<dt><b class="const">dash-dot</b>, <b class="const">-.</b></dt>
<dd><p>Draw a dash-dotted line</p></dd>
<dt><b class="const">dash-dot-dot</b>, <b class="const">-..</b></dt>
<dd><p>Draw a dash-dot-dotted line.</p></dd>
</dl>
<p>Note that the values &quot;solid&quot;, &quot;dot(ted)&quot;, &quot;dash(ed)&quot;, &quot;dash-dot&quot;, and
&quot;dash-dot-dot&quot; are all accepted as shorthands for the <b class="cmd">style</b>
command using them as argument.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key21">text</a></b> <i class="arg">string</i></dt>
<dd><p>Specifies the text to associate with the element.
Defaults to nothing.
When specified multiple times the actually shown text is the
concatenation of the individual strings, vertically stacked, with the
first string specified being the topmost element.</p></dd>
<dt><b class="cmd">textcolor</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the color used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textcolor</b>, which itself defaults to
<b class="const">black</b>.</p></dd>
<dt><b class="cmd">textfont</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the font used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textfont</b>, which itself defaults to
<b class="const">Helvetica 12pt</b>.</p></dd>
<dt><b class="cmd">width</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">wid</b> <i class="arg">length</i></dt>
<dd><p>Specifies the width of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">boxwidth</b>, which itself defaults to the pixel
equivalent of <b class="const">2 cm</b>.</p></dd>
<dt><b class="cmd">with</b> <i class="arg">corner</i></dt>
<dd><p>Specifies the corner of the element to place at the location given by
the attribute <b class="cmd">at</b>.
Defaults to the current corner as maintained by the layouting system,
except if the value for <b class="cmd">at</b> was specified by the user. In that
case it defaults to <b class="const">center</b>.</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd"><a href="../../../../index.html#key77">line</a></b> <i class="arg">attr</i>...</a></dt>
<dd></dd>
<dt><a name="23"><b class="cmd">--</b> <i class="arg">attr</i>...</a></dt>
<dd><p><img alt="figure-02-line" src="../../../../image/figure-02-line.png">
An open element with the corresponding corners, i.e. &quot;start&quot;, &quot;end&quot;,
and &quot;center&quot;.
It handles the attributes</p>
<dl class="doctools_definitions">
<dt><b class="cmd">anchor</b> <i class="arg">name</i></dt>
<dd></dd>
<dt><b class="cmd">ljust</b></dt>
<dd></dd>
<dt><b class="cmd">rjust</b></dt>
<dd></dd>
<dt><b class="cmd">above</b></dt>
<dd></dd>
<dt><b class="cmd">below</b></dt>
<dd><p><img alt="figure-22-text-anchoring-3" src="../../../../image/figure-22-text-anchoring-3.png">
Specifies the anchor of the text which is to be placed at the
element's center, by name. I.e. this attribute defines the text's
position relative to the element's center.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">anchor</b>, which itself defaults to
<b class="const">center</b>.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetAnchor.htm">Tk_GetAnchor</a>.
The commands without arguments are all shorthands with the anchor
implied. Note that they do not combine, only the last is used. For
comined directions the main attribute command, <b class="cmd">anchor</b> has to be
used.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ljust</b></dt>
<dd><p>&quot;anchor west&quot;</p></dd>
<dt><b class="cmd">rjust</b></dt>
<dd><p>&quot;anchor east&quot;</p></dd>
<dt><b class="cmd">above</b></dt>
<dd><p>&quot;anchor south&quot;</p></dd>
<dt><b class="cmd">below</b></dt>
<dd><p>&quot;anchor north&quot;</p></dd>
</dl></dd>
<dt><b class="cmd">arrowhead</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-19-style-arrowheads" src="../../../../image/figure-19-style-arrowheads.png">
Specifies where to draw arrowheads on the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element, at the
beginning or end, at both ends, or none.
If not specified the system falls back to the value taken from the
language variable <b class="variable">arrowhead</b>, which itself defaults to
<b class="const">none</b>.
The legal values are</p>
<dl class="doctools_definitions">
<dt><b class="const">none</b>, <b class="const">-</b></dt>
<dd><p>Draw no arrowheads, at neither end of the line.</p></dd>
<dt><b class="const">start</b>, <b class="const">first</b>, <b class="const">&lt;-</b></dt>
<dd><p>Draw an arrowhead at the beginning of the line, but not at its end.</p></dd>
<dt><b class="const">end</b>, <b class="const">last</b>, <b class="const">-&gt;</b></dt>
<dd><p>Draw an arrowhead at the end of the line, but not at its beginning.</p></dd>
<dt><b class="const">both</b>, <b class="const">&lt;-&gt;</b></dt>
<dd><p>Draw arrowheads at both ends of the line.</p></dd>
</dl>
<p>Note that the values &quot;start&quot;, &quot;end&quot;, &quot;-&quot;, &quot;-&gt;&quot;, &quot;&lt;-&quot;, and &quot;&lt;-&gt;&quot; are
all accepted as shorthands for the <b class="cmd">arrowhead</b> command using them
as argument.</p></dd>
<dt><b class="cmd">at</b> <i class="arg">location</i></dt>
<dd><p><b class="cmd"><a href="../../../../index.html#key77">Line</a></b> elements are normally positioned absolutely, using the
locations specified through the attributes <b class="cmd">from</b>, <b class="cmd">then</b>, and
<b class="cmd">to</b>.
If <b class="cmd">at</b> is specified however then these positions are translated a
last time, moving the line's corner named by the attribute <b class="cmd">with</b>
to the location given by this attribute.</p></dd>
<dt><b class="cmd">chop</b> <span class="opt">?<i class="arg">length</i>?</span></dt>
<dd><p>Specifies the length of the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element to remove from the
beginning and/or end.
Defaults to nothing.
If specified once the chopping applies to both beginning and end of
the line.
If specified twice or more the last two specifications are used, and
applied to beginning and end of the line, in this order.
Whenever the attribute is specified without an explicit length, the
system falls back to the value taken from the language variable
<b class="variable">circleradius</b>, which itself defaults to the pixel equivalent of
<b class="const">1 cm</b></p></dd>
<dt><b class="cmd">color</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linecolor</b>, which itself defaults to <b class="const">black</b>.</p></dd>
<dt><b class="cmd">fillcolor</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the inside of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">fillcolor</b>, which itself defaults to the empty
string, signaling &quot;no filling&quot;.</p></dd>
<dt><b class="cmd">from</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location where the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element begins.
Defaults to the current location as maintained by the layouting
system.</p></dd>
<dt><b class="cmd">justify</b> <b class="const">left</b>|<b class="const">center</b>|<b class="const">right</b></dt>
<dd><p>Specifies how multi-line text associated with the element is
positioned within its box.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">justify</b>, which itself defaults to
<b class="const">left</b>.
The legal values are <b class="const">left</b>, <b class="const">right</b>, and <b class="const">center</b>.</p></dd>
<dt><b class="cmd">noturn</b></dt>
<dd><p>Specifies that the direction of <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element at its end is not
propagated to the layout management.
If not specified the direction of the line becomes the new direction
the layout.</p></dd>
<dt><b class="cmd">smooth</b></dt>
<dd><p>Specifies the use of bezier splines for the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element.
If not specified lines are drawn exactly through the specified
waypoints, without any smooth curves.</p></dd>
<dt><b class="cmd">stroke</b> <i class="arg">width</i></dt>
<dd><p><img alt="figure-20-style-stroke" src="../../../../image/figure-20-style-stroke.png">
Specifies the width of the lines drawn for the the element, in pixels.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linewidth</b>, which itself defaults to <b class="const">1</b>.</p></dd>
<dt><b class="cmd">style</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-18-style-dash" src="../../../../image/figure-18-style-dash.png">
Specifies the style used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linestyle</b>, which itself defaults to
<b class="const">solid</b> lines.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetDash.htm">Tk_GetDash</a>,
and additionally all which are listed below:</p>
<dl class="doctools_definitions">
<dt><b class="const">solid</b>, empty string</dt>
<dd><p>Draw solid line.</p></dd>
<dt><b class="const">dash</b>, <b class="const">dashed</b>, <b class="const">-</b></dt>
<dd><p>Draw a dashed line.</p></dd>
<dt><b class="const">dot</b>, <b class="const">dotted</b>, <b class="const">.</b></dt>
<dd><p>Draw a dotted line.</p></dd>
<dt><b class="const">dash-dot</b>, <b class="const">-.</b></dt>
<dd><p>Draw a dash-dotted line</p></dd>
<dt><b class="const">dash-dot-dot</b>, <b class="const">-..</b></dt>
<dd><p>Draw a dash-dot-dotted line.</p></dd>
</dl>
<p>Note that the values &quot;solid&quot;, &quot;dot(ted)&quot;, &quot;dash(ed)&quot;, &quot;dash-dot&quot;, and
&quot;dash-dot-dot&quot; are all accepted as shorthands for the <b class="cmd">style</b>
command using them as argument.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key21">text</a></b> <i class="arg">string</i></dt>
<dd><p>Specifies the text to associate with the element.
Defaults to nothing.
When specified multiple times the actually shown text is the
concatenation of the individual strings, vertically stacked, with the
first string specified being the topmost element.</p></dd>
<dt><b class="cmd">textcolor</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the color used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textcolor</b>, which itself defaults to
<b class="const">black</b>.</p></dd>
<dt><b class="cmd">textfont</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the font used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textfont</b>, which itself defaults to
<b class="const">Helvetica 12pt</b>.</p></dd>
<dt><b class="cmd">then</b> <i class="arg">location</i></dt>
<dd></dd>
<dt><b class="cmd">then</b> (&lt;direction&gt; <span class="opt">?<i class="arg">length</i>?</span>)...</dt>
<dd></dd>
<dt>(&lt;direction&gt; <span class="opt">?<i class="arg">length</i>?</span>)...</dt>
<dd><p>This attribute specifies an intermediate location the <b class="cmd"><a href="../../../../index.html#key77">line</a></b>
element has to go through.
It can be specified multiple times, with each use adding one
additional location to the series which the line will go
through. These location will be traversed in the order they were
specified.</p>
<p>The location can be given explicitly, or as a series of directions
with distances. In the latter case the names of all known directions
are accepted for the direction part.
If no distance is specified for a direction the system falls back to
the value taken from the language variable <b class="variable">movelength</b>, which
itself defaults to the pixel equivalent of <b class="const">2 cm</b>.
The whole set of direction,distance pairs is treated as a series of
translations which are added up to provide the final translation
specifying the intermediate point (relative to the preceding point).</p>
<p>The last named direction is propagated to the layout system as the
direction to follow. The use of <b class="cmd">noturn</b> is not able to overide
this behaviour.</p>
<p>At last, the names of the registered directions also serve as
attribute commands, with an implicit attribute <b class="cmd">then</b> in front of
them.</p>
<p>If no intermediate or last location is specified for the line the
system falls back to a point <b class="variable">movelength</b> pixels away from the
starting location, in the current direction as maintained by the
layouting system</p></dd>
<dt><b class="cmd">to</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location where the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element ends.
This attribute has no default. The default is handled by the attribute
<b class="cmd">then</b>, which makes it appear as if <b class="cmd">to</b> has a default when
not specified.</p></dd>
<dt><b class="cmd">with</b> <i class="arg">corner</i></dt>
<dd><p><b class="cmd"><a href="../../../../index.html#key77">Line</a></b> elements are normally positioned absolutely, using the
locations specified through the attributes <b class="cmd">from</b>, <b class="cmd">then</b>, and
<b class="cmd">to</b>.
If <b class="cmd">at</b> is specified however then these positions are translated a
last time, moving the line's corner named by the attribute <b class="cmd">with</b>
to the location given by this attribute.
This means that <i class="arg">with</i> is effective if and only if the attribute
<b class="cmd">at</b> was specified as well for the line.</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd"><a href="../../../../index.html#key85">move</a></b> <i class="arg">attr</i></a></dt>
<dd><p>An open element with the corresponding corners, i.e. &quot;start&quot;, &quot;end&quot;,
and &quot;center&quot;.
A <b class="cmd"><a href="../../../../index.html#key85">move</a></b> element is in essence an invisible <b class="cmd"><a href="../../../../index.html#key77">line</a></b>.
While the main effect we are interested in is the change it makes to
the layout system, it is an actual element, i.e. it has the same
corners as an ordinary line, and shows up in the history as well,
allowing future references to all the places it touched.
It handles the same attibutes as <b class="cmd"><a href="../../../../index.html#key77">line</a></b> elements.</p></dd>
<dt><a name="25"><b class="cmd"><a href="../../../../index.html#key70">spline</a></b> <i class="arg">attr</i>...</a></dt>
<dd><p><img alt="figure-02-spline" src="../../../../image/figure-02-spline.png">
An alias for the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element (see above), with the attribute
<b class="cmd">smooth</b> preset.</p></dd>
<dt><a name="26"><b class="cmd"><a href="../../../../index.html#key21">text</a></b> <i class="arg">attr</i>...</a></dt>
<dd><p><img alt="figure-02-text" src="../../../../image/figure-02-text.png">
A closed element with the corresponding corners, i.e. the eight
directions of the compass rose, and &quot;center&quot;.
It handles the attributes</p>
<dl class="doctools_definitions">
<dt><b class="cmd">anchor</b> <i class="arg">name</i></dt>
<dd></dd>
<dt><b class="cmd">ljust</b></dt>
<dd></dd>
<dt><b class="cmd">rjust</b></dt>
<dd></dd>
<dt><b class="cmd">above</b></dt>
<dd></dd>
<dt><b class="cmd">below</b></dt>
<dd><p><img alt="figure-22-text-anchoring-3" src="../../../../image/figure-22-text-anchoring-3.png">
Specifies the anchor of the text which is to be placed at the
element's center, by name. I.e. this attribute defines the text's
position relative to the element's center.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">anchor</b>, which itself defaults to
<b class="const">center</b>.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetAnchor.htm">Tk_GetAnchor</a>.
The commands without arguments are all shorthands with the anchor
implied. Note that they do not combine, only the last is used. For
comined directions the main attribute command, <b class="cmd">anchor</b> has to be
used.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ljust</b></dt>
<dd><p>&quot;anchor west&quot;</p></dd>
<dt><b class="cmd">rjust</b></dt>
<dd><p>&quot;anchor east&quot;</p></dd>
<dt><b class="cmd">above</b></dt>
<dd><p>&quot;anchor south&quot;</p></dd>
<dt><b class="cmd">below</b></dt>
<dd><p>&quot;anchor north&quot;</p></dd>
</dl></dd>
<dt><b class="cmd">at</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location of the element's corner named by the attribute
<b class="cmd">with</b>.
Defaults to the current location as maintained by the layouting
system.</p></dd>
<dt><b class="cmd">height</b> <i class="arg">length</i></dt>
<dd><p>Specifies the height of the <b class="cmd"><a href="../../../../index.html#key21">text</a></b> element.
Defaults to the natural height of its text.</p></dd>
<dt><b class="cmd">justify</b> <b class="const">left</b>|<b class="const">center</b>|<b class="const">right</b></dt>
<dd><p>Specifies how multi-line text associated with the element is
positioned within its box.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">justify</b>, which itself defaults to
<b class="const">left</b>.
The legal values are <b class="const">left</b>, <b class="const">right</b>, and <b class="const">center</b>.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key21">text</a></b> <i class="arg">string</i></dt>
<dd><p>Specifies the text to associate with the element.
Defaults to nothing.
When specified multiple times the actually shown text is the
concatenation of the individual strings, vertically stacked, with the
first string specified being the topmost element.</p></dd>
<dt><b class="cmd">textcolor</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the color used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textcolor</b>, which itself defaults to
<b class="const">black</b>.</p></dd>
<dt><b class="cmd">textfont</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the font used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textfont</b>, which itself defaults to
<b class="const">Helvetica 12pt</b>.</p></dd>
<dt><b class="cmd">width</b> <i class="arg">length</i></dt>
<dd><p>Specifies the width of the <b class="cmd"><a href="../../../../index.html#key21">text</a></b> element.
Defaults to the natural width of its text.</p></dd>
<dt><b class="cmd">with</b> <i class="arg">corner</i></dt>
<dd><p>Specifies the corner of the element to place at the location given by
the attribute <b class="cmd">at</b>.
Defaults to the current corner as maintained by the layouting system,
except if the value for <b class="cmd">at</b> was specified by the user. In that
case it defaults to <b class="const">center</b>.</p></dd>
</dl></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Attributes</a></h3>
<p>The set of all attributes supported by all the element commands is
shown below.
While we speak of them as commands, and provide a syntax, they are not
truly available as actual commands, but only as part of the arguments
for an element command.</p>
<p>Note that some of the attribute names are overloaded, i.e. have
multiple, different, definitions. During processing of attributes for
an element the actual definition used is chosen based on the type of
the element the processing is for.</p>
<p>Further, as a catch-all clause, any attribute which could not be
processed according to the definitions below will be treated as the
argument of an implicit <b class="cmd"><a href="../../../../index.html#key21">text</a></b> attribute.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">anchor</b> <i class="arg">name</i></dt>
<dd></dd>
<dt><b class="cmd">ljust</b></dt>
<dd></dd>
<dt><b class="cmd">rjust</b></dt>
<dd></dd>
<dt><b class="cmd">above</b></dt>
<dd></dd>
<dt><b class="cmd">below</b></dt>
<dd><p><img alt="figure-22-text-anchoring-3" src="../../../../image/figure-22-text-anchoring-3.png">
Specifies the anchor of the text which is to be placed at the
element's center, by name. I.e. this attribute defines the text's
position relative to the element's center.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">anchor</b>, which itself defaults to
<b class="const">center</b>.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetAnchor.htm">Tk_GetAnchor</a>.
The commands without arguments are all shorthands with the anchor
implied. Note that they do not combine, only the last is used. For
comined directions the main attribute command, <b class="cmd">anchor</b> has to be
used.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ljust</b></dt>
<dd><p>&quot;anchor west&quot;</p></dd>
<dt><b class="cmd">rjust</b></dt>
<dd><p>&quot;anchor east&quot;</p></dd>
<dt><b class="cmd">above</b></dt>
<dd><p>&quot;anchor south&quot;</p></dd>
<dt><b class="cmd">below</b></dt>
<dd><p>&quot;anchor north&quot;</p></dd>
</dl></dd>
<dt><b class="cmd">arrowhead</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-19-style-arrowheads" src="../../../../image/figure-19-style-arrowheads.png">
Specifies where to draw arrowheads on the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element, at the
beginning or end, at both ends, or none.
If not specified the system falls back to the value taken from the
language variable <b class="variable">arrowhead</b>, which itself defaults to
<b class="const">none</b>.
The legal values are</p>
<dl class="doctools_definitions">
<dt><b class="const">none</b>, <b class="const">-</b></dt>
<dd><p>Draw no arrowheads, at neither end of the line.</p></dd>
<dt><b class="const">start</b>, <b class="const">first</b>, <b class="const">&lt;-</b></dt>
<dd><p>Draw an arrowhead at the beginning of the line, but not at its end.</p></dd>
<dt><b class="const">end</b>, <b class="const">last</b>, <b class="const">-&gt;</b></dt>
<dd><p>Draw an arrowhead at the end of the line, but not at its beginning.</p></dd>
<dt><b class="const">both</b>, <b class="const">&lt;-&gt;</b></dt>
<dd><p>Draw arrowheads at both ends of the line.</p></dd>
</dl>
<p>Note that the values &quot;start&quot;, &quot;end&quot;, &quot;-&quot;, &quot;-&gt;&quot;, &quot;&lt;-&quot;, and &quot;&lt;-&gt;&quot; are
all accepted as shorthands for the <b class="cmd">arrowhead</b> command using them
as argument.</p></dd>
<dt><b class="cmd">aspect</b> <i class="arg">number</i></dt>
<dd><p>Specifies the aspect ratio, i.e ratio of width to height, of the
<b class="cmd"><a href="../../../../index.html#key82">diamond</a></b> element.
The manner in which a default is calculated when not specified also
depends on the specifications of the attributes <b class="cmd">width</b> and
<b class="cmd">height</b>, if any.</p>
<p>If both <b class="cmd">width</b>, and <b class="cmd">height</b> are specified then any
specification of <b class="cmd">aspect</b> is ignored, as it is implicitly defined
in the width and height as well, and this takes precedence. A missing
specification is ignored in that case well, i.e. no defaults are
required.</p>
<p>If the <b class="cmd">aspect</b> is specified, and one of the attributes
<b class="cmd">width</b> or <b class="cmd">height</b>, then the missing attribute is calculated
from the two which are specified. No defaults are required for these
cases either.</p>
<p>If only one of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">aspect</b>, the value taken
from the language variable <b class="variable">diamondaspect</b>, which itselfs defaults
to <b class="const">2</b>.</p>
<p>If none of of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">width</b>, the value taken
from the language variable <b class="variable">boxwidth</b>, which itselfs defaults to
the pixel equivalent of <b class="const">2 cm</b>. For the aspect it uses either
the user-specified value or the default taken as described in the
previous paragraph.</p></dd>
<dt><b class="cmd">aspect</b> <i class="arg">number</i></dt>
<dd><p>Specifies the aspect ratio, i.e ratio of width to height, of the
ellipses which are used to draw the top and bottom of the <b class="cmd"><a href="../../../../index.html#key66">drum</a></b>
element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">drumaspect</b>, which itself defaults to
<b class="const">0.35</b>.</p></dd>
<dt><b class="cmd">at</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location of the element's corner named by the attribute
<b class="cmd">with</b>.
Defaults to the current location as maintained by the layouting
system.</p></dd>
<dt><b class="cmd">at</b> <i class="arg">location</i></dt>
<dd><p><b class="cmd"><a href="../../../../index.html#key77">Line</a></b> elements are normally positioned absolutely, using the
locations specified through the attributes <b class="cmd">from</b>, <b class="cmd">then</b>, and
<b class="cmd">to</b>.
If <b class="cmd">at</b> is specified however then these positions are translated a
last time, moving the line's corner named by the attribute <b class="cmd">with</b>
to the location given by this attribute.</p></dd>
<dt><b class="cmd">chop</b> <span class="opt">?<i class="arg">length</i>?</span></dt>
<dd><p>Specifies the length of the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element to remove from the
beginning and/or end.
Defaults to nothing.
If specified once the chopping applies to both beginning and end of
the line.
If specified twice or more the last two specifications are used, and
applied to beginning and end of the line, in this order.
Whenever the attribute is specified without an explicit length, the
system falls back to the value taken from the language variable
<b class="variable">circleradius</b>, which itself defaults to the pixel equivalent of
<b class="const">1 cm</b></p></dd>
<dt><b class="cmd">clockwise</b></dt>
<dd></dd>
<dt><b class="cmd">cw</b></dt>
<dd><p>Specifies the direction of the <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> element, here going
clockwise.
The complementary attribute is <b class="cmd">counterclockwise</b>.
If not specified the system falls back to the value taken from the
language variable <b class="variable">clockwise</b>, which itself defaults to 
<b class="const">false</b>, for counter-clockwise direction.</p></dd>
<dt><b class="cmd">color</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linecolor</b>, which itself defaults to <b class="const">black</b>.</p></dd>
<dt><b class="cmd">counterclockwise</b></dt>
<dd></dd>
<dt><b class="cmd">ccw</b></dt>
<dd><p>Specifies the direction of the <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> element, here
counter-clockwise.
The complementary attribute is <b class="cmd">clockwise</b>.
If not specified the system falls back to the value taken from the
language variable <b class="variable">clockwise</b>, which itself defaults to 
<b class="const">false</b>, for counter-clockwise direction.</p></dd>
<dt><b class="cmd">diameter</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">diam</b> <i class="arg">length</i></dt>
<dd><p>Specifies the diameter of the <b class="cmd"><a href="../../../../index.html#key81">circle</a></b> element, as an alternative
way to specify its <b class="cmd">radius</b>.
Effective if and only if the radius was not specified. I.e. if both
diameter and radius are specified then the radius infomration has
precendence.
This attribute has no default, because the defaults are taken from the
radius.</p></dd>
<dt><b class="cmd">fillcolor</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-21-style-colors" src="../../../../image/figure-21-style-colors.png">
Specifies the color used to draw the inside of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">fillcolor</b>, which itself defaults to the empty
string, signaling &quot;no filling&quot;.</p></dd>
<dt><b class="cmd">from</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location where the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element begins.
Defaults to the current location as maintained by the layouting
system.</p></dd>
<dt><b class="cmd">from</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location where the <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> element begins.
Defaults to the current location as maintained by the layouting
system.</p></dd>
<dt><b class="cmd">height</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">ht</b> <i class="arg">length</i></dt>
<dd><p>Specifies the height of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">boxheight</b>, which itself defaults to the
pixel equivalent of <b class="const">2 cm</b>.</p></dd>
<dt><b class="cmd">height</b> <i class="arg">length</i></dt>
<dd><p>Specifies the height of the <b class="cmd"><a href="../../../../index.html#key82">diamond</a></b> element.
The manner in which a default is calculated when not specified also
depends on the specifications of the attributes <b class="cmd">aspect</b> and
<b class="cmd">width</b>, if any.</p>
<p>If both <b class="cmd">width</b>, and <b class="cmd">height</b> are specified then any
specification of <b class="cmd">aspect</b> is ignored, as it is implicitly defined
in the width and height as well, and this takes precedence. A missing
specification is ignored in that case well, i.e. no defaults are
required.</p>
<p>If the <b class="cmd">aspect</b> is specified, and one of the attributes
<b class="cmd">width</b> or <b class="cmd">height</b>, then the missing attribute is calculated
from the two which are specified. No defaults are required for these
cases either.</p>
<p>If only one of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">aspect</b>, the value taken
from the language variable <b class="variable">diamondaspect</b>, which itselfs defaults
to <b class="const">2</b>.</p>
<p>If none of of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">width</b>, the value taken
from the language variable <b class="variable">boxwidth</b>, which itselfs defaults to
the pixel equivalent of <b class="const">2 cm</b>. For the aspect it uses either
the user-specified value or the default taken as described in the
previous paragraph.</p></dd>
<dt><b class="cmd">height</b> <i class="arg">length</i></dt>
<dd><p>Specifies the height of the <b class="cmd"><a href="../../../../index.html#key21">text</a></b> element.
Defaults to the natural height of its text.</p></dd>
<dt><b class="cmd">justify</b> <b class="const">left</b>|<b class="const">center</b>|<b class="const">right</b></dt>
<dd><p>Specifies how multi-line text associated with the element is
positioned within its box.
The value is ignored if no text was specified for the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">justify</b>, which itself defaults to
<b class="const">left</b>.
The legal values are <b class="const">left</b>, <b class="const">right</b>, and <b class="const">center</b>.</p></dd>
<dt><b class="cmd">noturn</b></dt>
<dd><p>Specifies that the direction of <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element at its end is not
propagated to the layout management.
If not specified the direction of the line becomes the new direction
the layout.</p></dd>
<dt><b class="cmd">radius</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">rad</b> <i class="arg">length</i></dt>
<dd><p>Specifies the radius of the <b class="cmd"><a href="../../../../index.html#key81">circle</a></b> element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">circleradius</b>, which itself defaults to the
pixel equivalent of <b class="const">1 cm</b>.</p></dd>
<dt><b class="cmd">radius</b> <i class="arg">length</i></dt>
<dd><p>Specifies the radius of the <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> element, or rather, the radius
of the circle the shown arc is a part of.
If not specified the system falls back to the value taken from the
language variable <b class="variable">arcradius</b>, which itself defaults to the pixel
equivalent of <b class="const">1 cm</b>.</p></dd>
<dt><b class="cmd">slant</b> <i class="arg">angle</i></dt>
<dd><p>Specifies the angle by which the <b class="cmd"><a href="../../../../index.html#key67">box</a></b> element is slanted, in
degrees.
If not specified the system falls back to the value taken from the
language variable <b class="variable">slant</b>, which itself defaults to <b class="const">90</b>,
i.e. vertical, no slant.
0 degrees is slanting straight east, pointing to the right.
90 degrees is slanting to the north, pointing straight up.</p></dd>
<dt><b class="cmd">smooth</b></dt>
<dd><p>Specifies the use of bezier splines for the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element.
If not specified lines are drawn exactly through the specified
waypoints, without any smooth curves.</p></dd>
<dt><b class="cmd">stroke</b> <i class="arg">width</i></dt>
<dd><p><img alt="figure-20-style-stroke" src="../../../../image/figure-20-style-stroke.png">
Specifies the width of the lines drawn for the the element, in pixels.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linewidth</b>, which itself defaults to <b class="const">1</b>.</p></dd>
<dt><b class="cmd">style</b> <i class="arg">spec</i></dt>
<dd><p><img alt="figure-18-style-dash" src="../../../../image/figure-18-style-dash.png">
Specifies the style used to draw the lines of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">linestyle</b>, which itself defaults to
<b class="const">solid</b> lines.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetDash.htm">Tk_GetDash</a>,
and additionally all which are listed below:</p>
<dl class="doctools_definitions">
<dt><b class="const">solid</b>, empty string</dt>
<dd><p>Draw solid line.</p></dd>
<dt><b class="const">dash</b>, <b class="const">dashed</b>, <b class="const">-</b></dt>
<dd><p>Draw a dashed line.</p></dd>
<dt><b class="const">dot</b>, <b class="const">dotted</b>, <b class="const">.</b></dt>
<dd><p>Draw a dotted line.</p></dd>
<dt><b class="const">dash-dot</b>, <b class="const">-.</b></dt>
<dd><p>Draw a dash-dotted line</p></dd>
<dt><b class="const">dash-dot-dot</b>, <b class="const">-..</b></dt>
<dd><p>Draw a dash-dot-dotted line.</p></dd>
</dl>
<p>Note that the values &quot;solid&quot;, &quot;dot(ted)&quot;, &quot;dash(ed)&quot;, &quot;dash-dot&quot;, and
&quot;dash-dot-dot&quot; are all accepted as shorthands for the <b class="cmd">style</b>
command using them as argument.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key21">text</a></b> <i class="arg">string</i></dt>
<dd><p>Specifies the text to associate with the element.
Defaults to nothing.
When specified multiple times the actually shown text is the
concatenation of the individual strings, vertically stacked, with the
first string specified being the topmost element.</p></dd>
<dt><b class="cmd">textcolor</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the color used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textcolor</b>, which itself defaults to
<b class="const">black</b>.</p></dd>
<dt><b class="cmd">textfont</b> <i class="arg">spec</i></dt>
<dd><p>Specifies the font used to draw the text of an element with.
Ignored if there is no text.
If not specified the system falls back to the value taken from the
language variable <b class="variable">textfont</b>, which itself defaults to
<b class="const">Helvetica 12pt</b>.</p></dd>
<dt><b class="cmd">then</b> <i class="arg">location</i></dt>
<dd></dd>
<dt><b class="cmd">then</b> (&lt;direction&gt; <span class="opt">?<i class="arg">length</i>?</span>)...</dt>
<dd></dd>
<dt>(&lt;direction&gt; <span class="opt">?<i class="arg">length</i>?</span>)...</dt>
<dd><p>This attribute specifies an intermediate location the <b class="cmd"><a href="../../../../index.html#key77">line</a></b>
element has to go through.
It can be specified multiple times, with each use adding one
additional location to the series which the line will go
through. These location will be traversed in the order they were
specified.</p>
<p>The location can be given explicitly, or as a series of directions
with distances. In the latter case the names of all known directions
are accepted for the direction part.
If no distance is specified for a direction the system falls back to
the value taken from the language variable <b class="variable">movelength</b>, which
itself defaults to the pixel equivalent of <b class="const">2 cm</b>.
The whole set of direction,distance pairs is treated as a series of
translations which are added up to provide the final translation
specifying the intermediate point (relative to the preceding point).</p>
<p>The last named direction is propagated to the layout system as the
direction to follow. The use of <b class="cmd">noturn</b> is not able to overide
this behaviour.</p>
<p>At last, the names of the registered directions also serve as
attribute commands, with an implicit attribute <b class="cmd">then</b> in front of
them.</p>
<p>If no intermediate or last location is specified for the line the
system falls back to a point <b class="variable">movelength</b> pixels away from the
starting location, in the current direction as maintained by the
layouting system</p></dd>
<dt><b class="cmd">to</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location where the <b class="cmd"><a href="../../../../index.html#key77">line</a></b> element ends.
This attribute has no default. The default is handled by the attribute
<b class="cmd">then</b>, which makes it appear as if <b class="cmd">to</b> has a default when
not specified.</p></dd>
<dt><b class="cmd">to</b> <i class="arg">location</i></dt>
<dd><p>Specifies the location where the <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> element ends.
Defaults to a location such that a 90-degree arc is drawn in the
chosen direction, starting at <b class="cmd">from</b>.</p></dd>
<dt><b class="cmd">width</b> <i class="arg">length</i></dt>
<dd></dd>
<dt><b class="cmd">wid</b> <i class="arg">length</i></dt>
<dd><p>Specifies the width of the element.
If not specified the system falls back to the value taken from the
language variable <b class="variable">boxwidth</b>, which itself defaults to the pixel
equivalent of <b class="const">2 cm</b>.</p></dd>
<dt><b class="cmd">width</b> <i class="arg">length</i></dt>
<dd><p>Specifies the width of the <b class="cmd"><a href="../../../../index.html#key82">diamond</a></b> element.
The manner in which a default is calculated when not specified also
depends on the specifications of the attributes <b class="cmd">aspect</b> and
<b class="cmd">height</b>, if any.</p>
<p>If both <b class="cmd">width</b>, and <b class="cmd">height</b> are specified then any
specification of <b class="cmd">aspect</b> is ignored, as it is implicitly defined
in the width and height as well, and this takes precedence. A missing
specification is ignored in that case well, i.e. no defaults are
required.</p>
<p>If the <b class="cmd">aspect</b> is specified, and one of the attributes
<b class="cmd">width</b> or <b class="cmd">height</b>, then the missing attribute is calculated
from the two which are specified. No defaults are required for these
cases either.</p>
<p>If only one of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">aspect</b>, the value taken
from the language variable <b class="variable">diamondaspect</b>, which itselfs defaults
to <b class="const">2</b>.</p>
<p>If none of of the attributes <b class="cmd">width</b> or <b class="cmd">height</b> is specified
then the system uses a fallback for the <b class="cmd">width</b>, the value taken
from the language variable <b class="variable">boxwidth</b>, which itselfs defaults to
the pixel equivalent of <b class="const">2 cm</b>. For the aspect it uses either
the user-specified value or the default taken as described in the
previous paragraph.</p></dd>
<dt><b class="cmd">width</b> <i class="arg">length</i></dt>
<dd><p>Specifies the width of the <b class="cmd"><a href="../../../../index.html#key21">text</a></b> element.
Defaults to the natural width of its text.</p></dd>
<dt><b class="cmd">with</b> <i class="arg">corner</i></dt>
<dd><p>Specifies the corner of the element to place at the location given by
the attribute <b class="cmd">at</b>.
Defaults to the current corner as maintained by the layouting system,
except if the value for <b class="cmd">at</b> was specified by the user. In that
case it defaults to <b class="const">center</b>.</p></dd>
<dt><b class="cmd">with</b> <i class="arg">corner</i></dt>
<dd><p><b class="cmd"><a href="../../../../index.html#key77">Line</a></b> elements are normally positioned absolutely, using the
locations specified through the attributes <b class="cmd">from</b>, <b class="cmd">then</b>, and
<b class="cmd">to</b>.
If <b class="cmd">at</b> is specified however then these positions are translated a
last time, moving the line's corner named by the attribute <b class="cmd">with</b>
to the location given by this attribute.
This means that <i class="arg">with</i> is effective if and only if the attribute
<b class="cmd">at</b> was specified as well for the line.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Corners</a></h3>
<p>Corners are named values for in elements, usually locations.</p>
<ul class="doctools_itemized">
<li><p>The <i class="term">closed</i> elements define corners for the compass rose,
including the &quot;center&quot;, and their &quot;width&quot; and &quot;height&quot;.</p>
<p><img alt="figure-27-corners-closed" src="../../../../image/figure-27-corners-closed.png"></p></li>
<li><p><b class="cmd">block</b> elements additionally export all variables which were set
during their definition as corners.</p></li>
<li><p>The <i class="term">open</i> elements on the other hand define &quot;start&quot;, &quot;end&quot;, and
&quot;center&quot;. The first two map to the locations originally provided
through the attributes <b class="cmd">from</b> and <b class="cmd">to</b> of the element.</p>
<p><img alt="figure-28-corners-open" src="../../../../image/figure-28-corners-open.png"></p></li>
<li><p>The center of <b class="cmd"><a href="../../../../index.html#key77">line</a></b> and <b class="cmd"><a href="../../../../index.html#key85">move</a></b> elements is the location
halfway between &quot;start&quot; and &quot;end&quot; corners, this is regardless of any
intermediate locations the element may have.</p></li>
<li><p>The <b class="cmd"><a href="../../../../index.html#key77">line</a></b> and <b class="cmd"><a href="../../../../index.html#key85">move</a></b> elements additionally name all their
locations as corners using numbers as names, starting from <b class="const">1</b>
(equivalent to &quot;start&quot;), in order of traversal.</p>
<p><img alt="figure-15-spline-1" src="../../../../image/figure-15-spline-1.png"></p></li>
<li><p>The center of <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> elements is the center of the circle the arc
is part off.</p></li>
<li><p>The <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> elements additionally define the compass rose of
closed elements as well.</p></li>
</ul>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Named directions</a></h3>
<p>The named directions are commands which tell the layout system in
which direction to go when placing the next element without an
explicit position specification.
They can also be used as arguments to the attribute <b class="cmd">then</b>, and
the command <b class="cmd">by</b> for relative points, see there for the relevant
syntax.</p>
<p>The diagram core defines the directions of the compass rose, plus a
number of aliases. See below for the full list.</p>
<p><img alt="figure-27-corners-closed" src="../../../../image/figure-27-corners-closed.png"></p>
<p>This overlaps with the pre-defined corners for closed elements. This
is used by the layout system, when are going in direction X the name
of the opposite direction is the name of the corner at which the new
element will be attached to the current position, and if this corner
does not exist the nearest actual corner by angle is used.</p>
<dl class="doctools_definitions">
<dt><a name="27"><b class="cmd">west</b></a></dt>
<dd></dd>
<dt><a name="28"><b class="cmd">w</b></a></dt>
<dd></dd>
<dt><a name="29"><b class="cmd">left</b></a></dt>
<dd></dd>
<dt><a name="30"><b class="cmd">l</b></a></dt>
<dd></dd>
<dt><a name="31"><b class="cmd">south</b></a></dt>
<dd></dd>
<dt><a name="32"><b class="cmd">s</b></a></dt>
<dd></dd>
<dt><a name="33"><b class="cmd">down</b></a></dt>
<dd></dd>
<dt><a name="34"><b class="cmd">bottom</b></a></dt>
<dd></dd>
<dt><a name="35"><b class="cmd">bot</b></a></dt>
<dd></dd>
<dt><a name="36"><b class="cmd">b</b></a></dt>
<dd></dd>
<dt><a name="37"><b class="cmd">east</b></a></dt>
<dd></dd>
<dt><a name="38"><b class="cmd">e</b></a></dt>
<dd></dd>
<dt><a name="39"><b class="cmd">right</b></a></dt>
<dd></dd>
<dt><a name="40"><b class="cmd">r</b></a></dt>
<dd></dd>
<dt><a name="41"><b class="cmd">north</b></a></dt>
<dd></dd>
<dt><a name="42"><b class="cmd">n</b></a></dt>
<dd></dd>
<dt><a name="43"><b class="cmd">up</b></a></dt>
<dd></dd>
<dt><a name="44"><b class="cmd">top</b></a></dt>
<dd></dd>
<dt><a name="45"><b class="cmd">t</b></a></dt>
<dd></dd>
<dt><a name="46"><b class="cmd">northwest</b></a></dt>
<dd></dd>
<dt><a name="47"><b class="cmd">nw</b></a></dt>
<dd></dd>
<dt><a name="48"><b class="cmd">up-left</b></a></dt>
<dd></dd>
<dt><a name="49"><b class="cmd">upleft</b></a></dt>
<dd></dd>
<dt><a name="50"><b class="cmd">leftup</b></a></dt>
<dd></dd>
<dt><a name="51"><b class="cmd">northeast</b></a></dt>
<dd></dd>
<dt><a name="52"><b class="cmd">ne</b></a></dt>
<dd></dd>
<dt><a name="53"><b class="cmd">up-right</b></a></dt>
<dd></dd>
<dt><a name="54"><b class="cmd">upright</b></a></dt>
<dd></dd>
<dt><a name="55"><b class="cmd">rightup</b></a></dt>
<dd></dd>
<dt><a name="56"><b class="cmd">southwest</b></a></dt>
<dd></dd>
<dt><a name="57"><b class="cmd">sw</b></a></dt>
<dd></dd>
<dt><a name="58"><b class="cmd">down-left</b></a></dt>
<dd></dd>
<dt><a name="59"><b class="cmd">downleft</b></a></dt>
<dd></dd>
<dt><a name="60"><b class="cmd">leftdown</b></a></dt>
<dd></dd>
<dt><a name="61"><b class="cmd">southeast</b></a></dt>
<dd></dd>
<dt><a name="62"><b class="cmd">se</b></a></dt>
<dd></dd>
<dt><a name="63"><b class="cmd">down-right</b></a></dt>
<dd></dd>
<dt><a name="64"><b class="cmd">downright</b></a></dt>
<dd></dd>
<dt><a name="65"><b class="cmd">rightdown</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Miscellaneous Commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="66"><i class="arg">number</i> <b class="const">cm</b></a></dt>
<dd></dd>
<dt><a name="67"><i class="arg">number</i> <b class="const">mm</b></a></dt>
<dd></dd>
<dt><a name="68"><i class="arg">number</i> <b class="const">inch</b></a></dt>
<dd></dd>
<dt><a name="69"><i class="arg">number</i> <b class="const">pt</b></a></dt>
<dd><p>These commands allow the specification of distances and coordinates in
metric and imperial units, returning the equivalent distance or
coordinate in pixels, which is the unit used internally for all
calculations.</p>
<p>The conversion factors are based on the result of <b class="cmd">tk scaling</b>
and are computed once, at the time the package is sourced, future
changes of the <b class="cmd">tk scaling</b> factor have no effect.</p></dd>
<dt><a name="70"><i class="arg">number</i> <i class="arg">number</i></a></dt>
<dd><p><img alt="figure-50-point-cons-absolute" src="../../../../image/figure-50-point-cons-absolute.png"></p>
<p>This command takes the x and y coordinates of a location and returns
the <i class="term">absolute</i> point for it.</p></dd>
<dt><a name="71"><b class="cmd">by</b> <i class="arg">distance</i> <i class="arg">direction</i></a></dt>
<dd><p><img alt="figure-51-point-cons-relative" src="../../../../image/figure-51-point-cons-relative.png"></p>
<p>This command takes a <i class="arg">distance</i> and <i class="arg">direction</i> (angle in
degress, or registered direction name) and returns the <i class="term">relative</i>
point for it, i.e. the <i class="term">delta</i> or <i class="term">translation</i> it
represents.</p>
<p>Note also the (dis)similarities to the directional specifications for
the attribute <b class="cmd">then</b> of <b class="cmd"><a href="../../../../index.html#key77">line</a></b> and <b class="cmd"><a href="../../../../index.html#key85">move</a></b> elements.
Where we say here</p>
<pre class="doctools_example">by 50 east</pre>
<p>for the attribute we say</p>
<pre class="doctools_example">... then east 50 ...</pre>
<p>or just</p>
<pre class="doctools_example">... then east ...</pre>
</dd>
<dt><a name="72"><i class="arg">point1</i> <b class="cmd">+</b> <i class="arg">point2</i></a></dt>
<dd><p><img alt="figure-48-point-vectoradd" src="../../../../image/figure-48-point-vectoradd.png"></p>
<p>This command interprets two points as vectors and adds them together.
If at least one of the points is <i class="term">absolute</i> the result is
absolute as well.
The result is a <i class="term">relative</i> point if and only if both points are
<i class="term">relative</i>.</p></dd>
<dt><a name="73"><i class="arg">point1</i> <b class="cmd">-</b> <i class="arg">point2</i></a></dt>
<dd><p><img alt="figure-49-point-vectorsub" src="../../../../image/figure-49-point-vectorsub.png"></p>
<p>This command interprets two points as vectors and subtracts the second
from the first.
If at least one of the points is <i class="term">absolute</i> the result is
absolute as well.
The result is a <i class="term">relative</i> point if and only if both points are
<i class="term">relative</i>.</p></dd>
<dt><a name="74"><i class="arg">point</i> <b class="cmd">by</b> <i class="arg">distance</i> <i class="arg">direction</i></a></dt>
<dd><p>This command is a more convenient, or at least shorter, form of</p>
<pre class="doctools_example">
    [$point + [by $distance $direction]]
</pre>
</dd>
<dt><a name="75"><i class="arg">point1</i> <b class="cmd">|</b> <i class="arg">point2</i></a></dt>
<dd><p><img alt="figure-31-point-projection" src="../../../../image/figure-31-point-projection.png"></p>
<p>This command calculates the <i class="term">projection</i> of two points, i.e. the
result is the point having the x-coordinate of <i class="arg">point1</i> and the
y-coordinate of <i class="arg">point2</i>.</p></dd>
<dt><a name="76"><i class="arg">n</i> <b class="cmd">between</b> <i class="arg">poin1</i> <i class="arg">point2</i></a></dt>
<dd><p><img alt="figure-29-point-interpolation-1" src="../../../../image/figure-29-point-interpolation-1.png"></p>
<p>This command computes the point which is <i class="arg">n</i>*100 percent of the
way between <i class="arg">point1</i> and <i class="arg">point2</i>, and returns it as its
result.
This means that for</p>
<dl class="doctools_definitions">
<dt><i class="arg">n</i> == 0</dt>
<dd><p>The result is <i class="arg">point1</i>.</p></dd>
<dt><i class="arg">n</i> == 1</dt>
<dd><p>The result is <i class="arg">point2</i>.</p></dd>
<dt><i class="arg">n</i> == 0.5</dt>
<dd><p>The result is half way between the two points.</p></dd>
</dl>
<p>etc.
<em>Note</em> that it is allowed to use values &lt; 0 and &gt; 1 for <i class="arg">n</i></p></dd>
<dt><a name="77"><b class="cmd">intersect</b> <i class="arg">elem1</i> <i class="arg">elem2</i></a></dt>
<dd><p><img alt="figure-32-point-intersection" src="../../../../image/figure-32-point-intersection.png"></p>
<p>This command takes two <i class="term">open</i> elements, computes the lines going
through their &quot;start&quot;- and &quot;end&quot;-corners, and returns the point where
these two lines intersect.
The command throws an error if the lines do not intersect, or are
coincident.</p></dd>
<dt><a name="78"><i class="arg">element</i> <b class="cmd">names</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This command returns a list containing the names of all corners for
the <i class="arg">element</i>. If a pattern is specified then only the names
matching it (via <b class="cmd">string match</b> are returned. Otherwise all
names are returned (equivalent to a default pattern of <b class="const">*</b>).</p></dd>
<dt><a name="79"><i class="arg">element</i> <i class="arg">corner</i></a></dt>
<dd><p>This command returns the value for the <i class="arg">corner</i> of the
<i class="arg">element</i>.
This can be anything, including points and elements.</p></dd>
<dt><a name="80"><i class="arg">element</i> <i class="arg">corner1</i> <i class="arg">corner2</i>...</a></dt>
<dd><p>This is a convenience shorthand for</p>
<pre class="doctools_example">
[[[$elem $corner1] $corner2] ...]
</pre>
<p>assuming that the value for</p>
<pre class="doctools_example"> [$elem $corner1] </pre>
<p>, etc. is
again an element.</p></dd>
<dt><a name="81"><i class="arg">element</i> <span class="opt">?<i class="arg">corner1</i>... <span class="opt">?<b class="method">names</b> <span class="opt">?<i class="arg">pattern</i>?</span>?</span>]?</span></a></dt>
<dd><p>This is a convenience shorthand for</p>
<pre class="doctools_example">
[[[$elem $corner1] ...] names ?pattern?]
</pre>
<p>assuming that the value for</p>
<pre class="doctools_example"> [$elem $corner1] </pre>
<p>, etc. is
again an element.</p></dd>
<dt><a name="82"><b class="cmd"><b class="variable">n</b>th</b> <span class="opt">?<i class="arg">corner</i>?</span></a></dt>
<dd><p>This command asks the diagram history for the <b class="variable">n</b>th element
created, searching from the beginning of the history (counting from 1)
and returns it as its result.
If the <i class="arg">corner</i> is specified then the value for this corner is
returned instead.</p></dd>
<dt><a name="83"><b class="cmd"><b class="variable">n</b>th</b> <b class="cmd">last</b> <span class="opt">?<i class="arg">corner</i>?</span></a></dt>
<dd><p>This command asks the diagram history for the <b class="variable">n</b>th element
created, searching from the end of the history and returns it as its
result.
If the <i class="arg">corner</i> is specified then the value for this corner is
returned instead.</p></dd>
<dt><a name="84"><b class="cmd"><b class="variable">n</b>th</b> <i class="arg">shape</i> <span class="opt">?<i class="arg">corner</i>?</span></a></dt>
<dd><p>This command asks the diagram history for the <b class="variable">n</b>th element
created, of the given <i class="arg">shape</i>, searching from the beginning of the
history (counting from 1) and returns it as its result.
If the <i class="arg">corner</i> is specified then the value for this corner is
returned instead.</p></dd>
<dt><a name="85"><b class="cmd"><b class="variable">n</b>th</b> <b class="cmd">last</b> <i class="arg">shape</i> <span class="opt">?<i class="arg">corner</i>?</span></a></dt>
<dd><p>This command asks the diagram history for the <b class="variable">n</b>th element
created, of the given <i class="arg">shape</i>, searching from the end of the
history and returns it as its result.
If the <i class="arg">corner</i> is specified then the value for this corner is
returned instead.</p></dd>
<dt><a name="86"><b class="cmd">last</b> <span class="opt">?<i class="arg">corner</i>?</span></a></dt>
<dd></dd>
<dt><a name="87"><b class="cmd">last</b> <i class="arg">shape</i> <span class="opt">?<i class="arg">corner</i>?</span></a></dt>
<dd><p>Convenience commands mapping to &quot;<b class="cmd">1st last</b>&quot;
and &quot;<b class="cmd">1st last</b> <i class="arg">shape</i>&quot;.</p></dd>
<dt><a name="88"><b class="cmd">1st</b></a></dt>
<dd></dd>
<dt><a name="89"><b class="cmd">2nd</b></a></dt>
<dd></dd>
<dt><a name="90"><b class="cmd">3rd</b></a></dt>
<dd><p>Aliases for <b class="cmd">1th</b>, <b class="cmd">2th</b>, and <b class="cmd">3th</b>, for readability,
usable whereever <b class="cmd"><b class="variable">n</b>th</b> can ocur.</p></dd>
</dl>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Variables</a></h3>
<p>The language context contains a number of predefined variables which
hold the default values for various attributes. These variables, their
uses, and values are:</p>
<dl class="doctools_definitions">
<dt><b class="variable">anchor</b></dt>
<dd><p>The default value for the attribute <b class="cmd">anchor</b>.
Initialized to <b class="const">center</b>.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetAnchor.htm">Tk_GetAnchor</a>.</p></dd>
<dt><b class="variable">arcradius</b></dt>
<dd><p>The default value for the attribute <b class="cmd">radius</b> of <b class="cmd"><a href="../../../../index.html#key76">arc</a></b>
elements.
Initialized to the pixel equivalent of <b class="const">1 cm</b>.</p></dd>
<dt><b class="variable">arrowhead</b></dt>
<dd><p>The default value for the attribute <b class="cmd">arrowhead</b>.
Initialized to <b class="const">none</b>.
The legal values are</p>
<dl class="doctools_definitions">
<dt><b class="const">none</b>, <b class="const">-</b></dt>
<dd><p>Draw no arrowheads, at neither end of the line.</p></dd>
<dt><b class="const">start</b>, <b class="const">first</b>, <b class="const">&lt;-</b></dt>
<dd><p>Draw an arrowhead at the beginning of the line, but not at its end.</p></dd>
<dt><b class="const">end</b>, <b class="const">last</b>, <b class="const">-&gt;</b></dt>
<dd><p>Draw an arrowhead at the end of the line, but not at its beginning.</p></dd>
<dt><b class="const">both</b>, <b class="const">&lt;-&gt;</b></dt>
<dd><p>Draw arrowheads at both ends of the line.</p></dd>
</dl></dd>
<dt><b class="variable">boxheight</b></dt>
<dd><p>The default value for the attribute <b class="cmd">height</b> of <b class="cmd"><a href="../../../../index.html#key67">box</a></b>,
<b class="cmd"><a href="../../../../index.html#key82">diamond</a></b> and <b class="cmd"><a href="../../../../index.html#key84">ellipse</a></b> elements.
Initialized to the pixel equivalent of <b class="const">2 cm</b>.</p></dd>
<dt><b class="variable">boxwidth</b></dt>
<dd><p>The default value for the attribute <b class="cmd">width</b> of <b class="cmd"><a href="../../../../index.html#key67">box</a></b>,
<b class="cmd"><a href="../../../../index.html#key82">diamond</a></b> and <b class="cmd"><a href="../../../../index.html#key84">ellipse</a></b> elements.
Initialized to the pixel equivalent of <b class="const">2 cm</b>.</p></dd>
<dt><b class="variable">clockwise</b></dt>
<dd><p>The default value for the attributes <b class="cmd">clockwise</b> and
<b class="cmd">counterclockwise</b> of <b class="cmd"><a href="../../../../index.html#key76">arc</a></b> elements.
Initialized to <b class="const">False</b>, for counter-clockwise direction.</p></dd>
<dt><b class="variable">circleradius</b></dt>
<dd><p>The default value for the attribute <b class="cmd">radius</b> of <b class="cmd"><a href="../../../../index.html#key81">circle</a></b>
elements, and also the default for the attribute <b class="cmd">chop</b>, when
specified without an explicit length.
Initialized to the pixel equivalent of <b class="const">1 cm</b>.</p></dd>
<dt><b class="variable">drumaspect</b></dt>
<dd><p>The default value for the attribute <b class="cmd">aspect</b> of <b class="cmd"><a href="../../../../index.html#key66">drum</a></b>
elements.
Initialized to <b class="const">0.35</b>.</p></dd>
<dt><b class="variable">fillcolor</b></dt>
<dd><p>The default value for the attribute <b class="cmd">fillcolor</b> of all elements
which can be filled.
Initialized to the empty string, signaling that the element is not
filled.</p></dd>
<dt><b class="variable">justify</b></dt>
<dd><p>The default value for the attribute <b class="cmd">justify</b>.
Initialized to <b class="const">left</b>.
The legal values are <b class="const">left</b>, <b class="const">right</b>, and <b class="const">center</b>.</p></dd>
<dt><b class="variable">linecolor</b></dt>
<dd><p>The default value for the attribute <b class="cmd">color</b> of all elements having
to draw lines (all but <b class="cmd"><a href="../../../../index.html#key21">text</a></b>).
Initialized to <b class="const">black</b>.</p></dd>
<dt><b class="variable">linestyle</b></dt>
<dd><p>The default value for the attribute <b class="cmd">style</b> of all elements
having to draw some line.
Initialized to <b class="const">solid</b>.
The legal values are all those accepted by
<a href="http://www.tcl.tk/man/tcl8.5/TkLib/GetDash.htm">Tk_GetDash</a>,
and additionally all which are listed below:</p>
<dl class="doctools_definitions">
<dt><b class="const">solid</b>, empty string</dt>
<dd><p>Draw solid line.</p></dd>
<dt><b class="const">dash</b>, <b class="const">dashed</b>, <b class="const">-</b></dt>
<dd><p>Draw a dashed line.</p></dd>
<dt><b class="const">dot</b>, <b class="const">dotted</b>, <b class="const">.</b></dt>
<dd><p>Draw a dotted line.</p></dd>
<dt><b class="const">dash-dot</b>, <b class="const">-.</b></dt>
<dd><p>Draw a dash-dotted line</p></dd>
<dt><b class="const">dash-dot-dot</b>, <b class="const">-..</b></dt>
<dd><p>Draw a dash-dot-dotted line.</p></dd>
</dl></dd>
<dt><b class="variable">linewidth</b></dt>
<dd><p>The default value for the attribute <b class="cmd">stroke</b> of all elements
having to draw some line.
Initialized to <b class="const">1</b> (pixels).</p></dd>
<dt><b class="variable">movelength</b></dt>
<dd><p>The default value for the directional specification of intermediate
locations by the attribute <b class="cmd">then</b> of <b class="cmd"><a href="../../../../index.html#key77">line</a></b> and <b class="cmd"><a href="../../../../index.html#key85">move</a></b>
elements.
Initialized to the pixel equivalent of <b class="const">2 cm</b>.</p></dd>
<dt><b class="variable">slant</b></dt>
<dd><p>The default value for the attribute <b class="cmd">slant</b> of <b class="cmd"><a href="../../../../index.html#key67">box</a></b> elements.
Initialized to 90 degrees, i.e. slant straight up.</p></dd>
<dt><b class="variable">textcolor</b></dt>
<dd><p>The default value for the attribute <b class="cmd">textcolor</b> of all elements
having to draw some text.
Initialized to <b class="const">black</b>.</p></dd>
<dt><b class="variable">textfont</b></dt>
<dd><p>The default value for the attribute <b class="cmd">textfont</b> of all elements
having to draw some text.
Initialized to <b class="const">Helvetica 12pt</b>.</p></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Diagram Classes</a></h2>
<p>The intended audience of this section are developers wishing to work
on the internals of the diagram package.
Regular users of <b class="package">diagram</b> can skip this section without
missing anything.</p>
<p>The main information seen here is the figure below, showing the
hierarchy of the classes implementing diagram.</p>
<p><img alt="figure-00-dependencies" src="../../../../image/figure-00-dependencies.png"></p>
<p>At the bottom, all at the same level are the supporting packages like
<b class="package"><a href="../../../../index.html#key20">snit</a></b>, etc. These can all be found in Tcllib.</p>
<p>Above them is the set of diagram classes implementing the various
aspects of the system, i.e.:</p>
<dl class="doctools_definitions">
<dt><b class="class">diagram</b></dt>
<dd><p>The main class, that which is seen by the user.</p></dd>
<dt><b class="class">diagram::core</b></dt>
<dd><p>The core engine, itself distributed over four helper classes.</p></dd>
<dt><b class="class">diagram::basic</b></dt>
<dd><p>The implementation of the standard shapes, like box, circle, etc.,
based on the extension features of the core.</p></dd>
<dt><b class="class">diagram::element</b></dt>
<dd><p>Core support class, the database of created elements. It also keeps
the history, i.e. the order in which elements were created.</p></dd>
<dt><b class="class">diagram::attribute</b></dt>
<dd><p>Core support class, the generic handling of definition and processing
of attributes.</p></dd>
<dt><b class="class">diagram::direction</b></dt>
<dd><p>Core support class, the database of named directions.</p></dd>
<dt><b class="class">diagram::navigation</b></dt>
<dd><p>Core support class, the state of layout engine, i.e. current position
and directin, and operations on it.</p></dd>
<dt><b class="class">diagram::point</b></dt>
<dd><p>General support class handling various vector operations.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">References</a></h2>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>diagram</em> of the
<a href="http://core.tcl.tk/tklib/reportlist">Tklib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key80">2D geometry</a>, <a href="../../../../index.html#key76">arc</a>, <a href="../../../../index.html#key71">arrow</a>, <a href="../../../../index.html#key67">box</a>, <a href="../../../../index.html#key1">canvas</a>, <a href="../../../../index.html#key81">circle</a>, <a href="../../../../index.html#key83">diagram</a>, <a href="../../../../index.html#key82">diamond</a>, <a href="../../../../index.html#key75">drawing</a>, <a href="../../../../index.html#key66">drum</a>, <a href="../../../../index.html#key84">ellipse</a>, <a href="../../../../index.html#key56">image</a>, <a href="../../../../index.html#key78">interpolation</a>, <a href="../../../../index.html#key86">intersection</a>, <a href="../../../../index.html#key77">line</a>, <a href="../../../../index.html#key85">move</a>, <a href="../../../../index.html#key74">picture</a>, <a href="../../../../index.html#key73">plane geometry</a>, <a href="../../../../index.html#key79">plotting</a>, <a href="../../../../index.html#key68">point</a>, <a href="../../../../index.html#key72">raster image</a>, <a href="../../../../index.html#key70">spline</a>, <a href="../../../../index.html#key21">text</a>, <a href="../../../../index.html#key69">vector</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
</div></body></html>