7.50. Offset

The Offset command shifts the content of the active layer. Anything shifted outside the layer boundary is cropped. This command displays a dialog which allows you to specify how much to shift the layer and how to fill the space that is left empty by shifting it. It can be used to create tileable patterns.

7.50.1. Activating the Command

  • You can access this command from the main menu through LayerTransformOffset…,

  • or by using the keyboard shortcut Shift+Ctrl+O.

7.50.2. «Offset» Options

Рисунок 16.116. The «Offset» dialog

The «Offset» dialog

Presets, Preview, Split view

These options are common to GEGL-based dialogs. Please refer to Розділ 2, «Common Features».

X; Y

With these two values, you specify how far the contents of the layer should be shifted in the horizontal (X) and vertical (Y) directions. You can enter the offsets in the text boxes. Positive values move the layer to the right and downward. The default unit is pixels, but you can choose a different unit of measurement with the drop-down menu. A unit of «%» is sometimes useful.

Since GIMP-2.10.12, you can click-and-drag on canvas to move the layer.

By width/2, height/2

With this button, you can automatically set the X and Y offsets so that the contents are shifted by exactly half the width and half the height of the image.

Edge Behavior

You can specify one of three ways to treat the areas left empty when the contents of the layer are shifted:

  • Wrap around: The empty space on one side of the layer is filled with the part of the layer which is shifted out of the other side, so none of the content is lost.

  • Fill with background color: The empty space is filled with the background color, which is shown in the Color Area of the Toolbox.

  • Make transparent: The empty space is made transparent. If the layer does not have an alpha channel, this choice is disabled.

7.50.3. Examples

Рисунок 16.117. Using «Offset» together with «Edge Behavior»

Using «Offset» together with «Edge Behavior»

Original image

Using «Offset» together with «Edge Behavior»

Y = -40, Edge Behavior = Wrap around

Using «Offset» together with «Edge Behavior»

Y = -40, Edge Behavior = Fill with background color

Using «Offset» together with «Edge Behavior»

Y = -40, Edge Behavior = Make transparent

Рисунок 16.118. Repeatable pattern

Repeatable pattern

Original image; the corresponding Layer Dialog

Repeatable pattern

Edge Behavior = Wrap around, Offset = By width/2, height/2

Repeatable pattern

Create a repeated pattern via the Tile filter