Class: Gegl::Color
- Inherits:
-
Object
- Object
- Gegl::Color
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#duplicate ⇒ Gegl::Color
Creates a copy of color.
-
#format ⇒ Babl::Object
The pixel format encoding of the set color.
-
#get_bytes(format) ⇒ GLib::Bytes
The color in the given format.
-
#get_cmyk(cyan, magenta, yellow, key, alpha, space) ⇒ nil
Retrieves the current set color stored as space.
-
#get_components(format, components_length) ⇒ Array<Float>
Get the component values of the color in format.
-
#get_pixel(format, pixel) ⇒ nil
Store the color in a pixel in the given format.
-
#get_rgba(red, green, blue, alpha) ⇒ nil
Retrieves the current set color as linear light non premultipled RGBA data, any of the return pointers can be omitted.
-
#get_rgba_with_space(red, green, blue, alpha, space) ⇒ nil
Retrieves the current set color stored as space.
-
#initialize(string) ⇒ Gegl::Color
constructor
Creates a new Gegl::Color.
-
#set_bytes(format, bytes) ⇒ nil
Set a GeglColor from a pixel stored in a %GBytes and it's babl format.
-
#set_cmyk(cyan, magenta, yellow, key, alpha, space) ⇒ nil
Set color as CMYK data stored as space.
-
#set_components(format, components, components_length) ⇒ nil
Set the color using the component values as format.
-
#set_pixel(format, pixel) ⇒ nil
Set a GeglColor from a pointer to a pixel and it's babl format.
-
#set_rgba(red, green, blue, alpha) ⇒ nil
Set color as linear light non premultipled RGBA data.
-
#set_rgba_with_space(red, green, blue, alpha, space) ⇒ nil
Set color as RGBA data stored as space.
-
#string ⇒ String
String.
- #string=(string) ⇒ String
Constructor Details
#initialize(string) ⇒ Gegl::Color
Creates a new Gegl::Color.
Returns the newly created Gegl::Color.
Instance Method Details
#duplicate ⇒ Gegl::Color
Creates a copy of color.
#format ⇒ Babl::Object
Returns the pixel format encoding of the set color.
#get_bytes(format) ⇒ GLib::Bytes
Returns the color in the given format.
#get_cmyk(cyan, magenta, yellow, key, alpha, space) ⇒ nil
Retrieves the current set color stored as space. If space is nil, this is equivalent to requesting color in the default naive CMYK space.
#get_components(format, components_length) ⇒ Array<Float>
Get the component values of the color in format. If value format not supported return NULL and components_length set to 0.
#get_pixel(format, pixel) ⇒ nil
Store the color in a pixel in the given format.
#get_rgba(red, green, blue, alpha) ⇒ nil
Retrieves the current set color as linear light non premultipled RGBA data, any of the return pointers can be omitted.
#get_rgba_with_space(red, green, blue, alpha, space) ⇒ nil
Retrieves the current set color stored as space. If space is nil, this is equivalent to requesting color in sRGB.
#set_bytes(format, bytes) ⇒ nil
Set a GeglColor from a pixel stored in a %GBytes and it's babl format.
#set_cmyk(cyan, magenta, yellow, key, alpha, space) ⇒ nil
Set color as CMYK data stored as space. If space is nil, this is equivalent to storing with the default naive CMYK space.
#set_components(format, components, components_length) ⇒ nil
Set the color using the component values as format.
#set_pixel(format, pixel) ⇒ nil
Set a GeglColor from a pointer to a pixel and it's babl format.
#set_rgba(red, green, blue, alpha) ⇒ nil
Set color as linear light non premultipled RGBA data
#set_rgba_with_space(red, green, blue, alpha, space) ⇒ nil
Set color as RGBA data stored as space. If space is nil, this is equivalent to storing as sRGB.
#string ⇒ String
Returns string.