When every area of artwork is a separate, stacked, and modifiable object, isolating just one or organizing multiple objects can become cumbersome. Fortunately, Illustrator includes several features to ease the task of working withand aroundobjects.
Grouping and Ungrouping
Often working with multiple objects is easier when they behave as a single unit. This is where grouping comes in.
Grouped objects are still individual paths, shapes, placed images, text, or even other groups. They are simply treated as a unified object (see Figure 18.1). Groups may be transformedmoved, scaled, rotated, skewed, and so onas a single unit; effects and appearance attributes may be applied to grouped objects without affecting the attributes of the component elements; and groups may be used as symbols.
Figure 18.1. When individual objects (left) are grouped (right), they remain individual objects, though they behave, and are only selectable, as a unit.
Group individual objects by selecting them and then by choosing Object, Group or by pressing the keyboard shortcut Ctrl+G (Windows users) or -G (Mac users). Ungroup, or release the group to autonomous objects, with the Object, Ungroup command or by pressing the keyboard shortcut Shift+Ctrl+G (Windows users) or Shift--G (Mac users).
When grouping, all objects selected become part of a group sub-layer on the top object's layer regardless of their origin layers. In the Layers palette the group object is listed as a <Group> sub-layer, with each of its components below it (see Figure 18.2). As with any sub-layers, objects inside the group may be dragged out and restored to free-standing items by dragging their Layers palette entries outside the <Group> sub-layer. Similarly, new objects may be inserted into the group simply by dragging them into the sub-layer. Reorder sub-layers of the <Group> sub-layer to change the stacking order of objects inside the group.
Figure 18.2. Within the <Group> sub-layer are sub-layers for all the constituent objects in the group.
Also called the z-order, referring to the z-axis, which runs front-to-back in the third dimension, the stacking order is the front-to-back arrangement of objectswhich objects overlap and which underlap. With path-based artwork, stacking order is important; when working with transparency, it is vital.
Each new object created is higher in the stacking order thanand on top ofother objects on the same layer or sub-layer. Reorder objects by dragging their Layers palette entries up or down, by menu commands, or by keyboard shortcuts.
By choosing commands from the Object, Arrange submenu, you can tell one or more objects, including grouped objects, to do the following:
Arrange commands are relative to other objects; if the selected object is already the top object on the layer or sub-layer, Bring to Front and Bring Forward are grayed out and disabled.
Similar to the Arrange commands are the Select commands to select objects with different places in the stacking order without actually changing the stacking order. Available from either the Select menu or the right-click or Control-click context menu, the Select submenu includes the following commands:
Alignment and Distribution
With Alignment commands, the near impossible task of perfectly lining up objects by hand is unnecessary. Alignment commands can align any surface or plane of objects as well as distribute them relative to each other and/or the artboard.
Though most of the alignment commands appear on the Control palette automatically when more than one object is selected, this is a subset of the commands available on the Align palette (see Figure 18.3). To access all the alignment and distribution commands, open the Align palette from the Window menu and select Show Options from the Align palette menu.
Figure 18.3. The Align palette after selecting Show Options from the Align palette menu.
The Align palette contains three rows of command buttons: Align Objects, Distribute Objects, and Distribute Spacing.
Here are descriptions of the Align Objects buttons (see Figure 18.4):
Figure 18.4. Three aligned objects, left to right: Horizontal Align Left, Horizontal Align Center, Horizontal Align Right; Vertical Align Top (top), Vertical Align Center (center), Vertical Align Bottom (bottom).
Here is what the Distribute Objects buttons do (see Figure 18.5):
Figure 18.5. Three objects distributed, left to right: Vertical Distribute Top, Vertical Distribute Center, Vertical Distribute Bottom, Horizontal Distribute Left, Horizontal Distribute Center, Horizontal Distribute Right.
Here is what the Distribute Spacing buttons do (see Figure 18.6):
Figure 18.6. Three objects with distributed spacing. Vertical Distribute Spacing (left) and Horizontal Distribute Spacing (right).
To align or distribute objects or spacing relative to the artboardto center an object on the artboard, for exampleselect Align to Artboard from the Align palette menu and then use the appropriate palette button command.
Override the default behavior of the alignment and distribution commands by choosing a key object. For example, rather than aligning all objects to the left object when clicking Horizontal Align Left, all objects may be left-aligned to the center object or any other. After selecting all candidates for alignment or distribution, click once on the desired object to make it the key object. All alignment and distribution commands involving the key object will thereafter be relative to the position of the key object.
Restore nonrelative alignment and distribution by choosing Cancel Key Object from the Align palette menu.
Alignment and distribution are relative to the path, which, with certain appearance attributes, may not equal the correct object dimensions. To make all such actions relative to the full object and not the path, choose Use Preview Bounds from the Align palette menu.