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

The MakeDraw utility for RISC-OS

MakeDraw is a library of Basic routines for the Archimedes which allows DrawFiles to be created directly from Basic programmes. The Draw files can then be displayed and printed using the standard !Draw application.

This approach has several advantages over the traditional method of creating drawings "by hand" using !Draw:

  1. graphs can be created directly from data calculated or collected by the programme (see example programme "Inflation").
  2. drawings that require objects to have precise dimensions or positions can be created - this is at best very tedious to do in !Draw.
  3. repeated objects can be defined within a loop in very few statements.
  4. automatic positioning of control points for bezier curves: !Draw places the control points for you when you first enter a curve, but does not update them if you move the end point; MakeDraw allows curves to be positioned with complete accuracy.
  5. breaks can be made in automatically smoothed curves without interrupting the smooth shape of the curve.

The latest version (2.53) now includes draw object types text areas and sprites.

Click here to download 'MakeDraw'.

More details of using 'MakeDraw'

BBC Basic V includes the facility for accessing libraries of routines (i.e. procedures and functions) from your own programmes - this is described fully in the Archimedes BBC Basic Guide or the older (pre-RiscOS) User Guide. To use the MakeDraw library your programme must include the statement

LIBRARY "[directory.]MakeDraw"
and functions by calls to MakeDraw procedures and functions.

The example programmes demonstrate how to use the routines to create vector graphics in !Draw file format creating a graphic made up from precisely positioned "object", "path", "line segment" and "bezier curve" elements which can be rendered by the Draw module, which is part of the operating system (in ROM). The draw module is the thing that actually displays objects on the screen, and has capabilities beyond those used by !Draw. What MakeDraw does is create files in exactly the same format as !Draw creates them when you save a diagram. These files can then be loaded into !Draw in the usual way, and from there the diagrams can be displayed, manipulated, and printed just like any other draw file.

Simple shapes - straight lines, rectangles, circles, and ellipses - can be created by a single procedure call. Other shapes are created by defining the path one segment at a time. If any of the objects in your diagram overlap, the ones defined first will appear behind ones defined later.

A number of example programmes have been included with MakeDraw to show you how easy it is to create quite complicated and precise diagrams.