1# Geometric shapes, symbols, line styles and fill patterns  commonly
2# used on maps and charts.
3#
4# There are no restrictions on the use of this file.  Feel free to
5# change the size, color or shape or legend description of the symbols
6# to suit your purposes.
7#
8# If you create additional symbols and would like to share them, please
9# e-mail a copy to <simoc@users.sourceforge.net> so that they can be added to
10# this file.
11#
12# On many computers, interpreting this large file takes more than one second.
13# If this is too long, copy only the definitions being used to a separate
14# file and interpret that file instead.
15#
16
17begin circleoutline
18	# Displays circle outline.
19	#
20	key "point", "Circle Outline"
21	linestyle 0.1
22	circle 0, 0, 2
23	closepath
24	stroke
25end
26
27begin equitriangle
28	# Displays equilateral triangle outline.
29	#
30	key "point", "Equi. Triangle"
31	linestyle 0.1
32	move -1, -0.866
33	draw 0, 0.866, 1, -0.866
34	closepath
35	stroke
36end
37
38begin squareoutline
39	# Displays square outline.
40	#
41	key "point", "Square Outline"
42	linestyle 0.1
43	box -1, -1, 1, 1
44	stroke
45end
46
47begin filledsquare
48	# Displays filled square.
49	#
50	key "point", "Filled Square"
51	linestyle 0.1
52	box -1, -1, 1, 1
53	fill
54end
55
56begin filledpentagon
57	# Displays filled 5-sided shape.
58	#
59	key "point", "pentagon1"
60	color "brown"
61	move -1, -1.376
62	local i
63	let i = 0
64	while i < 4
65	do
66		rdraw 2, 0
67		rotate 72
68		let i = i + 1
69	done
70	closepath
71	fill
72end
73
74begin filledhexagon
75	# Displays filled hexagon.
76	#
77	key "point", "Filled Hexagon"
78	linestyle 0.1
79	color "red"
80	hexagon 0, 0, 3
81	fill
82end
83
84begin octagonoutline
85	# Displays octagon outline.
86	#
87	key "point", "Octagon Outline"
88	linestyle 0.1
89	move -0.848, -0.848
90	local i
91	let i = 0
92	while i < 7
93	do
94		rdraw 1.656, 0
95		rotate 45
96		let i = i + 1
97	done
98	closepath
99	stroke
100end
101
102begin decagon1
103end
104
105begin x1
106	key "point", "x1"
107	linestyle 0.1
108	move 1, -1
109	draw -1, 1
110	move -1, -1
111	draw 1, 1
112	stroke
113end
114
115begin plus1
116	key "point", "plus1"
117	linestyle 0.1
118	move -1, 0
119	draw 1, 0
120	move 0, -1
121	draw 0, 1
122	stroke
123end
124
125begin sixpointstar
126	# Displays filled 6-pointed star.
127	#
128	key "point", "6 Point Star"
129	color "gold"
130	move -2, -1.732
131	draw 0, 1.732, 2, -1.732
132	closepath
133	fill
134
135	clearpath
136	move -2, 0.866
137	draw 2, 0.866, 0, -2.598
138	closepath
139	fill
140end
141
142begin fivepointstar
143	# Displays filled 5-pointed star.
144	#
145	key "point", "5 Point Star"
146	local i
147	let i = 0
148	color "red"
149	while i < 360
150	do
151		clearpath
152		move -0.8, 0
153		draw 0, 3, 0.8, 0
154		fill
155		rotate 72
156		let i = i + 72
157	done
158end
159
160begin arrowupoutline
161	# Displays outlined arrow pointing upwards.
162	#
163	key "point", "Arrow Up"
164	move -2, 0
165	draw 0, 2, 2, 0, 1, 0, 1, -2, -1, -2, -1, 0
166	closepath
167	color "grey90"
168	fill
169	color "blue"
170	linestyle 0.2
171	stroke
172end
173
174begin arrowdownoutline
175	key "point", "Arrow Down"
176	rotate 180
177	arrowupoutline
178end
179
180begin arrowleftoutline
181	key "point", "Arrow Left"
182	rotate 90
183	arrowupoutline
184end
185
186begin arrowrightoutline
187	key "point", "Arrow Right"
188	rotate -90
189	arrowupoutline
190end
191
192begin arrowupleftoutline
193	key "point", "Arrow Up Left"
194	rotate 45
195	arrowupoutline
196end
197
198begin shipwreck
199	key "point", "Shipwreck"
200	color "black"
201	linestyle 0.1
202
203	# Draw cross.
204	#
205	move 0, 0
206	draw -0.7, 1.4
207
208	rdraw 0.8, 0
209	rdraw -1.6, 0
210	move -0.7, 1.4
211	rdraw 0.4, 0.692
212	rdraw -0.8, -1.385
213	stroke
214
215	# Draw sunk ship.
216	#
217	clearpath
218	move -2, -1
219	draw 2, 1, 2, -1
220	closepath
221	fill
222end
223
224begin viewpoint
225	key "point", "Viewpoint"
226	color "green"
227	local i
228	let i = 0
229	while i < 12
230	do
231		# Draw rays out from center point.
232		#
233		clearpath
234		move 0.5, 0
235		draw 2, 0.15, 2.05, 0, 2, -0.15
236		closepath
237		fill
238		rotate 30
239		let i = i + 1
240	done
241end
242
243begin surveymarker
244	# Display a survey marker, like |X| |
245	#                               | |X|
246	#
247	key "point", "Survey Marker"
248	color "grey90"
249	linestyle 0.1
250	box -1, -1, 1, 1
251	fill
252	color "red"
253	stroke
254	clearpath
255	box -1, -1, 0, 0
256	box 0, 0, 1, 1
257	fill
258end
259
260begin trigstation
261	key "point", "Trig. Station"
262	color "red"
263	linestyle 0.1
264	move 0, 0
265	draw 0, 2
266	move -1, 1
267	draw 1, 1
268	stroke
269
270	clearpath
271	move 0, 0
272	draw 1.5, -1.5
273	draw -1.5, -1.5
274	closepath
275	fill
276end
277
278begin witchshat
279	key "point", "Witch's Hat"
280	color "orangered"
281	linestyle 0.2
282	move -1.7, 0
283	draw 1.7, 0
284	stroke
285
286	clearpath
287	move -1.4, 0
288	draw 0, 3.5
289	draw 1.4, 0
290	fill
291end
292
293begin oldmoon
294	key "point", "Old Moon"
295	circle 0, 0, 2
296	closepath
297	color "cyan"
298	fill
299
300	clearpath
301	move 0, -2
302	arc 1, 0, 0, 0, 2
303	arc -1, 2, 0, 0, -2
304	color "navyblue"
305	fill
306end
307
308begin newmoon
309	key "point", "New Moon"
310	circle 0, 0, 2
311	closepath
312	color "navyblue"
313	fill
314
315	clearpath
316	move 0, -2
317	arc -1, 0, 0, 0, 2
318	arc 1, -2, 0, 0, -2
319	color "cyan"
320	fill
321end
322
323begin trafficlights c
324	# Draw traffic lights, with either red, amber or green light
325	# showing.
326	#
327	key "point", "Traffic Lights", "green"
328	local y
329	color "black"
330	box -2, -4, 2, 4
331	fill
332
333	clearpath
334	circle 0, 0, 1
335	circle 0, 2.5, 1
336	circle 0, -2.5, 1
337	color "grey"
338	fill
339
340	# Calculate position for light to show.
341	#
342	if c eq "red"
343	then
344		let y = 2.5
345	elif c eq "amber"
346	then
347		let y = 0
348	elif c eq "green"
349	then
350		let y = -2.5
351	else
352		# Don't draw any light, just
353		# show a grey circle again.
354		#
355		let y = 0
356		let c = "grey"
357	endif
358	color c
359
360	clearpath
361	circle 0, y, 1
362	fill
363end
364
365begin quadrants title, q1, q2, q3, q4, qLabels
366	# Draws 4 quadrants, showing 4 levels of some attribute.
367	# Relative levels are shown.
368	#
369	key "point", "Quadrant Chart", "Location", 3, 4, 6, 3.3, 1
370	local maxValue, w
371	let maxValue = max(q1, q2)
372	let maxValue = max(maxValue, q3)
373	let maxValue = max(maxValue, q4)
374
375	# Show box in each quadrant, with size depending on value
376	# for that quadrant.
377	#
378	color "orangered"
379	box 0, 0, q2 / maxValue * 5, q2 / maxValue * 5
380	fill
381	clearpath
382	box 0, -q3 / maxValue * 5, q3 / maxValue * 5, 0
383	fill
384	clearpath
385	box -q4 / maxValue * 5, -q4 / maxValue * 5, 0, 0
386	fill
387	clearpath
388	box -q1 / maxValue * 5, 0, 0, q1 / maxValue * 5
389	fill
390
391	# Label quadrants, normally it is enough to show labels
392	# in legend and at each place it is drawn on the map.
393	#
394	color "black"
395	if qLabels == 1
396	then
397		font "Helvetica", 2.5
398		justify "left"
399
400		clearpath
401		move 1, 1
402		label "Q2"
403
404		clearpath
405		move 1, -2.5
406		label "Q3"
407
408		clearpath
409		move -4, -2.5
410		label "Q4"
411
412		clearpath
413		move -4, 1
414		label "Q1"
415	endif
416
417	# Draw black plus.
418	#
419	linestyle 0.1
420	clearpath
421	move -5.5, 0
422	draw 5.5, 0
423	move 0, -5.5
424	draw 0, 5.5
425	stroke
426
427	clearpath
428	justify "center"
429	color "grey90"
430	let w = stringwidth(title) + 1
431	box -w / 2, -8.5, w / 2, -5.5
432	fill
433	clearpath
434	color "black"
435	move 0, -8
436	label title
437end
438
439begin windname name
440	font "Helvetica-Bold", 3
441	justify "center"
442	move 0, -Mapyrus.screen.resolution.mm
443	move 0, Mapyrus.screen.resolution.mm
444	move Mapyrus.screen.resolution.mm, 0
445	move -Mapyrus.screen.resolution.mm, 0
446	color "white"
447	label name
448	clearpath
449	move 0, 0
450	color "black"
451	label name
452end
453
454begin windindicator bearing, strength, name
455	# Draw a line with feathered tail showing wind direction and strength.
456	#
457	key "point", "Wind from SW at force 1", 45, 1, ""
458	key "point", "Wind from SW at force 2", 45, 2, ""
459	key "point", "Wind from SW at force 3", 45, 3, ""
460	key "point", "Wind from SE at force 5", 315, 5, ""
461	local s, y
462
463	# Draw the label above or below the origin point
464	# so that it does not interfere with the wind indicator.
465	#
466	let s = cos(bearing) > 0 ? -5 : 2.5
467	move 0, s
468	windname name
469
470	rotate -bearing
471
472	clearpath
473	circle 0, 0, 1
474	move 0, 1
475	let y = 6
476	draw 0, y
477	while strength > 0
478	do
479		move 0, y
480		if strength == 1
481		then
482			rdraw 1.2, 0.35
483		else
484			rdraw 2.4, 0.7
485		endif
486		let y = y - 1
487		let strength = strength - 2
488	done
489
490	linestyle 1
491	color "white"
492	stroke
493	linestyle 0.2
494	color "black"
495	stroke
496end
497
498# Display histogram showing minimum and maximum temperatures for each
499# of the twelve months.
500#
501begin temperatureBar mint, maxt
502	box 0, mint / 5, 1, maxt / 5
503	fill
504end
505
506begin temperatureHistogram name, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12
507
508	key "point", "Temperature", "SYDNEY", 18.6, 18.7, 17.5, 14.6, 11.5, 9.2, 8.0, 8.9, 11.0, 13.5, 15.5, 17.4, 25.8, 25.7, 24.7, 22.3, 19.3, 16.8, 16.2, 17.7, 19.8, 22.0, 23.5, 25.1
509
510	# Make empty box to draw graph into.
511	#
512	color "white"
513	move -6, -3
514	draw -6, 8, 6, 8, 6, -3
515	fill
516	color "blue"
517	linestyle 0.1
518	stroke
519
520	# Draw lines and labels as a guide to temperature values.
521	#
522	move -6, 2
523	draw 6, 2
524	move -6, 4
525	draw 6, 4
526	move -6, 6
527	draw 6, 6
528	stroke
529	clearpath
530
531	font 'Helvetica-Bold', 2
532	justify "left"
533	move 6, 1
534	label "10"
535	clearpath
536	move 6, 3
537	label "20"
538	clearpath
539	move 6, 5
540	label "30\260C"
541
542	# Label city below the place where the graph goes.
543	#
544	clearpath
545	move -6, -3
546	draw -6, 0, 6, 0, 6, -3
547	fill
548	clearpath
549	move 0, -2
550	justify "centre"
551	colour "white"
552	label name
553
554	# Draw a bar for each month, between minimum and maximum values.
555	#
556	colour "red"
557	clearpath
558	move -6, 0
559	temperatureBar a1, b1
560
561	clearpath
562	move -5, 0
563	temperatureBar a2, b2
564
565	clearpath
566	move -4, 0
567	temperatureBar a3, b3
568
569	clearpath
570	move -3, 0
571	temperatureBar a4, b4
572
573	clearpath
574	move -2, 0
575	temperatureBar a5, b5
576
577	clearpath
578	move -1, 0
579	temperatureBar a6, b6
580
581	clearpath
582	move 0, 0
583	temperatureBar a7, b7
584
585	clearpath
586	move 1, 0
587	temperatureBar a8, b8
588
589	clearpath
590	move 2, 0
591	temperatureBar a9, b9
592
593	clearpath
594	move 3, 0
595	temperatureBar a10, b10
596
597	clearpath
598	move 4, 0
599	temperatureBar a11, b11
600
601	clearpath
602	move 5, 0
603	temperatureBar a12, b12
604end
605
606begin speechbubble message
607	# Draw a speech bubble containing a message at a point.
608	#
609	key "point", "Speech Bubble", "speech\nbubble"
610	local height, halfWidth
611
612	font "Helvetica", 3
613	justify "left, bottom"
614
615	# Find size of message.
616	#
617	let halfWidth = stringwidth(message) / 2
618	let height = stringheight(message)
619
620	# Draw box with rounded corners and small arrow.
621	#
622	move 0, 0
623	draw 0, 1
624	draw -halfWidth, 1
625	arc 1, -halfWidth, 2, -halfWidth - 1, 2
626	draw -halfWidth - 1, height
627	arc 1, -halfWidth, height, -halfWidth, height + 1
628	draw halfWidth, height + 1
629	arc 1, halfWidth, height, halfWidth + 1, height
630	draw halfWidth + 1, 2
631	arc 1, halfWidth, 2, halfWidth, 1
632	draw 1, 1
633	closepath
634	color "lightyellow"
635	fill
636	color "black"
637	linestyle 0.1
638	stroke
639
640	# Draw each line of message inside bubble.
641	#
642	clearpath
643	move -halfWidth, 1.5
644	label message
645end
646
647begin northarrow
648	# Displays simple north arrow.
649	#
650	linestyle 0.2, "round", "round"
651	color "black"
652	move 0, -4
653	draw 0, 4
654	draw -2, 2
655
656	move 0, 4
657	draw 2, 2
658	stroke
659
660	clearpath
661	move 0, 5
662	font "Helvetica-Bold", 3
663	justify "center"
664	label "N"
665end
666
667begin nsew_arrow direction
668	# One direction of north arrow.
669	#
670	color "black"
671	move 0, 0
672	draw 1.5, 1.5, 0, 6
673	closepath
674	fill
675
676	clearpath
677	color "white"
678	move 0, 0
679	draw -1.5, 1.5, 0, 6
680	closepath
681	fill
682	color "black"
683	stroke
684
685	clearpath
686	move 0, 8
687	rotate -Mapyrus.rotation
688	font "Times-Roman", 3
689	justify "center, middle"
690	label direction
691end
692
693begin nsew
694	# Displays fancy north arrow with labelled directions.
695	#
696	linestyle 0.1
697	move 0, 0
698	nsew_arrow "N"
699	rotate -90
700	nsew_arrow "E"
701	rotate -90
702	nsew_arrow "S"
703	rotate -90
704	nsew_arrow "W"
705end
706
707begin bordercrossing
708	key "point", "Border Crossing"
709	color "white"
710	linestyle 0.4
711	circle 0, 0, 1.5
712	closepath
713	fill
714	color "pink"
715	move -1.5, 0
716	draw 1.5, 0
717	stroke
718end
719
720begin crosshair
721	key "point", "Crosshair"
722	color "black"
723	linestyle 0.1
724	circle 0, 0, 2
725	move 0, -3
726	draw 0, 3
727	move -3, 0
728	draw 3, 0
729	stroke
730end
731
732begin lighthouse
733	key "point", "Lighthouse"
734	color "black"
735	linestyle 0.1
736	move -1.1, 0
737	draw 1.1, 0
738
739	box -0.7, 2.1, 0.7, 3
740
741	move 1.4, 2.3
742	draw 2.3, 2.1
743	move 1.4, 2.8
744	draw 2.3, 3
745
746	move -1.4, 2.3
747	draw -2.3, 2.1
748	move -1.4, 2.8
749	draw -2.3, 3
750	stroke
751
752	clearpath
753	move -0.7, 0
754	draw -0.7, 2.1, 0.7, 2.1, 0.7, 0
755	closepath
756	fill
757end
758
759#boatramp
760#airport
761
762begin information
763	key "point", "Information"
764	color "darkgreen"
765	circle 0, 0, 2
766	fill
767	clearpath
768	move -0.1, 0.6
769	color "white"
770	font "Courier-Italic", 4
771	justify "center, middle"
772	label "i"
773end
774
775begin sbahn
776	key "point", "S-Bahn Station"
777	color "green"
778	circle 0, 0, 2
779	fill
780	clearpath
781	move -0.1, 0.6
782	color "white"
783	font "Helvetica-Bold", 4
784	justify "center, middle"
785	label "S"
786end
787
788begin ubahn
789	key "point", "U-bahn Station"
790	color "blue"
791	box -2, -2, 2, 2
792	fill
793	clearpath
794	move -0.1, 0.6
795	color "white"
796	font "Helvetica-Bold", 4
797	justify "center, middle"
798	label "U"
799end
800
801begin parking
802	key "point", "Parking"
803	color "dodgerblue"
804	box -2, -2, 2, 2
805	fill
806	clearpath
807	move -0.1, 0.5
808	color "white"
809	font "Helvetica-Bold", 4
810	justify "center, middle"
811	label "P"
812end
813
814begin coveredparking
815	key "point", "Covered Parking"
816	color "dodgerblue"
817	box -2, -2, 2, 3
818	fill
819	clearpath
820	move -0.1, 0.5
821	color "white"
822	font "Helvetica-Bold", 4
823	justify "center, middle"
824	label "P"
825	clearpath
826	linestyle 0.4
827	move -1.7, 1.7
828	draw 0, 2.6, 1.7, 1.7
829	stroke
830end
831
832begin cave
833	key "point", "Cave"
834	color "darkgray"
835	move -2, 0
836	draw -1.2, 0, -1.2, 2
837	arc 1, 0, 2, 1.2, 2
838	draw 1.2, 0, 1.4, 0
839	stroke
840	clearpath
841	box -1.2, 0, -0.7, 2.5
842	fill
843end
844
845begin flag
846	key "point", "Flag"
847	color "red"
848	box 0, 1.5, 2, 3
849	fill
850	clearpath
851	linestyle 0.2
852	move 0, 0
853	draw 0, 3
854	stroke
855end
856
857begin pennant
858	key "point", "Pennant"
859	color "limegreen"
860	move 0, 1.5
861	draw 2, 2.25, 0, 3
862	fill
863	clearpath
864	linestyle 0.2
865	move 0, 0
866	draw 0, 3
867	stroke
868end
869
870begin pinetree
871	key "point", "Tree"
872	color "forestgreen"
873	linestyle 0.1
874	move -1, 0
875	draw 1, 0
876	move 0, 0
877	draw 0, 1
878	stroke
879	clearpath
880	move -1, 1
881	draw 0, 3, 1, 1
882	closepath
883	fill
884end
885
886begin radiotower
887	key "point", "Radio Tower"
888	linestyle 0.1
889	circle 0, 0, 1
890	fill
891	clearpath
892	move 0.707, 0.707
893	rdraw 0.5, 1, -1, 0, 0.5, 1
894	stroke
895end
896
897begin church
898	key "point", "Church"
899	color "black"
900	linestyle 0.1
901	circle 0, 0, 1
902	fill
903	clearpath
904	move 0, 1
905	draw 0, 3
906	move -1, 2
907	draw 1, 2
908	stroke
909end
910
911begin hospital
912	key "point", "Hospital"
913	color "white"
914	linestyle 0.1
915	box -2, -2, 2, 2
916	fill
917	color "black"
918	stroke
919	color "red"
920	clearpath
921	box -1.5, -0.4, 1.5, 0.4
922	box -0.4, -1.5, 0.4, 1.5
923	fill
924end
925
926begin tent
927	key "point", "Camping"
928	linestyle 0.2
929	move -1.5, 0
930	draw 0, 2.8, 1.5, 0
931	closepath
932	color "white"
933	fill
934	color "maroon"
935	stroke
936	clearpath
937	box -0.5, 0, 0.5, 1
938	fill
939end
940
941begin hut
942	key "point", "Hut"
943	linestyle 0.1
944	color "maroon"
945	move -1.3, 0
946	draw 1.3, 0
947	box -1, 0, 1, 1.5
948	stroke
949	clearpath
950	move -1.3, 1.5
951	draw 0, 2.8, 1.3, 1.5
952	closepath
953	fill
954end
955
956begin fairground
957	key "point", "Fairground"
958	linestyle 0.1
959	color "orange"
960	move 0, 4
961	draw -2, 3.3, 0, 2.6
962	closepath
963	fill
964
965	color "red"
966	clearpath
967	box -1, 0, 1, 2
968	fill
969	clearpath
970	move 0, 2
971	draw 0, 4
972	stroke
973end
974
975begin factory
976	key "point", "Factory"
977	color "black"
978	move 0, 0
979	draw 2, 0, 2, 1.5, 1.2, 1.5, 0, 3, 0, 1.5, -1.2, 3, -1.2, 0
980	closepath
981	fill
982end
983
984begin school
985	key "point", "School"
986	color "white"
987	box -1, 0, 3, 3
988	fill
989	clearpath
990	color "crimson"
991	linestyle 0.1
992	box 0, 0, 3, 2
993	move 3, 2
994	draw 2.5, 3, -0.5, 3, -1, 2, -1, 0, 0, 0
995	move 0, 2
996	draw -0.5, 3
997	box 0.7, 0.7, 1.3, 1.4
998	box 1.8, 0.7, 2.4, 1.4
999	stroke
1000end
1001
1002begin postoffice
1003	key "point", "Post Office"
1004	linestyle 0.2
1005	color "lightyellow"
1006	box -2, 0, 2, 2
1007	fill
1008	color "darkgrey"
1009	move -2, 2
1010	draw 0, 0.8, 2, 2
1011	stroke
1012end
1013
1014begin library
1015	key "point", "Library"
1016	color "lightblue"
1017	linestyle 0.1
1018	move 0, 0
1019	draw 2, -0.5, 2, 2.5, 0, 3, -2, 2.5, -2, -0.5
1020	closepath
1021	fill
1022	color "black"
1023	stroke
1024	move 0, 0
1025	draw 0, 3
1026	move 0.5, 2
1027	draw 1.5, 1.8
1028	move 0.5, 1.2
1029	draw 1.5, 1
1030	stroke
1031end
1032
1033begin police
1034	key "point", "Police"
1035	box -1, 0, 2, 3
1036	color "white"
1037	fill
1038	color "blue"
1039	linestyle 0.1
1040	stroke
1041	clearpath
1042	box -1, 0, 0, 1
1043	box -1, 2, 0, 3
1044	box 0, 1, 1, 2
1045	box 1, 0, 2, 1
1046	box 1, 2, 2, 3
1047	fill
1048end
1049
1050begin cemetary
1051	key "point", "Cemetary"
1052	color "saddlebrown"
1053	clearpath
1054	box -0.5, -1, 0.5, 3
1055	fill
1056	clearpath
1057	box -1.7, 1.6, 1.7, 2.2
1058	fill
1059end
1060
1061begin waypoint
1062	key "point", "Waypoint"
1063	color "white"
1064	box -2, -2, 2, 2
1065	fill
1066	linestyle 0.1
1067	color "orange"
1068	stroke
1069	clearpath
1070	move -2, 2
1071	draw 2, -2, 2, 2
1072	fill
1073end
1074
1075begin capitalcity name
1076	local u, w
1077	key "point", "Capital City", "Ely"
1078	font "Helvetica-Bold", 4
1079	justify "center"
1080	let u = upper(name)
1081	let w = stringwidth(u)
1082	if not protected(-w / 2, 0, w / 2, 4)
1083	then
1084		protect -w / 2, 0, w / 2, 4
1085
1086		# Draw yellow box with black border behind name.
1087		#
1088		color "yellow"
1089		box -w / 2, 0, w / 2, 4
1090		fill
1091		color "black"
1092		linestyle 0.1
1093		stroke
1094		clearpath
1095		move 0, 0.5
1096		label u
1097	endif
1098end
1099
1100begin city name
1101	local w
1102	key "point", "City", "Ely"
1103	font "Helvetica-Bold", 4
1104	justify "center"
1105	let w = stringwidth(name)
1106	if not protected(-w / 2, 0, w / 2, 4)
1107	then
1108		protect -w / 2, 0, w / 2, 4
1109
1110		# Draw yellow box behind name.
1111		#
1112		color "yellow"
1113		box -w / 2, 0, w / 2, 4
1114		fill
1115		color "black"
1116		clearpath
1117		move 0, 0.5
1118		label name
1119	endif
1120end
1121
1122begin town name
1123	local w
1124	key "point", "Town", "Ely"
1125	font "Helvetica-Bold", 3
1126	justify "center"
1127	let w = stringwidth(name)
1128	if not protected(-w / 2, 0, w / 2, 3)
1129	then
1130		protect -w / 2, 0, w / 2, 3
1131
1132		# Draw yellow highlight around name.
1133		#
1134		color "yellow"
1135		move -0.3, 0.5
1136		move 0.3, 0.5
1137		move 0, 0.8
1138		move 0, 0.3
1139		label name
1140		clearpath
1141		color "black"
1142		move 0, 0.5
1143		label name
1144	endif
1145end
1146
1147begin emphasisedname name
1148	local w
1149	key "point", "Emphasised Name", "HOT"
1150	font "Helvetica-Bold", 3
1151	let w = stringwidth(name)
1152	if not protected(0, 0, w, 3)
1153	then
1154		protect 0, 0, w, 3
1155
1156		# Draw thick red underline under name.
1157		#
1158		color "red"
1159		linestyle 0.6
1160		move 0, 0
1161		draw w, 0
1162		stroke
1163
1164		clearpath
1165		color "black"
1166		move 0, 0.5
1167		label name
1168	endif
1169end
1170
1171begin streetname name
1172	local w
1173	key "point", "Street Name", "Sesame St"
1174	font "Helvetica-Bold", 2.5
1175	let w = stringwidth(name) + 1
1176
1177	# Do not draw labels that overlap existing labels.
1178	#
1179	if not protected(-w / 2, 0, w / 2, 4)
1180	then
1181		# Draw street name inside a box.
1182		#
1183		clearpath
1184		color "forestgreen"
1185		circle 0, 3, 1
1186		fill
1187
1188		clearpath
1189		box -w / 2, 0, w / 2, 3.3
1190		color "yellow"
1191		fill
1192		color "forestgreen"
1193		stroke
1194
1195		clearpath
1196		move 0, 0.5
1197		justify "center"
1198		color "black"
1199		label name
1200		protect -w / 2, 0, w / 2, 4
1201
1202	endif
1203end
1204
1205# LINEPATTERNS
1206
1207begin leftticks_tick
1208	move 0, 0
1209	draw 0, 0.6
1210	stroke
1211end
1212
1213begin Lleftticks
1214	# Display line with tick marks on lefthand-side.
1215	#
1216	key "line", "Left Ticks"
1217	color "red"
1218	linestyle 0.1
1219	stroke
1220	samplepath 3, 1.5
1221	leftticks_tick
1222end
1223
1224begin centerline_c
1225	# Display letter 'c' rotated to follow line.
1226	#
1227	font "Helvetica", 3
1228	justify "center, middle"
1229	move 0, 0.7
1230	label "c"
1231end
1232
1233begin Lcenterline
1234	# Display line with 'c' letters along it.
1235	#
1236	key "line", "Centerline"
1237	color "black"
1238	linestyle 0.2, "round", "round", 0, 4, 4
1239	stroke
1240	samplepath 8, 6
1241	centerline_c
1242end
1243
1244begin fence_tick
1245	move 0, -0.8
1246	draw 0, 0.8
1247	stroke
1248end
1249
1250begin Lfence
1251	# Display fence line: --|--|--
1252	#
1253	key "line", "Fence"
1254	color "forestgreen"
1255	linestyle 0.1, "round", "round", 0, 3, 2
1256	stroke
1257	samplepath 5, 4
1258	fence_tick
1259end
1260
1261begin bowtie
1262	linestyle 0.1
1263	move -1, -0.5
1264	draw 1, 0.5, 1, -0.5, -1, 0.5
1265	closepath
1266	stroke
1267end
1268
1269begin Lbowtie
1270	# Display line with bow-tie like symbols.
1271	#
1272	key "line", "Bow Ties"
1273	color "black"
1274	linestyle 0.1, "round", "round", 0, 4, 4
1275	stroke
1276	samplepath 8, 6
1277	bowtie
1278end
1279
1280begin motorway_label routeNumber
1281	local w
1282
1283	# Remove any rotation and force symbol to appear horizontally.
1284	#
1285	rotate -Mapyrus.rotation
1286	font "Helvetica", 3
1287	justify "center"
1288	let w = stringwidth(routeNumber) + 1
1289
1290	# Skip label if it overwrites an existing label.
1291	#
1292	if not protected(-w / 2, -1.5, w / 2, 1.5)
1293	then
1294		box -w / 2, -1.5, w / 2, 1.5
1295		color "white"
1296		fill
1297		color "black"
1298		linestyle 0.1
1299		stroke
1300		clearpath
1301		move 0, -1
1302		label routeNumber
1303		protect -w / 2, -1.5, w / 2, 1.5
1304	endif
1305end
1306
1307begin Lmotorway routeNumber
1308	# Display motorway with route number label at intervals.
1309	#
1310	key "line", "Motorway", "M25"
1311	color "red"
1312	linestyle 1, "round", "round"
1313	stroke
1314
1315	# Skip labels on short motorway segments.
1316	#
1317	if Mapyrus.path.length > 15
1318	then
1319		samplepath 20, 12
1320		motorway_label routeNumber
1321	endif
1322end
1323
1324begin border_dot
1325	color "black"
1326	circle 0, 0, 1
1327	fill
1328	clearpath
1329end
1330
1331begin Lborder
1332	# Display border.
1333	#
1334	key "line", "Border"
1335	color "black"
1336	linestyle 0.5, "round", "round"
1337	stroke
1338	if Mapyrus.path.length > 10
1339	then
1340		samplepath 20, 8
1341		border_dot
1342	endif
1343end
1344
1345begin Lrailway
1346	# Display railway line as alternating colors along line.
1347	#
1348	key "line", "Railway"
1349	color "black"
1350	linestyle 1, "butt", "bevel"
1351	stroke
1352	linestyle 1, "butt", "bevel", 2, 4, 4
1353	color "grey60"
1354	stroke
1355end
1356
1357begin powerline_v
1358	move -0.6, 1
1359	draw 0, 0
1360	draw 0.6, 1
1361	stroke
1362end
1363
1364begin Lpowerline
1365	# Display electricity power line as ___v___v_
1366	#
1367	key "line", "Power Line"
1368	color "black"
1369	linestyle 0.1
1370	stroke
1371	if Mapyrus.path.length > 10
1372	then
1373		samplepath 10, 8
1374		powerline_v
1375	endif
1376end
1377
1378begin Ldashdot
1379	# Displays a simple dash dot line --- . --- .
1380	#
1381	key "line", "Dash Dot Line"
1382	color "purple"
1383	linestyle 1, "butt", "bevel", 0, 8, 2, 1, 2
1384	stroke
1385end
1386
1387begin Lmulticolorline
1388	# Displays line twice with different, out of phase
1389	# linestyles to give appearance of alternating dashes
1390	# in different colors.
1391	#
1392	key "line", "Multi Color Line"
1393	color "red"
1394	linestyle 1, "butt", "bevel", 0, 4, 8
1395	stroke
1396	linestyle 1, "butt", "bevel", 6, 4, 8
1397	color "darkred"
1398	stroke
1399end
1400
1401begin Larrowline_head r
1402	# Draw arrowhead rotated to point at end of line.
1403	#
1404	rotate r
1405	move 1.2, 1.2
1406	draw 0, 0, 1.2, -1.2
1407	stroke
1408end
1409
1410begin Larrowline_start
1411	# Split path into points with large spacing so there will be
1412	# only one sample point at start of line.  Draw arrowhead there.
1413	#
1414	samplepath 99999, 0
1415	Larrowline_head 0
1416end
1417
1418begin Larrowline_end
1419	# Draw arrowhead at end of line.
1420	#
1421	samplepath -99999, 0
1422	Larrowline_head 180
1423end
1424
1425begin Larrowline
1426	# Displays line with arrows at either end.
1427	#
1428	key "line", "Arrow Line"
1429	color "olive"
1430	linestyle 0.1
1431	stroke
1432	Larrowline_start
1433	Larrowline_end
1434end
1435
1436begin Lsnakeline_segment
1437	# Display segments with alternating arcs to give wiggling effect.
1438	#
1439	move -2, 0
1440	arc -LsnakeY, 0, LsnakeY, 2, 0
1441	let LsnakeY = -LsnakeY
1442	stroke
1443end
1444
1445begin Lsnakeline
1446	# Displays wiggly snake that looks like a snake!
1447	#
1448	key "line", "Snake Line"
1449	color "forestgreen"
1450	linestyle 2, "round", "round"
1451	samplepath 4, 2
1452	let LsnakeY=1
1453	Lsnakeline_segment
1454end
1455
1456begin Linaccurateline_dot
1457	local y
1458	let y = random(1) - 0.5
1459	box -0.3, y - 0.3, 0.3, y + 0.3
1460	fill
1461end
1462
1463begin Linaccurateline
1464	# Displays dotted line that jumps up and down randomly that
1465	# shows that position of line is not accurate.
1466	#
1467	key "line", "Inaccurate Line"
1468	color "black"
1469	samplepath 1.2, 0.6
1470	Linaccurateline_dot
1471end
1472
1473# FILLPATTERNS
1474
1475begin hatch1
1476	key "box", "Hatch 1"
1477	color "red"
1478	linestyle 0.1
1479	stroke
1480	clip "inside"
1481	stripepath 2, 45
1482	stroke
1483end
1484
1485begin hatch2
1486	key "box", "Hatch 2"
1487	color "blue"
1488	linestyle 0.1
1489	stroke
1490	clip "inside"
1491	stripepath 2, -45
1492	stroke
1493end
1494
1495begin hatch3
1496	key "box", "Hatch 3"
1497	color "forestgreen"
1498	linestyle 0.1
1499	stroke
1500	clip "inside"
1501	stripepath 2, 0
1502	stroke
1503end
1504
1505begin hatch4
1506	key "box", "Hatch 4"
1507	color "black"
1508	linestyle 0.1
1509	stroke
1510	clip "inside"
1511	stripepath 2, 90
1512	stroke
1513end
1514
1515begin crosshatch_lines angle
1516	# Makes stripes through polygon.  Used for cross-hatching
1517	# so that original path is saved in calling function
1518	# and can be re-used for second set of hatch lines.
1519	#
1520	stripepath 2, angle
1521	stroke
1522end
1523
1524begin crosshatch
1525	# Fill polygon with crosshatching.
1526	#
1527	key "box", "Crosshatch"
1528	color "orange"
1529	linestyle 0.1
1530	stroke
1531	clip "inside"
1532	stroke
1533	crosshatch_lines 45
1534	crosshatch_lines -45
1535end
1536
1537begin mesh
1538	# Fill polygon with horizontal and vertical mesh pattern.
1539	#
1540	key "box", "Mesh"
1541	color "darkgray"
1542	linestyle 0.1
1543	stroke
1544	clip "inside"
1545	stroke
1546	crosshatch_lines 0
1547	crosshatch_lines 90
1548end
1549
1550begin doublestripefill
1551	# Fill polygon with stripes of two different colours.
1552	#
1553	key "box", "Double Stripes"
1554	color "blue"
1555	fill
1556	clip "inside"
1557	color "yellow"
1558	linestyle 1
1559	stripepath 2, 45
1560	stroke
1561end
1562
1563begin triplestripefill
1564	# Fill polygon with stripes in three different colours.
1565	#
1566	key "box", "Triple Stripes"
1567	color "grey90"
1568	fill
1569	clip "inside"
1570	stripepath 5, 45
1571	color "lightpink"
1572	linestyle 3
1573	stroke
1574	color "deeppink"
1575	linestyle 1
1576	stroke
1577end
1578
1579begin halffill_box c1, c2, c3, c4
1580	# Draw a square with the 4 quadrants in different colors.
1581	#
1582	box -1, -1, 0, 0
1583	color c1
1584	fill
1585
1586	clearpath
1587	box -1, 0, 0, 1
1588	color c2
1589	fill
1590
1591	clearpath
1592	box 0, -1, 1, 0
1593	color c3
1594	fill
1595
1596	clearpath
1597	box 0, 0, 1, 1
1598	color c4
1599	fill
1600end
1601
1602begin halffill
1603	# Fill polygon with squares of alternating colours.
1604	#
1605	key "box", "Half Fill"
1606	clip "inside"
1607	stripepath 2, 0
1608	samplepath 2, 0
1609	halffill_box "beige", "brown", "brown", "beige"
1610end
1611
1612begin quiltfill
1613	# Fill polygon with quilt-type pattern using four different colours.
1614	#
1615	key "box", "Quilt Fill"
1616	clip "inside"
1617	stripepath 2, 0
1618	samplepath 2, 0
1619	halffill_box "red", "yellow", "purple", "orange"
1620end
1621
1622begin circlefill_circle
1623	circle 0, 0, 2
1624	fill
1625end
1626
1627begin circlefill
1628	# Fill polygon with regularly space circles.
1629	#
1630	key "box", "Circle Fill"
1631	color "white"
1632	fill
1633	clip "inside"
1634	color "dodgerblue"
1635	stripepath 5, 0
1636	samplepath 5, 0
1637	circlefill_circle
1638end
1639
1640begin boxfill_box
1641	box -1, -1, 1, 1
1642	fill
1643end
1644
1645begin boxfill
1646	# Fill polygon with regularly space boxes.
1647	#
1648	key "box", "Box Fill"
1649	color "white"
1650	fill
1651	clip "inside"
1652	color "lightpink"
1653	stripepath 4, 0
1654	samplepath 4, 0
1655	boxfill_box
1656end
1657
1658begin repeaticon hexdigits, iconsize
1659	# Repeats an icon all through a polygon in
1660	# a tiling pattern.
1661	#
1662	clip "inside"
1663	stripepath iconsize, 0
1664	samplepath iconsize, 0
1665	icon hexdigits, iconsize
1666end
1667
1668begin chessfill
1669	key "box", "Chessboard Pattern"
1670	color "black"
1671	repeaticon "0xaa55aa55aa55aa55", 5
1672end
1673
1674begin walltiling
1675	key "box", "Wall Tiling"
1676	color "navy"
1677	repeaticon "0xf888a888f8000000", 5
1678end
1679
1680begin trellistiling
1681	key "box", "Trellis Tiling"
1682	color "black"
1683	repeaticon "0xfcfcc4c4c4fc0000", 4
1684end
1685
1686begin dotpattern
1687	key "box", "Dot Pattern"
1688	color "crimson"
1689	repeaticon "0xaa00aa00aa00aa00", 6
1690end
1691
1692begin halftone
1693	key "box", "Halftone"
1694	color "black"
1695	repeaticon "0x56a9a659659a6a95", 5
1696end
1697
1698begin stipple
1699	key "box", "Stipple"
1700	color "blue"
1701	repeaticon "0xaa44aa00aa44aa00", 5
1702end
1703
1704begin brickfill
1705	key "box", "Brick Fill"
1706	color "firebrick"
1707	fill
1708	color "sandybrown"
1709	repeaticon "0xff808080ff080808", 2
1710end
1711
1712begin weavefill_box
1713	# Display lines that weave under and over each other.
1714	# Segments must be drawn in correct order to achieve
1715	# correct over-and-under effect.
1716	#
1717	move -2, 0
1718	draw 0, 2
1719	color "black"
1720	linestyle 1
1721	stroke
1722
1723	clearpath
1724	color "white"
1725	linestyle 2
1726	move -0.5, 0.5
1727	draw -1.5, 1.5
1728	stroke
1729
1730	clearpath
1731	color "black"
1732	linestyle 1
1733	move -2, 2
1734	draw 2, -2
1735	stroke
1736
1737	clearpath
1738	color "white"
1739	linestyle 2
1740	move 0.5, -1.5
1741	draw 1.5, -0.5
1742	stroke
1743
1744	clearpath
1745	color "black"
1746	linestyle 1
1747	move 0, -2
1748	draw 2, 0
1749	stroke
1750end
1751
1752begin weavefill
1753	# Fill polygon with perpendicular lines that appear to weave
1754	# in between each other.
1755	#
1756	key "box", "Weave Fill"
1757	color "white"
1758	fill
1759	clip "inside"
1760	stripepath 4, 0
1761	samplepath 4, 0
1762	weavefill_box
1763end
1764
1765begin hashfill_box
1766	color "indigo"
1767	font "Helvetica", 3
1768	move 0, 0
1769	label "#"
1770end
1771
1772begin hashfill
1773	# Fill polygon with '#' characters.
1774	#
1775	key "box", "Hash Fill"
1776	color "ivory"
1777	fill
1778	clip "inside"
1779	stripepath 2.7, 0
1780	samplepath 2.7, 0
1781	hashfill_box
1782end
1783
1784begin wedgefill_box
1785	color "orange"
1786
1787	move -1.8, 1
1788	draw 1.8, 0, -1.8, -1
1789	closepath
1790
1791	move -1.8, 2
1792	draw 1.8, 2, 1.8, 1
1793	closepath
1794
1795	move -1.8, -2
1796	draw 1.8, -2, 1.8, -1
1797	closepath
1798
1799	fill
1800end
1801
1802begin wedgefill
1803	# Fill polygon with triangular wedge pattern.
1804	#
1805	key "box", "Wedge Fill"
1806	color "grey90"
1807	fill
1808	clip "inside"
1809	stripepath 4, 0
1810	samplepath 4, 0
1811	wedgefill_box
1812end
1813
1814begin aggregate_triangle
1815	# Draw a triangle at a random angle at a random position.
1816	#
1817	move random(4) - 2, random(4) - 2
1818	rotate random(360)
1819	equitriangle
1820end
1821
1822begin aggregate
1823	# Show triangular aggregrate rock symbols in random pattern
1824	# through polygon.
1825	#
1826	key "box", "Aggregate"
1827	linestyle 0.1
1828	color "slateblue"
1829	stroke
1830	clip "inside"
1831	stripepath 4, 0
1832	samplepath 4, 0
1833	aggregate_triangle
1834end
1835
1836begin savannah_v
1837	# Show 'v' symbol at random position.
1838	#
1839	local x, y
1840	let x = 1 - random(2)
1841	let y = 1 - random(2)
1842	clearpath
1843	move x - 0.6, y + 1
1844	draw x, y
1845	draw x + 0.6, y + 1
1846	stroke
1847end
1848
1849begin savannah
1850	# Fill polygon with 'v' symbols.
1851	#
1852	key "box", "Grassland"
1853	clip "inside"
1854	stripepath 5, 0
1855	samplepath 5, 0
1856	color "#44cc44"
1857	linestyle 0.2
1858	savannah_v
1859end
1860
1861begin wheatfield_kernel
1862	# Show wheat kernel symbol.
1863	#
1864	rotate -Mapyrus.rotation
1865	move -0.8, 2
1866	draw -0.8, 0
1867	draw 0, -0.5
1868	draw 0, -1.5
1869	draw 0, -0.5
1870	draw 0.8, 0
1871	draw 0.8, 2
1872	stroke
1873	move 0, 3
1874	draw 0, 1
1875	stroke
1876end
1877
1878begin wheatfield
1879	# Fill polygon with wheat symbols.
1880	#
1881	key "box", "Wheat Field"
1882	clip "inside"
1883	stripepath 6, 10
1884	samplepath 6, 0
1885	color "orange"
1886	linestyle 0.2
1887	wheatfield_kernel
1888end
1889
1890begin barerock_rock
1891	# Show rock symbol as '/\_'.
1892	#
1893	rotate -Mapyrus.rotation
1894	move -1, 0
1895	draw 0, 3, 1, 0, 2, 0
1896	stroke
1897	move 1, 0
1898	draw 0.8, 0, -0.1, 2.8, 0, 3
1899	stroke
1900end
1901
1902begin barerock
1903	# Fill polygon with rock symbols.
1904	#
1905	key "box", "Bare Rock",
1906	clip "inside"
1907	stripepath 6, 45
1908	samplepath 6, 0
1909	color "#cccccc"
1910	linestyle 0.1
1911	barerock_rock
1912end
1913
1914begin marsh_grass
1915	# Show marsh grass symbol as '\|/'.
1916	#
1917	local x
1918	rotate -Mapyrus.rotation
1919	let x = 2 - random(4)
1920	clearpath
1921	move x - 1, 0
1922	draw x + 1, 0
1923	move x, 0
1924	draw x, 1
1925	move x, 0
1926	draw x + 1, 1
1927	move x, 0
1928	draw x - 1, 1
1929	stroke
1930end
1931
1932begin marsh
1933	# Fill polygon with marsh symbols.
1934	#
1935	key "box", "Marsh"
1936	clip "inside"
1937	stripepath 6, 45
1938	samplepath 6, 0
1939	color "#a52a2a"
1940	linestyle 0.1
1941	marsh_grass
1942end
1943
1944begin water
1945	key "box", "Water"
1946	color "#80b2ff"
1947	fill
1948end
1949
1950begin citylimits
1951	# Display thick border line around inside of polygon.
1952	#
1953	key "box", "City Limits"
1954	linestyle 0.1
1955	stroke
1956	clip "inside"
1957	linestyle 3, "round", "round"
1958	color "pink", 0.5
1959	stroke
1960end
1961
1962begin restrictedarea
1963	# Display thick border line around outside of polygon.
1964	#
1965	key "box", "Restricted Area"
1966	linestyle 0.1
1967	stroke
1968	clip "outside"
1969	linestyle 3, "round", "round"
1970	color "olive"
1971	stroke
1972end
1973
1974# If special variable is set then show all above symbols in a legend
1975# on a separate page.
1976#
1977if show_symbols_legend == 1
1978then
1979	# Force each symbol to be used so that it is included as a
1980	# legend entry.
1981	#
1982	# Then draw the legend which is what we really want to see.
1983	#
1984	move -10, -10
1985	circleoutline
1986	equitriangle
1987	squareoutline
1988	filledsquare
1989	filledpentagon
1990	filledhexagon
1991	octagonoutline
1992	x1
1993	plus1
1994	sixpointstar
1995	fivepointstar
1996	arrowupoutline
1997	arrowdownoutline
1998	arrowleftoutline
1999	arrowrightoutline
2000	arrowupleftoutline
2001	shipwreck
2002	viewpoint
2003	surveymarker
2004	trigstation
2005	witchshat
2006	oldmoon
2007	newmoon
2008	trafficlights ""
2009	quadrants "", 1, 1, 1, 1, 0
2010	speechbubble ""
2011	windindicator 0, 1, ""
2012	temperatureHistogram "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
2013	bordercrossing
2014	crosshair
2015	lighthouse
2016	information
2017	sbahn
2018	ubahn
2019	parking
2020	coveredparking
2021	cave
2022	flag
2023	pennant
2024	pinetree
2025	radiotower
2026	church
2027	hospital
2028	tent
2029	hut
2030	fairground
2031	factory
2032	school
2033	postoffice
2034	library
2035	police
2036	cemetary
2037	waypoint
2038	capitalcity "Ely"
2039	city "Ely"
2040	town "Ely"
2041	emphasisedname "Ely"
2042	streetname ""
2043	Lleftticks
2044	Lcenterline
2045	Lfence
2046	Lbowtie
2047	Lmotorway ""
2048	Lborder
2049	Lrailway
2050	Lpowerline
2051	Ldashdot
2052	Lmulticolorline
2053	Larrowline
2054	Lsnakeline
2055	Linaccurateline
2056	hatch1
2057	hatch2
2058	hatch3
2059	hatch4
2060	crosshatch
2061	mesh
2062	doublestripefill
2063	triplestripefill
2064	halffill
2065	quiltfill
2066	circlefill
2067	boxfill
2068	chessfill
2069	walltiling
2070	trellistiling
2071	dotpattern
2072	halftone
2073	stipple
2074	brickfill
2075	weavefill
2076	hashfill
2077	wedgefill
2078	aggregate
2079	savannah
2080	wheatfield
2081	barerock
2082	marsh
2083	water
2084	citylimits
2085	restrictedarea
2086
2087	let count = 0, x = 9999, y = 9999
2088	let pageNumber = 0
2089	while Mapyrus.key.count > 0
2090	do
2091		# Start a new page when we run off edge of page.
2092		#
2093		if x > 150
2094		then
2095			let pageNumber = pageNumber + 1
2096			newpage "eps", "symbols" . pageNumber . ".eps", 170, 200, "lineantialiasing=true"
2097
2098			# Ensure page has a white background.
2099			#
2100			box 0, 0, Mapyrus.page.width, Mapyrus.page.height
2101			color "white"
2102			fill
2103			color "black"
2104			font "Helvetica", 3
2105			let x = 10, y = Mapyrus.page.height - 10
2106		endif
2107
2108		clearpath
2109		move x, y
2110
2111		# Draw north arrows specially.  They have no legend entry
2112		# as we never want them appearing in a real legend!
2113		#
2114		if counter == 0
2115		then
2116			clearpath
2117			move x + 5, y
2118			northarrow
2119			label "        northarrow"
2120		elif counter == 1
2121		then
2122			clearpath
2123			move x + 5, y - 15
2124			nsew
2125			label "        nsew"
2126			let y = y - 30
2127		elif match(Mapyrus.key.next, "^L")
2128		then
2129			# Display lines with bigger entries so that
2130			# any pattern along the line is visible.
2131			#
2132			legend 16
2133		else
2134			legend 8
2135		endif
2136
2137		let y = y - 10
2138		if y < 10
2139		then
2140			let x = x + 50
2141			let y = Mapyrus.page.height - 10
2142		endif
2143
2144		let counter = counter + 1
2145	done
2146endif
2147
2148