app, libgimp*, pdb, plug-ins: GimpContext is now using only GeglColor.

- app: gimp_context_get_(foreground|background)() are now returning a GeglColor.
- libgimp: PDB functions named similarly in libgimp are returning a newly
  allocated GeglColor too.
- A few other PDB functions (the ones using these functions) were updated and
  their signature changed to use GeglColor too, when relevant. Plug-ins which
  use any of the changed libgimp functions were fixed.
- GimpContext: signals "(foreground|background)-changed" are now passing a
  GeglColor.
- libgimpconfig: new macro GIMP_CONFIG_PROP_COLOR using gegl_param_spec_color().
- GimpContext: properties "foreground" and "background" are now GeglParamColor
  properties.
- app: All code interacting with GimpContext objects were updated to receive a
  GeglColor (that they may still convert, or no, to GimpRGB for now).
- app: gimp_prop_gegl_color_button_new() was added as an alternative to
  gimp_prop_color_button_new() when the property is a GeglParamColor. Eventually
  the former should replace completely the latter.
- libgimpwidgets: gimp_prop_color_area_new() now works on GeglParamColor
  properties only.
- libgimp: gimp_procedure_dialog_get_widget() will generate a GimpColorArea for
  GeglTypeParamColor arguments.
This commit is contained in:
Jehan 2023-11-14 20:04:14 +01:00
parent 229994957c
commit dbbcfb16d5
68 changed files with 1107 additions and 836 deletions

View file

@ -76,20 +76,23 @@ text_layer_new_invoker (GimpProcedure *procedure,
if (success)
{
GimpText *gimp_text;
GimpRGB color;
GimpText *gimp_text;
GeglColor *color;
GimpRGB rgb;
gimp_context_get_foreground (context, &color);
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", &color,
"color", &rgb,
NULL);
layer = GIMP_TEXT_LAYER (gimp_text_layer_new (image, gimp_text));
g_object_unref (color);
g_object_unref (gimp_text);
if (! layer)