4.2. Выравнивание

Рисунок 14.117. The Align tool in toolbox

The Align tool in 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 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. Активация инструмента

Инструмент можно вызвать несколькими способами :

  • from the image-menu, through: ToolsTransform ToolsAlign,

  • by clicking on the tool icon: in the toolbox,

  • либо с помощью клавиши быстрого доступа Q.

4.2.2. Клавиши-модификаторы (по умолчанию)

Shift

Можно выбрать много слоёв, удерживая нажатой клавишу Shift при щелчках по слоям.

[Подсказка] Подсказка

Иногда легче выделить много слоёв эластичным выделением: щелкните где-нибудь вне воображаемой области, охватывающей нужные вам слои, и обведите ее прямоугольной рамкой, а затем отпустите клавишу мыши. Каждый слой внутри нарисованной рамки окажется выделенным.

Заметьте, что теперь нет первого объекта, по которому можно выровнять выделенные слои.

4.2.3. Параметры инструмента

Рисунок 14.118. Параметры инструмента «Выравнивание»

Параметры инструмента Выравнивание

Обычно параметры инструмента отображаются в панели, присоединенной к панели инструментов, как только вы активируете его. Если их там нет, вы можете перейти к этой панели, выбрав в меню пункт ОкнаПанелиПараметры инструмента.

Выравнивание
Ориентир:

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

  • Первый объект: первый из нескольких выделенных слоев (когда выделение множества слоёв делалось при нажатой клавише Shift). Этого параметра нет при эластичном выделении.

  • Image: the image is the target.

  • Selection: the selection is the target.

  • Active layer: the active layer, in the layer dialog, is the target.

  • Active Channel: the active channel, containing a selection you made before, is the target.

  • Active Path: the active path is the target.

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 can add an offset and new options are available to distribute sources evenly.

  • : Distribute left edges of targets: to distribute left edges of sources on the left edge of the target (the image).

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

  • : Distribute right edges of targets: to distribute right edges of sources on right edge of the target.

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

  • : Distribute left edges of targets: to distribute top edges of sources on top edge of target.

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

  • : Distribute bottom edges of targets: to distribute bottom edges of sources with bottom edge of target.

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

Смещение

This offset can be positive or negative and is expressed in pixels. Distribute add it to the left edges, horizontal centers, right edges, top edges, vertical centers, or bottoms of sources.

Рисунок 14.119. 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). Offset = 0: all layers are aligned on the the right edge of the yellow layer.
Example for the Distribute commands
Active layer is yellow. Offset = 10:

New feature in GIMP-2.10

GIMP-2.10 shows relative coordinates (horizontal or vertical) when moving guides and sample points. Coordinates are relative to the start of moving.

4.2.4. A practical example for «Distribute»

Рисунок 14.120. 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». Offset = 0. We used the Origin (Distribute vertical centers of targets) command.

Origin

After using the Origin(Distribute targets evenly in the horizontal) with offset = 5.


4.2.5. Align using the rubber-band box

Рисунок 14.121. Выравнивание при помощи эластичного выделения

Выравнивание при помощи эластичного выделения

Мы нажали слева выше красного слоя и выделили область, покрывающую красный и жёлтый слои, двинув курсор мышки вправо и вниз.

Выравнивание при помощи эластичного выделения

«Selection» is the reference. After a click on the Выравнивание при помощи эластичного выделения button, both layers align with the left side of the selection.