RISC OS 3.7 User Guide
Draw is a powerful and sophisticated drawing package; you can use it to draw and edit diagrams and pictures made up from various kinds of graphical objects.
You'll probably find that the easiest way of learning Draw is to read through Basic ideas (on the next page) and then work through the Draw tutorial , before reading the more detailed sections.
Draw is in the Apps icon bar directory display. To start Draw:
Alternatively, edit an existing drawing by dragging its file icon to the Draw icon on the icon bar, or by double-clicking on it.
The Draw window looks similar to other application windows when you first load it, except that down its lefthand side there is a strip of icons called the Toolbox. The Toolbox allows you to draw or select objects without having to use menus.
A Draw diagram is built up from objects of a number of different types. Draw stores information about each object, which means you can subsequently change individual objects without affecting the other objects.
The basic object types are:
Images
directory.
You can combine objects together as a group which you can then (usually) manipulate like any other object. Draw records the objects that were used to build a group, so that it may subsequently be 'ungrouped' into its constituents. Groups can also be used as components of other groups.
Each object has a style consisting of a number of attributes. Attributes are used to define the colours of an object, line widths, text fonts and sizes, and so on. The exact range of attributes depends on the type of object.
You can use Draw in three operating modes:
Don't worry about these names too much - when you're actually using Draw you'll change between the modes without thinking about it!
To make it easier to construct a diagram, Draw has a number of tools and shortcuts:
When you start a drawing, the Draw window displayed on your screen only shows part of your actual drawing area. The drawing area is usually the size of an A4 sheet of paper, but you can make it as small as A5 or as large as A0, depending on the size of the drawing you want to create. You can also decide whether the drawing area is a landscape rectangle (where the horizontal side is longer) or a portrait rectangle (where the vertical side is longer). You can use the scroll bars on the Draw window to move around the drawing area.
As you create a drawing, you'll often decide that you want to undo the last operation you performed. It's easy to retrace your steps and correct any errors you make:
To:
You can superimpose a rectangular or isometric grid on a drawing. This is useful for lining up objects and for checking their relative sizes. The grid is made up of 'major points' (marked by crosses) and 'minor points' (marked by dots).
You can use the grid either just as a general guide for drawing, or you can lock objects to it, so that they always align with points in the grid (the exception is if you rotate an object). When you are creating objects with grid lock turned on, you will see them attach to the nearest grid point to the pointer position.
To:
First number gives major point spacing. Second number gives number of subdivisions. You can define your own values at the bottom of the submenu. Just clicking on Inch or cm uses existing submenu settings.
You can alter the apparent size of your drawing. For example, you might want to look at something close-up to position it accurately, or you might 'zoom out' to see your whole drawing at once. This doesn't alter the actual size of your draw objects.
To:
If you scale up an object in !Draw and then highly magnify the view, the object may disappear. To retrieve the object, undo these operations. Reduce the object's scaling so that it doesn't disappear again.
Choose Misc/New view to create a new view of the drawing you are editing, in a separate window. Edits you make in one view of a drawing show up in the other views as well. You can change the zoom on each view independently, use different grids in the separate views, scroll each one independently, and so on. To get rid of a view, close the window containing it.
You can cancel most operations part-way through by pressing Esc or choosing Enter/Abandon.
You can retrace your steps using Misc/Undo (keyboard short-cut: F8).
You can choose tools from the Toolbox on the lefthand side of the Draw window, or by using the Enter submenu.
To:
You can also switch Enter/Auto-close on and use Enter/Line or Enter/Curve.
If Auto-close is off, choose Enter/Complete or press Return to close the path.
You can also use Enter/Move.
Turn Grid/Lock on to help draw a square.
If using anti-aliased fonts, you may need to increase the size of the font cache.
To create one object made up from multiple paths:
This lets you move to the start of another segment without drawing a line.
You'll now have a single object, made up of many paths. You can't 'ungroup' such an object. You can edit it, though (see page 242).
Here's an example of how to create a filled rectangle with a transparent hole in it:
When you double-click, you'll be able to see through the hole:
Note: You can't start or end a path with a Move.
This section tells you how to select and deselect objects, and how to manipulate a selection.
When you select an object, you'll see its bounding box, with handles at two of its corners (not all objects have these - see page 232).
To:
To:
You can make multiple copies of an object by repeatedly pressing Ctrl-C.
To:
To:
You can align objects, both vertically and horizontally.
Note: You need to group any objects before you can align them.
To:
In the following example three objects have been grouped and then justified left, centre and right:
To:
You can also choose to scale an object in the horizontal or vertical plane only: Choose Transform/Scale X or Scale Y.
When you scale an object using this method, its linewidth is scaled.
You can also define the linewidth of an object along with its other style attributes - see page 237.
You can't scale lines of width Thin.
Using interpolation and grading you can perform the following operations on two grouped objects:
To change one object into a different object:
A new set of objects will be drawn. Each new object is a partial transformation between the first object and the second object:
Interpolation produces a number of new paths, each consisting of two objects. You cannot ungroup these paths. This means that when you interpolate two objects you'll lose the original objects (Copy them elsewhere in the Draw window before you interpolate them, or use Undo to start again if you want). Grading produces new objects which are not grouped as paths:
You can create interesting patterns if one object is inside (or on top of) the other:
You can interpolate between curved shapes to produce very intricate patterns:
The difference between interpolation and grading is most evident when both shapes are closed and filled:
The properties used by interpolation and grading are
A pair of path objects for interpolation or grading must have certain properties in common. For most practical purposes, this means they should be more or less the same shape (though they need not be the same size): two V-shapes, two rectangles, and so on. Specifically, the requirements are that
Each object has a style consisting of a set of attributes (such as fill colour, line colour, line width and so on). Using the various Style menu options, you can
Any new object you create is given the style attributes currently defined in the Style menu. We suggest that you set up the style attributes before you actually draw an object. This can save you accidentally 'losing' objects because they're the same colour as the background.
Here's how to define an object's style:
To:
Complex objects will be filled according to which winding rule you've set - see page 239.
You can modify dashed and dotted lines using the Start cap and End cap options; the cap settings apply to each segment in the line.
This is only effective for thick lines.
This only applies to open paths; it's only significant for thick lines. You can't add caps of any sort to Thin lines. You can use Start caps on a closed path with a dashed line style.
Triangle caps are useful for creating arrows on the ends of line segments. You can set the height and width of a triangle cap independently. They are defined as multiples of the line width, as follows:
Triangle height = Cap height x Line width
Triangle width = 2 x Cap width x Line width
An object can be a single path (e.g. an ellipse), a collection of line segments, or a single line segment that crosses over itself any number of times.
This rule fills regions on the basis of whether they were drawn in a clockwise or anti-clockwise direction.
Note each region's direction as you draw it, clockwise or anti-clockwise, and give this direction a number: +1 for one direction and -1 for the other.
To see if a region is to be filled, construct an imaginary line from inside the region to outside the object. Keep a total of the direction values for each line it crosses. If the total is non-zero, the region will be filled (see the diagram overleaf).
In the following example, three rectangles were drawn clockwise and one rectangle was drawn anti-clockwise. The clockwise rectangles were assigned a value of +1, and the anti-clockwise rectangles were assigned a value of -1:
This rule fills regions if they are enclosed by an even number of other regions.
To determine whether a region inside an object is to be filled, imagine a line passing from inside the region to outside the object. Count the number of lines it crosses. If the number is odd, the area will be filled.
The following example shows this rule applied to a single path object made up of four regions (created using the Move tool - see page 229):
You can change the style attributes of text lines using the Style menu. If you select a text line first, that line will have the style applied to it. All subsequent text lines will also have that style applied to them.
To:
The anti-aliasing pixels will be in a range of shades between the Text colour and the Background colour. Background applies to text objects and text areas.
Note: This effect won't be visible if the text size is larger than the value set for anti-aliasing in Configure (see page 46).
All objects you construct using Draw's tools are made up of paths. In turn, paths consist of straight and curved line segments. Each segment in a path has end points and (if it is a curve) control points.
You change an object in two ways:
Note: You can't edit Text areas, JPEGs or sprites in Draw. See pages 248 to 250.
You can only edit a single-path object in Path edit mode (so you'll need to ungroup any objects first).
The shape of a curve is determined by the control points as follows:
By moving the control points, you can produce many different shapes of curve. Some examples are shown below. In each case the thick line shows the path itself, and the control points (shown here as black squares, although they're yellow in the drawing) are joined to the corresponding end points (shown here as open squares) by thin lines.
If you hold down Shift while you drag a control point, the corresponding control point in the next curve is also moved to keep the angle of join constant.
When typing in text, you can only delete text and type new text in if you are still on the same line. As soon as you press Return or click somewhere else in the drawing, the line is 'frozen'.
To:
Then edit the text and click on OK. You can also press Ctrl-E after selecting the object.
There's an example below.
Once you've converted a text line to a path, it can be treated like any other path object (for example, you can use Style options that apply to objects other than text - see page 237).
For example, the following text was converted into a path, then ungrouped into individual letters, and each letter given a black line colour and a different fill colour (the second row of text was also given a much thicker line width):
Note: You can only convert outline fonts to a path.
If the path you want to edit is under another object's path, double-click Adjust to tunnel through to the next deeper path.
The line segment and end point will be highlighted (if you select the first end point of the path, there is no highlighting).
Now you can edit the highlighted segment and end point:
To:
X and Y are offsets from the bottom lefthand corner of the drawing. You can specify them in inches or centimetres.
This flattens the join between two adjacent segments (unless both segments are straight lines). The curve is adjusted so that the tangent is continuous at the selected end point. For example:
If the path containing the line was closed, extra lines will be inserted to close each of the two sections of the path:
You can import five types of file into Draw:
To:
When you drag a file into a Draw window, it is added to any objects already in the window. The file is loaded so that its bottom lefthand corner lies at the mouse position at the instant the mouse button is released.
When you load a file by dragging it to the icon bar, the file appears in a new Draw window, aligned to the bottom lefthand corner of the diagram.
This method also ensures that Draw displays the sprite in the correct colours.
You can save objects from a Draw file in their own native file format. This means, for example, that if a Draw file has an imported sprite, you can save that out as a sprite again.
Note: You need to be in Select mode to save anything other than the whole Draw file (see page 230).
To:
You must load !Printers and a PS printer definition file for this option to be available.
Only objects within the inner limits of the grey border in the Draw file will be printed. The outer limits of the grey border correspond to the limits of the page. If no printer driver is loaded, the limits default to A4.
Misc/Paper limits/Reset sets the paper limits to the printer driver defaults.
You can also select part of the diagram to be printed at a time. This enables you to print a drawing on more than one sheet, so that you can make up a poster, for example, from several standard-size sheets 'tiled' together:
A text area is a special sort of object that allows you to perform simple 'desktop publishing'. A text area consists of a piece of text divided into one or more rectangular regions called text columns. Draw breaks up the text into lines which are just wide enough to fit into the columns, splitting it (principally) at spaces.
You can create a text area by using Edit (for example) to prepare a file containing the text, annotated with special commands (described below). When you load the text file into Draw, the text is formatted into columns. The number of columns is given by an annotation. You can move the text columns and change their size in Select mode. As you do this, Draw will reformat the text between the columns.
Text areas only use anti-aliased fonts: you cannot create a text area in the system font. If you try to use the system font you will find that it is automatically converted into the Trinity font. See Default text area header on page 256. If you want to create a text area in system font, use the outline font version of the system font: choose Style/Font name/System/Fixed.
To create a text area from a text file, drag the file into a Draw window. The columns in the text area are initially set up to standard sizes. If you drag the text file over the top of a selected text area, the old text in the area is replaced with the contents of the new file. Use this method for altering the text in a text area.
Text area selection works in two slightly different ways, depending on how many text columns there are in the text area:
When there is a single text column in the text area, selection works in the same way as any other object. You can move the text area, scale it, change its style, and so on, as described above.
When you change the size of a text column, the text is reformatted to fit the new size of the column.
To select more than one column of a text area, select the first as described above, and select further ones by first clicking Adjust and then double-clicking Select over the column.
You can't rotate text areas and text columns (they don't have rotate handles).
Some select mode actions cannot be applied to text columns. If there are any text columns selected when you perform the operation, they are deselected first. An example of this is object deletion: you can delete a text area as a whole, but not a text column from within it.
Try typing the following text into Edit and loading it into Draw as an Edit file:
\AD
\D2
\F0 Trinity.Medium 24
\L24
\P24
\! 1
This is an example of a text area containing two columns. The text was prepared in Edit, and then saved directly into Draw. The columns were then stretched to the right size, using select mode, and the rectangles added.
This creates the following text area:
The appearance of a text area is determined from commands which are included in the text used to create it. Each command starts with a backslash (\) character. The full list of sequences is given below, but the following is a brief description of the commands used in the example.
In the following descriptions
Here's the full list of annotations:
Commands and their effects:
Certain characters have special interpretations:
For columns other than the first, paragraph spacings at the head of the column are ignored. Lines which protrude vertically beyond the limits of the column are not displayed; however, all commands occurring in them are interpreted. This can occur if the line spacing is significantly smaller than the font height. You should take care (by using the \M command) to ensure that lines do not protrude beyond the limits of the column horizontally, since the text may not be displayed correctly in this case. The only circumstances in which this is likely to happen are when an italic font is used and the margin setting does not allow for it.
When a text area is being constructed from a text file, or being loaded as part of a Draw file, checks are made on the fonts contained in it. If a font is not available, a warning message is displayed. Text that should be in this font will appear in the most recently-used font.
You can re-export text used to construct a text area back into a text file, by choosing Save/Text area. This can be useful for altering text areas in a Draw file, when the original text file used to create them is no longer available.
If the text does not start with a version number line (\! 1), Draw will insert the following standard header:
\! 1
\F 0 Trinity.Medium 12
\F 1 Corpus.Medium 12
\0
\AD
\L12
This defines two font references, sets the text to be displayed in font 0 (Trinity Medium) justified to both left and right margins, with a line spacing of 12pt. If you subsequently export the text, the standard header will be exported as well.
When you load a DXF file into Draw by dragging it into a window or onto the Draw icon, a dialogue box appears, in which you can specify:
To load the file, click on OK. If you click on Abandon, the file is not loaded.
The following restrictions apply to DXF files loaded into Draw:
Draw can read files in JPEG format. JPEG
stands for Joint Photographic Experts Group,
and is a standard format for compressing photographic images (see
the pictures in the Images
directory, for example).
Unlike Paint, if you load a JPEG into Draw, all the original file information is kept. This means, amongst other things, that you can save an imported image back out of Draw as a JPEG file again. It also means that if you change from one screen mode to another with more colours, you'll see an imported JPEG file at a higher quality.
When you display a DrawFile containing a JPEG object, the graphics system requires some workspace for processing the JPEG data. You can see this on your Tasks display as the dynamic area 'JPEG Workspace', and its required size depends on the width in pixels of your JPEG image.
If there is insufficient free memory to allocate this workspace, Draw displays a JPEG image as a light grey rectangle containing the message 'Not enough memory available to plot JPEG'.
Some third-party applications not updated to use the JPEG features of RISC OS 3 will correctly load a DrawFile containing a JPEG image, but display a blank box where the JPEG image should be. Other applications may fail to load such a DrawFile.
If this is a problem, use !Paint or !ChangeFSI to convert your JPEG images into sprites, and replace the JPEG images in your DrawFile with these sprites. This can produce a DrawFile of the same appearance, but using far more space on disc and in your computer's memory to store.
You can work on several Draw files at the same time; simply click on the Draw icon on the icon bar to start up another Draw window.
It's easy to copy objects between Draw windows. Select the object you want to copy, move the pointer to the destination Draw window and choose Select/Copy. The selected object is copied into the new window. Alternatively you can use the Save and Save Selection menu options to drag Draw icons into new Draw windows.
If you are working with multiple Draw windows, only one window can be 'active' at a time. So, if you select an object in one window and then select an object in another window, you will nullify the selection in the first window. Additionally clicking on the Draw icon to create another Draw window also nullifies any current selection.
You can set features of this type by setting up Draw as you want to use it, then save these features by creating a Desktop boot file. Instructions on how to create a Desktop boot file are given in Desktop boot files on page 51.
There are several features of Draw that you can set before saving a Desktop boot file, so that they are set up the way you want them each time you switch on. The Draw features that will be recorded when you go through this process are known as Draw$Options (see Configuring applications on page 427).
Actions and their keystroke equivalents:
Actions and their keystroke equivalents:
Actions and their keystroke equivalents:
Actions and their keystroke equivalents:
[2] You can't have a number greater than 8 in the Magnifier box.
[4] You can't convert back to a text line, nor can you convert text in System font.