Draw Guide

10

Chapter
Advanced Draw
TechniquesThis PDF is designed to be read onscreen, two pages at atime. If you want to print a copy, your PDF viewer shouldhave an option for printing two pages on one sheet ofpaper, but you may need to start with page 2 to get it toprint facing pages correctly. (Print this cover page
separately.)CopyrightThis document is Copyright © 2005–2010 by its contributors as listed
in the section titled Authors. You may distribute it and/or modify it
under the terms of either the GNU General Public License, version 3 orlater, or the Creative Commons Attribution License, version 3.0 or
later.
All trademarks within this guide belong to their legitimate owners.

Authors
Agnes Belzunce
Martin Fox
Hazel Russman
Wolfgang Uhlig
Claire Wood
Jared Kobos

Daniel Carrera
Regina HenschelBernd Schukat
Jean Hollis Weber
Linda Worthington

Feedback
Please direct any comments or suggestions about this document to:authors@documentation.openoffice.org

Acknowledgments
This chapter is based on an original French document written for
OpenOffice.org 1.x by Michel Pinquier (translated to English by Alex
Thurgood) and previous content revised by Jim Taylor. The chapter
was revised for OpenOffice 2.0 by Linda Worthington, Daniel Carrera,
Jean Hollis Weber and Agnes Belzunce, and later translated into
German by Bernd Schukat, Wolfgang Uhlig and Regina Henschel. The
German translators also added a large amount of new material. The
German version of this chapter was then translated into English by
Martin Fox.

Publication date and software version
Published 28 July 2010. Based on OpenOffice.org 3.2.

You can download
an editable version of this document fromhttp://oooauthors.org/english/userguide3/published/

Contents
Copyright.................................................................................................2
Drawing to scale......................................................................................5Working with the Position and Size dialog...........................................5
Setting glue points................................................................................8
Copying individual pictures to the Gallery...........................................9
Drawing a logic circuit diagram using the Gallery............................10
Dimensioning a drawing........................................................................15
Configuring the dimensioning style...................................................15
Dimensioning objects.........................................................................17
Editing dimension lines......................................................................18
Working with text in Draw.....................................................................19
Configuring text elements with styles................................................19
Text animation.................................................................................19
Text..................................................................................................19
Anchoring text.................................................................................20
Fitting text in frames.......................................................................22
Distance from frame........................................................................23
Text frames and callouts....................................................................24
Pictures and text.................................................................................27
Fontwork Gallery................................................................................28
Writer OLE object...............................................................................30
Insert...............................................................................................30
Editing mode...................................................................................31
Object mode.....................................................................................32
Guide to Bézier curves...........................................................................33
Bézier curves—what are they?...........................................................33
Direct drawing of a Bézier curve.......................................................33
Point mode of the Bézier curve..........................................................34
Drawing a succession of Bézier curves..............................................35
Transition points.................................................................................36
Corner points...................................................................................36
Advanced Draw Techniques3Smooth transition points.................................................................36
Symmetric transition points............................................................36
Changing point types......................................................................37
Closing the curve................................................................................37
Transformation between straight line and Bézier curve...................38
Transform a straight segment into a Bézier curve.........................38
Transform a Bézier curve into a straight segment.........................38
Transform complete curves, polylines and polygons.........................38
Transform a polygon or a polyline into a curve..............................38
Transform a curve into a polygon or a polyline..............................38
Freehand lines....................................................................................39
Combining closed curves....................................................................39
Connecting curves..............................................................................40
Adding comments to a drawing.............................................................40
Connecting and breaking lines..............................................................41

4

Advanced Draw Techniques

Drawing to scale
Draw is not a CAD (computer-aided design) program but a graphics
program with which you can produce drawings to a scale. The example
used for this chapter is a drawing of a Logic Circuit Diagram. The
exact meaning of the individual symbols is not described here as weare only interested in the drawing techniques used to produce thediagram.
The logic symbols in Figure 1 form the building block library for our
scale drawing.

Figure 1: Logic Symbol library

Working with the Position and Size dialog
So that the edges of the building block symbols do not coincide withthe wiring, they should be 8 mm wide and 8 mm high. The connections
to the symbols should have a length and separation of at least 5 mm.
These values are all random values and you would normally substitutevalues that suit your own needs.
For the drawing we used a measurement unit of millimeters, a grid
spacing of 5 mm, and a grid subdivision of 4 points. In addition you
should probably activate Display grid and Guides when moving as wellas Snap to grid (see Chapter 8). This drawing will serve later as acollection of available symbols and you should not only draw thesymbols but fully detail them as well.
The first step is to draw a base element, an AND gate block. You canthen dimension and detail this element (use the Position and Sizedialog, as shown in Figure 2; double-click on the status bar or context
menu to help with dimensioning). For this example, the left upper
corner of the block is at x=10 mm and y=5 mm.

Drawing to scale

5Figure 2: Positioning and dimensioning a Draw object
Draw the first connection lead by eye and dimension and position it
using the Position and Size dialog.

Figure 3: Setting the position and dimension of the upper input
Use the same method to draw the remaining two leads. For positioning
the input leads, fix the right end points; for the output lead, fix the left
one. The first wire lies 1.5 mm below the upper edge of the block. The
leads have a 5 mm spacing between them. The following table shows
the relevant coordinates of the upper corner points and the leads.
left (X/Y) [mm]right (X/Y) [mm] Input 1 (X/Y) [mm]Output (X/Y) [mm]10 / 518 / 518 / 6.5 (left EP.)

10 / 6.5 (right EP.)For the lower input lead, increase the Y coordinate of Input 1 by 5 mm
to 11.5.

6

Advanced Draw Techniques

