Difference between revisions of "Path (GIMP)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(External links)
(External links)
Line 82: Line 82:
 
* [https://docs.gimp.org/en/gimp-using-paths-properties.html Path properties]
 
* [https://docs.gimp.org/en/gimp-using-paths-properties.html Path properties]
 
* [https://docs.gimp.org/en/gimp-path-dialog.html Path dialog]
 
* [https://docs.gimp.org/en/gimp-path-dialog.html Path dialog]
 +
* [http://www.gimptalk.com/index.php?/topic/571-creating-and-using-paths/ Creating and using paths]

Revision as of 09:05, 26 December 2015

This article discusses Paths (graphic design) in GIMP.

Description

Paths are curves (known as Bézier-curves).

A path is either open or closed.

  • An open path has two endpoints: it is an articulated line
  • A closed path has no endpoint: it is an articulated circle

Purposes

Paths have two main purposes:

  • Paths can be stroked -- that is, painted on the image in a variety of ways
  • Convert a closed path to a selection

Path tool

The Paths tool allows you draw arbitrary paths for a variety of purposes.

To use the Paths tool in GIMP, you must first create a path.

You may then take various path-related actions, including:

  • Save the path
  • Stroke the path
  • Create a selection from the path

Creating a path

Start by drawing the outline for your path; the outline can be modified later (see the Paths tool). To start, select the Paths tool using one of the following methods:

  • Use Tools → Path from the image menu
  • Use the relevant icon in toolbox
  • Use the hotkey B

When the Paths tool is selected, the mouse cursor changes into a pointer (arrow) with a curve.

Left click in the image to create the first point on the path. Move the mouse to a new point and left click the mouse to create another point linked to the previous point.

Although you can create as many points as you desire, you only need two points to learn about Paths.

While adding points, the mouse cursor has a little “+” next to the curve, which indicates that clicking will add a new point.

When the mouse cursor is close to a line segment, the “+” changes into a cross with arrows; like the move tool.

Path properties

Paths, like layers and channels, are components of an image. When an image is saved in GIMP's native XCF file format, any paths it has are saved with it. The list of paths in an image can be viewed and operated on using the Paths dialog. You can move a path from one image to another by copying and pasting using the pop-up menu in the Paths dialog, or by dragging an icon from the Paths dialog into the destination image window.

GIMP paths belong to a mathematical type called “Bezier paths”. What this means in practical terms is that they are defined by anchors and handles. “Anchors” are points the path goes through. “Handles” define the direction of a path when it enters or leaves an anchor point: each anchor point has two handles attached to it.

Paths can be very complex. If you create them by hand using the Path tool, unless you are obsessive they probably won't contain more than a few dozen anchor points (often many fewer); but if you create them by transforming a selection into a path, or by transforming text into a path, the result can easily contain hundreds of anchor points, or even thousands.

A path may contain multiple components. A “component” is a part of a path whose anchor points are all connected to each other by path segments. The ability to have multiple components in paths allows you to convert them into selections having multiple disconnected parts.

Each component of a path can be either open or closed: “closed” means that the last anchor point is connected to the first anchor point. If you transform a path into a selection, any open components are automatically converted into closed components by connecting the last anchor point to the first anchor point with a straight line.

Path segments can be either straight or curved. A path is called “polygonal” if all of its segments are straight. A new path segment is always created straight; the handles for the anchor points are directly on top of the anchor points, yielding handles of zero length, which produces straight-line segments. Drag a handle handle away from an anchor point to cause a segment to curve.

One nice thing about paths is that they use very few resources, especially in comparison with images. Representing a path in RAM requires storing only the coordinates of its anchors and handles: 1K of memory is enough to hold a complex path, but not enough to hold a small 20x20 pixel RGB layer. Therefore, it is possible to have literally hundreds of paths in an image without causing any significant stress to your system; the amount of stress that hundreds of paths might cause you, however, is another question. Even a path with thousands of segments consumes minimal resources in comparison to a typical layer or channel.

Paths can be created and manipulated using the Path tool.

Stroke path

The term “Stroke path” means to apply a specific style to the path (color, width, pattern... ).

See also

External links