Home » Archimedes archive » Acorn Computing » 1994 03.adf » 9403 » Draw/Example4
Draw/Example4
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 » Acorn Computing » 1994 03.adf » 9403 |
Filename: | Draw/Example4 |
Read OK: | ✔ |
File size: | 0D70 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM > Example4 20 30REM The draw module - Example 4 40REM Show some of the other things you can do with the draw module 50REM by Ben Summers 60 70 80ONERROR REPORT:PRINT" at line "ERL:END 90 100REM find a suitible mode (multisync if possible) 110SYS "OS_CheckModeValid",20 TO ;f% 120IF (f% AND 2) = 2 THEN MODE 12 ELSE MODE 20 130 140OFF 150 160 170REM first, make a path... 180 190RESTORE 200DIM path% 1024 210 220n = 0 230REPEAT 240 READ e% 250 path%!(n*4) = e% 260 n += 1 270UNTIL e% = -1 280 290DATA 2,-32*512,0, 8,0,32*512 300DATA 6,16*512,32*512,32*512,16*512,32*512,0 310DATA 8,0,-32*512, 5 320DATA 2,-8*512,0, 8,8*512,0, 5 330DATA 2,0,-8*512, 8,0,8*512, 5 340DATA 0, -1 350 360CLS 370 380PRINT TAB(0,0) "Click on the start point of the curve." 390 400*pointer 1 410 420REM **************** make the curve path 430 440DIM curve% 64 450curve%!0 = 2 460PROCget_point(curve%!4, curve%!8, &0000FF00) 470curve%!12 = 6 480 490PRINT TAB(0,0) "Click on the first control point" SPC(10) 500PROCget_point(curve%!16, curve%!20, &00FF0000) 510 520PRINT TAB(0,0) "Click on the second control point" SPC(10) 530PROCget_point(curve%!24, curve%!28, &00FF0000) 540 550PRINT TAB(0,0) "Click on the end point" SPC(12) 560PROCget_point(curve%!32, curve%!36, &0000FF00) 570 580curve%!40 = 4 590curve%!44 = 0 600 610 620 630REM **************** draw it onto the screen 640 650DIM cap_join% 32 660 670cap_join%?0 = 0 680cap_join%?1 = 0 690cap_join%?2 = 0 700cap_join%?3 = 0 710cap_join%!4 = &100000 :REM mitre limit 720 730line_thickness% = 4*256 740 750SYS "ColourTrans_SetGCOL",&FFFFFF00,,,0,0 760SYS "Draw_Stroke",curve%,0,0,0,line_thickness%,cap_join%,0 770 780 790 800REM **************** now, here's the clever bit... get the 810REM draw module to split the path up into 820REM individual lines 830 840 850REM find out how large a buffer we need for the output path 860 870flatness% = 8*256 880SYS "Draw_ProcessPath",curve%,(1<<28),0,flatness%,0,0,0,3 TO size% 890 900DIM points% size% 910 920REM initialise the points% path to give it's size 930points%!0 = 0 940points%!4 = size% 950 960REM get a new path 970SYS "Draw_ProcessPath",curve%,(1<<28),0,flatness%,0,0,0,points% TO size% 980 990 1000 1010REM **************** go though the output path plotting a 1020REM copy of the path at each point 1030REM and rotate it a little each time 1040 1050theta = 0 1060done = FALSE 1070i% = 0 1080inc% = 0 1090DIM transform% 32 1100 1110SYS "ColourTrans_SetGCOL",&00FF0000,,,0,0 1120 1130WHILE done = FALSE 1140 1150 plot = FALSE 1160 1170 REM hanlde element type 1180 CASE points%!i% OF 1190 WHEN 0:done = TRUE 1200 WHEN 1:done = TRUE 1210 WHEN 2:plot = TRUE:inc% = 12 1220 WHEN 3:plot = TRUE:inc% = 12 1230 WHEN 4:inc% = 4 1240 WHEN 5:inc% = 4 1250 WHEN 6:plot = TRUE:inc% = 28 1260 WHEN 7:plot = TRUE:inc% = 12 1270 WHEN 8:plot = TRUE:inc% = 12 1280 ENDCASE 1290 1300 IF(plot AND done = FALSE) THEN 1310 1320 a = COSRADtheta 1330 b = SINRADtheta 1340 c = -SINRADtheta 1350 d = COSRADtheta 1360 1370 transform%!0 = a * 2^16 1380 transform%!4 = b * 2^16 1390 transform%!8 = c * 2^16 1400 transform%!12 = d * 2^16 1410 transform%!16 = points%!(i% + 4) 1420 transform%!20 = points%!(i% + 8) : REM translation coords 1430 1440 SYS "Draw_Stroke",path%,0,transform%,0,line_thickness%,cap_join%,0 1450 1460 theta += 10 1470 ENDIF 1480 1490 i% += inc% 1500 1510ENDWHILE 1520 1530 1540 1550END 1560 1570 1580DEFPROCget_point(RETURN x%, RETURN y%, col%) 1590 LOCAL mx%, my%, mb% 1600 1610 REPEAT:MOUSE mx%,my%,mb%:UNTIL mb% <> 0 1620 REPEAT:MOUSE mx%,my%,mb%:UNTIL mb% = 0 1630 1640 x% = mx%*256 1650 y% = my%*256 1660 1670 SYS "ColourTrans_SetGCOL",col%,,,0,0 1680 CIRCLEFILL mx%,my%,12 1690ENDPROC 1700 1710
� > Example4 !� The draw module - Example 4 (C� Show some of the other things you can do with the draw module 2� by Ben Summers < F P� �:�" at line "�:� Z d2� find a suitible mode (multisync if possible) n#ș "OS_CheckModeValid",20 � ;f% x � (f% � 2) = 2 � � 12 � � 20 � �� � � �� first, make a path... � �� �� path% 1024 � � n = 0 �� � � e% � path%!(n*4) = e% n += 1 � e% = -1 "� 2,-32*512,0, 8,0,32*512 ,,� 6,16*512,32*512,32*512,16*512,32*512,0 6� 8,0,-32*512, 5 @� 2,-8*512,0, 8,8*512,0, 5 J� 2,0,-8*512, 8,0,8*512, 5 T� 0, -1 ^ h� r |4� �0,0) "Click on the start point of the curve." � �*pointer 1 � �*� **************** make the curve path � �� curve% 64 �curve%!0 = 2 �-�get_point(curve%!4, curve%!8, &0000FF00) �curve%!12 = 6 � �4� �0,0) "Click on the first control point" �(10) �/�get_point(curve%!16, curve%!20, &00FF0000) � 5� �0,0) "Click on the second control point" �(10) /�get_point(curve%!24, curve%!28, &00FF0000) &*� �0,0) "Click on the end point" �(12) 0/�get_point(curve%!32, curve%!36, &0000FF00) : Dcurve%!40 = 4 Ncurve%!44 = 0 X b l v.� **************** draw it onto the screen � �� cap_join% 32 � �cap_join%?0 = 0 �cap_join%?1 = 0 �cap_join%?2 = 0 �cap_join%?3 = 0 �0cap_join%!4 = &100000 :� mitre limit � �line_thickness% = 4*256 � �,ș "ColourTrans_SetGCOL",&FFFFFF00,,,0,0 �=ș "Draw_Stroke",curve%,0,0,0,line_thickness%,cap_join%,0 <� **************** now, here's the clever bit... get the *<� draw module to split the path up into 4'� individual lines > H R=� find out how large a buffer we need for the output path \ fflatness% = 8*256 pDș "Draw_ProcessPath",curve%,(1<<28),0,flatness%,0,0,0,3 � size% z �� points% size% � �3� initialise the points% path to give it's size �points%!0 = 0 �points%!4 = size% � �� get a new path �Jș "Draw_ProcessPath",curve%,(1<<28),0,flatness%,0,0,0,points% � size% � � � �;� **************** go though the output path plotting a �5� copy of the path at each point 7� and rotate it a little each time theta = 0 $done = � . i% = 0 8inc% = 0 B� transform% 32 L V,ș "ColourTrans_SetGCOL",&00FF0000,,,0,0 ` jȕ done = � t ~ plot = � � � � hanlde element type � Ȏ points%!i% � � � 0:done = � � � 1:done = � � � 2:plot = �:inc% = 12 � � 3:plot = �:inc% = 12 � � 4:inc% = 4 � � 5:inc% = 4 � � 6:plot = �:inc% = 28 � � 7:plot = �:inc% = 12 � � 8:plot = �:inc% = 12 � �(plot � done = �) � ( a = ��theta 2 b = ��theta < c = -��theta F d = ��theta P Z transform%!0 = a * 2^16 d transform%!4 = b * 2^16 n transform%!8 = c * 2^16 x transform%!12 = d * 2^16 �( transform%!16 = points%!(i% + 4) �A transform%!20 = points%!(i% + 8) : � translation coords � �I ș "Draw_Stroke",path%,0,transform%,0,line_thickness%,cap_join%,0 � � theta += 10 � � � � i% += inc% � �� � � � " ,!��get_point(� x%, � y%, col%) 6 � mx%, my%, mb% @ J! �:ȗ mx%,my%,mb%:� mb% <> 0 T �:ȗ mx%,my%,mb%:� mb% = 0 ^ h x% = mx%*256 r y% = my%*256 | �) ș "ColourTrans_SetGCOL",col%,,,0,0 � ȏȐ mx%,my%,12 �� � � �
00000000 0d 00 0a 10 f4 20 3e 20 45 78 61 6d 70 6c 65 34 |..... > Example4| 00000010 0d 00 14 04 0d 00 1e 21 f4 20 54 68 65 20 64 72 |.......!. The dr| 00000020 61 77 20 6d 6f 64 75 6c 65 20 2d 20 45 78 61 6d |aw module - Exam| 00000030 70 6c 65 20 34 0d 00 28 43 f4 20 53 68 6f 77 20 |ple 4..(C. Show | 00000040 73 6f 6d 65 20 6f 66 20 74 68 65 20 6f 74 68 65 |some of the othe| 00000050 72 20 74 68 69 6e 67 73 20 79 6f 75 20 63 61 6e |r things you can| 00000060 20 64 6f 20 77 69 74 68 20 74 68 65 20 64 72 61 | do with the dra| 00000070 77 20 6d 6f 64 75 6c 65 0d 00 32 14 f4 20 62 79 |w module..2.. by| 00000080 20 42 65 6e 20 53 75 6d 6d 65 72 73 0d 00 3c 04 | Ben Summers..<.| 00000090 0d 00 46 04 0d 00 50 18 ee 85 20 f6 3a f1 22 20 |..F...P... .:." | 000000a0 61 74 20 6c 69 6e 65 20 22 9e 3a e0 0d 00 5a 04 |at line ".:...Z.| 000000b0 0d 00 64 32 f4 20 66 69 6e 64 20 61 20 73 75 69 |..d2. find a sui| 000000c0 74 69 62 6c 65 20 6d 6f 64 65 20 28 6d 75 6c 74 |tible mode (mult| 000000d0 69 73 79 6e 63 20 69 66 20 70 6f 73 73 69 62 6c |isync if possibl| 000000e0 65 29 0d 00 6e 23 c8 99 20 22 4f 53 5f 43 68 65 |e)..n#.. "OS_Che| 000000f0 63 6b 4d 6f 64 65 56 61 6c 69 64 22 2c 32 30 20 |ckModeValid",20 | 00000100 b8 20 3b 66 25 0d 00 78 20 e7 20 28 66 25 20 80 |. ;f%..x . (f% .| 00000110 20 32 29 20 3d 20 32 20 8c 20 eb 20 31 32 20 8b | 2) = 2 . . 12 .| 00000120 20 eb 20 32 30 0d 00 82 04 0d 00 8c 05 87 0d 00 | . 20...........| 00000130 96 04 0d 00 a0 04 0d 00 aa 1b f4 20 66 69 72 73 |........... firs| 00000140 74 2c 20 6d 61 6b 65 20 61 20 70 61 74 68 2e 2e |t, make a path..| 00000150 2e 0d 00 b4 04 0d 00 be 05 f7 0d 00 c8 10 de 20 |............... | 00000160 70 61 74 68 25 20 31 30 32 34 0d 00 d2 04 0d 00 |path% 1024......| 00000170 dc 09 6e 20 3d 20 30 0d 00 e6 05 f5 0d 00 f0 0a |..n = 0.........| 00000180 20 20 f3 20 65 25 0d 00 fa 16 20 20 70 61 74 68 | . e%.... path| 00000190 25 21 28 6e 2a 34 29 20 3d 20 65 25 0d 01 04 0c |%!(n*4) = e%....| 000001a0 20 20 6e 20 2b 3d 20 31 0d 01 0e 0d fd 20 65 25 | n += 1..... e%| 000001b0 20 3d 20 2d 31 0d 01 18 04 0d 01 22 1d dc 20 32 | = -1......".. 2| 000001c0 2c 2d 33 32 2a 35 31 32 2c 30 2c 20 38 2c 30 2c |,-32*512,0, 8,0,| 000001d0 33 32 2a 35 31 32 0d 01 2c 2c dc 20 36 2c 31 36 |32*512..,,. 6,16| 000001e0 2a 35 31 32 2c 33 32 2a 35 31 32 2c 33 32 2a 35 |*512,32*512,32*5| 000001f0 31 32 2c 31 36 2a 35 31 32 2c 33 32 2a 35 31 32 |12,16*512,32*512| 00000200 2c 30 0d 01 36 14 dc 20 38 2c 30 2c 2d 33 32 2a |,0..6.. 8,0,-32*| 00000210 35 31 32 2c 20 35 0d 01 40 1e dc 20 32 2c 2d 38 |512, 5..@.. 2,-8| 00000220 2a 35 31 32 2c 30 2c 20 38 2c 38 2a 35 31 32 2c |*512,0, 8,8*512,| 00000230 30 2c 20 35 0d 01 4a 1e dc 20 32 2c 30 2c 2d 38 |0, 5..J.. 2,0,-8| 00000240 2a 35 31 32 2c 20 38 2c 30 2c 38 2a 35 31 32 2c |*512, 8,0,8*512,| 00000250 20 35 0d 01 54 0b dc 20 30 2c 20 2d 31 0d 01 5e | 5..T.. 0, -1..^| 00000260 04 0d 01 68 05 db 0d 01 72 04 0d 01 7c 34 f1 20 |...h....r...|4. | 00000270 8a 30 2c 30 29 20 22 43 6c 69 63 6b 20 6f 6e 20 |.0,0) "Click on | 00000280 74 68 65 20 73 74 61 72 74 20 70 6f 69 6e 74 20 |the start point | 00000290 6f 66 20 74 68 65 20 63 75 72 76 65 2e 22 0d 01 |of the curve."..| 000002a0 86 04 0d 01 90 0e 2a 70 6f 69 6e 74 65 72 20 31 |......*pointer 1| 000002b0 0d 01 9a 04 0d 01 a4 2a f4 20 2a 2a 2a 2a 2a 2a |.......*. ******| 000002c0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 20 6d 61 6b 65 20 |********** make | 000002d0 74 68 65 20 63 75 72 76 65 20 70 61 74 68 0d 01 |the curve path..| 000002e0 ae 04 0d 01 b8 0f de 20 63 75 72 76 65 25 20 36 |....... curve% 6| 000002f0 34 0d 01 c2 10 63 75 72 76 65 25 21 30 20 3d 20 |4....curve%!0 = | 00000300 32 0d 01 cc 2d f2 67 65 74 5f 70 6f 69 6e 74 28 |2...-.get_point(| 00000310 63 75 72 76 65 25 21 34 2c 20 63 75 72 76 65 25 |curve%!4, curve%| 00000320 21 38 2c 20 26 30 30 30 30 46 46 30 30 29 0d 01 |!8, &0000FF00)..| 00000330 d6 11 63 75 72 76 65 25 21 31 32 20 3d 20 36 0d |..curve%!12 = 6.| 00000340 01 e0 04 0d 01 ea 34 f1 20 8a 30 2c 30 29 20 22 |......4. .0,0) "| 00000350 43 6c 69 63 6b 20 6f 6e 20 74 68 65 20 66 69 72 |Click on the fir| 00000360 73 74 20 63 6f 6e 74 72 6f 6c 20 70 6f 69 6e 74 |st control point| 00000370 22 20 89 28 31 30 29 0d 01 f4 2f f2 67 65 74 5f |" .(10).../.get_| 00000380 70 6f 69 6e 74 28 63 75 72 76 65 25 21 31 36 2c |point(curve%!16,| 00000390 20 63 75 72 76 65 25 21 32 30 2c 20 26 30 30 46 | curve%!20, &00F| 000003a0 46 30 30 30 30 29 0d 01 fe 04 0d 02 08 35 f1 20 |F0000).......5. | 000003b0 8a 30 2c 30 29 20 22 43 6c 69 63 6b 20 6f 6e 20 |.0,0) "Click on | 000003c0 74 68 65 20 73 65 63 6f 6e 64 20 63 6f 6e 74 72 |the second contr| 000003d0 6f 6c 20 70 6f 69 6e 74 22 20 89 28 31 30 29 0d |ol point" .(10).| 000003e0 02 12 2f f2 67 65 74 5f 70 6f 69 6e 74 28 63 75 |../.get_point(cu| 000003f0 72 76 65 25 21 32 34 2c 20 63 75 72 76 65 25 21 |rve%!24, curve%!| 00000400 32 38 2c 20 26 30 30 46 46 30 30 30 30 29 0d 02 |28, &00FF0000)..| 00000410 1c 04 0d 02 26 2a f1 20 8a 30 2c 30 29 20 22 43 |....&*. .0,0) "C| 00000420 6c 69 63 6b 20 6f 6e 20 74 68 65 20 65 6e 64 20 |lick on the end | 00000430 70 6f 69 6e 74 22 20 89 28 31 32 29 0d 02 30 2f |point" .(12)..0/| 00000440 f2 67 65 74 5f 70 6f 69 6e 74 28 63 75 72 76 65 |.get_point(curve| 00000450 25 21 33 32 2c 20 63 75 72 76 65 25 21 33 36 2c |%!32, curve%!36,| 00000460 20 26 30 30 30 30 46 46 30 30 29 0d 02 3a 04 0d | &0000FF00)..:..| 00000470 02 44 11 63 75 72 76 65 25 21 34 30 20 3d 20 34 |.D.curve%!40 = 4| 00000480 0d 02 4e 11 63 75 72 76 65 25 21 34 34 20 3d 20 |..N.curve%!44 = | 00000490 30 0d 02 58 04 0d 02 62 04 0d 02 6c 04 0d 02 76 |0..X...b...l...v| 000004a0 2e f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |.. *************| 000004b0 2a 2a 2a 20 64 72 61 77 20 69 74 20 6f 6e 74 6f |*** draw it onto| 000004c0 20 74 68 65 20 73 63 72 65 65 6e 0d 02 80 04 0d | the screen.....| 000004d0 02 8a 12 de 20 63 61 70 5f 6a 6f 69 6e 25 20 33 |.... cap_join% 3| 000004e0 32 0d 02 94 04 0d 02 9e 13 63 61 70 5f 6a 6f 69 |2........cap_joi| 000004f0 6e 25 3f 30 20 3d 20 30 0d 02 a8 13 63 61 70 5f |n%?0 = 0....cap_| 00000500 6a 6f 69 6e 25 3f 31 20 3d 20 30 0d 02 b2 13 63 |join%?1 = 0....c| 00000510 61 70 5f 6a 6f 69 6e 25 3f 32 20 3d 20 30 0d 02 |ap_join%?2 = 0..| 00000520 bc 13 63 61 70 5f 6a 6f 69 6e 25 3f 33 20 3d 20 |..cap_join%?3 = | 00000530 30 0d 02 c6 30 63 61 70 5f 6a 6f 69 6e 25 21 34 |0...0cap_join%!4| 00000540 20 3d 20 26 31 30 30 30 30 30 20 20 20 20 20 20 | = &100000 | 00000550 20 20 20 3a f4 20 6d 69 74 72 65 20 6c 69 6d 69 | :. mitre limi| 00000560 74 0d 02 d0 04 0d 02 da 1b 6c 69 6e 65 5f 74 68 |t........line_th| 00000570 69 63 6b 6e 65 73 73 25 20 3d 20 34 2a 32 35 36 |ickness% = 4*256| 00000580 0d 02 e4 04 0d 02 ee 2c c8 99 20 22 43 6f 6c 6f |.......,.. "Colo| 00000590 75 72 54 72 61 6e 73 5f 53 65 74 47 43 4f 4c 22 |urTrans_SetGCOL"| 000005a0 2c 26 46 46 46 46 46 46 30 30 2c 2c 2c 30 2c 30 |,&FFFFFF00,,,0,0| 000005b0 0d 02 f8 3d c8 99 20 22 44 72 61 77 5f 53 74 72 |...=.. "Draw_Str| 000005c0 6f 6b 65 22 2c 63 75 72 76 65 25 2c 30 2c 30 2c |oke",curve%,0,0,| 000005d0 30 2c 6c 69 6e 65 5f 74 68 69 63 6b 6e 65 73 73 |0,line_thickness| 000005e0 25 2c 63 61 70 5f 6a 6f 69 6e 25 2c 30 0d 03 02 |%,cap_join%,0...| 000005f0 04 0d 03 0c 04 0d 03 16 04 0d 03 20 3c f4 20 2a |........... <. *| 00000600 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 20 |*************** | 00000610 6e 6f 77 2c 20 68 65 72 65 27 73 20 74 68 65 20 |now, here's the | 00000620 63 6c 65 76 65 72 20 62 69 74 2e 2e 2e 20 67 65 |clever bit... ge| 00000630 74 20 74 68 65 0d 03 2a 3c f4 20 20 20 20 20 20 |t the..*<. | 00000640 20 20 20 20 20 20 20 20 20 20 20 20 64 72 61 77 | draw| 00000650 20 6d 6f 64 75 6c 65 20 74 6f 20 73 70 6c 69 74 | module to split| 00000660 20 74 68 65 20 70 61 74 68 20 75 70 20 69 6e 74 | the path up int| 00000670 6f 0d 03 34 27 f4 20 20 20 20 20 20 20 20 20 20 |o..4'. | 00000680 20 20 20 20 20 20 20 20 69 6e 64 69 76 69 64 75 | individu| 00000690 61 6c 20 6c 69 6e 65 73 0d 03 3e 04 0d 03 48 04 |al lines..>...H.| 000006a0 0d 03 52 3d f4 20 66 69 6e 64 20 6f 75 74 20 68 |..R=. find out h| 000006b0 6f 77 20 6c 61 72 67 65 20 61 20 62 75 66 66 65 |ow large a buffe| 000006c0 72 20 77 65 20 6e 65 65 64 20 66 6f 72 20 74 68 |r we need for th| 000006d0 65 20 6f 75 74 70 75 74 20 70 61 74 68 0d 03 5c |e output path..\| 000006e0 04 0d 03 66 15 66 6c 61 74 6e 65 73 73 25 20 3d |...f.flatness% =| 000006f0 20 38 2a 32 35 36 0d 03 70 44 c8 99 20 22 44 72 | 8*256..pD.. "Dr| 00000700 61 77 5f 50 72 6f 63 65 73 73 50 61 74 68 22 2c |aw_ProcessPath",| 00000710 63 75 72 76 65 25 2c 28 31 3c 3c 32 38 29 2c 30 |curve%,(1<<28),0| 00000720 2c 66 6c 61 74 6e 65 73 73 25 2c 30 2c 30 2c 30 |,flatness%,0,0,0| 00000730 2c 33 20 b8 20 73 69 7a 65 25 0d 03 7a 04 0d 03 |,3 . size%..z...| 00000740 84 13 de 20 70 6f 69 6e 74 73 25 20 73 69 7a 65 |... points% size| 00000750 25 0d 03 8e 04 0d 03 98 33 f4 20 69 6e 69 74 69 |%.......3. initi| 00000760 61 6c 69 73 65 20 74 68 65 20 70 6f 69 6e 74 73 |alise the points| 00000770 25 20 70 61 74 68 20 74 6f 20 67 69 76 65 20 69 |% path to give i| 00000780 74 27 73 20 73 69 7a 65 0d 03 a2 11 70 6f 69 6e |t's size....poin| 00000790 74 73 25 21 30 20 3d 20 30 0d 03 ac 15 70 6f 69 |ts%!0 = 0....poi| 000007a0 6e 74 73 25 21 34 20 3d 20 73 69 7a 65 25 0d 03 |nts%!4 = size%..| 000007b0 b6 04 0d 03 c0 14 f4 20 67 65 74 20 61 20 6e 65 |....... get a ne| 000007c0 77 20 70 61 74 68 0d 03 ca 4a c8 99 20 22 44 72 |w path...J.. "Dr| 000007d0 61 77 5f 50 72 6f 63 65 73 73 50 61 74 68 22 2c |aw_ProcessPath",| 000007e0 63 75 72 76 65 25 2c 28 31 3c 3c 32 38 29 2c 30 |curve%,(1<<28),0| 000007f0 2c 66 6c 61 74 6e 65 73 73 25 2c 30 2c 30 2c 30 |,flatness%,0,0,0| 00000800 2c 70 6f 69 6e 74 73 25 20 b8 20 73 69 7a 65 25 |,points% . size%| 00000810 0d 03 d4 04 0d 03 de 04 0d 03 e8 04 0d 03 f2 3b |...............;| 00000820 f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |. **************| 00000830 2a 2a 20 67 6f 20 74 68 6f 75 67 68 20 74 68 65 |** go though the| 00000840 20 6f 75 74 70 75 74 20 70 61 74 68 20 70 6c 6f | output path plo| 00000850 74 74 69 6e 67 20 61 0d 03 fc 35 f4 20 20 20 20 |tting a...5. | 00000860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f | co| 00000870 70 79 20 6f 66 20 74 68 65 20 70 61 74 68 20 61 |py of the path a| 00000880 74 20 65 61 63 68 20 70 6f 69 6e 74 0d 04 06 37 |t each point...7| 00000890 f4 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 000008a0 20 20 20 61 6e 64 20 72 6f 74 61 74 65 20 69 74 | and rotate it| 000008b0 20 61 20 6c 69 74 74 6c 65 20 65 61 63 68 20 74 | a little each t| 000008c0 69 6d 65 0d 04 10 04 0d 04 1a 0d 74 68 65 74 61 |ime........theta| 000008d0 20 3d 20 30 0d 04 24 0c 64 6f 6e 65 20 3d 20 a3 | = 0..$.done = .| 000008e0 0d 04 2e 0a 69 25 20 3d 20 30 0d 04 38 0c 69 6e |....i% = 0..8.in| 000008f0 63 25 20 3d 20 30 0d 04 42 13 de 20 74 72 61 6e |c% = 0..B.. tran| 00000900 73 66 6f 72 6d 25 20 33 32 0d 04 4c 04 0d 04 56 |sform% 32..L...V| 00000910 2c c8 99 20 22 43 6f 6c 6f 75 72 54 72 61 6e 73 |,.. "ColourTrans| 00000920 5f 53 65 74 47 43 4f 4c 22 2c 26 30 30 46 46 30 |_SetGCOL",&00FF0| 00000930 30 30 30 2c 2c 2c 30 2c 30 0d 04 60 04 0d 04 6a |000,,,0,0..`...j| 00000940 0f c8 95 20 64 6f 6e 65 20 3d 20 a3 0d 04 74 04 |... done = ...t.| 00000950 0d 04 7e 0e 20 20 70 6c 6f 74 20 3d 20 a3 0d 04 |..~. plot = ...| 00000960 88 04 0d 04 92 1b 20 20 f4 20 68 61 6e 6c 64 65 |...... . hanlde| 00000970 20 65 6c 65 6d 65 6e 74 20 74 79 70 65 0d 04 9c | element type...| 00000980 15 20 20 c8 8e 20 70 6f 69 6e 74 73 25 21 69 25 |. .. points%!i%| 00000990 20 ca 0d 04 a6 14 20 20 20 20 c9 20 30 3a 64 6f | ..... . 0:do| 000009a0 6e 65 20 3d 20 b9 0d 04 b0 14 20 20 20 20 c9 20 |ne = ..... . | 000009b0 31 3a 64 6f 6e 65 20 3d 20 b9 0d 04 ba 1e 20 20 |1:done = ..... | 000009c0 20 20 c9 20 32 3a 70 6c 6f 74 20 3d 20 b9 3a 69 | . 2:plot = .:i| 000009d0 6e 63 25 20 3d 20 31 32 0d 04 c4 1e 20 20 20 20 |nc% = 12.... | 000009e0 c9 20 33 3a 70 6c 6f 74 20 3d 20 b9 3a 69 6e 63 |. 3:plot = .:inc| 000009f0 25 20 3d 20 31 32 0d 04 ce 14 20 20 20 20 c9 20 |% = 12.... . | 00000a00 34 3a 69 6e 63 25 20 3d 20 34 0d 04 d8 14 20 20 |4:inc% = 4.... | 00000a10 20 20 c9 20 35 3a 69 6e 63 25 20 3d 20 34 0d 04 | . 5:inc% = 4..| 00000a20 e2 1e 20 20 20 20 c9 20 36 3a 70 6c 6f 74 20 3d |.. . 6:plot =| 00000a30 20 b9 3a 69 6e 63 25 20 3d 20 32 38 0d 04 ec 1e | .:inc% = 28....| 00000a40 20 20 20 20 c9 20 37 3a 70 6c 6f 74 20 3d 20 b9 | . 7:plot = .| 00000a50 3a 69 6e 63 25 20 3d 20 31 32 0d 04 f6 1e 20 20 |:inc% = 12.... | 00000a60 20 20 c9 20 38 3a 70 6c 6f 74 20 3d 20 b9 3a 69 | . 8:plot = .:i| 00000a70 6e 63 25 20 3d 20 31 32 0d 05 00 07 20 20 cb 0d |nc% = 12.... ..| 00000a80 05 0a 04 0d 05 14 1a 20 20 e7 28 70 6c 6f 74 20 |....... .(plot | 00000a90 80 20 64 6f 6e 65 20 3d 20 a3 29 20 8c 0d 05 1e |. done = .) ....| 00000aa0 04 0d 05 28 13 20 20 20 20 61 20 3d 20 9b b2 74 |...(. a = ..t| 00000ab0 68 65 74 61 0d 05 32 13 20 20 20 20 62 20 3d 20 |heta..2. b = | 00000ac0 b5 b2 74 68 65 74 61 0d 05 3c 14 20 20 20 20 63 |..theta..<. c| 00000ad0 20 3d 20 2d b5 b2 74 68 65 74 61 0d 05 46 13 20 | = -..theta..F. | 00000ae0 20 20 20 64 20 3d 20 9b b2 74 68 65 74 61 0d 05 | d = ..theta..| 00000af0 50 04 0d 05 5a 20 20 20 20 20 74 72 61 6e 73 66 |P...Z transf| 00000b00 6f 72 6d 25 21 30 20 20 3d 20 61 20 2a 20 32 5e |orm%!0 = a * 2^| 00000b10 31 36 0d 05 64 20 20 20 20 20 74 72 61 6e 73 66 |16..d transf| 00000b20 6f 72 6d 25 21 34 20 20 3d 20 62 20 2a 20 32 5e |orm%!4 = b * 2^| 00000b30 31 36 0d 05 6e 20 20 20 20 20 74 72 61 6e 73 66 |16..n transf| 00000b40 6f 72 6d 25 21 38 20 20 3d 20 63 20 2a 20 32 5e |orm%!8 = c * 2^| 00000b50 31 36 0d 05 78 20 20 20 20 20 74 72 61 6e 73 66 |16..x transf| 00000b60 6f 72 6d 25 21 31 32 20 3d 20 64 20 2a 20 32 5e |orm%!12 = d * 2^| 00000b70 31 36 0d 05 82 28 20 20 20 20 74 72 61 6e 73 66 |16...( transf| 00000b80 6f 72 6d 25 21 31 36 20 3d 20 70 6f 69 6e 74 73 |orm%!16 = points| 00000b90 25 21 28 69 25 20 2b 20 34 29 0d 05 8c 41 20 20 |%!(i% + 4)...A | 00000ba0 20 20 74 72 61 6e 73 66 6f 72 6d 25 21 32 30 20 | transform%!20 | 00000bb0 3d 20 70 6f 69 6e 74 73 25 21 28 69 25 20 2b 20 |= points%!(i% + | 00000bc0 38 29 20 20 20 3a 20 f4 20 74 72 61 6e 73 6c 61 |8) : . transla| 00000bd0 74 69 6f 6e 20 63 6f 6f 72 64 73 0d 05 96 04 0d |tion coords.....| 00000be0 05 a0 49 20 20 20 20 c8 99 20 22 44 72 61 77 5f |..I .. "Draw_| 00000bf0 53 74 72 6f 6b 65 22 2c 70 61 74 68 25 2c 30 2c |Stroke",path%,0,| 00000c00 74 72 61 6e 73 66 6f 72 6d 25 2c 30 2c 6c 69 6e |transform%,0,lin| 00000c10 65 5f 74 68 69 63 6b 6e 65 73 73 25 2c 63 61 70 |e_thickness%,cap| 00000c20 5f 6a 6f 69 6e 25 2c 30 0d 05 aa 04 0d 05 b4 13 |_join%,0........| 00000c30 20 20 20 20 74 68 65 74 61 20 2b 3d 20 31 30 0d | theta += 10.| 00000c40 05 be 07 20 20 cd 0d 05 c8 04 0d 05 d2 10 20 20 |... ......... | 00000c50 69 25 20 2b 3d 20 69 6e 63 25 0d 05 dc 04 0d 05 |i% += inc%......| 00000c60 e6 05 ce 0d 05 f0 04 0d 05 fa 04 0d 06 04 04 0d |................| 00000c70 06 0e 05 e0 0d 06 18 04 0d 06 22 04 0d 06 2c 21 |.........."...,!| 00000c80 dd f2 67 65 74 5f 70 6f 69 6e 74 28 f8 20 78 25 |..get_point(. x%| 00000c90 2c 20 f8 20 79 25 2c 20 63 6f 6c 25 29 0d 06 36 |, . y%, col%)..6| 00000ca0 15 20 20 ea 20 6d 78 25 2c 20 6d 79 25 2c 20 6d |. . mx%, my%, m| 00000cb0 62 25 0d 06 40 04 0d 06 4a 21 20 20 f5 3a c8 97 |b%..@...J! .:..| 00000cc0 20 6d 78 25 2c 6d 79 25 2c 6d 62 25 3a fd 20 6d | mx%,my%,mb%:. m| 00000cd0 62 25 20 3c 3e 20 30 0d 06 54 20 20 20 f5 3a c8 |b% <> 0..T .:.| 00000ce0 97 20 6d 78 25 2c 6d 79 25 2c 6d 62 25 3a fd 20 |. mx%,my%,mb%:. | 00000cf0 6d 62 25 20 3d 20 30 0d 06 5e 04 0d 06 68 12 20 |mb% = 0..^...h. | 00000d00 20 78 25 20 3d 20 6d 78 25 2a 32 35 36 0d 06 72 | x% = mx%*256..r| 00000d10 12 20 20 79 25 20 3d 20 6d 79 25 2a 32 35 36 0d |. y% = my%*256.| 00000d20 06 7c 04 0d 06 86 29 20 20 c8 99 20 22 43 6f 6c |.|....) .. "Col| 00000d30 6f 75 72 54 72 61 6e 73 5f 53 65 74 47 43 4f 4c |ourTrans_SetGCOL| 00000d40 22 2c 63 6f 6c 25 2c 2c 2c 30 2c 30 0d 06 90 15 |",col%,,,0,0....| 00000d50 20 20 c8 8f c8 90 20 6d 78 25 2c 6d 79 25 2c 31 | .... mx%,my%,1| 00000d60 32 0d 06 9a 05 e1 0d 06 a4 04 0d 06 ae 04 0d ff |2...............| 00000d70