4.3.  Align

Revision History
Revision $Revision: 2562 $ 2007-08-27 ude

Figure 13.92.  The Align tool in the toolbox

The Align tool in the toolbox

The Align tool is useful to align the image layers with various image objects. When this tool is selected, the mouse pointer turns to a small hand. By clicking on an element of a layer in the image, you choose the layer which will be moved (with Shift + click, you can choose several layers to be aligned); this focalised layer has small squares in corners. Various buttons in the dialog allow you to select how the layer will be moved. And you can select the image object (other layer, selection, path...) the selected layer will be aligned on. This object is called target.

4.3.1.  Activate the Tool

You can activate the Align tool in several ways :

  • From the image-menu, through: ToolsTransform ToolsAlign.

  • By clicking on the tool icon: in the toolbox.

  • By using the Q keyboard shortcut.

4.3.2.  Key modifiers (Defaults)

Shift

You can select several layers by holding Shift when clicking the layers.

[Tip] Tip

Sometimes it's easier to choose multiple layers using rubber-banding: click somewhere outside an imaginary rectangular region covering the layers you want to choose. Then drag out that region by moving the pointer, and release the mouse button. Now every layer, which is completely inside the dragged rectangle, is selected.

Note that now there is no target “first item” the selected layers can be aligned on.

4.3.3.  Options

Figure 13.93.  Align options

Align options

Overview

The available tool options can be accessed by (double)-clicking the align Tool icon.

Align
Relative to:

This is the target - the image object the selected layer will be aligned on.

  • First item: the first selected item when selecting multiple layers holding the Shift key. Note that there is no “first item” when you select multiple layers using rubber-banding.

  • Image: the image is used as a target.

  • Selection: the minimal rectangular region covering the active selection.

  • Selection: the minimal rectangular region covering the active selection.

  • Active Channel:

  • Active Path: This option is not yet handled.

These buttons become active when a layer is selected. When you click on one of these buttons, you align the selected layer with left edge, horizontal middle, right edge, top edge, vertical middle, or bottom of the target.

Distribute

These options seem to differ from the “Related to ” options only by the possibility to set an offset. This offset is the distance which will separate the selected layer(s) from the target once the alignment is performed. It can be positive or negative and is expressed in pixel. Distribute add this offset to the left edges, horizontal centers, right edges, top edges, vertical centers, or bottoms of targets.

Offset

This entry controls the amount of displacement that could be given to the desired alignment effect (in pixel) regarding the target. The default value is 0; it can be positive or negative.

4.3.4.  Example for the “Align” command

Figure 13.94.  Base image

Base image

This image has three layers with different sizes and a rectangular selection. The yellow layer is active.


Figure 13.95.  Red layer selected

Red layer selected

Click on red: the red layer is selected, with a small square in every corner.


Figure 13.96.  Red layer aligned

Red layer aligned

We chose “Selection” as a target and we clicked on the Red layer aligned button (Related to). The red layer is aligned with the right side of the selection.


Figure 13.97.  Distribute with offset

Distribute with offset

We set Offset to -5, we chose “Active layer” as a target and we clicked on the Distribute with offset button (Distribution). The layer is aligned 5 pixels before the right side of the yellow active layer.


Figure 13.98.  Align using rubber-band box

Align using rubber-band box

We clicked left from and above the red layer, and dragged out a region covering the red and the yellow layer by moving the pointer towards the bottom right corner.

Align using rubber-band box

Again, Selection is the target. After a click on the Align using rubber-band box button, both layers are aligned with the left side of the selection.