4.2. Align and Distribute

The Align and Distribute 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 focused layer has small squares in corners and is called source. Then buttons in the dialog become active (they remain active during all the GIMP session): they allow you to select the target, i.e other layer, selection, path, the source will be aligned with.

4.2.1. 呼び出し方

There are different possibilities to activate the tool:

  • From the main menu: ToolsTransform ToolsAlign and Distribute.

  • By clicking the tool icon in the Toolbox.

  • By pressing the Q keyboard shortcut.

4.2.2. キー修飾 (初期設定)

Shift

レイヤーをクリックして選択するときに Shift キーを押しておれば複数層選べます。

[ヒント] ヒント

あたかも輪ゴムをかけるようにしてレイヤーを複数選ぶ簡単な方法があります。 選択したいレイヤーをとりかこむように仮の矩形を考え、 その角をクリックしてから矩形の対角までドラッグし、 マウスボタンを放します。 するとその矩形の内側に完全に入っているレイヤーはすべて選択されます。

ちなみにこの方法では選ばれたレイヤーを揃えるべき目標としての最初のアイテムがまだありません。

4.2.3. ツールオプション

図14.92 Tool Options for the Align and Distribute tool

Tool Options for the Align and Distribute tool

Normally, tool options are displayed in a window attached under the Toolbox as soon as you activate a tool. If they are not, you can access them from the main menu through WindowsDockable WindowsTool Options which opens the option window of the selected tool.

整列
基準:

In this drop-down list, you select the target, the image object the layer will be aligned with.

  • Image: the image is the target.

  • Selection: the selection is the target.

  • Picked reference object: The selected object (layer, path, guide) on the canvas.

Align buttons

These buttons become active when a target is selected.

  • Align left edge of target: to align left edge of source with left edge of target.

  • Align center of target: to align center of source on the vertical middle line of target.

  • Align right edge of target: to align right edge of source with right edge of target.

  • Align top edge of target: to align top edge of source with top edge of target.

  • Align middle of target: to align center of source on the horizontal middle line of target.

  • Align bottom edge of target: to align bottom edge of source with bottom edge of target.

Example

An image with a selection, layer #1 (background) is active, layer #2 is cropped to content, layer #3 is a text layer.

We click on the yellow circle: layer #2 becomes the source. We want to send this source to the middle of the selection: the Relative to option is set to Selection.

Align center of target clicked

Align middle of target clicked

並べる
Distribute buttons

These options are used when you have several targets and want to arrange them. Here, layers selected with Shift + Click are called targets. But they are actually sources. Relative to options are active to set the target. These transformations are usually relative to Image.

These options work as Align options, but you can distribute sources evenly.

  • Distribute targets evenly in the horizontal: to distribute sources evenly horizontally.

  • Distribute horizontal centers of targets: to distribute centers of sources with center of the target horizontally.

  • Distribute targets evenly in the vertical: to distribute sources evenly vertically.

  • Distribute vertical centers of targets: to distribute centers of sources with center of target.

図14.93 Example for the Distribute commands

Example for the 「Distribute」 commands

Base image: three layers. Example for the 「Distribute」 commands (Distribute right edges of targets) will be used.

Example for the 「Distribute」 commands
Active layer is yellow (target). All layers are aligned on the right edge of the yellow layer.

4.2.4. A practical example for Distribute

図14.94 Origin

Origin
Four text layers, with same size. We want to align them at center of image.


      

Origin

We select them as sources with Shift + Click.

Origin

The default target (Relative to) is Image. We used the Origin (Distribute vertical centers of targets) command.

Origin

After using the Origin (Distribute targets evenly in the horizontal).


4.2.5. Align using the rubber-band box

図14.95 輪ゴムかけ式の枠を用いた整列

輪ゴムかけ式の枠を用いた整列

赤のレイヤーよりも左上でクリックしてから赤と黄色の各レイヤーをすっぽり囲む枠を、 左下までポインターをドラッグしてつくる。

輪ゴムかけ式の枠を用いた整列

Selection is the reference. After a click on the 輪ゴムかけ式の枠を用いた整列 button, both layers align with the left side of the selection.