The AND gate block is almost finished. We can use it as the basis for
all the other gates. So that the drawing gives a good visual impression,use Edit > Duplicate to ensure uniformity of shape and size.
Because we want to copy the block vertically downwards, use a
Placement on the X Axis of 0 mm and on the Y Axis 15 mm.

Figure 4: Duplicating an object
With the same method, copy both blocks twice more to the right.
Select both blocks, call up the Duplicate dialog, and use placement
values of 30 mm (X) and 0 mm (Y). Your drawing should look similar to
Figure 5.

Figure 5: The blocks after duplication
For the INVERTER or NOT gate the connection leads must be
amended. Move one input and one output lead to the middle of theblock and delete the superfluous input lead.
Draw the missing circle for negation with a diameter of 2 mm, place itby eye in the center and then position it and dimension the connections
from the Position and Size dialog as described above.
You can copy the circle to the Clipboard and then paste it as manytimes as you need, positioning it and adjusting the lead lengths as
above.
A wiring diagram also needs a symbol to show a connection point.
Draw a filled circle for this.
Drawing to scale7

Next add text to the symbols (&, =1 etc.). Activate the iconon theOptions Toolbar. Double-clicking a symbol will now put you in a special
text input mode. This integrates the text as an element in the object(see also Chapter 2 of this guide). You will find the OR symbol (≤) inthe list of special characters (Insert > Special Characters).
It is probably a good idea to create a group for each type of gate. This
will make it easier to use them in a diagram. Your diagram should now
resemble Figure 1; save it to disk.
If you want you can add a name to each of the gate symbols (AND,OR ..), use a separate layer to add this text so that you can switch it off
when necessary.
You can place glue points at the end of each connection lead. This will
simplify the actual “wiring up” later when you add in the connectors.

Setting glue points
This instruction assumes a basic knowledge of connectors and glue
points. For additional information refer to Chapters 2, 8, and 9 of thisguide.
Note

If objects are included in a group it is not possible to add glue
points to them. Glue points must be set before any grouping isdone.

The glue points on the connection leads must be placed exactly at theends of the lines (otherwise the wires will not be properlyaligned).Unfortunately you cannot set the position of glue points using
numerical values. It is necessary to do it by hand.
The best solution is to use the Zoom toolbar to enlarge the diagrams.
You can find this as a tearoff toolbar on the standard Drawing toolbar.
It contains (among others) tools for zooming in and for zooming out(enlarging the view/making the view smaller) of the current view. If
you click on the Zoom In tool and then click on the page, the scale isdoubled and the view is centered on the place where you clicked.
As the ends of the connection leads in this example do not lie on grid
points, you must switch off Snap to Grid and activate Snap to Object
Points.
When you have done this, you can open the Glue Points toolbar with
the Insert Glue Point iconon the Drawing toolbar or using View >Toolbars from the menu bar.

8

Advanced Draw Techniques

Figure 6: The Glue Points toolbar
Select the block on which you want to insert a glue point. Click theInsert Glue Point icon
. It is now activated and appears with adifferent background. The mouse cursor changes to a small cross andyou can set the first glue point. Click the mouse at the desired location.
If the point is not exactly where you want it, move it by dragging withthe mouse.
When you are satisfied with the location, click on the Glue Points
toolbar the icon with the exit direction you want (left, right, top or
bottom). The selected icon now has a different (lighter or darker)
background. Set the exit direction of the input connection leads to theleft and the output leads to the right.
When you have set a glue point at the end of each gate’s connection
lead, you can copy it into the Gallery.

Copying individual pictures to the Gallery
The Gallery is a very convenient way of controlling building blocks fordrawings. It also functions as a symbol library.
First open the Gallery using Tools > Gallery or by clicking on theicon if it is present in one of the toolbars.
The Gallery appears above the drawing page. The left pane shows thefolders available for use and the right pane shows the images
contained in the current folder. Choose an image by clicking on it;
additional information about the image appears in the header bar.
In the left pane, click the New Theme button to create a new folder. A
new window opens. Click on the General tab and give the new theme ameaningful name (for example Logic) to replace the default of New
Theme. You can rename a theme by right-clicking it in the folders paneon the left.
To import existing images into the Gallery, click on the Files tab andthen on the Find Files... button. It is possible to bring in complete
folders or individual files; the procedure is self-evident from the dialog
windows that open, or see Chapter 14 (Working with the Gallery) in
the Getting Started guide.
You can drag and drop Draw objects straight into the Gallery. (TheProperties window can be closed after typing in the name.) First selectDrawing to scale9the destination folder, then click on the first symbol that you wish to
add to the Gallery. Position the mouse cursor inside the selection
frame of the symbol. When the crossed arrows are visible, click on thesymbol and keep the mouse button pressed. After about 1 or 2 seconds
the cursor will briefly blink and change to the drag symbol. Drag theobject into the Gallery and release the mouse button. When you movethe mouse into the Gallery field, the cursor shape changes once more(see Figure 7).

Figure 7: Crossed arrows > Drag symbol >Gallery symbol
Tip

Zoom in on very small graphics before you try to move them sothat the crossed arrow symbol can be clearly seen.

When you have placed all the symbols in the Gallery they can be titled.
Right-click on a symbol, choose Title from the menu and type thesymbol name (AND, OR).
The symbol library is available to all OOo modules, at least for users
who have the permission/rights to access it. Making available thedrawing collection as a Draw file is the simplest way to distribute a
symbol library to other users. After opening the drawing, other users
can easily transfer the drawing objects into their own Gallery, as
described above.

Drawing a logic circuit diagram using the Gallery
The use of the symbol library which you have created and placed in theGallery can be illustrated by using the blocks to draw a half adder (seehttp://en.wikipedia.org/wiki/Half_adder#Half_adder). You can precisely
place all the drawing objects with the help of Draw’s snap functions.
The following instructions are only one way to achieve this objective.

10

Advanced Draw Techniques

Figure 8: Half adder drawn using logic symbol building blocks
Begin with a new drawing. Set the unit of measurement to centimeter,a grid point spacing of 0.5 cm and subdivision of 4 points. Activate thegrid, guiding lines, and associated snap functions.
In the first part of the exercise you should draw only the two signal
leads a and b, the two INVERTER gates and the two AND gates.
Begin by drawing the two signal leads. To make it a bit easier, you can
use the values in the following table.
Start point

LengthSignal wire a

X = 2 cm / Y = 3.0 cm

5.5 cmSignal wire b

X = 3 cm / Y = 3.0 cm

5.5 cmAfter drawing the two signal leads, you begin the hardest part. With
grouped objects the snap function works only on points on the outside
contours. The only way to work with these blocks as a unit, however, is
as a grouped object. The input and output leads must lie right on grid
points if the connecting lines are to be exactly horizontal or vertical.
Position two horizontal guiding lines (A, B) on the grid with Y=4.0 cm
and Y=6.0 cm. With Snap to Grid active, this should be no problem.
With an INVERTER gate the input and output leads lie in the middle ofthe block, 4 mm below the upper edge. In order that the input andoutput are docked to the guiding line, the upper edges of the
INVERTER gate must be positioned (for a 5 mm grid spacing) at Y=4.1
cm and Y=6.1 cm. Right-click on the guiding line, select Edit guiding
Drawing to scale

11line from the context menu and set the guiding lines to 4.1 cm and 6.1
cm.
In order that the blocks lie exactly underneath each other, insert
vertical guiding lines at X=5.0 cm (INVERTER gate) and X=8.0 cm(AND gate).
Now open the Gallery and drag the Inverter gate into approximately
0.64, the position desired. If the function Snap to guiding line is still
active, you will be able to accurately position both blocks in the correct
location. Your diagram should now look like Figure 9 and you can saveit.

Figure 9: Drawing a half adder – Step 1
The input and output leads of the INVERTER lie at Y=4.5 cm and
Y=6.5 cm. Move the mouse over a guiding line. When the mouse cursor
changes to a double arrow, drag the guiding line (with the left mousebutton pressed) onto the input and output leads of the block. If the grid
snap is still active, this should be exactly positioned without much
effort.
The leads of the AND gate lie 1.5 mm below the upper edges of the twohorizontal guiding lines. They must be moved up for the next step. The
Y coordinates are reduced to 4.35 cm and 6.35 cm (the top edges of
the AND gates). When you have moved the lines, you can drag bothAND gates from the Gallery and position them. Your drawing should
now resemble that in Figure 10.
Next drag the horizontal guiding lines again over the input and outputof the gates (Y=4.5/6.5 cm), so that when you position the connection
point of the leads (a small black circle) it will sit exactly on top of theleads from the gates.

12

Advanced Draw Techniques

Figure 10: Drawing a half adder – Step 2
To position the two last gates, you need to set the following additional
guiding lines: a vertical line with X=11 cm and two horizontal lines(C,D) at Y=5.5 cm and Y=7.5 cm respectively. Shift the horizontal lines
C and D each 1.5mm upwards (so that Y=5.35 cm and Y=7.35 cm).
Drag the OR and the last AND gate from the gallery and position themas in Figure 11.

Figure 11: Drawing a half adder – Step 3
Since the OR gate will be connected to the two previously positioned
AND gates, you can delete the guiding line of the OR gate. Drag
the0.64 horizontal guiding line C and D over the inputs of the AND
gates (Y=7.0 and 7.5 cm) and put two other lines (E,F) on theremaining connections (Y=5.0 and 8.0 cm) as shown in Figure 12.
Deactivate all snap functions except snap to grid. It is a good idea tozoom in so that you can place the lead connections exactly over theintersection points. Drag the connections singly from the Gallery towhere you want to position them. You will need to adjust their position

Drawing to scale13

with the mouse. The easiest way is to move the connection diagonallyto the desired location (see Figure 13).
The guiding lines are no longer needed and can be hidden (it is betterto wait until you have finished the drawing before you delete them).
Your drawing should now start to look like Figure 12 and can be again
saved.

Figure 12: Drawing a half adder – Step 4
The individual blocks must now be joined up so that the gates function
as a half adder system. To do this, you use connectors. Open theConnector toolbar. Use the standard connector
to join the OR to thetwo AND gates. All the other leads run horizontally and you can use
the direct connector.
When all six lead connections have been positioned, both signal wires
should have a small black circle added to their connection points. You
can use the symbol for NOT from the Gallery as the basis for this.

Figure 13: Setting the connections
14

Advanced Draw TechniquesIf you have correctly positioned the symbols in the drawing, all theconnection leads will be straight lines. At this time you can delete all
the guiding lines, add text to the drawing and your finished drawing
should resemble Figure 12 above.

Dimensioning a drawing
Configuring the dimensioning style
As is usual with OOo, you configure dimensioning using its own style.
After opening a drawing, press F11 to access the Styles andFormatting window. In the Graphic Styles list, right-click on the styleDimension Line and select Modify. The dialog that opens contains thecurrent settings. Click the Dimensioning tab (Figure 14).
You can configure all the properties you see in this window to suit yourown needs. The left section includes the basic settings for dimension
lines and dimension guide lines (these indicate where on the object thedimension is referenced):• Line distance: the distance of the dimension arrow from theobject edge
• Guide overhang: the distance the guide line extends past thearrow• Guide distance: the distance of the guide line from the objectedge
You can individually set the line lengths of the right and left guide lines
and use positive or negative values to have the line above or below thereference point. The direction of the line with positive or negative
distances depends on the setting of the Measure below object option(box checked or not), but this is easy to check by referring to theexample dimension line in the bottom window of the dialog. For thiscurrent exercise click the box and activate this option.
In the right section you can change the settings for the Legend, thetext of the dimension line. You can use the Text position choices tochange the location of the text – but only if one or both of the
AutoVertical and AutoHorizontal checkboxes are unchecked. Use thevarious options on the Text and Alignment tabs to further change thetext format.

Dimensioning a drawing

15

Figure 14: Configuring dimension lines
Calculation of dimensions always takes into account the scale and 0.64
dimension units contained in Tools > Options > Draw > General. If
you set a scale of 1:10 and a unit of centimeter, then a 6 cm long object
in the drawing will be shown with a dimension of 60 cm when theoption Show meas. unit is activated and the selection window is set toAutomatic. Deselecting this option turns off the display of units. You
can change the units displayed from Centimeters to (for example)
Millimeters by choosing Millimeter instead of Automatic in theselection window.
Adjust the font type and size for the text of a dimension line by meansof the Text tab.
The Standard button at the bottom of the dialog sets all the propertiesof the dimension line to the (inherited) standard properties of the style.

Note

16

The dimensioning style Dimension Line is always linked andstored with the current work page. All the changes that you
make apply only to this page. New drawings are started withthe standard properties of Draw. If you want to use theamended style for future drawings, save the page as anadditional template.

Advanced Draw TechniquesDimensioning objects
In this exercise you will dimension some logic blocks (see Figure 15).
They are used here to demonstrate the technique; you can use yourown drawing or fetch a picture from the Gallery.

Figure 15: Dimensioned logic blocks
So that Draw can clearly recognize the edges to be measured, you
should set a number of guide lines delineating the edges. The previous
sections explain how to do this. To place the guide lines exactly andeasily, change the resolution of the Grid. Suitable values for this work
are a resolution of 5 mm and a subdivision of 4 points. With this setting
you should have a snap to grid function with 1 mm point separation.
We will begin by dimensioning the NOT gate. For this block we want
the total width (18 mm) and the width of the block itself (8 mm) tohave dimension lines. The first step is to add guide lines to delimit thedimension lines. With Snap to grid activated, you can position thesequite accurately (see Figure 16a). Watch that the function Snap to
guide lines is active and zoom in to the part of the block to bedimensioned. The block should not be selected.
Start the dimensioning command by clicking the Dimension Line iconon the Lines and Arrows dialog. The dimension line is placed
automatically on the Dimension Lines layer so you can hide thedimension lines if you wish.

Figure 16: a) Delimiting the edges with guide linesb) Dragging the dimension line (anticlockwise)c) Finished dimension line
Dimensioning a drawing

