Home » Archimedes archive » Archimedes World » AW-1995-03-Disc1.adf » Disk1Mar95 » !AWMar95/Goodies/DrawBasic/Transforms/Example_A

!AWMar95/Goodies/DrawBasic/Transforms/Example_A

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_A
Read OK:
File size: 0161 bytes
Load address: 0000
Exec address: 0000
File contents
 flag=�Flag(0,1,2)   
�Tile(flag,10,5)
�Quit



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  20 66 6c 61 67 3d bb 46  6c 61 67 28 30 2c 31 2c  | flag=.Flag(0,1,|
00000010  32 29 20 20 20 0a a0 54  69 6c 65 28 66 6c 61 67  |2)   ..Tile(flag|
00000020  2c 31 30 2c 35 29 0a a0  51 75 69 74 0a 0a 0a 0a  |,10,5)..Quit....|
00000030  44 45 46 20 bb 46 6c 61  67 28 61 2c 62 2c 68 65  |DEF .Flag(a,b,he|
00000040  69 67 68 74 29 0a 52 45  4d 20 44 72 61 77 73 20  |ight).REM Draws |
00000050  61 20 76 65 72 74 69 63  61 6c 20 66 6c 61 67 0a  |a vertical flag.|
00000060  52 45 4d 20 73 74 65 6d  20 61 74 20 28 61 2c 62  |REM stem at (a,b|
00000070  29 0a 4c 4f 43 41 4c 20  70 61 74 68 2c 78 2c 79  |).LOCAL path,x,y|
00000080  2c 58 2c 59 0a a0 50 61  74 68 42 65 67 69 6e 28  |,X,Y..PathBegin(|
00000090  70 61 74 68 29 0a 20 a0  46 69 6c 6c 40 28 70 61  |path). .Fill@(pa|
000000a0  74 68 2c bb 52 65 64 29  0a 20 a0 40 56 4c 69 6e  |th,.Red). .@VLin|
000000b0  65 28 61 2c 62 2c 68 65  69 67 68 74 29 0a 20 20  |e(a,b,height).  |
000000c0  78 3d 61 2b 68 65 69 67  68 74 2f 31 38 20 3a 20  |x=a+height/18 : |
000000d0  79 3d 62 2b 39 2a 68 65  69 67 68 74 2f 38 0a 20  |y=b+9*height/8. |
000000e0  20 58 3d 61 2b 68 65 69  67 68 74 2f 38 20 20 3a  | X=a+height/8  :|
000000f0  20 59 3d 62 2b 37 2a 68  65 69 67 68 74 2f 38 0a  | Y=b+7*height/8.|
00000100  20 a0 42 65 7a 69 65 72  28 78 2c 79 2c 58 2c 59  | .Bezier(x,y,X,Y|
00000110  2c 61 2b 68 65 69 67 68  74 2f 34 2c 62 2b 37 2a  |,a+height/4,b+7*|
00000120  68 65 69 67 68 74 2f 38  29 0a 20 a0 44 72 61 77  |height/8). .Draw|
00000130  28 61 2c 62 2b 33 2a 68  65 69 67 68 74 2f 34 29  |(a,b+3*height/4)|
00000140  0a 20 a0 43 6c 6f 73 65  57 69 74 68 4c 69 6e 65  |. .CloseWithLine|
00000150  0a 20 a0 50 61 74 68 45  6e 64 0a 3d 70 61 74 68  |. .PathEnd.=path|
00000160  0a                                                |.|
00000161