Home » Archimedes archive » Archimedes World » AW-1995-01-Disc2.adf » Disk2Jan95 » !AWJan95/Goodies/Event/Docs/Draw

!AWJan95/Goodies/Event/Docs/Draw

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-01-Disc2.adf » Disk2Jan95
Filename: !AWJan95/Goodies/Event/Docs/Draw
Read OK:
File size: 23FD bytes
Load address: 0000
Exec address: 0000
File contents
Draw units
The units used by the DrawLib routines can
be specified in several different units.
Choosing units can be achieved with the
following calls :

PROCshell_DrawSetUnitsMM millimeters
PROCshell_DrawSetUnitsCM centimeters
PROCshell_DrawSetUnitsIN inches
PROCshell_DrawSetUnitsOS OS units
PROCshell_DrawSetUnitsPT points

Drawfiles are created in millimeters by
default.

--------------------------------------------------------

PROCshell_DrawCreateFile
Params =>
         int address of drawfile buffer
             (contents ignored on entry)

       <=
         address of drawfile buffer is
         updated

The drawfile is created in a RAM buffer,
the address of which is returned by the
routine. As objects are added to the file
the address of the buffer may change.

At any time the buffer contains a valid
drawfile that can be displayed with
PROCshell_DrawRenderFile.

Multiple drawfiles can be created at the
same time, adding objects to a particular
drawfile is achieved by specifying the
buffer address.
              
--------------------------------------------------------

PROCshell_DrawRenderFile()
Params =>
         int  address of drawfile buffer
         int  x coordinate to render drawfile
              (os units)
         int  y coordinate to render drawfile
              (os units)
         real x scale factor
         real y scale factor
         int  address of wimp redraw block

This routine renders (plots) a drawfile which must
be loaded into a buffer using PROCshell_DrawLoadFile,
or created by the user application with
PROCshell_DrawCreateFile.

The drawfile is always plotted relative to the current
graphics origin and may be scaled independantly in the
x and y directions.

All draw objects except text areas are supported, the
actual rendering is performed by the WimpEXT module which
must be loaded by the application's !Run file.

Wimp redraw block
  0  Window handle
  4  Visible area minx (incl)
  8               miny (incl)
 12               maxx (excl)
 16               maxy (excl)
 20  Scrollx
 24  Scrolly
 28  Redraw rect  minx (incl)
 32               miny (incl)
 36               maxx (excl)
 40               maxy (excl)

--------------------------------------------------------

FNshell_DrawLoadFile()
Params =>
         str file name

       <=
         int address of drawfile buffer

--------------------------------------------------------

PROCshell_DrawSaveFile()
Params =>
         int address of drawfile buffer
         str file name

This routine saves the drawfile and sets
the filetype to &AFF (draw).

--------------------------------------------------------

PROCshell_DrawGetFileSize()
Params =>
         int address of drawfile buffer
  
       <=
         int file size in bytes (excluding EvntShell
             pre-header)

--------------------------------------------------------

PROCshell_DrawGetBoundingBox()
Params =>
         int address of drawfile buffer
         int x position (os units)
         int y position (os units)
         int width  (os units)
         int height (os units)

       <=
         The x,y,height and width values are
         returned

--------------------------------------------------------

PROCshell_DrawInitFont()
Params =>
         int address of drawfile buffer
         str name of font to initialise
             i.e. 'Trinity.Medium.Italic'

       <=
          address of drawfile buffer is
          updated

Before text using outline fonts can be used
in a drawfile it is vital that they are
initialised using this call. Once you have
called this routine for the first time you
must continue initialising all the fonts that
will be needed before creating other objects.

It would appear (despite what the PRMs say!)
that font initialisation must occur before any
other objects are defined - that is you must
initialise any fonts directly after creating
the drawfile.

Attempting to use fonts that are not available
(has !Fonts been 'seen' by the Filer?) will
cause an error. You should also bear in mind
that using fonts that other people may not have
can cause problems as various applications
react in different ways to this situation.

--------------------------------------------------------

PROCshell_DrawSetFont()
Params =>
         int  address of drawfile buffer
         str  name of font ("" for System Font)

Before this call can be made the font specified must be
initialised with a call to PROCshell_DrawInitFont,
otherwise an error will be generated.

All text objects created with PROCshell_DrawOutlineFont
will be in the specified font until the next call to
PROCshell_DrawSetFont.

--------------------------------------------------------

PROCshell_DrawBox()
Params =>
         int  address of drawfile buffer
         real x coordinate of bottom left
              of box
         real y coordinate of bottom left
              of box
         real width of box
         real height of box

       <=
         address of drawfile buffer is
         updated

The coordinates and dimensions of the box
are given in the currently selected units.

--------------------------------------------------------

PROCshell_DrawCircle()
Params =>
         int  address of drawfile buffer
         real x coordinate of centre of
              circle
         real y coordinate of centre of
              circle
         real radius of circle

       <=
         address of drawfile buffer is
         updated

The coordinates and dimensions of the circle
are given in the currently selected units.

--------------------------------------------------------

PROCshell_DrawEllipse()
Params =>
         int  address of drawfile buffer
         real x coordinate of centre of
              ellipse
         real y coordinate of centre of
              ellipse
         real major axis of ellipse
         real minor axis of ellipse
          
       <=
         address of drawfile buffer is
         updated

The coordinates and dimensions of the ellipse
are given in the currently selected units.

--------------------------------------------------------

PROCshell_DrawLine()
Params =>
         int  address of drawfile buffer
         real x coordinate of start of line
         real y coordinate of start of line
         real x coordinate of end of line
         real y coordinate of end of line
          
       <=
         address of drawfile buffer is
         updated

The coordinates and dimensions of the line
are given in the currently selected units.

--------------------------------------------------------

PROCshell_DrawOutlineFont()
Params =>
         int  address of drawfile buffer
         str  text to insert
         real width of font  (points)
         real height of font (points)
         real x coordinate of bottom left
              of text (current units)
         real y coordinate of bottom left
              of text (current units)

       <=
          address of drawfile buffer is
          updated

Before a text object can inserted the font
used must be initialised with a call to
PROCshell_DrawInitFont, otherwise an error
will be generated. The font to use must also
be selected with PROCshell_DrawSetFont.

--------------------------------------------------------

PROCshell_DrawSetFillColour()
Params =>
         int address of drawfile buffer
         int red   value (0-255)
         int green value (0-255)
         int blue  value (0-255)

The colour value is supplied as a 24 bit
value, RISC OS handles the display of the
colour by dithering.

--------------------------------------------------------

PROCshell_DrawSetPathColour()
Params =>
         int address of drawfile buffer
         int red   value (0-255)
         int green value (0-255)
         int blue  value (0-255)

The colour value is supplied as a 24 bit
value, RISC OS handles the display of the
colour by dithering.

--------------------------------------------------------

PROCshell_DrawSetPathWidth()
Params =>
         int  address of drawfile buffer
         real path width (current units)

--------------------------------------------------------

PROCshell_DrawSetUnitsCM()
Params =>
         int address of drawfile buffer

Sets centimeters to be the current unit of
measurement for the other library routines.

--------------------------------------------------------

PROCshell_DrawSetUnitsIN()
Params =>
         int address of drawfile buffer

Sets inches to be the current unit of
measurement for the other library routines.

--------------------------------------------------------

PROCshell_DrawSetUnitsMM()
Params =>
         int address of drawfile buffer

Sets millimeters to be the current unit of
measurement for the other library routines.

--------------------------------------------------------

PROCshell_DrawSetUnitsOS()
Params =>
         int address of drawfile buffer

Sets OS units to be the current unit of
measurement for the other library routines.

--------------------------------------------------------

PROCshell_DrawSetUnitsPT()
Params =>
         int address of drawfile buffer

Sets points to be the current unit of
measurement for the other library routines.

