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. Attivazione dello strumento

Ci sono diverse possibilità per attivare lo strumento:

  • 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. Tasti modificatori (predefiniti)

Maiusc

È possibile selezionare diversi livelli alla volta tenendo premuto il tasto Maiusc mentre si fa clic su di essi.

[Suggerimento] Suggerimento

Alle volte è più semplice scegliere più livelli usando l'elastico: fare clic fuori dalla zona rettangolare immaginaria che copre i livelli che si desidera scegliere. Trascinare fuori tale zona spostando il puntatore e rilasciare il pulsante del mouse. Ora ogni livello che sia completamente dentro al rettangolo tratteggiato, è stato selezionato.

Notare che ora non c'è un obiettivo «primo elemento» al quale i livelli selezionati possono essere allineati.

4.2.3. Opzioni dello strumento

Figura 14.95. 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.

Allinea
Relativo a:

In questo elenco a discesa, si seleziona l'obiettivo, l'oggetto immagine col quale il livello verrà allineato.

  • Primo elemento: il primo elemento selezionato quando si selezionano più livelli mantenendo premuto il tasto Maiusc. Notare che non c'è un «primo elemento» se si seleziona livelli multipli usando la selezione multipla con il mouse.

  • Immagine: l'immagine è l'obiettivo.

  • Selezione: la selezione è l'obiettivo.

  • Livello attivo: il livello attivo, nella finestra di dialogo, è l'obiettivo.

  • Canale attivo: il canale attivo, contenente una selezione creata in precedenza, è l'obiettivo.

  • Tracciato attivo: il tracciato attivo è l'obiettivo.

Pulsanti di allineamento

Questi pulsanti diventano attivi quanto un obiettivo viene selezionato.

  • 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.

Esempio

Un'immagine con una selezione, il livello #1 (sfondo) è attivo, il livello #2 è ritagliato ai contenuti, il livello #3 è un livello di testo.

Facciamo clic sul cerchio giallo: il livello #2 diventa la sorgente. Vogliamo spedire questa sorgente nel mezzo della selezione: l'opzione Relativo a è impostata a «Selezione».

Allinea al centro dell'oggetto cliccato

Allinea alla mediana dell'oggetto cliccato

Distribuisci
Pulsanti di distribuzione

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.

Figura 14.96. Esempio del comando «Distribuisci»

Esempio del comando «Distribuisci»

Base image: three layers. Esempio del comando «Distribuisci» (Distribute right edges of targets) will be used.

Esempio del comando «Distribuisci»
Active layer is yellow (target). All layers are aligned on the right edge of the yellow layer.

4.2.4. Un esempio pratico del comando «Distribuisci»

Figura 14.97. Origine

Origine
Quattro livelli di testo, della stessa dimensione. Vogliamo allinearli al centro dell'immagine.


      

Origine

Le selezioniamo come sorgenti con Maiusc + clic.

Origine

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

Origine

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


4.2.5. Allinea usando il riquadro elastico

Figura 14.98. Allinea usando il riquadro elastico

Allinea usando il riquadro elastico

È stato fatto clic sopra a sinistra del livello rosso, trascinando fuori una zona comprendente il livello rosso e giallo spostando il puntatore verso l'angolo in basso a destra.

Allinea usando il riquadro elastico

«Selection» is the reference. After a click on the Allinea usando il riquadro elastico button, both layers align with the left side of the selection.