Home » Archimedes archive » Archimedes World » AW-1995-03-Disc1.adf » Disk1Mar95 » !AWMar95/Goodies/DrawBasic/Transforms/Example_9
!AWMar95/Goodies/DrawBasic/Transforms/Example_9
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-1995-03-Disc1.adf » Disk1Mar95 |
Filename: | !AWMar95/Goodies/DrawBasic/Transforms/Example_9 |
Read OK: | ✔ |
File size: | 01B8 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
�CreateFlag FOR i=1 TO n flag=�Translate(flag,.5,.5) NEXT �Quit DEF �CreateFlag �Origin(1,1) flag=�Flag(0,1,3) n=10 ENDPROC DEF �Flag(a,b,height) REM Draws a vertical flag REM stem at (a,b) LOCAL path,x,y,X,Y �PathBegin(path) �Fill@(path,�Red) �@VLine(a,b,height) x=a+height/18 : y=b+9*height/8 X=a+height/8 : Y=b+7*height/8 �Bezier(x,y,X,Y,a+height/4,b+7*height/8) �Draw(a,b+3*height/4) �CloseWithLine �PathEnd =path
00000000 a0 43 72 65 61 74 65 46 6c 61 67 0a 20 46 4f 52 |.CreateFlag. FOR| 00000010 20 69 3d 31 20 54 4f 20 6e 0a 20 20 20 66 6c 61 | i=1 TO n. fla| 00000020 67 3d bb 54 72 61 6e 73 6c 61 74 65 28 66 6c 61 |g=.Translate(fla| 00000030 67 2c 2e 35 2c 2e 35 29 0a 20 20 20 4e 45 58 54 |g,.5,.5). NEXT| 00000040 0a a0 51 75 69 74 0a 0a 44 45 46 20 a0 43 72 65 |..Quit..DEF .Cre| 00000050 61 74 65 46 6c 61 67 0a a0 4f 72 69 67 69 6e 28 |ateFlag..Origin(| 00000060 31 2c 31 29 0a 20 66 6c 61 67 3d bb 46 6c 61 67 |1,1). flag=.Flag| 00000070 28 30 2c 31 2c 33 29 20 0a 20 6e 3d 31 30 0a 45 |(0,1,3) . n=10.E| 00000080 4e 44 50 52 4f 43 0a 0a 44 45 46 20 bb 46 6c 61 |NDPROC..DEF .Fla| 00000090 67 28 61 2c 62 2c 68 65 69 67 68 74 29 0a 52 45 |g(a,b,height).RE| 000000a0 4d 20 44 72 61 77 73 20 61 20 76 65 72 74 69 63 |M Draws a vertic| 000000b0 61 6c 20 66 6c 61 67 0a 52 45 4d 20 73 74 65 6d |al flag.REM stem| 000000c0 20 61 74 20 28 61 2c 62 29 0a 4c 4f 43 41 4c 20 | at (a,b).LOCAL | 000000d0 70 61 74 68 2c 78 2c 79 2c 58 2c 59 0a a0 50 61 |path,x,y,X,Y..Pa| 000000e0 74 68 42 65 67 69 6e 28 70 61 74 68 29 0a 20 a0 |thBegin(path). .| 000000f0 46 69 6c 6c 40 28 70 61 74 68 2c bb 52 65 64 29 |Fill@(path,.Red)| 00000100 0a 20 a0 40 56 4c 69 6e 65 28 61 2c 62 2c 68 65 |. .@VLine(a,b,he| 00000110 69 67 68 74 29 0a 20 20 78 3d 61 2b 68 65 69 67 |ight). x=a+heig| 00000120 68 74 2f 31 38 20 3a 20 79 3d 62 2b 39 2a 68 65 |ht/18 : y=b+9*he| 00000130 69 67 68 74 2f 38 0a 20 20 58 3d 61 2b 68 65 69 |ight/8. X=a+hei| 00000140 67 68 74 2f 38 20 20 3a 20 59 3d 62 2b 37 2a 68 |ght/8 : Y=b+7*h| 00000150 65 69 67 68 74 2f 38 0a 20 a0 42 65 7a 69 65 72 |eight/8. .Bezier| 00000160 28 78 2c 79 2c 58 2c 59 2c 61 2b 68 65 69 67 68 |(x,y,X,Y,a+heigh| 00000170 74 2f 34 2c 62 2b 37 2a 68 65 69 67 68 74 2f 38 |t/4,b+7*height/8| 00000180 29 0a 20 a0 44 72 61 77 28 61 2c 62 2b 33 2a 68 |). .Draw(a,b+3*h| 00000190 65 69 67 68 74 2f 34 29 0a 20 a0 43 6c 6f 73 65 |eight/4). .Close| 000001a0 57 69 74 68 4c 69 6e 65 0a 20 a0 50 61 74 68 45 |WithLine. .PathE| 000001b0 6e 64 0a 3d 70 61 74 68 |nd.=path| 000001b8