17

After clicking the Dimension Line icon, the mouse cursor changes intoa small cross. As we activated the option Dimension Line – Measure
below Object, the dimensioning should be made in a counterclockwise
direction. Place the mouse cursor at the left dimensioning point. Pressthe left mouse button and drag the mouse to the right dimensioning
point. Release the mouse button. If you press the Shift key whiledragging the mouse, you will restrain the dimensioning line in ahorizontal (or vertical) direction (see Figure 16 b).
In the same way you can draw a vertical dimension line on the AND
gate. The dimensioning of the NEGATION symbol should also be
simple to accomplish, but it is important that for such small
components you zoom in enough to accurately position the lines.

Editing dimension lines
Dimension lines can be subsequently edited. You can select single
dimension lines which are displayed with four handles, located at theend of the dimension lines (Figure 17).

Figure 17: Editing dimension lines
With the upper handles you can (only) change the length of the guidelines. With the lower handles you can move the points that are being
dimensioned. If you select the dimension text, you can edit the font
type and size as well as changing the dimension units of the text.
If you only want to edit the text of the dimension, double-click on an
unselected dimension line to enter text edit mode.
All the changes that you make relate only to the selected dimension
line. They are stored and persistent, but do not affect the settings ofthe Dimension Line style. If you insert other dimension lines, they will
have the settings contained in the style.
If you want to make general setting changes to the Dimension Lines
style, change the appropriate style. As soon as you confirm thechanges with OK, the new settings will be applied to all dimension
lines.

18

Advanced Draw Techniques

Working with text in Draw
You can use text in Draw in various ways:• as a text element• as text associated with a picture• as an element out of the Fontwork gallery• as a Writer OLE object

Configuring text elements with styles
Text, like all drawing objects, can be associated with styles. The text
settings in styles always affect the whole text element. You can format
individual parts of a text element, but only by using manual formatting,which does not relate at all to styles and templates. Styles forcharacters and paragraphs do not exist in Draw.
Open the Styles and Formatting dialog by pressing F11. Access theformatting dialogs using the toolbar icons, the context menu, or theFormat menu.
The Indents and Spacing, Text, Text effects, Tabs and Alignment tabsof the style dialog function the same as in text documents, althoughsome options are not available in Draw. Specific to drawing objects are
the tabs Text and Text Animation.

Text animation
On the Text Animation tab, you can set how the text moves within theobject frame. Such effects are interesting mainly for documents thatare to be shown on the screen. They are therefore more commonlyused in the Impress module. For printed text they do not make any real
sense and are not dealt with further in this guide.

Text
On the Text tab, you can determine the behavior of the text block in
relation to the border of the drawing object. The same settings can bealtered—as manual formatting—under the Text... command in theFormat menu or in the context menu.
The type of drawing object determines which settings are active andwhat effect they have on the text. Shapes behave differently to otherdrawing objects. To experiment with the settings, use objects withrounded edges so that differences in spacing and alignment show up
better.
Working with text in Draw

