Difference between revisions of "Documentation/OOoAuthors User Manual/Draw Guide/Combining Multiple Objects"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
{{DISPLAYTITLE:Combining Multiple Objects}}
 
{{DISPLAYTITLE:Combining Multiple Objects}}
{{NeedsWork}}
 
 
{{Documentation/MultipleObjectsTOC
 
{{Documentation/MultipleObjectsTOC
 
|ShowPrevNext=block
 
|ShowPrevNext=block
 
|PrevPage=Documentation/OOoAuthors User Manual/Draw Guide/Dynamic gradients
 
|PrevPage=Documentation/OOoAuthors User Manual/Draw Guide/Dynamic gradients
|NextPage=Documentation/OOoAuthors User Manual/Draw Guide/Editing Pictures
+
|NextPage=Documentation/OOoAuthors User Manual/Draw Guide/Grouping objects
 
}}
 
}}
 
This is Chapter '''5''' of '''OpenOffice.org 2.x Draw Guide''' (second edition), produced by the [http://oooauthors.org/ OOoAuthors group]. A PDF of this chapter is available from the [http://documentation.openoffice.org/manuals/oooauthors2/ OOoAuthors Guides page] at OpenOffice.org.
 
This is Chapter '''5''' of '''OpenOffice.org 2.x Draw Guide''' (second edition), produced by the [http://oooauthors.org/ OOoAuthors group]. A PDF of this chapter is available from the [http://documentation.openoffice.org/manuals/oooauthors2/ OOoAuthors Guides page] at OpenOffice.org.
 
== Grouping objects ==
 
=== Group by common selection ===
 
When several objects are selected, any operations you carry out are applied to all of the objects. For example, you can rotate a group of objects in its entirety. Groups obtained through common selection of several objects are undone as soon as you click outside the group. However, you can group objects and keep those selected objects grouped together.
 
 
=== Maintaining groups and undoing groups ===
 
To group selected objects, right-click and choose '''Group''' from the pop-up menu. You can also use the keyboard shortcut ''Control+Shift+G'' or choose '''Modify > Group''' from the menu bar.
 
 
[[Image:DG5-1.png|thumb|none|500px|Figure 1: Grouping objects from the right-click menu.]]
 
 
When objects are grouped, any editing operations carried out on that group are applied to all members of the group. If you click on one member of the group, the whole group is selected.
 
 
The objects of a group retain their own individual properties. To undo a group, right-click and choose '''Ungroup''' from the pop-up menu, use the keyboard shortcut ''Control+Alt+Shift+G'' or choose '''Modify > Ungroup''' from the menu bar.
 
 
=== Editing individual objects in a group ===
 
You can edit a member of a group individually without breaking the group. To do this, right-click and choose '''Enter group''' or double-click on the group.
 
 
[[Image:DG5-2.png|thumb|none|500px|Figure 2: When you enter a group, objects outside the group can not be selected and are grayed out.]]
 
 
Once inside the group, click on any object to edit it.
 
 
[[Image:DG5-3.png|thumb|none|500px|Figure 3: Editing an object inside a group.]]
 
 
To leave this mode, right-click and choose '''Exit group''' or double-click outside the group.
 
 
=== Nesting groups ===
 
You can create “nested” groups, or groups of groups. In this case, OpenOffice.org keeps the initial group hierarchy. If you ungroup a group made of other groups, you are left with individual groups that you can then ungroup further, and so on until only single objects remain.
 
 
== Combining objects ==
 
In contrast to grouping functions, combinations create a new object; subsequent “un-combining” in the same manner as ungrouping is not possible. Select a collection of objects, then right-click and choose '''Combine''' from the pop-up menu. The result of this operation is shown in Figure 4.
 
 
[[Image:DG5-4.png|thumb|none|500px|Figure 4: Combining objects.]]
 
 
At first glance, this can seem rather surprising. Once you have understood the rules governing combination in OpenOffice.org however, it will become clearer:
 
 
* The attributes (for example, area fill) of the resulting object are those of the object furthest back. In this example, it is the circle.
 
* Where the objects overlap, the overlapping zone is either filled or empty depending on the number of overlaps. When the number of overlaps is even, you get an empty space; when the number is odd, you get a filled area.
 
 
[[Image:DG5-5.png|thumb|none|500px|''Figure 5: Odd numbered overlaps are filled, even numbered overlaps are empty.]]
 
 
{{Documentation/Tip|You can reorder objects so that they are further back in the background or further forward in the foreground: right-click on the object and select '''Arrangement''' from the pop-up menu. See also [[#Aids for positioning objects|Aids for positioning objects]].}}
 
 
An object which is a combination can be broken up into its constituent parts by selecting '''Modify > Break'''. This is not the equivalent of ungrouping as the objects were converted to Bézier curves when they were combined. The resulting object will be a set of base level objects (for example, a rectangle will be broken into 4 separate lines). The original formatting – line thickness, colors and area properties - will not be retained.
 
 
== Merge, subtract or intersect shapes ==
 
The functions Merge, Subtract, and Intersect can be reached, after you have selected more than one object, in the '''Modify > Shapes''' menu or though the (group’s) right-clickmenu under the heading '''Shapes'''.
 
 
=== Merge ===
 
When you merge objects, the new object covers the entire surface of the original objects (it is the ''union'' of the objects). In the same way as combining, the fill of the merged object is determined by the fill of the object furthest in the background. Other properties are not taken over into the new object.
 
 
[[Image:DG5-a.png]]
 
 
=== Subtract ===
 
When you subtract, the upper object is subtracted from the lower object.
 
 
[[Image:DG5-b.png]]
 
 
=== Intersect ===
 
When you intersect two objects, you get the area covered by both objects.
 
 
[[Image:DG5-c.png]]
 
 
{{Documentation/Tip|How do I move an object so it is further back or closer to the front? See [[#Aids for positioning objects|Aids for positioning objects]].}}
 
 
=== Practical example ===
 
The following example shows how you can use the shape merge functions to create a complex shape, namely a knife with a wooden handle.
 
<ol>
 
<li>Draw an ellipse and then a rectangle overlapping half of its width.</li>
 
 
[[Image:DG5-d.gif]]
 
 
<li>Select both shapes, right-click, and choose '''Shapes > Subtract''' from the pop-up menu. The result should resemble the shape at right:</li>
 
 
[[Image:DG5-e.png]]
 
 
<li>Draw another rectangle and put it over the top half of the ellipse. Then subtract again.</li>
 
 
[[Image:DG5-f.png]]
 
 
<li>Draw a small ellipse covering just the lower right corner and subtract again.</li>
 
 
[[Image:DG5-g.png]]
 
 
<li>The knife blade is now complete. To make the handle, draw a rectangle and an ellipse as shown.</li>
 
 
[[Image:DG5-h.gif]]
 
 
<li>''Merge'' the shapes together.</li>
 
 
[[Image:DG5-i.png]]
 
 
<li>''Group'' this image with the previous one.</li>
 
 
[[Image:DG5-j.gif]]
 
</ol>
 
 
= Aids for positioning objects =
 
Draw has various tools to help you arrange the objects with respect to each other. Here we explore some of the more important ones.
 
 
== Moving an object to the front or to the back ==
 
When you combine or merge objects, the end result varies drastically depending on which object is “in front” and which one is “in the back”. In Figure 6 you can see the difference.
 
 
[[Image:DG5-6.png|thumb|none|500px|Figure 6: Subtracting objects: the result varies depending on which object is in front.]]
 
 
If you imagine several objects stacked one on top of the other, the one referred to as “Front” is the one on top of the stack. The one referred to as “Back” is the one on the very bottom of the stack.
 
 
First select an object, then click on [[Image:PositionIcon.png]] to open the '''Position''' toolbar from the main Drawing toolbar.
 
 
[[Image:DG5-7.png]]<br>'''1''' Bring to Front '''2''' Bring Forward '''3''' Send Backward '''4''' Send to Back '''5''' In Front of Object '''6''' Behind Object '''7''' Reverse <br>''Figure 7: The floating Position toolbar''
 
 
[[Image:DG5-p1.png]] brings the selected object to the front of the group.
 
 
: [[Image:DG5-k.png]]
 
 
[[Image:DG5-p2.png]] brings the selected object one step upwards.
 
 
: [[Image:DG5-l.png]]
 
 
[[Image:DG5-p3.png]] brings the selected object one step backwards.
 
 
: [[Image:DG5-m.png]]
 
 
[[Image:DG5-p4.png]] brings the selected object to the back of the group.
 
 
: [[Image:DG5-n.png]]
 
 
[[Image:DG5-p5.png]] moves the selected object in front of another chosen object.<br>
 
[[Image:DG5-p6.png]] moves the selected object behind another chosen object.
 
 
Click first on the object you want to change in position. Click next on the icon and then move the mouse over the other object. The mouse cursor changes into a hand and the outline of the second object becomes a dashed line (see below). Clicking on this object completes the rearrangement of position.
 
 
[[Image:DG5-p5.png]] [[Image:DG5-o.png]]
 
 
[[Image:DG5-p7.png]] reverses the order of the selected objects.
 
 
: [[Image:DG5-p.png]]
 
 
== Aligning objects ==
 
Click on [[Image:AlignObjects.png]] to open the floating '''Align''' toolbar. This toolbar helps you position objects with respect to each other.
 
 
[[Image:DG5-8.png]]<br>'''1''' Align left '''2''' Center horizontally '''3''' Align right '''4''' Align top '''5''' Center vertically '''6''' Align bottom <br>''Figure 8: The floating Align toolbar''
 
 
[[Image:DG5-a1.png]] Align left.
 
 
: [[Image:DG5-q.png]]
 
 
[[Image:DG5-a2.png]] Center horizontally.
 
 
: [[Image:DG5-r.png]]
 
 
[[Image:DG5-a3.png]] Align right.
 
 
: [[Image:DG5-s.png]]
 
 
[[Image:DG5-a4.png]] Align top.
 
 
: [[Image:DG5-t.png]]
 
 
[[Image:DG5-a5.png]] Center vertically.
 
 
: [[Image:DG5-u.png]]
 
 
[[Image:DG5-a6.png]] Align bottom.
 
 
: [[Image:DG5-v.png]]
 
 
== Distributing the distance and space between objects ==
 
Select at least three objects. Now you are able to select the option '''Distribution '''on the '''Modify''' menu or from the right-click menu. A dialog containing a number of selections appears (see Figure 9). The use of each option is indicated by the tooltip (under Windows) or by clicking the Help button in the Distribution dialog.
 
 
[[Image:DG5-9.png|thumb|none|600px|''Figure 9: Distribution of spacing between objects]]
 
 
'''Horizontal distribution'''
 
 
'''None. '''Does not distribute the objects horizontally.
 
 
'''Left. '''The left edges of the objects are evenly spaced from one another.
 
 
'''Center. '''The horizontal centers of the objects are evenly spaced from one another.
 
 
'''Spacing.''' The horizontal spacing between the objects is evenly distributed.
 
 
'''Right.''' The right edges of the objects are evenly spaced from one another.
 
 
'''Vertical distribution'''
 
 
'''None.''' Does not distribute the objects vertically.
 
 
'''Top. '''The top edges of the objects are evenly spaced from one another.
 
 
'''Center.''' The vertical centers of the objects are evenly spaced from one another.
 
 
'''Spacing.''' The vertical spacing between the objects is evenly distributed.
 
 
'''Bottom. '''The bottom edges of the objects are evenly spaced from one another.
 
 
Figure 10 shows four objects before distribution of spacing.
 
 
[[Image:DG5-10.png|thumb|none|500px|Figure 10: Before distribution.]]
 
 
The result of the selections made in Figure 9 (change to equal horizontal spacing, no vertical change) is shown in Figure 11.
 
 
[[Image:DG5-11.png|thumb|none|500px|Figure 11: After distribution – change to equal horizontal spacing, no vertical change.]]
 
  
  
 
{{CCBY}}
 
{{CCBY}}
 
[[Category: Draw Guide (Documentation)]]
 
[[Category: Draw Guide (Documentation)]]

Latest revision as of 23:30, 9 April 2008


This is Chapter 5 of OpenOffice.org 2.x Draw Guide (second edition), produced by the OOoAuthors group. A PDF of this chapter is available from the OOoAuthors Guides page at OpenOffice.org.


Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools