pdb: Add PDB for text layer outline

This patch adds PDB API to get and set text outline properties,
modelled after similar API for getting vector layer stroke
settings.
This commit is contained in:
Alx Sa 2025-10-09 22:41:25 +00:00
parent 1cd6993070
commit 5539a03e2c
6 changed files with 2369 additions and 53 deletions

View file

@ -30,7 +30,7 @@
#include "internal-procs.h"
/* 759 procedures registered total */
/* 777 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)

File diff suppressed because it is too large Load diff

View file

@ -1063,6 +1063,15 @@ EXPORTS
gimp_text_layer_get_letter_spacing
gimp_text_layer_get_line_spacing
gimp_text_layer_get_markup
gimp_text_layer_get_outline
gimp_text_layer_get_outline_antialias
gimp_text_layer_get_outline_cap_style
gimp_text_layer_get_outline_color
gimp_text_layer_get_outline_dash_offset
gimp_text_layer_get_outline_direction
gimp_text_layer_get_outline_join_style
gimp_text_layer_get_outline_miter_limit
gimp_text_layer_get_outline_width
gimp_text_layer_get_text
gimp_text_layer_get_type
gimp_text_layer_new
@ -1080,6 +1089,15 @@ EXPORTS
gimp_text_layer_set_letter_spacing
gimp_text_layer_set_line_spacing
gimp_text_layer_set_markup
gimp_text_layer_set_outline
gimp_text_layer_set_outline_antialias
gimp_text_layer_set_outline_cap_style
gimp_text_layer_set_outline_color
gimp_text_layer_set_outline_dash_offset
gimp_text_layer_set_outline_direction
gimp_text_layer_set_outline_join_style
gimp_text_layer_set_outline_miter_limit
gimp_text_layer_set_outline_width
gimp_text_layer_set_text
gimp_thumbnail_procedure_get_type
gimp_thumbnail_procedure_new

View file

@ -1174,6 +1174,685 @@ gimp_text_layer_set_letter_spacing (GimpTextLayer *layer,
return success;
}
/**
* gimp_text_layer_get_outline:
* @layer: The text layer.
*
* Get the outline type from a text layer.
*
* This procedure returns the outline type of a text layer.
*
* Returns: The type of outline in the text layer.
*
* Since: 3.2
**/
GimpTextOutline
gimp_text_layer_get_outline (GimpTextLayer *layer)
{
GimpValueArray *args;
GimpValueArray *return_vals;
GimpTextOutline outline = 0;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-get-outline",
args);
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
outline = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
return outline;
}
/**
* gimp_text_layer_set_outline:
* @layer: The text layer.
* @outline: The type of outline in the text layer.
*
* Set the outline type for the text layer.
*
* This procedure sets the type of the outline in the text layer
* 'layer'.
*
* Returns: TRUE on success.
*
* Since: 3.2
**/
gboolean
gimp_text_layer_set_outline (GimpTextLayer *layer,
GimpTextOutline outline)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
GIMP_TYPE_TEXT_OUTLINE, outline,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-set-outline",
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_text_layer_get_outline_antialias:
* @layer: The text layer.
*
* Get the outline antialias setting from a text layer.
*
* This procedure returns the antialias setting of the text outline in
* a text layer.
*
* Returns: The text outline antialias setting.
*
* Since: 3.2
**/
gboolean
gimp_text_layer_get_outline_antialias (GimpTextLayer *layer)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean outline_antialias = FALSE;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-get-outline-antialias",
args);
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
outline_antialias = GIMP_VALUES_GET_BOOLEAN (return_vals, 1);
gimp_value_array_unref (return_vals);
return outline_antialias;
}
/**
* gimp_text_layer_set_outline_antialias:
* @layer: The text layer.
* @outline_antialias: The text outline antialias setting.
*
* Set the outline antialias setting from a text layer.
*
* This procedure sets the text outline antialias in the text layer
* 'layer'.
*
* Returns: TRUE on success.
*
* Since: 3.2
**/
gboolean
gimp_text_layer_set_outline_antialias (GimpTextLayer *layer,
gboolean outline_antialias)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_BOOLEAN, outline_antialias,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-set-outline-antialias",
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_text_layer_get_outline_cap_style:
* @layer: The text layer.
*
* Get the outline cap style from a text layer.
*
* This procedure returns the outline cap style of a text layer.
*
* Returns: The cap style of the outline in the text layer.
*
* Since: 3.2
**/
GimpCapStyle
gimp_text_layer_get_outline_cap_style (GimpTextLayer *layer)
{
GimpValueArray *args;
GimpValueArray *return_vals;
GimpCapStyle outline_cap_style = 0;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-get-outline-cap-style",
args);
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
outline_cap_style = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
return outline_cap_style;
}
/**
* gimp_text_layer_set_outline_cap_style:
* @layer: The text layer.
* @outline_cap_style: The cap style of the outline in the text layer.
*
* Set the outline cap style for the text layer.
*
* This procedure sets the cap style of the outline in the text layer
* 'layer'.
*
* Returns: TRUE on success.
*
* Since: 3.2
**/
gboolean
gimp_text_layer_set_outline_cap_style (GimpTextLayer *layer,
GimpCapStyle outline_cap_style)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
GIMP_TYPE_CAP_STYLE, outline_cap_style,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-set-outline-cap-style",
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_text_layer_get_outline_color:
* @layer: The text layer.
*
* Get the color of the text outline in a text layer.
*
* This procedure returns the color of the text outline in a text
* layer.
*
* Returns: (transfer full): The color of the text outline.
*
* Since: 3.2
**/
GeglColor *
gimp_text_layer_get_outline_color (GimpTextLayer *layer)
{
GimpValueArray *args;
GimpValueArray *return_vals;
GeglColor *color = NULL;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-get-outline-color",
args);
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
color = g_value_dup_object (gimp_value_array_index (return_vals, 1));
gimp_value_array_unref (return_vals);
return color;
}
/**
* gimp_text_layer_set_outline_color:
* @layer: The text layer.
* @color: The color to use for the text outline.
*
* Set the color of the text outline in the text layer.
*
* This procedure sets the outline color in the text layer 'layer'.
*
* Returns: TRUE on success.
*
* Since: 3.2
**/
gboolean
gimp_text_layer_set_outline_color (GimpTextLayer *layer,
GeglColor *color)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
GEGL_TYPE_COLOR, color,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-set-outline-color",
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_text_layer_get_outline_dash_offset:
* @layer: The text layer.
*
* Get the outline dash offset from a text layer.
*
* This procedure returns the dash offset of the text outline in a text
* layer.
*
* Returns: The text outline dash offset.
*
* Since: 3.2
**/
gdouble
gimp_text_layer_get_outline_dash_offset (GimpTextLayer *layer)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gdouble outline_dash_offset = 0.0;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-get-outline-dash-offset",
args);
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
outline_dash_offset = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
return outline_dash_offset;
}
/**
* gimp_text_layer_set_outline_dash_offset:
* @layer: The text layer.
* @outline_dash_offset: The text outline dash offset.
*
* Set the outline dash offset from a text layer.
*
* This procedure sets the outline dash offset in the text layer
* 'layer'.
*
* Returns: TRUE on success.
*
* Since: 3.2
**/
gboolean
gimp_text_layer_set_outline_dash_offset (GimpTextLayer *layer,
gdouble outline_dash_offset)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_DOUBLE, outline_dash_offset,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-set-outline-dash-offset",
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_text_layer_get_outline_direction:
* @layer: The text layer.
*
* Get the outline direction from a text layer.
*
* This procedure returns the outline direction of a text layer.
*
* Returns: The direction of the outline in the text layer.
*
* Since: 3.2
**/
GimpTextOutlineDirection
gimp_text_layer_get_outline_direction (GimpTextLayer *layer)
{
GimpValueArray *args;
GimpValueArray *return_vals;
GimpTextOutlineDirection outline_direction = 0;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-get-outline-direction",
args);
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
outline_direction = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
return outline_direction;
}
/**
* gimp_text_layer_set_outline_direction:
* @layer: The text layer.
* @outline_direction: The direction of the outline in the text layer.
*
* Set the outline direction for the text layer.
*
* This procedure sets the direction of the outline in the text layer
* 'layer'.
*
* Returns: TRUE on success.
*
* Since: 3.2
**/
gboolean
gimp_text_layer_set_outline_direction (GimpTextLayer *layer,
GimpTextOutlineDirection outline_direction)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
GIMP_TYPE_TEXT_OUTLINE_DIRECTION, outline_direction,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-set-outline-direction",
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_text_layer_get_outline_join_style:
* @layer: The text layer.
*
* Get the outline join style from a text layer.
*
* This procedure returns the outline join style of a text layer.
*
* Returns: The join style of the outline in the text layer.
*
* Since: 3.2
**/
GimpJoinStyle
gimp_text_layer_get_outline_join_style (GimpTextLayer *layer)
{
GimpValueArray *args;
GimpValueArray *return_vals;
GimpJoinStyle outline_join_style = 0;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-get-outline-join-style",
args);
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
outline_join_style = GIMP_VALUES_GET_ENUM (return_vals, 1);
gimp_value_array_unref (return_vals);
return outline_join_style;
}
/**
* gimp_text_layer_set_outline_join_style:
* @layer: The text layer.
* @outline_join_style: The join style of the outline in the text layer.
*
* Set the outline join style for the text layer.
*
* This procedure sets the join style of the outline in the text layer
* 'layer'.
*
* Returns: TRUE on success.
*
* Since: 3.2
**/
gboolean
gimp_text_layer_set_outline_join_style (GimpTextLayer *layer,
GimpJoinStyle outline_join_style)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
GIMP_TYPE_JOIN_STYLE, outline_join_style,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-set-outline-join-style",
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_text_layer_get_outline_miter_limit:
* @layer: The text layer.
*
* Get the outline miter limit from a text layer.
*
* This procedure returns the miter limit of the text outline in a text
* layer.
*
* Returns: The text outline miter limit.
*
* Since: 3.2
**/
gdouble
gimp_text_layer_get_outline_miter_limit (GimpTextLayer *layer)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gdouble outline_miter_limit = 0.0;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-get-outline-miter-limit",
args);
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
outline_miter_limit = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
return outline_miter_limit;
}
/**
* gimp_text_layer_set_outline_miter_limit:
* @layer: The text layer.
* @outline_miter_limit: The text outline miter limit.
*
* Set the outline miter limit from a text layer.
*
* This procedure sets the text outline miter limit in the text layer
* 'layer'.
*
* Returns: TRUE on success.
*
* Since: 3.2
**/
gboolean
gimp_text_layer_set_outline_miter_limit (GimpTextLayer *layer,
gdouble outline_miter_limit)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_DOUBLE, outline_miter_limit,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-set-outline-miter-limit",
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_text_layer_get_outline_width:
* @layer: The text layer.
*
* Get the outline width from a text layer.
*
* This procedure returns the color of the text outline in a text
* layer.
*
* Returns: The text outline width.
*
* Since: 3.2
**/
gdouble
gimp_text_layer_get_outline_width (GimpTextLayer *layer)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gdouble outline_width = 0.0;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-get-outline-width",
args);
gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
outline_width = GIMP_VALUES_GET_DOUBLE (return_vals, 1);
gimp_value_array_unref (return_vals);
return outline_width;
}
/**
* gimp_text_layer_set_outline_width:
* @layer: The text layer.
* @outline_width: The text outline width.
*
* Set the outline width from a text layer.
*
* This procedure sets the text outline color in the text layer
* 'layer'.
*
* Returns: TRUE on success.
*
* Since: 3.2
**/
gboolean
gimp_text_layer_set_outline_width (GimpTextLayer *layer,
gdouble outline_width)
{
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
args = gimp_value_array_new_from_types (NULL,
GIMP_TYPE_TEXT_LAYER, layer,
G_TYPE_DOUBLE, outline_width,
G_TYPE_NONE);
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-text-layer-set-outline-width",
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_text_layer_resize:
* @layer: The text layer.

View file

@ -32,58 +32,85 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
GimpTextLayer* gimp_text_layer_new (GimpImage *image,
const gchar *text,
GimpFont *font,
gdouble size,
GimpUnit *unit);
gchar* gimp_text_layer_get_text (GimpTextLayer *layer);
gboolean gimp_text_layer_set_text (GimpTextLayer *layer,
const gchar *text);
gchar* gimp_text_layer_get_markup (GimpTextLayer *layer);
gboolean gimp_text_layer_set_markup (GimpTextLayer *layer,
const gchar *markup);
GimpFont* gimp_text_layer_get_font (GimpTextLayer *layer);
gboolean gimp_text_layer_set_font (GimpTextLayer *layer,
GimpFont *font);
gdouble gimp_text_layer_get_font_size (GimpTextLayer *layer,
GimpUnit **unit);
gboolean gimp_text_layer_set_font_size (GimpTextLayer *layer,
gdouble font_size,
GimpUnit *unit);
gboolean gimp_text_layer_get_antialias (GimpTextLayer *layer);
gboolean gimp_text_layer_set_antialias (GimpTextLayer *layer,
gboolean antialias);
GimpTextHintStyle gimp_text_layer_get_hint_style (GimpTextLayer *layer);
gboolean gimp_text_layer_set_hint_style (GimpTextLayer *layer,
GimpTextHintStyle style);
gboolean gimp_text_layer_get_kerning (GimpTextLayer *layer);
gboolean gimp_text_layer_set_kerning (GimpTextLayer *layer,
gboolean kerning);
gchar* gimp_text_layer_get_language (GimpTextLayer *layer);
gboolean gimp_text_layer_set_language (GimpTextLayer *layer,
const gchar *language);
GimpTextDirection gimp_text_layer_get_base_direction (GimpTextLayer *layer);
gboolean gimp_text_layer_set_base_direction (GimpTextLayer *layer,
GimpTextDirection direction);
GimpTextJustification gimp_text_layer_get_justification (GimpTextLayer *layer);
gboolean gimp_text_layer_set_justification (GimpTextLayer *layer,
GimpTextJustification justify);
GeglColor* gimp_text_layer_get_color (GimpTextLayer *layer);
gboolean gimp_text_layer_set_color (GimpTextLayer *layer,
GeglColor *color);
gdouble gimp_text_layer_get_indent (GimpTextLayer *layer);
gboolean gimp_text_layer_set_indent (GimpTextLayer *layer,
gdouble indent);
gdouble gimp_text_layer_get_line_spacing (GimpTextLayer *layer);
gboolean gimp_text_layer_set_line_spacing (GimpTextLayer *layer,
gdouble line_spacing);
gdouble gimp_text_layer_get_letter_spacing (GimpTextLayer *layer);
gboolean gimp_text_layer_set_letter_spacing (GimpTextLayer *layer,
gdouble letter_spacing);
gboolean gimp_text_layer_resize (GimpTextLayer *layer,
gdouble width,
gdouble height);
GimpTextLayer* gimp_text_layer_new (GimpImage *image,
const gchar *text,
GimpFont *font,
gdouble size,
GimpUnit *unit);
gchar* gimp_text_layer_get_text (GimpTextLayer *layer);
gboolean gimp_text_layer_set_text (GimpTextLayer *layer,
const gchar *text);
gchar* gimp_text_layer_get_markup (GimpTextLayer *layer);
gboolean gimp_text_layer_set_markup (GimpTextLayer *layer,
const gchar *markup);
GimpFont* gimp_text_layer_get_font (GimpTextLayer *layer);
gboolean gimp_text_layer_set_font (GimpTextLayer *layer,
GimpFont *font);
gdouble gimp_text_layer_get_font_size (GimpTextLayer *layer,
GimpUnit **unit);
gboolean gimp_text_layer_set_font_size (GimpTextLayer *layer,
gdouble font_size,
GimpUnit *unit);
gboolean gimp_text_layer_get_antialias (GimpTextLayer *layer);
gboolean gimp_text_layer_set_antialias (GimpTextLayer *layer,
gboolean antialias);
GimpTextHintStyle gimp_text_layer_get_hint_style (GimpTextLayer *layer);
gboolean gimp_text_layer_set_hint_style (GimpTextLayer *layer,
GimpTextHintStyle style);
gboolean gimp_text_layer_get_kerning (GimpTextLayer *layer);
gboolean gimp_text_layer_set_kerning (GimpTextLayer *layer,
gboolean kerning);
gchar* gimp_text_layer_get_language (GimpTextLayer *layer);
gboolean gimp_text_layer_set_language (GimpTextLayer *layer,
const gchar *language);
GimpTextDirection gimp_text_layer_get_base_direction (GimpTextLayer *layer);
gboolean gimp_text_layer_set_base_direction (GimpTextLayer *layer,
GimpTextDirection direction);
GimpTextJustification gimp_text_layer_get_justification (GimpTextLayer *layer);
gboolean gimp_text_layer_set_justification (GimpTextLayer *layer,
GimpTextJustification justify);
GeglColor* gimp_text_layer_get_color (GimpTextLayer *layer);
gboolean gimp_text_layer_set_color (GimpTextLayer *layer,
GeglColor *color);
gdouble gimp_text_layer_get_indent (GimpTextLayer *layer);
gboolean gimp_text_layer_set_indent (GimpTextLayer *layer,
gdouble indent);
gdouble gimp_text_layer_get_line_spacing (GimpTextLayer *layer);
gboolean gimp_text_layer_set_line_spacing (GimpTextLayer *layer,
gdouble line_spacing);
gdouble gimp_text_layer_get_letter_spacing (GimpTextLayer *layer);
gboolean gimp_text_layer_set_letter_spacing (GimpTextLayer *layer,
gdouble letter_spacing);
GimpTextOutline gimp_text_layer_get_outline (GimpTextLayer *layer);
gboolean gimp_text_layer_set_outline (GimpTextLayer *layer,
GimpTextOutline outline);
gboolean gimp_text_layer_get_outline_antialias (GimpTextLayer *layer);
gboolean gimp_text_layer_set_outline_antialias (GimpTextLayer *layer,
gboolean outline_antialias);
GimpCapStyle gimp_text_layer_get_outline_cap_style (GimpTextLayer *layer);
gboolean gimp_text_layer_set_outline_cap_style (GimpTextLayer *layer,
GimpCapStyle outline_cap_style);
GeglColor* gimp_text_layer_get_outline_color (GimpTextLayer *layer);
gboolean gimp_text_layer_set_outline_color (GimpTextLayer *layer,
GeglColor *color);
gdouble gimp_text_layer_get_outline_dash_offset (GimpTextLayer *layer);
gboolean gimp_text_layer_set_outline_dash_offset (GimpTextLayer *layer,
gdouble outline_dash_offset);
GimpTextOutlineDirection gimp_text_layer_get_outline_direction (GimpTextLayer *layer);
gboolean gimp_text_layer_set_outline_direction (GimpTextLayer *layer,
GimpTextOutlineDirection outline_direction);
GimpJoinStyle gimp_text_layer_get_outline_join_style (GimpTextLayer *layer);
gboolean gimp_text_layer_set_outline_join_style (GimpTextLayer *layer,
GimpJoinStyle outline_join_style);
gdouble gimp_text_layer_get_outline_miter_limit (GimpTextLayer *layer);
gboolean gimp_text_layer_set_outline_miter_limit (GimpTextLayer *layer,
gdouble outline_miter_limit);
gdouble gimp_text_layer_get_outline_width (GimpTextLayer *layer);
gboolean gimp_text_layer_set_outline_width (GimpTextLayer *layer,
gdouble outline_width);
gboolean gimp_text_layer_resize (GimpTextLayer *layer,
gdouble width,
gdouble height);
G_END_DECLS

View file

@ -967,6 +967,526 @@ CODE
);
}
sub text_layer_get_outline {
$blurb = 'Get the outline type from a text layer.';
$help = <<'HELP';
This procedure returns the outline type of a text layer.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' }
);
@outargs = (
{ name => 'outline', type => 'enum GimpTextOutline',
desc => 'The type of outline in the text layer' }
);
%invoke = (
code => <<'CODE'
{
g_object_get (gimp_text_layer_get_text (layer),
"outline", &outline,
NULL);
}
CODE
);
}
sub text_layer_set_outline {
$blurb = 'Set the outline type for the text layer.';
$help = <<'HELP';
This procedure sets the type of the outline in the text layer 'layer'.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' },
{ name => 'outline', type => 'enum GimpTextOutline',
desc => 'The type of outline in the text layer' }
);
%invoke = (
code => <<'CODE'
{
gimp_text_layer_set (layer,
_("Set text layer attribute"),
"outline", outline,
NULL);
}
CODE
);
}
sub text_layer_get_outline_antialias {
$blurb = 'Get the outline antialias setting from a text layer.';
$help = <<'HELP';
This procedure returns the antialias setting of the text outline in a text layer.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' }
);
@outargs = (
{ name => 'outline_antialias', type => 'boolean',
desc => 'The text outline antialias setting' }
);
%invoke = (
code => <<'CODE'
{
g_object_get (gimp_text_layer_get_text (layer),
"outline-antialias", &outline_antialias,
NULL);
}
CODE
);
}
sub text_layer_set_outline_antialias {
$blurb = 'Set the outline antialias setting from a text layer.';
$help = <<'HELP';
This procedure sets the text outline antialias in the text layer 'layer'.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' },
{ name => 'outline_antialias', type => 'boolean',
desc => 'The text outline antialias setting' }
);
%invoke = (
code => <<'CODE'
{
gimp_text_layer_set (layer,
_("Set text layer attribute"),
"outline-antialias", outline_antialias,
NULL);
}
CODE
);
}
sub text_layer_get_outline_cap_style {
$blurb = 'Get the outline cap style from a text layer.';
$help = <<'HELP';
This procedure returns the outline cap style of a text layer.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' }
);
@outargs = (
{ name => 'outline_cap_style', type => 'enum GimpCapStyle',
desc => 'The cap style of the outline in the text layer' }
);
%invoke = (
code => <<'CODE'
{
g_object_get (gimp_text_layer_get_text (layer),
"outline-cap-style", &outline_cap_style,
NULL);
}
CODE
);
}
sub text_layer_set_outline_cap_style {
$blurb = 'Set the outline cap style for the text layer.';
$help = <<'HELP';
This procedure sets the cap style of the outline in the text layer 'layer'.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' },
{ name => 'outline_cap_style', type => 'enum GimpCapStyle',
desc => 'The cap style of the outline in the text layer' }
);
%invoke = (
code => <<'CODE'
{
gimp_text_layer_set (layer,
_("Set text layer attribute"),
"outline-cap-style", outline_cap_style,
NULL);
}
CODE
);
}
sub text_layer_get_outline_color {
$blurb = 'Get the color of the text outline in a text layer.';
$help = <<'HELP';
This procedure returns the color of the text outline in a text layer.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer.' }
);
@outargs = (
{ name => 'color', type => 'geglcolor',
desc => 'The color of the text outline.' }
);
%invoke = (
code => <<'CODE'
{
color = gegl_color_duplicate (gimp_text_layer_get_text (layer)->outline_foreground);
}
CODE
);
}
sub text_layer_set_outline_color {
$blurb = 'Set the color of the text outline in the text layer.';
$help = <<'HELP';
This procedure sets the outline color in the text layer 'layer'.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' },
{ name => 'color', type => 'geglcolor',
desc => 'The color to use for the text outline.' }
);
%invoke = (
code => <<'CODE'
{
gimp_text_layer_set (layer,
_("Set text layer attribute"),
"outline-foreground", color,
NULL);
}
CODE
);
}
sub text_layer_get_outline_dash_offset {
$blurb = 'Get the outline dash offset from a text layer.';
$help = <<'HELP';
This procedure returns the dash offset of the text outline in a text layer.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' }
);
@outargs = (
{ name => 'outline_dash_offset', type => 'double',
desc => 'The text outline dash offset' }
);
%invoke = (
code => <<'CODE'
{
g_object_get (gimp_text_layer_get_text (layer),
"outline-dash-offset", &outline_dash_offset,
NULL);
}
CODE
);
}
sub text_layer_set_outline_dash_offset {
$blurb = 'Set the outline dash offset from a text layer.';
$help = <<'HELP';
This procedure sets the outline dash offset in the text layer 'layer'.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' },
{ name => 'outline_dash_offset', type => '0.0 <= double <= 2000.0',
desc => 'The text outline dash offset' }
);
%invoke = (
code => <<'CODE'
{
gimp_text_layer_set (layer,
_("Set text layer attribute"),
"outline-dash-offset", outline_dash_offset,
NULL);
}
CODE
);
}
sub text_layer_get_outline_direction {
$blurb = 'Get the outline direction from a text layer.';
$help = <<'HELP';
This procedure returns the outline direction of a text layer.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' }
);
@outargs = (
{ name => 'outline_direction', type => 'enum GimpTextOutlineDirection',
desc => 'The direction of the outline in the text layer' }
);
%invoke = (
code => <<'CODE'
{
g_object_get (gimp_text_layer_get_text (layer),
"outline-direction", &outline_direction,
NULL);
}
CODE
);
}
sub text_layer_set_outline_direction {
$blurb = 'Set the outline direction for the text layer.';
$help = <<'HELP';
This procedure sets the direction of the outline in the text layer 'layer'.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' },
{ name => 'outline_direction', type => 'enum GimpTextOutlineDirection',
desc => 'The direction of the outline in the text layer' }
);
%invoke = (
code => <<'CODE'
{
gimp_text_layer_set (layer,
_("Set text layer attribute"),
"outline-direction", outline_direction,
NULL);
}
CODE
);
}
sub text_layer_get_outline_join_style {
$blurb = 'Get the outline join style from a text layer.';
$help = <<'HELP';
This procedure returns the outline join style of a text layer.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' }
);
@outargs = (
{ name => 'outline_join_style', type => 'enum GimpJoinStyle',
desc => 'The join style of the outline in the text layer' }
);
%invoke = (
code => <<'CODE'
{
g_object_get (gimp_text_layer_get_text (layer),
"outline-join-style", &outline_join_style,
NULL);
}
CODE
);
}
sub text_layer_set_outline_join_style {
$blurb = 'Set the outline join style for the text layer.';
$help = <<'HELP';
This procedure sets the join style of the outline in the text layer 'layer'.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' },
{ name => 'outline_join_style', type => 'enum GimpJoinStyle',
desc => 'The join style of the outline in the text layer' }
);
%invoke = (
code => <<'CODE'
{
gimp_text_layer_set (layer,
_("Set text layer attribute"),
"outline-join-style", outline_join_style,
NULL);
}
CODE
);
}
sub text_layer_get_outline_miter_limit {
$blurb = 'Get the outline miter limit from a text layer.';
$help = <<'HELP';
This procedure returns the miter limit of the text outline in a text layer.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' }
);
@outargs = (
{ name => 'outline_miter_limit', type => 'double',
desc => 'The text outline miter limit' }
);
%invoke = (
code => <<'CODE'
{
g_object_get (gimp_text_layer_get_text (layer),
"outline-miter-limit", &outline_miter_limit,
NULL);
}
CODE
);
}
sub text_layer_set_outline_miter_limit {
$blurb = 'Set the outline miter limit from a text layer.';
$help = <<'HELP';
This procedure sets the text outline miter limit in the text layer 'layer'.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' },
{ name => 'outline_miter_limit', type => '0.0 <= double <= 100.0',
desc => 'The text outline miter limit' }
);
%invoke = (
code => <<'CODE'
{
gimp_text_layer_set (layer,
_("Set text layer attribute"),
"outline-miter-limit", outline_miter_limit,
NULL);
}
CODE
);
}
sub text_layer_get_outline_width {
$blurb = 'Get the outline width from a text layer.';
$help = <<'HELP';
This procedure returns the color of the text outline in a text layer.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' }
);
@outargs = (
{ name => 'outline_width', type => 'double',
desc => 'The text outline width' }
);
%invoke = (
code => <<'CODE'
{
g_object_get (gimp_text_layer_get_text (layer),
"outline-width", &outline_width,
NULL);
}
CODE
);
}
sub text_layer_set_outline_width {
$blurb = 'Set the outline width from a text layer.';
$help = <<'HELP';
This procedure sets the text outline color in the text layer 'layer'.
HELP
&alxsa_pdb_misc('2025', '3.2');
@inargs = (
{ name => 'layer', type => 'text_layer',
desc => 'The text layer' },
{ name => 'outline_width', type => '0.0 <= double <= 8192.0',
desc => 'The text outline width' }
);
%invoke = (
code => <<'CODE'
{
gimp_text_layer_set (layer,
_("Set text layer attribute"),
"outline-width", outline_width,
NULL);
}
CODE
);
}
sub text_layer_resize {
$blurb = 'Resize the box of a text layer.';
@ -1015,6 +1535,7 @@ CODE
@headers = qw(<pango/pango.h>
"libgimpbase/gimpbase.h"
"core/gimpcontext.h"
"core/gimpdashpattern.h"
"text/gimpfont.h"
"text/gimptext.h"
"text/gimptextlayer.h"
@ -1051,6 +1572,24 @@ CODE
text_layer_set_line_spacing
text_layer_get_letter_spacing
text_layer_set_letter_spacing
text_layer_get_outline
text_layer_set_outline
text_layer_get_outline_antialias
text_layer_set_outline_antialias
text_layer_get_outline_cap_style
text_layer_set_outline_cap_style
text_layer_get_outline_color
text_layer_set_outline_color
text_layer_get_outline_dash_offset
text_layer_set_outline_dash_offset
text_layer_get_outline_direction
text_layer_set_outline_direction
text_layer_get_outline_join_style
text_layer_set_outline_join_style
text_layer_get_outline_miter_limit
text_layer_set_outline_miter_limit
text_layer_get_outline_width
text_layer_set_outline_width
text_layer_resize);
%exports = (app => [@procs], lib => [@procs]);