RISC OS S.V.R. S&T Department RISC OS
http://www.svrsig.org/ software/DrawLib.htm

Draw library for BBCBASIC for Windows

You need BBCBASIC for Windows to make use of this software.

There are two parts to this library utility: an addition to the 'LIBRARY' directory which includes SHOWDRAW.bbc (a library utility which renders 'DRAW' files) and MAKEDRAW.bbc (a library utility which creates 'DRAW' files).

A directory 'Demo/Doc' contains example BBCBasic programmes which show how these new LIBRARY utilities may be used from within a BBCBASIC programme. Several Acorn '!Draw' files, created using these example programmes, are also provided (with file extension '.AFF').

Click here to download the DRAWLIB library.

More details of the why and wherefore

I needed to be able to display Acorn Draw files in a PC application so that I could use vector graphics, the format of which is defined and documented and which I could 'know' the address of all contents. I was already able to create the Draw files on the Acorn platform (and of course display them).

I have converted the creation utility to work under Windows so that Acorn draw format files can be created - this was a shareware programme which needed only slight tweaks to run in Windows under BBCBASIC.

I have written a library routine to run under BBCBASIC to show Acorn format Draw files (with a file extension of .AFF) in a BBCBASIC screen window - the library routine is called 'DRAWLIB' and an example of how to use it to display the Draw files is a programme called 'SHOWDRAW'. These are fully documented and may be downloaded from this site in an archive 'MakeDraw.zip'.

The 'SHOWDRAW' programme uses the 'DRAWLIB' programme which I have written to render Acorn format 'Draw' files on the Windows platform. Three methods are used, depending on the version of Windows (this is because earlier versions of Windows do not allow scaling from 'Draw' coordinates outside the range -32768 to +32768 and there is both a machine code and BASIC version for later versions of Windows giving a balance between speed and legibility.

If you RUN the SHOWDRAW programme, then a file viewer is shown, listing the Acorn 'Draw' format files (.AFF files) which have already been created by the example programmes provided with the Draw file creation utility and if you select one it is displayed on the screen.