19

Figure 18: Text tab of Graphic Styles dialog

Anchoring text
To try out the different settings possible for text anchors, start bydrawing an ellipse from the Basic Shapes toolbar, change into Text
edit mode by double-clicking on the ellipse and write several, not toolong lines of text. Repeat with an ellipse from the Circles and Ovals
toolbar (a classical drawing object).
In the Text tab of the Edit Style dialog,
set the values of the Spacing to Borders
to 0 cm for all four directions.

Set Options as Left in the tab Alignment.

20

Advanced Draw TechniquesNow we can try out some of the different possibilities of text
anchoring.

Text anchored toleft middle – thetext block isplaced on the left
side and centeredvertically.

ShapesClassical drawing
objects“Left edge” here means
the edge of the text
frame whose left sidefits totally within the
figure.

“Left edge” here means
the left side of the object
frame – the frame withthe green handles which
is visible when you clickon the object.

The lower right cornerof the text block sits
against the edge of the
figure.

The lower right corner of
the text block lies in thelower right corner of the(invisible) object frame.

Text anchor tolower right.

The text anchoringalways relates tothe entire block,even when single
lines are set
differently to theother text throughmanual formatting.

If you checked the option Full width, the text block is always centeredhorizontally. The area of the text block is as great as possible; here it
extends either to the edge of the figure or object frame or (when notthat wide) the width that is necessary to fit the length of the longest
line. The difference becomes clear if you position the text on the left,
but you set single lines through hand formatting to be aligned on theright.
Working with text in Draw21

In the examples below, the first line of text was shortened to “First linewith”, spacings were set to 0 and text anchor to middle left.
ShapesClassical drawing objects

Without option“Full width”

With option “Fullwidth”

Fitting text in frames
Here you find that shapes and classic Draw objects behave completely
differently.
For shapes the options on the right are active.

Figure 19: Options active for shapes
These have the following effects.
Word wrap text in shape:

22

No automatic hyphenation isavailable and you cannot insert
a fixed hyphen.
If the text does not fit in the
shape it hangs over or under theoutside of the shape.

Advanced Draw Techniques

Resize shape to fit text:

Watch out! If you turn on thisoption it is not possible to undo
the size changes – neither using
the Undo function on the menu
nor by switching off the option
in the dialog.

For the classic drawing objects, both lower left options in the dialog
are active.

These options have the following effects.
Fit to frame:

The text is widened andcompressed so that it fills out tothe object frames.

Adjust to contour:

All the text is contained within
the figure. It is split over
several lines if necessary. Any
text which does not fit in the
figure is not shown, but is stillretained.
Note that even if you haveactivated hyphenation, words
will be split without regard to
the hyphenation rules.

Distance from frame
Spacing settings are added to the text. In this way the text block isinvisibly reduced or (with negative values) made bigger.
In the examples below, the text (M) is centered horizontally and thetext block is anchored in the upper middle part of the frame.

Working with text in Draw

23

Value for
spacing “Above”

-2 cm

-1 cm

0 cm

1 cm

2 cm

3 cm

The behavior isthe same forclassic drawing
objects andshapes.

If you anchor the text above, below, right or left, a positive spacing
value positions the text in such a way that it sits close to the outside of
the object frame at the anchoring point. Anchoring in the middle does
not result in this movement.
It is easier to add text to a straight line if the line is created as a verythin rectangle. Choose an anchor point in the middle of the rectangle
and then determine the exact position of the text by setting the spacing
accordingly.
Text added to open line types such as Bézier curves (curves andfreehand lines), Polylines (polygon and polygon 45°), and Arcs is also
positioned in relation to the enclosing object frame. If you want to see
the extent of this frame, just click on the object. To add text along oneof these lines, you can use the Fontwork tool described on page 28.
Text added as described above is rotated when the object is rotated.
The property settings, particularly those dealing with spacing relative
to the frame, relate only to situations where the object is not rotated.

Text frames and callouts
To test the range of setting possibilities, use a text frame or a callout
with rounded corners. For text frames, as for rectangles, you can set
the rounding in the Position and Size dialog (Slant & Corner radius) orin Points mode. The latter makes sense only if you have a visible
outline. With callouts (as with text frames in Points mode), drag thelarger marker in the left upper corner with the mouse to give thedesired amount of rounding. An example of this is shown in Figure 20.

24

Advanced Draw Techniques

Figure 20: Legend with rounded corners
Unlike drawing objects, text frames and callouts support automaticline breaks and you can switch on automatic hyphenation under Tools> Language > Hyphenation.
Non-breaking dashes and protected separators are however notavailable. For a manual line break use, as elsewhere, the key
combination Shift+Enter.
With the text and callout icons (and) you can create text
frames and callouts with vertical text. You need to activate Enhanced
language support > Enabled for Asian languages in Tools > Options> Language Settings > Languages. Text frames can be rotated likedrawing objects, but it is not possible to rotate callouts.
Text frames and callouts do not have a separate text element, but you
still use the Text dialog to set formatting properties. As soon as you
have input text, the upper three settings on the left side become active(Figure 21). The settings for Spacing to Borders and Text anchors in
the lower window area function in a similar manner to normal drawing
objects and are not dealt with further here.

Figure 21: Text options active for text frames andcallouts

Working with text in Draw

25

All options off

The text is broken at the object frame.
You do not see text that does not fit
within the object frame. It is stillavailable and if you enlarge the object
it will be visible.
As with normal drawing objects the
text positioning relates not to thefigure itself but to the object frame.
Observe that the text frame in theexample at left extends outside theellipse.

