pdb, libgimp: Rename libgimp GimpImage vectors API...

...to paths

The first step in converting GimpVectors
to GimpPath. The PDB API for any
gimp_image_*_vectors () is now
gimp_image_*_paths ().
This commit only covers libgimp, and
the app/core versions will be renamed in
a following commit.
This commit is contained in:
Alx Sa 2024-07-08 02:09:42 +00:00
parent 40ecfd40ad
commit d0bdbdfdf6
15 changed files with 467 additions and 468 deletions

View file

@ -509,18 +509,18 @@ image_get_channels_invoker (GimpProcedure *procedure,
} }
static GimpValueArray * static GimpValueArray *
image_get_vectors_invoker (GimpProcedure *procedure, image_get_paths_invoker (GimpProcedure *procedure,
Gimp *gimp, Gimp *gimp,
GimpContext *context, GimpContext *context,
GimpProgress *progress, GimpProgress *progress,
const GimpValueArray *args, const GimpValueArray *args,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
gint num_vectors = 0; gint num_paths = 0;
GimpVectors **vectors = NULL; GimpVectors **paths = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
@ -528,16 +528,16 @@ image_get_vectors_invoker (GimpProcedure *procedure,
{ {
GList *list = gimp_image_get_vectors_iter (image); GList *list = gimp_image_get_vectors_iter (image);
num_vectors = g_list_length (list); num_paths = g_list_length (list);
if (num_vectors) if (num_paths)
{ {
gint i; gint i;
vectors = g_new (GimpVectors *, num_vectors); paths = g_new (GimpVectors *, num_paths);
for (i = 0; i < num_vectors; i++, list = g_list_next (list)) for (i = 0; i < num_paths; i++, list = g_list_next (list))
vectors[i] = g_object_ref (list->data); paths[i] = g_object_ref (list->data);
} }
} }
@ -546,8 +546,8 @@ image_get_vectors_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
g_value_set_int (gimp_value_array_index (return_vals, 1), num_vectors); g_value_set_int (gimp_value_array_index (return_vals, 1), num_paths);
gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **) vectors, num_vectors); gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **) paths, num_paths);
} }
return return_vals; return return_vals;
@ -1036,27 +1036,27 @@ image_thaw_channels_invoker (GimpProcedure *procedure,
} }
static GimpValueArray * static GimpValueArray *
image_insert_vectors_invoker (GimpProcedure *procedure, image_insert_path_invoker (GimpProcedure *procedure,
Gimp *gimp, Gimp *gimp,
GimpContext *context, GimpContext *context,
GimpProgress *progress, GimpProgress *progress,
const GimpValueArray *args, const GimpValueArray *args,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpImage *image; GimpImage *image;
GimpVectors *vectors; GimpVectors *path;
GimpVectors *parent; GimpVectors *parent;
gint position; gint position;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
vectors = g_value_get_object (gimp_value_array_index (args, 1)); path = g_value_get_object (gimp_value_array_index (args, 1));
parent = g_value_get_object (gimp_value_array_index (args, 2)); parent = g_value_get_object (gimp_value_array_index (args, 2));
position = g_value_get_int (gimp_value_array_index (args, 3)); position = g_value_get_int (gimp_value_array_index (args, 3));
if (success) if (success)
{ {
if (gimp_pdb_item_is_floating (GIMP_ITEM (vectors), image, error) && if (gimp_pdb_item_is_floating (GIMP_ITEM (path), image, error) &&
(parent == NULL || (parent == NULL ||
(gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, error) && (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, error) &&
gimp_pdb_item_is_group (GIMP_ITEM (parent), error)))) gimp_pdb_item_is_group (GIMP_ITEM (parent), error))))
@ -1064,7 +1064,7 @@ image_insert_vectors_invoker (GimpProcedure *procedure,
if (position == -1 && parent == NULL) if (position == -1 && parent == NULL)
parent = GIMP_IMAGE_ACTIVE_PARENT; parent = GIMP_IMAGE_ACTIVE_PARENT;
success = gimp_image_add_vectors (image, vectors, success = gimp_image_add_vectors (image, path,
parent, MAX (position, -1), TRUE); parent, MAX (position, -1), TRUE);
} }
else else
@ -1078,24 +1078,24 @@ image_insert_vectors_invoker (GimpProcedure *procedure,
} }
static GimpValueArray * static GimpValueArray *
image_remove_vectors_invoker (GimpProcedure *procedure, image_remove_path_invoker (GimpProcedure *procedure,
Gimp *gimp, Gimp *gimp,
GimpContext *context, GimpContext *context,
GimpProgress *progress, GimpProgress *progress,
const GimpValueArray *args, const GimpValueArray *args,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpImage *image; GimpImage *image;
GimpVectors *vectors; GimpVectors *path;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
vectors = g_value_get_object (gimp_value_array_index (args, 1)); path = g_value_get_object (gimp_value_array_index (args, 1));
if (success) if (success)
{ {
if (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), image, 0, error)) if (gimp_pdb_item_is_attached (GIMP_ITEM (path), image, 0, error))
gimp_image_remove_vectors (image, vectors, TRUE, NULL); gimp_image_remove_vectors (image, path, TRUE, NULL);
else else
success = FALSE; success = FALSE;
} }
@ -1105,36 +1105,7 @@ image_remove_vectors_invoker (GimpProcedure *procedure,
} }
static GimpValueArray * static GimpValueArray *
image_freeze_vectors_invoker (GimpProcedure *procedure, image_freeze_paths_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpImage *image;
image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
GimpContainer *container = gimp_image_get_vectors (image);
if (plug_in)
success = gimp_plug_in_cleanup_vectors_freeze (plug_in, image);
if (success)
gimp_container_freeze (container);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
image_thaw_vectors_invoker (GimpProcedure *procedure,
Gimp *gimp, Gimp *gimp,
GimpContext *context, GimpContext *context,
GimpProgress *progress, GimpProgress *progress,
@ -1152,7 +1123,36 @@ image_thaw_vectors_invoker (GimpProcedure *procedure,
GimpContainer *container = gimp_image_get_vectors (image); GimpContainer *container = gimp_image_get_vectors (image);
if (plug_in) if (plug_in)
success = gimp_plug_in_cleanup_vectors_thaw (plug_in, image); success = gimp_plug_in_cleanup_paths_freeze (plug_in, image);
if (success)
gimp_container_freeze (container);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
image_thaw_paths_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpImage *image;
image = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
GimpContainer *container = gimp_image_get_vectors (image);
if (plug_in)
success = gimp_plug_in_cleanup_paths_thaw (plug_in, image);
if (success) if (success)
success = gimp_container_frozen (container); success = gimp_container_frozen (container);
@ -1902,18 +1902,18 @@ image_set_selected_channels_invoker (GimpProcedure *procedure,
} }
static GimpValueArray * static GimpValueArray *
image_get_selected_vectors_invoker (GimpProcedure *procedure, image_get_selected_paths_invoker (GimpProcedure *procedure,
Gimp *gimp, Gimp *gimp,
GimpContext *context, GimpContext *context,
GimpProgress *progress, GimpProgress *progress,
const GimpValueArray *args, const GimpValueArray *args,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
gint num_vectors = 0; gint num_paths = 0;
GimpVectors **vectors = NULL; GimpVectors **paths = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
@ -1921,16 +1921,16 @@ image_get_selected_vectors_invoker (GimpProcedure *procedure,
{ {
GList *list = gimp_image_get_selected_vectors (image); GList *list = gimp_image_get_selected_vectors (image);
num_vectors = g_list_length (list); num_paths = g_list_length (list);
if (num_vectors) if (num_paths)
{ {
gint i; gint i;
vectors = g_new (GimpVectors *, num_vectors); paths = g_new (GimpVectors *, num_paths);
for (i = 0; i < num_vectors; i++, list = g_list_next (list)) for (i = 0; i < num_paths; i++, list = g_list_next (list))
vectors[i] = g_object_ref (list->data); paths[i] = g_object_ref (list->data);
} }
} }
@ -1939,41 +1939,41 @@ image_get_selected_vectors_invoker (GimpProcedure *procedure,
if (success) if (success)
{ {
g_value_set_int (gimp_value_array_index (return_vals, 1), num_vectors); g_value_set_int (gimp_value_array_index (return_vals, 1), num_paths);
gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **) vectors, num_vectors); gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **) paths, num_paths);
} }
return return_vals; return return_vals;
} }
static GimpValueArray * static GimpValueArray *
image_set_selected_vectors_invoker (GimpProcedure *procedure, image_set_selected_paths_invoker (GimpProcedure *procedure,
Gimp *gimp, Gimp *gimp,
GimpContext *context, GimpContext *context,
GimpProgress *progress, GimpProgress *progress,
const GimpValueArray *args, const GimpValueArray *args,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpImage *image; GimpImage *image;
gint num_vectors; gint num_paths;
const GimpVectors **vectors; const GimpVectors **paths;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
num_vectors = g_value_get_int (gimp_value_array_index (args, 1)); num_paths = g_value_get_int (gimp_value_array_index (args, 1));
vectors = (const GimpVectors **) gimp_value_get_object_array (gimp_value_array_index (args, 2)); paths = (const GimpVectors **) gimp_value_get_object_array (gimp_value_array_index (args, 2));
if (success) if (success)
{ {
GList *selected_vectors = NULL; GList *selected_paths = NULL;
gint i; gint i;
for (i = 0; i < num_vectors; i++) for (i = 0; i < num_paths; i++)
selected_vectors = g_list_prepend (selected_vectors, selected_paths = g_list_prepend (selected_paths,
GIMP_LAYER (vectors[i])); GIMP_LAYER (paths[i]));
gimp_image_set_selected_vectors (image, selected_vectors); gimp_image_set_selected_vectors (image, selected_paths);
g_list_free (selected_vectors); g_list_free (selected_paths);
} }
return gimp_procedure_get_return_values (procedure, success, return gimp_procedure_get_return_values (procedure, success,
@ -2639,32 +2639,32 @@ image_get_channel_by_tattoo_invoker (GimpProcedure *procedure,
} }
static GimpValueArray * static GimpValueArray *
image_get_vectors_by_tattoo_invoker (GimpProcedure *procedure, image_get_path_by_tattoo_invoker (GimpProcedure *procedure,
Gimp *gimp, Gimp *gimp,
GimpContext *context, GimpContext *context,
GimpProgress *progress, GimpProgress *progress,
const GimpValueArray *args, const GimpValueArray *args,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
guint tattoo; guint tattoo;
GimpVectors *vectors = NULL; GimpVectors *path = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
tattoo = g_value_get_uint (gimp_value_array_index (args, 1)); tattoo = g_value_get_uint (gimp_value_array_index (args, 1));
if (success) if (success)
{ {
vectors = gimp_image_get_vectors_by_tattoo (image, tattoo); path = gimp_image_get_vectors_by_tattoo (image, tattoo);
} }
return_vals = gimp_procedure_get_return_values (procedure, success, return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
g_value_set_object (gimp_value_array_index (return_vals, 1), vectors); g_value_set_object (gimp_value_array_index (return_vals, 1), path);
return return_vals; return return_vals;
} }
@ -2732,32 +2732,32 @@ image_get_channel_by_name_invoker (GimpProcedure *procedure,
} }
static GimpValueArray * static GimpValueArray *
image_get_vectors_by_name_invoker (GimpProcedure *procedure, image_get_path_by_name_invoker (GimpProcedure *procedure,
Gimp *gimp, Gimp *gimp,
GimpContext *context, GimpContext *context,
GimpProgress *progress, GimpProgress *progress,
const GimpValueArray *args, const GimpValueArray *args,
GError **error) GError **error)
{ {
gboolean success = TRUE; gboolean success = TRUE;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpImage *image; GimpImage *image;
const gchar *name; const gchar *name;
GimpVectors *vectors = NULL; GimpVectors *path = NULL;
image = g_value_get_object (gimp_value_array_index (args, 0)); image = g_value_get_object (gimp_value_array_index (args, 0));
name = g_value_get_string (gimp_value_array_index (args, 1)); name = g_value_get_string (gimp_value_array_index (args, 1));
if (success) if (success)
{ {
vectors = gimp_image_get_vectors_by_name (image, name); path = gimp_image_get_vectors_by_name (image, name);
} }
return_vals = gimp_procedure_get_return_values (procedure, success, return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL); error ? *error : NULL);
if (success) if (success)
g_value_set_object (gimp_value_array_index (return_vals, 1), vectors); g_value_set_object (gimp_value_array_index (return_vals, 1), path);
return return_vals; return return_vals;
} }
@ -3352,14 +3352,14 @@ register_image_procs (GimpPDB *pdb)
g_object_unref (procedure); g_object_unref (procedure);
/* /*
* gimp-image-get-vectors * gimp-image-get-paths
*/ */
procedure = gimp_procedure_new (image_get_vectors_invoker); procedure = gimp_procedure_new (image_get_paths_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure), gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-image-get-vectors"); "gimp-image-get-paths");
gimp_procedure_set_static_help (procedure, gimp_procedure_set_static_help (procedure,
"Returns the list of vectors contained in the specified image.", "Returns the list of paths contained in the specified image.",
"This procedure returns the list of vectors contained in the specified image.", "This procedure returns the list of paths contained in the specified image.",
NULL); NULL);
gimp_procedure_set_static_attribution (procedure, gimp_procedure_set_static_attribution (procedure,
"Simon Budig", "Simon Budig",
@ -3372,15 +3372,15 @@ register_image_procs (GimpPDB *pdb)
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-vectors", g_param_spec_int ("num-paths",
"num vectors", "num paths",
"The number of vectors contained in the image", "The number of paths contained in the image",
0, G_MAXINT32, 0, 0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
gimp_param_spec_object_array ("vectors", gimp_param_spec_object_array ("paths",
"vectors", "paths",
"The list of vectors contained in the image.", "The list of paths contained in the image.",
GIMP_TYPE_VECTORS, GIMP_TYPE_VECTORS,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
@ -3823,14 +3823,14 @@ register_image_procs (GimpPDB *pdb)
g_object_unref (procedure); g_object_unref (procedure);
/* /*
* gimp-image-insert-vectors * gimp-image-insert-path
*/ */
procedure = gimp_procedure_new (image_insert_vectors_invoker); procedure = gimp_procedure_new (image_insert_path_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure), gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-image-insert-vectors"); "gimp-image-insert-path");
gimp_procedure_set_static_help (procedure, gimp_procedure_set_static_help (procedure,
"Add the specified vectors to the image.", "Add the specified path to the image.",
"This procedure adds the specified vectors to the image at the given position. Since vectors groups are not currently supported, the parent argument must always be 0. The position argument specifies the location of the vectors inside the stack, starting from the top (0) and increasing. If the position is specified as -1, then the vectors is inserted above the active vectors.", "This procedure adds the specified path to the image at the given position. Since path groups are not currently supported, the parent argument must always be 0. The position argument specifies the location of the path inside the stack, starting from the top (0) and increasing. If the position is specified as -1, then the path is inserted above the active path.",
NULL); NULL);
gimp_procedure_set_static_attribution (procedure, gimp_procedure_set_static_attribution (procedure,
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
@ -3843,32 +3843,32 @@ register_image_procs (GimpPDB *pdb)
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("vectors", gimp_param_spec_vectors ("path",
"vectors", "path",
"The vectors", "The path",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("parent", gimp_param_spec_vectors ("parent",
"parent", "parent",
"The parent vectors", "The parent path",
TRUE, TRUE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("position", g_param_spec_int ("position",
"position", "position",
"The vectors position", "The path position",
G_MININT32, G_MAXINT32, 0, G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
/* /*
* gimp-image-remove-vectors * gimp-image-remove-path
*/ */
procedure = gimp_procedure_new (image_remove_vectors_invoker); procedure = gimp_procedure_new (image_remove_path_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure), gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-image-remove-vectors"); "gimp-image-remove-path");
gimp_procedure_set_static_help (procedure, gimp_procedure_set_static_help (procedure,
"Remove the specified path from the image.", "Remove the specified path from the image.",
"This procedure removes the specified path from the image. If the path doesn't exist, an error is returned.", "This procedure removes the specified path from the image. If the path doesn't exist, an error is returned.",
@ -3884,25 +3884,25 @@ register_image_procs (GimpPDB *pdb)
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_vectors ("vectors", gimp_param_spec_vectors ("path",
"vectors", "path",
"The vectors object", "The path object",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
/* /*
* gimp-image-freeze-vectors * gimp-image-freeze-paths
*/ */
procedure = gimp_procedure_new (image_freeze_vectors_invoker); procedure = gimp_procedure_new (image_freeze_paths_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure), gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-image-freeze-vectors"); "gimp-image-freeze-paths");
gimp_procedure_set_static_help (procedure, gimp_procedure_set_static_help (procedure,
"Freeze the image's vectors list.", "Freeze the image's path list.",
"This procedure freezes the vectors list of the image, suppressing any updates to the Paths dialog in response to changes to the image's vectors. This can significantly improve performance while applying changes affecting the vectors list.\n" "This procedure freezes the path list of the image, suppressing any updates to the Paths dialog in response to changes to the image's path. This can significantly improve performance while applying changes affecting the path list.\n"
"\n" "\n"
"Each call to 'gimp-image-freeze-vectors' should be matched by a corresponding call to 'gimp-image-thaw-vectors', undoing its effects.", "Each call to 'gimp-image-freeze-paths' should be matched by a corresponding call to gimp_image_thaw_paths (), undoing its effects.",
NULL); NULL);
gimp_procedure_set_static_attribution (procedure, gimp_procedure_set_static_attribution (procedure,
"Ell", "Ell",
@ -3918,16 +3918,16 @@ register_image_procs (GimpPDB *pdb)
g_object_unref (procedure); g_object_unref (procedure);
/* /*
* gimp-image-thaw-vectors * gimp-image-thaw-paths
*/ */
procedure = gimp_procedure_new (image_thaw_vectors_invoker); procedure = gimp_procedure_new (image_thaw_paths_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure), gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-image-thaw-vectors"); "gimp-image-thaw-paths");
gimp_procedure_set_static_help (procedure, gimp_procedure_set_static_help (procedure,
"Thaw the image's vectors list.", "Thaw the image's path list.",
"This procedure thaws the vectors list of the image, re-enabling updates to the Paths dialog.\n" "This procedure thaws the path list of the image, re-enabling updates to the Paths dialog.\n"
"\n" "\n"
"This procedure should match a corresponding call to 'gimp-image-freeze-vectors'.", "This procedure should match a corresponding call to 'gimp-image-freeze-paths'.",
NULL); NULL);
gimp_procedure_set_static_attribution (procedure, gimp_procedure_set_static_attribution (procedure,
"Ell", "Ell",
@ -4644,14 +4644,14 @@ register_image_procs (GimpPDB *pdb)
g_object_unref (procedure); g_object_unref (procedure);
/* /*
* gimp-image-get-selected-vectors * gimp-image-get-selected-paths
*/ */
procedure = gimp_procedure_new (image_get_selected_vectors_invoker); procedure = gimp_procedure_new (image_get_selected_paths_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure), gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-image-get-selected-vectors"); "gimp-image-get-selected-paths");
gimp_procedure_set_static_help (procedure, gimp_procedure_set_static_help (procedure,
"Returns the specified image's selected vectors.", "Returns the specified image's selected paths.",
"This procedure returns the list of selected vectors in the specified image.", "This procedure returns the list of selected paths in the specified image.",
NULL); NULL);
gimp_procedure_set_static_attribution (procedure, gimp_procedure_set_static_attribution (procedure,
"Jehan", "Jehan",
@ -4664,29 +4664,29 @@ register_image_procs (GimpPDB *pdb)
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-vectors", g_param_spec_int ("num-paths",
"num vectors", "num paths",
"The number of selected vectors in the image", "The number of selected paths in the image",
0, G_MAXINT32, 0, 0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
gimp_param_spec_object_array ("vectors", gimp_param_spec_object_array ("paths",
"vectors", "paths",
"The list of selected vectors in the image.", "The list of selected paths in the image.",
GIMP_TYPE_VECTORS, GIMP_TYPE_VECTORS,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);
/* /*
* gimp-image-set-selected-vectors * gimp-image-set-selected-paths
*/ */
procedure = gimp_procedure_new (image_set_selected_vectors_invoker); procedure = gimp_procedure_new (image_set_selected_paths_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure), gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-image-set-selected-vectors"); "gimp-image-set-selected-paths");
gimp_procedure_set_static_help (procedure, gimp_procedure_set_static_help (procedure,
"Sets the specified image's selected vectors.", "Sets the specified image's selected paths.",
"The vectors are set as the selected vectors in the image.", "The paths are set as the selected paths in the image.",
NULL); NULL);
gimp_procedure_set_static_attribution (procedure, gimp_procedure_set_static_attribution (procedure,
"Jehan", "Jehan",
@ -4699,15 +4699,15 @@ register_image_procs (GimpPDB *pdb)
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-vectors", g_param_spec_int ("num-paths",
"num vectors", "num paths",
"The number of vectors to select", "The number of paths to select",
0, G_MAXINT32, 0, 0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_object_array ("vectors", gimp_param_spec_object_array ("paths",
"vectors", "paths",
"The list of vectors to select", "The list of paths to select",
GIMP_TYPE_VECTORS, GIMP_TYPE_VECTORS,
GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE)); GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
@ -5359,14 +5359,14 @@ register_image_procs (GimpPDB *pdb)
g_object_unref (procedure); g_object_unref (procedure);
/* /*
* gimp-image-get-vectors-by-tattoo * gimp-image-get-path-by-tattoo
*/ */
procedure = gimp_procedure_new (image_get_vectors_by_tattoo_invoker); procedure = gimp_procedure_new (image_get_path_by_tattoo_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure), gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-image-get-vectors-by-tattoo"); "gimp-image-get-path-by-tattoo");
gimp_procedure_set_static_help (procedure, gimp_procedure_set_static_help (procedure,
"Find a vectors with a given tattoo in an image.", "Find a path with a given tattoo in an image.",
"This procedure returns the vectors with the given tattoo in the specified image.", "This procedure returns the path with the given tattoo in the specified image.",
NULL); NULL);
gimp_procedure_set_static_attribution (procedure, gimp_procedure_set_static_attribution (procedure,
"Simon Budig", "Simon Budig",
@ -5381,13 +5381,13 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_uint ("tattoo", g_param_spec_uint ("tattoo",
"tattoo", "tattoo",
"The tattoo of the vectors to find", "The tattoo of the path to find",
1, G_MAXUINT32, 1, 1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
gimp_param_spec_vectors ("vectors", gimp_param_spec_vectors ("path",
"vectors", "path",
"The vectors with the specified tattoo", "The path with the specified tattoo",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
@ -5466,14 +5466,14 @@ register_image_procs (GimpPDB *pdb)
g_object_unref (procedure); g_object_unref (procedure);
/* /*
* gimp-image-get-vectors-by-name * gimp-image-get-path-by-name
*/ */
procedure = gimp_procedure_new (image_get_vectors_by_name_invoker); procedure = gimp_procedure_new (image_get_path_by_name_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure), gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-image-get-vectors-by-name"); "gimp-image-get-path-by-name");
gimp_procedure_set_static_help (procedure, gimp_procedure_set_static_help (procedure,
"Find a vectors with a given name in an image.", "Find a path with a given name in an image.",
"This procedure returns the vectors with the given name in the specified image.", "This procedure returns the path with the given name in the specified image.",
NULL); NULL);
gimp_procedure_set_static_attribution (procedure, gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>", "Michael Natterer <mitch@gimp.org>",
@ -5488,14 +5488,14 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name", gimp_param_spec_string ("name",
"name", "name",
"The name of the vectors to find", "The name of the path to find",
FALSE, FALSE, TRUE, FALSE, FALSE, TRUE,
NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure, gimp_procedure_add_return_value (procedure,
gimp_param_spec_vectors ("vectors", gimp_param_spec_vectors ("path",
"vectors", "path",
"The vectors with the specified name", "The path with the specified name",
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);

View file

@ -247,8 +247,8 @@ gimp_plug_in_cleanup_channels_thaw (GimpPlugIn *plug_in,
} }
gboolean gboolean
gimp_plug_in_cleanup_vectors_freeze (GimpPlugIn *plug_in, gimp_plug_in_cleanup_paths_freeze (GimpPlugIn *plug_in,
GimpImage *image) GimpImage *image)
{ {
GimpPlugInProcFrame *proc_frame; GimpPlugInProcFrame *proc_frame;
GimpPlugInCleanupImage *cleanup; GimpPlugInCleanupImage *cleanup;
@ -268,8 +268,8 @@ gimp_plug_in_cleanup_vectors_freeze (GimpPlugIn *plug_in,
} }
gboolean gboolean
gimp_plug_in_cleanup_vectors_thaw (GimpPlugIn *plug_in, gimp_plug_in_cleanup_paths_thaw (GimpPlugIn *plug_in,
GimpImage *image) GimpImage *image)
{ {
GimpPlugInProcFrame *proc_frame; GimpPlugInProcFrame *proc_frame;
GimpPlugInCleanupImage *cleanup; GimpPlugInCleanupImage *cleanup;

View file

@ -36,9 +36,9 @@ gboolean gimp_plug_in_cleanup_channels_freeze (GimpPlugIn *plug_in,
gboolean gimp_plug_in_cleanup_channels_thaw (GimpPlugIn *plug_in, gboolean gimp_plug_in_cleanup_channels_thaw (GimpPlugIn *plug_in,
GimpImage *image); GimpImage *image);
gboolean gimp_plug_in_cleanup_vectors_freeze (GimpPlugIn *plug_in, gboolean gimp_plug_in_cleanup_paths_freeze (GimpPlugIn *plug_in,
GimpImage *image); GimpImage *image);
gboolean gimp_plug_in_cleanup_vectors_thaw (GimpPlugIn *plug_in, gboolean gimp_plug_in_cleanup_paths_thaw (GimpPlugIn *plug_in,
GimpImage *image); GimpImage *image);
gboolean gimp_plug_in_cleanup_add_shadow (GimpPlugIn *plug_in, gboolean gimp_plug_in_cleanup_add_shadow (GimpPlugIn *plug_in,

View file

@ -106,7 +106,7 @@ possible in the previous API is obviously still possible.
| `gimp_fuzzy_select_full()` | `gimp_image_select_contiguous_color()` | | `gimp_fuzzy_select_full()` | `gimp_image_select_contiguous_color()` |
| `gimp_gamma()` | `gimp_drawable_get_format()` | | `gimp_gamma()` | `gimp_drawable_get_format()` |
| `gimp_get_icon_theme_dir()` | *N/A* | | `gimp_get_icon_theme_dir()` | *N/A* |
| `gimp_get_path_by_tattoo()` | `gimp_image_get_vectors_by_tattoo()` | | `gimp_get_path_by_tattoo()` | `gimp_image_get_path_by_tattoo()` |
| `gimp_get_theme_dir()` | *N/A* | | `gimp_get_theme_dir()` | *N/A* |
| `gimp_gradients_get_gradient_data()` | `gimp_gradient_get_uniform_samples()` | | `gimp_gradients_get_gradient_data()` | `gimp_gradient_get_uniform_samples()` |
| `gimp_gradients_sample_custom()` | `gimp_gradient_get_custom_samples()` | | `gimp_gradients_sample_custom()` | `gimp_gradient_get_custom_samples()` |
@ -115,7 +115,7 @@ possible in the previous API is obviously still possible.
| `gimp_hue_saturation()` | `gimp_drawable_hue_saturation()` | | `gimp_hue_saturation()` | `gimp_drawable_hue_saturation()` |
| `gimp_image_add_channel()` | `gimp_image_insert_channel()` | | `gimp_image_add_channel()` | `gimp_image_insert_channel()` |
| `gimp_image_add_layer()` | `gimp_image_insert_layer()` | | `gimp_image_add_layer()` | `gimp_image_insert_layer()` |
| `gimp_image_add_vectors()` | `gimp_image_insert_vectors()` | | `gimp_image_add_vectors()` | `gimp_image_insert_path()` |
| `gimp_image_attach_new_parasite()` | `gimp_image_attach_parasite()` | | `gimp_image_attach_new_parasite()` | `gimp_image_attach_parasite()` |
| `gimp_image_base_type()` | `gimp_image_get_base_type()` | | `gimp_image_base_type()` | `gimp_image_get_base_type()` |
| `gimp_image_free_shadow()` | `gimp_drawable_free_shadow()` | | `gimp_image_free_shadow()` | `gimp_drawable_free_shadow()` |
@ -163,15 +163,15 @@ possible in the previous API is obviously still possible.
| `gimp_parasite_flags()` | `gimp_parasite_get_flags()` | | `gimp_parasite_flags()` | `gimp_parasite_get_flags()` |
| `gimp_parasite_list()` | `gimp_get_parasite_list()` | | `gimp_parasite_list()` | `gimp_get_parasite_list()` |
| `gimp_parasite_name()` | `gimp_parasite_get_name()` | | `gimp_parasite_name()` | `gimp_parasite_get_name()` |
| `gimp_path_delete()` | `gimp_image_remove_vectors()` | | `gimp_path_delete()` | `gimp_image_remove_path()` |
| `gimp_path_get_current()` | `gimp_image_get_active_vectors()` | | `gimp_path_get_current()` | `gimp_image_get_selected_paths()` |
| `gimp_path_get_locked()` | *N/A* | | `gimp_path_get_locked()` | *N/A* |
| `gimp_path_get_points()` | `gimp_vectors_stroke_get_points()` | | `gimp_path_get_points()` | `gimp_vectors_stroke_get_points()` |
| `gimp_path_get_point_at_dist()` | `gimp_vectors_stroke_get_point_at_dist()` | | `gimp_path_get_point_at_dist()` | `gimp_vectors_stroke_get_point_at_dist()` |
| `gimp_path_get_tattoo()` | `gimp_item_get_tattoo()` | | `gimp_path_get_tattoo()` | `gimp_item_get_tattoo()` |
| `gimp_path_import()` | `gimp_vectors_import_from_file()` | | `gimp_path_import()` | `gimp_vectors_import_from_file()` |
| `gimp_path_list()` | `gimp_image_get_vectors()` | | `gimp_path_list()` | `gimp_image_get_paths()` |
| `gimp_path_set_current()` | `gimp_image_set_active_vectors()` | | `gimp_path_set_current()` | `gimp_image_set_selected_paths()` |
| `gimp_path_set_locked()` | *N/A* | | `gimp_path_set_locked()` | *N/A* |
| `gimp_path_set_points()` | `gimp_vectors_stroke_new_from_points()` | | `gimp_path_set_points()` | `gimp_vectors_stroke_new_from_points()` |
| `gimp_path_set_tattoo()` | `gimp_item_set_tattoo()` | | `gimp_path_set_tattoo()` | `gimp_item_set_tattoo()` |

View file

@ -402,7 +402,7 @@ EXPORTS
gimp_image_floating_sel_attached_to gimp_image_floating_sel_attached_to
gimp_image_freeze_channels gimp_image_freeze_channels
gimp_image_freeze_layers gimp_image_freeze_layers
gimp_image_freeze_vectors gimp_image_freeze_paths
gimp_image_get_base_type gimp_image_get_base_type
gimp_image_get_by_id gimp_image_get_by_id
gimp_image_get_channel_by_name gimp_image_get_channel_by_name
@ -437,7 +437,7 @@ EXPORTS
gimp_image_get_selected_channels gimp_image_get_selected_channels
gimp_image_get_selected_drawables gimp_image_get_selected_drawables
gimp_image_get_selected_layers gimp_image_get_selected_layers
gimp_image_get_selected_vectors gimp_image_get_selected_paths
gimp_image_get_selection gimp_image_get_selection
gimp_image_get_simulation_bpc gimp_image_get_simulation_bpc
gimp_image_get_simulation_intent gimp_image_get_simulation_intent
@ -447,9 +447,9 @@ EXPORTS
gimp_image_get_thumbnail_data gimp_image_get_thumbnail_data
gimp_image_get_type gimp_image_get_type
gimp_image_get_unit gimp_image_get_unit
gimp_image_get_vectors gimp_image_get_paths
gimp_image_get_vectors_by_name gimp_image_get_path_by_name
gimp_image_get_vectors_by_tattoo gimp_image_get_path_by_tattoo
gimp_image_get_width gimp_image_get_width
gimp_image_get_xcf_file gimp_image_get_xcf_file
gimp_image_grid_get_background_color gimp_image_grid_get_background_color
@ -465,7 +465,7 @@ EXPORTS
gimp_image_id_is_valid gimp_image_id_is_valid
gimp_image_insert_channel gimp_image_insert_channel
gimp_image_insert_layer gimp_image_insert_layer
gimp_image_insert_vectors gimp_image_insert_path
gimp_image_is_dirty gimp_image_is_dirty
gimp_image_is_valid gimp_image_is_valid
gimp_image_list_channels gimp_image_list_channels
@ -473,8 +473,8 @@ EXPORTS
gimp_image_list_selected_channels gimp_image_list_selected_channels
gimp_image_list_selected_drawables gimp_image_list_selected_drawables
gimp_image_list_selected_layers gimp_image_list_selected_layers
gimp_image_list_selected_vectors gimp_image_list_selected_paths
gimp_image_list_vectors gimp_image_list_paths
gimp_image_lower_item gimp_image_lower_item
gimp_image_lower_item_to_bottom gimp_image_lower_item_to_bottom
gimp_image_merge_down gimp_image_merge_down
@ -497,7 +497,7 @@ EXPORTS
gimp_image_raise_item_to_top gimp_image_raise_item_to_top
gimp_image_remove_channel gimp_image_remove_channel
gimp_image_remove_layer gimp_image_remove_layer
gimp_image_remove_vectors gimp_image_remove_path
gimp_image_reorder_item gimp_image_reorder_item
gimp_image_resize gimp_image_resize
gimp_image_resize_to_layers gimp_image_resize_to_layers
@ -520,7 +520,7 @@ EXPORTS
gimp_image_set_resolution gimp_image_set_resolution
gimp_image_set_selected_channels gimp_image_set_selected_channels
gimp_image_set_selected_layers gimp_image_set_selected_layers
gimp_image_set_selected_vectors gimp_image_set_selected_paths
gimp_image_set_simulation_bpc gimp_image_set_simulation_bpc
gimp_image_set_simulation_intent gimp_image_set_simulation_intent
gimp_image_set_simulation_profile gimp_image_set_simulation_profile
@ -529,10 +529,10 @@ EXPORTS
gimp_image_set_unit gimp_image_set_unit
gimp_image_take_selected_channels gimp_image_take_selected_channels
gimp_image_take_selected_layers gimp_image_take_selected_layers
gimp_image_take_selected_vectors gimp_image_take_selected_paths
gimp_image_thaw_channels gimp_image_thaw_channels
gimp_image_thaw_layers gimp_image_thaw_layers
gimp_image_thaw_vectors gimp_image_thaw_paths
gimp_image_undo_disable gimp_image_undo_disable
gimp_image_undo_enable gimp_image_undo_enable
gimp_image_undo_freeze gimp_image_undo_freeze

View file

@ -389,7 +389,7 @@ gimp_image_take_selected_channels (GimpImage *image,
} }
/** /**
* gimp_image_list_selected_vectors: (skip) * gimp_image_list_selected_paths: (skip)
* @image: The image. * @image: The image.
* *
* Returns the list of paths selected in the specified image. * Returns the list of paths selected in the specified image.
@ -405,27 +405,27 @@ gimp_image_take_selected_channels (GimpImage *image,
* Since: 3.0 * Since: 3.0
**/ **/
GList * GList *
gimp_image_list_selected_vectors (GimpImage *image) gimp_image_list_selected_paths (GimpImage *image)
{ {
GimpVectors **vectors; GimpVectors **paths;
gint num_vectors; gint num_paths;
GList *list = NULL; GList *list = NULL;
gint i; gint i;
vectors = gimp_image_get_selected_vectors (image, &num_vectors); paths = gimp_image_get_selected_paths (image, &num_paths);
for (i = 0; i < num_vectors; i++) for (i = 0; i < num_paths; i++)
list = g_list_prepend (list, vectors[i]); list = g_list_prepend (list, paths[i]);
g_free (vectors); g_free (paths);
return g_list_reverse (list); return g_list_reverse (list);
} }
/** /**
* gimp_image_take_selected_vectors: * gimp_image_take_selected_paths:
* @image: The image. * @image: The image.
* @vectors: (transfer container) (element-type GimpVectors): The list of paths to select. * @paths: (transfer container) (element-type GimpVectors): The list of paths to select.
* *
* The paths are set as the selected paths in the image. Any previous * The paths are set as the selected paths in the image. Any previous
* selected paths are unselected. * selected paths are unselected.
@ -435,21 +435,21 @@ gimp_image_list_selected_vectors (GimpImage *image)
* Since: 3.0 * Since: 3.0
**/ **/
gboolean gboolean
gimp_image_take_selected_vectors (GimpImage *image, gimp_image_take_selected_paths (GimpImage *image,
GList *vectors) GList *paths)
{ {
GimpVectors **sel_vectors; GimpVectors **sel_paths;
GList *list; GList *list;
gboolean success; gboolean success;
gint i; gint i;
sel_vectors = g_new0 (GimpVectors *, g_list_length (vectors)); sel_paths = g_new0 (GimpVectors *, g_list_length (paths));
for (list = vectors, i = 0; list; list = list->next, i++) for (list = paths, i = 0; list; list = list->next, i++)
sel_vectors[i] = list->data; sel_paths[i] = list->data;
success = gimp_image_set_selected_vectors (image, g_list_length (vectors), success = gimp_image_set_selected_paths (image, g_list_length (paths),
(const GimpVectors **) sel_vectors); (const GimpVectors **) sel_paths);
g_list_free (vectors); g_list_free (paths);
return success; return success;
} }
@ -492,35 +492,35 @@ gimp_image_list_channels (GimpImage *image)
} }
/** /**
* gimp_image_list_vectors: (skip) * gimp_image_list_paths: (skip)
* @image: The image. * @image: The image.
* *
* Returns the list of vectors contained in the specified image. * Returns the list of paths contained in the specified image.
* *
* This procedure returns the list of vectors contained in the * This procedure returns the list of paths contained in the
* specified image. * specified image.
* *
* Returns: (element-type GimpVectors) (transfer container): * Returns: (element-type GimpVectors) (transfer container):
* The list of vectors contained in the image. * The list of paths contained in the image.
* The returned value must be freed with g_list_free(). Vectors * The returned value must be freed with g_list_free(). Path
* elements belong to libgimp and must not be freed. * elements belong to libgimp and must not be freed.
* *
* Since: 3.0 * Since: 3.0
**/ **/
GList * GList *
gimp_image_list_vectors (GimpImage *image) gimp_image_list_paths (GimpImage *image)
{ {
GimpVectors **vectors; GimpVectors **paths;
gint num_vectors; gint num_paths;
GList *list = NULL; GList *list = NULL;
gint i; gint i;
vectors = gimp_image_get_vectors (image, &num_vectors); paths = gimp_image_get_paths (image, &num_paths);
for (i = 0; i < num_vectors; i++) for (i = 0; i < num_paths; i++)
list = g_list_prepend (list, vectors[i]); list = g_list_prepend (list, paths[i]);
g_free (vectors); g_free (paths);
return g_list_reverse (list); return g_list_reverse (list);
} }

View file

@ -44,7 +44,7 @@ GList * gimp_list_images (void);
GList * gimp_image_list_layers (GimpImage *image); GList * gimp_image_list_layers (GimpImage *image);
GList * gimp_image_list_channels (GimpImage *image); GList * gimp_image_list_channels (GimpImage *image);
GList * gimp_image_list_vectors (GimpImage *image); GList * gimp_image_list_paths (GimpImage *image);
GList * gimp_image_list_selected_layers (GimpImage *image); GList * gimp_image_list_selected_layers (GimpImage *image);
gboolean gimp_image_take_selected_layers (GimpImage *image, gboolean gimp_image_take_selected_layers (GimpImage *image,
@ -52,9 +52,9 @@ gboolean gimp_image_take_selected_layers (GimpImage *image,
GList * gimp_image_list_selected_channels (GimpImage *image); GList * gimp_image_list_selected_channels (GimpImage *image);
gboolean gimp_image_take_selected_channels (GimpImage *image, gboolean gimp_image_take_selected_channels (GimpImage *image,
GList *channels); GList *channels);
GList * gimp_image_list_selected_vectors (GimpImage *image); GList * gimp_image_list_selected_paths (GimpImage *image);
gboolean gimp_image_take_selected_vectors (GimpImage *image, gboolean gimp_image_take_selected_paths (GimpImage *image,
GList *vectors); GList *paths);
GList * gimp_image_list_selected_drawables (GimpImage *image); GList * gimp_image_list_selected_drawables (GimpImage *image);

View file

@ -560,49 +560,49 @@ gimp_image_get_channels (GimpImage *image,
} }
/** /**
* gimp_image_get_vectors: * gimp_image_get_paths:
* @image: The image. * @image: The image.
* @num_vectors: (out): The number of vectors contained in the image. * @num_paths: (out): The number of paths contained in the image.
* *
* Returns the list of vectors contained in the specified image. * Returns the list of paths contained in the specified image.
* *
* This procedure returns the list of vectors contained in the * This procedure returns the list of paths contained in the specified
* specified image. * image.
* *
* Returns: (array length=num_vectors) (element-type GimpVectors) (transfer container): * Returns: (array length=num_paths) (element-type GimpVectors) (transfer container):
* The list of vectors contained in the image. * The list of paths contained in the image.
* The returned value must be freed with g_free(). * The returned value must be freed with g_free().
* *
* Since: 2.4 * Since: 2.4
**/ **/
GimpVectors ** GimpVectors **
gimp_image_get_vectors (GimpImage *image, gimp_image_get_paths (GimpImage *image,
gint *num_vectors) gint *num_paths)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors **vectors = NULL; GimpVectors **paths = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-image-get-vectors", "gimp-image-get-paths",
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_vectors = 0; *num_paths = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ {
*num_vectors = GIMP_VALUES_GET_INT (return_vals, 1); *num_paths = GIMP_VALUES_GET_INT (return_vals, 1);
{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index (return_vals, 2)); if (a) vectors = g_memdup2 (a->data, a->length * sizeof (gpointer)); }; { GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index (return_vals, 2)); if (a) paths = g_memdup2 (a->data, a->length * sizeof (gpointer)); };
} }
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);
return vectors; return paths;
} }
/** /**
@ -1171,28 +1171,28 @@ gimp_image_thaw_channels (GimpImage *image)
} }
/** /**
* gimp_image_insert_vectors: * gimp_image_insert_path:
* @image: The image. * @image: The image.
* @vectors: The vectors. * @path: The path.
* @parent: (nullable): The parent vectors. * @parent: (nullable): The parent path.
* @position: The vectors position. * @position: The path position.
* *
* Add the specified vectors to the image. * Add the specified path to the image.
* *
* This procedure adds the specified vectors to the image at the given * This procedure adds the specified path to the image at the given
* position. Since vectors groups are not currently supported, the * position. Since path groups are not currently supported, the parent
* parent argument must always be 0. The position argument specifies * argument must always be 0. The position argument specifies the
* the location of the vectors inside the stack, starting from the top * location of the path inside the stack, starting from the top (0) and
* (0) and increasing. If the position is specified as -1, then the * increasing. If the position is specified as -1, then the path is
* vectors is inserted above the active vectors. * inserted above the active path.
* *
* Returns: TRUE on success. * Returns: TRUE on success.
**/ **/
gboolean gboolean
gimp_image_insert_vectors (GimpImage *image, gimp_image_insert_path (GimpImage *image,
GimpVectors *vectors, GimpVectors *path,
GimpVectors *parent, GimpVectors *parent,
gint position) gint position)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -1200,13 +1200,13 @@ gimp_image_insert_vectors (GimpImage *image,
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
GIMP_TYPE_VECTORS, vectors, GIMP_TYPE_VECTORS, path,
GIMP_TYPE_VECTORS, parent, GIMP_TYPE_VECTORS, parent,
G_TYPE_INT, position, G_TYPE_INT, position,
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-image-insert-vectors", "gimp-image-insert-path",
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
@ -1218,9 +1218,9 @@ gimp_image_insert_vectors (GimpImage *image,
} }
/** /**
* gimp_image_remove_vectors: * gimp_image_remove_path:
* @image: The image. * @image: The image.
* @vectors: The vectors object. * @path: The path object.
* *
* Remove the specified path from the image. * Remove the specified path from the image.
* *
@ -1232,8 +1232,8 @@ gimp_image_insert_vectors (GimpImage *image,
* Since: 2.4 * Since: 2.4
**/ **/
gboolean gboolean
gimp_image_remove_vectors (GimpImage *image, gimp_image_remove_path (GimpImage *image,
GimpVectors *vectors) GimpVectors *path)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -1241,11 +1241,11 @@ gimp_image_remove_vectors (GimpImage *image,
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
GIMP_TYPE_VECTORS, vectors, GIMP_TYPE_VECTORS, path,
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-image-remove-vectors", "gimp-image-remove-path",
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
@ -1257,26 +1257,25 @@ gimp_image_remove_vectors (GimpImage *image,
} }
/** /**
* gimp_image_freeze_vectors: * gimp_image_freeze_paths:
* @image: The image. * @image: The image.
* *
* Freeze the image's vectors list. * Freeze the image's path list.
* *
* This procedure freezes the vectors list of the image, suppressing * This procedure freezes the path list of the image, suppressing any
* any updates to the Paths dialog in response to changes to the * updates to the Paths dialog in response to changes to the image's
* image's vectors. This can significantly improve performance while * path. This can significantly improve performance while applying
* applying changes affecting the vectors list. * changes affecting the path list.
* *
* Each call to gimp_image_freeze_vectors() should be matched by a * Each call to gimp_image_freeze_paths() should be matched by a
* corresponding call to gimp_image_thaw_vectors(), undoing its * corresponding call to gimp_image_thaw_paths (), undoing its effects.
* effects.
* *
* Returns: TRUE on success. * Returns: TRUE on success.
* *
* Since: 2.10.2 * Since: 2.10.2
**/ **/
gboolean gboolean
gimp_image_freeze_vectors (GimpImage *image) gimp_image_freeze_paths (GimpImage *image)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -1287,7 +1286,7 @@ gimp_image_freeze_vectors (GimpImage *image)
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-image-freeze-vectors", "gimp-image-freeze-paths",
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
@ -1299,23 +1298,23 @@ gimp_image_freeze_vectors (GimpImage *image)
} }
/** /**
* gimp_image_thaw_vectors: * gimp_image_thaw_paths:
* @image: The image. * @image: The image.
* *
* Thaw the image's vectors list. * Thaw the image's path list.
* *
* This procedure thaws the vectors list of the image, re-enabling * This procedure thaws the path list of the image, re-enabling updates
* updates to the Paths dialog. * to the Paths dialog.
* *
* This procedure should match a corresponding call to * This procedure should match a corresponding call to
* gimp_image_freeze_vectors(). * gimp_image_freeze_paths().
* *
* Returns: TRUE on success. * Returns: TRUE on success.
* *
* Since: 2.10.2 * Since: 2.10.2
**/ **/
gboolean gboolean
gimp_image_thaw_vectors (GimpImage *image) gimp_image_thaw_paths (GimpImage *image)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -1326,7 +1325,7 @@ gimp_image_thaw_vectors (GimpImage *image)
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-image-thaw-vectors", "gimp-image-thaw-paths",
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
@ -2212,69 +2211,69 @@ gimp_image_set_selected_channels (GimpImage *image,
} }
/** /**
* gimp_image_get_selected_vectors: * gimp_image_get_selected_paths:
* @image: The image. * @image: The image.
* @num_vectors: (out): The number of selected vectors in the image. * @num_paths: (out): The number of selected paths in the image.
* *
* Returns the specified image's selected vectors. * Returns the specified image's selected paths.
* *
* This procedure returns the list of selected vectors in the specified * This procedure returns the list of selected paths in the specified
* image. * image.
* *
* Returns: (array length=num_vectors) (element-type GimpVectors) (transfer container): * Returns: (array length=num_paths) (element-type GimpVectors) (transfer container):
* The list of selected vectors in the image. * The list of selected paths in the image.
* The returned value must be freed with g_free(). * The returned value must be freed with g_free().
* *
* Since: 3.0.0 * Since: 3.0.0
**/ **/
GimpVectors ** GimpVectors **
gimp_image_get_selected_vectors (GimpImage *image, gimp_image_get_selected_paths (GimpImage *image,
gint *num_vectors) gint *num_paths)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors **vectors = NULL; GimpVectors **paths = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-image-get-selected-vectors", "gimp-image-get-selected-paths",
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
*num_vectors = 0; *num_paths = 0;
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
{ {
*num_vectors = GIMP_VALUES_GET_INT (return_vals, 1); *num_paths = GIMP_VALUES_GET_INT (return_vals, 1);
{ GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index (return_vals, 2)); if (a) vectors = g_memdup2 (a->data, a->length * sizeof (gpointer)); }; { GimpObjectArray *a = g_value_get_boxed (gimp_value_array_index (return_vals, 2)); if (a) paths = g_memdup2 (a->data, a->length * sizeof (gpointer)); };
} }
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);
return vectors; return paths;
} }
/** /**
* gimp_image_set_selected_vectors: * gimp_image_set_selected_paths:
* @image: The image. * @image: The image.
* @num_vectors: The number of vectors to select. * @num_paths: The number of paths to select.
* @vectors: (array length=num_vectors) (element-type GimpVectors): The list of vectors to select. * @paths: (array length=num_paths) (element-type GimpVectors): The list of paths to select.
* *
* Sets the specified image's selected vectors. * Sets the specified image's selected paths.
* *
* The vectors are set as the selected vectors in the image. * The paths are set as the selected paths in the image.
* *
* Returns: TRUE on success. * Returns: TRUE on success.
* *
* Since: 3.0.0 * Since: 3.0.0
**/ **/
gboolean gboolean
gimp_image_set_selected_vectors (GimpImage *image, gimp_image_set_selected_paths (GimpImage *image,
gint num_vectors, gint num_paths,
const GimpVectors **vectors) const GimpVectors **paths)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
@ -2282,13 +2281,13 @@ gimp_image_set_selected_vectors (GimpImage *image,
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
G_TYPE_INT, num_vectors, G_TYPE_INT, num_paths,
GIMP_TYPE_OBJECT_ARRAY, NULL, GIMP_TYPE_OBJECT_ARRAY, NULL,
G_TYPE_NONE); G_TYPE_NONE);
gimp_value_set_object_array (gimp_value_array_index (args, 2), GIMP_TYPE_VECTORS, (GObject **) vectors, num_vectors); gimp_value_set_object_array (gimp_value_array_index (args, 2), GIMP_TYPE_VECTORS, (GObject **) paths, num_paths);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-image-set-selected-vectors", "gimp-image-set-selected-paths",
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
@ -3111,26 +3110,26 @@ gimp_image_get_channel_by_tattoo (GimpImage *image,
} }
/** /**
* gimp_image_get_vectors_by_tattoo: * gimp_image_get_path_by_tattoo:
* @image: The image. * @image: The image.
* @tattoo: The tattoo of the vectors to find. * @tattoo: The tattoo of the path to find.
* *
* Find a vectors with a given tattoo in an image. * Find a path with a given tattoo in an image.
* *
* This procedure returns the vectors with the given tattoo in the * This procedure returns the path with the given tattoo in the
* specified image. * specified image.
* *
* Returns: (transfer none): The vectors with the specified tattoo. * Returns: (transfer none): The path with the specified tattoo.
* *
* Since: 2.6 * Since: 2.6
**/ **/
GimpVectors * GimpVectors *
gimp_image_get_vectors_by_tattoo (GimpImage *image, gimp_image_get_path_by_tattoo (GimpImage *image,
guint tattoo) guint tattoo)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *vectors = NULL; GimpVectors *path = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
@ -3138,16 +3137,16 @@ gimp_image_get_vectors_by_tattoo (GimpImage *image,
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-image-get-vectors-by-tattoo", "gimp-image-get-path-by-tattoo",
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
vectors = GIMP_VALUES_GET_VECTORS (return_vals, 1); path = GIMP_VALUES_GET_VECTORS (return_vals, 1);
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);
return vectors; return path;
} }
/** /**
@ -3231,26 +3230,26 @@ gimp_image_get_channel_by_name (GimpImage *image,
} }
/** /**
* gimp_image_get_vectors_by_name: * gimp_image_get_path_by_name:
* @image: The image. * @image: The image.
* @name: The name of the vectors to find. * @name: The name of the path to find.
* *
* Find a vectors with a given name in an image. * Find a path with a given name in an image.
* *
* This procedure returns the vectors with the given name in the * This procedure returns the path with the given name in the specified
* specified image. * image.
* *
* Returns: (transfer none): The vectors with the specified name. * Returns: (transfer none): The path with the specified name.
* *
* Since: 2.8 * Since: 2.8
**/ **/
GimpVectors * GimpVectors *
gimp_image_get_vectors_by_name (GimpImage *image, gimp_image_get_path_by_name (GimpImage *image,
const gchar *name) const gchar *name)
{ {
GimpValueArray *args; GimpValueArray *args;
GimpValueArray *return_vals; GimpValueArray *return_vals;
GimpVectors *vectors = NULL; GimpVectors *path = NULL;
args = gimp_value_array_new_from_types (NULL, args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_IMAGE, image, GIMP_TYPE_IMAGE, image,
@ -3258,16 +3257,16 @@ gimp_image_get_vectors_by_name (GimpImage *image,
G_TYPE_NONE); G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (), return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-image-get-vectors-by-name", "gimp-image-get-path-by-name",
args); args);
gimp_value_array_unref (args); gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS) if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
vectors = GIMP_VALUES_GET_VECTORS (return_vals, 1); path = GIMP_VALUES_GET_VECTORS (return_vals, 1);
gimp_value_array_unref (return_vals); gimp_value_array_unref (return_vals);
return vectors; return path;
} }
/** /**

View file

@ -52,8 +52,8 @@ GimpLayer** gimp_image_get_layers (GimpImage
gint *num_layers); gint *num_layers);
GimpChannel** gimp_image_get_channels (GimpImage *image, GimpChannel** gimp_image_get_channels (GimpImage *image,
gint *num_channels); gint *num_channels);
GimpVectors** gimp_image_get_vectors (GimpImage *image, GimpVectors** gimp_image_get_paths (GimpImage *image,
gint *num_vectors); gint *num_paths);
gboolean gimp_image_unset_active_channel (GimpImage *image); gboolean gimp_image_unset_active_channel (GimpImage *image);
GimpLayer* gimp_image_get_floating_sel (GimpImage *image); GimpLayer* gimp_image_get_floating_sel (GimpImage *image);
GimpDrawable* gimp_image_floating_sel_attached_to (GimpImage *image); GimpDrawable* gimp_image_floating_sel_attached_to (GimpImage *image);
@ -85,14 +85,14 @@ gboolean gimp_image_remove_channel (GimpImage
GimpChannel *channel); GimpChannel *channel);
gboolean gimp_image_freeze_channels (GimpImage *image); gboolean gimp_image_freeze_channels (GimpImage *image);
gboolean gimp_image_thaw_channels (GimpImage *image); gboolean gimp_image_thaw_channels (GimpImage *image);
gboolean gimp_image_insert_vectors (GimpImage *image, gboolean gimp_image_insert_path (GimpImage *image,
GimpVectors *vectors, GimpVectors *path,
GimpVectors *parent, GimpVectors *parent,
gint position); gint position);
gboolean gimp_image_remove_vectors (GimpImage *image, gboolean gimp_image_remove_path (GimpImage *image,
GimpVectors *vectors); GimpVectors *path);
gboolean gimp_image_freeze_vectors (GimpImage *image); gboolean gimp_image_freeze_paths (GimpImage *image);
gboolean gimp_image_thaw_vectors (GimpImage *image); gboolean gimp_image_thaw_paths (GimpImage *image);
gint gimp_image_get_item_position (GimpImage *image, gint gimp_image_get_item_position (GimpImage *image,
GimpItem *item); GimpItem *item);
gboolean gimp_image_raise_item (GimpImage *image, gboolean gimp_image_raise_item (GimpImage *image,
@ -139,11 +139,11 @@ GimpChannel** gimp_image_get_selected_channels (GimpImage
gboolean gimp_image_set_selected_channels (GimpImage *image, gboolean gimp_image_set_selected_channels (GimpImage *image,
gint num_channels, gint num_channels,
const GimpChannel **channels); const GimpChannel **channels);
GimpVectors** gimp_image_get_selected_vectors (GimpImage *image, GimpVectors** gimp_image_get_selected_paths (GimpImage *image,
gint *num_vectors); gint *num_paths);
gboolean gimp_image_set_selected_vectors (GimpImage *image, gboolean gimp_image_set_selected_paths (GimpImage *image,
gint num_vectors, gint num_paths,
const GimpVectors **vectors); const GimpVectors **paths);
GimpItem** gimp_image_get_selected_drawables (GimpImage *image, GimpItem** gimp_image_get_selected_drawables (GimpImage *image,
gint *num_drawables); gint *num_drawables);
GimpSelection* gimp_image_get_selection (GimpImage *image); GimpSelection* gimp_image_get_selection (GimpImage *image);
@ -180,13 +180,13 @@ GimpLayer* gimp_image_get_layer_by_tattoo (GimpImage
guint tattoo); guint tattoo);
GimpChannel* gimp_image_get_channel_by_tattoo (GimpImage *image, GimpChannel* gimp_image_get_channel_by_tattoo (GimpImage *image,
guint tattoo); guint tattoo);
GimpVectors* gimp_image_get_vectors_by_tattoo (GimpImage *image, GimpVectors* gimp_image_get_path_by_tattoo (GimpImage *image,
guint tattoo); guint tattoo);
GimpLayer* gimp_image_get_layer_by_name (GimpImage *image, GimpLayer* gimp_image_get_layer_by_name (GimpImage *image,
const gchar *name); const gchar *name);
GimpChannel* gimp_image_get_channel_by_name (GimpImage *image, GimpChannel* gimp_image_get_channel_by_name (GimpImage *image,
const gchar *name); const gchar *name);
GimpVectors* gimp_image_get_vectors_by_name (GimpImage *image, GimpVectors* gimp_image_get_path_by_name (GimpImage *image,
const gchar *name); const gchar *name);
gboolean gimp_image_attach_parasite (GimpImage *image, gboolean gimp_image_attach_parasite (GimpImage *image,
const GimpParasite *parasite); const GimpParasite *parasite);

View file

@ -43,7 +43,7 @@
* @short_description: Widgets providing popup menus of items. * @short_description: Widgets providing popup menus of items.
* *
* Widgets providing popup menus of items (layers, channels, * Widgets providing popup menus of items (layers, channels,
* drawables, vectors). * drawables, paths).
**/ **/
@ -418,7 +418,7 @@ gimp_item_combo_box_populate (GimpIntComboBox *combo_box)
if (GIMP_IS_VECTORS_COMBO_BOX (combo_box)) if (GIMP_IS_VECTORS_COMBO_BOX (combo_box))
{ {
items = gimp_image_list_vectors (image); items = gimp_image_list_paths (image);
gimp_item_combo_box_model_add (combo_box, GTK_LIST_STORE (model), gimp_item_combo_box_model_add (combo_box, GTK_LIST_STORE (model),
image, items, 0); image, items, 0);
g_list_free (items); g_list_free (items);

View file

@ -332,11 +332,11 @@ CODE
); );
} }
sub image_get_vectors { sub image_get_paths {
$blurb = 'Returns the list of vectors contained in the specified image.'; $blurb = 'Returns the list of paths contained in the specified image.';
$help = <<HELP; $help = <<HELP;
This procedure returns the list of vectors contained in the specified image. This procedure returns the list of paths contained in the specified image.
HELP HELP
&simon_pdb_misc('2005', '2.4'); &simon_pdb_misc('2005', '2.4');
@ -347,10 +347,10 @@ HELP
); );
@outargs = ( @outargs = (
{ name => 'vectors', type => 'vectorarray', { name => 'paths', type => 'vectorarray',
desc => 'The list of vectors contained in the image.', desc => 'The list of paths contained in the image.',
array => { name => 'num_vectors', array => { name => 'num_paths',
desc => 'The number of vectors contained in the image' } } desc => 'The number of paths contained in the image' } }
); );
%invoke = ( %invoke = (
@ -358,16 +358,16 @@ HELP
{ {
GList *list = gimp_image_get_vectors_iter (image); GList *list = gimp_image_get_vectors_iter (image);
num_vectors = g_list_length (list); num_paths = g_list_length (list);
if (num_vectors) if (num_paths)
{ {
gint i; gint i;
vectors = g_new (GimpVectors *, num_vectors); paths = g_new (GimpVectors *, num_paths);
for (i = 0; i < num_vectors; i++, list = g_list_next (list)) for (i = 0; i < num_paths; i++, list = g_list_next (list))
vectors[i] = g_object_ref (list->data); paths[i] = g_object_ref (list->data);
} }
} }
CODE CODE
@ -1208,16 +1208,16 @@ CODE
); );
} }
sub image_insert_vectors { sub image_insert_path {
$blurb = 'Add the specified vectors to the image.'; $blurb = 'Add the specified path to the image.';
$help = <<'HELP'; $help = <<'HELP';
This procedure adds the specified vectors to the image at the given This procedure adds the specified path to the image at the given
position. Since vectors groups are not currently supported, the parent position. Since path groups are not currently supported, the parent
argument must always be 0. The position argument specifies the argument must always be 0. The position argument specifies the
location of the vectors inside the stack, starting from the top (0) and location of the path inside the stack, starting from the top (0) and
increasing. If the position is specified as -1, then the vectors is increasing. If the position is specified as -1, then the path is
inserted above the active vectors. inserted above the active path.
HELP HELP
&std_pdb_misc; &std_pdb_misc;
@ -1225,17 +1225,17 @@ HELP
@inargs = ( @inargs = (
{ name => 'image', type => 'image', { name => 'image', type => 'image',
desc => 'The image' }, desc => 'The image' },
{ name => 'vectors', type => 'vectors', { name => 'path', type => 'vectors',
desc => 'The vectors' }, desc => 'The path' },
{ name => 'parent', type => 'vectors', none_ok => 1, { name => 'parent', type => 'vectors', none_ok => 1,
desc => 'The parent vectors' }, desc => 'The parent path' },
{ name => 'position', type => 'int32', { name => 'position', type => 'int32',
desc => 'The vectors position' } desc => 'The path position' }
); );
$invoke{code} = <<'CODE'; $invoke{code} = <<'CODE';
{ {
if (gimp_pdb_item_is_floating (GIMP_ITEM (vectors), image, error) && if (gimp_pdb_item_is_floating (GIMP_ITEM (path), image, error) &&
(parent == NULL || (parent == NULL ||
(gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, error) && (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, error) &&
gimp_pdb_item_is_group (GIMP_ITEM (parent), error)))) gimp_pdb_item_is_group (GIMP_ITEM (parent), error))))
@ -1243,7 +1243,7 @@ HELP
if (position == -1 && parent == NULL) if (position == -1 && parent == NULL)
parent = GIMP_IMAGE_ACTIVE_PARENT; parent = GIMP_IMAGE_ACTIVE_PARENT;
success = gimp_image_add_vectors (image, vectors, success = gimp_image_add_vectors (image, path,
parent, MAX (position, -1), TRUE); parent, MAX (position, -1), TRUE);
} }
else else
@ -1254,7 +1254,7 @@ HELP
CODE CODE
} }
sub image_remove_vectors { sub image_remove_path {
$blurb = 'Remove the specified path from the image.'; $blurb = 'Remove the specified path from the image.';
$help = <<'HELP'; $help = <<'HELP';
@ -1267,15 +1267,15 @@ HELP
@inargs = ( @inargs = (
{ name => 'image', type => 'image', { name => 'image', type => 'image',
desc => 'The image' }, desc => 'The image' },
{ name => 'vectors', type => 'vectors', { name => 'path', type => 'vectors',
desc => 'The vectors object' } desc => 'The path object' }
); );
%invoke = ( %invoke = (
code => <<'CODE' code => <<'CODE'
{ {
if (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), image, 0, error)) if (gimp_pdb_item_is_attached (GIMP_ITEM (path), image, 0, error))
gimp_image_remove_vectors (image, vectors, TRUE, NULL); gimp_image_remove_vectors (image, path, TRUE, NULL);
else else
success = FALSE; success = FALSE;
} }
@ -1283,20 +1283,20 @@ CODE
); );
} }
sub image_freeze_vectors { sub image_freeze_paths {
$blurb = "Freeze the image's vectors list."; $blurb = "Freeze the image's path list.";
&ell_pdb_misc('2018', '2.10.2'); &ell_pdb_misc('2018', '2.10.2');
$help = <<'HELP'; $help = <<'HELP';
This procedure freezes the vectors list of the image, suppressing any This procedure freezes the path list of the image, suppressing any
updates to the Paths dialog in response to changes to the image's updates to the Paths dialog in response to changes to the image's
vectors. This can significantly improve performance while applying path. This can significantly improve performance while applying
changes affecting the vectors list. changes affecting the path list.
Each call to gimp_image_freeze_vectors() should be matched by a Each call to gimp_image_freeze_paths() should be matched by a
corresponding call to gimp_image_thaw_vectors(), undoing its corresponding call to gimp_image_thaw_paths (), undoing its
effects. effects.
HELP HELP
@ -1312,7 +1312,7 @@ HELP
GimpContainer *container = gimp_image_get_vectors (image); GimpContainer *container = gimp_image_get_vectors (image);
if (plug_in) if (plug_in)
success = gimp_plug_in_cleanup_vectors_freeze (plug_in, image); success = gimp_plug_in_cleanup_paths_freeze (plug_in, image);
if (success) if (success)
gimp_container_freeze (container); gimp_container_freeze (container);
@ -1321,18 +1321,18 @@ CODE
); );
} }
sub image_thaw_vectors { sub image_thaw_paths {
$blurb = "Thaw the image's vectors list."; $blurb = "Thaw the image's path list.";
&ell_pdb_misc('2018', '2.10.2'); &ell_pdb_misc('2018', '2.10.2');
$help = <<'HELP'; $help = <<'HELP';
This procedure thaws the vectors list of the image, re-enabling This procedure thaws the path list of the image, re-enabling
updates to the Paths dialog. updates to the Paths dialog.
This procedure should match a corresponding call to This procedure should match a corresponding call to
gimp_image_freeze_vectors(). gimp_image_freeze_paths().
HELP HELP
@inargs = ( @inargs = (
@ -1347,7 +1347,7 @@ HELP
GimpContainer *container = gimp_image_get_vectors (image); GimpContainer *container = gimp_image_get_vectors (image);
if (plug_in) if (plug_in)
success = gimp_plug_in_cleanup_vectors_thaw (plug_in, image); success = gimp_plug_in_cleanup_paths_thaw (plug_in, image);
if (success) if (success)
success = gimp_container_frozen (container); success = gimp_container_frozen (container);
@ -1947,11 +1947,11 @@ CODE
); );
} }
sub image_get_selected_vectors { sub image_get_selected_paths {
$blurb = "Returns the specified image's selected vectors."; $blurb = "Returns the specified image's selected paths.";
$help = <<'HELP'; $help = <<'HELP';
This procedure returns the list of selected vectors in the specified image. This procedure returns the list of selected paths in the specified image.
HELP HELP
&jehan_pdb_misc('2022', '3.0.0'); &jehan_pdb_misc('2022', '3.0.0');
@ -1962,10 +1962,10 @@ HELP
); );
@outargs = ( @outargs = (
{ name => 'vectors', type => 'vectorarray', { name => 'paths', type => 'vectorarray',
desc => 'The list of selected vectors in the image.', desc => 'The list of selected paths in the image.',
array => { name => 'num_vectors', array => { name => 'num_paths',
desc => 'The number of selected vectors in the image' } } desc => 'The number of selected paths in the image' } }
); );
%invoke = ( %invoke = (
@ -1973,27 +1973,27 @@ HELP
{ {
GList *list = gimp_image_get_selected_vectors (image); GList *list = gimp_image_get_selected_vectors (image);
num_vectors = g_list_length (list); num_paths = g_list_length (list);
if (num_vectors) if (num_paths)
{ {
gint i; gint i;
vectors = g_new (GimpVectors *, num_vectors); paths = g_new (GimpVectors *, num_paths);
for (i = 0; i < num_vectors; i++, list = g_list_next (list)) for (i = 0; i < num_paths; i++, list = g_list_next (list))
vectors[i] = g_object_ref (list->data); paths[i] = g_object_ref (list->data);
} }
} }
CODE CODE
); );
} }
sub image_set_selected_vectors { sub image_set_selected_paths {
$blurb = "Sets the specified image's selected vectors."; $blurb = "Sets the specified image's selected paths.";
$help = <<'HELP'; $help = <<'HELP';
The vectors are set as the selected vectors in the image. The paths are set as the selected paths in the image.
HELP HELP
&jehan_pdb_misc('2022', '3.0.0'); &jehan_pdb_misc('2022', '3.0.0');
@ -2001,26 +2001,26 @@ HELP
@inargs = ( @inargs = (
{ name => 'image', type => 'image', { name => 'image', type => 'image',
desc => 'The image' }, desc => 'The image' },
{ name => 'vectors', type => 'vectorarray', { name => 'paths', type => 'vectorarray',
desc => 'The list of vectors to select', desc => 'The list of paths to select',
no_validate => 1, no_validate => 1,
array => { name => 'num_vectors', array => { name => 'num_paths',
type => '0 <= int32', type => '0 <= int32',
desc => 'The number of vectors to select' } } desc => 'The number of paths to select' } }
); );
%invoke = ( %invoke = (
code => <<'CODE' code => <<'CODE'
{ {
GList *selected_vectors = NULL; GList *selected_paths = NULL;
gint i; gint i;
for (i = 0; i < num_vectors; i++) for (i = 0; i < num_paths; i++)
selected_vectors = g_list_prepend (selected_vectors, selected_paths = g_list_prepend (selected_paths,
GIMP_LAYER (vectors[i])); GIMP_LAYER (paths[i]));
gimp_image_set_selected_vectors (image, selected_vectors); gimp_image_set_selected_vectors (image, selected_paths);
g_list_free (selected_vectors); g_list_free (selected_paths);
} }
CODE CODE
); );
@ -2742,11 +2742,11 @@ CODE
); );
} }
sub image_get_vectors_by_tattoo { sub image_get_path_by_tattoo {
$blurb = 'Find a vectors with a given tattoo in an image.'; $blurb = 'Find a path with a given tattoo in an image.';
$help = <<'HELP'; $help = <<'HELP';
This procedure returns the vectors with the given tattoo in the This procedure returns the path with the given tattoo in the
specified image. specified image.
HELP HELP
@ -2756,18 +2756,18 @@ HELP
{ name => 'image', type => 'image', { name => 'image', type => 'image',
desc => 'The image' }, desc => 'The image' },
{ name => 'tattoo', type => 'tattoo', { name => 'tattoo', type => 'tattoo',
desc => 'The tattoo of the vectors to find' } desc => 'The tattoo of the path to find' }
); );
@outargs = ( @outargs = (
{ name => 'vectors', type => 'vectors', { name => 'path', type => 'vectors',
desc => 'The vectors with the specified tattoo' } desc => 'The path with the specified tattoo' }
); );
%invoke = ( %invoke = (
code => <<'CODE' code => <<'CODE'
{ {
vectors = gimp_image_get_vectors_by_tattoo (image, tattoo); path = gimp_image_get_vectors_by_tattoo (image, tattoo);
} }
CODE CODE
); );
@ -2833,11 +2833,11 @@ CODE
); );
} }
sub image_get_vectors_by_name { sub image_get_path_by_name {
$blurb = 'Find a vectors with a given name in an image.'; $blurb = 'Find a path with a given name in an image.';
$help = <<'HELP'; $help = <<'HELP';
This procedure returns the vectors with the given name in the This procedure returns the path with the given name in the
specified image. specified image.
HELP HELP
@ -2847,18 +2847,18 @@ HELP
{ name => 'image', type => 'image', { name => 'image', type => 'image',
desc => 'The image' }, desc => 'The image' },
{ name => 'name', type => 'string', non_empty => 1, { name => 'name', type => 'string', non_empty => 1,
desc => 'The name of the vectors to find' } desc => 'The name of the path to find' }
); );
@outargs = ( @outargs = (
{ name => 'vectors', type => 'vectors', { name => 'path', type => 'vectors',
desc => 'The vectors with the specified name' } desc => 'The path with the specified name' }
); );
%invoke = ( %invoke = (
code => <<'CODE' code => <<'CODE'
{ {
vectors = gimp_image_get_vectors_by_name (image, name); path = gimp_image_get_vectors_by_name (image, name);
} }
CODE CODE
); );
@ -3160,7 +3160,7 @@ CODE
image_get_width image_get_height image_get_width image_get_height
image_get_layers image_get_layers
image_get_channels image_get_channels
image_get_vectors image_get_paths
image_unset_active_channel image_unset_active_channel
image_get_floating_sel image_get_floating_sel
image_floating_sel_attached_to image_floating_sel_attached_to
@ -3170,8 +3170,8 @@ CODE
image_freeze_layers image_thaw_layers image_freeze_layers image_thaw_layers
image_insert_channel image_remove_channel image_insert_channel image_remove_channel
image_freeze_channels image_thaw_channels image_freeze_channels image_thaw_channels
image_insert_vectors image_remove_vectors image_insert_path image_remove_path
image_freeze_vectors image_thaw_vectors image_freeze_paths image_thaw_paths
image_get_item_position image_get_item_position
image_raise_item image_lower_item image_raise_item image_lower_item
image_raise_item_to_top image_lower_item_to_bottom image_raise_item_to_top image_lower_item_to_bottom
@ -3184,7 +3184,7 @@ CODE
image_thumbnail image_thumbnail
image_get_selected_layers image_set_selected_layers image_get_selected_layers image_set_selected_layers
image_get_selected_channels image_set_selected_channels image_get_selected_channels image_set_selected_channels
image_get_selected_vectors image_set_selected_vectors image_get_selected_paths image_set_selected_paths
image_get_selected_drawables image_get_selected_drawables
image_get_selection image_get_selection
image_get_component_active image_set_component_active image_get_component_active image_set_component_active
@ -3200,10 +3200,10 @@ CODE
image_get_tattoo_state image_set_tattoo_state image_get_tattoo_state image_set_tattoo_state
image_get_layer_by_tattoo image_get_layer_by_tattoo
image_get_channel_by_tattoo image_get_channel_by_tattoo
image_get_vectors_by_tattoo image_get_path_by_tattoo
image_get_layer_by_name image_get_layer_by_name
image_get_channel_by_name image_get_channel_by_name
image_get_vectors_by_name image_get_path_by_name
image_attach_parasite image_detach_parasite image_attach_parasite image_detach_parasite
image_get_parasite image_get_parasite
image_get_parasite_list image_get_parasite_list

View file

@ -1158,7 +1158,7 @@ save_paths (GOutputStream *output,
gint *strokes; gint *strokes;
gint s; gint s;
vectors = gimp_image_list_vectors (image); vectors = gimp_image_list_paths (image);
if (! vectors) if (! vectors)
return; return;
@ -1296,7 +1296,7 @@ save_clipping_path (GOutputStream *output,
GList *paths; GList *paths;
GError *err = NULL; GError *err = NULL;
paths = gimp_image_list_vectors (image); paths = gimp_image_list_paths (image);
if (! paths) if (! paths)
return; return;
@ -2524,7 +2524,7 @@ save_dialog (GimpImage *image,
} }
/* Clipping Path */ /* Clipping Path */
paths = gimp_image_list_vectors (image); paths = gimp_image_list_paths (image);
if (paths) if (paths)
{ {
GtkWidget *vbox; GtkWidget *vbox;

View file

@ -1588,7 +1588,7 @@ load_resource_2000 (const PSDimageres *res_a,
vectors = gimp_vectors_new (image, res_a->name); vectors = gimp_vectors_new (image, res_a->name);
} }
gimp_image_insert_vectors (image, vectors, NULL, -1); gimp_image_insert_path (image, vectors, NULL, -1);
while (path_rec > 0) while (path_rec > 0)
{ {

View file

@ -114,7 +114,7 @@ save_paths (TIFF *tif,
gint num_strokes, *strokes, s; gint num_strokes, *strokes, s;
GString *ps_tag; GString *ps_tag;
vectors = gimp_image_list_vectors (image); vectors = gimp_image_list_paths (image);
if (! vectors) if (! vectors)
return FALSE; return FALSE;

View file

@ -583,7 +583,7 @@ do_points (spline_list_array_type in_splines,
sel_x1, sel_y1 + sel_height + 1); sel_x1, sel_y1 + sel_height + 1);
} }
gimp_image_insert_vectors (image, vectors, NULL, -1); gimp_image_insert_path (image, vectors, NULL, -1);
} }