Home » Archimedes archive » Archimedes World » AW-1994-04-Disc1.adf » Disk1Apr94 » !AWApr94/Goodies/Basic/Style/Colour/Fill/Random
!AWApr94/Goodies/Basic/Style/Colour/Fill/Random
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-04-Disc1.adf » Disk1Apr94 |
Filename: | !AWApr94/Goodies/Basic/Style/Colour/Fill/Random |
Read OK: | ✔ |
File size: | 026D bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
1 2LIBRARY "PathLib:OS_units.Draw" 3 4REM Creates a draw file consting of only a 40 byte header 5 file%=FNDraw_CreateFile("NullFile",1000) 6 7REM Create a circle 8 h%=200 : y%=0 9 FOR colour%=0 TO 15 10 x%=h%*(colour%MOD4)+200 11 IF x%=200 THEN y%+=200 12 Fill_Colour%=(RND(256)<<24)+(RND(256)<<16)+(RND(256)<<8) 13 PROCDraw_CreateCircle(x%,y%,h%DIV2) 14 NEXT 15 16REM Save this file to the Pipe filing system 17 PROCDraw_SaveToPipeFS("Circles",file%) 18 19END 20 21DEF PROCDraw_CreateCircle(x%,y%,radius) 22 PROCDraw_PathBegin(Fill_Colour%,0,0,2) 23 PROCDraw_Circle(x%,y%,radius) 24 PROCDraw_PathEnd 25ENDPROC 26 27
ț "PathLib:OS_units.Draw" ;� Creates a draw file consting of only a 40 byte header / file%=�Draw_CreateFile("NullFile",1000) � Create a circle h%=200 : y%=0 � colour%=0 � 15 x%=h%*(colour%�4)+200 � x%=200 � y%+=200 : Fill_Colour%=(�(256)<<24)+(�(256)<<16)+(�(256)<<8) & �Draw_CreateCircle(x%,y%,h%�2) � .� Save this file to the Pipe filing system + �Draw_SaveToPipeFS("Circles",file%) � &� �Draw_CreateCircle(x%,y%,radius) ( �Draw_PathBegin(Fill_Colour%,0,0,2) " �Draw_Circle(x%,y%,radius) �Draw_PathEnd � �
00000000 0d 00 01 04 0d 00 02 1e c8 9b 20 22 50 61 74 68 |.......... "Path| 00000010 4c 69 62 3a 4f 53 5f 75 6e 69 74 73 2e 44 72 61 |Lib:OS_units.Dra| 00000020 77 22 0d 00 03 04 0d 00 04 3b f4 20 43 72 65 61 |w".......;. Crea| 00000030 74 65 73 20 61 20 64 72 61 77 20 66 69 6c 65 20 |tes a draw file | 00000040 63 6f 6e 73 74 69 6e 67 20 6f 66 20 6f 6e 6c 79 |consting of only| 00000050 20 61 20 34 30 20 62 79 74 65 20 68 65 61 64 65 | a 40 byte heade| 00000060 72 0d 00 05 2f 20 20 20 20 66 69 6c 65 25 3d a4 |r.../ file%=.| 00000070 44 72 61 77 5f 43 72 65 61 74 65 46 69 6c 65 28 |Draw_CreateFile(| 00000080 22 4e 75 6c 6c 46 69 6c 65 22 2c 31 30 30 30 29 |"NullFile",1000)| 00000090 0d 00 06 04 0d 00 07 15 f4 20 43 72 65 61 74 65 |......... Create| 000000a0 20 61 20 63 69 72 63 6c 65 0d 00 08 13 20 20 68 | a circle.... h| 000000b0 25 3d 32 30 30 20 3a 20 79 25 3d 30 0d 00 09 16 |%=200 : y%=0....| 000000c0 20 20 e3 20 63 6f 6c 6f 75 72 25 3d 30 20 b8 20 | . colour%=0 . | 000000d0 31 35 0d 00 0a 1d 20 20 20 20 78 25 3d 68 25 2a |15.... x%=h%*| 000000e0 28 63 6f 6c 6f 75 72 25 83 34 29 2b 32 30 30 0d |(colour%.4)+200.| 000000f0 00 0b 1a 20 20 20 20 e7 20 78 25 3d 32 30 30 20 |... . x%=200 | 00000100 8c 20 79 25 2b 3d 32 30 30 0d 00 0c 3a 20 20 20 |. y%+=200...: | 00000110 20 46 69 6c 6c 5f 43 6f 6c 6f 75 72 25 3d 28 b3 | Fill_Colour%=(.| 00000120 28 32 35 36 29 3c 3c 32 34 29 2b 28 b3 28 32 35 |(256)<<24)+(.(25| 00000130 36 29 3c 3c 31 36 29 2b 28 b3 28 32 35 36 29 3c |6)<<16)+(.(256)<| 00000140 3c 38 29 0d 00 0d 26 20 20 20 20 f2 44 72 61 77 |<8)...& .Draw| 00000150 5f 43 72 65 61 74 65 43 69 72 63 6c 65 28 78 25 |_CreateCircle(x%| 00000160 2c 79 25 2c 68 25 81 32 29 0d 00 0e 07 20 20 ed |,y%,h%.2).... .| 00000170 0d 00 0f 06 20 20 0d 00 10 2e f4 20 53 61 76 65 |.... ..... Save| 00000180 20 74 68 69 73 20 66 69 6c 65 20 74 6f 20 74 68 | this file to th| 00000190 65 20 50 69 70 65 20 66 69 6c 69 6e 67 20 73 79 |e Pipe filing sy| 000001a0 73 74 65 6d 0d 00 11 2b 20 20 20 20 f2 44 72 61 |stem...+ .Dra| 000001b0 77 5f 53 61 76 65 54 6f 50 69 70 65 46 53 28 22 |w_SaveToPipeFS("| 000001c0 43 69 72 63 6c 65 73 22 2c 66 69 6c 65 25 29 0d |Circles",file%).| 000001d0 00 12 04 0d 00 13 05 e0 0d 00 14 04 0d 00 15 26 |...............&| 000001e0 dd 20 f2 44 72 61 77 5f 43 72 65 61 74 65 43 69 |. .Draw_CreateCi| 000001f0 72 63 6c 65 28 78 25 2c 79 25 2c 72 61 64 69 75 |rcle(x%,y%,radiu| 00000200 73 29 0d 00 16 28 20 f2 44 72 61 77 5f 50 61 74 |s)...( .Draw_Pat| 00000210 68 42 65 67 69 6e 28 46 69 6c 6c 5f 43 6f 6c 6f |hBegin(Fill_Colo| 00000220 75 72 25 2c 30 2c 30 2c 32 29 0d 00 17 22 20 f2 |ur%,0,0,2)..." .| 00000230 44 72 61 77 5f 43 69 72 63 6c 65 28 78 25 2c 79 |Draw_Circle(x%,y| 00000240 25 2c 72 61 64 69 75 73 29 20 20 20 0d 00 18 12 |%,radius) ....| 00000250 20 f2 44 72 61 77 5f 50 61 74 68 45 6e 64 0d 00 | .Draw_PathEnd..| 00000260 19 05 e1 0d 00 1a 04 0d 00 1b 04 0d ff |.............| 0000026d