2.3. Диалог контуров

Если вы не знаете, что такое контур, прочитайте раздел Раздел 5, « Контуры ».

Рисунок 15.12. Диалог «Контуры»

Диалог «Контуры»

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

2.3.1. Вызов диалога

Диалог «Буферы» можно прикрепить на панель. Более подробно об этом написано в разделе Раздел 2.3, «Диалоги и панели».

Его можно открыть следующими способами:

  • From the main menu, as WindowsDockable DialogsPaths.

  • from the Tab menu in any dockable dialog by clicking on and selecting Add TabPaths.

In the Windows menu, there is a list of detached windows which exists only if at least one dialog remains open. In this case, you can raise the «Paths» dialog from the main menu: WindowsPaths.

2.3.2. Использование диалога «Контуры»

Each path belongs to one image: paths are components of images just like layers. The Paths dialog shows you a list of all paths belonging to the currently active image: switching images causes the dialog to show a different list of paths. In multi-window mode, you can show the name of the active image at the top of the dock by choosing «Show Image Selection» from the Tab menu.

If you are familiar with the Layers dialog, you have a head start, because the Paths dialog is in several ways similar.

At the top, there are two «Lock» icons:

Lock Path

A «path» icon tells us whether editing the current path is locked (disabled) or not. Clicking the icon toggles between enabled and disabled.

[Примечание] Примечание

Until GIMP 2.10.32 this was called Lock Path Strokes. That name was considered ambiguous, because the term strokes is also used for stroking lines along a path, which this option does not change.

Lock Path Position

A «cross with arrows» icon tells us whether the current path position is locked (disabled) or not. When the path position is locked, the path can't be moved. Clicking the icon toggles between enabled and disabled.

The Paths dialog itself shows a list of all paths that exist in the image, with four items for each path:

Видимость контура

Если контур видим, то слева от него есть значок с открытым глазом, если нет — пустое пространство. Видимость контура переключается нажатием на эту пиктограмму. «Видимость» в данном случае подразумевает то, что контур отображается на вашем изображении, но не изменяет данные точек, пока его не заштриховать или отобразить каким-либо другим способом.

цепочка

Пиктограмма «цепочка» располагается правее «глаза». Она видна в том случае, если элементы контура заблокированы. Блокировка в данном случае подразумевает следующее: если контур состоит из нескольких отдельных частей, то заблокировав их вы сможете выполнять такие операции, как масштабирование, поворот и прочие преобразования не с отдельным элементом, а со всем контуром. Блокировка переключается нажатием на пиктограмму «цепочка» (если контур заблокирован) или на то место, где она должна быть (если контур не заблокирован).

Просмотр

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

имя контура

