mirror of https://github.com/GNOME/gimp.git
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:
parent
40ecfd40ad
commit
d0bdbdfdf6
|
@ -509,18 +509,18 @@ image_get_channels_invoker (GimpProcedure *procedure,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
image_get_vectors_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
image_get_paths_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
GimpImage *image;
|
||||
gint num_vectors = 0;
|
||||
GimpVectors **vectors = NULL;
|
||||
gint num_paths = 0;
|
||||
GimpVectors **paths = NULL;
|
||||
|
||||
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);
|
||||
|
||||
num_vectors = g_list_length (list);
|
||||
num_paths = g_list_length (list);
|
||||
|
||||
if (num_vectors)
|
||||
if (num_paths)
|
||||
{
|
||||
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))
|
||||
vectors[i] = g_object_ref (list->data);
|
||||
for (i = 0; i < num_paths; i++, list = g_list_next (list))
|
||||
paths[i] = g_object_ref (list->data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -546,8 +546,8 @@ image_get_vectors_invoker (GimpProcedure *procedure,
|
|||
|
||||
if (success)
|
||||
{
|
||||
g_value_set_int (gimp_value_array_index (return_vals, 1), num_vectors);
|
||||
gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **) vectors, 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 **) paths, num_paths);
|
||||
}
|
||||
|
||||
return return_vals;
|
||||
|
@ -1036,27 +1036,27 @@ image_thaw_channels_invoker (GimpProcedure *procedure,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
image_insert_vectors_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
image_insert_path_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *image;
|
||||
GimpVectors *vectors;
|
||||
GimpVectors *path;
|
||||
GimpVectors *parent;
|
||||
gint position;
|
||||
|
||||
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));
|
||||
position = g_value_get_int (gimp_value_array_index (args, 3));
|
||||
|
||||
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 ||
|
||||
(gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, 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)
|
||||
parent = GIMP_IMAGE_ACTIVE_PARENT;
|
||||
|
||||
success = gimp_image_add_vectors (image, vectors,
|
||||
success = gimp_image_add_vectors (image, path,
|
||||
parent, MAX (position, -1), TRUE);
|
||||
}
|
||||
else
|
||||
|
@ -1078,24 +1078,24 @@ image_insert_vectors_invoker (GimpProcedure *procedure,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
image_remove_vectors_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
image_remove_path_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *image;
|
||||
GimpVectors *vectors;
|
||||
GimpVectors *path;
|
||||
|
||||
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 (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), image, 0, error))
|
||||
gimp_image_remove_vectors (image, vectors, TRUE, NULL);
|
||||
if (gimp_pdb_item_is_attached (GIMP_ITEM (path), image, 0, error))
|
||||
gimp_image_remove_vectors (image, path, TRUE, NULL);
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
@ -1105,36 +1105,7 @@ image_remove_vectors_invoker (GimpProcedure *procedure,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
image_freeze_vectors_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,
|
||||
image_freeze_paths_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
|
@ -1152,7 +1123,36 @@ image_thaw_vectors_invoker (GimpProcedure *procedure,
|
|||
GimpContainer *container = gimp_image_get_vectors (image);
|
||||
|
||||
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)
|
||||
success = gimp_container_frozen (container);
|
||||
|
@ -1902,18 +1902,18 @@ image_set_selected_channels_invoker (GimpProcedure *procedure,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
image_get_selected_vectors_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
image_get_selected_paths_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
GimpImage *image;
|
||||
gint num_vectors = 0;
|
||||
GimpVectors **vectors = NULL;
|
||||
gint num_paths = 0;
|
||||
GimpVectors **paths = NULL;
|
||||
|
||||
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);
|
||||
|
||||
num_vectors = g_list_length (list);
|
||||
num_paths = g_list_length (list);
|
||||
|
||||
if (num_vectors)
|
||||
if (num_paths)
|
||||
{
|
||||
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))
|
||||
vectors[i] = g_object_ref (list->data);
|
||||
for (i = 0; i < num_paths; i++, list = g_list_next (list))
|
||||
paths[i] = g_object_ref (list->data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1939,41 +1939,41 @@ image_get_selected_vectors_invoker (GimpProcedure *procedure,
|
|||
|
||||
if (success)
|
||||
{
|
||||
g_value_set_int (gimp_value_array_index (return_vals, 1), num_vectors);
|
||||
gimp_value_take_object_array (gimp_value_array_index (return_vals, 2), GIMP_TYPE_VECTORS, (GObject **) vectors, 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 **) paths, num_paths);
|
||||
}
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
image_set_selected_vectors_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
image_set_selected_paths_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *image;
|
||||
gint num_vectors;
|
||||
const GimpVectors **vectors;
|
||||
gint num_paths;
|
||||
const GimpVectors **paths;
|
||||
|
||||
image = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
num_vectors = g_value_get_int (gimp_value_array_index (args, 1));
|
||||
vectors = (const GimpVectors **) gimp_value_get_object_array (gimp_value_array_index (args, 2));
|
||||
num_paths = g_value_get_int (gimp_value_array_index (args, 1));
|
||||
paths = (const GimpVectors **) gimp_value_get_object_array (gimp_value_array_index (args, 2));
|
||||
|
||||
if (success)
|
||||
{
|
||||
GList *selected_vectors = NULL;
|
||||
GList *selected_paths = NULL;
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < num_vectors; i++)
|
||||
selected_vectors = g_list_prepend (selected_vectors,
|
||||
GIMP_LAYER (vectors[i]));
|
||||
for (i = 0; i < num_paths; i++)
|
||||
selected_paths = g_list_prepend (selected_paths,
|
||||
GIMP_LAYER (paths[i]));
|
||||
|
||||
gimp_image_set_selected_vectors (image, selected_vectors);
|
||||
g_list_free (selected_vectors);
|
||||
gimp_image_set_selected_vectors (image, selected_paths);
|
||||
g_list_free (selected_paths);
|
||||
}
|
||||
|
||||
return gimp_procedure_get_return_values (procedure, success,
|
||||
|
@ -2639,32 +2639,32 @@ image_get_channel_by_tattoo_invoker (GimpProcedure *procedure,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
image_get_vectors_by_tattoo_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
image_get_path_by_tattoo_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
GimpImage *image;
|
||||
guint tattoo;
|
||||
GimpVectors *vectors = NULL;
|
||||
GimpVectors *path = NULL;
|
||||
|
||||
image = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
tattoo = g_value_get_uint (gimp_value_array_index (args, 1));
|
||||
|
||||
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,
|
||||
error ? *error : NULL);
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -2732,32 +2732,32 @@ image_get_channel_by_name_invoker (GimpProcedure *procedure,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
image_get_vectors_by_name_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
image_get_path_by_name_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
GimpImage *image;
|
||||
const gchar *name;
|
||||
GimpVectors *vectors = NULL;
|
||||
GimpVectors *path = NULL;
|
||||
|
||||
image = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
name = g_value_get_string (gimp_value_array_index (args, 1));
|
||||
|
||||
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,
|
||||
error ? *error : NULL);
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -3352,14 +3352,14 @@ register_image_procs (GimpPDB *pdb)
|
|||
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-image-get-vectors");
|
||||
"gimp-image-get-paths");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Returns the list of vectors contained in the specified image.",
|
||||
"This 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 paths contained in the specified image.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Simon Budig",
|
||||
|
@ -3372,15 +3372,15 @@ register_image_procs (GimpPDB *pdb)
|
|||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
g_param_spec_int ("num-vectors",
|
||||
"num vectors",
|
||||
"The number of vectors contained in the image",
|
||||
g_param_spec_int ("num-paths",
|
||||
"num paths",
|
||||
"The number of paths contained in the image",
|
||||
0, G_MAXINT32, 0,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_object_array ("vectors",
|
||||
"vectors",
|
||||
"The list of vectors contained in the image.",
|
||||
gimp_param_spec_object_array ("paths",
|
||||
"paths",
|
||||
"The list of paths contained in the image.",
|
||||
GIMP_TYPE_VECTORS,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
|
@ -3823,14 +3823,14 @@ register_image_procs (GimpPDB *pdb)
|
|||
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-image-insert-vectors");
|
||||
"gimp-image-insert-path");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Add the specified vectors 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.",
|
||||
"Add the specified path to the image.",
|
||||
"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);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Spencer Kimball & Peter Mattis",
|
||||
|
@ -3843,32 +3843,32 @@ register_image_procs (GimpPDB *pdb)
|
|||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_vectors ("vectors",
|
||||
"vectors",
|
||||
"The vectors",
|
||||
gimp_param_spec_vectors ("path",
|
||||
"path",
|
||||
"The path",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_vectors ("parent",
|
||||
"parent",
|
||||
"The parent vectors",
|
||||
"The parent path",
|
||||
TRUE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_int ("position",
|
||||
"position",
|
||||
"The vectors position",
|
||||
"The path position",
|
||||
G_MININT32, G_MAXINT32, 0,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, 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-image-remove-vectors");
|
||||
"gimp-image-remove-path");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"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.",
|
||||
|
@ -3884,25 +3884,25 @@ register_image_procs (GimpPDB *pdb)
|
|||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_vectors ("vectors",
|
||||
"vectors",
|
||||
"The vectors object",
|
||||
gimp_param_spec_vectors ("path",
|
||||
"path",
|
||||
"The path object",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, 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-image-freeze-vectors");
|
||||
"gimp-image-freeze-paths");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Freeze the image's vectors 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"
|
||||
"Freeze the image's path list.",
|
||||
"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"
|
||||
"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);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Ell",
|
||||
|
@ -3918,16 +3918,16 @@ register_image_procs (GimpPDB *pdb)
|
|||
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-image-thaw-vectors");
|
||||
"gimp-image-thaw-paths");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Thaw the image's vectors list.",
|
||||
"This procedure thaws the vectors list of the image, re-enabling updates to the Paths dialog.\n"
|
||||
"Thaw the image's path list.",
|
||||
"This procedure thaws the path list of the image, re-enabling updates to the Paths dialog.\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);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Ell",
|
||||
|
@ -4644,14 +4644,14 @@ register_image_procs (GimpPDB *pdb)
|
|||
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-image-get-selected-vectors");
|
||||
"gimp-image-get-selected-paths");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Returns the specified image's selected vectors.",
|
||||
"This procedure returns the list of selected vectors in the specified image.",
|
||||
"Returns the specified image's selected paths.",
|
||||
"This procedure returns the list of selected paths in the specified image.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
|
@ -4664,29 +4664,29 @@ register_image_procs (GimpPDB *pdb)
|
|||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
g_param_spec_int ("num-vectors",
|
||||
"num vectors",
|
||||
"The number of selected vectors in the image",
|
||||
g_param_spec_int ("num-paths",
|
||||
"num paths",
|
||||
"The number of selected paths in the image",
|
||||
0, G_MAXINT32, 0,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_object_array ("vectors",
|
||||
"vectors",
|
||||
"The list of selected vectors in the image.",
|
||||
gimp_param_spec_object_array ("paths",
|
||||
"paths",
|
||||
"The list of selected paths in the image.",
|
||||
GIMP_TYPE_VECTORS,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, 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-image-set-selected-vectors");
|
||||
"gimp-image-set-selected-paths");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Sets the specified image's selected vectors.",
|
||||
"The vectors are set as the selected vectors in the image.",
|
||||
"Sets the specified image's selected paths.",
|
||||
"The paths are set as the selected paths in the image.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
|
@ -4699,15 +4699,15 @@ register_image_procs (GimpPDB *pdb)
|
|||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_int ("num-vectors",
|
||||
"num vectors",
|
||||
"The number of vectors to select",
|
||||
g_param_spec_int ("num-paths",
|
||||
"num paths",
|
||||
"The number of paths to select",
|
||||
0, G_MAXINT32, 0,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_object_array ("vectors",
|
||||
"vectors",
|
||||
"The list of vectors to select",
|
||||
gimp_param_spec_object_array ("paths",
|
||||
"paths",
|
||||
"The list of paths to select",
|
||||
GIMP_TYPE_VECTORS,
|
||||
GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
|
@ -5359,14 +5359,14 @@ register_image_procs (GimpPDB *pdb)
|
|||
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-image-get-vectors-by-tattoo");
|
||||
"gimp-image-get-path-by-tattoo");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Find a vectors with a given tattoo in an image.",
|
||||
"This procedure returns the vectors with the given tattoo in the specified image.",
|
||||
"Find a path with a given tattoo in an image.",
|
||||
"This procedure returns the path with the given tattoo in the specified image.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Simon Budig",
|
||||
|
@ -5381,13 +5381,13 @@ register_image_procs (GimpPDB *pdb)
|
|||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_uint ("tattoo",
|
||||
"tattoo",
|
||||
"The tattoo of the vectors to find",
|
||||
"The tattoo of the path to find",
|
||||
1, G_MAXUINT32, 1,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_vectors ("vectors",
|
||||
"vectors",
|
||||
"The vectors with the specified tattoo",
|
||||
gimp_param_spec_vectors ("path",
|
||||
"path",
|
||||
"The path with the specified tattoo",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
|
@ -5466,14 +5466,14 @@ register_image_procs (GimpPDB *pdb)
|
|||
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-image-get-vectors-by-name");
|
||||
"gimp-image-get-path-by-name");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Find a vectors with a given name in an image.",
|
||||
"This procedure returns the vectors with the given name in the specified image.",
|
||||
"Find a path with a given name in an image.",
|
||||
"This procedure returns the path with the given name in the specified image.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Michael Natterer <mitch@gimp.org>",
|
||||
|
@ -5488,14 +5488,14 @@ register_image_procs (GimpPDB *pdb)
|
|||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_string ("name",
|
||||
"name",
|
||||
"The name of the vectors to find",
|
||||
"The name of the path to find",
|
||||
FALSE, FALSE, TRUE,
|
||||
NULL,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_vectors ("vectors",
|
||||
"vectors",
|
||||
"The vectors with the specified name",
|
||||
gimp_param_spec_vectors ("path",
|
||||
"path",
|
||||
"The path with the specified name",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
|
|
|
@ -247,8 +247,8 @@ gimp_plug_in_cleanup_channels_thaw (GimpPlugIn *plug_in,
|
|||
}
|
||||
|
||||
gboolean
|
||||
gimp_plug_in_cleanup_vectors_freeze (GimpPlugIn *plug_in,
|
||||
GimpImage *image)
|
||||
gimp_plug_in_cleanup_paths_freeze (GimpPlugIn *plug_in,
|
||||
GimpImage *image)
|
||||
{
|
||||
GimpPlugInProcFrame *proc_frame;
|
||||
GimpPlugInCleanupImage *cleanup;
|
||||
|
@ -268,8 +268,8 @@ gimp_plug_in_cleanup_vectors_freeze (GimpPlugIn *plug_in,
|
|||
}
|
||||
|
||||
gboolean
|
||||
gimp_plug_in_cleanup_vectors_thaw (GimpPlugIn *plug_in,
|
||||
GimpImage *image)
|
||||
gimp_plug_in_cleanup_paths_thaw (GimpPlugIn *plug_in,
|
||||
GimpImage *image)
|
||||
{
|
||||
GimpPlugInProcFrame *proc_frame;
|
||||
GimpPlugInCleanupImage *cleanup;
|
||||
|
|
|
@ -36,9 +36,9 @@ gboolean gimp_plug_in_cleanup_channels_freeze (GimpPlugIn *plug_in,
|
|||
gboolean gimp_plug_in_cleanup_channels_thaw (GimpPlugIn *plug_in,
|
||||
GimpImage *image);
|
||||
|
||||
gboolean gimp_plug_in_cleanup_vectors_freeze (GimpPlugIn *plug_in,
|
||||
gboolean gimp_plug_in_cleanup_paths_freeze (GimpPlugIn *plug_in,
|
||||
GimpImage *image);
|
||||
gboolean gimp_plug_in_cleanup_vectors_thaw (GimpPlugIn *plug_in,
|
||||
gboolean gimp_plug_in_cleanup_paths_thaw (GimpPlugIn *plug_in,
|
||||
GimpImage *image);
|
||||
|
||||
gboolean gimp_plug_in_cleanup_add_shadow (GimpPlugIn *plug_in,
|
||||
|
|
|
@ -106,7 +106,7 @@ possible in the previous API is obviously still possible.
|
|||
| `gimp_fuzzy_select_full()` | `gimp_image_select_contiguous_color()` |
|
||||
| `gimp_gamma()` | `gimp_drawable_get_format()` |
|
||||
| `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_gradients_get_gradient_data()` | `gimp_gradient_get_uniform_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_image_add_channel()` | `gimp_image_insert_channel()` |
|
||||
| `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_base_type()` | `gimp_image_get_base_type()` |
|
||||
| `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_list()` | `gimp_get_parasite_list()` |
|
||||
| `gimp_parasite_name()` | `gimp_parasite_get_name()` |
|
||||
| `gimp_path_delete()` | `gimp_image_remove_vectors()` |
|
||||
| `gimp_path_get_current()` | `gimp_image_get_active_vectors()` |
|
||||
| `gimp_path_delete()` | `gimp_image_remove_path()` |
|
||||
| `gimp_path_get_current()` | `gimp_image_get_selected_paths()` |
|
||||
| `gimp_path_get_locked()` | *N/A* |
|
||||
| `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_tattoo()` | `gimp_item_get_tattoo()` |
|
||||
| `gimp_path_import()` | `gimp_vectors_import_from_file()` |
|
||||
| `gimp_path_list()` | `gimp_image_get_vectors()` |
|
||||
| `gimp_path_set_current()` | `gimp_image_set_active_vectors()` |
|
||||
| `gimp_path_list()` | `gimp_image_get_paths()` |
|
||||
| `gimp_path_set_current()` | `gimp_image_set_selected_paths()` |
|
||||
| `gimp_path_set_locked()` | *N/A* |
|
||||
| `gimp_path_set_points()` | `gimp_vectors_stroke_new_from_points()` |
|
||||
| `gimp_path_set_tattoo()` | `gimp_item_set_tattoo()` |
|
||||
|
|
|
@ -402,7 +402,7 @@ EXPORTS
|
|||
gimp_image_floating_sel_attached_to
|
||||
gimp_image_freeze_channels
|
||||
gimp_image_freeze_layers
|
||||
gimp_image_freeze_vectors
|
||||
gimp_image_freeze_paths
|
||||
gimp_image_get_base_type
|
||||
gimp_image_get_by_id
|
||||
gimp_image_get_channel_by_name
|
||||
|
@ -437,7 +437,7 @@ EXPORTS
|
|||
gimp_image_get_selected_channels
|
||||
gimp_image_get_selected_drawables
|
||||
gimp_image_get_selected_layers
|
||||
gimp_image_get_selected_vectors
|
||||
gimp_image_get_selected_paths
|
||||
gimp_image_get_selection
|
||||
gimp_image_get_simulation_bpc
|
||||
gimp_image_get_simulation_intent
|
||||
|
@ -447,9 +447,9 @@ EXPORTS
|
|||
gimp_image_get_thumbnail_data
|
||||
gimp_image_get_type
|
||||
gimp_image_get_unit
|
||||
gimp_image_get_vectors
|
||||
gimp_image_get_vectors_by_name
|
||||
gimp_image_get_vectors_by_tattoo
|
||||
gimp_image_get_paths
|
||||
gimp_image_get_path_by_name
|
||||
gimp_image_get_path_by_tattoo
|
||||
gimp_image_get_width
|
||||
gimp_image_get_xcf_file
|
||||
gimp_image_grid_get_background_color
|
||||
|
@ -465,7 +465,7 @@ EXPORTS
|
|||
gimp_image_id_is_valid
|
||||
gimp_image_insert_channel
|
||||
gimp_image_insert_layer
|
||||
gimp_image_insert_vectors
|
||||
gimp_image_insert_path
|
||||
gimp_image_is_dirty
|
||||
gimp_image_is_valid
|
||||
gimp_image_list_channels
|
||||
|
@ -473,8 +473,8 @@ EXPORTS
|
|||
gimp_image_list_selected_channels
|
||||
gimp_image_list_selected_drawables
|
||||
gimp_image_list_selected_layers
|
||||
gimp_image_list_selected_vectors
|
||||
gimp_image_list_vectors
|
||||
gimp_image_list_selected_paths
|
||||
gimp_image_list_paths
|
||||
gimp_image_lower_item
|
||||
gimp_image_lower_item_to_bottom
|
||||
gimp_image_merge_down
|
||||
|
@ -497,7 +497,7 @@ EXPORTS
|
|||
gimp_image_raise_item_to_top
|
||||
gimp_image_remove_channel
|
||||
gimp_image_remove_layer
|
||||
gimp_image_remove_vectors
|
||||
gimp_image_remove_path
|
||||
gimp_image_reorder_item
|
||||
gimp_image_resize
|
||||
gimp_image_resize_to_layers
|
||||
|
@ -520,7 +520,7 @@ EXPORTS
|
|||
gimp_image_set_resolution
|
||||
gimp_image_set_selected_channels
|
||||
gimp_image_set_selected_layers
|
||||
gimp_image_set_selected_vectors
|
||||
gimp_image_set_selected_paths
|
||||
gimp_image_set_simulation_bpc
|
||||
gimp_image_set_simulation_intent
|
||||
gimp_image_set_simulation_profile
|
||||
|
@ -529,10 +529,10 @@ EXPORTS
|
|||
gimp_image_set_unit
|
||||
gimp_image_take_selected_channels
|
||||
gimp_image_take_selected_layers
|
||||
gimp_image_take_selected_vectors
|
||||
gimp_image_take_selected_paths
|
||||
gimp_image_thaw_channels
|
||||
gimp_image_thaw_layers
|
||||
gimp_image_thaw_vectors
|
||||
gimp_image_thaw_paths
|
||||
gimp_image_undo_disable
|
||||
gimp_image_undo_enable
|
||||
gimp_image_undo_freeze
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* Returns the list of paths selected in the specified image.
|
||||
|
@ -405,27 +405,27 @@ gimp_image_take_selected_channels (GimpImage *image,
|
|||
* Since: 3.0
|
||||
**/
|
||||
GList *
|
||||
gimp_image_list_selected_vectors (GimpImage *image)
|
||||
gimp_image_list_selected_paths (GimpImage *image)
|
||||
{
|
||||
GimpVectors **vectors;
|
||||
gint num_vectors;
|
||||
GimpVectors **paths;
|
||||
gint num_paths;
|
||||
GList *list = NULL;
|
||||
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++)
|
||||
list = g_list_prepend (list, vectors[i]);
|
||||
for (i = 0; i < num_paths; i++)
|
||||
list = g_list_prepend (list, paths[i]);
|
||||
|
||||
g_free (vectors);
|
||||
g_free (paths);
|
||||
|
||||
return g_list_reverse (list);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_image_take_selected_vectors:
|
||||
* gimp_image_take_selected_paths:
|
||||
* @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
|
||||
* selected paths are unselected.
|
||||
|
@ -435,21 +435,21 @@ gimp_image_list_selected_vectors (GimpImage *image)
|
|||
* Since: 3.0
|
||||
**/
|
||||
gboolean
|
||||
gimp_image_take_selected_vectors (GimpImage *image,
|
||||
GList *vectors)
|
||||
gimp_image_take_selected_paths (GimpImage *image,
|
||||
GList *paths)
|
||||
{
|
||||
GimpVectors **sel_vectors;
|
||||
GimpVectors **sel_paths;
|
||||
GList *list;
|
||||
gboolean success;
|
||||
gint i;
|
||||
|
||||
sel_vectors = g_new0 (GimpVectors *, g_list_length (vectors));
|
||||
for (list = vectors, i = 0; list; list = list->next, i++)
|
||||
sel_vectors[i] = list->data;
|
||||
sel_paths = g_new0 (GimpVectors *, g_list_length (paths));
|
||||
for (list = paths, i = 0; list; list = list->next, i++)
|
||||
sel_paths[i] = list->data;
|
||||
|
||||
success = gimp_image_set_selected_vectors (image, g_list_length (vectors),
|
||||
(const GimpVectors **) sel_vectors);
|
||||
g_list_free (vectors);
|
||||
success = gimp_image_set_selected_paths (image, g_list_length (paths),
|
||||
(const GimpVectors **) sel_paths);
|
||||
g_list_free (paths);
|
||||
|
||||
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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Returns: (element-type GimpVectors) (transfer container):
|
||||
* The list of vectors contained in the image.
|
||||
* The returned value must be freed with g_list_free(). Vectors
|
||||
* The list of paths contained in the image.
|
||||
* The returned value must be freed with g_list_free(). Path
|
||||
* elements belong to libgimp and must not be freed.
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
GList *
|
||||
gimp_image_list_vectors (GimpImage *image)
|
||||
gimp_image_list_paths (GimpImage *image)
|
||||
{
|
||||
GimpVectors **vectors;
|
||||
gint num_vectors;
|
||||
GimpVectors **paths;
|
||||
gint num_paths;
|
||||
GList *list = NULL;
|
||||
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++)
|
||||
list = g_list_prepend (list, vectors[i]);
|
||||
for (i = 0; i < num_paths; i++)
|
||||
list = g_list_prepend (list, paths[i]);
|
||||
|
||||
g_free (vectors);
|
||||
g_free (paths);
|
||||
|
||||
return g_list_reverse (list);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ GList * gimp_list_images (void);
|
|||
|
||||
GList * gimp_image_list_layers (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);
|
||||
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);
|
||||
gboolean gimp_image_take_selected_channels (GimpImage *image,
|
||||
GList *channels);
|
||||
GList * gimp_image_list_selected_vectors (GimpImage *image);
|
||||
gboolean gimp_image_take_selected_vectors (GimpImage *image,
|
||||
GList *vectors);
|
||||
GList * gimp_image_list_selected_paths (GimpImage *image);
|
||||
gboolean gimp_image_take_selected_paths (GimpImage *image,
|
||||
GList *paths);
|
||||
|
||||
GList * gimp_image_list_selected_drawables (GimpImage *image);
|
||||
|
||||
|
|
|
@ -560,49 +560,49 @@ gimp_image_get_channels (GimpImage *image,
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_image_get_vectors:
|
||||
* gimp_image_get_paths:
|
||||
* @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
|
||||
* specified image.
|
||||
* This procedure returns the list of paths contained in the specified
|
||||
* image.
|
||||
*
|
||||
* Returns: (array length=num_vectors) (element-type GimpVectors) (transfer container):
|
||||
* The list of vectors contained in the image.
|
||||
* Returns: (array length=num_paths) (element-type GimpVectors) (transfer container):
|
||||
* The list of paths contained in the image.
|
||||
* The returned value must be freed with g_free().
|
||||
*
|
||||
* Since: 2.4
|
||||
**/
|
||||
GimpVectors **
|
||||
gimp_image_get_vectors (GimpImage *image,
|
||||
gint *num_vectors)
|
||||
gimp_image_get_paths (GimpImage *image,
|
||||
gint *num_paths)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
GimpVectors **vectors = NULL;
|
||||
GimpVectors **paths = NULL;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_IMAGE, image,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-image-get-vectors",
|
||||
"gimp-image-get-paths",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
*num_vectors = 0;
|
||||
*num_paths = 0;
|
||||
|
||||
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
|
||||
{
|
||||
*num_vectors = 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)); };
|
||||
*num_paths = GIMP_VALUES_GET_INT (return_vals, 1);
|
||||
{ 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);
|
||||
|
||||
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.
|
||||
* @vectors: The vectors.
|
||||
* @parent: (nullable): The parent vectors.
|
||||
* @position: The vectors position.
|
||||
* @path: The path.
|
||||
* @parent: (nullable): The parent path.
|
||||
* @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
|
||||
* 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.
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
**/
|
||||
gboolean
|
||||
gimp_image_insert_vectors (GimpImage *image,
|
||||
GimpVectors *vectors,
|
||||
GimpVectors *parent,
|
||||
gint position)
|
||||
gimp_image_insert_path (GimpImage *image,
|
||||
GimpVectors *path,
|
||||
GimpVectors *parent,
|
||||
gint position)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
|
@ -1200,13 +1200,13 @@ gimp_image_insert_vectors (GimpImage *image,
|
|||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_IMAGE, image,
|
||||
GIMP_TYPE_VECTORS, vectors,
|
||||
GIMP_TYPE_VECTORS, path,
|
||||
GIMP_TYPE_VECTORS, parent,
|
||||
G_TYPE_INT, position,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-image-insert-vectors",
|
||||
"gimp-image-insert-path",
|
||||
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.
|
||||
* @vectors: The vectors object.
|
||||
* @path: The path object.
|
||||
*
|
||||
* Remove the specified path from the image.
|
||||
*
|
||||
|
@ -1232,8 +1232,8 @@ gimp_image_insert_vectors (GimpImage *image,
|
|||
* Since: 2.4
|
||||
**/
|
||||
gboolean
|
||||
gimp_image_remove_vectors (GimpImage *image,
|
||||
GimpVectors *vectors)
|
||||
gimp_image_remove_path (GimpImage *image,
|
||||
GimpVectors *path)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
|
@ -1241,11 +1241,11 @@ gimp_image_remove_vectors (GimpImage *image,
|
|||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_IMAGE, image,
|
||||
GIMP_TYPE_VECTORS, vectors,
|
||||
GIMP_TYPE_VECTORS, path,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-image-remove-vectors",
|
||||
"gimp-image-remove-path",
|
||||
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.
|
||||
*
|
||||
* 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.
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*
|
||||
* Since: 2.10.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_image_freeze_vectors (GimpImage *image)
|
||||
gimp_image_freeze_paths (GimpImage *image)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
|
@ -1287,7 +1286,7 @@ gimp_image_freeze_vectors (GimpImage *image)
|
|||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-image-freeze-vectors",
|
||||
"gimp-image-freeze-paths",
|
||||
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.
|
||||
*
|
||||
* 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.
|
||||
* This procedure thaws the path list of the image, re-enabling updates
|
||||
* to the Paths dialog.
|
||||
*
|
||||
* This procedure should match a corresponding call to
|
||||
* gimp_image_freeze_vectors().
|
||||
* gimp_image_freeze_paths().
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*
|
||||
* Since: 2.10.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_image_thaw_vectors (GimpImage *image)
|
||||
gimp_image_thaw_paths (GimpImage *image)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
|
@ -1326,7 +1325,7 @@ gimp_image_thaw_vectors (GimpImage *image)
|
|||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-image-thaw-vectors",
|
||||
"gimp-image-thaw-paths",
|
||||
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.
|
||||
* @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.
|
||||
*
|
||||
* Returns: (array length=num_vectors) (element-type GimpVectors) (transfer container):
|
||||
* The list of selected vectors in the image.
|
||||
* Returns: (array length=num_paths) (element-type GimpVectors) (transfer container):
|
||||
* The list of selected paths in the image.
|
||||
* The returned value must be freed with g_free().
|
||||
*
|
||||
* Since: 3.0.0
|
||||
**/
|
||||
GimpVectors **
|
||||
gimp_image_get_selected_vectors (GimpImage *image,
|
||||
gint *num_vectors)
|
||||
gimp_image_get_selected_paths (GimpImage *image,
|
||||
gint *num_paths)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
GimpVectors **vectors = NULL;
|
||||
GimpVectors **paths = NULL;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_IMAGE, image,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-image-get-selected-vectors",
|
||||
"gimp-image-get-selected-paths",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
*num_vectors = 0;
|
||||
*num_paths = 0;
|
||||
|
||||
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
|
||||
{
|
||||
*num_vectors = 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)); };
|
||||
*num_paths = GIMP_VALUES_GET_INT (return_vals, 1);
|
||||
{ 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);
|
||||
|
||||
return vectors;
|
||||
return paths;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_image_set_selected_vectors:
|
||||
* gimp_image_set_selected_paths:
|
||||
* @image: The image.
|
||||
* @num_vectors: The number of vectors to select.
|
||||
* @vectors: (array length=num_vectors) (element-type GimpVectors): The list of vectors to select.
|
||||
* @num_paths: The number of paths 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.
|
||||
*
|
||||
* Since: 3.0.0
|
||||
**/
|
||||
gboolean
|
||||
gimp_image_set_selected_vectors (GimpImage *image,
|
||||
gint num_vectors,
|
||||
const GimpVectors **vectors)
|
||||
gimp_image_set_selected_paths (GimpImage *image,
|
||||
gint num_paths,
|
||||
const GimpVectors **paths)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
|
@ -2282,13 +2281,13 @@ gimp_image_set_selected_vectors (GimpImage *image,
|
|||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_IMAGE, image,
|
||||
G_TYPE_INT, num_vectors,
|
||||
G_TYPE_INT, num_paths,
|
||||
GIMP_TYPE_OBJECT_ARRAY, NULL,
|
||||
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 (),
|
||||
"gimp-image-set-selected-vectors",
|
||||
"gimp-image-set-selected-paths",
|
||||
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.
|
||||
* @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.
|
||||
*
|
||||
* Returns: (transfer none): The vectors with the specified tattoo.
|
||||
* Returns: (transfer none): The path with the specified tattoo.
|
||||
*
|
||||
* Since: 2.6
|
||||
**/
|
||||
GimpVectors *
|
||||
gimp_image_get_vectors_by_tattoo (GimpImage *image,
|
||||
guint tattoo)
|
||||
gimp_image_get_path_by_tattoo (GimpImage *image,
|
||||
guint tattoo)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
GimpVectors *vectors = NULL;
|
||||
GimpVectors *path = NULL;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_IMAGE, image,
|
||||
|
@ -3138,16 +3137,16 @@ gimp_image_get_vectors_by_tattoo (GimpImage *image,
|
|||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-image-get-vectors-by-tattoo",
|
||||
"gimp-image-get-path-by-tattoo",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
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);
|
||||
|
||||
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.
|
||||
* @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
|
||||
* specified image.
|
||||
* This procedure returns the path with the given name in the specified
|
||||
* image.
|
||||
*
|
||||
* Returns: (transfer none): The vectors with the specified name.
|
||||
* Returns: (transfer none): The path with the specified name.
|
||||
*
|
||||
* Since: 2.8
|
||||
**/
|
||||
GimpVectors *
|
||||
gimp_image_get_vectors_by_name (GimpImage *image,
|
||||
const gchar *name)
|
||||
gimp_image_get_path_by_name (GimpImage *image,
|
||||
const gchar *name)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
GimpVectors *vectors = NULL;
|
||||
GimpVectors *path = NULL;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_IMAGE, image,
|
||||
|
@ -3258,16 +3257,16 @@ gimp_image_get_vectors_by_name (GimpImage *image,
|
|||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-image-get-vectors-by-name",
|
||||
"gimp-image-get-path-by-name",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
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);
|
||||
|
||||
return vectors;
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -52,8 +52,8 @@ GimpLayer** gimp_image_get_layers (GimpImage
|
|||
gint *num_layers);
|
||||
GimpChannel** gimp_image_get_channels (GimpImage *image,
|
||||
gint *num_channels);
|
||||
GimpVectors** gimp_image_get_vectors (GimpImage *image,
|
||||
gint *num_vectors);
|
||||
GimpVectors** gimp_image_get_paths (GimpImage *image,
|
||||
gint *num_paths);
|
||||
gboolean gimp_image_unset_active_channel (GimpImage *image);
|
||||
GimpLayer* gimp_image_get_floating_sel (GimpImage *image);
|
||||
GimpDrawable* gimp_image_floating_sel_attached_to (GimpImage *image);
|
||||
|
@ -85,14 +85,14 @@ gboolean gimp_image_remove_channel (GimpImage
|
|||
GimpChannel *channel);
|
||||
gboolean gimp_image_freeze_channels (GimpImage *image);
|
||||
gboolean gimp_image_thaw_channels (GimpImage *image);
|
||||
gboolean gimp_image_insert_vectors (GimpImage *image,
|
||||
GimpVectors *vectors,
|
||||
gboolean gimp_image_insert_path (GimpImage *image,
|
||||
GimpVectors *path,
|
||||
GimpVectors *parent,
|
||||
gint position);
|
||||
gboolean gimp_image_remove_vectors (GimpImage *image,
|
||||
GimpVectors *vectors);
|
||||
gboolean gimp_image_freeze_vectors (GimpImage *image);
|
||||
gboolean gimp_image_thaw_vectors (GimpImage *image);
|
||||
gboolean gimp_image_remove_path (GimpImage *image,
|
||||
GimpVectors *path);
|
||||
gboolean gimp_image_freeze_paths (GimpImage *image);
|
||||
gboolean gimp_image_thaw_paths (GimpImage *image);
|
||||
gint gimp_image_get_item_position (GimpImage *image,
|
||||
GimpItem *item);
|
||||
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,
|
||||
gint num_channels,
|
||||
const GimpChannel **channels);
|
||||
GimpVectors** gimp_image_get_selected_vectors (GimpImage *image,
|
||||
gint *num_vectors);
|
||||
gboolean gimp_image_set_selected_vectors (GimpImage *image,
|
||||
gint num_vectors,
|
||||
const GimpVectors **vectors);
|
||||
GimpVectors** gimp_image_get_selected_paths (GimpImage *image,
|
||||
gint *num_paths);
|
||||
gboolean gimp_image_set_selected_paths (GimpImage *image,
|
||||
gint num_paths,
|
||||
const GimpVectors **paths);
|
||||
GimpItem** gimp_image_get_selected_drawables (GimpImage *image,
|
||||
gint *num_drawables);
|
||||
GimpSelection* gimp_image_get_selection (GimpImage *image);
|
||||
|
@ -180,13 +180,13 @@ GimpLayer* gimp_image_get_layer_by_tattoo (GimpImage
|
|||
guint tattoo);
|
||||
GimpChannel* gimp_image_get_channel_by_tattoo (GimpImage *image,
|
||||
guint tattoo);
|
||||
GimpVectors* gimp_image_get_vectors_by_tattoo (GimpImage *image,
|
||||
GimpVectors* gimp_image_get_path_by_tattoo (GimpImage *image,
|
||||
guint tattoo);
|
||||
GimpLayer* gimp_image_get_layer_by_name (GimpImage *image,
|
||||
const gchar *name);
|
||||
GimpChannel* gimp_image_get_channel_by_name (GimpImage *image,
|
||||
const gchar *name);
|
||||
GimpVectors* gimp_image_get_vectors_by_name (GimpImage *image,
|
||||
GimpVectors* gimp_image_get_path_by_name (GimpImage *image,
|
||||
const gchar *name);
|
||||
gboolean gimp_image_attach_parasite (GimpImage *image,
|
||||
const GimpParasite *parasite);
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
* @short_description: Widgets providing popup menus of items.
|
||||
*
|
||||
* 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))
|
||||
{
|
||||
items = gimp_image_list_vectors (image);
|
||||
items = gimp_image_list_paths (image);
|
||||
gimp_item_combo_box_model_add (combo_box, GTK_LIST_STORE (model),
|
||||
image, items, 0);
|
||||
g_list_free (items);
|
||||
|
|
|
@ -332,11 +332,11 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub image_get_vectors {
|
||||
$blurb = 'Returns the list of vectors contained in the specified image.';
|
||||
sub image_get_paths {
|
||||
$blurb = 'Returns the list of paths contained in the specified image.';
|
||||
|
||||
$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
|
||||
|
||||
&simon_pdb_misc('2005', '2.4');
|
||||
|
@ -347,10 +347,10 @@ HELP
|
|||
);
|
||||
|
||||
@outargs = (
|
||||
{ name => 'vectors', type => 'vectorarray',
|
||||
desc => 'The list of vectors contained in the image.',
|
||||
array => { name => 'num_vectors',
|
||||
desc => 'The number of vectors contained in the image' } }
|
||||
{ name => 'paths', type => 'vectorarray',
|
||||
desc => 'The list of paths contained in the image.',
|
||||
array => { name => 'num_paths',
|
||||
desc => 'The number of paths contained in the image' } }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
|
@ -358,16 +358,16 @@ HELP
|
|||
{
|
||||
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;
|
||||
|
||||
vectors = g_new (GimpVectors *, num_vectors);
|
||||
paths = g_new (GimpVectors *, num_paths);
|
||||
|
||||
for (i = 0; i < num_vectors; i++, list = g_list_next (list))
|
||||
vectors[i] = g_object_ref (list->data);
|
||||
for (i = 0; i < num_paths; i++, list = g_list_next (list))
|
||||
paths[i] = g_object_ref (list->data);
|
||||
}
|
||||
}
|
||||
CODE
|
||||
|
@ -1208,16 +1208,16 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub image_insert_vectors {
|
||||
$blurb = 'Add the specified vectors to the image.';
|
||||
sub image_insert_path {
|
||||
$blurb = 'Add the specified path to the image.';
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure adds the specified vectors to the image at the given
|
||||
position. Since vectors groups are not currently supported, the parent
|
||||
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 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.
|
||||
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.
|
||||
HELP
|
||||
|
||||
&std_pdb_misc;
|
||||
|
@ -1225,17 +1225,17 @@ HELP
|
|||
@inargs = (
|
||||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' },
|
||||
{ name => 'vectors', type => 'vectors',
|
||||
desc => 'The vectors' },
|
||||
{ name => 'path', type => 'vectors',
|
||||
desc => 'The path' },
|
||||
{ name => 'parent', type => 'vectors', none_ok => 1,
|
||||
desc => 'The parent vectors' },
|
||||
desc => 'The parent path' },
|
||||
{ name => 'position', type => 'int32',
|
||||
desc => 'The vectors position' }
|
||||
desc => 'The path position' }
|
||||
);
|
||||
|
||||
$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 ||
|
||||
(gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, error) &&
|
||||
gimp_pdb_item_is_group (GIMP_ITEM (parent), error))))
|
||||
|
@ -1243,7 +1243,7 @@ HELP
|
|||
if (position == -1 && parent == NULL)
|
||||
parent = GIMP_IMAGE_ACTIVE_PARENT;
|
||||
|
||||
success = gimp_image_add_vectors (image, vectors,
|
||||
success = gimp_image_add_vectors (image, path,
|
||||
parent, MAX (position, -1), TRUE);
|
||||
}
|
||||
else
|
||||
|
@ -1254,7 +1254,7 @@ HELP
|
|||
CODE
|
||||
}
|
||||
|
||||
sub image_remove_vectors {
|
||||
sub image_remove_path {
|
||||
$blurb = 'Remove the specified path from the image.';
|
||||
|
||||
$help = <<'HELP';
|
||||
|
@ -1267,15 +1267,15 @@ HELP
|
|||
@inargs = (
|
||||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' },
|
||||
{ name => 'vectors', type => 'vectors',
|
||||
desc => 'The vectors object' }
|
||||
{ name => 'path', type => 'vectors',
|
||||
desc => 'The path object' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
if (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), image, 0, error))
|
||||
gimp_image_remove_vectors (image, vectors, TRUE, NULL);
|
||||
if (gimp_pdb_item_is_attached (GIMP_ITEM (path), image, 0, error))
|
||||
gimp_image_remove_vectors (image, path, TRUE, NULL);
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
@ -1283,20 +1283,20 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub image_freeze_vectors {
|
||||
$blurb = "Freeze the image's vectors list.";
|
||||
sub image_freeze_paths {
|
||||
$blurb = "Freeze the image's path list.";
|
||||
|
||||
&ell_pdb_misc('2018', '2.10.2');
|
||||
|
||||
$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
|
||||
vectors. This can significantly improve performance while applying
|
||||
changes affecting the vectors list.
|
||||
path. This can significantly improve performance while applying
|
||||
changes affecting the path list.
|
||||
|
||||
|
||||
Each call to gimp_image_freeze_vectors() should be matched by a
|
||||
corresponding call to gimp_image_thaw_vectors(), undoing its
|
||||
Each call to gimp_image_freeze_paths() should be matched by a
|
||||
corresponding call to gimp_image_thaw_paths (), undoing its
|
||||
effects.
|
||||
HELP
|
||||
|
||||
|
@ -1312,7 +1312,7 @@ HELP
|
|||
GimpContainer *container = gimp_image_get_vectors (image);
|
||||
|
||||
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)
|
||||
gimp_container_freeze (container);
|
||||
|
@ -1321,18 +1321,18 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub image_thaw_vectors {
|
||||
$blurb = "Thaw the image's vectors list.";
|
||||
sub image_thaw_paths {
|
||||
$blurb = "Thaw the image's path list.";
|
||||
|
||||
&ell_pdb_misc('2018', '2.10.2');
|
||||
|
||||
$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.
|
||||
|
||||
|
||||
This procedure should match a corresponding call to
|
||||
gimp_image_freeze_vectors().
|
||||
gimp_image_freeze_paths().
|
||||
HELP
|
||||
|
||||
@inargs = (
|
||||
|
@ -1347,7 +1347,7 @@ HELP
|
|||
GimpContainer *container = gimp_image_get_vectors (image);
|
||||
|
||||
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)
|
||||
success = gimp_container_frozen (container);
|
||||
|
@ -1947,11 +1947,11 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub image_get_selected_vectors {
|
||||
$blurb = "Returns the specified image's selected vectors.";
|
||||
sub image_get_selected_paths {
|
||||
$blurb = "Returns the specified image's selected paths.";
|
||||
|
||||
$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
|
||||
|
||||
&jehan_pdb_misc('2022', '3.0.0');
|
||||
|
@ -1962,10 +1962,10 @@ HELP
|
|||
);
|
||||
|
||||
@outargs = (
|
||||
{ name => 'vectors', type => 'vectorarray',
|
||||
desc => 'The list of selected vectors in the image.',
|
||||
array => { name => 'num_vectors',
|
||||
desc => 'The number of selected vectors in the image' } }
|
||||
{ name => 'paths', type => 'vectorarray',
|
||||
desc => 'The list of selected paths in the image.',
|
||||
array => { name => 'num_paths',
|
||||
desc => 'The number of selected paths in the image' } }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
|
@ -1973,27 +1973,27 @@ HELP
|
|||
{
|
||||
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;
|
||||
|
||||
vectors = g_new (GimpVectors *, num_vectors);
|
||||
paths = g_new (GimpVectors *, num_paths);
|
||||
|
||||
for (i = 0; i < num_vectors; i++, list = g_list_next (list))
|
||||
vectors[i] = g_object_ref (list->data);
|
||||
for (i = 0; i < num_paths; i++, list = g_list_next (list))
|
||||
paths[i] = g_object_ref (list->data);
|
||||
}
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_set_selected_vectors {
|
||||
$blurb = "Sets the specified image's selected vectors.";
|
||||
sub image_set_selected_paths {
|
||||
$blurb = "Sets the specified image's selected paths.";
|
||||
|
||||
$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
|
||||
|
||||
&jehan_pdb_misc('2022', '3.0.0');
|
||||
|
@ -2001,26 +2001,26 @@ HELP
|
|||
@inargs = (
|
||||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' },
|
||||
{ name => 'vectors', type => 'vectorarray',
|
||||
desc => 'The list of vectors to select',
|
||||
{ name => 'paths', type => 'vectorarray',
|
||||
desc => 'The list of paths to select',
|
||||
no_validate => 1,
|
||||
array => { name => 'num_vectors',
|
||||
array => { name => 'num_paths',
|
||||
type => '0 <= int32',
|
||||
desc => 'The number of vectors to select' } }
|
||||
desc => 'The number of paths to select' } }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
GList *selected_vectors = NULL;
|
||||
GList *selected_paths = NULL;
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < num_vectors; i++)
|
||||
selected_vectors = g_list_prepend (selected_vectors,
|
||||
GIMP_LAYER (vectors[i]));
|
||||
for (i = 0; i < num_paths; i++)
|
||||
selected_paths = g_list_prepend (selected_paths,
|
||||
GIMP_LAYER (paths[i]));
|
||||
|
||||
gimp_image_set_selected_vectors (image, selected_vectors);
|
||||
g_list_free (selected_vectors);
|
||||
gimp_image_set_selected_vectors (image, selected_paths);
|
||||
g_list_free (selected_paths);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
|
@ -2742,11 +2742,11 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub image_get_vectors_by_tattoo {
|
||||
$blurb = 'Find a vectors with a given tattoo in an image.';
|
||||
sub image_get_path_by_tattoo {
|
||||
$blurb = 'Find a path with a given tattoo in an image.';
|
||||
|
||||
$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.
|
||||
HELP
|
||||
|
||||
|
@ -2756,18 +2756,18 @@ HELP
|
|||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' },
|
||||
{ name => 'tattoo', type => 'tattoo',
|
||||
desc => 'The tattoo of the vectors to find' }
|
||||
desc => 'The tattoo of the path to find' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
{ name => 'vectors', type => 'vectors',
|
||||
desc => 'The vectors with the specified tattoo' }
|
||||
{ name => 'path', type => 'vectors',
|
||||
desc => 'The path with the specified tattoo' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
vectors = gimp_image_get_vectors_by_tattoo (image, tattoo);
|
||||
path = gimp_image_get_vectors_by_tattoo (image, tattoo);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
|
@ -2833,11 +2833,11 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub image_get_vectors_by_name {
|
||||
$blurb = 'Find a vectors with a given name in an image.';
|
||||
sub image_get_path_by_name {
|
||||
$blurb = 'Find a path with a given name in an image.';
|
||||
|
||||
$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.
|
||||
HELP
|
||||
|
||||
|
@ -2847,18 +2847,18 @@ HELP
|
|||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' },
|
||||
{ name => 'name', type => 'string', non_empty => 1,
|
||||
desc => 'The name of the vectors to find' }
|
||||
desc => 'The name of the path to find' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
{ name => 'vectors', type => 'vectors',
|
||||
desc => 'The vectors with the specified name' }
|
||||
{ name => 'path', type => 'vectors',
|
||||
desc => 'The path with the specified name' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
vectors = gimp_image_get_vectors_by_name (image, name);
|
||||
path = gimp_image_get_vectors_by_name (image, name);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
|
@ -3160,7 +3160,7 @@ CODE
|
|||
image_get_width image_get_height
|
||||
image_get_layers
|
||||
image_get_channels
|
||||
image_get_vectors
|
||||
image_get_paths
|
||||
image_unset_active_channel
|
||||
image_get_floating_sel
|
||||
image_floating_sel_attached_to
|
||||
|
@ -3170,8 +3170,8 @@ CODE
|
|||
image_freeze_layers image_thaw_layers
|
||||
image_insert_channel image_remove_channel
|
||||
image_freeze_channels image_thaw_channels
|
||||
image_insert_vectors image_remove_vectors
|
||||
image_freeze_vectors image_thaw_vectors
|
||||
image_insert_path image_remove_path
|
||||
image_freeze_paths image_thaw_paths
|
||||
image_get_item_position
|
||||
image_raise_item image_lower_item
|
||||
image_raise_item_to_top image_lower_item_to_bottom
|
||||
|
@ -3184,7 +3184,7 @@ CODE
|
|||
image_thumbnail
|
||||
image_get_selected_layers image_set_selected_layers
|
||||
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_selection
|
||||
image_get_component_active image_set_component_active
|
||||
|
@ -3200,10 +3200,10 @@ CODE
|
|||
image_get_tattoo_state image_set_tattoo_state
|
||||
image_get_layer_by_tattoo
|
||||
image_get_channel_by_tattoo
|
||||
image_get_vectors_by_tattoo
|
||||
image_get_path_by_tattoo
|
||||
image_get_layer_by_name
|
||||
image_get_channel_by_name
|
||||
image_get_vectors_by_name
|
||||
image_get_path_by_name
|
||||
image_attach_parasite image_detach_parasite
|
||||
image_get_parasite
|
||||
image_get_parasite_list
|
||||
|
|
|
@ -1158,7 +1158,7 @@ save_paths (GOutputStream *output,
|
|||
gint *strokes;
|
||||
gint s;
|
||||
|
||||
vectors = gimp_image_list_vectors (image);
|
||||
vectors = gimp_image_list_paths (image);
|
||||
|
||||
if (! vectors)
|
||||
return;
|
||||
|
@ -1296,7 +1296,7 @@ save_clipping_path (GOutputStream *output,
|
|||
GList *paths;
|
||||
GError *err = NULL;
|
||||
|
||||
paths = gimp_image_list_vectors (image);
|
||||
paths = gimp_image_list_paths (image);
|
||||
|
||||
if (! paths)
|
||||
return;
|
||||
|
@ -2524,7 +2524,7 @@ save_dialog (GimpImage *image,
|
|||
}
|
||||
|
||||
/* Clipping Path */
|
||||
paths = gimp_image_list_vectors (image);
|
||||
paths = gimp_image_list_paths (image);
|
||||
if (paths)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
|
|
|
@ -1588,7 +1588,7 @@ load_resource_2000 (const PSDimageres *res_a,
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -114,7 +114,7 @@ save_paths (TIFF *tif,
|
|||
gint num_strokes, *strokes, s;
|
||||
GString *ps_tag;
|
||||
|
||||
vectors = gimp_image_list_vectors (image);
|
||||
vectors = gimp_image_list_paths (image);
|
||||
|
||||
if (! vectors)
|
||||
return FALSE;
|
||||
|
|
|
@ -583,7 +583,7 @@ do_points (spline_list_array_type in_splines,
|
|||
sel_x1, sel_y1 + sel_height + 1);
|
||||
}
|
||||
|
||||
gimp_image_insert_vectors (image, vectors, NULL, -1);
|
||||
gimp_image_insert_path (image, vectors, NULL, -1);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue