mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
pdb: update autogenerated files.
This commit is contained in:
parent
22784727f4
commit
8839cb58bb
4 changed files with 109 additions and 1 deletions
|
@ -28,7 +28,7 @@
|
|||
#include "internal-procs.h"
|
||||
|
||||
|
||||
/* 752 procedures registered total */
|
||||
/* 753 procedures registered total */
|
||||
|
||||
void
|
||||
internal_procs_init (GimpPDB *pdb)
|
||||
|
|
|
@ -377,6 +377,45 @@ vectors_stroke_close_invoker (GimpProcedure *procedure,
|
|||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
vectors_stroke_reverse_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpVectors *vectors;
|
||||
gint stroke_id;
|
||||
|
||||
vectors = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
|
||||
|
||||
if (success)
|
||||
{
|
||||
GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
|
||||
GIMP_PDB_ITEM_CONTENT, error);
|
||||
|
||||
if (stroke)
|
||||
{
|
||||
if (gimp_item_is_attached (GIMP_ITEM (vectors)))
|
||||
gimp_image_undo_push_vectors_mod (gimp_item_get_image (GIMP_ITEM (vectors)),
|
||||
_("Reverse path stroke"),
|
||||
vectors);
|
||||
|
||||
gimp_vectors_freeze (vectors);
|
||||
gimp_stroke_reverse (stroke);
|
||||
gimp_vectors_thaw (vectors);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
||||
return gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
vectors_stroke_translate_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
|
@ -1595,6 +1634,35 @@ register_vectors_procs (GimpPDB *pdb)
|
|||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-vectors-stroke-reverse
|
||||
*/
|
||||
procedure = gimp_procedure_new (vectors_stroke_reverse_invoker);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-vectors-stroke-reverse");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"reverses the specified stroke.",
|
||||
"Reverses the specified stroke.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Simon Budig",
|
||||
"Simon Budig",
|
||||
"2020");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_vectors ("vectors",
|
||||
"vectors",
|
||||
"The vectors object",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_int ("stroke-id",
|
||||
"stroke id",
|
||||
"The stroke ID",
|
||||
G_MININT32, G_MAXINT32, 0,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-vectors-stroke-translate
|
||||
*/
|
||||
|
|
|
@ -386,6 +386,44 @@ gimp_vectors_stroke_close (GimpVectors *vectors,
|
|||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_vectors_stroke_reverse:
|
||||
* @vectors: The vectors object.
|
||||
* @stroke_id: The stroke ID.
|
||||
*
|
||||
* reverses the specified stroke.
|
||||
*
|
||||
* Reverses the specified stroke.
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
gboolean
|
||||
gimp_vectors_stroke_reverse (GimpVectors *vectors,
|
||||
gint stroke_id)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
gboolean success = TRUE;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_VECTORS, vectors,
|
||||
G_TYPE_INT, stroke_id,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-vectors-stroke-reverse",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
|
||||
|
||||
gimp_value_array_unref (return_vals);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_vectors_stroke_translate:
|
||||
* @vectors: The vectors object.
|
||||
|
|
|
@ -54,6 +54,8 @@ gboolean gimp_vectors_remove_stroke (GimpVectors
|
|||
gint stroke_id);
|
||||
gboolean gimp_vectors_stroke_close (GimpVectors *vectors,
|
||||
gint stroke_id);
|
||||
gboolean gimp_vectors_stroke_reverse (GimpVectors *vectors,
|
||||
gint stroke_id);
|
||||
gboolean gimp_vectors_stroke_translate (GimpVectors *vectors,
|
||||
gint stroke_id,
|
||||
gint off_x,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue