diff --git a/devel-docs/GIMP3-plug-in-porting-guide/classes.md b/devel-docs/GIMP3-plug-in-porting-guide/classes.md index 52645879ae..dd3aa7e3ee 100644 --- a/devel-docs/GIMP3-plug-in-porting-guide/classes.md +++ b/devel-docs/GIMP3-plug-in-porting-guide/classes.md @@ -82,19 +82,12 @@ are now in their own module: Gimp.ChannelOps.REPLACE ``` -## Gimp.RGB +## Gegl.Color In legacy plug-ins you could pass a simple list of integers, like (0, 0, 0). -In 3.0+, create a Gimp.RGB object: +In 3.0+, create a Gegl.Color object: ``` - c = Gimp.RGB() - c.set(240.0, 180.0, 70.0) -``` -or -``` - c.r = 0 - c.g = 0 - c.b = 0 - c.a = 1 + c = Gegl.Color.new("black") + c.set_rgba(0.94, 0.71, 0.27, 1.0) ``` diff --git a/devel-docs/GIMP3-plug-in-porting-guide/pdb-calls.md b/devel-docs/GIMP3-plug-in-porting-guide/pdb-calls.md index 75650daacb..47fd27502b 100644 --- a/devel-docs/GIMP3-plug-in-porting-guide/pdb-calls.md +++ b/devel-docs/GIMP3-plug-in-porting-guide/pdb-calls.md @@ -60,8 +60,8 @@ pdb.script_fu_drop_shadow(img, layer, -3, -3, blur, ``` becomes ``` - c = Gimp.RGB() - c.set(240.0, 180.0, 70.0) + c = Gegl.Color.new("black") + c.set_rgba(0.94, 0.71, 0.27, 1.0) Gimp.get_pdb().run_procedure('script-fu-drop-shadow', [ Gimp.RunMode.NONINTERACTIVE, GObject.Value(Gimp.Image, img),