Fit width to text
The width of the text frame or callout
is enlarged so that the longest linefits, without a line break, inside theobject frame.
A previously inserted manual line
break (here after the word “longer”)
remains in effect.

Fit height to text
The height of the text frame or callout
is enlarged so that all lines fit within
the height of the object frame.

Fit to frame
The text is widened or compressed so
it fits within the entire object frame.
This effect is the same as with normal
drawing objects.
With the symbols
andyou canproduce a text frame that has thisproperty already set.

26

Advanced Draw TechniquesPictures and text
Pictures also possess a text element. You can use this text element toplace lettering over the picture or to give the picture a caption. To
format this text, proceed in the same way as for a normal rectangle.
Usually you produce text as a separate object and then group it withthe picture, because this gives you more flexibility.
Here are two examples showing what is technically possible with text
elements.
tab: Font, Comic Sans MS, Bold, 40pt
tab: Font Effect, color white, withshadows
tab: Alignment, Options Righttab: Text, Text anchor “upper right”
andSpacing to borders right 0.5 cm, top
0.5 cm, others 0.0 cm
tab: Font, Bitstream Vera Serif, 14pt
tab: Alignment, Options Left
tab: Text, Text anchor “lower left” andSpacing to borders bottom -1.3 cm
Note: the line break after the word“sea,” was inserted manually.

The construction of each example was carried out using a graphics
style. Right-click on the picture and choose Edit Style to open theGraphics Styles dialog (Figure 18). You may first wish to choose a
different style to edit for the picture, or create a new style for a special
purpose. For more about styles, see Chapter 4 (Changing Object
Attributes).
If you store the picture using File > Export, the text is exported alongwith the graphic. If you use the context menu option Save as graphic,
then the text is not exported.

Working with text in Draw

27

Fontwork Gallery
Click the icon
to open the Fontwork Gallery (Figure 22) which you
can use to insert an eye-catching caption to an image. Fontwork
drawing objects belong to the shape category. The Gallery contains a
selection of popular text forms.

Figure 22: The Fontwork Gallery
You are not limited to these samples; you can subsequently edit andcustomize the chosen caption type. Proceed as follows.
Choose a caption type from the Gallery
and click OK. The caption is theninserted into the middle of yourdocument.
Use the green handles to drag and resize
the caption.

28

Advanced Draw Techniques

Double-click to enter text editing modeand replace the placeholder text
“Fontwork” with your own text.

Click outside the object or press the Esc
key to leave editing mode.
With the Area dialog from the Format
menu or the context menu, you can set
fill and shadow properties. Use the Linedialog to set a frame around the lettering.
For further adjustments use the
Fontwork toolbar. If this does not open
automatically turn it on with View >Toolbars > Fontwork.
The left symbol is already familiar. It
opens the Fontwork Gallery.
Use the small triangle on the symbol
to open the tearoff Fontwork Shape
toolbar and choose the shape of theframe of your caption.

Use the yellow handle to modify the formof the caption.

With the other icons you can further
customize the text direction andspacings.

Working with text in Draw

29

To change the font type of the caption,use (as for other text) the dialog from theFormat > Character menu or thecontext menu.
If you want to give the text a 3D appearance, refer to the relevant
section in Chapter 7 (Working with 3D Objects).

Writer OLE object
In some cases, text frames are not flexible enough to meet your needs
and offer too few possibilities for adjustment. For example, you may
want to show a figure in Draw in exactly the form it was created inWriter. The best solution might be to insert an OLE object. This meansthat the object is linked or connected to the application that created it.
Draw makes available to other applications (only) one viewing window.
The object itself is not edited in Draw but in the other application.

InsertUse Insert > Object > OLE Object to open the dialog as shown in
Figure 23. Use the Create new option to embed the OLE object in the
Draw document. With the Create from file option, you can choose
whether the object should be embedded or linked. With a linked file
any change in the stored file will be shown in Draw and vice versa: anychange you make in Draw will be stored in the file on disk.
If you have decided to embed the object you can still create an
independent text document from the OLE object. For this use the Save
Copy as command from the context menu.

Figure 23: Inserting an OLE Object

30

Advanced Draw Techniques

Editing mode
As soon as you click on OK, the object is created and opens in editing
mode. You can recognize this mode by the gray frame around theobject and the small black handles.
Take special note of the toolbars. These are no longer those of theDraw module but of the Writer module. You input your text and format
it almost the same as if you were in Writer itself. In particular you now
have available all the format styles from Writer.

Figure 24: Writer OLE object
in editing mode
With the handles of the gray frame you can determine which section of
the entire text document is visible. You should switch off the ruler
view.

Figure 25: Editing in Writer as an OLE object
Click outside the object to leave editing mode. Double-click on theobject or use Edit > Object > Edit to change again into editing mode.
In an embedded Writer OLE object, you can connect to further “sub”
OLE objects. You cannot edit a linked Writer “sub” OLE object directlyin Draw; you must open it as a text document in Writer. This limitation
can be illustrated by the use of formulas. Such formulas are technically
OLE objects that belong to the Math module. To use mathematicalformulas inside flowing text, save the text in a separate text document
and insert it as a linked OLE object in Draw.

Working with text in Draw

31

Object mode
Click on an object to enter object mode, recognizable by the presenceof the green handles. In object mode you remain in the Draw module.
Possibly you noticed that in edit mode there is no Zoom. Set the size of
the OLE object on the Draw page in Object mode from the Position andSize dialog. In the left image of Figure 26 the object was inserted at
the original size, at right the size was reduced. If you change the size,
take care that the option Keep ratio is checked or else the object will
become distorted. Line and Area properties are not available for OLE
objects, nor is it possible to rotate objects as with text frames.

