app, pdb: this PDB function should have been using GeglColor already.

This commit is contained in:
Jehan 2023-12-24 00:36:49 +09:00
parent 57fda090df
commit 95ac889f6c
2 changed files with 2 additions and 8 deletions

View file

@ -78,21 +78,18 @@ text_layer_new_invoker (GimpProcedure *procedure,
{
GimpText *gimp_text;
GeglColor *color;
GimpRGB rgb;
color = gimp_context_get_foreground (context);
gegl_color_get_pixel (color, babl_format ("R'G'B'A double"), &rgb);
gimp_text = g_object_new (GIMP_TYPE_TEXT,
"text", text,
"font", font,
"font-size", size,
"font-size-unit", unit,
"color", &rgb,
"color", color,
NULL);
layer = GIMP_TEXT_LAYER (gimp_text_layer_new (image, gimp_text));
g_object_unref (color);
g_object_unref (gimp_text);
if (! layer)

View file

@ -56,21 +56,18 @@ HELP
{
GimpText *gimp_text;
GeglColor *color;
GimpRGB rgb;
color = gimp_context_get_foreground (context);
gegl_color_get_pixel (color, babl_format ("R'G'B'A double"), &rgb);
gimp_text = g_object_new (GIMP_TYPE_TEXT,
"text", text,
"font", font,
"font-size", size,
"font-size-unit", unit,
"color", &rgb,
"color", color,
NULL);
layer = GIMP_TEXT_LAYER (gimp_text_layer_new (image, gimp_text));
g_object_unref (color);
g_object_unref (gimp_text);
if (! layer)