Home » Archimedes archive » Archimedes World » AW-1994-01.adf » AWJan94 » !AWJan94/Goodies/Disc/Example_3/Magnify

!AWJan94/Goodies/Disc/Example_3/Magnify

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-01.adf » AWJan94
Filename: !AWJan94/Goodies/Disc/Example_3/Magnify
Read OK:
File size: 0455 bytes
Load address: 0000
Exec address: 0000
File contents
    1PROCList
    2LIBRARY "PathLib:OS_units.Paths"
    3LIBRARY "PathLib:OS_units.Transforms"
    4ORIGIN 640,512
    5square%=FNPath_CreateSquare(0,0,100)
    6PROCCreateTransform
    7PROCDrawObjects
    8END
    9
   10DEF PROCCreateTransform
   11 PROCPath_CreateTransform(magnify%)
   12 PROCPath_Magnify(magnify%,1.25)
   13ENDPROC
   14
   15DEF PROCDrawObjects
   16 REPEAT
   17  SYS "Draw_Stroke",square%
   18  PROCPath_Transform(square%,magnify%)
   19  x$=GET$
   20 UNTIL FALSE
   21ENDPROC
   22
   23DEF PROCList
   24MODE MODE
   25COLOUR 2
   26PRINT "EXAMPLE 3: MAGNIFYING A SQUARE, by 25% each time" : PRINT
   27DATA LIBRARY "PathLib:OS_units.Paths"
   28DATA LIBRARY "PathLib:OS_units.Transforms"
   29DATA "ORIGIN 640,512"
   30DATA "square%=FNPath_CreateSquare(0,0,100)"
   31DATA "PROCCreateTransform"
   32DATA "PROCDrawObjects"
   33DATA "END"
   34DATA ""
   35DATA "DEF PROCCreateTransform"
   36DATA " PROCPath_CreateTransform(magnify%)"
   37DATA " PROCPath_Magnify(magnify%,1.25)"
   38DATA "ENDPROC"
   39DATA ""
   40DATA "DEF PROCDrawObjects"
   41DATA " REPEAT"
   42DATA "  SYS ""Draw_Stroke"",square%"
   43DATA "  PROCPath_Transform(square%,magnify%)"
   44DATA "  x$=GET$"
   45DATA " UNTIL FALSE"
   46DATA "ENDPROC"
   47COLOUR 1
   48FOR i%=1 TO  20 : READ x$ : PRINT x$ :NEXT
   49COLOUR 7
   50PRINT '"Press space bar! (ESC to finish)."
   51ENDPROC
   52
	�List
ț "PathLib:OS_units.Paths"
$ț "PathLib:OS_units.Transforms"
ȑ 640,512
'square%=�Path_CreateSquare(0,0,100)
�CreateTransform
�DrawObjects
�
	

� �CreateTransform
$ �Path_CreateTransform(magnify%)
! �Path_Magnify(magnify%,1.25)

�

� �DrawObjects
 �
  ș "Draw_Stroke",square%
'  �Path_Transform(square%,magnify%)

  x$=�
 � �
�

� �List
� �
� 2
<� "EXAMPLE 3: MAGNIFYING A SQUARE, by 25% each time" : �
&� LIBRARY "PathLib:OS_units.Paths"
+� LIBRARY "PathLib:OS_units.Transforms"
� "ORIGIN 640,512"
,� "square%=FNPath_CreateSquare(0,0,100)"
� "PROCCreateTransform"
 � "PROCDrawObjects"
