2. Grids and Guides

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.

Figure 12.27. Image used for examples below

Image used for examples below

2.1. The Image Grid

Figure 12.28. Image with default grid

Image with default grid

Each image has a grid. It is always present, but by default it is not visible until you activate it by toggling ViewShow 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 ImageConfigure Grid from the image menu: this brings up the Configure Grid dialog.

Figure 12.29. A different grid style

A different grid style

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 ViewSnap 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.)