Figure 26: Zoom vs resizing of an OLE Writer object
OLE objects can be overlaid just like other drawing objects. In Figure
27 a drawing object from the basic shapes menu has been placed
behind the OLE object.

Figure 27: Draw object behind an
OLE object
The page with the text document has the background property set totransparent. If you change the background color of the OLE object inEdit mode, it will also show in the Draw document.
The Format menu has the entries Area and Line grayed out because
they are not usable, but the menu entries Paragraph, Character, Text,
and Bullets and Numbering are all available. These relate not to thetext object which you are currently editing but rather to a text element
within the object, which you can open by pressing F2. (This is similar
to the way that pictures are linked with an OLE object.) The double32

Advanced Draw Techniques

click, which opens the text element in images, does not work here
because it puts you into the OLE object’s edit mode. Whether it makes
sense to use a text element within text like this is questionable!

Guide to Bézier curves
Bézier curves—what are they?
OpenOffice.org uses cubic Bézier curves. A curveis defined by means of a start point P0, an end
point P3, and two control points P1 und P2 (see thefigure at left). For points on the curve the terms
nodes or anchors are often used.
For the mathematical background of Bézier curves,see http://en.wikipedia.org/wiki/Bezier_curve.
Bézier curves are very useful for experimenting with the shape andform of curves. In point mode you can change the curve alignment by
dragging the points with the mouse. The curve leaves the start point P 0
in the direction of the control point P1 and arrives at the end point P3
from the direction of the control point P2. These directions are shownin Draw by blue lines. The more distant a control is from its start orend point the smaller the curvature at that point. If a control point lies
directly on one of these points, it has no influence on the curve.

Direct drawing of a Bézier curve
Open the Curve toolbar by clicking on
the small black triangle of thesymbol on the Drawing toolbar. Click on
the Curve iconchanges to. The mouse cursor.

Click on the start point of the curve andkeep the mouse button pressed (startand end points are shown here in the
figures as snap points).

Guide to Bézier curves

33

Drag the mouse to approximately the
position of your first control point. It
does not matter if this is not exactly
right as you can move the control point
location later. If you hold the Shift key
down while dragging, the control point
will lie on a 45 degree grid.
Release the mouse button and move themouse to the position of the end point of
the curve. You can see that the line of
the curve follows the movement of themouse. Double-click at the end position.
Turn on point mode with thefrom the Draw toolbar.

icon

At the end of the curve you will see not
only the end point but also an associatedcontrol point, the round handle. Hoverthe mouse cursor over this point; thecursor shape changes to show that you
are in edit mode of a control point.
Now you can drag the control point to
its correct position, if necessary.

Point mode of the Bézier curve
After drawing a curve using theicon from the Draw toolbar or with
the Edit points command from the context menu, you can bring the
curve into a point mode from which you edit individual points on the
curve. Points on the curve are shown with a square handle; thecontrol points with a round handle. The starting point of a curve
appears somewhat larger than the other points. When you hover themouse over a curve point the mouse cursor changes to- over acontrol point it changes to. In point mode the toolbar Edit Points
should appear. If not, turn it on from View > Toolbars > Edit Points.

34

Advanced Draw Techniques

You can switch on the option All control points in Bézier editor underTools > Options > OpenOffice.orgDraw > View. The default is tosee the control points and guide lines only when a point is marked byclicking the point. By holding the Shift key down as you mark, you canselect and mark several points at the same time. A marked point isshown a little darker.

Drawing a succession of Bézier curves
Several lines or Bézier curves can be linked together. The single parts
are referred to as segments. Technically such a succession of Bézier
curves and lines is known as a path.
Begin the drawing as with a simple Bézier curve. At the end position of
the first segment, end not with a double-click but with one of thefollowing:• Click on the end point of the first segment but do not keep themouse button pressed. In this way you produce a curve point
which is both a control point for the first segment and a control
point for the second segment. This control point lies, however, on
the actual curve point and so does not influence the direction of
the following curve segment. Move the mouse to the end positionof the second segment. This segment appears to be a straight line
but is in fact a Bézier curve. Either double-click to finish thecurve or repeat the above procedure to add successive segments.
or• Go back and click once on the end point of the first segment andkeep the mouse button pressed. Now you can drag the initial
control point for the second segment into place, as describedabove. Release the mouse button at the desired position of thecontrol point and move the mouse to the end position of thesecond segment. The curve follows the line of movement of themouse.
You can either end the drawing here with a double-click or continue
and link in further segments.
To generate a closed curve, select the curve and click on the Close
Bézier iconon the Edit Points toolbar, or right-click and selectClose object from the context menu.

Guide to Bézier curves

35Transition points
For the transition from one segment to the next, there are threedifferent types of points, each with its own properties.

Corner points
This is the only common point between two segments which areotherwise independent of each other. It is likely that the curve has akink at this point (depending on the angle of the tangents, the lines
from the corner point to each control point; see Figure 28).

Figure 28: Corner point

Smooth transition points
The tangent lines to the common point have the same angle and form astraight line. If you change the position of one of the control points theother also moves, so that the tangents remain in a straight line. This
also applies to the case where a Bézier curve meets a straight line: thetangent line lies on the straight line and cannot be moved sideways.

Figure 29: Smooth transition point

Symmetric transition points
In this case the tangents not only lie on a straight line but the distanceof the control points from the curve point is the same. The segments
have the same direction and the same curvature at the transition point.

Figure 30: Symmetric transition point

36

Advanced Draw Techniques

Changing point types
When a point is selected, the Edit Points toolbar activates the threecorner point icons.

The circled icons are, from left to right, Corner point, Smoothtransition, and Symmetric transition. The latter two icons appear thesame but you can identify them by looking at the tooltip. At any time
only one of the three icons will be active. To change the type of point,
click on one of the other two icons.

