Color
Object Hierarchy:
Description:
[ CCode ( copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "CLUTTER_TYPE_COLOR" ) ]
public struct Color
Content:
Static methods:
Creation methods:
Methods:
- public Color add (Color b)
Adds this to b and
saves the resulting color inside result.
- public Color? copy ()
Makes a copy of the color structure.
- public Color darken ()
Darkens this by a fixed amount, and
saves the changed color in result.
- public bool equal (Color v2)
Compares two Color<!-- -->s and
checks if they are the same.
- public void free ()
Frees a color structure created with
copy.
- public uint hash ()
Converts a Color to a hash value.
- public unowned Color? init (uint8 red, uint8 green, uint8 blue, uint8 alpha)
Initializes this with the given
values.
- public Color interpolate (Color final, double progress)
Interpolates between this and
final Color<!-- -->s using progress
- public Color lighten ()
Lightens this by a fixed amount, and
saves the changed color in result.
- public bool parse_string (string str)
- public Color shade (double factor)
Shades this by factor
and saves the modified color into result.
- public Color subtract (Color b)
Subtracts b from this
and saves the resulting color inside result.
- public void to_hls (out float hue, out float luminance, out float saturation)
Converts this to the HLS format.
- public uint32 to_pixel ()
Converts this into a packed 32 bit
integer, containing all the four 8 bit channels used by Color.
- public string to_string ()
Returns a textual specification of this
in the hexadecimal form <literal>#rrggbbaa</literal>, where <literal>r</literal>, <literal
>g</literal>, <literal>b</literal> and <literal>a</literal> are hexadecimal digits representing the
red, green, blue and alpha components respectively.
Fields: