Home » Archimedes archive » Archimedes World » AW-1994-01.adf » AWJan94 » !AWJan94/Goodies/Disc/!PathLib/OS_units/Paths
!AWJan94/Goodies/Disc/!PathLib/OS_units/Paths
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1994-01.adf » AWJan94 |
Filename: | !AWJan94/Goodies/Disc/!PathLib/OS_units/Paths |
Read OK: | ✔ |
File size: | 1137 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
1REM > PathLib:OS_units.Paths 2 3REM ************************************************************************ 4REM 5REM UTILITIES 6REM 7REM ************************************************************************ 8 9DEF PROCPath_ObjectBegin(RETURN pathobject%,words%) 10 REM ------------------------------- 11 REM Creates an empty path of length 12 REM ( Number of words ) words% 13 REM ------------------------------- 14 DIM pathobject% 4*words% 15 path%=pathobject% 16 path_length%=path%+4*words% 17 ENDPROC 18 19DEF PROCPath_Add(x%) 20 REM ---------------------------------------------------------- 21 REM Adds word (4 bytes) x% 22 REM to path object 23 REM 24 REM N.B. 25 REM path% and path_length% are reserved variable names 26 REM --------------------------------------------------------- 27 IF path%>path_length% THEN ERROR 0,"Path buffer too short" 28 !path%=x% 29 path%+=4 30 ENDPROC 31 32REM ************************************************************************ 33REM 34REM SOME PATH ELEMENTS 35REM 36REM ************************************************************************ 37 38DEF PROCPath_ObjectEnd 39 REM ----------- 40 REM End of path 41 REM 42 REM 2 words ( x 4 bytes) 43 REM ----------- 44 PROCPath_Add(0) : PROCPath_Add(path_length%-path%-4) 45ENDPROC 46 47DEF PROCPath_Move(x%,y%) 48 REM ---------------------------------- 49 REM Move to x%,y% starting new subpath 50 REM This DOES affect winding numbers 51 REM so path is filled normally 52 REM 53 REM 3 words ( x 4 bytes) 54 REM ---------------------------------- 55 PROCPath_Add(2) : PROCPath_Add(x%*256) : PROCPath_Add(y%*256) 56 ENDPROC 57 58DEF PROCPath_Draw(x%,y%) 59 REM ------------- 60 REM Line to (x,y) 61 REM 62 REM 3 words ( x 4 bytes) 63 REM ------------- 64 PROCPath_Add(8) : PROCPath_Add(x%*256) : PROCPath_Add(y%*256) 65 ENDPROC 66 67DEF PROCPath_CloseWithGap 68 REM -------------------------------- 69 REM Close current subpath with a gap 70 REM 71 REM 1 word 72 REM -------------------------------- 73 PROCPath_Add(4) 74 ENDPROC 75 76DEF PROCPath_CloseWithLine 77 REM --------------------------------- 78 REM Close current subpath with a line 79 REM 80 REM 1 word 81 REM --------------------------------- 82 PROCPath_Add(5) 83 ENDPROC 84 85REM ************************************************************************ 86REM 87REM SOME SUB-PATHS 88REM 89REM ************************************************************************ 90 91DEF PROCPath_Rectangle(x%,y%,width%,height%) 92 REM ------------------------ 93 REM Rectangle centre (x%,y%) 94 REM 95 REM 13 words 96 REM ------------------------ 97 LOCAL hx%,hy% 98 hx%=width% DIV 2 : hy%=height% DIV 2 99 PROCPath_Move(x%+hx%,y%+hy%) 100 PROCPath_Draw(x%-hx%,y%+hy%) 101 PROCPath_Draw(x%-hx%,y%-hy%) 102 PROCPath_Draw(x%+hx%,y%-hy%) 103 PROCPath_CloseWithLine 104 ENDPROC 105 106DEF PROCPath_Square(x%,y%,width%) 107 REM ------------------------ 108 REM Square centre (x%,y%) 109 REM 110 REM 13 words 111 REM ------------------------ 112 PROCPath_Rectangle(x%,y%,width%,width%) 113 ENDPROC 114 115DEF PROCPath_Triangle(A%,a%,B%,b%,C%,c%) 116 REM ---------------------------- 117 REM Triangle (A,a) (B,b) (C,c) 118 REM 119 REM 10 words 120 REM ---------------------------- 121 PROCPath_Move(A%,a%) 122 PROCPath_Draw(B%,b%) 123 PROCPath_Draw(C%,c%) 124 PROCPath_CloseWithLine 125 ENDPROC 126 127DEF PROCPath_RegularPolygon(x%,y%,radius%,n%) 128 REM ------------------------------ 129 REM Regular polygon centre (x%,y%) 130 REM 131 REM Number of sides=n% 132 REM 133 REM 3*n%+1 words 134 REM ------------------------------ 135 PROCPath_Move(x%+radius%,y%) 136 FOR i%=1 TO n%-1 137 X%=x%+radius%*COS(2*PI*i%/n%) 138 Y%=y%+radius%*SIN(2*PI*i%/n%) 139 PROCPath_Draw(X%,Y%) 140 NEXT 141 PROCPath_CloseWithLine 142 ENDPROC 143 144REM ************************************************************************ 145REM 146REM SOME PATH OBJECTS 147REM 148REM ************************************************************************ 149 150DEF FNPath_CreateRectangle(x%,y%,width%,height%) 151 LOCAL rectangle% 152 PROCPath_ObjectBegin(rectangle%,15) 153 PROCPath_Rectangle(x%,y%,width%,height%) 154 PROCPath_ObjectEnd 155=rectangle% 156 157DEF FNPath_CreateSquare(x%,y%,width%) 158 LOCAL square% 159 PROCPath_ObjectBegin(square%,15) 160 PROCPath_Square(x%,y%,width%) 161 PROCPath_ObjectEnd 162=square% 163 164DEF FNPath_CreateTriangle(A%,a%,B%,b%,C%,c%) 165 LOCAL triangle% 166 PROCPath_ObjectBegin(triangle%,12) 167 PROCPath_Triangle(A%,a%,B%,b%,C%,c%) 168 PROCPath_ObjectEnd 169=triangle% 170 171DEF FNPath_CreateRegularPolygon(x%,y%,radius%,n%) 172 LOCAL polygon% 173 PROCPath_ObjectBegin(polygon%,3*n%+3) 174 PROCPath_RegularPolygon(x%,y%,radius%,n%) 175 PROCPath_ObjectEnd 176=polygon% 177 178
� > PathLib:OS_units.Paths N� ************************************************************************ � � UTILITIES � N� ************************************************************************ -� �Path_ObjectBegin(� pathobject%,words%) & � ------------------------------- & � Creates an empty path of length ! � ( Number of words ) words% & � ------------------------------- � pathobject% 4*words% path%=pathobject% ! path_length%=path%+4*words% � � �Path_Add(x%) A � ---------------------------------------------------------- � Adds word (4 bytes) x% � to path object � � N.B. @ � path% and path_length% are reserved variable names @ � --------------------------------------------------------- 7 � path%>path_length% � � 0,"Path buffer too short" !path%=x% path%+=4 � N� ************************************************************************ !� "� SOME PATH ELEMENTS #� $N� ************************************************************************ % &� �Path_ObjectEnd ' � ----------- ( � End of path ) � * � 2 words ( x 4 bytes) + � ----------- ,3 �Path_Add(0) : �Path_Add(path_length%-path%-4) -� . /� �Path_Move(x%,y%) 0) � ---------------------------------- 1) � Move to x%,y% starting new subpath 2' � This DOES affect winding numbers 3! � so path is filled normally 4 � 5 � 3 words ( x 4 bytes) 6) � ---------------------------------- 79 �Path_Add(2) : �Path_Add(x%*256) : �Path_Add(y%*256) 8 � 9 :� �Path_Draw(x%,y%) ; � ------------- < � Line to (x,y) = � > � 3 words ( x 4 bytes) ? � ------------- @9 �Path_Add(8) : �Path_Add(x%*256) : �Path_Add(y%*256) A � B C� �Path_CloseWithGap D' � -------------------------------- E' � Close current subpath with a gap F � G � 1 word H' � -------------------------------- I �Path_Add(4) J � K L� �Path_CloseWithLine M( � --------------------------------- N( � Close current subpath with a line O � P � 1 word Q( � --------------------------------- R �Path_Add(5) S � T UN� ************************************************************************ V� W� SOME SUB-PATHS X� YN� ************************************************************************ Z [+� �Path_Rectangle(x%,y%,width%,height%) \ � ------------------------ ] � Rectangle centre (x%,y%) ^ � _ � 13 words ` � ------------------------ a � hx%,hy% b% hx%=width% � 2 : hy%=height% � 2 c �Path_Move(x%+hx%,y%+hy%) d �Path_Draw(x%-hx%,y%+hy%) e �Path_Draw(x%-hx%,y%-hy%) f �Path_Draw(x%+hx%,y%-hy%) g �Path_CloseWithLine h � i j � �Path_Square(x%,y%,width%) k � ------------------------ l � Square centre (x%,y%) m � n � 13 words o � ------------------------ p) �Path_Rectangle(x%,y%,width%,width%) q � r s'� �Path_Triangle(A%,a%,B%,b%,C%,c%) t# � ---------------------------- u" � Triangle (A,a) (B,b) (C,c) v � w � 10 words x# � ---------------------------- y �Path_Move(A%,a%) z �Path_Draw(B%,b%) { �Path_Draw(C%,c%) | �Path_CloseWithLine } � ~ ,� �Path_RegularPolygon(x%,y%,radius%,n%) �% � ------------------------------ �% � Regular polygon centre (x%,y%) � � � � Number of sides=n% � � � � 3*n%+1 words �% � ------------------------------ � �Path_Move(x%+radius%,y%) � � i%=1 � n%-1 � X%=x%+radius%*�(2*�*i%/n%) � Y%=y%+radius%*�(2*�*i%/n%) � �Path_Draw(X%,Y%) � � � �Path_CloseWithLine � � � �N� ************************************************************************ �� �� SOME PATH OBJECTS �� �N� ************************************************************************ � �1� �Path_CreateRectangle(x%,y%,width%,height%) � � rectangle% �% �Path_ObjectBegin(rectangle%,15) �* �Path_Rectangle(x%,y%,width%,height%) � �Path_ObjectEnd �=rectangle% � �&� �Path_CreateSquare(x%,y%,width%) � � square% �" �Path_ObjectBegin(square%,15) � �Path_Square(x%,y%,width%) � �Path_ObjectEnd �=square% � �-� �Path_CreateTriangle(A%,a%,B%,b%,C%,c%) � � triangle% �$ �Path_ObjectBegin(triangle%,12) �& �Path_Triangle(A%,a%,B%,b%,C%,c%) � �Path_ObjectEnd �=triangle% � �2� �Path_CreateRegularPolygon(x%,y%,radius%,n%) � � polygon% �' �Path_ObjectBegin(polygon%,3*n%+3) �+ �Path_RegularPolygon(x%,y%,radius%,n%) � �Path_ObjectEnd � =polygon% � � �
00000000 0d 00 01 1e f4 20 3e 20 50 61 74 68 4c 69 62 3a |..... > PathLib:| 00000010 4f 53 5f 75 6e 69 74 73 2e 50 61 74 68 73 0d 00 |OS_units.Paths..| 00000020 02 04 0d 00 03 4e f4 20 2a 2a 2a 2a 2a 2a 2a 2a |.....N. ********| 00000030 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000070 0d 00 04 05 f4 0d 00 05 0f f4 20 55 54 49 4c 49 |.......... UTILI| 00000080 54 49 45 53 0d 00 06 05 f4 0d 00 07 4e f4 20 2a |TIES........N. *| 00000090 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000000d0 2a 2a 2a 2a 2a 2a 2a 0d 00 08 04 0d 00 09 2d dd |*******.......-.| 000000e0 20 f2 50 61 74 68 5f 4f 62 6a 65 63 74 42 65 67 | .Path_ObjectBeg| 000000f0 69 6e 28 f8 20 70 61 74 68 6f 62 6a 65 63 74 25 |in(. pathobject%| 00000100 2c 77 6f 72 64 73 25 29 0d 00 0a 26 20 f4 20 2d |,words%)...& . -| 00000110 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000120 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 |--------------..| 00000130 0b 26 20 f4 20 43 72 65 61 74 65 73 20 61 6e 20 |.& . Creates an | 00000140 65 6d 70 74 79 20 70 61 74 68 20 6f 66 20 6c 65 |empty path of le| 00000150 6e 67 74 68 0d 00 0c 21 20 f4 20 28 20 4e 75 6d |ngth...! . ( Num| 00000160 62 65 72 20 6f 66 20 77 6f 72 64 73 20 29 20 77 |ber of words ) w| 00000170 6f 72 64 73 25 0d 00 0d 26 20 f4 20 2d 2d 2d 2d |ords%...& . ----| 00000180 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000190 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 0e 1c 20 |-----------.... | 000001a0 de 20 70 61 74 68 6f 62 6a 65 63 74 25 20 20 34 |. pathobject% 4| 000001b0 2a 77 6f 72 64 73 25 0d 00 0f 16 20 70 61 74 68 |*words%.... path| 000001c0 25 3d 70 61 74 68 6f 62 6a 65 63 74 25 0d 00 10 |%=pathobject%...| 000001d0 21 20 70 61 74 68 5f 6c 65 6e 67 74 68 25 3d 70 |! path_length%=p| 000001e0 61 74 68 25 2b 34 2a 77 6f 72 64 73 25 20 0d 00 |ath%+4*words% ..| 000001f0 11 06 20 e1 0d 00 12 04 0d 00 13 13 dd 20 f2 50 |.. .......... .P| 00000200 61 74 68 5f 41 64 64 28 78 25 29 0d 00 14 41 20 |ath_Add(x%)...A | 00000210 f4 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |. --------------| 00000220 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000240 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 15 1d |------------....| 00000250 20 f4 20 41 64 64 73 20 77 6f 72 64 20 28 34 20 | . Adds word (4 | 00000260 62 79 74 65 73 29 20 78 25 0d 00 16 15 20 f4 20 |bytes) x%.... . | 00000270 74 6f 20 70 61 74 68 20 6f 62 6a 65 63 74 0d 00 |to path object..| 00000280 17 06 20 f4 0d 00 18 0b 20 f4 20 4e 2e 42 2e 0d |.. ..... . N.B..| 00000290 00 19 40 20 f4 20 20 20 20 20 20 20 20 70 61 74 |..@ . pat| 000002a0 68 25 20 61 6e 64 20 70 61 74 68 5f 6c 65 6e 67 |h% and path_leng| 000002b0 74 68 25 20 61 72 65 20 72 65 73 65 72 76 65 64 |th% are reserved| 000002c0 20 76 61 72 69 61 62 6c 65 20 6e 61 6d 65 73 0d | variable names.| 000002d0 00 1a 40 20 f4 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |..@ . ----------| 000002e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000300 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d |---------------.| 00000310 00 1b 37 20 e7 20 70 61 74 68 25 3e 70 61 74 68 |..7 . path%>path| 00000320 5f 6c 65 6e 67 74 68 25 20 8c 20 85 20 30 2c 22 |_length% . . 0,"| 00000330 50 61 74 68 20 62 75 66 66 65 72 20 74 6f 6f 20 |Path buffer too | 00000340 73 68 6f 72 74 22 0d 00 1c 0e 20 21 70 61 74 68 |short".... !path| 00000350 25 3d 78 25 0d 00 1d 0d 20 70 61 74 68 25 2b 3d |%=x%.... path%+=| 00000360 34 0d 00 1e 06 20 e1 0d 00 1f 04 0d 00 20 4e f4 |4.... ....... N.| 00000370 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a | ***************| 00000380 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000003b0 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 00 21 05 f4 0d 00 |*********..!....| 000003c0 22 18 f4 20 53 4f 4d 45 20 50 41 54 48 20 45 4c |".. SOME PATH EL| 000003d0 45 4d 45 4e 54 53 0d 00 23 05 f4 0d 00 24 4e f4 |EMENTS..#....$N.| 000003e0 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a | ***************| 000003f0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000420 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 00 25 04 0d 00 26 |*********..%...&| 00000430 15 dd 20 f2 50 61 74 68 5f 4f 62 6a 65 63 74 45 |.. .Path_ObjectE| 00000440 6e 64 0d 00 27 12 20 f4 20 2d 2d 2d 2d 2d 2d 2d |nd..'. . -------| 00000450 2d 2d 2d 2d 0d 00 28 12 20 f4 20 45 6e 64 20 6f |----..(. . End o| 00000460 66 20 70 61 74 68 0d 00 29 06 20 f4 0d 00 2a 1b |f path..). ...*.| 00000470 20 f4 20 32 20 77 6f 72 64 73 20 28 20 78 20 34 | . 2 words ( x 4| 00000480 20 62 79 74 65 73 29 0d 00 2b 12 20 f4 20 2d 2d | bytes)..+. . --| 00000490 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 2c 33 20 f2 50 |---------..,3 .P| 000004a0 61 74 68 5f 41 64 64 28 30 29 20 3a 20 f2 50 61 |ath_Add(0) : .Pa| 000004b0 74 68 5f 41 64 64 28 70 61 74 68 5f 6c 65 6e 67 |th_Add(path_leng| 000004c0 74 68 25 2d 70 61 74 68 25 2d 34 29 0d 00 2d 05 |th%-path%-4)..-.| 000004d0 e1 0d 00 2e 04 0d 00 2f 17 dd 20 f2 50 61 74 68 |......./.. .Path| 000004e0 5f 4d 6f 76 65 28 78 25 2c 79 25 29 0d 00 30 29 |_Move(x%,y%)..0)| 000004f0 20 f4 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | . -------------| 00000500 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000510 2d 2d 2d 2d 2d 0d 00 31 29 20 f4 20 4d 6f 76 65 |-----..1) . Move| 00000520 20 74 6f 20 78 25 2c 79 25 20 73 74 61 72 74 69 | to x%,y% starti| 00000530 6e 67 20 6e 65 77 20 73 75 62 70 61 74 68 0d 00 |ng new subpath..| 00000540 32 27 20 f4 20 54 68 69 73 20 44 4f 45 53 20 61 |2' . This DOES a| 00000550 66 66 65 63 74 20 77 69 6e 64 69 6e 67 20 6e 75 |ffect winding nu| 00000560 6d 62 65 72 73 0d 00 33 21 20 f4 20 73 6f 20 70 |mbers..3! . so p| 00000570 61 74 68 20 69 73 20 66 69 6c 6c 65 64 20 6e 6f |ath is filled no| 00000580 72 6d 61 6c 6c 79 0d 00 34 06 20 f4 0d 00 35 1b |rmally..4. ...5.| 00000590 20 f4 20 33 20 77 6f 72 64 73 20 28 20 78 20 34 | . 3 words ( x 4| 000005a0 20 62 79 74 65 73 29 0d 00 36 29 20 f4 20 2d 2d | bytes)..6) . --| 000005b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000005d0 0d 00 37 39 20 f2 50 61 74 68 5f 41 64 64 28 32 |..79 .Path_Add(2| 000005e0 29 20 3a 20 f2 50 61 74 68 5f 41 64 64 28 78 25 |) : .Path_Add(x%| 000005f0 2a 32 35 36 29 20 3a 20 f2 50 61 74 68 5f 41 64 |*256) : .Path_Ad| 00000600 64 28 79 25 2a 32 35 36 29 0d 00 38 06 20 e1 0d |d(y%*256)..8. ..| 00000610 00 39 04 0d 00 3a 17 dd 20 f2 50 61 74 68 5f 44 |.9...:.. .Path_D| 00000620 72 61 77 28 78 25 2c 79 25 29 0d 00 3b 14 20 f4 |raw(x%,y%)..;. .| 00000630 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 | -------------..| 00000640 3c 14 20 f4 20 4c 69 6e 65 20 74 6f 20 28 78 2c |<. . Line to (x,| 00000650 79 29 0d 00 3d 06 20 f4 0d 00 3e 1b 20 f4 20 33 |y)..=. ...>. . 3| 00000660 20 77 6f 72 64 73 20 28 20 78 20 34 20 62 79 74 | words ( x 4 byt| 00000670 65 73 29 0d 00 3f 14 20 f4 20 2d 2d 2d 2d 2d 2d |es)..?. . ------| 00000680 2d 2d 2d 2d 2d 2d 2d 0d 00 40 39 20 f2 50 61 74 |-------..@9 .Pat| 00000690 68 5f 41 64 64 28 38 29 20 3a 20 f2 50 61 74 68 |h_Add(8) : .Path| 000006a0 5f 41 64 64 28 78 25 2a 32 35 36 29 20 3a 20 f2 |_Add(x%*256) : .| 000006b0 50 61 74 68 5f 41 64 64 28 79 25 2a 32 35 36 29 |Path_Add(y%*256)| 000006c0 0d 00 41 06 20 e1 0d 00 42 04 0d 00 43 18 dd 20 |..A. ...B...C.. | 000006d0 f2 50 61 74 68 5f 43 6c 6f 73 65 57 69 74 68 47 |.Path_CloseWithG| 000006e0 61 70 0d 00 44 27 20 f4 20 2d 2d 2d 2d 2d 2d 2d |ap..D' . -------| 000006f0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000700 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 45 27 20 f4 20 |---------..E' . | 00000710 43 6c 6f 73 65 20 63 75 72 72 65 6e 74 20 73 75 |Close current su| 00000720 62 70 61 74 68 20 77 69 74 68 20 61 20 67 61 70 |bpath with a gap| 00000730 0d 00 46 06 20 f4 0d 00 47 0d 20 f4 20 31 20 77 |..F. ...G. . 1 w| 00000740 6f 72 64 0d 00 48 27 20 f4 20 2d 2d 2d 2d 2d 2d |ord..H' . ------| 00000750 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000760 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 49 11 20 f2 |----------..I. .| 00000770 50 61 74 68 5f 41 64 64 28 34 29 0d 00 4a 06 20 |Path_Add(4)..J. | 00000780 e1 0d 00 4b 04 0d 00 4c 19 dd 20 f2 50 61 74 68 |...K...L.. .Path| 00000790 5f 43 6c 6f 73 65 57 69 74 68 4c 69 6e 65 0d 00 |_CloseWithLine..| 000007a0 4d 28 20 f4 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |M( . -----------| 000007b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000007c0 2d 2d 2d 2d 2d 2d 0d 00 4e 28 20 f4 20 43 6c 6f |------..N( . Clo| 000007d0 73 65 20 63 75 72 72 65 6e 74 20 73 75 62 70 61 |se current subpa| 000007e0 74 68 20 77 69 74 68 20 61 20 6c 69 6e 65 0d 00 |th with a line..| 000007f0 4f 06 20 f4 0d 00 50 0d 20 f4 20 31 20 77 6f 72 |O. ...P. . 1 wor| 00000800 64 0d 00 51 28 20 f4 20 2d 2d 2d 2d 2d 2d 2d 2d |d..Q( . --------| 00000810 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000820 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 52 11 20 f2 50 |---------..R. .P| 00000830 61 74 68 5f 41 64 64 28 35 29 0d 00 53 06 20 e1 |ath_Add(5)..S. .| 00000840 0d 00 54 04 0d 00 55 4e f4 20 2a 2a 2a 2a 2a 2a |..T...UN. ******| 00000850 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000890 2a 2a 0d 00 56 05 f4 0d 00 57 14 f4 20 53 4f 4d |**..V....W.. SOM| 000008a0 45 20 53 55 42 2d 50 41 54 48 53 0d 00 58 05 f4 |E SUB-PATHS..X..| 000008b0 0d 00 59 4e f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |..YN. **********| 000008c0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000008f0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 0d 00 |**************..| 00000900 5a 04 0d 00 5b 2b dd 20 f2 50 61 74 68 5f 52 65 |Z...[+. .Path_Re| 00000910 63 74 61 6e 67 6c 65 28 78 25 2c 79 25 2c 77 69 |ctangle(x%,y%,wi| 00000920 64 74 68 25 2c 68 65 69 67 68 74 25 29 0d 00 5c |dth%,height%)..\| 00000930 1f 20 f4 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |. . ------------| 00000940 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 5d 1f |------------..].| 00000950 20 f4 20 52 65 63 74 61 6e 67 6c 65 20 63 65 6e | . Rectangle cen| 00000960 74 72 65 20 28 78 25 2c 79 25 29 0d 00 5e 06 20 |tre (x%,y%)..^. | 00000970 f4 0d 00 5f 0f 20 f4 20 31 33 20 77 6f 72 64 73 |..._. . 13 words| 00000980 0d 00 60 1f 20 f4 20 2d 2d 2d 2d 2d 2d 2d 2d 2d |..`. . ---------| 00000990 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d |---------------.| 000009a0 00 61 0e 20 ea 20 68 78 25 2c 68 79 25 0d 00 62 |.a. . hx%,hy%..b| 000009b0 25 20 68 78 25 3d 77 69 64 74 68 25 20 81 20 32 |% hx%=width% . 2| 000009c0 20 3a 20 68 79 25 3d 68 65 69 67 68 74 25 20 81 | : hy%=height% .| 000009d0 20 32 0d 00 63 1e 20 f2 50 61 74 68 5f 4d 6f 76 | 2..c. .Path_Mov| 000009e0 65 28 78 25 2b 68 78 25 2c 79 25 2b 68 79 25 29 |e(x%+hx%,y%+hy%)| 000009f0 0d 00 64 1e 20 f2 50 61 74 68 5f 44 72 61 77 28 |..d. .Path_Draw(| 00000a00 78 25 2d 68 78 25 2c 79 25 2b 68 79 25 29 0d 00 |x%-hx%,y%+hy%)..| 00000a10 65 1e 20 f2 50 61 74 68 5f 44 72 61 77 28 78 25 |e. .Path_Draw(x%| 00000a20 2d 68 78 25 2c 79 25 2d 68 79 25 29 0d 00 66 1e |-hx%,y%-hy%)..f.| 00000a30 20 f2 50 61 74 68 5f 44 72 61 77 28 78 25 2b 68 | .Path_Draw(x%+h| 00000a40 78 25 2c 79 25 2d 68 79 25 29 0d 00 67 18 20 f2 |x%,y%-hy%)..g. .| 00000a50 50 61 74 68 5f 43 6c 6f 73 65 57 69 74 68 4c 69 |Path_CloseWithLi| 00000a60 6e 65 0d 00 68 06 20 e1 0d 00 69 04 0d 00 6a 20 |ne..h. ...i...j | 00000a70 dd 20 f2 50 61 74 68 5f 53 71 75 61 72 65 28 78 |. .Path_Square(x| 00000a80 25 2c 79 25 2c 77 69 64 74 68 25 29 0d 00 6b 1f |%,y%,width%)..k.| 00000a90 20 f4 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | . -------------| 00000aa0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 6c 1c 20 |-----------..l. | 00000ab0 f4 20 53 71 75 61 72 65 20 63 65 6e 74 72 65 20 |. Square centre | 00000ac0 28 78 25 2c 79 25 29 0d 00 6d 06 20 f4 0d 00 6e |(x%,y%)..m. ...n| 00000ad0 0f 20 f4 20 31 33 20 77 6f 72 64 73 0d 00 6f 1f |. . 13 words..o.| 00000ae0 20 f4 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | . -------------| 00000af0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 70 29 20 |-----------..p) | 00000b00 f2 50 61 74 68 5f 52 65 63 74 61 6e 67 6c 65 28 |.Path_Rectangle(| 00000b10 78 25 2c 79 25 2c 77 69 64 74 68 25 2c 77 69 64 |x%,y%,width%,wid| 00000b20 74 68 25 29 0d 00 71 06 20 e1 0d 00 72 04 0d 00 |th%)..q. ...r...| 00000b30 73 27 dd 20 f2 50 61 74 68 5f 54 72 69 61 6e 67 |s'. .Path_Triang| 00000b40 6c 65 28 41 25 2c 61 25 2c 42 25 2c 62 25 2c 43 |le(A%,a%,B%,b%,C| 00000b50 25 2c 63 25 29 0d 00 74 23 20 f4 20 2d 2d 2d 2d |%,c%)..t# . ----| 00000b60 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000b70 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 75 22 20 f4 20 54 |--------..u" . T| 00000b80 72 69 61 6e 67 6c 65 20 20 28 41 2c 61 29 20 28 |riangle (A,a) (| 00000b90 42 2c 62 29 20 28 43 2c 63 29 0d 00 76 06 20 f4 |B,b) (C,c)..v. .| 00000ba0 0d 00 77 0f 20 f4 20 31 30 20 77 6f 72 64 73 0d |..w. . 10 words.| 00000bb0 00 78 23 20 f4 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |.x# . ----------| 00000bc0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000bd0 2d 2d 0d 00 79 16 20 f2 50 61 74 68 5f 4d 6f 76 |--..y. .Path_Mov| 00000be0 65 28 41 25 2c 61 25 29 0d 00 7a 16 20 f2 50 61 |e(A%,a%)..z. .Pa| 00000bf0 74 68 5f 44 72 61 77 28 42 25 2c 62 25 29 0d 00 |th_Draw(B%,b%)..| 00000c00 7b 16 20 f2 50 61 74 68 5f 44 72 61 77 28 43 25 |{. .Path_Draw(C%| 00000c10 2c 63 25 29 0d 00 7c 18 20 f2 50 61 74 68 5f 43 |,c%)..|. .Path_C| 00000c20 6c 6f 73 65 57 69 74 68 4c 69 6e 65 0d 00 7d 06 |loseWithLine..}.| 00000c30 20 e1 0d 00 7e 04 0d 00 7f 2c dd 20 f2 50 61 74 | ...~....,. .Pat| 00000c40 68 5f 52 65 67 75 6c 61 72 50 6f 6c 79 67 6f 6e |h_RegularPolygon| 00000c50 28 78 25 2c 79 25 2c 72 61 64 69 75 73 25 2c 6e |(x%,y%,radius%,n| 00000c60 25 29 0d 00 80 25 20 f4 20 2d 2d 2d 2d 2d 2d 2d |%)...% . -------| 00000c70 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000c80 2d 2d 2d 2d 2d 2d 2d 0d 00 81 25 20 f4 20 52 65 |-------...% . Re| 00000c90 67 75 6c 61 72 20 70 6f 6c 79 67 6f 6e 20 63 65 |gular polygon ce| 00000ca0 6e 74 72 65 20 28 78 25 2c 79 25 29 0d 00 82 06 |ntre (x%,y%)....| 00000cb0 20 f4 0d 00 83 19 20 f4 20 4e 75 6d 62 65 72 20 | ..... . Number | 00000cc0 6f 66 20 73 69 64 65 73 3d 6e 25 0d 00 84 06 20 |of sides=n%.... | 00000cd0 f4 0d 00 85 13 20 f4 20 33 2a 6e 25 2b 31 20 77 |..... . 3*n%+1 w| 00000ce0 6f 72 64 73 0d 00 86 25 20 f4 20 2d 2d 2d 2d 2d |ords...% . -----| 00000cf0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000d00 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 00 87 1e 20 f2 50 |---------.... .P| 00000d10 61 74 68 5f 4d 6f 76 65 28 78 25 2b 72 61 64 69 |ath_Move(x%+radi| 00000d20 75 73 25 2c 79 25 29 0d 00 88 12 20 e3 20 69 25 |us%,y%).... . i%| 00000d30 3d 31 20 b8 20 6e 25 2d 31 0d 00 89 20 20 20 58 |=1 . n%-1... X| 00000d40 25 3d 78 25 2b 72 61 64 69 75 73 25 2a 9b 28 32 |%=x%+radius%*.(2| 00000d50 2a af 2a 69 25 2f 6e 25 29 0d 00 8a 20 20 20 59 |*.*i%/n%)... Y| 00000d60 25 3d 79 25 2b 72 61 64 69 75 73 25 2a b5 28 32 |%=y%+radius%*.(2| 00000d70 2a af 2a 69 25 2f 6e 25 29 0d 00 8b 17 20 20 f2 |*.*i%/n%).... .| 00000d80 50 61 74 68 5f 44 72 61 77 28 58 25 2c 59 25 29 |Path_Draw(X%,Y%)| 00000d90 0d 00 8c 07 20 20 ed 0d 00 8d 18 20 f2 50 61 74 |.... ..... .Pat| 00000da0 68 5f 43 6c 6f 73 65 57 69 74 68 4c 69 6e 65 0d |h_CloseWithLine.| 00000db0 00 8e 06 20 e1 0d 00 8f 04 0d 00 90 4e f4 20 2a |... ........N. *| 00000dc0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000e00 2a 2a 2a 2a 2a 2a 2a 0d 00 91 05 f4 0d 00 92 17 |*******.........| 00000e10 f4 20 53 4f 4d 45 20 50 41 54 48 20 4f 42 4a 45 |. SOME PATH OBJE| 00000e20 43 54 53 0d 00 93 05 f4 0d 00 94 4e f4 20 2a 2a |CTS........N. **| 00000e30 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000e70 2a 2a 2a 2a 2a 2a 0d 00 95 04 0d 00 96 31 dd 20 |******.......1. | 00000e80 a4 50 61 74 68 5f 43 72 65 61 74 65 52 65 63 74 |.Path_CreateRect| 00000e90 61 6e 67 6c 65 28 78 25 2c 79 25 2c 77 69 64 74 |angle(x%,y%,widt| 00000ea0 68 25 2c 68 65 69 67 68 74 25 29 0d 00 97 11 20 |h%,height%).... | 00000eb0 ea 20 72 65 63 74 61 6e 67 6c 65 25 0d 00 98 25 |. rectangle%...%| 00000ec0 20 f2 50 61 74 68 5f 4f 62 6a 65 63 74 42 65 67 | .Path_ObjectBeg| 00000ed0 69 6e 28 72 65 63 74 61 6e 67 6c 65 25 2c 31 35 |in(rectangle%,15| 00000ee0 29 0d 00 99 2a 20 f2 50 61 74 68 5f 52 65 63 74 |)...* .Path_Rect| 00000ef0 61 6e 67 6c 65 28 78 25 2c 79 25 2c 77 69 64 74 |angle(x%,y%,widt| 00000f00 68 25 2c 68 65 69 67 68 74 25 29 0d 00 9a 14 20 |h%,height%).... | 00000f10 f2 50 61 74 68 5f 4f 62 6a 65 63 74 45 6e 64 0d |.Path_ObjectEnd.| 00000f20 00 9b 0f 3d 72 65 63 74 61 6e 67 6c 65 25 0d 00 |...=rectangle%..| 00000f30 9c 04 0d 00 9d 26 dd 20 a4 50 61 74 68 5f 43 72 |.....&. .Path_Cr| 00000f40 65 61 74 65 53 71 75 61 72 65 28 78 25 2c 79 25 |eateSquare(x%,y%| 00000f50 2c 77 69 64 74 68 25 29 0d 00 9e 0e 20 ea 20 73 |,width%).... . s| 00000f60 71 75 61 72 65 25 0d 00 9f 22 20 f2 50 61 74 68 |quare%..." .Path| 00000f70 5f 4f 62 6a 65 63 74 42 65 67 69 6e 28 73 71 75 |_ObjectBegin(squ| 00000f80 61 72 65 25 2c 31 35 29 0d 00 a0 1f 20 f2 50 61 |are%,15).... .Pa| 00000f90 74 68 5f 53 71 75 61 72 65 28 78 25 2c 79 25 2c |th_Square(x%,y%,| 00000fa0 77 69 64 74 68 25 29 0d 00 a1 14 20 f2 50 61 74 |width%).... .Pat| 00000fb0 68 5f 4f 62 6a 65 63 74 45 6e 64 0d 00 a2 0c 3d |h_ObjectEnd....=| 00000fc0 73 71 75 61 72 65 25 0d 00 a3 04 0d 00 a4 2d dd |square%.......-.| 00000fd0 20 a4 50 61 74 68 5f 43 72 65 61 74 65 54 72 69 | .Path_CreateTri| 00000fe0 61 6e 67 6c 65 28 41 25 2c 61 25 2c 42 25 2c 62 |angle(A%,a%,B%,b| 00000ff0 25 2c 43 25 2c 63 25 29 0d 00 a5 10 20 ea 20 74 |%,C%,c%).... . t| 00001000 72 69 61 6e 67 6c 65 25 0d 00 a6 24 20 f2 50 61 |riangle%...$ .Pa| 00001010 74 68 5f 4f 62 6a 65 63 74 42 65 67 69 6e 28 74 |th_ObjectBegin(t| 00001020 72 69 61 6e 67 6c 65 25 2c 31 32 29 0d 00 a7 26 |riangle%,12)...&| 00001030 20 f2 50 61 74 68 5f 54 72 69 61 6e 67 6c 65 28 | .Path_Triangle(| 00001040 41 25 2c 61 25 2c 42 25 2c 62 25 2c 43 25 2c 63 |A%,a%,B%,b%,C%,c| 00001050 25 29 0d 00 a8 14 20 f2 50 61 74 68 5f 4f 62 6a |%).... .Path_Obj| 00001060 65 63 74 45 6e 64 0d 00 a9 0e 3d 74 72 69 61 6e |ectEnd....=trian| 00001070 67 6c 65 25 0d 00 aa 04 0d 00 ab 32 dd 20 a4 50 |gle%.......2. .P| 00001080 61 74 68 5f 43 72 65 61 74 65 52 65 67 75 6c 61 |ath_CreateRegula| 00001090 72 50 6f 6c 79 67 6f 6e 28 78 25 2c 79 25 2c 72 |rPolygon(x%,y%,r| 000010a0 61 64 69 75 73 25 2c 6e 25 29 0d 00 ac 0f 20 ea |adius%,n%).... .| 000010b0 20 70 6f 6c 79 67 6f 6e 25 0d 00 ad 27 20 f2 50 | polygon%...' .P| 000010c0 61 74 68 5f 4f 62 6a 65 63 74 42 65 67 69 6e 28 |ath_ObjectBegin(| 000010d0 70 6f 6c 79 67 6f 6e 25 2c 33 2a 6e 25 2b 33 29 |polygon%,3*n%+3)| 000010e0 0d 00 ae 2b 20 f2 50 61 74 68 5f 52 65 67 75 6c |...+ .Path_Regul| 000010f0 61 72 50 6f 6c 79 67 6f 6e 28 78 25 2c 79 25 2c |arPolygon(x%,y%,| 00001100 72 61 64 69 75 73 25 2c 6e 25 29 0d 00 af 14 20 |radius%,n%).... | 00001110 f2 50 61 74 68 5f 4f 62 6a 65 63 74 45 6e 64 0d |.Path_ObjectEnd.| 00001120 00 b0 0d 3d 70 6f 6c 79 67 6f 6e 25 0d 00 b1 05 |...=polygon%....| 00001130 20 0d 00 b2 04 0d ff | ......| 00001137