The alignment tool in GIMP is quite useful, but not completely obvious in usage. At first I couldn’t figure out how it worked but I knew I wanted to use it. The tool is used to align layers in an image and looks like this:
Create a new image (size doesn’t matter in this example) and add a new transparent layer (CTRL + SHIFT + N). To this layer first add some text and then select the alignment tool.
After having selected the alignment select your text:
Use the alignment tool to first align horizontally (1) and then vertically (2):
Now your text is aligned.
If you have a layer that you want to align, perhaps with a shape on it, it is a bit tricky. Let’s continue on our example:
The blue square is in a layer of its own and we want it centered behind the text. The problem is that when we mark it with the alignment tool we mark the entire layer. First you need to auto-crop the layer. Go to Layers => Autocrop which will crop down to the content of the layer.
You are now free to align the shape just like you aligned the text!