mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
app, libgimp, pdb: also get rid of gimp_text_layer_new() wrapper.
See previous commit.
This commit is contained in:
parent
e125c30cfd
commit
65635e8a0c
6 changed files with 92 additions and 116 deletions
|
@ -999,12 +999,16 @@ register_text_layer_procs (GimpPDB *pdb)
|
|||
/*
|
||||
* gimp-text-layer-new
|
||||
*/
|
||||
procedure = gimp_procedure_new (text_layer_new_invoker, TRUE, TRUE);
|
||||
procedure = gimp_procedure_new (text_layer_new_invoker, TRUE, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-text-layer-new");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Creates a new text layer.",
|
||||
"This procedure creates a new text layer. The arguments are kept as simple as necessary for the normal case. All text attributes, however, can be modified with the appropriate gimp_text_layer_set_*() procedures. The new layer still needs to be added to the image, as this is not automatic. Add the new layer using 'gimp-image-insert-layer'.",
|
||||
"This procedure creates a new text layer displaying the specified @text. By default the width and height of the layer will be determined by the @text contents, the @font, @size and @unit.\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"
|
||||
"The arguments are kept as simple as necessary for the basic case. All text attributes, however, can be modified with the appropriate `gimp_text_layer_set_*()` procedures.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Marcus Heese <heese@cip.ifi.lmu.de>",
|
||||
|
@ -1048,7 +1052,7 @@ register_text_layer_procs (GimpPDB *pdb)
|
|||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_text_layer ("layer",
|
||||
"layer",
|
||||
"The new text layer.",
|
||||
"The new text layer. The object belongs to libgimp and you should not free it.",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
|
|
|
@ -80,40 +80,6 @@ gimp_text_layer_get_by_id (gint32 layer_id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_text_layer_new:
|
||||
* @image: The image to which to add the layer.
|
||||
* @text: The text to generate (in UTF-8 encoding).
|
||||
* @font: The name of the font.
|
||||
* @size: The size of text in either pixels or points.
|
||||
* @unit: The units of specified size.
|
||||
*
|
||||
* Create a new layer.
|
||||
*
|
||||
* This procedure creates a new text layer displaying the specified @text. By
|
||||
* default the width and height of the layer will be determined by the @text
|
||||
* contents, the @fontname, @size and @unit.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Returns: (transfer none): The newly created text layer.
|
||||
* The object belongs to libgimp and you should not free it.
|
||||
*
|
||||
* Since: 3.0
|
||||
*/
|
||||
GimpTextLayer *
|
||||
gimp_text_layer_new (GimpImage *image,
|
||||
const gchar *text,
|
||||
GimpFont *font,
|
||||
gdouble size,
|
||||
GimpUnit *unit)
|
||||
{
|
||||
return _gimp_text_layer_new (image, text, font, size, unit);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
|
|
|
@ -40,12 +40,6 @@ G_DECLARE_FINAL_TYPE (GimpTextLayer, gimp_text_layer, GIMP, TEXT_LAYER, GimpLaye
|
|||
|
||||
GimpTextLayer * gimp_text_layer_get_by_id (gint32 layer_id);
|
||||
|
||||
GimpTextLayer * gimp_text_layer_new (GimpImage *image,
|
||||
const gchar *text,
|
||||
GimpFont *font,
|
||||
gdouble size,
|
||||
GimpUnit *unit) G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
|
||||
/**
|
||||
* _gimp_text_layer_new:
|
||||
* gimp_text_layer_new:
|
||||
* @image: The image.
|
||||
* @text: The text to generate (in UTF-8 encoding).
|
||||
* @font: The font to write the text with.
|
||||
|
@ -46,19 +46,25 @@
|
|||
*
|
||||
* Creates a new text layer.
|
||||
*
|
||||
* This procedure creates a new text layer. The arguments are kept as
|
||||
* simple as necessary for the normal case. All text attributes,
|
||||
* however, can be modified with the appropriate
|
||||
* gimp_text_layer_set_*() procedures. The new layer still needs to be
|
||||
* added to the image, as this is not automatic. Add the new layer
|
||||
* using gimp_image_insert_layer().
|
||||
* This procedure creates a new text layer displaying the specified
|
||||
* @text. By default the width and height of the layer will be
|
||||
* determined by the @text contents, the @font, @size and @unit.
|
||||
*
|
||||
* Returns: (transfer none): The new text layer.
|
||||
* 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.
|
||||
*
|
||||
* The arguments are kept as simple as necessary for the basic case.
|
||||
* All text attributes, however, can be modified with the appropriate
|
||||
* `gimp_text_layer_set_*()` procedures.
|
||||
*
|
||||
* Returns: (transfer none):
|
||||
* The new text layer. The object belongs to libgimp and you should not free it.
|
||||
*
|
||||
* Since: 2.6
|
||||
**/
|
||||
GimpTextLayer *
|
||||
_gimp_text_layer_new (GimpImage *image,
|
||||
gimp_text_layer_new (GimpImage *image,
|
||||
const gchar *text,
|
||||
GimpFont *font,
|
||||
gdouble size,
|
||||
|
|
|
@ -32,7 +32,7 @@ G_BEGIN_DECLS
|
|||
/* For information look into the C source or the html documentation */
|
||||
|
||||
|
||||
G_GNUC_INTERNAL GimpTextLayer* _gimp_text_layer_new (GimpImage *image,
|
||||
GimpTextLayer* gimp_text_layer_new (GimpImage *image,
|
||||
const gchar *text,
|
||||
GimpFont *font,
|
||||
gdouble size,
|
||||
|
|
|
@ -22,17 +22,23 @@ sub text_layer_new {
|
|||
$blurb = 'Creates a new text layer.';
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure creates a new text layer. The arguments are kept as
|
||||
simple as necessary for the normal case. All text attributes, however,
|
||||
can be modified with the appropriate gimp_text_layer_set_*()
|
||||
procedures. The new layer still needs to be added to the image, as
|
||||
this is not automatic. Add the new layer using gimp_image_insert_layer().
|
||||
This procedure creates a new text layer displaying the specified @text. By
|
||||
default the width and height of the layer will be determined by the @text
|
||||
contents, the @font, @size and @unit.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
The arguments are kept as simple as necessary for the basic case. All
|
||||
text attributes, however, can be modified with the appropriate
|
||||
`gimp_text_layer_set_*()` procedures.
|
||||
HELP
|
||||
|
||||
&marcus_pdb_misc('2008', '2.6');
|
||||
|
||||
$lib_private = 1;
|
||||
|
||||
@inargs = (
|
||||
{ name => 'image', type => 'image',
|
||||
desc => 'The image' },
|
||||
|
@ -48,7 +54,7 @@ HELP
|
|||
|
||||
@outargs = (
|
||||
{ name => 'layer', type => 'text_layer',
|
||||
desc => 'The new text layer.' }
|
||||
desc => 'The new text layer. The object belongs to libgimp and you should not free it.' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue