5.2. Paths

The Paths tool allows to create complex selections called Bézier Curves, a bit like the Free Selection tool but with all the adaptability of vectorial curves. You can edit your curve, you can paint with your curve, or even save, import, and export the curve. You can also use paths to create geometrical figures. Paths have their own dialog box: Dialog.

5.2.1. Activating the Tool

There are different possibilities to activate the tool:

  • From the main menu: ToolsPaths.

  • By clicking the tool icon in the Toolbox.

  • By pressing the B keyboard shortcut.

5.2.2. Key modifiers (Defaults)

[Nota] Nota

Help messages pop up at the bottom of the image window to help you about all these keys.

Shift

This key has several functions depending on context. See Options for more details.

Ctrl ; Alt

Three modes are available to work with the Paths tool: Design,Edit and Move. Ctrl key toggles between Design and Edit. Alt (or Ctrl+Alt) key toggles between Design and Move.

5.2.3. Options

Figura 14.131. Path tool options

“Path” tool options

Normally, tool options are displayed in a window attached under the Toolbox as soon as you activate a tool. If they are not, you can access them from the main menu through WindowsDockable WindowsTool Options which opens the option window of the selected tool.

Design Mode

By default, this tool is in Design mode. You draw the path by clicking successively. You can move control points by clicking on them and dragging them. Between control points are segments.

Numbers are steps to draw a two segments straight path.

Curved segments are easily built by dragging a segment or a new node. Blue arrows indicate curve. Two little handles appear that you can drag to bend the curve.

[Dica] Dica

To quickly close the curve, press Ctrl key and click on the initial control point. In previous versions, clicking inside a closed path converted it into Selection. Now, you can use the Selection from Path button or the Path to Selection button in the Paths dialog.

[Dica] Dica

When you have two handles, they work symmetrically by default. Release the pressure on the mouse button to move handles individually. The Shift key will force the handles to be symmetrical again.

Several functions are available in Design mode:

Inserting a new node: When you press Ctrl and hover the mouse pointer over the existing path, the mouse pointer changes to the '+' sign. Clicking will create a new path node in the hovered point of the path.

Moving one or several nodes: On a node, the mouse pointer becomes a 4-arrows cross. You can click and drag it. You can select several nodes by Shift and click and move them by click and drag. Pressing Ctrl+Alt allows to move all the path, as a selection.

Modifying handles: You have to Edit a node first. A handle appears. Drag it to bend the curve. Pressing Shift toggles to symmetric handles.

Modify segment: When the mouse pointer moves over a segment, it turns to a 4-arrows cross. Click and drag it to bend the segment. As soon as you move it, handles appear at both ends of the segment. Pressing the Shift key toggles to symmetric handles.

Adding a new subpath: When you press Shift and hover the mouse pointer outside the existing path, the mouse pointer starts displaying a square. Clicking will start a subpath that isn't connected to other curves, but is considered a part of the path.

Edit Mode

Edit performs functions which are not available in Design mode. With this mode, you can work only on the existing path. When the mouse pointer is not on the path, the pointer changes to a small crossed circle and you can not do any path editing.

Add a segment between two nodes: Click on a node at one end of the path to activate it. The pointer is like a union symbol. Click on an other node to link both nodes. This is useful when you have to link unclosed components.

Remove a segment from a path: While pressing Shift+Ctrl key combination, point to a segment. The mouse pointer turns to a "-" sign. Click to delete the segment.

Add a node to a path: point to a segment. Pointer turns to "+"". Click where you want to place the new control point.

Remove a node: While pressing Shift+Ctrl key combination, point to a node. Pointer turns to "-"". Click to delete the node.

Add a handle to a node: Point to a node. Pointer turns to small hand. Drag the node: handle appears. Pressing Shift toggles to symmetric handles.

Remove a handle from a node: While pressing Shift+Ctrl key combination, point to a handle. The pointer doesn't turn to the expected "-"" and remains a hand. Click to delete the handle.

[Cuidado] Cuidado

There is no warning before removing a node, segment or a handle.

Move Mode

Move mode allows to move one or all components of a path. Simply click on the path and drag it.

If you have several components, only the selected one is moved. If you click and drag outside the path, all components are moved. Pressing the Shift key toggles between moving all components and selected components only.

Polygonal

With this option, segments are linear only. Handles are not available and segments are not bent when moving them.

Selection from Path

This button allows creation of a selection that is based on the path in its present state. This selection is marked with the marching ants . Note that the path is still present: the current tool is still the path tool and you can modify this path without modifying the selection that has become independent. If you change tools, the path becomes invisible, but it persists in the Paths Dialog and you can re-activate it.

If the path is not closed, GIMP will close it with a straight line.

As the help pop-up tells, pressing Shift when clicking on the button will add the new selection to an already existing one. Pressing Ctrl will subtract the selection from the pre-existing selection, and the Shift+Ctrl key combination will intersect the two selections.

Fill path

This lets you fill an enclosed path with a solid color or pattern.

Stroke path

See Secção 3.19, “Stroke Paths” and Secção 4, “ Paths.

See the Path concept.