--------------------------------------------------------
00000000  44 72 61 77 20 75 6e 69  74 73 0a 54 68 65 20 75  |Draw units.The u|
00000010  6e 69 74 73 20 75 73 65  64 20 62 79 20 74 68 65  |nits used by the|
00000020  20 44 72 61 77 4c 69 62  20 72 6f 75 74 69 6e 65  | DrawLib routine|
00000030  73 20 63 61 6e 0a 62 65  20 73 70 65 63 69 66 69  |s can.be specifi|
00000040  65 64 20 69 6e 20 73 65  76 65 72 61 6c 20 64 69  |ed in several di|
00000050  66 66 65 72 65 6e 74 20  75 6e 69 74 73 2e 0a 43  |fferent units..C|
00000060  68 6f 6f 73 69 6e 67 20  75 6e 69 74 73 20 63 61  |hoosing units ca|
00000070  6e 20 62 65 20 61 63 68  69 65 76 65 64 20 77 69  |n be achieved wi|
00000080  74 68 20 74 68 65 0a 66  6f 6c 6c 6f 77 69 6e 67  |th the.following|
00000090  20 63 61 6c 6c 73 20 3a  0a 0a 50 52 4f 43 73 68  | calls :..PROCsh|
000000a0  65 6c 6c 5f 44 72 61 77  53 65 74 55 6e 69 74 73  |ell_DrawSetUnits|
000000b0  4d 4d 20 6d 69 6c 6c 69  6d 65 74 65 72 73 0a 50  |MM millimeters.P|
000000c0  52 4f 43 73 68 65 6c 6c  5f 44 72 61 77 53 65 74  |ROCshell_DrawSet|
000000d0  55 6e 69 74 73 43 4d 20  63 65 6e 74 69 6d 65 74  |UnitsCM centimet|
000000e0  65 72 73 0a 50 52 4f 43  73 68 65 6c 6c 5f 44 72  |ers.PROCshell_Dr|
000000f0  61 77 53 65 74 55 6e 69  74 73 49 4e 20 69 6e 63  |awSetUnitsIN inc|
00000100  68 65 73 0a 50 52 4f 43  73 68 65 6c 6c 5f 44 72  |hes.PROCshell_Dr|
00000110  61 77 53 65 74 55 6e 69  74 73 4f 53 20 4f 53 20  |awSetUnitsOS OS |
00000120  75 6e 69 74 73 0a 50 52  4f 43 73 68 65 6c 6c 5f  |units.PROCshell_|
00000130  44 72 61 77 53 65 74 55  6e 69 74 73 50 54 20 70  |DrawSetUnitsPT p|
00000140  6f 69 6e 74 73 0a 0a 44  72 61 77 66 69 6c 65 73  |oints..Drawfiles|
00000150  20 61 72 65 20 63 72 65  61 74 65 64 20 69 6e 20  | are created in |
00000160  6d 69 6c 6c 69 6d 65 74  65 72 73 20 62 79 0a 64  |millimeters by.d|
00000170  65 66 61 75 6c 74 2e 0a  0a 2d 2d 2d 2d 2d 2d 2d  |efault...-------|
00000180  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000001b0  2d 0a 0a 50 52 4f 43 73  68 65 6c 6c 5f 44 72 61  |-..PROCshell_Dra|
000001c0  77 43 72 65 61 74 65 46  69 6c 65 0a 50 61 72 61  |wCreateFile.Para|
000001d0  6d 73 20 3d 3e 0a 20 20  20 20 20 20 20 20 20 69  |ms =>.         i|
000001e0  6e 74 20 61 64 64 72 65  73 73 20 6f 66 20 64 72  |nt address of dr|
000001f0  61 77 66 69 6c 65 20 62  75 66 66 65 72 0a 20 20  |awfile buffer.  |
00000200  20 20 20 20 20 20 20 20  20 20 20 28 63 6f 6e 74  |           (cont|
00000210  65 6e 74 73 20 69 67 6e  6f 72 65 64 20 6f 6e 20  |ents ignored on |
00000220  65 6e 74 72 79 29 0a 0a  20 20 20 20 20 20 20 3c  |entry)..       <|
00000230  3d 0a 20 20 20 20 20 20  20 20 20 61 64 64 72 65  |=.         addre|
00000240  73 73 20 6f 66 20 64 72  61 77 66 69 6c 65 20 62  |ss of drawfile b|
00000250  75 66 66 65 72 20 69 73  0a 20 20 20 20 20 20 20  |uffer is.       |
00000260  20 20 75 70 64 61 74 65  64 0a 0a 54 68 65 20 64  |  updated..The d|
00000270  72 61 77 66 69 6c 65 20  69 73 20 63 72 65 61 74  |rawfile is creat|
00000280  65 64 20 69 6e 20 61 20  52 41 4d 20 62 75 66 66  |ed in a RAM buff|
00000290  65 72 2c 0a 74 68 65 20  61 64 64 72 65 73 73 20  |er,.the address |
000002a0  6f 66 20 77 68 69 63 68  20 69 73 20 72 65 74 75  |of which is retu|
000002b0  72 6e 65 64 20 62 79 20  74 68 65 0a 72 6f 75 74  |rned by the.rout|
000002c0  69 6e 65 2e 20 41 73 20  6f 62 6a 65 63 74 73 20  |ine. As objects |
000002d0  61 72 65 20 61 64 64 65  64 20 74 6f 20 74 68 65  |are added to the|
000002e0  20 66 69 6c 65 0a 74 68  65 20 61 64 64 72 65 73  | file.the addres|
000002f0  73 20 6f 66 20 74 68 65  20 62 75 66 66 65 72 20  |s of the buffer |
00000300  6d 61 79 20 63 68 61 6e  67 65 2e 0a 0a 41 74 20  |may change...At |
00000310  61 6e 79 20 74 69 6d 65  20 74 68 65 20 62 75 66  |any time the buf|
00000320  66 65 72 20 63 6f 6e 74  61 69 6e 73 20 61 20 76  |fer contains a v|
00000330  61 6c 69 64 0a 64 72 61  77 66 69 6c 65 20 74 68  |alid.drawfile th|
00000340  61 74 20 63 61 6e 20 62  65 20 64 69 73 70 6c 61  |at can be displa|
00000350  79 65 64 20 77 69 74 68  0a 50 52 4f 43 73 68 65  |yed with.PROCshe|
00000360  6c 6c 5f 44 72 61 77 52  65 6e 64 65 72 46 69 6c  |ll_DrawRenderFil|
00000370  65 2e 0a 0a 4d 75 6c 74  69 70 6c 65 20 64 72 61  |e...Multiple dra|
00000380  77 66 69 6c 65 73 20 63  61 6e 20 62 65 20 63 72  |wfiles can be cr|
00000390  65 61 74 65 64 20 61 74  20 74 68 65 0a 73 61 6d  |eated at the.sam|
000003a0  65 20 74 69 6d 65 2c 20  61 64 64 69 6e 67 20 6f  |e time, adding o|
000003b0  62 6a 65 63 74 73 20 74  6f 20 61 20 70 61 72 74  |bjects to a part|
000003c0  69 63 75 6c 61 72 0a 64  72 61 77 66 69 6c 65 20  |icular.drawfile |
000003d0  69 73 20 61 63 68 69 65  76 65 64 20 62 79 20 73  |is achieved by s|
000003e0  70 65 63 69 66 79 69 6e  67 20 74 68 65 0a 62 75  |pecifying the.bu|
000003f0  66 66 65 72 20 61 64 64  72 65 73 73 2e 0a 20 20  |ffer address..  |
00000400  20 20 20 20 20 20 20 20  20 20 20 20 0a 2d 2d 2d  |            .---|
00000410  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000440  2d 2d 2d 2d 2d 0a 0a 50  52 4f 43 73 68 65 6c 6c  |-----..PROCshell|
00000450  5f 44 72 61 77 52 65 6e  64 65 72 46 69 6c 65 28  |_DrawRenderFile(|
00000460  29 0a 50 61 72 61 6d 73  20 3d 3e 0a 20 20 20 20  |).Params =>.    |
00000470  20 20 20 20 20 69 6e 74  20 20 61 64 64 72 65 73  |     int  addres|
00000480  73 20 6f 66 20 64 72 61  77 66 69 6c 65 20 62 75  |s of drawfile bu|
00000490  66 66 65 72 0a 20 20 20  20 20 20 20 20 20 69 6e  |ffer.         in|
000004a0  74 20 20 78 20 63 6f 6f  72 64 69 6e 61 74 65 20  |t  x coordinate |
000004b0  74 6f 20 72 65 6e 64 65  72 20 64 72 61 77 66 69  |to render drawfi|
000004c0  6c 65 0a 20 20 20 20 20  20 20 20 20 20 20 20 20  |le.             |
000004d0  20 28 6f 73 20 75 6e 69  74 73 29 0a 20 20 20 20  | (os units).    |
000004e0  20 20 20 20 20 69 6e 74  20 20 79 20 63 6f 6f 72  |     int  y coor|
000004f0  64 69 6e 61 74 65 20 74  6f 20 72 65 6e 64 65 72  |dinate to render|
00000500  20 64 72 61 77 66 69 6c  65 0a 20 20 20 20 20 20  | drawfile.      |
00000510  20 20 20 20 20 20 20 20  28 6f 73 20 75 6e 69 74  |        (os unit|
00000520  73 29 0a 20 20 20 20 20  20 20 20 20 72 65 61 6c  |s).         real|
00000530  20 78 20 73 63 61 6c 65  20 66 61 63 74 6f 72 0a  | x scale factor.|
00000540  20 20 20 20 20 20 20 20  20 72 65 61 6c 20 79 20  |         real y |
00000550  73 63 61 6c 65 20 66 61  63 74 6f 72 0a 20 20 20  |scale factor.   |
00000560  20 20 20 20 20 20 69 6e  74 20 20 61 64 64 72 65  |      int  addre|
00000570  73 73 20 6f 66 20 77 69  6d 70 20 72 65 64 72 61  |ss of wimp redra|
00000580  77 20 62 6c 6f 63 6b 0a  0a 54 68 69 73 20 72 6f  |w block..This ro|
00000590  75 74 69 6e 65 20 72 65  6e 64 65 72 73 20 28 70  |utine renders (p|
000005a0  6c 6f 74 73 29 20 61 20  64 72 61 77 66 69 6c 65  |lots) a drawfile|
000005b0  20 77 68 69 63 68 20 6d  75 73 74 0a 62 65 20 6c  | which must.be l|
000005c0  6f 61 64 65 64 20 69 6e  74 6f 20 61 20 62 75 66  |oaded into a buf|
000005d0  66 65 72 20 75 73 69 6e  67 20 50 52 4f 43 73 68  |fer using PROCsh|
000005e0  65 6c 6c 5f 44 72 61 77  4c 6f 61 64 46 69 6c 65  |ell_DrawLoadFile|
000005f0  2c 0a 6f 72 20 63 72 65  61 74 65 64 20 62 79 20  |,.or created by |
00000600  74 68 65 20 75 73 65 72  20 61 70 70 6c 69 63 61  |the user applica|
00000610  74 69 6f 6e 20 77 69 74  68 0a 50 52 4f 43 73 68  |tion with.PROCsh|
00000620  65 6c 6c 5f 44 72 61 77  43 72 65 61 74 65 46 69  |ell_DrawCreateFi|
00000630  6c 65 2e 0a 0a 54 68 65  20 64 72 61 77 66 69 6c  |le...The drawfil|
00000640  65 20 69 73 20 61 6c 77  61 79 73 20 70 6c 6f 74  |e is always plot|
00000650  74 65 64 20 72 65 6c 61  74 69 76 65 20 74 6f 20  |ted relative to |
00000660  74 68 65 20 63 75 72 72  65 6e 74 0a 67 72 61 70  |the current.grap|
00000670  68 69 63 73 20 6f 72 69  67 69 6e 20 61 6e 64 20  |hics origin and |
00000680  6d 61 79 20 62 65 20 73  63 61 6c 65 64 20 69 6e  |may be scaled in|
00000690  64 65 70 65 6e 64 61 6e  74 6c 79 20 69 6e 20 74  |dependantly in t|
000006a0  68 65 0a 78 20 61 6e 64  20 79 20 64 69 72 65 63  |he.x and y direc|
000006b0  74 69 6f 6e 73 2e 0a 0a  41 6c 6c 20 64 72 61 77  |tions...All draw|
000006c0  20 6f 62 6a 65 63 74 73  20 65 78 63 65 70 74 20  | objects except |
000006d0  74 65 78 74 20 61 72 65  61 73 20 61 72 65 20 73  |text areas are s|
000006e0  75 70 70 6f 72 74 65 64  2c 20 74 68 65 0a 61 63  |upported, the.ac|
000006f0  74 75 61 6c 20 72 65 6e  64 65 72 69 6e 67 20 69  |tual rendering i|
00000700  73 20 70 65 72 66 6f 72  6d 65 64 20 62 79 20 74  |s performed by t|
00000710  68 65 20 57 69 6d 70 45  58 54 20 6d 6f 64 75 6c  |he WimpEXT modul|
00000720  65 20 77 68 69 63 68 0a  6d 75 73 74 20 62 65 20  |e which.must be |
00000730  6c 6f 61 64 65 64 20 62  79 20 74 68 65 20 61 70  |loaded by the ap|
00000740  70 6c 69 63 61 74 69 6f  6e 27 73 20 21 52 75 6e  |plication's !Run|
00000750  20 66 69 6c 65 2e 0a 0a  57 69 6d 70 20 72 65 64  | file...Wimp red|
00000760  72 61 77 20 62 6c 6f 63  6b 0a 20 20 30 20 20 57  |raw block.  0  W|
00000770  69 6e 64 6f 77 20 68 61  6e 64 6c 65 0a 20 20 34  |indow handle.  4|
00000780  20 20 56 69 73 69 62 6c  65 20 61 72 65 61 20 6d  |  Visible area m|
00000790  69 6e 78 20 28 69 6e 63  6c 29 0a 20 20 38 20 20  |inx (incl).  8  |
000007a0  20 20 20 20 20 20 20 20  20 20 20 20 20 6d 69 6e  |             min|
000007b0  79 20 28 69 6e 63 6c 29  0a 20 31 32 20 20 20 20  |y (incl). 12    |
000007c0  20 20 20 20 20 20 20 20  20 20 20 6d 61 78 78 20  |           maxx |
000007d0  28 65 78 63 6c 29 0a 20  31 36 20 20 20 20 20 20  |(excl). 16      |
000007e0  20 20 20 20 20 20 20 20  20 6d 61 78 79 20 28 65  |         maxy (e|
000007f0  78 63 6c 29 0a 20 32 30  20 20 53 63 72 6f 6c 6c  |xcl). 20  Scroll|
00000800  78 0a 20 32 34 20 20 53  63 72 6f 6c 6c 79 0a 20  |x. 24  Scrolly. |
00000810  32 38 20 20 52 65 64 72  61 77 20 72 65 63 74 20  |28  Redraw rect |
00000820  20 6d 69 6e 78 20 28 69  6e 63 6c 29 0a 20 33 32  | minx (incl). 32|
00000830  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 6d  |               m|
00000840  69 6e 79 20 28 69 6e 63  6c 29 0a 20 33 36 20 20  |iny (incl). 36  |
00000850  20 20 20 20 20 20 20 20  20 20 20 20 20 6d 61 78  |             max|
00000860  78 20 28 65 78 63 6c 29  0a 20 34 30 20 20 20 20  |x (excl). 40    |
00000870  20 20 20 20 20 20 20 20  20 20 20 6d 61 78 79 20  |           maxy |
00000880  28 65 78 63 6c 29 0a 0a  2d 2d 2d 2d 2d 2d 2d 2d  |(excl)..--------|
00000890  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000008c0  0a 0a 46 4e 73 68 65 6c  6c 5f 44 72 61 77 4c 6f  |..FNshell_DrawLo|
000008d0  61 64 46 69 6c 65 28 29  0a 50 61 72 61 6d 73 20  |adFile().Params |
000008e0  3d 3e 0a 20 20 20 20 20  20 20 20 20 73 74 72 20  |=>.         str |
000008f0  66 69 6c 65 20 6e 61 6d  65 0a 0a 20 20 20 20 20  |file name..     |
00000900  20 20 3c 3d 0a 20 20 20  20 20 20 20 20 20 69 6e  |  <=.         in|
00000910  74 20 61 64 64 72 65 73  73 20 6f 66 20 64 72 61  |t address of dra|
00000920  77 66 69 6c 65 20 62 75  66 66 65 72 0a 0a 2d 2d  |wfile buffer..--|
00000930  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000960  2d 2d 2d 2d 2d 2d 0a 0a  50 52 4f 43 73 68 65 6c  |------..PROCshel|
00000970  6c 5f 44 72 61 77 53 61  76 65 46 69 6c 65 28 29  |l_DrawSaveFile()|
00000980  0a 50 61 72 61 6d 73 20  3d 3e 0a 20 20 20 20 20  |.Params =>.     |
00000990  20 20 20 20 69 6e 74 20  61 64 64 72 65 73 73 20  |    int address |
000009a0  6f 66 20 64 72 61 77 66  69 6c 65 20 62 75 66 66  |of drawfile buff|
000009b0  65 72 0a 20 20 20 20 20  20 20 20 20 73 74 72 20  |er.         str |
000009c0  66 69 6c 65 20 6e 61 6d  65 0a 0a 54 68 69 73 20  |file name..This |
000009d0  72 6f 75 74 69 6e 65 20  73 61 76 65 73 20 74 68  |routine saves th|
000009e0  65 20 64 72 61 77 66 69  6c 65 20 61 6e 64 20 73  |e drawfile and s|
000009f0  65 74 73 0a 74 68 65 20  66 69 6c 65 74 79 70 65  |ets.the filetype|
00000a00  20 74 6f 20 26 41 46 46  20 28 64 72 61 77 29 2e  | to &AFF (draw).|
00000a10  0a 0a 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |..--------------|
00000a20  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000a40  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0a 0a 50 52 4f 43  |----------..PROC|
00000a50  73 68 65 6c 6c 5f 44 72  61 77 47 65 74 46 69 6c  |shell_DrawGetFil|
00000a60  65 53 69 7a 65 28 29 0a  50 61 72 61 6d 73 20 3d  |eSize().Params =|
00000a70  3e 0a 20 20 20 20 20 20  20 20 20 69 6e 74 20 61  |>.         int a|
00000a80  64 64 72 65 73 73 20 6f  66 20 64 72 61 77 66 69  |ddress of drawfi|
00000a90  6c 65 20 62 75 66 66 65  72 0a 20 20 0a 20 20 20  |le buffer.  .   |
00000aa0  20 20 20 20 3c 3d 0a 20  20 20 20 20 20 20 20 20  |    <=.         |
00000ab0  69 6e 74 20 66 69 6c 65  20 73 69 7a 65 20 69 6e  |int file size in|
00000ac0  20 62 79 74 65 73 20 28  65 78 63 6c 75 64 69 6e  | bytes (excludin|
00000ad0  67 20 45 76 6e 74 53 68  65 6c 6c 0a 20 20 20 20  |g EvntShell.    |
00000ae0  20 20 20 20 20 20 20 20  20 70 72 65 2d 68 65 61  |         pre-hea|
00000af0  64 65 72 29 0a 0a 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |der)..----------|
00000b00  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000b20  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0a 0a  |--------------..|
00000b30  50 52 4f 43 73 68 65 6c  6c 5f 44 72 61 77 47 65  |PROCshell_DrawGe|
00000b40  74 42 6f 75 6e 64 69 6e  67 42 6f 78 28 29 0a 50  |tBoundingBox().P|
00000b50  61 72 61 6d 73 20 3d 3e  0a 20 20 20 20 20 20 20  |arams =>.       |
00000b60  20 20 69 6e 74 20 61 64  64 72 65 73 73 20 6f 66  |  int address of|
00000b70  20 64 72 61 77 66 69 6c  65 20 62 75 66 66 65 72  | drawfile buffer|
00000b80  0a 20 20 20 20 20 20 20  20 20 69 6e 74 20 78 20  |.         int x |
00000b90  70 6f 73 69 74 69 6f 6e  20 28 6f 73 20 75 6e 69  |position (os uni|
00000ba0  74 73 29 0a 20 20 20 20  20 20 20 20 20 69 6e 74  |ts).         int|
00000bb0  20 79 20 70 6f 73 69 74  69 6f 6e 20 28 6f 73 20  | y position (os |
00000bc0  75 6e 69 74 73 29 0a 20  20 20 20 20 20 20 20 20  |units).         |
00000bd0  69 6e 74 20 77 69 64 74  68 20 20 28 6f 73 20 75  |int width  (os u|
00000be0  6e 69 74 73 29 0a 20 20  20 20 20 20 20 20 20 69  |nits).         i|
00000bf0  6e 74 20 68 65 69 67 68  74 20 28 6f 73 20 75 6e  |nt height (os un|
00000c00  69 74 73 29 0a 0a 20 20  20 20 20 20 20 3c 3d 0a  |its)..       <=.|
00000c10  20 20 20 20 20 20 20 20  20 54 68 65 20 78 2c 79  |         The x,y|
00000c20  2c 68 65 69 67 68 74 20  61 6e 64 20 77 69 64 74  |,height and widt|
00000c30  68 20 76 61 6c 75 65 73  20 61 72 65 0a 20 20 20  |h values are.   |
00000c40  20 20 20 20 20 20 72 65  74 75 72 6e 65 64 0a 0a  |      returned..|
00000c50  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000c80  2d 2d 2d 2d 2d 2d 2d 2d  0a 0a 50 52 4f 43 73 68  |--------..PROCsh|
00000c90  65 6c 6c 5f 44 72 61 77  49 6e 69 74 46 6f 6e 74  |ell_DrawInitFont|
00000ca0  28 29 0a 50 61 72 61 6d  73 20 3d 3e 0a 20 20 20  |().Params =>.   |
00000cb0  20 20 20 20 20 20 69 6e  74 20 61 64 64 72 65 73  |      int addres|
00000cc0  73 20 6f 66 20 64 72 61  77 66 69 6c 65 20 62 75  |s of drawfile bu|
00000cd0  66 66 65 72 0a 20 20 20  20 20 20 20 20 20 73 74  |ffer.         st|
00000ce0  72 20 6e 61 6d 65 20 6f  66 20 66 6f 6e 74 20 74  |r name of font t|
00000cf0  6f 20 69 6e 69 74 69 61  6c 69 73 65 0a 20 20 20  |o initialise.   |
00000d00  20 20 20 20 20 20 20 20  20 20 69 2e 65 2e 20 27  |          i.e. '|
00000d10  54 72 69 6e 69 74 79 2e  4d 65 64 69 75 6d 2e 49  |Trinity.Medium.I|
00000d20  74 61 6c 69 63 27 0a 0a  20 20 20 20 20 20 20 3c  |talic'..       <|
00000d30  3d 0a 20 20 20 20 20 20  20 20 20 20 61 64 64 72  |=.          addr|
00000d40  65 73 73 20 6f 66 20 64  72 61 77 66 69 6c 65 20  |ess of drawfile |
00000d50  62 75 66 66 65 72 20 69  73 0a 20 20 20 20 20 20  |buffer is.      |
00000d60  20 20 20 20 75 70 64 61  74 65 64 0a 0a 42 65 66  |    updated..Bef|
00000d70  6f 72 65 20 74 65 78 74  20 75 73 69 6e 67 20 6f  |ore text using o|
00000d80  75 74 6c 69 6e 65 20 66  6f 6e 74 73 20 63 61 6e  |utline fonts can|
00000d90  20 62 65 20 75 73 65 64  0a 69 6e 20 61 20 64 72  | be used.in a dr|
00000da0  61 77 66 69 6c 65 20 69  74 20 69 73 20 76 69 74  |awfile it is vit|
00000db0  61 6c 20 74 68 61 74 20  74 68 65 79 20 61 72 65  |al that they are|
00000dc0  0a 69 6e 69 74 69 61 6c  69 73 65 64 20 75 73 69  |.initialised usi|
00000dd0  6e 67 20 74 68 69 73 20  63 61 6c 6c 2e 20 4f 6e  |ng this call. On|
00000de0  63 65 20 79 6f 75 20 68  61 76 65 0a 63 61 6c 6c  |ce you have.call|
00000df0  65 64 20 74 68 69 73 20  72 6f 75 74 69 6e 65 20  |ed this routine |
00000e00  66 6f 72 20 74 68 65 20  66 69 72 73 74 20 74 69  |for the first ti|
00000e10  6d 65 20 79 6f 75 0a 6d  75 73 74 20 63 6f 6e 74  |me you.must cont|
00000e20  69 6e 75 65 20 69 6e 69  74 69 61 6c 69 73 69 6e  |inue initialisin|
00000e30  67 20 61 6c 6c 20 74 68  65 20 66 6f 6e 74 73 20  |g all the fonts |
00000e40  74 68 61 74 0a 77 69 6c  6c 20 62 65 20 6e 65 65  |that.will be nee|
00000e50  64 65 64 20 62 65 66 6f  72 65 20 63 72 65 61 74  |ded before creat|
00000e60  69 6e 67 20 6f 74 68 65  72 20 6f 62 6a 65 63 74  |ing other object|
00000e70  73 2e 0a 0a 49 74 20 77  6f 75 6c 64 20 61 70 70  |s...It would app|
00000e80  65 61 72 20 28 64 65 73  70 69 74 65 20 77 68 61  |ear (despite wha|
00000e90  74 20 74 68 65 20 50 52  4d 73 20 73 61 79 21 29  |t the PRMs say!)|
00000ea0  0a 74 68 61 74 20 66 6f  6e 74 20 69 6e 69 74 69  |.that font initi|
00000eb0  61 6c 69 73 61 74 69 6f  6e 20 6d 75 73 74 20 6f  |alisation must o|
00000ec0  63 63 75 72 20 62 65 66  6f 72 65 20 61 6e 79 0a  |ccur before any.|
00000ed0  6f 74 68 65 72 20 6f 62  6a 65 63 74 73 20 61 72  |other objects ar|
00000ee0  65 20 64 65 66 69 6e 65  64 20 2d 20 74 68 61 74  |e defined - that|
00000ef0  20 69 73 20 79 6f 75 20  6d 75 73 74 0a 69 6e 69  | is you must.ini|
00000f00  74 69 61 6c 69 73 65 20  61 6e 79 20 66 6f 6e 74  |tialise any font|
00000f10  73 20 64 69 72 65 63 74  6c 79 20 61 66 74 65 72  |s directly after|
00000f20  20 63 72 65 61 74 69 6e  67 0a 74 68 65 20 64 72  | creating.the dr|
00000f30  61 77 66 69 6c 65 2e 0a  0a 41 74 74 65 6d 70 74  |awfile...Attempt|
00000f40  69 6e 67 20 74 6f 20 75  73 65 20 66 6f 6e 74 73  |ing to use fonts|
00000f50  20 74 68 61 74 20 61 72  65 20 6e 6f 74 20 61 76  | that are not av|
00000f60  61 69 6c 61 62 6c 65 0a  28 68 61 73 20 21 46 6f  |ailable.(has !Fo|
00000f70  6e 74 73 20 62 65 65 6e  20 27 73 65 65 6e 27 20  |nts been 'seen' |
00000f80  62 79 20 74 68 65 20 46  69 6c 65 72 3f 29 20 77  |by the Filer?) w|
00000f90  69 6c 6c 0a 63 61 75 73  65 20 61 6e 20 65 72 72  |ill.cause an err|
00000fa0  6f 72 2e 20 59 6f 75 20  73 68 6f 75 6c 64 20 61  |or. You should a|
00000fb0  6c 73 6f 20 62 65 61 72  20 69 6e 20 6d 69 6e 64  |lso bear in mind|
00000fc0  0a 74 68 61 74 20 75 73  69 6e 67 20 66 6f 6e 74  |.that using font|
00000fd0  73 20 74 68 61 74 20 6f  74 68 65 72 20 70 65 6f  |s that other peo|
00000fe0  70 6c 65 20 6d 61 79 20  6e 6f 74 20 68 61 76 65  |ple may not have|
00000ff0  0a 63 61 6e 20 63 61 75  73 65 20 70 72 6f 62 6c  |.can cause probl|
00001000  65 6d 73 20 61 73 20 76  61 72 69 6f 75 73 20 61  |ems as various a|
00001010  70 70 6c 69 63 61 74 69  6f 6e 73 0a 72 65 61 63  |pplications.reac|
00001020  74 20 69 6e 20 64 69 66  66 65 72 65 6e 74 20 77  |t in different w|
00001030  61 79 73 20 74 6f 20 74  68 69 73 20 73 69 74 75  |ays to this situ|
00001040  61 74 69 6f 6e 2e 0a 0a  2d 2d 2d 2d 2d 2d 2d 2d  |ation...--------|
00001050  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001080  0a 0a 50 52 4f 43 73 68  65 6c 6c 5f 44 72 61 77  |..PROCshell_Draw|
00001090  53 65 74 46 6f 6e 74 28  29 0a 50 61 72 61 6d 73  |SetFont().Params|
000010a0  20 3d 3e 0a 20 20 20 20  20 20 20 20 20 69 6e 74  | =>.         int|
000010b0  20 20 61 64 64 72 65 73  73 20 6f 66 20 64 72 61  |  address of dra|
000010c0  77 66 69 6c 65 20 62 75  66 66 65 72 0a 20 20 20  |wfile buffer.   |
000010d0  20 20 20 20 20 20 73 74  72 20 20 6e 61 6d 65 20  |      str  name |
000010e0  6f 66 20 66 6f 6e 74 20  28 22 22 20 66 6f 72 20  |of font ("" for |
000010f0  53 79 73 74 65 6d 20 46  6f 6e 74 29 0a 0a 42 65  |System Font)..Be|
00001100  66 6f 72 65 20 74 68 69  73 20 63 61 6c 6c 20 63  |fore this call c|
00001110  61 6e 20 62 65 20 6d 61  64 65 20 74 68 65 20 66  |an be made the f|
00001120  6f 6e 74 20 73 70 65 63  69 66 69 65 64 20 6d 75  |ont specified mu|
00001130  73 74 20 62 65 0a 69 6e  69 74 69 61 6c 69 73 65  |st be.initialise|
00001140  64 20 77 69 74 68 20 61  20 63 61 6c 6c 20 74 6f  |d with a call to|
00001150  20 50 52 4f 43 73 68 65  6c 6c 5f 44 72 61 77 49  | PROCshell_DrawI|
00001160  6e 69 74 46 6f 6e 74 2c  0a 6f 74 68 65 72 77 69  |nitFont,.otherwi|
00001170  73 65 20 61 6e 20 65 72  72 6f 72 20 77 69 6c 6c  |se an error will|
00001180  20 62 65 20 67 65 6e 65  72 61 74 65 64 2e 0a 0a  | be generated...|
00001190  41 6c 6c 20 74 65 78 74  20 6f 62 6a 65 63 74 73  |All text objects|
000011a0  20 63 72 65 61 74 65 64  20 77 69 74 68 20 50 52  | created with PR|
000011b0  4f 43 73 68 65 6c 6c 5f  44 72 61 77 4f 75 74 6c  |OCshell_DrawOutl|
000011c0  69 6e 65 46 6f 6e 74 0a  77 69 6c 6c 20 62 65 20  |ineFont.will be |
000011d0  69 6e 20 74 68 65 20 73  70 65 63 69 66 69 65 64  |in the specified|
000011e0  20 66 6f 6e 74 20 75 6e  74 69 6c 20 74 68 65 20  | font until the |
000011f0  6e 65 78 74 20 63 61 6c  6c 20 74 6f 0a 50 52 4f  |next call to.PRO|
00001200  43 73 68 65 6c 6c 5f 44  72 61 77 53 65 74 46 6f  |Cshell_DrawSetFo|
00001210  6e 74 2e 0a 0a 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |nt...-----------|
00001220  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001240  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 0a 50  |-------------..P|
00001250  52 4f 43 73 68 65 6c 6c  5f 44 72 61 77 42 6f 78  |ROCshell_DrawBox|
00001260  28 29 0a 50 61 72 61 6d  73 20 3d 3e 0a 20 20 20  |().Params =>.   |
00001270  20 20 20 20 20 20 69 6e  74 20 20 61 64 64 72 65  |      int  addre|
00001280  73 73 20 6f 66 20 64 72  61 77 66 69 6c 65 20 62  |ss of drawfile b|
00001290  75 66 66 65 72 0a 20 20  20 20 20 20 20 20 20 72  |uffer.         r|
000012a0  65 61 6c 20 78 20 63 6f  6f 72 64 69 6e 61 74 65  |eal x coordinate|
000012b0  20 6f 66 20 62 6f 74 74  6f 6d 20 6c 65 66 74 0a  | of bottom left.|
000012c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 6f 66  |              of|
000012d0  20 62 6f 78 0a 20 20 20  20 20 20 20 20 20 72 65  | box.         re|
000012e0  61 6c 20 79 20 63 6f 6f  72 64 69 6e 61 74 65 20  |al y coordinate |
000012f0  6f 66 20 62 6f 74 74 6f  6d 20 6c 65 66 74 0a 20  |of bottom left. |
00001300  20 20 20 20 20 20 20 20  20 20 20 20 20 6f 66 20  |             of |
00001310  62 6f 78 0a 20 20 20 20  20 20 20 20 20 72 65 61  |box.         rea|
00001320  6c 20 77 69 64 74 68 20  6f 66 20 62 6f 78 0a 20  |l width of box. |
00001330  20 20 20 20 20 20 20 20  72 65 61 6c 20 68 65 69  |        real hei|
00001340  67 68 74 20 6f 66 20 62  6f 78 0a 0a 20 20 20 20  |ght of box..    |
00001350  20 20 20 3c 3d 0a 20 20  20 20 20 20 20 20 20 61  |   <=.         a|
00001360  64 64 72 65 73 73 20 6f  66 20 64 72 61 77 66 69  |ddress of drawfi|
00001370  6c 65 20 62 75 66 66 65  72 20 69 73 0a 20 20 20  |le buffer is.   |
00001380  20 20 20 20 20 20 75 70  64 61 74 65 64 0a 0a 54  |      updated..T|
00001390  68 65 20 63 6f 6f 72 64  69 6e 61 74 65 73 20 61  |he coordinates a|
000013a0  6e 64 20 64 69 6d 65 6e  73 69 6f 6e 73 20 6f 66  |nd dimensions of|
000013b0  20 74 68 65 20 62 6f 78  0a 61 72 65 20 67 69 76  | the box.are giv|
000013c0  65 6e 20 69 6e 20 74 68  65 20 63 75 72 72 65 6e  |en in the curren|
000013d0  74 6c 79 20 73 65 6c 65  63 74 65 64 20 75 6e 69  |tly selected uni|
000013e0  74 73 2e 0a 0a 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |ts...-----------|
000013f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001410  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 0a 50  |-------------..P|
00001420  52 4f 43 73 68 65 6c 6c  5f 44 72 61 77 43 69 72  |ROCshell_DrawCir|
00001430  63 6c 65 28 29 0a 50 61  72 61 6d 73 20 3d 3e 0a  |cle().Params =>.|
00001440  20 20 20 20 20 20 20 20  20 69 6e 74 20 20 61 64  |         int  ad|
00001450  64 72 65 73 73 20 6f 66  20 64 72 61 77 66 69 6c  |dress of drawfil|
00001460  65 20 62 75 66 66 65 72  0a 20 20 20 20 20 20 20  |e buffer.       |
00001470  20 20 72 65 61 6c 20 78  20 63 6f 6f 72 64 69 6e  |  real x coordin|
00001480  61 74 65 20 6f 66 20 63  65 6e 74 72 65 20 6f 66  |ate of centre of|
00001490  0a 20 20 20 20 20 20 20  20 20 20 20 20 20 20 63  |.              c|
000014a0  69 72 63 6c 65 0a 20 20  20 20 20 20 20 20 20 72  |ircle.         r|
000014b0  65 61 6c 20 79 20 63 6f  6f 72 64 69 6e 61 74 65  |eal y coordinate|
000014c0  20 6f 66 20 63 65 6e 74  72 65 20 6f 66 0a 20 20  | of centre of.  |
000014d0  20 20 20 20 20 20 20 20  20 20 20 20 63 69 72 63  |            circ|
000014e0  6c 65 0a 20 20 20 20 20  20 20 20 20 72 65 61 6c  |le.         real|
000014f0  20 72 61 64 69 75 73 20  6f 66 20 63 69 72 63 6c  | radius of circl|
00001500  65 0a 0a 20 20 20 20 20  20 20 3c 3d 0a 20 20 20  |e..       <=.   |
00001510  20 20 20 20 20 20 61 64  64 72 65 73 73 20 6f 66  |      address of|
00001520  20 64 72 61 77 66 69 6c  65 20 62 75 66 66 65 72  | drawfile buffer|
00001530  20 69 73 0a 20 20 20 20  20 20 20 20 20 75 70 64  | is.         upd|
00001540  61 74 65 64 0a 0a 54 68  65 20 63 6f 6f 72 64 69  |ated..The coordi|
00001550  6e 61 74 65 73 20 61 6e  64 20 64 69 6d 65 6e 73  |nates and dimens|
00001560  69 6f 6e 73 20 6f 66 20  74 68 65 20 63 69 72 63  |ions of the circ|
00001570  6c 65 0a 61 72 65 20 67  69 76 65 6e 20 69 6e 20  |le.are given in |
00001580  74 68 65 20 63 75 72 72  65 6e 74 6c 79 20 73 65  |the currently se|
00001590  6c 65 63 74 65 64 20 75  6e 69 74 73 2e 0a 0a 2d  |lected units...-|
000015a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000015d0  2d 2d 2d 2d 2d 2d 2d 0a  0a 50 52 4f 43 73 68 65  |-------..PROCshe|
000015e0  6c 6c 5f 44 72 61 77 45  6c 6c 69 70 73 65 28 29  |ll_DrawEllipse()|
000015f0  0a 50 61 72 61 6d 73 20  3d 3e 0a 20 20 20 20 20  |.Params =>.     |
00001600  20 20 20 20 69 6e 74 20  20 61 64 64 72 65 73 73  |    int  address|
00001610  20 6f 66 20 64 72 61 77  66 69 6c 65 20 62 75 66  | of drawfile buf|
00001620  66 65 72 0a 20 20 20 20  20 20 20 20 20 72 65 61  |fer.         rea|
00001630  6c 20 78 20 63 6f 6f 72  64 69 6e 61 74 65 20 6f  |l x coordinate o|
00001640  66 20 63 65 6e 74 72 65  20 6f 66 0a 20 20 20 20  |f centre of.    |
00001650  20 20 20 20 20 20 20 20  20 20 65 6c 6c 69 70 73  |          ellips|
00001660  65 0a 20 20 20 20 20 20  20 20 20 72 65 61 6c 20  |e.         real |
00001670  79 20 63 6f 6f 72 64 69  6e 61 74 65 20 6f 66 20  |y coordinate of |
00001680  63 65 6e 74 72 65 20 6f  66 0a 20 20 20 20 20 20  |centre of.      |
00001690  20 20 20 20 20 20 20 20  65 6c 6c 69 70 73 65 0a  |        ellipse.|
000016a0  20 20 20 20 20 20 20 20  20 72 65 61 6c 20 6d 61  |         real ma|
000016b0  6a 6f 72 20 61 78 69 73  20 6f 66 20 65 6c 6c 69  |jor axis of elli|
000016c0  70 73 65 0a 20 20 20 20  20 20 20 20 20 72 65 61  |pse.         rea|
000016d0  6c 20 6d 69 6e 6f 72 20  61 78 69 73 20 6f 66 20  |l minor axis of |
000016e0  65 6c 6c 69 70 73 65 0a  20 20 20 20 20 20 20 20  |ellipse.        |
000016f0  20 20 0a 20 20 20 20 20  20 20 3c 3d 0a 20 20 20  |  .       <=.   |
00001700  20 20 20 20 20 20 61 64  64 72 65 73 73 20 6f 66  |      address of|
00001710  20 64 72 61 77 66 69 6c  65 20 62 75 66 66 65 72  | drawfile buffer|
00001720  20 69 73 0a 20 20 20 20  20 20 20 20 20 75 70 64  | is.         upd|
00001730  61 74 65 64 0a 0a 54 68  65 20 63 6f 6f 72 64 69  |ated..The coordi|
00001740  6e 61 74 65 73 20 61 6e  64 20 64 69 6d 65 6e 73  |nates and dimens|
00001750  69 6f 6e 73 20 6f 66 20  74 68 65 20 65 6c 6c 69  |ions of the elli|
00001760  70 73 65 0a 61 72 65 20  67 69 76 65 6e 20 69 6e  |pse.are given in|
00001770  20 74 68 65 20 63 75 72  72 65 6e 74 6c 79 20 73  | the currently s|
00001780  65 6c 65 63 74 65 64 20  75 6e 69 74 73 2e 0a 0a  |elected units...|
00001790  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000017c0  2d 2d 2d 2d 2d 2d 2d 2d  0a 0a 50 52 4f 43 73 68  |--------..PROCsh|
000017d0  65 6c 6c 5f 44 72 61 77  4c 69 6e 65 28 29 0a 50  |ell_DrawLine().P|
000017e0  61 72 61 6d 73 20 3d 3e  0a 20 20 20 20 20 20 20  |arams =>.       |
000017f0  20 20 69 6e 74 20 20 61  64 64 72 65 73 73 20 6f  |  int  address o|
00001800  66 20 64 72 61 77 66 69  6c 65 20 62 75 66 66 65  |f drawfile buffe|
00001810  72 0a 20 20 20 20 20 20  20 20 20 72 65 61 6c 20  |r.         real |
00001820  78 20 63 6f 6f 72 64 69  6e 61 74 65 20 6f 66 20  |x coordinate of |
00001830  73 74 61 72 74 20 6f 66  20 6c 69 6e 65 0a 20 20  |start of line.  |
00001840  20 20 20 20 20 20 20 72  65 61 6c 20 79 20 63 6f  |       real y co|
00001850  6f 72 64 69 6e 61 74 65  20 6f 66 20 73 74 61 72  |ordinate of star|
00001860  74 20 6f 66 20 6c 69 6e  65 0a 20 20 20 20 20 20  |t of line.      |
00001870  20 20 20 72 65 61 6c 20  78 20 63 6f 6f 72 64 69  |   real x coordi|
00001880  6e 61 74 65 20 6f 66 20  65 6e 64 20 6f 66 20 6c  |nate of end of l|
00001890  69 6e 65 0a 20 20 20 20  20 20 20 20 20 72 65 61  |ine.         rea|
000018a0  6c 20 79 20 63 6f 6f 72  64 69 6e 61 74 65 20 6f  |l y coordinate o|
000018b0  66 20 65 6e 64 20 6f 66  20 6c 69 6e 65 0a 20 20  |f end of line.  |
000018c0  20 20 20 20 20 20 20 20  0a 20 20 20 20 20 20 20  |        .       |
000018d0  3c 3d 0a 20 20 20 20 20  20 20 20 20 61 64 64 72  |<=.         addr|
000018e0  65 73 73 20 6f 66 20 64  72 61 77 66 69 6c 65 20  |ess of drawfile |
000018f0  62 75 66 66 65 72 20 69  73 0a 20 20 20 20 20 20  |buffer is.      |
00001900  20 20 20 75 70 64 61 74  65 64 0a 0a 54 68 65 20  |   updated..The |
00001910  63 6f 6f 72 64 69 6e 61  74 65 73 20 61 6e 64 20  |coordinates and |
00001920  64 69 6d 65 6e 73 69 6f  6e 73 20 6f 66 20 74 68  |dimensions of th|
00001930  65 20 6c 69 6e 65 0a 61  72 65 20 67 69 76 65 6e  |e line.are given|
00001940  20 69 6e 20 74 68 65 20  63 75 72 72 65 6e 74 6c  | in the currentl|
00001950  79 20 73 65 6c 65 63 74  65 64 20 75 6e 69 74 73  |y selected units|
00001960  2e 0a 0a 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |...-------------|
00001970  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001990  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0a 0a 50 52 4f  |-----------..PRO|
000019a0  43 73 68 65 6c 6c 5f 44  72 61 77 4f 75 74 6c 69  |Cshell_DrawOutli|
000019b0  6e 65 46 6f 6e 74 28 29  0a 50 61 72 61 6d 73 20  |neFont().Params |
000019c0  3d 3e 0a 20 20 20 20 20  20 20 20 20 69 6e 74 20  |=>.         int |
000019d0  20 61 64 64 72 65 73 73  20 6f 66 20 64 72 61 77  | address of draw|
000019e0  66 69 6c 65 20 62 75 66  66 65 72 0a 20 20 20 20  |file buffer.    |
000019f0  20 20 20 20 20 73 74 72  20 20 74 65 78 74 20 74  |     str  text t|
00001a00  6f 20 69 6e 73 65 72 74  0a 20 20 20 20 20 20 20  |o insert.       |
00001a10  20 20 72 65 61 6c 20 77  69 64 74 68 20 6f 66 20  |  real width of |
00001a20  66 6f 6e 74 20 20 28 70  6f 69 6e 74 73 29 0a 20  |font  (points). |
00001a30  20 20 20 20 20 20 20 20  72 65 61 6c 20 68 65 69  |        real hei|
00001a40  67 68 74 20 6f 66 20 66  6f 6e 74 20 28 70 6f 69  |ght of font (poi|
00001a50  6e 74 73 29 0a 20 20 20  20 20 20 20 20 20 72 65  |nts).         re|
00001a60  61 6c 20 78 20 63 6f 6f  72 64 69 6e 61 74 65 20  |al x coordinate |
00001a70  6f 66 20 62 6f 74 74 6f  6d 20 6c 65 66 74 0a 20  |of bottom left. |
00001a80  20 20 20 20 20 20 20 20  20 20 20 20 20 6f 66 20  |             of |
00001a90  74 65 78 74 20 28 63 75  72 72 65 6e 74 20 75 6e  |text (current un|
00001aa0  69 74 73 29 0a 20 20 20  20 20 20 20 20 20 72 65  |its).         re|
00001ab0  61 6c 20 79 20 63 6f 6f  72 64 69 6e 61 74 65 20  |al y coordinate |
00001ac0  6f 66 20 62 6f 74 74 6f  6d 20 6c 65 66 74 0a 20  |of bottom left. |
00001ad0  20 20 20 20 20 20 20 20  20 20 20 20 20 6f 66 20  |             of |
00001ae0  74 65 78 74 20 28 63 75  72 72 65 6e 74 20 75 6e  |text (current un|
00001af0  69 74 73 29 0a 0a 20 20  20 20 20 20 20 3c 3d 0a  |its)..       <=.|
00001b00  20 20 20 20 20 20 20 20  20 20 61 64 64 72 65 73  |          addres|
00001b10  73 20 6f 66 20 64 72 61  77 66 69 6c 65 20 62 75  |s of drawfile bu|
00001b20  66 66 65 72 20 69 73 0a  20 20 20 20 20 20 20 20  |ffer is.        |
00001b30  20 20 75 70 64 61 74 65  64 0a 0a 42 65 66 6f 72  |  updated..Befor|
00001b40  65 20 61 20 74 65 78 74  20 6f 62 6a 65 63 74 20  |e a text object |
00001b50  63 61 6e 20 69 6e 73 65  72 74 65 64 20 74 68 65  |can inserted the|
00001b60  20 66 6f 6e 74 0a 75 73  65 64 20 6d 75 73 74 20  | font.used must |
00001b70  62 65 20 69 6e 69 74 69  61 6c 69 73 65 64 20 77  |be initialised w|
00001b80  69 74 68 20 61 20 63 61  6c 6c 20 74 6f 0a 50 52  |ith a call to.PR|
00001b90  4f 43 73 68 65 6c 6c 5f  44 72 61 77 49 6e 69 74  |OCshell_DrawInit|
00001ba0  46 6f 6e 74 2c 20 6f 74  68 65 72 77 69 73 65 20  |Font, otherwise |
00001bb0  61 6e 20 65 72 72 6f 72  0a 77 69 6c 6c 20 62 65  |an error.will be|
00001bc0  20 67 65 6e 65 72 61 74  65 64 2e 20 54 68 65 20  | generated. The |
00001bd0  66 6f 6e 74 20 74 6f 20  75 73 65 20 6d 75 73 74  |font to use must|
00001be0  20 61 6c 73 6f 0a 62 65  20 73 65 6c 65 63 74 65  | also.be selecte|
00001bf0  64 20 77 69 74 68 20 50  52 4f 43 73 68 65 6c 6c  |d with PROCshell|
00001c00  5f 44 72 61 77 53 65 74  46 6f 6e 74 2e 0a 0a 2d  |_DrawSetFont...-|
00001c10  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001c40  2d 2d 2d 2d 2d 2d 2d 0a  0a 50 52 4f 43 73 68 65  |-------..PROCshe|
00001c50  6c 6c 5f 44 72 61 77 53  65 74 46 69 6c 6c 43 6f  |ll_DrawSetFillCo|
00001c60  6c 6f 75 72 28 29 0a 50  61 72 61 6d 73 20 3d 3e  |lour().Params =>|
00001c70  0a 20 20 20 20 20 20 20  20 20 69 6e 74 20 61 64  |.         int ad|
00001c80  64 72 65 73 73 20 6f 66  20 64 72 61 77 66 69 6c  |dress of drawfil|
00001c90  65 20 62 75 66 66 65 72  0a 20 20 20 20 20 20 20  |e buffer.       |
00001ca0  20 20 69 6e 74 20 72 65  64 20 20 20 76 61 6c 75  |  int red   valu|
00001cb0  65 20 28 30 2d 32 35 35  29 0a 20 20 20 20 20 20  |e (0-255).      |
00001cc0  20 20 20 69 6e 74 20 67  72 65 65 6e 20 76 61 6c  |   int green val|
00001cd0  75 65 20 28 30 2d 32 35  35 29 0a 20 20 20 20 20  |ue (0-255).     |
00001ce0  20 20 20 20 69 6e 74 20  62 6c 75 65 20 20 76 61  |    int blue  va|
00001cf0  6c 75 65 20 28 30 2d 32  35 35 29 0a 0a 54 68 65  |lue (0-255)..The|
00001d00  20 63 6f 6c 6f 75 72 20  76 61 6c 75 65 20 69 73  | colour value is|
00001d10  20 73 75 70 70 6c 69 65  64 20 61 73 20 61 20 32  | supplied as a 2|
00001d20  34 20 62 69 74 0a 76 61  6c 75 65 2c 20 52 49 53  |4 bit.value, RIS|
00001d30  43 20 4f 53 20 68 61 6e  64 6c 65 73 20 74 68 65  |C OS handles the|
00001d40  20 64 69 73 70 6c 61 79  20 6f 66 20 74 68 65 0a  | display of the.|
00001d50  63 6f 6c 6f 75 72 20 62  79 20 64 69 74 68 65 72  |colour by dither|
00001d60  69 6e 67 2e 0a 0a 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |ing...----------|
00001d70  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001d90  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0a 0a  |--------------..|
00001da0  50 52 4f 43 73 68 65 6c  6c 5f 44 72 61 77 53 65  |PROCshell_DrawSe|
00001db0  74 50 61 74 68 43 6f 6c  6f 75 72 28 29 0a 50 61  |tPathColour().Pa|
00001dc0  72 61 6d 73 20 3d 3e 0a  20 20 20 20 20 20 20 20  |rams =>.        |
00001dd0  20 69 6e 74 20 61 64 64  72 65 73 73 20 6f 66 20  | int address of |
00001de0  64 72 61 77 66 69 6c 65  20 62 75 66 66 65 72 0a  |drawfile buffer.|
00001df0  20 20 20 20 20 20 20 20  20 69 6e 74 20 72 65 64  |         int red|
00001e00  20 20 20 76 61 6c 75 65  20 28 30 2d 32 35 35 29  |   value (0-255)|
00001e10  0a 20 20 20 20 20 20 20  20 20 69 6e 74 20 67 72  |.         int gr|
00001e20  65 65 6e 20 76 61 6c 75  65 20 28 30 2d 32 35 35  |een value (0-255|
00001e30  29 0a 20 20 20 20 20 20  20 20 20 69 6e 74 20 62  |).         int b|
00001e40  6c 75 65 20 20 76 61 6c  75 65 20 28 30 2d 32 35  |lue  value (0-25|
00001e50  35 29 0a 0a 54 68 65 20  63 6f 6c 6f 75 72 20 76  |5)..The colour v|
00001e60  61 6c 75 65 20 69 73 20  73 75 70 70 6c 69 65 64  |alue is supplied|
00001e70  20 61 73 20 61 20 32 34  20 62 69 74 0a 76 61 6c  | as a 24 bit.val|
00001e80  75 65 2c 20 52 49 53 43  20 4f 53 20 68 61 6e 64  |ue, RISC OS hand|
00001e90  6c 65 73 20 74 68 65 20  64 69 73 70 6c 61 79 20  |les the display |
00001ea0  6f 66 20 74 68 65 0a 63  6f 6c 6f 75 72 20 62 79  |of the.colour by|
00001eb0  20 64 69 74 68 65 72 69  6e 67 2e 0a 0a 2d 2d 2d  | dithering...---|
00001ec0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001ef0  2d 2d 2d 2d 2d 0a 0a 50  52 4f 43 73 68 65 6c 6c  |-----..PROCshell|
00001f00  5f 44 72 61 77 53 65 74  50 61 74 68 57 69 64 74  |_DrawSetPathWidt|
00001f10  68 28 29 0a 50 61 72 61  6d 73 20 3d 3e 0a 20 20  |h().Params =>.  |
00001f20  20 20 20 20 20 20 20 69  6e 74 20 20 61 64 64 72  |       int  addr|
00001f30  65 73 73 20 6f 66 20 64  72 61 77 66 69 6c 65 20  |ess of drawfile |
00001f40  62 75 66 66 65 72 0a 20  20 20 20 20 20 20 20 20  |buffer.         |
00001f50  72 65 61 6c 20 70 61 74  68 20 77 69 64 74 68 20  |real path width |
00001f60  28 63 75 72 72 65 6e 74  20 75 6e 69 74 73 29 0a  |(current units).|
00001f70  0a 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.---------------|
00001f80  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001fa0  2d 2d 2d 2d 2d 2d 2d 2d  2d 0a 0a 50 52 4f 43 73  |---------..PROCs|
00001fb0  68 65 6c 6c 5f 44 72 61  77 53 65 74 55 6e 69 74  |hell_DrawSetUnit|
00001fc0  73 43 4d 28 29 0a 50 61  72 61 6d 73 20 3d 3e 0a  |sCM().Params =>.|
00001fd0  20 20 20 20 20 20 20 20  20 69 6e 74 20 61 64 64  |         int add|
00001fe0  72 65 73 73 20 6f 66 20  64 72 61 77 66 69 6c 65  |ress of drawfile|
00001ff0  20 62 75 66 66 65 72 0a  0a 53 65 74 73 20 63 65  | buffer..Sets ce|
00002000  6e 74 69 6d 65 74 65 72  73 20 74 6f 20 62 65 20  |ntimeters to be |
00002010  74 68 65 20 63 75 72 72  65 6e 74 20 75 6e 69 74  |the current unit|
00002020  20 6f 66 0a 6d 65 61 73  75 72 65 6d 65 6e 74 20  | of.measurement |
00002030  66 6f 72 20 74 68 65 20  6f 74 68 65 72 20 6c 69  |for the other li|
00002040  62 72 61 72 79 20 72 6f  75 74 69 6e 65 73 2e 0a  |brary routines..|
00002050  0a 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.---------------|
00002060  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002080  2d 2d 2d 2d 2d 2d 2d 2d  2d 0a 0a 50 52 4f 43 73  |---------..PROCs|
00002090  68 65 6c 6c 5f 44 72 61  77 53 65 74 55 6e 69 74  |hell_DrawSetUnit|
000020a0  73 49 4e 28 29 0a 50 61  72 61 6d 73 20 3d 3e 0a  |sIN().Params =>.|
000020b0  20 20 20 20 20 20 20 20  20 69 6e 74 20 61 64 64  |         int add|
000020c0  72 65 73 73 20 6f 66 20  64 72 61 77 66 69 6c 65  |ress of drawfile|
000020d0  20 62 75 66 66 65 72 0a  0a 53 65 74 73 20 69 6e  | buffer..Sets in|
000020e0  63 68 65 73 20 74 6f 20  62 65 20 74 68 65 20 63  |ches to be the c|
000020f0  75 72 72 65 6e 74 20 75  6e 69 74 20 6f 66 0a 6d  |urrent unit of.m|
00002100  65 61 73 75 72 65 6d 65  6e 74 20 66 6f 72 20 74  |easurement for t|
00002110  68 65 20 6f 74 68 65 72  20 6c 69 62 72 61 72 79  |he other library|
00002120  20 72 6f 75 74 69 6e 65  73 2e 0a 0a 2d 2d 2d 2d  | routines...----|
00002130  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002160  2d 2d 2d 2d 0a 0a 50 52  4f 43 73 68 65 6c 6c 5f  |----..PROCshell_|
00002170  44 72 61 77 53 65 74 55  6e 69 74 73 4d 4d 28 29  |DrawSetUnitsMM()|
00002180  0a 50 61 72 61 6d 73 20  3d 3e 0a 20 20 20 20 20  |.Params =>.     |
00002190  20 20 20 20 69 6e 74 20  61 64 64 72 65 73 73 20  |    int address |
000021a0  6f 66 20 64 72 61 77 66  69 6c 65 20 62 75 66 66  |of drawfile buff|
000021b0  65 72 0a 0a 53 65 74 73  20 6d 69 6c 6c 69 6d 65  |er..Sets millime|
000021c0  74 65 72 73 20 74 6f 20  62 65 20 74 68 65 20 63  |ters to be the c|
000021d0  75 72 72 65 6e 74 20 75  6e 69 74 20 6f 66 0a 6d  |urrent unit of.m|
000021e0  65 61 73 75 72 65 6d 65  6e 74 20 66 6f 72 20 74  |easurement for t|
000021f0  68 65 20 6f 74 68 65 72  20 6c 69 62 72 61 72 79  |he other library|
00002200  20 72 6f 75 74 69 6e 65  73 2e 0a 0a 2d 2d 2d 2d  | routines...----|
00002210  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002240  2d 2d 2d 2d 0a 0a 50 52  4f 43 73 68 65 6c 6c 5f  |----..PROCshell_|
00002250  44 72 61 77 53 65 74 55  6e 69 74 73 4f 53 28 29  |DrawSetUnitsOS()|
00002260  0a 50 61 72 61 6d 73 20  3d 3e 0a 20 20 20 20 20  |.Params =>.     |
00002270  20 20 20 20 69 6e 74 20  61 64 64 72 65 73 73 20  |    int address |
00002280  6f 66 20 64 72 61 77 66  69 6c 65 20 62 75 66 66  |of drawfile buff|
00002290  65 72 0a 0a 53 65 74 73  20 4f 53 20 75 6e 69 74  |er..Sets OS unit|
000022a0  73 20 74 6f 20 62 65 20  74 68 65 20 63 75 72 72  |s to be the curr|
000022b0  65 6e 74 20 75 6e 69 74  20 6f 66 0a 6d 65 61 73  |ent unit of.meas|
000022c0  75 72 65 6d 65 6e 74 20  66 6f 72 20 74 68 65 20  |urement for the |
000022d0  6f 74 68 65 72 20 6c 69  62 72 61 72 79 20 72 6f  |other library ro|
000022e0  75 74 69 6e 65 73 2e 0a  0a 2d 2d 2d 2d 2d 2d 2d  |utines...-------|
000022f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002320  2d 0a 0a 50 52 4f 43 73  68 65 6c 6c 5f 44 72 61  |-..PROCshell_Dra|
00002330  77 53 65 74 55 6e 69 74  73 50 54 28 29 0a 50 61  |wSetUnitsPT().Pa|
00002340  72 61 6d 73 20 3d 3e 0a  20 20 20 20 20 20 20 20  |rams =>.        |
00002350  20 69 6e 74 20 61 64 64  72 65 73 73 20 6f 66 20  | int address of |
00002360  64 72 61 77 66 69 6c 65  20 62 75 66 66 65 72 0a  |drawfile buffer.|
00002370  0a 53 65 74 73 20 70 6f  69 6e 74 73 20 74 6f 20  |.Sets points to |
00002380  62 65 20 74 68 65 20 63  75 72 72 65 6e 74 20 75  |be the current u|
00002390  6e 69 74 20 6f 66 0a 6d  65 61 73 75 72 65 6d 65  |nit of.measureme|
000023a0  6e 74 20 66 6f 72 20 74  68 65 20 6f 74 68 65 72  |nt for the other|
000023b0  20 6c 69 62 72 61 72 79  20 72 6f 75 74 69 6e 65  | library routine|
000023c0  73 2e 0a 0a 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |s...------------|
000023d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000023f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0a           |------------.|
000023fd