mirror of https://github.com/GNOME/gimp.git
devel-docs: Replace Gimp.RGB with Gegl.Color
Updating Python plug-in developer instructions to use Gegl.Color instead of Gimp.RGB.
This commit is contained in:
parent
85bb1790b7
commit
f39af05a48
|
@ -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)
|
||||
```
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue