app, libgimp, pdb: make for more consistent function documentation.

This commit is contained in:
Jehan 2025-10-11 18:54:30 +02:00
parent b726afc8d7
commit 93fa9ca32e
3 changed files with 74 additions and 25 deletions

View file

@ -1225,7 +1225,7 @@ register_layer_procs (GimpPDB *pdb)
"\n"
"The new layer still needs to be added to the image as this is not automatic. Add the new layer with the [method@Image.insert_layer] method.\n"
"\n"
"Other attributes such as layer mask modes and offsets should be set with explicit procedure calls.",
"Other attributes such as layer mask and offsets should be set with explicit procedure calls.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Spencer Kimball & Peter Mattis",
@ -1293,7 +1293,11 @@ register_layer_procs (GimpPDB *pdb)
"gimp-layer-new-from-visible");
gimp_procedure_set_static_help (procedure,
"Create a new layer from what is visible in an image.",
"This procedure creates a new layer from what is visible in the given image. The new layer still needs to be added to the destination image, as this is not automatic. Add the new layer with the 'gimp-image-insert-layer' command. Other attributes such as layer mask modes, and offsets should be set with explicit procedure calls.",
"This procedure creates a new layer from what is visible in the given image.\n"
"\n"
"The new layer still needs to be added to the image as this is not automatic. Add the new layer with the [method@Image.insert_layer] method.\n"
"\n"
"Other attributes such as layer mask and offsets should be set with explicit procedure calls.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Sven Neumann <sven@gimp.org>",
@ -1335,7 +1339,11 @@ register_layer_procs (GimpPDB *pdb)
"gimp-layer-new-from-drawable");
gimp_procedure_set_static_help (procedure,
"Create a new layer by copying an existing drawable.",
"This procedure creates a new layer as a copy of the specified drawable. The new layer still needs to be added to the image, as this is not automatic. Add the new layer with the 'gimp-image-insert-layer' command. Other attributes such as layer mask modes, and offsets should be set with explicit procedure calls.",
"This procedure creates a new layer as a copy of the specified drawable.\n"
"\n"
"The new layer still needs to be added to the image as this is not automatic. Add the new layer with the [method@Image.insert_layer] method.\n"
"\n"
"Other attributes such as layer mask and offsets should be set with explicit procedure calls.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Spencer Kimball & Peter Mattis",
@ -1370,7 +1378,11 @@ register_layer_procs (GimpPDB *pdb)
"gimp-layer-copy");
gimp_procedure_set_static_help (procedure,
"Copy a layer.",
"This procedure copies the specified layer and returns the copy. The newly copied layer is for use within the original layer's image. It should not be subsequently added to any other image.",
"This procedure copies the specified layer and returns the copy. The newly copied layer is for use within the original layer's image. It should not be subsequently added to any other image.\n"
"\n"
"The new layer still needs to be added to the image as this is not automatic. Add the new layer with the [method@Image.insert_layer] method.\n"
"\n"
"Other attributes such as layer mask and offsets should be set with explicit procedure calls.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Spencer Kimball & Peter Mattis",

View file

@ -56,8 +56,8 @@
* automatic. Add the new layer with the [method@Image.insert_layer]
* method.
*
* Other attributes such as layer mask modes and offsets should be set
* with explicit procedure calls.
* Other attributes such as layer mask and offsets should be set with
* explicit procedure calls.
*
* Returns: (transfer none):
* The newly created layer. The object belongs to libgimp and you should not free it.
@ -107,10 +107,14 @@ gimp_layer_new (GimpImage *image,
* Create a new layer from what is visible in an image.
*
* This procedure creates a new layer from what is visible in the given
* image. The new layer still needs to be added to the destination
* image, as this is not automatic. Add the new layer with the
* gimp_image_insert_layer() command. Other attributes such as layer
* mask modes, and offsets should be set with explicit procedure calls.
* image.
*
* The new layer still needs to be added to the image as this is not
* automatic. Add the new layer with the [method@Image.insert_layer]
* method.
*
* Other attributes such as layer mask and offsets should be set with
* explicit procedure calls.
*
* Returns: (transfer none): The newly created layer.
*
@ -152,10 +156,14 @@ gimp_layer_new_from_visible (GimpImage *image,
* Create a new layer by copying an existing drawable.
*
* This procedure creates a new layer as a copy of the specified
* drawable. The new layer still needs to be added to the image, as
* this is not automatic. Add the new layer with the
* gimp_image_insert_layer() command. Other attributes such as layer
* mask modes, and offsets should be set with explicit procedure calls.
* drawable.
*
* The new layer still needs to be added to the image as this is not
* automatic. Add the new layer with the [method@Image.insert_layer]
* method.
*
* Other attributes such as layer mask and offsets should be set with
* explicit procedure calls.
*
* Returns: (transfer none): The newly copied layer.
**/
@ -195,6 +203,13 @@ gimp_layer_new_from_drawable (GimpDrawable *drawable,
* newly copied layer is for use within the original layer's image. It
* should not be subsequently added to any other image.
*
* The new layer still needs to be added to the image as this is not
* automatic. Add the new layer with the [method@Image.insert_layer]
* method.
*
* Other attributes such as layer mask and offsets should be set with
* explicit procedure calls.
*
* Returns: (transfer none):
* The newly copied layer. The object belongs to libgimp and you should not free it.
**/

View file

@ -30,8 +30,8 @@ automatic. Add the new layer with the [method@Image.insert_layer]
method.
Other attributes such as layer mask modes and offsets should be set
with explicit procedure calls.
Other attributes such as layer mask and offsets should be set with
explicit procedure calls.
HELP
&std_pdb_misc;
@ -40,7 +40,7 @@ HELP
{ name => 'image', type => 'image',
desc => 'The image to which to add the layer' },
{ name => 'name', type => 'string',
desc => 'The layer name', none_ok => 0 },
desc => 'The layer name', none_ok => 1 },
{ name => 'width', type => '1 <= int32 <= GIMP_MAX_IMAGE_SIZE',
desc => 'The layer width' },
{ name => 'height', type => '1 <= int32 <= GIMP_MAX_IMAGE_SIZE',
@ -133,10 +133,16 @@ sub layer_new_from_visible {
$help = <<'HELP';
This procedure creates a new layer from what is visible in the given
image. The new layer still needs to be added to the destination
image, as this is not automatic. Add the new layer with the
gimp_image_insert_layer() command. Other attributes such as layer
mask modes, and offsets should be set with explicit procedure calls.
image.
The new layer still needs to be added to the image as this is not
automatic. Add the new layer with the [method@Image.insert_layer]
method.
Other attributes such as layer mask and offsets should be set with
explicit procedure calls.
HELP
&neo_pdb_misc('2008', '2.6');
@ -182,11 +188,18 @@ sub layer_new_from_drawable {
$blurb = 'Create a new layer by copying an existing drawable.';
$help = <<'HELP';
This procedure creates a new layer as a copy of the specified
drawable. The new layer still needs to be added to the image, as this
is not automatic. Add the new layer with the
gimp_image_insert_layer() command. Other attributes such as layer mask
modes, and offsets should be set with explicit procedure calls.
drawable.
The new layer still needs to be added to the image as this is not
automatic. Add the new layer with the [method@Image.insert_layer]
method.
Other attributes such as layer mask and offsets should be set with
explicit procedure calls.
HELP
&std_pdb_misc;
@ -236,6 +249,15 @@ sub layer_copy {
This procedure copies the specified layer and returns the copy. The newly
copied layer is for use within the original layer's image. It should not be
subsequently added to any other image.
The new layer still needs to be added to the image as this is not
automatic. Add the new layer with the [method@Image.insert_layer]
method.
Other attributes such as layer mask and offsets should be set with
explicit procedure calls.
HELP
&std_pdb_misc;