Closing the curve
To close an open curve, use Close object from the context menu or
the Close Bézier iconfrom the Edit Points toolbar. A straight line isdrawn between the start and end points if these points are Corner
points.
If the start and end points are Smooth points or Symmetric points andthe control point does not lie directly on the curve point, it changes
position so it is in a straight line with the line segment and the closing
line will be a curve (see Figure 31 for a comparison).
To prevent this happening, change the curve point type before closing
to a corner point.

Figure 31: Close curve – start and end points are corner
points (left), smooth or symmetric points (right)

Guide to Bézier curves37Transformation between straight line and Bézier
curve
Transform a straight segment into a Bézier curve
Select the larger of the two handles at the ends of the straight line;
this will be the starting point of the curve. After a short time theConvert to curve iconon the Edit Points toolbar becomes active. It
starts in the “out” position. Click the icon to turn on the function. The
straight line is transformed into a Bézier curve. The type of thesegment end point remains as it was. Using this function you canconvert one side of a polygon or a part of a polyline into a Bézier curve.

Transform a Bézier curve into a straight segment
Select the larger of the two handles at the ends of the curve; this willbe the starting point of the straight segment. After a short time theConvert to curve iconon the Edit Points toolbar becomes active. It
starts in the “in” position. Click the icon to turn off the function. The
Bézier curve segment is transformed into a straight line. The type ofthe segment end point remains as it was. If all segments are straightlines, Draw converts the object to a polygon or a polyline.

Transform complete curves, polylines and polygons
Transform a polygon or a polyline into a curve
Select the whole polygon or polyline. The object does not need to be inpoint mode. Choose Convert to curve from the context menu or the
Modify menu. The points in the resulting curve are all of the type
Corner point and the control points lie on the curve segments. All thesegments thus appear as straight lines.

Transform a curve into a polygon or a polyline
Select the whole curve. Choose Convert to polygon from the context
menu or the Modify menu. The curve does not need to be in pointmode to do this. The individual segments are not replaced by straightlines. Instead additional points are generated on the curve so that theline of the polygon/polyline matches that of the curve as closely as
possible. These points are placed closer together as the curvature
increases.
38

Advanced Draw Techniquesbeforeafter

Freehand lines
You can also produce a curved line from a Bézier curve using thefreehand line tool . This tool automatically inserts anchor points andcontrol points to render the curve as close as possible to the original
Bézier curve.
Place the mouse cursor at the beginning point and keep the mousebutton pressed until you reach the end of the curve. As soon as you
release the mouse button, the curve is complete.
Normal view

Point mode

Combining closed curves
If you draw a Bézier curve segment and, at the end point of thesegment, click and hold the mouse button, followed by a single press of
the Alt key, the curve is closed with a straight line and you are placedin Combining mode. You can now begin a second curve at an arbitrary
point. Ending the drawing with a double-click also closes this curve. If
you end it with an Alt-click as described above, you can draw further
curves. The curves that you have just drawn form a common object, aso-called Combination. You can use this (for example) to place holes infilled curves.
If you want to bind two curves together into a Combination at somestage, select both curves and use Modify > Combine.
Even if you use a Combination, the individual curves are still available
as objects. You can use Modify > Split to convert the Combinationback to single objects.
You can create Combinations only from closed curves. Other objects,
such as rectangles or polygons, will be automatically transformed into
curves, and curves that are not closed will be closed with a straightline.
Guide to Bézier curves

39Connecting curves
To join curves together, select them and use Modify > Connect. A
connection is only possible with open curves. If you use this tool on
closed curves, they are first opened and an additional end point
inserted at the starting point. A straight line is used to connect the
curves.
The behavior of connected curves cannot (at present) be modified. It is
not obvious in advance how the transition properties of the connectedcurves are calculated, nor which end points will be connected. It istherefore a good idea to work on a copy and try out the effect withdifferent positions of the end points of the individual curves. To avoid
changes to a shape, first set the property of the new connection point
to the type Corner point.

Adding comments to a drawing
Starting with OOo 3.2, Draw supports comments (formerly called
notes) similar to those in Writer and Calc.
Choose Insert > Comment from the menu bar. A small box containing
your initials appears in the upper left-hand corner of the Draw page,
with a larger text box beside it. Draw has automatically added yourname and the date at the bottom of this text box.

Type or paste your comment into the text box. You can optionally apply
some basic formatting to parts of the text by selecting it, right-clicking,and choosing from the pop-up menu. From this menu, you can alsodelete the current comment, all the comments from the same author,or all the comments in the document.

40

Advanced Draw Techniques

You can move the small comment markers to anywhere you wish on
the page. Typically you might place it on or near an object you refer toin the comment.
To show or hide the comment markers, choose View > Comments.
Select Tools > Options > User Data to configure the name you want
to appear in the Author field of the comment, or to change it.
If more than one person edits the document, each author is
automatically allocated a different background color.

Connecting and breaking lines
It is possible in Draw to join separate line elements into one line.
Select a number of lines and choose Modify > Connect. The lines areconverted to curves and adjacent end points are joined together. The
resulting shape is a polyline, not a closed shape.
To add text to the polyline, press F2 and type the text. To make aclosed shape from the polyline, right-click the polyline and choose
Close Object. You can add text and also change area properties andedit the object as with any polygon object. Note that you can only use
the Close Object command on connected lines, freehand lines andunfilled curves.
If you select a shape and choose Modify > Break, this does notreverse the Connect process but simply converts the polygon into acollection of individual lines. Text added to the shape will be associatedwith one of the lines (often the last one). You cannot apply a fill to aclosed shape made up of lines resulting from the Break command.

Connecting and breaking lines

41