4.6. Grids and Guides
Prev | 4.6. Grids and Guides | Next

### 4.6. Grids and Guides

#### The Image Grid

Image used for examples below

Image with default grid

You will probably have it happen many times that you need to place something in an image very precisely, and find that it is not easy to do using a mouse. Often you can get better results by using the arrow keys on the keyboard (which move the affected object one pixel at a time, or 25 pixels if you hold down the Shift key), but GIMP also provides you with two other aids to make positioning easier: grids and guides.

Each image has a grid. It is always present, but by default it is not visible until you activate it by toggling View->Show Grid in the image menu. If you want grids to be present more often than not, you can change the default behavior by checking "Show grid" in the Image Window Appearance page of the Preferences dialog. (Note that there are separate settings for Normal Mode and Fullscreen Mode.)

The default grid appearance, set up when you install GIMP, consists of plus-shaped black crosshairs at the grid line intersections, with grid lines spaced every 10 pixels both vertically and horizontally. You can customize the default grid using the Default Image Grid page of the Preferences dialog. If you only want to change the grid appearance for the current image, you can do so by choosing Image->Configure Grid from the image menu: this brings up the Configure Grid dialog.

A different grid style

Only rectangular Cartesian grids are provided. You can choose the color of the grid lines, and the spacing and offsets from the image origin, independently for horizontal and vertical grid lines. You have a choice of five grid styles:

Intersections (dots)

  This style, the least obtrusive, shows a simple dot at each intersection of grid lines.

Intersections (crosshairs)

  This style, the default, shows a plus-shaped crosshair at each intersection of grid lines.

Dashed

  This style shows dashed lines in the designated foreground color. It probably won't look good if the grid line spacing is small.

Double dashed

  This style shows dashed lines alternating the designated foreground and background colors.

Solid

  This style shows solid grid lines in the designated foreground color.

Not only can a grid be helpful for judging distances and spatial relationships, it can also permit you to align things exactly with the grid, if you toggle View->Snap to Grid in the image menu: this causes the pointer to "warp" perfectly to any grid line located within a certain distance. You can customize the snap distance threshold by setting "Snap distance" in the Tool Options page of the Preferences dialog, but most people seem to be happy with the default value of 8 pixels. (Note that it is perfectly possible to snap to the grid even if the grid is not visible. It isn't easy to imagine why you might want to do this, though.)

#### Guides

Image with four guides

In addition to the image grid, GIMP also gives you a more flexible type of positioning aid: guides. These are horizontal or vertical lines that you create by clicking on one of the rulers and dragging into the image. You can create as many guides as you like, positioned whereever you like. To move a guide after you have created it, activate the Move tool in the Toolbox (or press the M key); hold down the Shift key; you can then click and drag a guide. To delete a guide, simply drag it outside the image.

As with the grid, you can cause the pointer to snap to nearby guides, by toggling View->Snap to Guides in the image menu. If you have a number of guides and they are making it difficult for you to judge the image properly, you can hide them by toggling View->Show Guides. It is suggested that you only do this momentarily, otherwise you may get confused the next time you try to create a guide and don't see anything happening.

If it makes things easier for you, you can change the default behavior for guides in the Image Window Appearance page of the Preferences dialog. Disabling "Show guides" is probably a bad idea, though, for the reason just given.

| Note
Another use for guides: the Guillotine plugin can use guides to slice an image into a set of sub-images.

| Note
See also Guides in Glossary.

#### Rendering a Grid

What if you want to create a grid that is actually part of the image? You can't do this using the image grid: it is only an aid, and only visible on the monitor or in a screenshot. You can, however, use the Grid plugin to render a grid very similar to the image grid (actually the plugin has substantially more options).

Prev | Up | Next
4.5. Undoing | Home | 4.7. Paths