Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199403.adf » Disk1Mar94 » !AWMar94/Goodies/Basic/Fill/Stroke
!AWMar94/Goodies/Basic/Fill/Stroke
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 » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199403.adf » Disk1Mar94 |
Filename: | !AWMar94/Goodies/Basic/Fill/Stroke |
Read OK: | ✔ |
File size: | 03A1 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
1 2 3LIBRARY "PathLib:OS_units.Paths" 4LIBRARY "PathLib:OS_units.Styles" 5 6MODE MODE : PRINT "Even-odd fill in Draw_Stroke" 7 width%=800 8 object%=FNCreate_Object(0,0,width%) 9 style%=FNPath_CreateLineStyle(16) 10 dash%=FNPath_EquidistantDashPattern(64) 11 PROCPath_TriangularLeadingCaps(2,2) 12 13 ORIGIN 640,512 14 15 GCOL 1 16 SYS "Draw_Stroke",object%,&1A,,,style%!16,style%,dash% 17 18 REM PROCPath_SmoothDrawWithStyle(object%,2,style%,dash%) 19 20 21END 22 23DEF FNCreate_Object(x%,y%,width%) 24 LOCAL object% 25 PROCPath_ObjectBegin(object%,200) 26 REM First create sub-path square 27 PROCPath_Square(x%,y%,width%) 28 REM Then create sub-path line 29 h%=width%DIV4 30 a%=x%-h% : b%=y%-h% 31 PROCPath_Move(a%,b%) 32 PROCPath_Cubic(a%+2*h%,b%,a%,b%+2*h%,a%+2*h%,b%+2*h%) 33 PROCPath_Cubic(a%+2*h%,b%,a%,b%+2*h%,a%,b%) 34 PROCPath_CloseWithLine 35 PROCPath_ObjectEnd 36=object% 37 38 39 40
ț "PathLib:OS_units.Paths" ț "PathLib:OS_units.Styles" *� � : � "Even-odd fill in Draw_Stroke" width%=800 ' object%=�Create_Object(0,0,width%) & style%=�Path_CreateLineStyle(16) - dash%=�Path_EquidistantDashPattern(64) ' �Path_TriangularLeadingCaps(2,2) ȑ 640,512 � 1 : ș "Draw_Stroke",object%,&1A,,,style%!16,style%,dash% ; � PROCPath_SmoothDrawWithStyle(object%,2,style%,dash%) � "� �Create_Object(x%,y%,width%) � object% # �Path_ObjectBegin(object%,200) $ � First create sub-path square $ �Path_Square(x%,y%,width%) ! � Then create sub-path line h%=width%�4 a%=x%-h% : b%=y%-h% �Path_Move(a%,b%) < �Path_Cubic(a%+2*h%,b%,a%,b%+2*h%,a%+2*h%,b%+2*h%) !2 �Path_Cubic(a%+2*h%,b%,a%,b%+2*h%,a%,b%) "# �Path_CloseWithLine # �Path_ObjectEnd $=object% % & ' ( �
00000000 0d 00 01 04 0d 00 02 04 0d 00 03 1f c8 9b 20 22 |.............. "| 00000010 50 61 74 68 4c 69 62 3a 4f 53 5f 75 6e 69 74 73 |PathLib:OS_units| 00000020 2e 50 61 74 68 73 22 0d 00 04 20 c8 9b 20 22 50 |.Paths"... .. "P| 00000030 61 74 68 4c 69 62 3a 4f 53 5f 75 6e 69 74 73 2e |athLib:OS_units.| 00000040 53 74 79 6c 65 73 22 0d 00 05 04 0d 00 06 2a eb |Styles".......*.| 00000050 20 eb 20 3a 20 f1 20 22 45 76 65 6e 2d 6f 64 64 | . : . "Even-odd| 00000060 20 66 69 6c 6c 20 69 6e 20 44 72 61 77 5f 53 74 | fill in Draw_St| 00000070 72 6f 6b 65 22 0d 00 07 0f 20 77 69 64 74 68 25 |roke".... width%| 00000080 3d 38 30 30 0d 00 08 27 20 6f 62 6a 65 63 74 25 |=800...' object%| 00000090 3d a4 43 72 65 61 74 65 5f 4f 62 6a 65 63 74 28 |=.Create_Object(| 000000a0 30 2c 30 2c 77 69 64 74 68 25 29 0d 00 09 26 20 |0,0,width%)...& | 000000b0 20 73 74 79 6c 65 25 3d a4 50 61 74 68 5f 43 72 | style%=.Path_Cr| 000000c0 65 61 74 65 4c 69 6e 65 53 74 79 6c 65 28 31 36 |eateLineStyle(16| 000000d0 29 0d 00 0a 2d 20 20 20 64 61 73 68 25 3d a4 50 |)...- dash%=.P| 000000e0 61 74 68 5f 45 71 75 69 64 69 73 74 61 6e 74 44 |ath_EquidistantD| 000000f0 61 73 68 50 61 74 74 65 72 6e 28 36 34 29 0d 00 |ashPattern(64)..| 00000100 0b 27 20 20 20 f2 50 61 74 68 5f 54 72 69 61 6e |.' .Path_Trian| 00000110 67 75 6c 61 72 4c 65 61 64 69 6e 67 43 61 70 73 |gularLeadingCaps| 00000120 28 32 2c 32 29 0d 00 0c 07 20 20 20 0d 00 0d 0f |(2,2).... ....| 00000130 20 c8 91 20 36 34 30 2c 35 31 32 0d 00 0e 04 0d | .. 640,512.....| 00000140 00 0f 08 20 e6 20 31 0d 00 10 3a 20 c8 99 20 22 |... . 1...: .. "| 00000150 44 72 61 77 5f 53 74 72 6f 6b 65 22 2c 6f 62 6a |Draw_Stroke",obj| 00000160 65 63 74 25 2c 26 31 41 2c 2c 2c 73 74 79 6c 65 |ect%,&1A,,,style| 00000170 25 21 31 36 2c 73 74 79 6c 65 25 2c 64 61 73 68 |%!16,style%,dash| 00000180 25 0d 00 11 05 20 0d 00 12 3b 20 f4 20 50 52 4f |%.... ...; . PRO| 00000190 43 50 61 74 68 5f 53 6d 6f 6f 74 68 44 72 61 77 |CPath_SmoothDraw| 000001a0 57 69 74 68 53 74 79 6c 65 28 6f 62 6a 65 63 74 |WithStyle(object| 000001b0 25 2c 32 2c 73 74 79 6c 65 25 2c 64 61 73 68 25 |%,2,style%,dash%| 000001c0 29 0d 00 13 04 0d 00 14 05 20 0d 00 15 05 e0 0d |)........ ......| 000001d0 00 16 04 0d 00 17 22 dd 20 a4 43 72 65 61 74 65 |......". .Create| 000001e0 5f 4f 62 6a 65 63 74 28 78 25 2c 79 25 2c 77 69 |_Object(x%,y%,wi| 000001f0 64 74 68 25 29 0d 00 18 0e 20 ea 20 6f 62 6a 65 |dth%).... . obje| 00000200 63 74 25 0d 00 19 23 20 f2 50 61 74 68 5f 4f 62 |ct%...# .Path_Ob| 00000210 6a 65 63 74 42 65 67 69 6e 28 6f 62 6a 65 63 74 |jectBegin(object| 00000220 25 2c 32 30 30 29 0d 00 1a 24 20 20 f4 20 46 69 |%,200)...$ . Fi| 00000230 72 73 74 20 63 72 65 61 74 65 20 73 75 62 2d 70 |rst create sub-p| 00000240 61 74 68 20 73 71 75 61 72 65 0d 00 1b 24 20 20 |ath square...$ | 00000250 20 20 20 20 f2 50 61 74 68 5f 53 71 75 61 72 65 | .Path_Square| 00000260 28 78 25 2c 79 25 2c 77 69 64 74 68 25 29 0d 00 |(x%,y%,width%)..| 00000270 1c 21 20 20 f4 20 54 68 65 6e 20 63 72 65 61 74 |.! . Then creat| 00000280 65 20 73 75 62 2d 70 61 74 68 20 6c 69 6e 65 0d |e sub-path line.| 00000290 00 1d 15 20 20 20 20 20 20 68 25 3d 77 69 64 74 |... h%=widt| 000002a0 68 25 81 34 0d 00 1e 1e 20 20 20 20 20 20 61 25 |h%.4.... a%| 000002b0 3d 78 25 2d 68 25 20 3a 20 62 25 3d 79 25 2d 68 |=x%-h% : b%=y%-h| 000002c0 25 20 0d 00 1f 1c 20 20 20 20 20 20 f2 50 61 74 |% .... .Pat| 000002d0 68 5f 4d 6f 76 65 28 61 25 2c 62 25 29 20 0d 00 |h_Move(a%,b%) ..| 000002e0 20 3c 20 20 20 20 20 20 f2 50 61 74 68 5f 43 75 | < .Path_Cu| 000002f0 62 69 63 28 61 25 2b 32 2a 68 25 2c 62 25 2c 61 |bic(a%+2*h%,b%,a| 00000300 25 2c 62 25 2b 32 2a 68 25 2c 61 25 2b 32 2a 68 |%,b%+2*h%,a%+2*h| 00000310 25 2c 62 25 2b 32 2a 68 25 29 0d 00 21 32 20 20 |%,b%+2*h%)..!2 | 00000320 20 20 20 20 f2 50 61 74 68 5f 43 75 62 69 63 28 | .Path_Cubic(| 00000330 61 25 2b 32 2a 68 25 2c 62 25 2c 61 25 2c 62 25 |a%+2*h%,b%,a%,b%| 00000340 2b 32 2a 68 25 2c 61 25 2c 62 25 29 0d 00 22 23 |+2*h%,a%,b%).."#| 00000350 20 20 20 20 20 20 f2 50 61 74 68 5f 43 6c 6f 73 | .Path_Clos| 00000360 65 57 69 74 68 4c 69 6e 65 20 20 20 20 20 20 0d |eWithLine .| 00000370 00 23 14 20 f2 50 61 74 68 5f 4f 62 6a 65 63 74 |.#. .Path_Object| 00000380 45 6e 64 0d 00 24 0c 3d 6f 62 6a 65 63 74 25 0d |End..$.=object%.| 00000390 00 25 04 0d 00 26 04 0d 00 27 04 0d 00 28 04 0d |.%...&...'...(..| 000003a0 ff |.| 000003a1