Название контура, которое, среди названий остальных контуров одного изображения должно быть уникальным. Чтобы изменить имя контура дважды щёлкните на нём. Если такое имя уже существует в списке, то к нему автоматически будет добавлен порядковый номер (например, #1).

Если список контуров не пуст, то обязательно один из контуров является активным, и все операции, касающиеся контуров, будут производиться именно с ним. Активный контур выделяется подсветкой. Чтобы сделать контур активным, просто нажмите на его строке левой кнопкой мыши.

Нажатием правой кнопкой мыши на любом элементе списка вызывается меню контуров. Кроме того, вы можете открыть это меню с помощью меню закладки.

2.3.3. Кнопки

В нижней части окна диалога расположены кнопки, которые, в основном, вызывают те же функции, что и меню контуров. Однако некоторые из них обладают дополнительными свойствами, которые становятся доступными при нажатии кнопки и какой-либо модификационной клавиши одновременно.

Новый контур

See New Path. Holding down Shift makes a new (empty) path with the last used values, without opening the New Path dialog.

Поднять контур

See Raise Path. Holding down Shift moves the path to the top of the list.

Опустить контур

See Lower Path. Holding down Shift moves the path to the bottom of the list.

Duplicate Paths

See Duplicate Paths.

Paths to Selection

Converts paths into a selection; see Paths to Selection for a full explanation. You can use modifier keys to set the way the new selection interacts with the existing selection:

Клавиша Действие
Нет Замещение существующего выделения
Shift Добавление к существующему выделению
Ctrl Вычитание из существующего выделения
Shift+Ctrl Пересечение с существующим выделением.
Выделенная область в контур

Holding down Shift brings up the Advanced Options dialog, which probably is only useful to GIMP developers.

Paint along the paths

See Stroke Paths. Holding down Shift strokes the path based on the last used values without opening the Stroke Paths dialog.

Удалить контур

Delete Path deletes the currently selected path.

2.3.4. Меню диалога контуров

Рисунок 15.13. Меню диалога контуров

Меню диалога контуров

Это меню вызывается нажатием правой кнопкой мыши на любой строке контура в диалоге. Кроме того, это меню можно открыть, воспользовавшись меню закладки диалога контуров (самый первый пункт, «Меню контуров»). С помощью этого меню осуществляется доступ к большинству операций с контурами.

Edit Path

Edit Path is an alternative way to activate the Paths tool, used for creating and manipulating paths. It can also be activated from the Toolbox, or by using the keyboard shortcut B.

Правка атрибутов контура

При выборе этого пункта меню открывается диалог, в котором можно изменить имя контура. Имя контура можно так же изменить, дважды щелкнув на нем в окне диалога контуров.

Color Tag

Color Tag brings up a sub menu, similar to the one in the Layers Dialog, that allows you to select a color tag for the selected path.

Новый контур

При выборе этого пункта меню создается новый контур. Он добавляется в список контуров в диалоге и делается активным. Кроме того, открывается диалог, где вы можете указать имя контура. Новый контур представляет собой "чистый лист", т.е. не содержит никаких точек, кривых Безье и т.п.

Поднять контур

С помощью этого пункта активный контур перемещается в списке на одну позицию вверх. Фактически, порядок контуров в списке никак не влияет на содержимое изображения, так что эта функция нужна только для того, чтобы облегчить процесс упорядочения информации.

Опустить контур

С помощью этой функции активный контур опускается в списке на одну позицию вниз. Этот пункт, так же, как и предыдущий, не влияет на содержимое изображения.

Создать копию контура

Duplicate Path creates a copy of the active path, assigns it a unique name, adds it to the list in the Paths dialog, and makes it the active path for the image. The copy will be visible only if the original path was visible.

Удалить контур

С помощью этой кнопки можно удалить выбранный контур.

Объединить видимые контуры

Эта функция объединяет все видимые на данный момент контуры в один. Подобное действие может понадобиться, например, в том случае, если вы хотите обвести все контуры с одинаковыми параметрами обводки.

Paths to Selection; Add Paths to Selection; Subtract Paths from Selection; Intersect Paths with Selection

These commands all convert the active paths into a selection, and then combine it with the existing selection in the specified ways. (Paths to Selection discards the existing selection and replaces it with one formed from the path.) If necessary, any unclosed components of the path are closed by connecting the last anchor point to the first anchor point with a straight line. The «marching ants» for the resulting selection should closely follow the path, but don't expect the correspondence to be perfect.

Выделенная область в контур

Эту функцию можно вызвать несколькими способами:

  • From the main menu, as SelectTo Path

  • Из меню диалога контуров Выделение в контур.

  • From the Selection to Path button at the bottom of the Paths dialog.

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

Converting a two-dimensional selection mask into a one-dimensional path involves some rather tricky algorithms: you can alter the way it is done using the Advanced Options, which are accessed by holding down the Shift key while pressing the Selection to Path button at the bottom of the Paths dialog. This brings up the Advanced Options dialog, which allows you to set 20 different options and variables, all with cryptic names. The Advanced Options are really intended for developers only, and help with them goes beyond the scope of this documentation. Generally speaking, Selection to Path will do what you expect it to, and you don't need to worry about how it is done (unless you want to).

Fill Paths

Эту функцию можно вызвать несколькими способами:

  • From the main menu, as EditFill Paths…

  • From the Paths dialog menu, as Fill Paths….

  • From the Fill Path button in the Tool Options for the Paths tool.

Fill Path fills all areas delimited by the path with the current foreground color or currently selected pattern. See the section about Fill Path for more information.

Stroke Paths…

Эту функцию можно вызвать несколькими способами:

  • From the main menu, as EditStroke Paths…

  • From the Paths dialog menu, as Stroke Paths….

  • From the Paint along the path button at the bottom of the Paths dialog.

  • From the Stroke Path button in the Tool Options for the Paths tool.

Stroke Path renders the active path on the active layer of the image, permitting a wide variety of line styles and stroking options. See the sections about Stroke Path and Stroking for more information.

Copy Paths

Copy Paths copies the active path to the Paths Clipboard, enabling you to paste it into a different image.

[Подсказка] Подсказка

Кроме того, контуры можно копировать и вставлять путем перетаскивания их миниатюрных изображений (которые находятся в диалоге контуров) в окно изображения.

[Примечание] Примечание

When you copy a path to an image, it is not visible. You have to make it visible in the Paths dialog.

Вставить контур

Paste Path creates a new path from the contents of the Path Clipboard, adds it to the list in the Paths dialog, and makes it the active path for the image. If no path has previously been copied into the clipboard, the menu entry will be disabled.

Export Paths

Export Paths… allows you to save a path to a file: it pops up a file save dialog that allows you to specify the file name and location. You can later add this path to any GIMP image using the Import Path command. The format used for saving paths is SVG: this means that vector-graphics programs such as Sodipodi or Inkscape will also be able to import the paths you save. See the Paths section for more information on SVG files and how they relate to GIMP paths.

Импортировать контур

Import Path… creates a new path from an SVG file: it pops up a file chooser dialog that allows you to navigate to the file. See the Paths section for information on SVG files and how they relate to GIMP paths.