4.2. Свойства контура

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 can be very complex. If you create them by hand using the Paths tool, they probably won't contain more than a few dozen anchor points and usually a less than that. However, if you create them by transforming a selection into a path, or by transforming text into a path, the result can easily contain hundreds or even thousands of anchor points.

Контур может состоять из нескольких компонентов. «Компонент» представляет собой часть контура, чьи управляющие точки полностью соединены друг с другом сегментами контура. Возможность иметь в контуре несколько компонентов позволяет вам преобразовывать их в выделения, содержащие несколько разделённых частей.

Каждый компонент контура может быть открытым или замкнутым: «замкнутый» означает, что последняя управляющая точка соединена с первой управляющей точкой. Если вы преобразуете контур в выделение, любой открытый компонент автоматически преобразовывается в замкнутый с помощью соединения прямой линией последней управляющей точки с первой.

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 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. Therefore, it is possible to have literally hundreds of paths in an image without causing any significant stress to your system. 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 Paths tool.