Gegl.Color¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
A String representation of the |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Gegl.Color(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(string)¶
- Parameters:
string (
str
) – a string describing the color to be created.- Return type:
Creates a new
Gegl.Color
.Returns the newly created
Gegl.Color
.
- duplicate()¶
- Returns:
A new copy of self.
- Return type:
Creates a copy of self.
- get_bytes(format)¶
- Parameters:
format (
Babl.Object
) – a babl pixel format- Returns:
the color in the given format.
- Return type:
- get_cmyk(space)¶
- Parameters:
space (
Babl.Object
orNone
) – CMYK space.- Returns:
- cyan:
cyan return location.
- magenta:
magenta return location.
- yellow:
yellow return location.
- key:
key return location.
- alpha:
alpha return location.
- Return type:
(cyan:
float
, magenta:float
, yellow:float
, key:float
, alpha:float
)
Retrieves the current set color stored as space. If space is
None
, this is equivalent to requesting color in the default naive CMYK space.
- get_components(format)¶
- Parameters:
format (
GObject.Value
) – ABabl.Object
pointer- Returns:
The color components If value format not supported return
None
and components_length set to 0.- Return type:
[
float
]
Get the component values of the color in format.
- get_format()¶
- Returns:
the pixel format encoding of the set color.
- Return type:
- get_rgba()¶
- Returns:
- red:
red return location.
- green:
green return location.
- blue:
blue return location.
- alpha:
alpha return location.
- Return type:
Retrieves the current set color as linear light non premultipled RGBA data, any of the return pointers can be omitted.
- get_rgba_with_space(space)¶
- Parameters:
space (
Babl.Object
) – RGB space.- Returns:
- red:
red return location.
- green:
green return location.
- blue:
blue return location.
- alpha:
alpha return location.
- Return type:
Retrieves the current set color stored as space. If space is
None
, this is equivalent to requesting color in sRGB.
- set_bytes(format, bytes)¶
- Parameters:
format (
Babl.Object
) – a babl pixel formatbytes (
GLib.Bytes
) – color stored as format
Set a
Gegl.Color
from a pixel stored in aGLib.Bytes
and it’s babl format.
- set_cmyk(cyan, magenta, yellow, key, alpha, space)¶
- Parameters:
Set color as CMYK data stored as space. If space is
None
, this is equivalent to storing with the default naive CMYK space.
- set_components(format, components)¶
- Parameters:
format (
GObject.Value
) – ABabl.Object
pointercomponents ([
float
]) – The color components.
Set the color using the component values as format.
- set_rgba(red, green, blue, alpha)¶
- Parameters:
Set color as linear light non premultipled RGBA data
- set_rgba_with_space(red, green, blue, alpha, space)¶
- Parameters:
red (
float
) – red valuegreen (
float
) – green valueblue (
float
) – blue valuealpha (
float
) – alpha valuespace (
Babl.Object
) – RGB space.
Set color as RGBA data stored as space. If space is
None
, this is equivalent to storing as sRGB.
Property Details¶
- Gegl.Color.props.string¶
-
A String representation of the
Gegl.Color