app, pdb: a lot of vectors -> path renaming
This commit is contained in:
parent
aff70406c0
commit
bee7b8713b
72 changed files with 394 additions and 394 deletions
|
|
@ -182,13 +182,13 @@ static const GimpActionEntry layers_actions[] =
|
|||
{ "layers-text-to-vectors", GIMP_ICON_TOOL_TEXT,
|
||||
NC_("layers-action", "Text to _Path"), NULL, { NULL },
|
||||
NC_("layers-action", "Create paths from text layers"),
|
||||
layers_text_to_vectors_cmd_callback,
|
||||
layers_text_to_path_cmd_callback,
|
||||
GIMP_HELP_LAYER_TEXT_TO_PATH },
|
||||
|
||||
{ "layers-text-along-vectors", GIMP_ICON_TOOL_TEXT,
|
||||
NC_("layers-action", "Text alon_g Path"), NULL, { NULL },
|
||||
NC_("layers-action", "Warp this layer's text along the current path"),
|
||||
layers_text_along_vectors_cmd_callback,
|
||||
layers_text_along_path_cmd_callback,
|
||||
GIMP_HELP_LAYER_TEXT_ALONG_PATH },
|
||||
|
||||
{ "layers-resize", GIMP_ICON_OBJECT_RESIZE,
|
||||
|
|
|
|||
|
|
@ -1064,9 +1064,9 @@ layers_text_discard_cmd_callback (GimpAction *action,
|
|||
}
|
||||
|
||||
void
|
||||
layers_text_to_vectors_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
layers_text_to_path_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *layers;
|
||||
|
|
@ -1105,9 +1105,9 @@ layers_text_to_vectors_cmd_callback (GimpAction *action,
|
|||
}
|
||||
|
||||
void
|
||||
layers_text_along_vectors_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
layers_text_along_path_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GList *layers;
|
||||
|
|
|
|||
|
|
@ -78,10 +78,10 @@ void layers_delete_cmd_callback (GimpAction *action,
|
|||
void layers_text_discard_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_text_to_vectors_cmd_callback (GimpAction *action,
|
||||
void layers_text_to_path_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void layers_text_along_vectors_cmd_callback (GimpAction *action,
|
||||
void layers_text_along_path_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ static const GimpActionEntry paths_actions[] =
|
|||
NC_("paths-action", "Edit Pa_th"), NULL, { NULL },
|
||||
NC_("paths-action", "Edit the active path"),
|
||||
paths_edit_cmd_callback,
|
||||
GIMP_HELP_TOOL_VECTORS },
|
||||
GIMP_HELP_TOOL_PATH },
|
||||
|
||||
{ "paths-edit-attributes", GIMP_ICON_EDIT,
|
||||
NC_("paths-action", "_Edit Path Attributes..."), NULL, { NULL },
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ paths_edit_cmd_callback (GimpAction *action,
|
|||
}
|
||||
|
||||
if (GIMP_IS_VECTOR_TOOL (active_tool))
|
||||
gimp_vector_tool_set_vectors (GIMP_VECTOR_TOOL (active_tool), paths->data);
|
||||
gimp_vector_tool_set_path (GIMP_VECTOR_TOOL (active_tool), paths->data);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -924,8 +924,8 @@ paths_import_callback (GtkWidget *dialog,
|
|||
GimpImage *image,
|
||||
GFile *file,
|
||||
GFile *import_folder,
|
||||
gboolean merge_vectors,
|
||||
gboolean scale_vectors,
|
||||
gboolean merge_paths,
|
||||
gboolean scale_paths,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config);
|
||||
|
|
@ -937,8 +937,8 @@ paths_import_callback (GtkWidget *dialog,
|
|||
|
||||
g_object_set (config,
|
||||
"path-import-path", path,
|
||||
"path-import-merge", merge_vectors,
|
||||
"path-import-scale", scale_vectors,
|
||||
"path-import-merge", merge_paths,
|
||||
"path-import-scale", scale_paths,
|
||||
NULL);
|
||||
|
||||
if (path)
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ void paths_merge_visible_cmd_callback (GimpAction *action,
|
|||
void paths_to_selection_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void paths_selection_to_paths_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void paths_selection_to_paths_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
void paths_fill_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ text_tool_text_to_path_cmd_callback (GimpAction *action,
|
|||
{
|
||||
GimpTextTool *text_tool = GIMP_TEXT_TOOL (data);
|
||||
|
||||
gimp_text_tool_create_vectors (text_tool);
|
||||
gimp_text_tool_create_path (text_tool);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -181,7 +181,7 @@ text_tool_text_along_path_cmd_callback (GimpAction *action,
|
|||
GimpTextTool *text_tool = GIMP_TEXT_TOOL (data);
|
||||
GError *error = NULL;
|
||||
|
||||
if (! gimp_text_tool_create_vectors_warped (text_tool, &error))
|
||||
if (! gimp_text_tool_create_path_warped (text_tool, &error))
|
||||
{
|
||||
gimp_message (text_tool->image->gimp, G_OBJECT (text_tool),
|
||||
GIMP_MESSAGE_ERROR,
|
||||
|
|
|
|||
|
|
@ -87,7 +87,8 @@ vector_toolpath_actions_update (GimpActionGroup *group,
|
|||
gpointer data)
|
||||
{
|
||||
GimpToolPath *toolpath = GIMP_TOOL_PATH (data);
|
||||
gboolean on_handle, on_curve;
|
||||
gboolean on_handle;
|
||||
gboolean on_curve;
|
||||
|
||||
gimp_tool_path_get_popup_state (toolpath, &on_handle, &on_curve);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,4 +36,5 @@ void vector_toolpath_reverse_stroke_cmd_callback (GimpAction *action,
|
|||
GVariant *value,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __VECTOR_TOOLPATH_COMMANDS_H__ */
|
||||
|
|
|
|||
|
|
@ -273,9 +273,9 @@ static const GimpToggleActionEntry view_toggle_actions[] =
|
|||
{ "view-snap-to-vectors", NULL,
|
||||
NC_("view-action", "Snap t_o Active Path"), NULL, { NULL },
|
||||
NC_("view-action", "Tool operations snap to the active path"),
|
||||
view_snap_to_vectors_cmd_callback,
|
||||
view_snap_to_path_cmd_callback,
|
||||
FALSE,
|
||||
GIMP_HELP_VIEW_SNAP_TO_VECTORS },
|
||||
GIMP_HELP_VIEW_SNAP_TO_PATH },
|
||||
|
||||
{ "view-snap-to-bbox", NULL,
|
||||
NC_("view-action", "Snap to _Bounding Boxes"), NULL, { NULL },
|
||||
|
|
|
|||
|
|
@ -963,9 +963,9 @@ view_snap_to_canvas_cmd_callback (GimpAction *action,
|
|||
}
|
||||
|
||||
void
|
||||
view_snap_to_vectors_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
view_snap_to_path_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data)
|
||||
{
|
||||
GimpDisplayShell *shell;
|
||||
gboolean active;
|
||||
|
|
@ -973,9 +973,9 @@ view_snap_to_vectors_cmd_callback (GimpAction *action,
|
|||
|
||||
active = g_variant_get_boolean (value);
|
||||
|
||||
if (active != gimp_display_shell_get_snap_to_vectors (shell))
|
||||
if (active != gimp_display_shell_get_snap_to_path (shell))
|
||||
{
|
||||
gimp_display_shell_set_snap_to_vectors (shell, active);
|
||||
gimp_display_shell_set_snap_to_path (shell, active);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ void view_snap_to_grid_cmd_callback (GimpAction *action,
|
|||
void view_snap_to_canvas_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void view_snap_to_vectors_cmd_callback (GimpAction *action,
|
||||
void view_snap_to_path_cmd_callback (GimpAction *action,
|
||||
GVariant *value,
|
||||
gpointer data);
|
||||
void view_snap_to_bbox_cmd_callback (GimpAction *action,
|
||||
|
|
|
|||
|
|
@ -89,14 +89,14 @@ enum
|
|||
PROP_CHANNEL_NEW_NAME,
|
||||
PROP_CHANNEL_NEW_COLOR,
|
||||
|
||||
PROP_VECTORS_NEW_NAME,
|
||||
PROP_PATH_NEW_NAME,
|
||||
|
||||
PROP_VECTORS_EXPORT_PATH,
|
||||
PROP_VECTORS_EXPORT_ACTIVE_ONLY,
|
||||
PROP_PATH_EXPORT_PATH,
|
||||
PROP_PATH_EXPORT_ACTIVE_ONLY,
|
||||
|
||||
PROP_VECTORS_IMPORT_PATH,
|
||||
PROP_VECTORS_IMPORT_MERGE,
|
||||
PROP_VECTORS_IMPORT_SCALE,
|
||||
PROP_PATH_IMPORT_PATH,
|
||||
PROP_PATH_IMPORT_MERGE,
|
||||
PROP_PATH_IMPORT_SCALE,
|
||||
|
||||
PROP_SELECTION_FEATHER_RADIUS,
|
||||
PROP_SELECTION_FEATHER_EDGE_LOCK,
|
||||
|
|
@ -425,47 +425,47 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
|
|||
TRUE, half_transparent,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_STRING (object_class, PROP_VECTORS_NEW_NAME,
|
||||
GIMP_CONFIG_PROP_STRING (object_class, PROP_PATH_NEW_NAME,
|
||||
"path-new-name",
|
||||
"Default new path name",
|
||||
VECTORS_NEW_NAME_BLURB,
|
||||
PATH_NEW_NAME_BLURB,
|
||||
_("Path"),
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_PATH (object_class, PROP_VECTORS_EXPORT_PATH,
|
||||
GIMP_CONFIG_PROP_PATH (object_class, PROP_PATH_EXPORT_PATH,
|
||||
"path-export-path",
|
||||
"Default path export folder path",
|
||||
VECTORS_EXPORT_PATH_BLURB,
|
||||
PATH_EXPORT_PATH_BLURB,
|
||||
GIMP_CONFIG_PATH_FILE,
|
||||
NULL,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VECTORS_EXPORT_ACTIVE_ONLY,
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_PATH_EXPORT_ACTIVE_ONLY,
|
||||
"path-export-active-only",
|
||||
"Default export only the selected paths",
|
||||
VECTORS_EXPORT_ACTIVE_ONLY_BLURB,
|
||||
PATH_EXPORT_ACTIVE_ONLY_BLURB,
|
||||
TRUE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_PATH (object_class, PROP_VECTORS_IMPORT_PATH,
|
||||
GIMP_CONFIG_PROP_PATH (object_class, PROP_PATH_IMPORT_PATH,
|
||||
"path-import-path",
|
||||
"Default path import folder path",
|
||||
VECTORS_IMPORT_PATH_BLURB,
|
||||
PATH_IMPORT_PATH_BLURB,
|
||||
GIMP_CONFIG_PATH_FILE,
|
||||
NULL,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VECTORS_IMPORT_MERGE,
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_PATH_IMPORT_MERGE,
|
||||
"path-import-merge",
|
||||
"Default merge imported path",
|
||||
VECTORS_IMPORT_MERGE_BLURB,
|
||||
PATH_IMPORT_MERGE_BLURB,
|
||||
FALSE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_VECTORS_IMPORT_SCALE,
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_PATH_IMPORT_SCALE,
|
||||
"path-import-scale",
|
||||
"Default scale imported path",
|
||||
VECTORS_IMPORT_SCALE_BLURB,
|
||||
PATH_IMPORT_SCALE_BLURB,
|
||||
FALSE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
|
@ -741,30 +741,30 @@ gimp_dialog_config_set_property (GObject *object,
|
|||
config->channel_new_color = gegl_color_duplicate (g_value_get_object (value));
|
||||
break;
|
||||
|
||||
case PROP_VECTORS_NEW_NAME:
|
||||
case PROP_PATH_NEW_NAME:
|
||||
if (config->path_new_name)
|
||||
g_free (config->path_new_name);
|
||||
config->path_new_name = g_value_dup_string (value);
|
||||
break;
|
||||
|
||||
case PROP_VECTORS_EXPORT_PATH:
|
||||
case PROP_PATH_EXPORT_PATH:
|
||||
if (config->path_export_path)
|
||||
g_free (config->path_export_path);
|
||||
config->path_export_path = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_VECTORS_EXPORT_ACTIVE_ONLY:
|
||||
case PROP_PATH_EXPORT_ACTIVE_ONLY:
|
||||
config->path_export_active_only = g_value_get_boolean (value);
|
||||
break;
|
||||
|
||||
case PROP_VECTORS_IMPORT_PATH:
|
||||
case PROP_PATH_IMPORT_PATH:
|
||||
if (config->path_import_path)
|
||||
g_free (config->path_import_path);
|
||||
config->path_import_path = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_VECTORS_IMPORT_MERGE:
|
||||
case PROP_PATH_IMPORT_MERGE:
|
||||
config->path_import_merge = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_VECTORS_IMPORT_SCALE:
|
||||
case PROP_PATH_IMPORT_SCALE:
|
||||
config->path_import_scale = g_value_get_boolean (value);
|
||||
break;
|
||||
|
||||
|
|
@ -938,24 +938,24 @@ gimp_dialog_config_get_property (GObject *object,
|
|||
g_value_set_object (value, config->channel_new_color);
|
||||
break;
|
||||
|
||||
case PROP_VECTORS_NEW_NAME:
|
||||
case PROP_PATH_NEW_NAME:
|
||||
g_value_set_string (value, config->path_new_name);
|
||||
break;
|
||||
|
||||
case PROP_VECTORS_EXPORT_PATH:
|
||||
case PROP_PATH_EXPORT_PATH:
|
||||
g_value_set_string (value, config->path_export_path);
|
||||
break;
|
||||
case PROP_VECTORS_EXPORT_ACTIVE_ONLY:
|
||||
case PROP_PATH_EXPORT_ACTIVE_ONLY:
|
||||
g_value_set_boolean (value, config->path_export_active_only);
|
||||
break;
|
||||
|
||||
case PROP_VECTORS_IMPORT_PATH:
|
||||
case PROP_PATH_IMPORT_PATH:
|
||||
g_value_set_string (value, config->path_import_path);
|
||||
break;
|
||||
case PROP_VECTORS_IMPORT_MERGE:
|
||||
case PROP_PATH_IMPORT_MERGE:
|
||||
g_value_set_boolean (value, config->path_import_merge);
|
||||
break;
|
||||
case PROP_VECTORS_IMPORT_SCALE:
|
||||
case PROP_PATH_IMPORT_SCALE:
|
||||
g_value_set_boolean (value, config->path_import_scale);
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -664,22 +664,22 @@ _("Sets the default channel name for the 'New Channel' dialog.")
|
|||
#define CHANNEL_NEW_COLOR_BLURB \
|
||||
_("Sets the default color and opacity for the 'New Channel' dialog.")
|
||||
|
||||
#define VECTORS_NEW_NAME_BLURB \
|
||||
#define PATH_NEW_NAME_BLURB \
|
||||
_("Sets the default path name for the 'New Path' dialog.")
|
||||
|
||||
#define VECTORS_EXPORT_PATH_BLURB \
|
||||
#define PATH_EXPORT_PATH_BLURB \
|
||||
_("Sets the default folder path for the 'Export Path' dialog.")
|
||||
|
||||
#define VECTORS_EXPORT_ACTIVE_ONLY_BLURB \
|
||||
#define PATH_EXPORT_ACTIVE_ONLY_BLURB \
|
||||
_("Sets the default 'Export the selected paths' state for the 'Export Path' dialog.")
|
||||
|
||||
#define VECTORS_IMPORT_PATH_BLURB \
|
||||
#define PATH_IMPORT_PATH_BLURB \
|
||||
_("Sets the default folder path for the 'Import Path' dialog.")
|
||||
|
||||
#define VECTORS_IMPORT_MERGE_BLURB \
|
||||
#define PATH_IMPORT_MERGE_BLURB \
|
||||
_("Sets the default 'Merge imported paths' state for the 'Import Path' dialog.")
|
||||
|
||||
#define VECTORS_IMPORT_SCALE_BLURB \
|
||||
#define PATH_IMPORT_SCALE_BLURB \
|
||||
_("Sets the default 'Scale imported paths to fit size' state for the 'Import Path' dialog.")
|
||||
|
||||
#define SELECTION_FEATHER_RADIUS_BLURB \
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ gimp_channel_select_polygon (GimpChannel *channel,
|
|||
void
|
||||
gimp_channel_select_path (GimpChannel *channel,
|
||||
const gchar *undo_desc,
|
||||
GimpPath *vectors,
|
||||
GimpPath *path,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
|
|
@ -294,9 +294,9 @@ gimp_channel_select_path (GimpChannel *channel,
|
|||
g_return_if_fail (GIMP_IS_CHANNEL (channel));
|
||||
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (channel)));
|
||||
g_return_if_fail (undo_desc != NULL);
|
||||
g_return_if_fail (GIMP_IS_PATH (vectors));
|
||||
g_return_if_fail (GIMP_IS_PATH (path));
|
||||
|
||||
bezier = gimp_path_get_bezier (vectors);
|
||||
bezier = gimp_path_get_bezier (path);
|
||||
|
||||
if (bezier && bezier->num_data > 4)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ void gimp_channel_select_polygon (GimpChannel *channel,
|
|||
gboolean push_undo);
|
||||
void gimp_channel_select_path (GimpChannel *channel,
|
||||
const gchar *undo_desc,
|
||||
GimpPath *vectors,
|
||||
GimpPath *path,
|
||||
GimpChannelOps op,
|
||||
gboolean antialias,
|
||||
gboolean feather,
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ gimp_drawable_fill_boundary (GimpDrawable *drawable,
|
|||
gboolean
|
||||
gimp_drawable_fill_path (GimpDrawable *drawable,
|
||||
GimpFillOptions *options,
|
||||
GimpPath *vectors,
|
||||
GimpPath *path,
|
||||
gboolean push_undo,
|
||||
GError **error)
|
||||
{
|
||||
|
|
@ -188,14 +188,14 @@ gimp_drawable_fill_path (GimpDrawable *drawable,
|
|||
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
|
||||
g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_FILL_OPTIONS (options), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_PATH (vectors), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_PATH (path), FALSE);
|
||||
g_return_val_if_fail (gimp_fill_options_get_style (options) !=
|
||||
GIMP_FILL_STYLE_PATTERN ||
|
||||
gimp_context_get_pattern (GIMP_CONTEXT (options)) != NULL,
|
||||
FALSE);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
bezier = gimp_path_get_bezier (vectors);
|
||||
bezier = gimp_path_get_bezier (path);
|
||||
|
||||
if (bezier && bezier->num_data > 4)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ void gimp_drawable_fill_boundary (GimpDrawable *drawable,
|
|||
|
||||
gboolean gimp_drawable_fill_path (GimpDrawable *drawable,
|
||||
GimpFillOptions *options,
|
||||
GimpPath *vectors,
|
||||
GimpPath *path,
|
||||
gboolean push_undo,
|
||||
GError **error);
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ gimp_drawable_stroke_boundary (GimpDrawable *drawable,
|
|||
gboolean
|
||||
gimp_drawable_stroke_path (GimpDrawable *drawable,
|
||||
GimpStrokeOptions *options,
|
||||
GimpPath *vectors,
|
||||
GimpPath *path,
|
||||
gboolean push_undo,
|
||||
GError **error)
|
||||
{
|
||||
|
|
@ -85,14 +85,14 @@ gimp_drawable_stroke_path (GimpDrawable *drawable,
|
|||
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
|
||||
g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_STROKE_OPTIONS (options), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_PATH (vectors), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_PATH (path), FALSE);
|
||||
g_return_val_if_fail (gimp_fill_options_get_style (GIMP_FILL_OPTIONS (options)) !=
|
||||
GIMP_FILL_STYLE_PATTERN ||
|
||||
gimp_context_get_pattern (GIMP_CONTEXT (options)) != NULL,
|
||||
FALSE);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
bezier = gimp_path_get_bezier (vectors);
|
||||
bezier = gimp_path_get_bezier (path);
|
||||
|
||||
if (bezier && bezier->num_data >= 2)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ void gimp_drawable_stroke_boundary (GimpDrawable *drawable,
|
|||
|
||||
gboolean gimp_drawable_stroke_path (GimpDrawable *drawable,
|
||||
GimpStrokeOptions *options,
|
||||
GimpPath *vectors,
|
||||
GimpPath *path,
|
||||
gboolean push_undo,
|
||||
GError **error);
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ gimp_image_crop (GimpImage *image,
|
|||
width, height, -x, -y);
|
||||
}
|
||||
|
||||
/* Resize all vectors */
|
||||
/* Resize all paths */
|
||||
for (list = gimp_image_get_path_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ gimp_image_flip_full (GimpImage *image,
|
|||
|
||||
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_FLIP, NULL);
|
||||
|
||||
/* Flip all layers, channels (including selection mask), and vectors */
|
||||
/* Flip all layers, channels (including selection mask), and paths */
|
||||
while ((item = gimp_object_queue_pop (queue)))
|
||||
{
|
||||
gboolean clip = FALSE;
|
||||
|
|
|
|||
|
|
@ -203,14 +203,14 @@ gimp_image_pick_path (GimpImage *image,
|
|||
|
||||
for (list = all_path; list; list = g_list_next (list))
|
||||
{
|
||||
GimpPath *vectors = list->data;
|
||||
GimpPath *path = list->data;
|
||||
|
||||
if (gimp_item_is_visible (GIMP_ITEM (vectors)))
|
||||
if (gimp_item_is_visible (GIMP_ITEM (path)))
|
||||
{
|
||||
GimpStroke *stroke = NULL;
|
||||
GimpCoords coords = GIMP_COORDS_DEFAULT_VALUES;
|
||||
|
||||
while ((stroke = gimp_path_stroke_get_next (vectors, stroke)))
|
||||
while ((stroke = gimp_path_stroke_get_next (path, stroke)))
|
||||
{
|
||||
gdouble dist;
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ gimp_image_pick_path (GimpImage *image,
|
|||
dist < MIN (epsilon_y, mindist))
|
||||
{
|
||||
mindist = dist;
|
||||
ret = vectors;
|
||||
ret = path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,14 +112,14 @@ struct _GimpImagePrivate
|
|||
/* Layer/Channel attributes */
|
||||
GimpItemTree *layers; /* the tree of layers */
|
||||
GimpItemTree *channels; /* the tree of masks */
|
||||
GimpItemTree *vectors; /* the tree of vectors */
|
||||
GimpItemTree *paths; /* the tree of paths */
|
||||
GSList *layer_stack; /* the layers in MRU order */
|
||||
|
||||
GList *hidden_items; /* internal process-only items */
|
||||
|
||||
GList *stored_layer_sets;
|
||||
GList *stored_channel_sets;
|
||||
GList *stored_vectors_sets;
|
||||
GList *stored_path_sets;
|
||||
|
||||
GQuark layer_offset_x_handler;
|
||||
GQuark layer_offset_y_handler;
|
||||
|
|
|
|||
|
|
@ -142,13 +142,13 @@ gimp_image_resize_with_layers (GimpImage *image,
|
|||
}
|
||||
|
||||
g_list_free (resize_layers);
|
||||
|
||||
|
||||
gimp_object_queue_push (queue, gimp_image_get_mask (image));
|
||||
gimp_object_queue_push_container (queue, gimp_image_get_channels (image));
|
||||
gimp_object_queue_push_container (queue, gimp_image_get_paths (image));
|
||||
|
||||
/* Resize all resize_layers, channels (including selection mask), and
|
||||
* vectors
|
||||
* paths
|
||||
*/
|
||||
while ((item = gimp_object_queue_pop (queue)))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ gimp_image_scale (GimpImage *image,
|
|||
"height", new_height,
|
||||
NULL);
|
||||
|
||||
/* Scale all layers, channels (including selection mask), and vectors */
|
||||
/* Scale all layers, channels (including selection mask), and paths */
|
||||
while ((item = gimp_object_queue_pop (queue)))
|
||||
{
|
||||
if (! gimp_item_scale_by_factors (item,
|
||||
|
|
|
|||
|
|
@ -728,9 +728,9 @@ gimp_image_snap_point (GimpImage *image,
|
|||
|
||||
for (iter = selected_path; iter; iter = iter->next)
|
||||
{
|
||||
GimpPath *vectors = iter->data;
|
||||
GimpPath *path = iter->data;
|
||||
|
||||
while ((stroke = gimp_path_stroke_get_next (vectors, stroke)))
|
||||
while ((stroke = gimp_path_stroke_get_next (path, stroke)))
|
||||
{
|
||||
GimpCoords nearest;
|
||||
|
||||
|
|
@ -977,9 +977,9 @@ gimp_image_snap_rectangle (GimpImage *image,
|
|||
|
||||
for (iter = selected_path; iter; iter = iter->next)
|
||||
{
|
||||
GimpPath *vectors = iter->data;
|
||||
GimpPath *path = iter->data;
|
||||
|
||||
while ((stroke = gimp_path_stroke_get_next (vectors, stroke)))
|
||||
while ((stroke = gimp_path_stroke_get_next (path, stroke)))
|
||||
{
|
||||
GimpCoords nearest;
|
||||
gdouble dist;
|
||||
|
|
|
|||
|
|
@ -799,14 +799,14 @@ gimp_image_init (GimpImage *image)
|
|||
private->channels = gimp_item_tree_new (image,
|
||||
GIMP_TYPE_DRAWABLE_STACK,
|
||||
GIMP_TYPE_CHANNEL);
|
||||
private->vectors = gimp_item_tree_new (image,
|
||||
private->paths = gimp_item_tree_new (image,
|
||||
GIMP_TYPE_ITEM_STACK,
|
||||
GIMP_TYPE_PATH);
|
||||
private->layer_stack = NULL;
|
||||
|
||||
private->stored_layer_sets = NULL;
|
||||
private->stored_channel_sets = NULL;
|
||||
private->stored_vectors_sets = NULL;
|
||||
private->stored_path_sets = NULL;
|
||||
|
||||
g_signal_connect (private->projection, "notify::buffer",
|
||||
G_CALLBACK (gimp_image_projection_buffer_notify),
|
||||
|
|
@ -818,7 +818,7 @@ gimp_image_init (GimpImage *image)
|
|||
g_signal_connect (private->channels, "notify::selected-items",
|
||||
G_CALLBACK (gimp_image_selected_channels_notify),
|
||||
image);
|
||||
g_signal_connect (private->vectors, "notify::selected-items",
|
||||
g_signal_connect (private->paths, "notify::selected-items",
|
||||
G_CALLBACK (gimp_image_selected_paths_notify),
|
||||
image);
|
||||
|
||||
|
|
@ -1102,9 +1102,9 @@ gimp_image_dispose (GObject *object)
|
|||
|
||||
gimp_image_undo_free (image);
|
||||
|
||||
g_list_free_full (private->stored_layer_sets, g_object_unref);
|
||||
g_list_free_full (private->stored_layer_sets, g_object_unref);
|
||||
g_list_free_full (private->stored_channel_sets, g_object_unref);
|
||||
g_list_free_full (private->stored_vectors_sets, g_object_unref);
|
||||
g_list_free_full (private->stored_path_sets, g_object_unref);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (private->layers->container,
|
||||
gimp_image_invalidate,
|
||||
|
|
@ -1141,7 +1141,7 @@ gimp_image_dispose (GObject *object)
|
|||
|
||||
g_object_run_dispose (G_OBJECT (private->layers));
|
||||
g_object_run_dispose (G_OBJECT (private->channels));
|
||||
g_object_run_dispose (G_OBJECT (private->vectors));
|
||||
g_object_run_dispose (G_OBJECT (private->paths));
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
|
@ -1170,7 +1170,7 @@ gimp_image_finalize (GObject *object)
|
|||
g_clear_object (&private->untitled_file);
|
||||
g_clear_object (&private->layers);
|
||||
g_clear_object (&private->channels);
|
||||
g_clear_object (&private->vectors);
|
||||
g_clear_object (&private->paths);
|
||||
g_clear_object (&private->quick_mask_color);
|
||||
|
||||
if (private->layer_stack)
|
||||
|
|
@ -1286,7 +1286,7 @@ gimp_image_get_memsize (GimpObject *object,
|
|||
gui_size);
|
||||
memsize += gimp_object_get_memsize (GIMP_OBJECT (private->channels),
|
||||
gui_size);
|
||||
memsize += gimp_object_get_memsize (GIMP_OBJECT (private->vectors),
|
||||
memsize += gimp_object_get_memsize (GIMP_OBJECT (private->paths),
|
||||
gui_size);
|
||||
|
||||
memsize += gimp_g_slist_get_memsize (private->layer_stack, 0);
|
||||
|
|
@ -3040,9 +3040,9 @@ gimp_image_get_xcf_version (GimpImage *image,
|
|||
items = gimp_image_get_path_list (image);
|
||||
for (list = items; list; list = g_list_next (list))
|
||||
{
|
||||
GimpPath *vectors = GIMP_PATH (list->data);
|
||||
GimpPath *path = GIMP_PATH (list->data);
|
||||
|
||||
if (gimp_item_get_color_tag (GIMP_ITEM (vectors)) != GIMP_COLOR_TAG_NONE)
|
||||
if (gimp_item_get_color_tag (GIMP_ITEM (path)) != GIMP_COLOR_TAG_NONE)
|
||||
{
|
||||
ADD_REASON (g_strdup_printf (_("Storing color tags in path was "
|
||||
"added in %s"), "GIMP 3.0.0"));
|
||||
|
|
@ -4616,7 +4616,7 @@ gimp_image_get_path_tree (GimpImage *image)
|
|||
{
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
|
||||
|
||||
return GIMP_IMAGE_GET_PRIVATE (image)->vectors;
|
||||
return GIMP_IMAGE_GET_PRIVATE (image)->paths;
|
||||
}
|
||||
|
||||
GimpContainer *
|
||||
|
|
@ -4640,7 +4640,7 @@ gimp_image_get_paths (GimpImage *image)
|
|||
{
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
|
||||
|
||||
return GIMP_IMAGE_GET_PRIVATE (image)->vectors->container;
|
||||
return GIMP_IMAGE_GET_PRIVATE (image)->paths->container;
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
@ -4913,7 +4913,7 @@ gimp_image_get_selected_paths (GimpImage *image)
|
|||
|
||||
private = GIMP_IMAGE_GET_PRIVATE (image);
|
||||
|
||||
return gimp_item_tree_get_selected_items (private->vectors);
|
||||
return gimp_item_tree_get_selected_items (private->paths);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -5040,7 +5040,7 @@ gimp_image_set_selected_paths (GimpImage *image,
|
|||
|
||||
private = GIMP_IMAGE_GET_PRIVATE (image);
|
||||
|
||||
gimp_item_tree_set_selected_items (private->vectors, g_list_copy (paths));
|
||||
gimp_item_tree_set_selected_items (private->paths, g_list_copy (paths));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -5541,7 +5541,7 @@ gimp_image_store_item_set (GimpImage *image,
|
|||
else if (item_type == GIMP_TYPE_CHANNEL)
|
||||
stored_sets = &private->stored_channel_sets;
|
||||
else if (item_type == GIMP_TYPE_PATH)
|
||||
stored_sets = &private->stored_vectors_sets;
|
||||
stored_sets = &private->stored_path_sets;
|
||||
else
|
||||
g_return_if_reached ();
|
||||
|
||||
|
|
@ -5602,7 +5602,7 @@ gimp_image_unlink_item_set (GimpImage *image,
|
|||
else if (item_type == GIMP_TYPE_CHANNEL)
|
||||
stored_sets = &private->stored_channel_sets;
|
||||
else if (item_type == GIMP_TYPE_PATH)
|
||||
stored_sets = &private->stored_vectors_sets;
|
||||
stored_sets = &private->stored_path_sets;
|
||||
else
|
||||
g_return_val_if_reached (FALSE);
|
||||
|
||||
|
|
@ -5641,7 +5641,7 @@ gimp_image_get_stored_item_sets (GimpImage *image,
|
|||
else if (item_type == GIMP_TYPE_CHANNEL)
|
||||
return private->stored_channel_sets;
|
||||
else if (item_type == GIMP_TYPE_PATH)
|
||||
return private->stored_vectors_sets;
|
||||
return private->stored_path_sets;
|
||||
|
||||
g_return_val_if_reached (FALSE);
|
||||
}
|
||||
|
|
@ -5998,7 +5998,7 @@ gimp_image_add_path (GimpImage *image,
|
|||
|
||||
/* item and parent are type-checked in GimpItemTree
|
||||
*/
|
||||
if (! gimp_item_tree_get_insert_pos (private->vectors,
|
||||
if (! gimp_item_tree_get_insert_pos (private->paths,
|
||||
(GimpItem *) path,
|
||||
(GimpItem **) &parent,
|
||||
&position))
|
||||
|
|
@ -6009,7 +6009,7 @@ gimp_image_add_path (GimpImage *image,
|
|||
path,
|
||||
gimp_image_get_selected_paths (image));
|
||||
|
||||
gimp_item_tree_add_item (private->vectors, GIMP_ITEM (path),
|
||||
gimp_item_tree_add_item (private->paths, GIMP_ITEM (path),
|
||||
GIMP_ITEM (parent), position);
|
||||
|
||||
if (path != NULL)
|
||||
|
|
@ -6055,7 +6055,7 @@ gimp_image_remove_path (GimpImage *image,
|
|||
|
||||
g_object_ref (path);
|
||||
|
||||
new_selected = gimp_item_tree_remove_item (private->vectors,
|
||||
new_selected = gimp_item_tree_remove_item (private->paths,
|
||||
GIMP_ITEM (path),
|
||||
new_selected);
|
||||
|
||||
|
|
|
|||
|
|
@ -766,10 +766,10 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
|
|||
}
|
||||
|
||||
GtkWidget *
|
||||
dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
GimpUIManager *ui_manager,
|
||||
gint view_size)
|
||||
dialogs_path_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
GimpUIManager *ui_manager,
|
||||
gint view_size)
|
||||
{
|
||||
if (view_size < 1)
|
||||
view_size = context->gimp->config->layer_preview_size;
|
||||
|
|
|
|||
|
|
@ -248,10 +248,6 @@ GtkWidget * dialogs_channel_list_view_new (GimpDialogFactory *factory,
|
|||
GimpContext *context,
|
||||
GimpUIManager *ui_manager,
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
GimpUIManager *ui_manager,
|
||||
gint view_size);
|
||||
GtkWidget * dialogs_path_list_view_new (GimpDialogFactory *factory,
|
||||
GimpContext *context,
|
||||
GimpUIManager *ui_manager,
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ static const GimpDialogFactoryEntry entries[] =
|
|||
DOCKABLE ("gimp-vectors-list",
|
||||
N_("Paths"), NULL, GIMP_ICON_DIALOG_PATHS,
|
||||
GIMP_HELP_PATH_DIALOG,
|
||||
dialogs_vectors_list_view_new, 0, FALSE),
|
||||
dialogs_path_list_view_new, 0, FALSE),
|
||||
DOCKABLE ("gimp-indexed-palette",
|
||||
N_("Colormap"), NULL, GIMP_ICON_COLORMAP,
|
||||
GIMP_HELP_INDEXED_PALETTE_DIALOG,
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ typedef struct _PathImportDialog PathImportDialog;
|
|||
struct _PathImportDialog
|
||||
{
|
||||
GimpImage *image;
|
||||
gboolean merge_path;
|
||||
gboolean scale_path;
|
||||
gboolean merge_paths;
|
||||
gboolean scale_paths;
|
||||
GimpPathImportCallback callback;
|
||||
gpointer user_data;
|
||||
};
|
||||
|
|
@ -59,13 +59,13 @@ static void path_import_dialog_response (GtkWidget *dialog,
|
|||
/* public function */
|
||||
|
||||
GtkWidget *
|
||||
path_import_dialog_new (GimpImage *image,
|
||||
GtkWidget *parent,
|
||||
GFile *import_folder,
|
||||
gboolean merge_path,
|
||||
gboolean scale_path,
|
||||
GimpPathImportCallback callback,
|
||||
gpointer user_data)
|
||||
path_import_dialog_new (GimpImage *image,
|
||||
GtkWidget *parent,
|
||||
GFile *import_folder,
|
||||
gboolean merge_paths,
|
||||
gboolean scale_paths,
|
||||
GimpPathImportCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
PathImportDialog *private;
|
||||
GtkWidget *dialog;
|
||||
|
|
@ -81,11 +81,11 @@ path_import_dialog_new (GimpImage *image,
|
|||
|
||||
private = g_slice_new0 (PathImportDialog);
|
||||
|
||||
private->image = image;
|
||||
private->merge_path = merge_path;
|
||||
private->scale_path = scale_path;
|
||||
private->callback = callback;
|
||||
private->user_data = user_data;
|
||||
private->image = image;
|
||||
private->merge_paths = merge_paths;
|
||||
private->scale_paths = scale_paths;
|
||||
private->callback = callback;
|
||||
private->user_data = user_data;
|
||||
|
||||
dialog = gtk_file_chooser_dialog_new (_("Import Paths from SVG"), NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
|
|
@ -149,24 +149,24 @@ path_import_dialog_new (GimpImage *image,
|
|||
|
||||
button = gtk_check_button_new_with_mnemonic (_("_Merge imported paths"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
private->merge_path);
|
||||
private->merge_paths);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
g_signal_connect (button, "toggled",
|
||||
G_CALLBACK (gimp_toggle_button_update),
|
||||
&private->merge_path);
|
||||
&private->merge_paths);
|
||||
|
||||
button = gtk_check_button_new_with_mnemonic (_("_Scale imported paths "
|
||||
"to fit image"));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
private->scale_path);
|
||||
private->scale_paths);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
g_signal_connect (button, "toggled",
|
||||
G_CALLBACK (gimp_toggle_button_update),
|
||||
&private->scale_path);
|
||||
&private->scale_paths);
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
|
@ -211,8 +211,8 @@ path_import_dialog_response (GtkWidget *dialog,
|
|||
private->image,
|
||||
file,
|
||||
folder,
|
||||
private->merge_path,
|
||||
private->scale_path,
|
||||
private->merge_paths,
|
||||
private->scale_paths,
|
||||
private->user_data);
|
||||
|
||||
if (folder)
|
||||
|
|
|
|||
|
|
@ -23,16 +23,16 @@ typedef void (* GimpPathImportCallback) (GtkWidget *dialog,
|
|||
GimpImage *image,
|
||||
GFile *file,
|
||||
GFile *import_folder,
|
||||
gboolean merge_vectors,
|
||||
gboolean scale_vectors,
|
||||
gboolean merge_paths,
|
||||
gboolean scale_paths,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
GtkWidget * path_import_dialog_new (GimpImage *image,
|
||||
GtkWidget *parent,
|
||||
GFile *import_folder,
|
||||
gboolean merge_path,
|
||||
gboolean scale_path,
|
||||
gboolean merge_paths,
|
||||
gboolean scale_paths,
|
||||
GimpPathImportCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ gimp_path_style_get_type (void)
|
|||
static const GEnumValue values[] =
|
||||
{
|
||||
{ GIMP_PATH_STYLE_DEFAULT, "GIMP_PATH_STYLE_DEFAULT", "default" },
|
||||
{ GIMP_PATH_STYLE_VECTORS, "GIMP_PATH_STYLE_VECTORS", "vectors" },
|
||||
{ GIMP_PATH_STYLE_PATH, "GIMP_PATH_STYLE_PATH", "path" },
|
||||
{ GIMP_PATH_STYLE_OUTLINE, "GIMP_PATH_STYLE_OUTLINE", "outline" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
|
@ -319,7 +319,7 @@ gimp_path_style_get_type (void)
|
|||
static const GimpEnumDesc descs[] =
|
||||
{
|
||||
{ GIMP_PATH_STYLE_DEFAULT, "GIMP_PATH_STYLE_DEFAULT", NULL },
|
||||
{ GIMP_PATH_STYLE_VECTORS, "GIMP_PATH_STYLE_VECTORS", NULL },
|
||||
{ GIMP_PATH_STYLE_PATH, "GIMP_PATH_STYLE_PATH", NULL },
|
||||
{ GIMP_PATH_STYLE_OUTLINE, "GIMP_PATH_STYLE_OUTLINE", NULL },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ GType gimp_path_style_get_type (void) G_GNUC_CONST;
|
|||
typedef enum
|
||||
{
|
||||
GIMP_PATH_STYLE_DEFAULT,
|
||||
GIMP_PATH_STYLE_VECTORS,
|
||||
GIMP_PATH_STYLE_PATH,
|
||||
GIMP_PATH_STYLE_OUTLINE
|
||||
} GimpPathStyle;
|
||||
|
||||
|
|
|
|||
|
|
@ -80,11 +80,11 @@ static GeglColor *selection_out_bg;
|
|||
static GeglColor *selection_in_fg;
|
||||
static GeglColor *selection_in_bg;
|
||||
|
||||
static GeglColor *vectors_normal_bg;
|
||||
static GeglColor *vectors_normal_fg;
|
||||
static GeglColor *path_normal_bg;
|
||||
static GeglColor *path_normal_fg;
|
||||
|
||||
static GeglColor *vectors_active_bg;
|
||||
static GeglColor *vectors_active_fg;
|
||||
static GeglColor *path_active_bg;
|
||||
static GeglColor *path_active_fg;
|
||||
|
||||
static GeglColor *outline_bg;
|
||||
static GeglColor *outline_fg;
|
||||
|
|
@ -153,15 +153,15 @@ gimp_canvas_styles_init (void)
|
|||
selection_in_fg = gegl_color_new ("black");
|
||||
selection_in_bg = gegl_color_new ("white");
|
||||
|
||||
vectors_normal_bg = gegl_color_new ("white");
|
||||
gimp_color_set_alpha (vectors_normal_bg, 0.6);
|
||||
vectors_normal_fg = gegl_color_new ("blue");
|
||||
gimp_color_set_alpha (vectors_normal_fg, 0.8);
|
||||
path_normal_bg = gegl_color_new ("white");
|
||||
gimp_color_set_alpha (path_normal_bg, 0.6);
|
||||
path_normal_fg = gegl_color_new ("blue");
|
||||
gimp_color_set_alpha (path_normal_fg, 0.8);
|
||||
|
||||
vectors_active_bg = gegl_color_new ("white");
|
||||
gimp_color_set_alpha (vectors_active_bg, 0.6);
|
||||
vectors_active_fg = gegl_color_new ("red");
|
||||
gimp_color_set_alpha (vectors_active_fg, 0.8);
|
||||
path_active_bg = gegl_color_new ("white");
|
||||
gimp_color_set_alpha (path_active_bg, 0.6);
|
||||
path_active_fg = gegl_color_new ("red");
|
||||
gimp_color_set_alpha (path_active_fg, 0.8);
|
||||
|
||||
outline_bg = gegl_color_new ("white");
|
||||
gimp_color_set_alpha (outline_bg, 0.6);
|
||||
|
|
@ -211,10 +211,10 @@ gimp_canvas_styles_exit (void)
|
|||
g_object_unref (selection_out_bg);
|
||||
g_object_unref (selection_in_fg);
|
||||
g_object_unref (selection_in_bg);
|
||||
g_object_unref (vectors_normal_bg);
|
||||
g_object_unref (vectors_normal_fg);
|
||||
g_object_unref (vectors_active_bg);
|
||||
g_object_unref (vectors_active_fg);
|
||||
g_object_unref (path_normal_bg);
|
||||
g_object_unref (path_normal_fg);
|
||||
g_object_unref (path_active_bg);
|
||||
g_object_unref (path_active_fg);
|
||||
g_object_unref (outline_bg);
|
||||
g_object_unref (outline_fg);
|
||||
g_object_unref (passe_partout);
|
||||
|
|
@ -519,9 +519,9 @@ gimp_canvas_set_selection_in_style (GtkWidget *canvas,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_canvas_set_vectors_bg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
gimp_canvas_set_path_bg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
{
|
||||
GimpColorConfig *config;
|
||||
|
||||
|
|
@ -532,15 +532,15 @@ gimp_canvas_set_vectors_bg_style (GtkWidget *canvas,
|
|||
|
||||
config = GIMP_CORE_CONFIG (GIMP_CANVAS (canvas)->config)->color_management;
|
||||
if (active)
|
||||
gimp_cairo_set_source_color (cr, vectors_active_bg, config, FALSE, canvas);
|
||||
gimp_cairo_set_source_color (cr, path_active_bg, config, FALSE, canvas);
|
||||
else
|
||||
gimp_cairo_set_source_color (cr, vectors_normal_bg, config, FALSE, canvas);
|
||||
gimp_cairo_set_source_color (cr, path_normal_bg, config, FALSE, canvas);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_canvas_set_vectors_fg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
gimp_canvas_set_path_fg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
{
|
||||
GimpColorConfig *config;
|
||||
|
||||
|
|
@ -551,9 +551,9 @@ gimp_canvas_set_vectors_fg_style (GtkWidget *canvas,
|
|||
|
||||
config = GIMP_CORE_CONFIG (GIMP_CANVAS (canvas)->config)->color_management;
|
||||
if (active)
|
||||
gimp_cairo_set_source_color (cr, vectors_active_fg, config, FALSE, canvas);
|
||||
gimp_cairo_set_source_color (cr, path_active_fg, config, FALSE, canvas);
|
||||
else
|
||||
gimp_cairo_set_source_color (cr, vectors_normal_fg, config, FALSE, canvas);
|
||||
gimp_cairo_set_source_color (cr, path_normal_fg, config, FALSE, canvas);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -61,10 +61,10 @@ void gimp_canvas_set_selection_in_style (GtkWidget *canvas,
|
|||
gint index,
|
||||
gdouble offset_x,
|
||||
gdouble offset_y);
|
||||
void gimp_canvas_set_vectors_bg_style (GtkWidget *canvas,
|
||||
void gimp_canvas_set_path_bg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active);
|
||||
void gimp_canvas_set_vectors_fg_style (GtkWidget *canvas,
|
||||
void gimp_canvas_set_path_fg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active);
|
||||
void gimp_canvas_set_outline_bg_style (GtkWidget *canvas,
|
||||
|
|
|
|||
|
|
@ -104,15 +104,15 @@ gimp_canvas_item_on_handle (GimpCanvasItem *item,
|
|||
}
|
||||
|
||||
gboolean
|
||||
gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item,
|
||||
GimpPath *vectors,
|
||||
const GimpCoords *coord,
|
||||
gint width,
|
||||
gint height,
|
||||
GimpAnchorType preferred,
|
||||
gboolean exclusive,
|
||||
GimpAnchor **ret_anchor,
|
||||
GimpStroke **ret_stroke)
|
||||
gimp_canvas_item_on_path_handle (GimpCanvasItem *item,
|
||||
GimpPath *path,
|
||||
const GimpCoords *coord,
|
||||
gint width,
|
||||
gint height,
|
||||
GimpAnchorType preferred,
|
||||
gboolean exclusive,
|
||||
GimpAnchor **ret_anchor,
|
||||
GimpStroke **ret_stroke)
|
||||
{
|
||||
GimpStroke *stroke = NULL;
|
||||
GimpStroke *pref_stroke = NULL;
|
||||
|
|
@ -123,13 +123,13 @@ gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item,
|
|||
gdouble mindist = -1;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_CANVAS_ITEM (item), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_PATH (vectors), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_PATH (path), FALSE);
|
||||
g_return_val_if_fail (coord != NULL, FALSE);
|
||||
|
||||
if (ret_anchor) *ret_anchor = NULL;
|
||||
if (ret_stroke) *ret_stroke = NULL;
|
||||
|
||||
while ((stroke = gimp_path_stroke_get_next (vectors, stroke)))
|
||||
while ((stroke = gimp_path_stroke_get_next (path, stroke)))
|
||||
{
|
||||
GList *anchor_list;
|
||||
GList *list;
|
||||
|
|
@ -220,16 +220,16 @@ gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item,
|
|||
}
|
||||
|
||||
gboolean
|
||||
gimp_canvas_item_on_vectors_curve (GimpCanvasItem *item,
|
||||
GimpPath *vectors,
|
||||
const GimpCoords *coord,
|
||||
gint width,
|
||||
gint height,
|
||||
GimpCoords *ret_coords,
|
||||
gdouble *ret_pos,
|
||||
GimpAnchor **ret_segment_start,
|
||||
GimpAnchor **ret_segment_end,
|
||||
GimpStroke **ret_stroke)
|
||||
gimp_canvas_item_on_path_curve (GimpCanvasItem *item,
|
||||
GimpPath *path,
|
||||
const GimpCoords *coord,
|
||||
gint width,
|
||||
gint height,
|
||||
GimpCoords *ret_coords,
|
||||
gdouble *ret_pos,
|
||||
GimpAnchor **ret_segment_start,
|
||||
GimpAnchor **ret_segment_end,
|
||||
GimpStroke **ret_stroke)
|
||||
{
|
||||
GimpStroke *stroke = NULL;
|
||||
GimpAnchor *segment_start;
|
||||
|
|
@ -239,7 +239,7 @@ gimp_canvas_item_on_vectors_curve (GimpCanvasItem *item,
|
|||
gdouble min_dist, cur_dist, cur_pos;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_CANVAS_ITEM (item), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_PATH (vectors), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_PATH (path), FALSE);
|
||||
g_return_val_if_fail (coord != NULL, FALSE);
|
||||
|
||||
if (ret_coords) *ret_coords = *coord;
|
||||
|
|
@ -250,7 +250,7 @@ gimp_canvas_item_on_vectors_curve (GimpCanvasItem *item,
|
|||
|
||||
min_dist = -1.0;
|
||||
|
||||
while ((stroke = gimp_path_stroke_get_next (vectors, stroke)))
|
||||
while ((stroke = gimp_path_stroke_get_next (path, stroke)))
|
||||
{
|
||||
cur_dist = gimp_stroke_nearest_point_get (stroke, coord, 1.0,
|
||||
&cur_coords,
|
||||
|
|
@ -321,22 +321,22 @@ gimp_canvas_item_on_path (GimpCanvasItem *item,
|
|||
|
||||
for (list = all_path; list; list = g_list_next (list))
|
||||
{
|
||||
GimpPath *vectors = list->data;
|
||||
GimpPath *path = list->data;
|
||||
|
||||
if (! gimp_item_get_visible (GIMP_ITEM (vectors)))
|
||||
if (! gimp_item_get_visible (GIMP_ITEM (path)))
|
||||
continue;
|
||||
|
||||
if (gimp_canvas_item_on_vectors_curve (item,
|
||||
vectors, coords,
|
||||
width, height,
|
||||
ret_coords,
|
||||
ret_pos,
|
||||
ret_segment_start,
|
||||
ret_segment_end,
|
||||
ret_stroke))
|
||||
if (gimp_canvas_item_on_path_curve (item,
|
||||
path, coords,
|
||||
width, height,
|
||||
ret_coords,
|
||||
ret_pos,
|
||||
ret_segment_start,
|
||||
ret_segment_end,
|
||||
ret_stroke))
|
||||
{
|
||||
if (ret_path)
|
||||
*ret_path = vectors;
|
||||
*ret_path = path;
|
||||
|
||||
g_list_free (all_path);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ gboolean gimp_canvas_item_on_handle (GimpCanvasItem *item,
|
|||
gint height,
|
||||
GimpHandleAnchor anchor);
|
||||
|
||||
gboolean gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item,
|
||||
GimpPath *vectors,
|
||||
gboolean gimp_canvas_item_on_path_handle (GimpCanvasItem *item,
|
||||
GimpPath *path,
|
||||
const GimpCoords *coord,
|
||||
gint width,
|
||||
gint height,
|
||||
|
|
@ -41,8 +41,8 @@ gboolean gimp_canvas_item_on_vectors_handle (GimpCanvasItem *item,
|
|||
gboolean exclusive,
|
||||
GimpAnchor **ret_anchor,
|
||||
GimpStroke **ret_stroke);
|
||||
gboolean gimp_canvas_item_on_vectors_curve (GimpCanvasItem *item,
|
||||
GimpPath *vectors,
|
||||
gboolean gimp_canvas_item_on_path_curve (GimpCanvasItem *item,
|
||||
GimpPath *path,
|
||||
const GimpCoords *coord,
|
||||
gint width,
|
||||
gint height,
|
||||
|
|
|
|||
|
|
@ -295,13 +295,13 @@ gimp_canvas_path_stroke (GimpCanvasItem *item,
|
|||
|
||||
switch (private->path_style)
|
||||
{
|
||||
case GIMP_PATH_STYLE_VECTORS:
|
||||
case GIMP_PATH_STYLE_PATH:
|
||||
active = gimp_canvas_item_get_highlight (item);
|
||||
|
||||
gimp_canvas_set_vectors_bg_style (canvas, cr, active);
|
||||
gimp_canvas_set_path_bg_style (canvas, cr, active);
|
||||
cairo_stroke_preserve (cr);
|
||||
|
||||
gimp_canvas_set_vectors_fg_style (canvas, cr, active);
|
||||
gimp_canvas_set_path_fg_style (canvas, cr, active);
|
||||
cairo_stroke (cr);
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -445,8 +445,8 @@ gimp_display_shell_get_snap_to_canvas (GimpDisplayShell *shell)
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_snap_to_vectors (GimpDisplayShell *shell,
|
||||
gboolean snap)
|
||||
gimp_display_shell_set_snap_to_path (GimpDisplayShell *shell,
|
||||
gboolean snap)
|
||||
{
|
||||
GimpDisplayOptions *options;
|
||||
|
||||
|
|
@ -458,7 +458,7 @@ gimp_display_shell_set_snap_to_vectors (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
gboolean
|
||||
gimp_display_shell_get_snap_to_vectors (GimpDisplayShell *shell)
|
||||
gimp_display_shell_get_snap_to_path (GimpDisplayShell *shell)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
|
||||
|
||||
|
|
|
|||
|
|
@ -74,9 +74,9 @@ void gimp_display_shell_set_snap_to_canvas (GimpDisplayShell *
|
|||
gboolean snap);
|
||||
gboolean gimp_display_shell_get_snap_to_canvas (GimpDisplayShell *shell);
|
||||
|
||||
void gimp_display_shell_set_snap_to_vectors (GimpDisplayShell *shell,
|
||||
void gimp_display_shell_set_snap_to_path (GimpDisplayShell *shell,
|
||||
gboolean snap);
|
||||
gboolean gimp_display_shell_get_snap_to_vectors (GimpDisplayShell *shell);
|
||||
gboolean gimp_display_shell_get_snap_to_path (GimpDisplayShell *shell);
|
||||
|
||||
void gimp_display_shell_set_snap_to_bbox (GimpDisplayShell *shell,
|
||||
gboolean snap);
|
||||
|
|
|
|||
|
|
@ -303,15 +303,15 @@ gimp_display_shell_connect (GimpDisplayShell *shell)
|
|||
G_CALLBACK (gimp_display_shell_active_paths_handler),
|
||||
shell);
|
||||
|
||||
shell->vectors_freeze_handler =
|
||||
shell->path_freeze_handler =
|
||||
gimp_tree_handler_connect (paths, "freeze",
|
||||
G_CALLBACK (gimp_display_shell_path_freeze_handler),
|
||||
shell);
|
||||
shell->vectors_thaw_handler =
|
||||
shell->path_thaw_handler =
|
||||
gimp_tree_handler_connect (paths, "thaw",
|
||||
G_CALLBACK (gimp_display_shell_path_thaw_handler),
|
||||
shell);
|
||||
shell->vectors_visible_handler =
|
||||
shell->path_visible_handler =
|
||||
gimp_tree_handler_connect (paths, "visibility-changed",
|
||||
G_CALLBACK (gimp_display_shell_path_visible_handler),
|
||||
shell);
|
||||
|
|
@ -499,14 +499,14 @@ gimp_display_shell_disconnect (GimpDisplayShell *shell)
|
|||
gimp_display_shell_path_add_handler,
|
||||
shell);
|
||||
|
||||
gimp_tree_handler_disconnect (shell->vectors_visible_handler);
|
||||
shell->vectors_visible_handler = NULL;
|
||||
gimp_tree_handler_disconnect (shell->path_visible_handler);
|
||||
shell->path_visible_handler = NULL;
|
||||
|
||||
gimp_tree_handler_disconnect (shell->vectors_thaw_handler);
|
||||
shell->vectors_thaw_handler = NULL;
|
||||
gimp_tree_handler_disconnect (shell->path_thaw_handler);
|
||||
shell->path_thaw_handler = NULL;
|
||||
|
||||
gimp_tree_handler_disconnect (shell->vectors_freeze_handler);
|
||||
shell->vectors_freeze_handler = NULL;
|
||||
gimp_tree_handler_disconnect (shell->path_freeze_handler);
|
||||
shell->path_freeze_handler = NULL;
|
||||
|
||||
g_signal_handlers_disconnect_by_func (image,
|
||||
gimp_display_shell_active_paths_handler,
|
||||
|
|
@ -516,7 +516,7 @@ gimp_display_shell_disconnect (GimpDisplayShell *shell)
|
|||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
gimp_canvas_proxy_group_remove_item (GIMP_CANVAS_PROXY_GROUP (shell->vectors),
|
||||
gimp_canvas_proxy_group_remove_item (GIMP_CANVAS_PROXY_GROUP (shell->paths),
|
||||
list->data);
|
||||
}
|
||||
|
||||
|
|
@ -966,7 +966,7 @@ static void
|
|||
gimp_display_shell_active_paths_handler (GimpImage *image,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors);
|
||||
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->paths);
|
||||
GList *selected = gimp_image_get_selected_paths (image);
|
||||
GList *list;
|
||||
|
||||
|
|
@ -995,7 +995,7 @@ static void
|
|||
gimp_display_shell_path_thaw_handler (GimpPath *path,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors);
|
||||
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->paths);
|
||||
GimpCanvasItem *item;
|
||||
|
||||
item = gimp_canvas_proxy_group_get_item (group, path);
|
||||
|
|
@ -1007,7 +1007,7 @@ static void
|
|||
gimp_display_shell_path_visible_handler (GimpPath *path,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors);
|
||||
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->paths);
|
||||
GimpCanvasItem *item;
|
||||
|
||||
item = gimp_canvas_proxy_group_get_item (group, path);
|
||||
|
|
@ -1021,14 +1021,14 @@ gimp_display_shell_path_add_handler (GimpContainer *container,
|
|||
GimpPath *path,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors);
|
||||
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->paths);
|
||||
GimpCanvasItem *item;
|
||||
|
||||
item = gimp_canvas_path_new (shell,
|
||||
gimp_path_get_bezier (path),
|
||||
0, 0,
|
||||
FALSE,
|
||||
GIMP_PATH_STYLE_VECTORS);
|
||||
GIMP_PATH_STYLE_PATH);
|
||||
gimp_canvas_item_set_visible (item,
|
||||
gimp_item_get_visible (GIMP_ITEM (path)));
|
||||
|
||||
|
|
@ -1041,7 +1041,7 @@ gimp_display_shell_path_remove_handler (GimpContainer *container,
|
|||
GimpPath *path,
|
||||
GimpDisplayShell *shell)
|
||||
{
|
||||
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->vectors);
|
||||
GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->paths);
|
||||
|
||||
gimp_canvas_proxy_group_remove_item (group, path);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,9 +67,9 @@ gimp_display_shell_items_init (GimpDisplayShell *shell)
|
|||
gimp_display_shell_add_item (shell, shell->preview_items);
|
||||
g_object_unref (shell->preview_items);
|
||||
|
||||
shell->vectors = gimp_canvas_proxy_group_new (shell);
|
||||
gimp_display_shell_add_item (shell, shell->vectors);
|
||||
g_object_unref (shell->vectors);
|
||||
shell->paths = gimp_canvas_proxy_group_new (shell);
|
||||
gimp_display_shell_add_item (shell, shell->paths);
|
||||
g_object_unref (shell->paths);
|
||||
|
||||
shell->grid = gimp_canvas_grid_new (shell, NULL);
|
||||
gimp_canvas_item_set_visible (shell->grid, FALSE);
|
||||
|
|
@ -130,7 +130,7 @@ gimp_display_shell_items_free (GimpDisplayShell *shell)
|
|||
|
||||
shell->passe_partout = NULL;
|
||||
shell->preview_items = NULL;
|
||||
shell->vectors = NULL;
|
||||
shell->paths = NULL;
|
||||
shell->grid = NULL;
|
||||
shell->guides = NULL;
|
||||
shell->sample_points = NULL;
|
||||
|
|
|
|||
|
|
@ -1826,7 +1826,7 @@ gimp_display_shell_snap_coords (GimpDisplayShell *shell,
|
|||
|
||||
snap_to_canvas = gimp_display_shell_get_snap_to_canvas (shell);
|
||||
|
||||
if (gimp_display_shell_get_snap_to_vectors (shell) &&
|
||||
if (gimp_display_shell_get_snap_to_path (shell) &&
|
||||
gimp_image_get_selected_paths (image))
|
||||
{
|
||||
snap_to_path = TRUE;
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ struct _GimpDisplayShell
|
|||
GimpCanvasItem *unrotated_item; /* unrotated items for e.g. cursor */
|
||||
GimpCanvasItem *passe_partout; /* item for the highlight */
|
||||
GimpCanvasItem *preview_items; /* item for previews */
|
||||
GimpCanvasItem *vectors; /* item proxy of vectors */
|
||||
GimpCanvasItem *paths; /* item proxy of paths */
|
||||
GimpCanvasItem *grid; /* item proxy of the grid */
|
||||
GimpCanvasItem *guides; /* item proxies of guides */
|
||||
GimpCanvasItem *sample_points; /* item proxies of sample points */
|
||||
|
|
@ -183,9 +183,9 @@ struct _GimpDisplayShell
|
|||
|
||||
gint paused_count;
|
||||
|
||||
GimpTreeHandler *vectors_freeze_handler;
|
||||
GimpTreeHandler *vectors_thaw_handler;
|
||||
GimpTreeHandler *vectors_visible_handler;
|
||||
GimpTreeHandler *path_freeze_handler;
|
||||
GimpTreeHandler *path_thaw_handler;
|
||||
GimpTreeHandler *path_visible_handler;
|
||||
|
||||
gboolean zoom_on_resize;
|
||||
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ gimp_tool_path_dispose (GObject *object)
|
|||
{
|
||||
GimpToolPath *path = GIMP_TOOL_PATH (object);
|
||||
|
||||
gimp_tool_path_set_vectors (path, NULL);
|
||||
gimp_tool_path_set_path (path, NULL);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
|
@ -335,7 +335,7 @@ gimp_tool_path_set_property (GObject *object,
|
|||
switch (property_id)
|
||||
{
|
||||
case PROP_VECTORS:
|
||||
gimp_tool_path_set_vectors (path, g_value_get_object (value));
|
||||
gimp_tool_path_set_path (path, g_value_get_object (value));
|
||||
break;
|
||||
case PROP_EDIT_MODE:
|
||||
private->edit_mode = g_value_get_enum (value);
|
||||
|
|
@ -599,7 +599,7 @@ gimp_tool_path_button_press (GimpToolWidget *widget,
|
|||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
NULL, NULL, NULL, NULL, NULL, &vectors))
|
||||
{
|
||||
gimp_tool_path_set_vectors (path, vectors);
|
||||
gimp_tool_path_set_path (path, vectors);
|
||||
}
|
||||
|
||||
private->function = VECTORS_FINISHED;
|
||||
|
|
@ -622,7 +622,7 @@ gimp_tool_path_button_press (GimpToolWidget *widget,
|
|||
|
||||
private->undo_motion = TRUE;
|
||||
|
||||
gimp_tool_path_set_vectors (path, vectors);
|
||||
gimp_tool_path_set_path (path, vectors);
|
||||
g_object_unref (vectors);
|
||||
|
||||
private->function = VECTORS_CREATE_STROKE;
|
||||
|
|
@ -726,13 +726,13 @@ gimp_tool_path_button_press (GimpToolWidget *widget,
|
|||
private->undo_motion = TRUE;
|
||||
}
|
||||
|
||||
gimp_canvas_item_on_vectors_handle (private->path,
|
||||
private->vectors, coords,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
GIMP_ANCHOR_CONTROL, TRUE,
|
||||
&private->cur_anchor,
|
||||
&private->cur_stroke);
|
||||
gimp_canvas_item_on_path_handle (private->path,
|
||||
private->vectors, coords,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
GIMP_ANCHOR_CONTROL, TRUE,
|
||||
&private->cur_anchor,
|
||||
&private->cur_stroke);
|
||||
if (! private->cur_anchor)
|
||||
private->function = VECTORS_FINISHED;
|
||||
}
|
||||
|
|
@ -1345,24 +1345,24 @@ gimp_tool_path_get_function (GimpToolPath *path,
|
|||
/* are we hovering the current vectors on the current display? */
|
||||
if (private->vectors)
|
||||
{
|
||||
on_handle = gimp_canvas_item_on_vectors_handle (private->path,
|
||||
private->vectors,
|
||||
coords,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
GIMP_ANCHOR_ANCHOR,
|
||||
private->sel_count > 2,
|
||||
&anchor, &stroke);
|
||||
on_handle = gimp_canvas_item_on_path_handle (private->path,
|
||||
private->vectors,
|
||||
coords,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
GIMP_ANCHOR_ANCHOR,
|
||||
private->sel_count > 2,
|
||||
&anchor, &stroke);
|
||||
|
||||
if (! on_handle)
|
||||
on_curve = gimp_canvas_item_on_vectors_curve (private->path,
|
||||
private->vectors,
|
||||
coords,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
NULL,
|
||||
&position, &anchor,
|
||||
&anchor2, &stroke);
|
||||
on_curve = gimp_canvas_item_on_path_curve (private->path,
|
||||
private->vectors,
|
||||
coords,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
GIMP_CANVAS_HANDLE_SIZE_CIRCLE,
|
||||
NULL,
|
||||
&position, &anchor,
|
||||
&anchor2, &stroke);
|
||||
}
|
||||
|
||||
if (! on_handle && ! on_curve)
|
||||
|
|
@ -1948,8 +1948,8 @@ gimp_tool_path_new (GimpDisplayShell *shell)
|
|||
}
|
||||
|
||||
void
|
||||
gimp_tool_path_set_vectors (GimpToolPath *path,
|
||||
GimpPath *vectors)
|
||||
gimp_tool_path_set_path (GimpToolPath *path,
|
||||
GimpPath *vectors)
|
||||
{
|
||||
GimpToolPathPrivate *private;
|
||||
|
||||
|
|
|
|||
|
|
@ -57,21 +57,22 @@ struct _GimpToolPathClass
|
|||
};
|
||||
|
||||
|
||||
GType gimp_tool_path_get_type (void) G_GNUC_CONST;
|
||||
GType gimp_tool_path_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GimpToolWidget * gimp_tool_path_new (GimpDisplayShell *shell);
|
||||
GimpToolWidget * gimp_tool_path_new (GimpDisplayShell *shell);
|
||||
|
||||
void gimp_tool_path_set_vectors (GimpToolPath *path,
|
||||
GimpPath *vectors);
|
||||
void gimp_tool_path_set_path (GimpToolPath *path,
|
||||
GimpPath *vectors);
|
||||
|
||||
void gimp_tool_path_get_popup_state (GimpToolPath *path,
|
||||
gboolean *on_handle,
|
||||
gboolean *on_curve);
|
||||
void gimp_tool_path_get_popup_state (GimpToolPath *path,
|
||||
gboolean *on_handle,
|
||||
gboolean *on_curve);
|
||||
|
||||
void gimp_tool_path_delete_anchor (GimpToolPath *path);
|
||||
void gimp_tool_path_shift_start (GimpToolPath *path);
|
||||
void gimp_tool_path_insert_anchor (GimpToolPath *path);
|
||||
void gimp_tool_path_delete_segment (GimpToolPath *path);
|
||||
void gimp_tool_path_reverse_stroke (GimpToolPath *path);
|
||||
|
||||
void gimp_tool_path_delete_anchor (GimpToolPath *path);
|
||||
void gimp_tool_path_shift_start (GimpToolPath *path);
|
||||
void gimp_tool_path_insert_anchor (GimpToolPath *path);
|
||||
void gimp_tool_path_delete_segment (GimpToolPath *path);
|
||||
void gimp_tool_path_reverse_stroke (GimpToolPath *path);
|
||||
|
||||
#endif /* __GIMP_TOOL_PATH_H__ */
|
||||
|
|
|
|||
|
|
@ -683,7 +683,7 @@ register_image_select_procs (GimpPDB *pdb)
|
|||
"gimp-image-select-item");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Transforms the specified item into a selection",
|
||||
"This procedure renders the item's outline into the current selection of the image the item belongs to. What exactly the item's outline is depends on the item type: for layers, it's the layer's alpha channel, for vectors the vector's shape.\n"
|
||||
"This procedure renders the item's outline into the current selection of the image the item belongs to. What exactly the item's outline is depends on the item type: for layers, it's the layer's alpha channel, for paths the path's shape.\n"
|
||||
"\n"
|
||||
"This procedure is affected by the following context setters: 'gimp-context-set-antialias', 'gimp-context-set-feather', 'gimp-context-set-feather-radius'.",
|
||||
NULL);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ struct _GimpPlugInCleanupImage
|
|||
gint undo_group_count;
|
||||
gint layers_freeze_count;
|
||||
gint channels_freeze_count;
|
||||
gint vectors_freeze_count;
|
||||
gint paths_freeze_count;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -262,7 +262,7 @@ gimp_plug_in_cleanup_paths_freeze (GimpPlugIn *plug_in,
|
|||
if (! cleanup)
|
||||
cleanup = gimp_plug_in_cleanup_image_new (proc_frame, image);
|
||||
|
||||
cleanup->vectors_freeze_count++;
|
||||
cleanup->paths_freeze_count++;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -283,9 +283,9 @@ gimp_plug_in_cleanup_paths_thaw (GimpPlugIn *plug_in,
|
|||
if (! cleanup)
|
||||
return FALSE;
|
||||
|
||||
if (cleanup->vectors_freeze_count > 0)
|
||||
if (cleanup->paths_freeze_count > 0)
|
||||
{
|
||||
cleanup->vectors_freeze_count--;
|
||||
cleanup->paths_freeze_count--;
|
||||
|
||||
if (gimp_plug_in_cleanup_image_is_clean (cleanup))
|
||||
gimp_plug_in_cleanup_image_free (proc_frame, cleanup);
|
||||
|
|
@ -420,7 +420,7 @@ gimp_plug_in_cleanup_image_is_clean (GimpPlugInCleanupImage *cleanup)
|
|||
if (cleanup->channels_freeze_count > 0)
|
||||
return FALSE;
|
||||
|
||||
if (cleanup->vectors_freeze_count > 0)
|
||||
if (cleanup->paths_freeze_count > 0)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -493,13 +493,13 @@ gimp_plug_in_cleanup_image (GimpPlugInProcFrame *proc_frame,
|
|||
|
||||
container = gimp_image_get_paths (image);
|
||||
|
||||
if (cleanup->vectors_freeze_count > 0)
|
||||
if (cleanup->paths_freeze_count > 0)
|
||||
{
|
||||
g_message ("Plug-in '%s' left image's paths frozen, "
|
||||
"thawing paths.",
|
||||
gimp_procedure_get_label (proc_frame->procedure));
|
||||
|
||||
while (cleanup->vectors_freeze_count > 0 &&
|
||||
while (cleanup->paths_freeze_count > 0 &&
|
||||
gimp_container_frozen (container))
|
||||
{
|
||||
gimp_container_thaw (container);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ enum
|
|||
PROP_0,
|
||||
PROP_ALIGN_REFERENCE,
|
||||
PROP_ALIGN_LAYERS,
|
||||
PROP_ALIGN_VECTORS,
|
||||
PROP_ALIGN_PATHS,
|
||||
PROP_ALIGN_CONTENTS,
|
||||
PROP_PIVOT_X,
|
||||
PROP_PIVOT_Y,
|
||||
|
|
@ -159,7 +159,7 @@ gimp_align_options_class_init (GimpAlignOptionsClass *klass)
|
|||
_("Selected layers will be aligned or distributed by the tool"),
|
||||
TRUE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_ALIGN_VECTORS,
|
||||
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_ALIGN_PATHS,
|
||||
"align-vectors",
|
||||
_("Selected paths"),
|
||||
_("Selected paths will be aligned or distributed by the tool"),
|
||||
|
|
@ -226,7 +226,7 @@ gimp_align_options_set_property (GObject *object,
|
|||
options->priv->align_layers = g_value_get_boolean (value);
|
||||
gimp_align_options_update_area (options);
|
||||
break;
|
||||
case PROP_ALIGN_VECTORS:
|
||||
case PROP_ALIGN_PATHS:
|
||||
options->priv->align_paths = g_value_get_boolean (value);
|
||||
gimp_align_options_update_area (options);
|
||||
break;
|
||||
|
|
@ -265,7 +265,7 @@ gimp_align_options_get_property (GObject *object,
|
|||
case PROP_ALIGN_LAYERS:
|
||||
g_value_set_boolean (value, options->priv->align_layers);
|
||||
break;
|
||||
case PROP_ALIGN_VECTORS:
|
||||
case PROP_ALIGN_PATHS:
|
||||
g_value_set_boolean (value, options->priv->align_paths);
|
||||
break;
|
||||
|
||||
|
|
@ -575,11 +575,11 @@ gimp_align_options_get_objects (GimpAlignOptions *options)
|
|||
}
|
||||
if (options->priv->align_paths)
|
||||
{
|
||||
GList *vectors;
|
||||
GList *paths;
|
||||
|
||||
vectors = gimp_image_get_selected_paths (image);
|
||||
vectors = g_list_copy (vectors);
|
||||
objects = g_list_concat (objects, vectors);
|
||||
paths = gimp_image_get_selected_paths (image);
|
||||
paths = g_list_copy (paths);
|
||||
objects = g_list_concat (objects, paths);
|
||||
}
|
||||
|
||||
if (options->priv->selected_guides)
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ gimp_align_tool_button_release (GimpTool *tool,
|
|||
/* Check if a layer is fully included in the rubber-band rectangle.
|
||||
* Don't verify for too small rectangles.
|
||||
*/
|
||||
/* FIXME: look for vectors too */
|
||||
/* FIXME: look for paths too */
|
||||
if (hypot (coords->x - align_tool->x1,
|
||||
coords->y - align_tool->y1) > EPSILON)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
|
|||
edit_select->num_segs_out *
|
||||
sizeof (GimpBoundSeg));
|
||||
|
||||
if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_VECTORS)
|
||||
if (edit_select->edit_mode == GIMP_TRANSLATE_MODE_PATH)
|
||||
{
|
||||
edit_select->sel_x = 0;
|
||||
edit_select->sel_y = 0;
|
||||
|
|
@ -349,7 +349,7 @@ gimp_edit_selection_tool_start (GimpTool *parent_tool,
|
|||
|
||||
case GIMP_TRANSLATE_MODE_LAYER:
|
||||
case GIMP_TRANSLATE_MODE_FLOATING_SEL:
|
||||
case GIMP_TRANSLATE_MODE_VECTORS:
|
||||
case GIMP_TRANSLATE_MODE_PATH:
|
||||
edit_select->live_items = gimp_image_item_list_filter (g_list_copy (selected_items));
|
||||
gimp_image_item_list_bounds (image, edit_select->live_items, &x, &y, &w, &h);
|
||||
break;
|
||||
|
|
@ -508,7 +508,7 @@ gimp_edit_selection_tool_update_motion (GimpEditSelectionTool *edit_select,
|
|||
{
|
||||
case GIMP_TRANSLATE_MODE_LAYER_MASK:
|
||||
case GIMP_TRANSLATE_MODE_MASK:
|
||||
case GIMP_TRANSLATE_MODE_VECTORS:
|
||||
case GIMP_TRANSLATE_MODE_PATH:
|
||||
case GIMP_TRANSLATE_MODE_CHANNEL:
|
||||
edit_select->last_x = edit_select->current_x;
|
||||
edit_select->last_y = edit_select->current_y;
|
||||
|
|
@ -717,7 +717,7 @@ gimp_edit_selection_tool_draw (GimpDrawTool *draw_tool)
|
|||
break;
|
||||
|
||||
case GIMP_TRANSLATE_MODE_LAYER:
|
||||
case GIMP_TRANSLATE_MODE_VECTORS:
|
||||
case GIMP_TRANSLATE_MODE_PATH:
|
||||
{
|
||||
GList *translate_items;
|
||||
GimpAlignmentType snapped_side_horizontal = shell->snapped_side_horizontal;
|
||||
|
|
@ -945,7 +945,7 @@ gimp_edit_selection_tool_get_selected_items (GimpEditSelectionTool *edit_select,
|
|||
|
||||
switch (edit_select->edit_mode)
|
||||
{
|
||||
case GIMP_TRANSLATE_MODE_VECTORS:
|
||||
case GIMP_TRANSLATE_MODE_PATH:
|
||||
selected_items = g_list_copy (gimp_image_get_selected_paths (image));
|
||||
break;
|
||||
|
||||
|
|
@ -1013,7 +1013,7 @@ gimp_edit_selection_tool_start_undo_group (GimpEditSelectionTool *edit_select,
|
|||
|
||||
switch (edit_select->edit_mode)
|
||||
{
|
||||
case GIMP_TRANSLATE_MODE_VECTORS:
|
||||
case GIMP_TRANSLATE_MODE_PATH:
|
||||
case GIMP_TRANSLATE_MODE_CHANNEL:
|
||||
case GIMP_TRANSLATE_MODE_LAYER_MASK:
|
||||
case GIMP_TRANSLATE_MODE_MASK:
|
||||
|
|
@ -1267,7 +1267,7 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
|
|||
selected_items = gimp_image_get_selected_paths (image);
|
||||
selected_items = g_list_copy (selected_items);
|
||||
|
||||
edit_mode = GIMP_TRANSLATE_MODE_VECTORS;
|
||||
edit_mode = GIMP_TRANSLATE_MODE_PATH;
|
||||
undo_type = GIMP_UNDO_GROUP_ITEM_DISPLACE;
|
||||
|
||||
if (selected_items == NULL)
|
||||
|
|
|
|||
|
|
@ -155,8 +155,8 @@ gimp_move_tool_init (GimpMoveTool *move_tool)
|
|||
|
||||
move_tool->saved_type = GIMP_TRANSFORM_TYPE_LAYER;
|
||||
|
||||
move_tool->old_selected_layers = NULL;
|
||||
move_tool->old_selected_vectors = NULL;
|
||||
move_tool->old_selected_layers = NULL;
|
||||
move_tool->old_selected_paths = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -164,9 +164,9 @@ gimp_move_tool_finalize (GObject *object)
|
|||
{
|
||||
GimpMoveTool *move = GIMP_MOVE_TOOL (object);
|
||||
|
||||
g_clear_pointer (&move->guides, g_list_free);
|
||||
g_clear_pointer (&move->guides, g_list_free);
|
||||
g_clear_pointer (&move->old_selected_layers, g_list_free);
|
||||
g_clear_pointer (&move->old_selected_vectors, g_list_free);
|
||||
g_clear_pointer (&move->old_selected_paths, g_list_free);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
|
@ -203,17 +203,17 @@ gimp_move_tool_button_press (GimpTool *tool,
|
|||
|
||||
if (options->move_type == GIMP_TRANSFORM_TYPE_PATH)
|
||||
{
|
||||
GimpPath *vectors;
|
||||
GimpPath *path;
|
||||
|
||||
vectors = gimp_image_pick_path (image,
|
||||
coords->x, coords->y,
|
||||
FUNSCALEX (shell, snap_distance),
|
||||
FUNSCALEY (shell, snap_distance));
|
||||
if (vectors)
|
||||
path = gimp_image_pick_path (image,
|
||||
coords->x, coords->y,
|
||||
FUNSCALEX (shell, snap_distance),
|
||||
FUNSCALEY (shell, snap_distance));
|
||||
if (path)
|
||||
{
|
||||
GList *new_selected_paths = g_list_prepend (NULL, vectors);
|
||||
GList *new_selected_paths = g_list_prepend (NULL, path);
|
||||
|
||||
move->old_selected_vectors =
|
||||
move->old_selected_paths =
|
||||
g_list_copy (gimp_image_get_selected_paths (image));
|
||||
|
||||
gimp_image_set_selected_paths (image, new_selected_paths);
|
||||
|
|
@ -286,7 +286,7 @@ gimp_move_tool_button_press (GimpTool *tool,
|
|||
selected_items = gimp_image_get_selected_paths (image);
|
||||
selected_items = g_list_copy (selected_items);
|
||||
|
||||
translate_mode = GIMP_TRANSLATE_MODE_VECTORS;
|
||||
translate_mode = GIMP_TRANSLATE_MODE_PATH;
|
||||
|
||||
if (! selected_items)
|
||||
{
|
||||
|
|
@ -427,10 +427,10 @@ gimp_move_tool_button_release (GimpTool *tool,
|
|||
flush = TRUE;
|
||||
}
|
||||
|
||||
if (move->old_selected_vectors)
|
||||
if (move->old_selected_paths)
|
||||
{
|
||||
gimp_image_set_selected_paths (image, move->old_selected_vectors);
|
||||
g_clear_pointer (&move->old_selected_vectors, g_list_free);
|
||||
gimp_image_set_selected_paths (image, move->old_selected_paths);
|
||||
g_clear_pointer (&move->old_selected_paths, g_list_free);
|
||||
|
||||
flush = TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ struct _GimpMoveTool
|
|||
GimpTransformType saved_type;
|
||||
|
||||
GList *old_selected_layers;
|
||||
GList *old_selected_vectors;
|
||||
GList *old_selected_paths;
|
||||
};
|
||||
|
||||
struct _GimpMoveToolClass
|
||||
|
|
|
|||
|
|
@ -2310,7 +2310,7 @@ gimp_text_tool_paste_clipboard (GimpTextTool *text_tool)
|
|||
}
|
||||
|
||||
void
|
||||
gimp_text_tool_create_vectors (GimpTextTool *text_tool)
|
||||
gimp_text_tool_create_path (GimpTextTool *text_tool)
|
||||
{
|
||||
GimpPath *path;
|
||||
|
||||
|
|
@ -2336,11 +2336,11 @@ gimp_text_tool_create_vectors (GimpTextTool *text_tool)
|
|||
}
|
||||
|
||||
gboolean
|
||||
gimp_text_tool_create_vectors_warped (GimpTextTool *text_tool,
|
||||
GError **error)
|
||||
gimp_text_tool_create_path_warped (GimpTextTool *text_tool,
|
||||
GError **error)
|
||||
{
|
||||
GList *vectors0;
|
||||
GimpPath *vectors;
|
||||
GList *paths0;
|
||||
GimpPath *path;
|
||||
gdouble box_width;
|
||||
gdouble box_height;
|
||||
GimpTextDirection dir;
|
||||
|
|
@ -2365,15 +2365,15 @@ gimp_text_tool_create_vectors_warped (GimpTextTool *text_tool,
|
|||
box_width = gimp_item_get_width (GIMP_ITEM (text_tool->layer));
|
||||
box_height = gimp_item_get_height (GIMP_ITEM (text_tool->layer));
|
||||
|
||||
vectors0 = gimp_image_get_selected_paths (text_tool->image);
|
||||
if (g_list_length (vectors0) != 1)
|
||||
paths0 = gimp_image_get_selected_paths (text_tool->image);
|
||||
if (g_list_length (paths0) != 1)
|
||||
{
|
||||
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
|
||||
_("Exactly one path must be selected."));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
vectors = gimp_text_path_new (text_tool->image, text_tool->text);
|
||||
path = gimp_text_path_new (text_tool->image, text_tool->text);
|
||||
|
||||
offset = 0;
|
||||
dir = gimp_text_tool_get_direction (text_tool);
|
||||
|
|
@ -2390,7 +2390,7 @@ gimp_text_tool_create_vectors_warped (GimpTextTool *text_tool,
|
|||
{
|
||||
GimpStroke *stroke = NULL;
|
||||
|
||||
while ((stroke = gimp_path_stroke_get_next (vectors, stroke)))
|
||||
while ((stroke = gimp_path_stroke_get_next (path, stroke)))
|
||||
{
|
||||
gimp_stroke_rotate (stroke, 0, 0, 270);
|
||||
gimp_stroke_translate (stroke, 0, box_width);
|
||||
|
|
@ -2400,11 +2400,11 @@ gimp_text_tool_create_vectors_warped (GimpTextTool *text_tool,
|
|||
break;
|
||||
}
|
||||
|
||||
gimp_path_warp_path (vectors0->data, vectors, offset);
|
||||
gimp_path_warp_path (paths0->data, path, offset);
|
||||
|
||||
gimp_item_set_visible (GIMP_ITEM (vectors), TRUE, FALSE);
|
||||
gimp_item_set_visible (GIMP_ITEM (path), TRUE, FALSE);
|
||||
|
||||
gimp_image_add_path (text_tool->image, vectors,
|
||||
gimp_image_add_path (text_tool->image, path,
|
||||
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||
|
||||
gimp_image_flush (text_tool->image);
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@ void gimp_text_tool_cut_clipboard (GimpTextTool *text_tool);
|
|||
void gimp_text_tool_copy_clipboard (GimpTextTool *text_tool);
|
||||
void gimp_text_tool_paste_clipboard (GimpTextTool *text_tool);
|
||||
|
||||
void gimp_text_tool_create_vectors (GimpTextTool *text_tool);
|
||||
gboolean gimp_text_tool_create_vectors_warped (GimpTextTool *text_tool,
|
||||
void gimp_text_tool_create_path (GimpTextTool *text_tool);
|
||||
gboolean gimp_text_tool_create_path_warped (GimpTextTool *text_tool,
|
||||
GError **error);
|
||||
|
||||
GimpTextDirection
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ gimp_vector_tool_dispose (GObject *object)
|
|||
{
|
||||
GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (object);
|
||||
|
||||
gimp_vector_tool_set_vectors (vector_tool, NULL);
|
||||
gimp_vector_tool_set_path (vector_tool, NULL);
|
||||
g_clear_object (&vector_tool->widget);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
|
|
@ -406,8 +406,8 @@ gimp_vector_tool_start (GimpVectorTool *vector_tool,
|
|||
G_BINDING_SYNC_CREATE |
|
||||
G_BINDING_BIDIRECTIONAL);
|
||||
|
||||
gimp_tool_path_set_vectors (GIMP_TOOL_PATH (widget),
|
||||
vector_tool->vectors);
|
||||
gimp_tool_path_set_path (GIMP_TOOL_PATH (widget),
|
||||
vector_tool->vectors);
|
||||
|
||||
g_signal_connect (widget, "changed",
|
||||
G_CALLBACK (gimp_vector_tool_path_changed),
|
||||
|
|
@ -433,7 +433,7 @@ gimp_vector_tool_halt (GimpVectorTool *vector_tool)
|
|||
if (tool->display)
|
||||
gimp_tool_pop_status (tool, tool->display);
|
||||
|
||||
gimp_vector_tool_set_vectors (vector_tool, NULL);
|
||||
gimp_vector_tool_set_path (vector_tool, NULL);
|
||||
|
||||
if (gimp_draw_tool_is_active (GIMP_DRAW_TOOL (tool)))
|
||||
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
|
||||
|
|
@ -464,11 +464,11 @@ gimp_vector_tool_path_changed (GimpToolWidget *path,
|
|||
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||
gimp_image_flush (image);
|
||||
|
||||
gimp_vector_tool_set_vectors (vector_tool, vectors);
|
||||
gimp_vector_tool_set_path (vector_tool, vectors);
|
||||
}
|
||||
else
|
||||
{
|
||||
gimp_vector_tool_set_vectors (vector_tool, vectors);
|
||||
gimp_vector_tool_set_path (vector_tool, vectors);
|
||||
|
||||
if (vectors)
|
||||
{
|
||||
|
|
@ -538,19 +538,19 @@ gimp_vector_tool_vectors_changed (GimpImage *image,
|
|||
if (g_list_length (gimp_image_get_selected_paths (image)) == 1)
|
||||
path = gimp_image_get_selected_paths (image)->data;
|
||||
|
||||
gimp_vector_tool_set_vectors (vector_tool, path);
|
||||
gimp_vector_tool_set_path (vector_tool, path);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_vector_tool_vectors_removed (GimpPath *vectors,
|
||||
GimpVectorTool *vector_tool)
|
||||
{
|
||||
gimp_vector_tool_set_vectors (vector_tool, NULL);
|
||||
gimp_vector_tool_set_path (vector_tool, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_vector_tool_set_vectors (GimpVectorTool *vector_tool,
|
||||
GimpPath *vectors)
|
||||
gimp_vector_tool_set_path (GimpVectorTool *vector_tool,
|
||||
GimpPath *vectors)
|
||||
{
|
||||
GimpTool *tool;
|
||||
GimpItem *item = NULL;
|
||||
|
|
@ -659,7 +659,7 @@ gimp_vector_tool_set_vectors (GimpVectorTool *vector_tool,
|
|||
|
||||
if (tool->display)
|
||||
{
|
||||
gimp_tool_path_set_vectors (GIMP_TOOL_PATH (vector_tool->widget), vectors);
|
||||
gimp_tool_path_set_path (GIMP_TOOL_PATH (vector_tool->widget), vectors);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -55,12 +55,13 @@ struct _GimpVectorToolClass
|
|||
};
|
||||
|
||||
|
||||
void gimp_vector_tool_register (GimpToolRegisterCallback callback,
|
||||
gpointer data);
|
||||
void gimp_vector_tool_register (GimpToolRegisterCallback callback,
|
||||
gpointer data);
|
||||
|
||||
GType gimp_vector_tool_get_type (void) G_GNUC_CONST;
|
||||
GType gimp_vector_tool_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void gimp_vector_tool_set_path (GimpVectorTool *vector_tool,
|
||||
GimpPath *path);
|
||||
|
||||
void gimp_vector_tool_set_vectors (GimpVectorTool *vector_tool,
|
||||
GimpPath *vectors);
|
||||
|
||||
#endif /* __GIMP_VECTOR_TOOL_H__ */
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ typedef enum /*< skip >*/
|
|||
/* Modes of GimpEditSelectionTool */
|
||||
typedef enum /*< skip >*/
|
||||
{
|
||||
GIMP_TRANSLATE_MODE_VECTORS,
|
||||
GIMP_TRANSLATE_MODE_PATH,
|
||||
GIMP_TRANSLATE_MODE_CHANNEL,
|
||||
GIMP_TRANSLATE_MODE_LAYER_MASK,
|
||||
GIMP_TRANSLATE_MODE_MASK,
|
||||
|
|
|
|||
|
|
@ -619,7 +619,7 @@ svg_handler_group_start (SvgHandler *handler,
|
|||
{
|
||||
handler->transform = g_slice_dup (GimpMatrix3, &matrix);
|
||||
|
||||
#ifdef DEBUG_VECTORS_IMPORT
|
||||
#ifdef DEBUG_PATH_IMPORT
|
||||
g_printerr ("transform %s: %g %g %g %g %g %g %g %g %g\n",
|
||||
handler->id ? handler->id : "(null)",
|
||||
handler->transform->coeff[0][0],
|
||||
|
|
@ -1194,7 +1194,7 @@ parse_svg_viewbox (const gchar *value,
|
|||
}
|
||||
else /* disable rendering of the element */
|
||||
{
|
||||
#ifdef DEBUG_VECTORS_IMPORT
|
||||
#ifdef DEBUG_PATH_IMPORT
|
||||
g_printerr ("empty viewBox");
|
||||
#endif
|
||||
*width = *height = 0.0;
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView *tree_view,
|
|||
case GIMP_DND_TYPE_LAYER:
|
||||
case GIMP_DND_TYPE_CHANNEL:
|
||||
case GIMP_DND_TYPE_LAYER_MASK:
|
||||
case GIMP_DND_TYPE_VECTORS:
|
||||
case GIMP_DND_TYPE_PATH:
|
||||
case GIMP_DND_TYPE_BRUSH:
|
||||
case GIMP_DND_TYPE_PATTERN:
|
||||
case GIMP_DND_TYPE_GRADIENT:
|
||||
|
|
@ -213,7 +213,7 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView *tree_view,
|
|||
|
||||
case GIMP_DND_TYPE_CHANNEL_LIST:
|
||||
case GIMP_DND_TYPE_LAYER_LIST:
|
||||
case GIMP_DND_TYPE_VECTORS_LIST:
|
||||
case GIMP_DND_TYPE_PATH_LIST:
|
||||
/* Various GimpViewable list (GList) drag data. */
|
||||
{
|
||||
GtkWidget *src_widget = gtk_drag_get_source_widget (context);
|
||||
|
|
|
|||
|
|
@ -478,11 +478,11 @@ static const GimpDndDataDef dnd_data_defs[] =
|
|||
{
|
||||
GIMP_TARGET_PATH,
|
||||
|
||||
"gimp-dnd-get-vectors-func",
|
||||
"gimp-dnd-get-vectors-data",
|
||||
"gimp-dnd-get-path-func",
|
||||
"gimp-dnd-get-path-data",
|
||||
|
||||
"gimp-dnd-set-vectors-func",
|
||||
"gimp-dnd-set-vectors-data",
|
||||
"gimp-dnd-set-path-func",
|
||||
"gimp-dnd-set-path-data",
|
||||
|
||||
gimp_dnd_get_viewable_icon,
|
||||
gimp_dnd_get_item_data,
|
||||
|
|
@ -660,11 +660,11 @@ static const GimpDndDataDef dnd_data_defs[] =
|
|||
{
|
||||
GIMP_TARGET_PATH_LIST,
|
||||
|
||||
"gimp-dnd-get-vectors-list-func",
|
||||
"gimp-dnd-get-vectors-list-data",
|
||||
"gimp-dnd-get-path-list-func",
|
||||
"gimp-dnd-get-path-list-data",
|
||||
|
||||
"gimp-dnd-set-vectors-list-func",
|
||||
"gimp-dnd-set-vectors-list-data",
|
||||
"gimp-dnd-set-path-list-func",
|
||||
"gimp-dnd-set-path-list-data",
|
||||
|
||||
gimp_dnd_get_viewable_list_icon,
|
||||
gimp_dnd_get_item_list_data,
|
||||
|
|
@ -1950,7 +1950,7 @@ gimp_dnd_data_type_get_by_g_type (GType type,
|
|||
}
|
||||
else if (g_type_is_a (type, GIMP_TYPE_PATH))
|
||||
{
|
||||
dnd_type = list ? GIMP_DND_TYPE_VECTORS_LIST : GIMP_DND_TYPE_VECTORS;
|
||||
dnd_type = list ? GIMP_DND_TYPE_PATH_LIST : GIMP_DND_TYPE_PATH;
|
||||
}
|
||||
else if (g_type_is_a (type, GIMP_TYPE_BRUSH) && ! list)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
{ "application/x-gimp-layer-mask-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_LAYER_MASK }
|
||||
|
||||
#define GIMP_TARGET_PATH \
|
||||
{ "application/x-gimp-path-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_VECTORS }
|
||||
{ "application/x-gimp-path-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_PATH }
|
||||
|
||||
#define GIMP_TARGET_BRUSH \
|
||||
{ "application/x-gimp-brush-name", 0, GIMP_DND_TYPE_BRUSH }
|
||||
|
|
@ -101,7 +101,8 @@
|
|||
{ "application/x-gimp-channel-list", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_CHANNEL_LIST }
|
||||
|
||||
#define GIMP_TARGET_PATH_LIST \
|
||||
{ "application/x-gimp-vectors-list", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_VECTORS_LIST }
|
||||
{ "application/x-gimp-path-list", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_PATH_LIST }
|
||||
|
||||
|
||||
/* dnd initialization */
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@
|
|||
#define GIMP_HELP_VIEW_SNAP_TO_GUIDES "gimp-view-snap-to-guides"
|
||||
#define GIMP_HELP_VIEW_SNAP_TO_GRID "gimp-view-snap-to-grid"
|
||||
#define GIMP_HELP_VIEW_SNAP_TO_CANVAS "gimp-view-snap-to-canvas"
|
||||
#define GIMP_HELP_VIEW_SNAP_TO_VECTORS "gimp-view-snap-to-vectors"
|
||||
#define GIMP_HELP_VIEW_SNAP_TO_PATH "gimp-view-snap-to-vectors"
|
||||
#define GIMP_HELP_VIEW_SNAP_TO_BBOX "gimp-view-snap-to-bbox"
|
||||
#define GIMP_HELP_VIEW_SNAP_TO_EQUIDISTANCE "gimp-view-snap-to-equidistance"
|
||||
#define GIMP_HELP_VIEW_SHOW_MENUBAR "gimp-view-show-menubar"
|
||||
|
|
@ -374,7 +374,6 @@
|
|||
#define GIMP_HELP_TOOL_THRESHOLD "gimp-tool-threshold"
|
||||
#define GIMP_HELP_TOOL_TRANSFORM_3D "gimp-tool-transform-3d"
|
||||
#define GIMP_HELP_TOOL_UNIFIED_TRANSFORM "gimp-tool-unified-transform"
|
||||
#define GIMP_HELP_TOOL_VECTORS "gimp-tool-vectors"
|
||||
#define GIMP_HELP_TOOL_WARP "gimp-tool-warp"
|
||||
#define GIMP_HELP_TOOL_ZOOM "gimp-tool-zoom"
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ gimp_image_prop_view_init (GimpImagePropView *view)
|
|||
view->channels_label =
|
||||
gimp_image_prop_view_add_label (grid, row++, _("Number of channels:"));
|
||||
|
||||
view->vectors_label =
|
||||
view->paths_label =
|
||||
gimp_image_prop_view_add_label (grid, row++, _("Number of paths:"));
|
||||
|
||||
g_signal_connect (view, "realize",
|
||||
|
|
@ -529,10 +529,10 @@ gimp_image_prop_view_update (GimpImagePropView *view)
|
|||
gimp_image_get_n_channels (image));
|
||||
gtk_label_set_text (GTK_LABEL (view->channels_label), buf);
|
||||
|
||||
/* number of vectors */
|
||||
/* number of paths */
|
||||
g_snprintf (buf, sizeof (buf), "%d",
|
||||
gimp_image_get_n_paths (image));
|
||||
gtk_label_set_text (GTK_LABEL (view->vectors_label), buf);
|
||||
gtk_label_set_text (GTK_LABEL (view->paths_label), buf);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ struct _GimpImagePropView
|
|||
GtkWidget *pixels_label;
|
||||
GtkWidget *layers_label;
|
||||
GtkWidget *channels_label;
|
||||
GtkWidget *vectors_label;
|
||||
GtkWidget *paths_label;
|
||||
};
|
||||
|
||||
struct _GimpImagePropViewClass
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ gimp_path_tree_view_constructed (GObject *object)
|
|||
modify_mask = gtk_widget_get_modifier_mask (GTK_WIDGET (object),
|
||||
GDK_MODIFIER_INTENT_MODIFY_SELECTION);
|
||||
|
||||
view->toselection_button =
|
||||
view->to_selection_button =
|
||||
gimp_editor_add_action_button (editor, "paths",
|
||||
"paths-selection-replace",
|
||||
"paths-selection-add",
|
||||
|
|
@ -164,19 +164,19 @@ gimp_path_tree_view_constructed (GObject *object)
|
|||
extend_mask | modify_mask,
|
||||
NULL);
|
||||
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (editor),
|
||||
GTK_BUTTON (view->toselection_button),
|
||||
GTK_BUTTON (view->to_selection_button),
|
||||
GIMP_TYPE_PATH);
|
||||
gtk_box_reorder_child (gimp_editor_get_button_box (editor),
|
||||
view->toselection_button, 4);
|
||||
view->to_selection_button, 4);
|
||||
|
||||
view->tovectors_button =
|
||||
view->to_path_button =
|
||||
gimp_editor_add_action_button (editor, "paths",
|
||||
"paths-selection-to-path",
|
||||
"paths-selection-to-path-advanced",
|
||||
GDK_SHIFT_MASK,
|
||||
NULL);
|
||||
gtk_box_reorder_child (gimp_editor_get_button_box (editor),
|
||||
view->tovectors_button, 5);
|
||||
view->to_path_button, 5);
|
||||
|
||||
view->stroke_button =
|
||||
gimp_editor_add_action_button (editor, "paths",
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ struct _GimpPathTreeView
|
|||
{
|
||||
GimpItemTreeView parent_instance;
|
||||
|
||||
GtkWidget *toselection_button;
|
||||
GtkWidget *tovectors_button;
|
||||
GtkWidget *to_selection_button;
|
||||
GtkWidget *to_path_button;
|
||||
GtkWidget *stroke_button;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ typedef enum /*< skip >*/
|
|||
GIMP_DND_TYPE_LAYER = 11,
|
||||
GIMP_DND_TYPE_CHANNEL = 12,
|
||||
GIMP_DND_TYPE_LAYER_MASK = 13,
|
||||
GIMP_DND_TYPE_VECTORS = 14,
|
||||
GIMP_DND_TYPE_PATH = 14,
|
||||
GIMP_DND_TYPE_BRUSH = 15,
|
||||
GIMP_DND_TYPE_PATTERN = 16,
|
||||
GIMP_DND_TYPE_GRADIENT = 17,
|
||||
|
|
@ -170,9 +170,9 @@ typedef enum /*< skip >*/
|
|||
|
||||
GIMP_DND_TYPE_LAYER_LIST = 25,
|
||||
GIMP_DND_TYPE_CHANNEL_LIST = 26,
|
||||
GIMP_DND_TYPE_VECTORS_LIST = 27,
|
||||
GIMP_DND_TYPE_PATH_LIST = 27,
|
||||
|
||||
GIMP_DND_TYPE_LAST = GIMP_DND_TYPE_VECTORS_LIST
|
||||
GIMP_DND_TYPE_LAST = GIMP_DND_TYPE_PATH_LIST
|
||||
} GimpDndType;
|
||||
|
||||
typedef enum /*< skip >*/
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ gimp_image_select_polygon (GimpImage *image,
|
|||
* This procedure renders the item's outline into the current selection
|
||||
* of the image the item belongs to. What exactly the item's outline is
|
||||
* depends on the item type: for layers, it's the layer's alpha
|
||||
* channel, for vectors the vector's shape.
|
||||
* channel, for paths the path's shape.
|
||||
*
|
||||
* This procedure is affected by the following context setters:
|
||||
* gimp_context_set_antialias(), gimp_context_set_feather(),
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ sub image_select_item {
|
|||
This procedure renders the item's outline into the current selection
|
||||
of the image the item belongs to. What exactly the item's outline is
|
||||
depends on the item type: for layers, it's the layer's alpha channel,
|
||||
for vectors the vector's shape.
|
||||
for paths the path's shape.
|
||||
|
||||
|
||||
This procedure is affected by the following context setters:
|
||||
|
|
|
|||
Loading…
Reference in a new issue