1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3                       "http://www.docbook.org/xml/4.3/docbookx.dtd">
4<!-- section history:
5  2007-11-30 j.h: updated en;fr for v2.4. Moved from layer menu to image
6             menu
7  2007-06-18 Added Spanish translation by AntI
8  2007-03-12 Kolbjørn: added no translation
9  2006-07-31 scb: revised 'en'
10-->
11<sect2 id="plug-in-align-layers">
12  <title>Align Visible Layers…</title>
13
14  <indexterm>
15    <primary>Layer</primary>
16    <secondary>Stack managing</secondary>
17    <tertiary>Align visible layers</tertiary>
18  </indexterm>
19  <indexterm>
20    <primary>Align visible layers</primary>
21  </indexterm>
22
23  <para>
24    With the <guimenuitem>Align Visible Layers</guimenuitem> command,
25    you can very precisely position the visible layers (those marked with
26    the <quote>eye</quote> icon). This degree of precision is especially
27    useful when you are working on animations, which typically have many
28    small layers. Clicking on <guimenuitem>Align Visible
29      Layers</guimenuitem> displays a dialog which allows you to choose
30    how the layers should be aligned.
31  </para>
32  <note>
33    <para>
34      In <application>GIMP 1.2</application>, the default base for the
35      alignment was the top visible layer in the stack.  In
36      <application>GIMP 2</application>, the default alignment base is
37      the edge of the canvas. You can still align the image on the bottom
38      layer of the stack, even if it is invisible, by checking
39      <guilabel>Use the (invisible) bottom layer as the base</guilabel>
40      in the dialog.
41    </para>
42  </note>
43  <figure>
44    <title>Example image for layer alignment</title>
45    <mediaobject>
46      <imageobject>
47        <imagedata fileref="images/menus/image/align-demo.png" format="PNG"/>
48      </imageobject>
49      <caption>
50        <para>
51          The example image contains four layers on a large (150x150 pixel)
52          canvas. The red square is 10x10 pixels, the green rectangle is
53          10x20 pixels and the yellow rectangle is 20x10 pixels. The
54          background layer (blue, 100x100 pixels) will not be affected by
55          the command, since the <guilabel>Ignore lower layer</guilabel>
56          option has been checked on the dialog. Note that the layers in the
57          image seem to have a different order than their actual order in
58          the stack because of their positions on the canvas. The yellow
59          layer is the top layer in the image and the second one in the
60          stack.
61        </para>
62      </caption>
63    </mediaobject>
64  </figure>
65
66  <sect3>
67    <title>Activate the Command</title>
68    <itemizedlist>
69      <listitem>
70        <para>
71          You can access this command from the image menubar through
72          <menuchoice>
73            <guimenu>Image</guimenu>
74            <guimenuitem>Align Visible layers…</guimenuitem>
75          </menuchoice>.
76          There is no default keyboard shortcut. If the image holds a single
77          layer only, you get a message from GIMP telling that there must be
78          more than one layer in the image to execute the command.
79        </para>
80      </listitem>
81    </itemizedlist>
82		<figure>
83      <title>The <quote>Not enough layers</quote> message</title>
84      <mediaobject>
85        <imageobject>
86          <imagedata format="PNG"
87            fileref="images/menus/image/align-no-layer.png"/>
88        </imageobject>
89      </mediaobject>
90    </figure>
91  </sect3>
92
93  <sect3>
94    <title>
95      Description of the <quote>Align Visible Layers</quote> dialog
96    </title>
97    <figure>
98      <title>The <quote>Align Visible Layers</quote> dialog</title>
99      <mediaobject>
100        <imageobject>
101          <imagedata format="PNG"
102            fileref="images/menus/image/align-layers.png"/>
103        </imageobject>
104      </mediaobject>
105    </figure>
106    <variablelist>
107      <varlistentry>
108        <term>Horizontal Style; Vertical Style</term>
109        <listitem>
110          <para>
111            These options control how the layers should be moved in
112            relationship to each other. You can choose:
113          </para>
114          <itemizedlist>
115            <listitem>
116              <para>
117                <guilabel>None</guilabel>:
118                There will be no change in the horizontal or the vertical
119                position, respectively.
120              </para>
121            </listitem>
122            <listitem>
123              <para>
124                <guilabel>Collect</guilabel>:
125                The visible layers will be aligned on the canvas, in the
126                way that is determined by the <guilabel>Horizontal
127                  base</guilabel> and <guilabel>Vertical base</guilabel>
128                options. If you select a <guilabel>Horizontal
129                  base</guilabel> of <guilabel>Right edge</guilabel>, layers
130                may disappear from the canvas. You can recover them by
131                enlarging the canvas. If you check the
132                <guilabel>Use the (invisible) bottom layer as the
133                  base</guilabel> option, the layers will be aligned on the
134                top left corner of the bottom layer.
135              </para>
136              <figure>
137                <title>
138                  Horizontal <quote>Collect</quote> alignment (on the edge of
139                  the canvas)
140                </title>
141                <mediaobject>
142                  <imageobject>
143                    <imagedata format="PNG"
144                      fileref="images/menus/image/align-demo.png"/>
145                  </imageobject>
146                  <caption>
147                    <para>Original image with the layer stack</para>
148                  </caption>
149                </mediaobject>
150                <mediaobject>
151                  <imageobject>
152                    <imagedata format="PNG"
153                      fileref="images/menus/image/alignHCLB-.png"/>
154                  </imageobject>
155                  <caption>
156                    <para>
157                      The layers have been moved horizontally so that their
158                      left edges are aligned with the left edge of the
159                      canvas.
160                    </para>
161                  </caption>
162                </mediaobject>
163              </figure>
164              <figure>
165                <title>
166                  Horizontal <quote>Collect</quote> alignment (on the bottom
167                  layer)
168                </title>
169                <mediaobject>
170                  <imageobject>
171                    <imagedata format="PNG"
172                      fileref="images/menus/image/align-demo.png"/>
173                  </imageobject>
174                  <caption>
175                    <para>Original image with the layer stack
176                    </para>
177                  </caption>
178                </mediaobject>
179                <mediaobject>
180                  <imageobject>
181                    <imagedata format="PNG"
182                      fileref="images/menus/image/alignHCLB+.png"/>
183                  </imageobject>
184                  <caption>
185                    <para>
186                      The layers have been moved horizontally so that their
187                      left edges align with the left edge of the bottom
188                      layer.
189                    </para>
190                  </caption>
191                </mediaobject>
192              </figure>
193            </listitem>
194            <listitem>
195              <para>
196                <guilabel>Fill (left to right)</guilabel>;
197                <guilabel>Fill (top to bottom)</guilabel>:
198                The visible layers will be aligned with the canvas
199                according to the edge you selected with
200                <guilabel>Horizontal base</guilabel> or
201                <guilabel>Vertical base</guilabel>, respectively.
202                The layers are arranged regularly, so that they do not
203                overlap each other. The top layer in the stack is placed
204                on the leftmost (or uppermost) position in the image.
205                The bottom layer in the stack is placed on the rightmost
206                (or bottommost) position of the image. The other layers
207                are placed regularly between these two positions.  If the
208                <guilabel>Use the (invisible) bottom layer as the
209                  base</guilabel> option is checked, the layers are aligned
210                with the corresponding edge of the bottom layer.
211              </para>
212              <figure>
213                <title>
214                  Horizontal <quote>Fill</quote> alignment (canvas)
215                </title>
216                <mediaobject>
217                  <imageobject>
218                    <imagedata format="PNG"
219                      fileref="images/menus/image/align-demo.png"/>
220                  </imageobject>
221                  <caption>
222                    <para>Original image with the layer stack
223                    </para>
224                  </caption>
225                </mediaobject>
226                <mediaobject>
227                  <imageobject>
228                    <imagedata format="PNG"
229                      fileref="images/menus/image/alignHFLB-.png"/>
230                  </imageobject>
231                  <caption>
232                    <para>
233                      Horizontal filling alignment, Left to Right, with
234                      <guilabel>Use the (invisible) bottom layer as the
235                        base</guilabel> option not checked. The top layer
236                      in the stack, the green one, is placed all the way
237                      on the left. The bottom layer in the stack, the red
238                      one, is placed is on the right and the yellow layer
239                      is between the other two.
240                    </para>
241                  </caption>
242                </mediaobject>
243              </figure>
244              <figure>
245                <title>
246                  Horizontal <quote>Fill</quote> alignment (bottom layer)
247                </title>
248                <mediaobject>
249                  <imageobject>
250                    <imagedata format="PNG"
251                      fileref="images/menus/image/align-demo.png"/>
252                  </imageobject>
253                  <caption>
254                    <para>Original image with the layer stack</para>
255                  </caption>
256                </mediaobject>
257                <mediaobject>
258                  <imageobject>
259                    <imagedata format="PNG"
260                      fileref="images/menus/image/alignHFLB+.png"/>
261                  </imageobject>
262                  <caption>
263                    <para>
264                      The same parameters as in the previous example,
265                      but with the lowest (blue) level as the base.
266                    </para>
267                  </caption>
268                </mediaobject>
269              </figure>
270            </listitem>
271            <listitem>
272              <para>
273                <guilabel>Fill (right to left)</guilabel>;
274                <guilabel>Fill (bottom to top)</guilabel>:
275                These settings work similarly to the ones described above,
276                but the filling occurs in the opposite direction.
277              </para>
278              <figure>
279                <title>
280                  Vertical <quote>Fill</quote> alignment (bottom layer)
281                </title>
282                <mediaobject>
283                  <imageobject>
284                    <imagedata format="PNG"
285                      fileref="images/menus/image/align-demo.png"/>
286                  </imageobject>
287                  <caption>
288                    <para>Original image with the layer stack</para>
289                  </caption>
290                </mediaobject>
291                <mediaobject>
292                  <imageobject>
293                    <imagedata format="PNG"
294                      fileref="images/menus/image/alignVFBB+.png"/>
295                  </imageobject>
296                  <caption>
297                    <para>
298                      Vertical <quote>Fill</quote> alignment, bottom to
299                      top, bottom layer as base
300                    </para>
301                  </caption>
302                </mediaobject>
303              </figure>
304              <para>
305                There must be at least three visible layers in the image to
306                use the <quote>Fill</quote> options.
307              </para>
308            </listitem>
309          </itemizedlist>
310        </listitem>
311      </varlistentry>
312    </variablelist>
313  </sect3>
314</sect2>
315