Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199403.adf » Disk1Mar94 » !AWMar94/Goodies/Basic/Fill/EvenOdd

!AWMar94/Goodies/Basic/Fill/EvenOdd

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/EvenOdd
Read OK:
File size: 037F 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"
    7 width%=800
    8 object%=FNCreate_Object(0,0,width%)
    9  style%=FNPath_CreateLineStyle(8)
   10   dash%=FNPath_EquidistantDashPattern(32)
   11   PROCPath_TriangularLeadingCaps(2,2)
   12   
   13 ORIGIN 640,512
   14
   15 GCOL 1
   16 SYS "Draw_Fill",object%,FNPath_FillEvenOdd
   17 
   18 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"
 width%=800
' object%=�Create_Object(0,0,width%)
	%  style%=�Path_CreateLineStyle(8)

-   dash%=�Path_EquidistantDashPattern(32)
'   �Path_TriangularLeadingCaps(2,2)
   

 ȑ 640,512

 � 1
- ș "Draw_Fill",object%,�Path_FillEvenOdd
 
6 �Path_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 1b 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 22 0d 00  07 0f 20 77 69 64 74 68  | fill".... width|
00000070  25 3d 38 30 30 0d 00 08  27 20 6f 62 6a 65 63 74  |%=800...' object|
00000080  25 3d a4 43 72 65 61 74  65 5f 4f 62 6a 65 63 74  |%=.Create_Object|
00000090  28 30 2c 30 2c 77 69 64  74 68 25 29 0d 00 09 25  |(0,0,width%)...%|
000000a0  20 20 73 74 79 6c 65 25  3d a4 50 61 74 68 5f 43  |  style%=.Path_C|
000000b0  72 65 61 74 65 4c 69 6e  65 53 74 79 6c 65 28 38  |reateLineStyle(8|
000000c0  29 0d 00 0a 2d 20 20 20  64 61 73 68 25 3d a4 50  |)...-   dash%=.P|
000000d0  61 74 68 5f 45 71 75 69  64 69 73 74 61 6e 74 44  |ath_EquidistantD|
000000e0  61 73 68 50 61 74 74 65  72 6e 28 33 32 29 0d 00  |ashPattern(32)..|
000000f0  0b 27 20 20 20 f2 50 61  74 68 5f 54 72 69 61 6e  |.'   .Path_Trian|
00000100  67 75 6c 61 72 4c 65 61  64 69 6e 67 43 61 70 73  |gularLeadingCaps|
00000110  28 32 2c 32 29 0d 00 0c  07 20 20 20 0d 00 0d 0f  |(2,2)....   ....|
00000120  20 c8 91 20 36 34 30 2c  35 31 32 0d 00 0e 04 0d  | .. 640,512.....|
00000130  00 0f 08 20 e6 20 31 0d  00 10 2d 20 c8 99 20 22  |... . 1...- .. "|
00000140  44 72 61 77 5f 46 69 6c  6c 22 2c 6f 62 6a 65 63  |Draw_Fill",objec|
00000150  74 25 2c a4 50 61 74 68  5f 46 69 6c 6c 45 76 65  |t%,.Path_FillEve|
00000160  6e 4f 64 64 0d 00 11 05  20 0d 00 12 36 20 f2 50  |nOdd.... ...6 .P|
00000170  61 74 68 5f 53 6d 6f 6f  74 68 44 72 61 77 57 69  |ath_SmoothDrawWi|
00000180  74 68 53 74 79 6c 65 28  6f 62 6a 65 63 74 25 2c  |thStyle(object%,|
00000190  32 2c 73 74 79 6c 65 25  2c 64 61 73 68 25 29 0d  |2,style%,dash%).|
000001a0  00 13 04 0d 00 14 05 20  0d 00 15 05 e0 0d 00 16  |....... ........|
000001b0  04 0d 00 17 22 dd 20 a4  43 72 65 61 74 65 5f 4f  |....". .Create_O|
000001c0  62 6a 65 63 74 28 78 25  2c 79 25 2c 77 69 64 74  |bject(x%,y%,widt|
000001d0  68 25 29 0d 00 18 0e 20  ea 20 6f 62 6a 65 63 74  |h%).... . object|
000001e0  25 0d 00 19 23 20 f2 50  61 74 68 5f 4f 62 6a 65  |%...# .Path_Obje|
000001f0  63 74 42 65 67 69 6e 28  6f 62 6a 65 63 74 25 2c  |ctBegin(object%,|
00000200  32 30 30 29 0d 00 1a 24  20 20 f4 20 46 69 72 73  |200)...$  . Firs|
00000210  74 20 63 72 65 61 74 65  20 73 75 62 2d 70 61 74  |t create sub-pat|
00000220  68 20 73 71 75 61 72 65  0d 00 1b 24 20 20 20 20  |h square...$    |
00000230  20 20 f2 50 61 74 68 5f  53 71 75 61 72 65 28 78  |  .Path_Square(x|
00000240  25 2c 79 25 2c 77 69 64  74 68 25 29 0d 00 1c 21  |%,y%,width%)...!|
00000250  20 20 f4 20 54 68 65 6e  20 63 72 65 61 74 65 20  |  . Then create |
00000260  73 75 62 2d 70 61 74 68  20 6c 69 6e 65 0d 00 1d  |sub-path line...|
00000270  15 20 20 20 20 20 20 68  25 3d 77 69 64 74 68 25  |.      h%=width%|
00000280  81 34 0d 00 1e 1e 20 20  20 20 20 20 61 25 3d 78  |.4....      a%=x|
00000290  25 2d 68 25 20 3a 20 62  25 3d 79 25 2d 68 25 20  |%-h% : b%=y%-h% |
000002a0  0d 00 1f 1c 20 20 20 20  20 20 f2 50 61 74 68 5f  |....      .Path_|
000002b0  4d 6f 76 65 28 61 25 2c  62 25 29 20 0d 00 20 3c  |Move(a%,b%) .. <|
000002c0  20 20 20 20 20 20 f2 50  61 74 68 5f 43 75 62 69  |      .Path_Cubi|
000002d0  63 28 61 25 2b 32 2a 68  25 2c 62 25 2c 61 25 2c  |c(a%+2*h%,b%,a%,|
000002e0  62 25 2b 32 2a 68 25 2c  61 25 2b 32 2a 68 25 2c  |b%+2*h%,a%+2*h%,|
000002f0  62 25 2b 32 2a 68 25 29  0d 00 21 32 20 20 20 20  |b%+2*h%)..!2    |
00000300  20 20 f2 50 61 74 68 5f  43 75 62 69 63 28 61 25  |  .Path_Cubic(a%|
00000310  2b 32 2a 68 25 2c 62 25  2c 61 25 2c 62 25 2b 32  |+2*h%,b%,a%,b%+2|
00000320  2a 68 25 2c 61 25 2c 62  25 29 0d 00 22 23 20 20  |*h%,a%,b%).."#  |
00000330  20 20 20 20 f2 50 61 74  68 5f 43 6c 6f 73 65 57  |    .Path_CloseW|
00000340  69 74 68 4c 69 6e 65 20  20 20 20 20 20 0d 00 23  |ithLine      ..#|
00000350  14 20 f2 50 61 74 68 5f  4f 62 6a 65 63 74 45 6e  |. .Path_ObjectEn|
00000360  64 0d 00 24 0c 3d 6f 62  6a 65 63 74 25 0d 00 25  |d..$.=object%..%|
00000370  04 0d 00 26 04 0d 00 27  04 0d 00 28 04 0d ff     |...&...'...(...|
0000037f