Tips and Tricks
This is Chapter 8 of the OpenOffice.org 3 Draw Guide, produced by the OOoAuthors group. A PDF of this chapter is available from this wiki page.
- 1 Positioning objects with zoom
- 2 Positioning objects with snap functions
- 2.1 Snap to grid
- 2.2 Snap to Snap objects (snap lines and snap points)
- 2.3 Snap to page edge
- 2.4 Snap to object border
- 2.5 Snap to object points
- 2.6 Help to position objects with guiding lines
- 3 Drawing to scale
- 4 Splitting drawings on multiple layers
- 5 Creating a multi-page document
- 6 Color palette: adding or changing single colors
- 7 Changing colors using the Color dialog
- 8 Creating cool effects
Positioning objects with zoom
With zoom you can place objects with higher precision.
Zoom adjustments using the status bar
The current zoom value is shown at the right-hand end of the status bar next to the zoom slider.
You can adjust the zoom value by using the slider, right-click on the zoom percent to select from a menu of preset values, or double-click to open the Zoom & View Layout dialog.
You can enter a zoom factor in the Variable field, select 100%, or use one of the three other choices. (The three options on the right hand side of the dialog are not available in Draw; they are active only for text documents.)
- Optimal: The drawing or selected object(not the page) is enlarged to just fit in the Draw page area.
- Fit width and height: The drawing page edges are set to the edges of the Draw page area.
- Fit width: The right and left page edges are set to the vertical edges of the Draw page area.
The exact effect of choosing one of these options depends on whether you have the Page pane switched on or off.
The Zoom toolbar
The Zoom toolbar provides additional zoom options. On the Standard toolbar (View > Toolbars > Standard), click on the downwards arrow of the Zoom button . You can also permanently display the toolbar by clicking on View > Toolbars > Zoom.
Positioning objects with snap functions
In Draw, objects can be accurately and consistently positioned using grid points, special snap points and lines, object frames, individual points on objects, or page edges. This function is known as Snap.
To use the snap function easily, work with the highest practical zoom value. You can use two different snap functions at the same time, for example snapping to a guide line and to the page edge. It is best, however, to activate only those functions that you really need.
Examples for setting up the snap functions are found in Advanced Draw Techniques.
Snap to grid
Showing the grid
Changing the color of the grid points
By default the grid points are bright gray and not always easy to see. Go to Tools > Options > OpenOffice.org > Appearance. In the Drawing / Presentation section, you can change the color of the grid points. On the Color Settings pulldown menu select a more suitable/visible color, for example black.
Configuring the grid
Under Tools > Options > OpenOffice.org Draw > Grid you can change the settings of the grid.
No adjustment is necessary in the Grid field, as these settings can be changed directly from the icons on the Options toolbar.
Resolution: sets the horizontal and vertical distance between two grid points.
Subdivisions: determines how many steps there are between adjacent grid points. Intermediate steps make it possible to have a larger separation between two grid points, so the drawing remains clearer. Objects can snap to intermediate points in exactly the same way as to grid points.
The snap field settings are largely self-explanatory. One important setting is the Snap range. Grid points and snap lines are both visual help elements that are managed separately by Draw. If you have activated a snap function and then move an object, Draw looks in the vicinity of the position of the object for those special help elements to determine the final position of the object; with the snap range setting, you can determine the extent of this search area. Exactly how large the snap area is depends on the current environment: which particular snap functions are in use, how the grid is configured, and whether or not there may be collisions with other objects. It is usually necessary to do a little experimenting to find what best suits your needs.
Snap to Snap objects (snap lines and snap points)
Unlike grid points, Snap lines and Snap points are created by the user. Snap lines run horizontally or vertically and appear as dashed lines. Snap points appear as small crosses, again with dashed lines.
|In OOo the names of the buttons in the Options toolbar are Display Guides and Snap to Guides when what is actually meant is Display Snap line and Snap to Snap line. These will hopefully be corrected in a subsequent version.|
If you have activated this function, you can position objects exactly. Horizontal and vertical snap lines can be used together. Snap lines are not active immediately after inserting them but are turned on (or off) using the icon or with the View menu. If the snap line is no longer needed you can hide it (or subsequently display it again) with the Display Guides icon or using the View menu.
Inserting a snap line with the mouse
To insert a snap line in a drawing:
- Hover the mouse cursor over either ruler (the vertical ruler to create a horizontal snap line and vice versa).
- Click and hold the right mouse button.
- Drag the mouse into the drawing area to produce a snap line.
The snap line can be moved at any time by dragging it with the mouse. Moving a snap line will not, however, move any objects that have already been snapped to that line.
Inserting snap points and snap lines using coordinates
The command Insert > Snap point / line opens a dialog where you can specify X and Y coordinates and choose the type of snap object: point, vertical line, or horizontal line.
Editing snap points and snap lines
All snap objects can be edited after setting them. If you right-click on a snap object, an appropriate menu opens allowing you to edit or delete the snap object.
Snap to page edge
With this function you can snap objects to the page edge. A combination with snap lines and snap to grid is also possible.
Snap to object border
With this function you can position one drawing object on the border of another. The connection point can lie anywhere on the object border. To use this function, first deactivate Snap to grid. Figure 14 shows some examples. Note that a typical object border will touch the border of a round object at only one of its four points.
Snap to object points
This function operates in a similar manner to the one just described. The difference is that the connection point can lie only at one of the four corner points of both the object being moved and the target object. This leads to the situation where two round objects have a connection point that does not lie on either object but at one of the red circled points.
Help to position objects with guiding lines
To simplify the positioning of objects it is possible to make visible guiding lines — extensions of the edges of the object — while it is being moved. These guiding lines have no snap function.
Drawing to scale
In Draw a drawing is made on a predefined drawing area or canvas. This will usually be in the Letter or A4 format depending on your locale settings, and will be output to some "standard" printer that you have set up on your computer (usually referred to as the default printer). Depending on the actual size of the drawn objects, it is often necessary or convenient to reduce or enlarge the drawing by some scaling value. You can specify the scale that you wish to use under Tools > Options > OpenOffice.org Draw > General.
The scale and selected unit of measurement are automatically reflected in the rulers, the window position and the window size. Scale settings can be stored permanently in a template that you can then use for new drawings.
The scale you use has no effect on the basic drawing operations. Draw will automatically calculate the necessary values (for example, dimension lines). The grid spacing is independent of drawing scale as the grid is not a drawing element but only an optical drawing aid.
|If you want to insert elements in a drawing from the Gallery or Clipboard, you should draw these to the same scale as you are using for the drawing to ensure the proper size ratio is maintained.|
Splitting drawings on multiple layers
Layers are like transparencies that lie one on top of another on an overhead projector. You can insert and extract single layers as desired. For example in architecture the floor plan, heating, and electrical wiring can all be on separate layers. With complex drawings this layer technique offers many advantages. You can make layers visible or invisible as needed or you can protect a layer from further changes while you work.
In Draw three layers are always present by default: Layout, Controls, and Dimension Lines. Layout is the default layer when you create a new drawing.
To change to a layer, click on its tab. Everything that is drawn will be placed on the currently selected layer. The Controls layer is for control elements such as icons and pulldowns and is not usually used for ordinary drawing elements. The Dimension Lines layer is used whenever you insert a dimension line on a drawing (unless the layer is made invisible). Use Insert > Layer to insert a new layer in a drawing (Figure 17 left).
|Insert and modify layers|
On the Insert Layer dialog you can specify the following properties:
- Visible: If this property is not activated, the layer will not be shown (the layer is removed from the stack).
- Printable: If this property is not activated, the layer will not be printed. This is useful if you use a "draft" layer for guides or annotations that you use in making the drawing but should not appear in the final output.
- Locked: All objects on this layer are protected from deletion, editing, or moving. No additional objects can be added to a protected layer. This property is useful when a base plan is to be protected while adding a new layer with other details.
Right-click on a layer tab to bring up a menu where you can insert or delete a layer, rename an existing layer, or modify a layer. You can change the names of the user-defined layers; the default layer names cannot be changed.
If you choose Modify you will see the dialog on the right. On the Modify Layer dialog you cannot edit the Name but you can edit the Title and Description and change the properties of the layer (Visible, Printable, Locked).
|Somewhat confusing is the fact that you can move objects on one layer although you are working on another layer. To avoid accidentally deleting or moving objects on another layer, you should lock that layer.|
An example drawing: house plan and furniture
A popular application for programs like Draw is the "moving the furniture" scenario. You can easily draw the floor plan of a room or a house using Draw. The simplest way is to draw walls as thick lines. You can also draw single rectangles or polygons, place them together, select them and then from the right-click menu use Shapes > Merge to make a single figure, then add a hatching pattern. Before you do this, you should read the section Drawing to scale.
For this example a suitable measurement unit is centimeter. The drawing scale and grid settings depend on the size of the floor plan.
Use the Position and Size dialog (right-click and choose Position and Size) to easily position and dimension the individual wall sections. Make sure that the rectangles completely overlap, otherwise the merging will give uneven edges.
The next figure shows the finished floor plan. In addition, a chest of drawers has been added.
The body of the chest is drawn on the Layout layer; the pulled-out drawer and the open doors are drawn as a group and put on a separate user-defined layer (Layer4 in our example).
Here is how this is done. Making the layer with the drawers and doors visible or hidden will show them open and closed. Hidden layers are shown with a colored tab.
|Making layers visible or hidden. (Left) Hide the Layout layer to see what is on Layer4. (Right) Show the Layout layer and hide Layer4 to show chest with drawers closed.]]
Changing the layer of a drawing object
Draw has no direct command to change layers. To move an object to another layer, change to the new layer, select the desired object or group, and then cut and paste it into position. Watch the status bar (the selected object's layer name is shown in the information field) to follow and check the change.
You can also click on the object, hold the mouse button pressed for about two seconds until the mouse cursor changes from a hand to a pointer with an open rectangle, and then drag and drop it on the appropriate layer.
Creating a multi-page document
Draw documents, like presentation (Impress) documents, can consist of multiple pages. As in Impress, tools to manage pages and backgrounds are available.
Pages are automatically named as Slide 1, Slide 2, and so on. This description is relative; if you move pages around, they are automatically renumbered. If you want to have fixed slide (page) names, you must name them yourself. Page names are useful for working with the Navigator and when you want to insert single slides using Insert > File into another document.
Using the Pages area
Using page backgrounds
With background pages you set common page settings for multiple pages of the Draw document. These include setting the color or graphics of the background, background objects, and fields such as page numbering and author.
Creating a page background
Change with View > Master to the Master view and note that a related Master View toolbar opens. If this toolbar does not appear, activate it with View > Toolbars. In this toolbar are switches for a new background page and for renaming the master page. These functions are also available by right-clicking on a page picture in the Pages area of the Master view. The button for deleting a master page is only available when you select a background page in the Pages area which has not yet been assigned to any page.
To return to normal mode, click the Close Master View button or View > Normal.
You can edit background pages just like normal pages. With Format > Page > Background you can set the color, pattern, or background picture. These settings are specific to each background page. In the Master view, you can set the size and orientation of the page; such settings apply to all pages.
If you insert drawing objects on a background page, they are visible on all pages that use this background. This a convenient way, for example, to place a logo on every page.
Master pages are organized in layers just like normal pages. The layers of normal pages are associated with the layer of the same name on the Master page. Accordingly the layers Layout/Control/Dimension Lines are considered to be a unit and the Master page layer Background objects is associated with them.
With Insert > Fields you can insert the date, time, page number, author and filename. No other fields are available. With page number you cannot insert a fixed page number but only a variable; the actual number appears on the page itself and is determined by the position of the page. The number is automatically adjusted if the page is subsequently moved.
Assigning and managing page backgrounds
You can open the Slide Design dialog in two ways:
The Slide Design dialog shows the available background pages for that page.
If the Exchange background page option is selected, the selected background page will be used on all pages of the document, not just on the currently active page.
The Delete unused backgrounds option deletes any backgrounds (as shown in the Slide Design dialog) that have not been assigned to a page.
Click the Load button to open the Load Slide Design dialog. From here you can load previously prepared background pages. All Draw and Impress templates can be used for this purpose. Note, however, that using Impress templates will bring in only the background and not the other elements prepared in Impress.
There is no special option to store background pages as templates. Instead you can load a document with the desired background page and store this document as a document template with File > Template > Store.
Color palette: adding or changing single colors
Draw (like all OpenOffice.org components) uses color palettes for the representation of colors. In addition you can customize the color palette to suit your own needs and wishes. You can modify colors in a palette, add other colors, or create new color palettes.
Reach these options with Tools > Options > OpenOffice.org > Colors or with Format > Area > Colors (tab). The latter method allows color palettes to be loaded or to be stored for future use. Any modifications made to colors apply only to the currently active palette.
OpenOffice.org always uses the RGB color model internally. Other methods are also available for the definition of a color value.
The color values can be input directly as numbers. Choose between the RGB color model (base colors Red, Green and Blue) and CMYK (base colors Cyan, Magenta, Yellow and Black, K= Key). The conversion to RGB values is made automatically.
Individual color tones are produced by using different values of the base colors. The color value can be any integer value between 0 and 255. As an example, Red 3 has a red value of 184, a green value of 71 and a blue value of 0 in the RGB model. The CMYK color model uses percentages (in this case 0%, 44%, 72%, and 28% respectively).
Change these values to manipulate the color tone. Either enter a number directly or use the spinners on the right side of each field. The change in color will be shown in the lower color field. Click the Modify button to apply and store the new setting.
To add a new color to the current palette, enter a new name in the Name field and set the desired color values. Click Add. The new color will be added to the end of the palette and stored in the currently active palette.
You can also delete colors from a palette. Select the color from the Color pulldown menu and click on the Delete button, then on OK to confirm the change.
Click on the Edit button to open a dialog where you can set individual colors. Many more input possibilities are available in this dialog.
In the lower area you can enter values in the RGB and CMYK models as well as the HSB (Hue, Saturation and Brightness) model.
The two color samples at the lower right show the current color (left) and the new color specified by the color value fields (right).
The color windows in the upper area permit a direct selection of color without any knowledge of color values. The right upper color window is linked directly with the various color model input fields; if you click on a color in this window the numbers change accordingly and a preview of the color appears in the right of the two color fields (lower right in the figure; see also Method 2 below).
If you click OK, the color window is closed and the input field is again active. You can at this stage select the color you have just defined, give it a new name, and store it by clicking the Add button. The old color will then (without any further warning) be overwritten.
Changing colors using the Color dialog
You can change the current color by modifying the individual color values explicitly. It is possible to change from one color model to another during this process but the settings are always calculated and stored according to the RGB model. This may result in some slight adjustment to your input values in the other models.
You can select a new color by clicking on a point in the color window at the upper right of the dialog. The chosen color is shown in a black frame which can be dragged with the mouse. If this color is not quite right, you can fine tune it as described above in Method 1 by changing the color values.
The left color window is divided like a chess board into 8 x 8 individual fields, each with a different color. Most important are the colors in each of the corner fields. The color red changes stepwise to green in the first row, and stepwise to yellow in the first column. The color green in the last column changes stepwise to blue.
This window thus contains a stepwise change between each of the four main colors in the corner points. If you hover the mouse over a square the RGB value is shown as a tooltip. For example, the yellow corner field (lower left) has RGB values of 255, 255 and 0 (full red, full green and no blue).
Click on this yellow field. A frame appears. If you click the -> arrow under the color windows the selected color is assigned.
You can change the color spread in this window to a more specific range by changing one or more of the corner fields. Click on the corner you want to change, then select the preferred color from the right color window with the mouse and/or set it using the number fields. Now click on the <- arrow; the new color will be assigned to the corner square you selected and the overall appearance of the window changes accordingly.
Creating cool effects
Duplication makes copies of an object while applying a set of changes (such as color or rotation) to the duplicates.
To start duplication, click on an object or group and choose Edit > Duplicate. The Duplicate dialog appears.
Choose the number of copies, their separation (placement), rotation, and so on. The choices above applied to a blue rectangle produce the result shown above.
Cross-fading transforms one shape into another. The result is a new group of objects including the two end points and the intermediate steps.
To do a cross-fade, first select two objects.
Then choose Edit > Cross-fading.
On the dialog choose the number of increments (transition steps). You probably want to have Cross-fade attributes and Same orientation both checked. The end result is shown at the beginning of this paragraph.
Which object goes in front?
Select (the object we want in front), right-click and choose Arrange > Bring to Front (or press Ctrl+Shift+plus). Or select (the object we want behind), right-click and choose Arrange > Send to Back or press Ctrl+Shift+minus.