!� "END"
"� ""
#� "DEF PROCCreateTransform"
$+� " PROCPath_CreateTransform(magnify%)"
%(� " PROCPath_Magnify(magnify%,1.25)"
&� "ENDPROC"
'� ""
(� "DEF PROCDrawObjects"
)� " REPEAT"
*%� "  SYS ""Draw_Stroke"",square%"
+.� "  PROCPath_Transform(square%,magnify%)"
,� "  x$=GET$"
-� " UNTIL FALSE"
.� "ENDPROC"
/� 1
0!� i%=1 �  20 : � x$ : � x$ :�
1� 7
2*� '"Press space bar! (ESC to finish)."
3�
4
�
00000000  0d 00 01 09 f2 4c 69 73  74 0d 00 02 1f c8 9b 20  |.....List...... |
00000010  22 50 61 74 68 4c 69 62  3a 4f 53 5f 75 6e 69 74  |"PathLib:OS_unit|
00000020  73 2e 50 61 74 68 73 22  0d 00 03 24 c8 9b 20 22  |s.Paths"...$.. "|
00000030  50 61 74 68 4c 69 62 3a  4f 53 5f 75 6e 69 74 73  |PathLib:OS_units|
00000040  2e 54 72 61 6e 73 66 6f  72 6d 73 22 0d 00 04 0e  |.Transforms"....|
00000050  c8 91 20 36 34 30 2c 35  31 32 0d 00 05 27 73 71  |.. 640,512...'sq|
00000060  75 61 72 65 25 3d a4 50  61 74 68 5f 43 72 65 61  |uare%=.Path_Crea|
00000070  74 65 53 71 75 61 72 65  28 30 2c 30 2c 31 30 30  |teSquare(0,0,100|
00000080  29 0d 00 06 14 f2 43 72  65 61 74 65 54 72 61 6e  |).....CreateTran|
00000090  73 66 6f 72 6d 0d 00 07  10 f2 44 72 61 77 4f 62  |sform.....DrawOb|
000000a0  6a 65 63 74 73 0d 00 08  05 e0 0d 00 09 04 0d 00  |jects...........|
000000b0  0a 16 dd 20 f2 43 72 65  61 74 65 54 72 61 6e 73  |... .CreateTrans|
000000c0  66 6f 72 6d 0d 00 0b 24  20 f2 50 61 74 68 5f 43  |form...$ .Path_C|
000000d0  72 65 61 74 65 54 72 61  6e 73 66 6f 72 6d 28 6d  |reateTransform(m|
000000e0  61 67 6e 69 66 79 25 29  0d 00 0c 21 20 f2 50 61  |agnify%)...! .Pa|
000000f0  74 68 5f 4d 61 67 6e 69  66 79 28 6d 61 67 6e 69  |th_Magnify(magni|
00000100  66 79 25 2c 31 2e 32 35  29 0d 00 0d 05 e1 0d 00  |fy%,1.25).......|
00000110  0e 04 0d 00 0f 12 dd 20  f2 44 72 61 77 4f 62 6a  |....... .DrawObj|
00000120  65 63 74 73 0d 00 10 06  20 f5 0d 00 11 1e 20 20  |ects.... .....  |
00000130  c8 99 20 22 44 72 61 77  5f 53 74 72 6f 6b 65 22  |.. "Draw_Stroke"|
00000140  2c 73 71 75 61 72 65 25  0d 00 12 27 20 20 f2 50  |,square%...'  .P|
00000150  61 74 68 5f 54 72 61 6e  73 66 6f 72 6d 28 73 71  |ath_Transform(sq|
00000160  75 61 72 65 25 2c 6d 61  67 6e 69 66 79 25 29 0d  |uare%,magnify%).|
00000170  00 13 0a 20 20 78 24 3d  be 0d 00 14 08 20 fd 20  |...  x$=..... . |
00000180  a3 0d 00 15 05 e1 0d 00  16 04 0d 00 17 0b dd 20  |............... |
00000190  f2 4c 69 73 74 0d 00 18  07 eb 20 eb 0d 00 19 07  |.List..... .....|
000001a0  fb 20 32 0d 00 1a 3c f1  20 22 45 58 41 4d 50 4c  |. 2...<. "EXAMPL|
000001b0  45 20 33 3a 20 4d 41 47  4e 49 46 59 49 4e 47 20  |E 3: MAGNIFYING |
000001c0  41 20 53 51 55 41 52 45  2c 20 62 79 20 32 35 25  |A SQUARE, by 25%|
000001d0  20 65 61 63 68 20 74 69  6d 65 22 20 3a 20 f1 0d  | each time" : ..|
000001e0  00 1b 26 dc 20 4c 49 42  52 41 52 59 20 22 50 61  |..&. LIBRARY "Pa|
000001f0  74 68 4c 69 62 3a 4f 53  5f 75 6e 69 74 73 2e 50  |thLib:OS_units.P|
00000200  61 74 68 73 22 0d 00 1c  2b dc 20 4c 49 42 52 41  |aths"...+. LIBRA|
00000210  52 59 20 22 50 61 74 68  4c 69 62 3a 4f 53 5f 75  |RY "PathLib:OS_u|
00000220  6e 69 74 73 2e 54 72 61  6e 73 66 6f 72 6d 73 22  |nits.Transforms"|
00000230  0d 00 1d 16 dc 20 22 4f  52 49 47 49 4e 20 36 34  |..... "ORIGIN 64|
00000240  30 2c 35 31 32 22 0d 00  1e 2c dc 20 22 73 71 75  |0,512"...,. "squ|
00000250  61 72 65 25 3d 46 4e 50  61 74 68 5f 43 72 65 61  |are%=FNPath_Crea|
00000260  74 65 53 71 75 61 72 65  28 30 2c 30 2c 31 30 30  |teSquare(0,0,100|
00000270  29 22 0d 00 1f 1b dc 20  22 50 52 4f 43 43 72 65  |)"..... "PROCCre|
00000280  61 74 65 54 72 61 6e 73  66 6f 72 6d 22 0d 00 20  |ateTransform".. |
00000290  17 dc 20 22 50 52 4f 43  44 72 61 77 4f 62 6a 65  |.. "PROCDrawObje|
000002a0  63 74 73 22 0d 00 21 0b  dc 20 22 45 4e 44 22 0d  |cts"..!.. "END".|
000002b0  00 22 08 dc 20 22 22 0d  00 23 1f dc 20 22 44 45  |.".. ""..#.. "DE|
000002c0  46 20 50 52 4f 43 43 72  65 61 74 65 54 72 61 6e  |F PROCCreateTran|
000002d0  73 66 6f 72 6d 22 0d 00  24 2b dc 20 22 20 50 52  |sform"..$+. " PR|
000002e0  4f 43 50 61 74 68 5f 43  72 65 61 74 65 54 72 61  |OCPath_CreateTra|
000002f0  6e 73 66 6f 72 6d 28 6d  61 67 6e 69 66 79 25 29  |nsform(magnify%)|
00000300  22 0d 00 25 28 dc 20 22  20 50 52 4f 43 50 61 74  |"..%(. " PROCPat|
00000310  68 5f 4d 61 67 6e 69 66  79 28 6d 61 67 6e 69 66  |h_Magnify(magnif|
00000320  79 25 2c 31 2e 32 35 29  22 0d 00 26 0f dc 20 22  |y%,1.25)"..&.. "|
00000330  45 4e 44 50 52 4f 43 22  0d 00 27 08 dc 20 22 22  |ENDPROC"..'.. ""|
00000340  0d 00 28 1b dc 20 22 44  45 46 20 50 52 4f 43 44  |..(.. "DEF PROCD|
00000350  72 61 77 4f 62 6a 65 63  74 73 22 0d 00 29 0f dc  |rawObjects"..)..|
00000360  20 22 20 52 45 50 45 41  54 22 0d 00 2a 25 dc 20  | " REPEAT"..*%. |
00000370  22 20 20 53 59 53 20 22  22 44 72 61 77 5f 53 74  |"  SYS ""Draw_St|
00000380  72 6f 6b 65 22 22 2c 73  71 75 61 72 65 25 22 0d  |roke"",square%".|
00000390  00 2b 2e dc 20 22 20 20  50 52 4f 43 50 61 74 68  |.+.. "  PROCPath|
000003a0  5f 54 72 61 6e 73 66 6f  72 6d 28 73 71 75 61 72  |_Transform(squar|
000003b0  65 25 2c 6d 61 67 6e 69  66 79 25 29 22 0d 00 2c  |e%,magnify%)"..,|
000003c0  11 dc 20 22 20 20 78 24  3d 47 45 54 24 22 0d 00  |.. "  x$=GET$"..|
000003d0  2d 14 dc 20 22 20 55 4e  54 49 4c 20 46 41 4c 53  |-.. " UNTIL FALS|
000003e0  45 22 0d 00 2e 0f dc 20  22 45 4e 44 50 52 4f 43  |E"..... "ENDPROC|
000003f0  22 0d 00 2f 07 fb 20 31  0d 00 30 21 e3 20 69 25  |"../.. 1..0!. i%|
00000400  3d 31 20 b8 20 20 32 30  20 3a 20 f3 20 78 24 20  |=1 .  20 : . x$ |
00000410  3a 20 f1 20 78 24 20 3a  ed 0d 00 31 07 fb 20 37  |: . x$ :...1.. 7|
00000420  0d 00 32 2a f1 20 27 22  50 72 65 73 73 20 73 70  |..2*. '"Press sp|
00000430  61 63 65 20 62 61 72 21  20 28 45 53 43 20 74 6f  |ace bar! (ESC to|
00000440  20 66 69 6e 69 73 68 29  2e 22 0d 00 33 05 e1 0d  | finish)."..3...|
00000450  00 34 04 0d ff                                    |.4...|
00000455