mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
app, pdb: this PDB function should have been using GeglColor already.
This commit is contained in:
parent
57fda090df
commit
95ac889f6c
2 changed files with 2 additions and 8 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue