Color
Object Hierarchy:
Clutter.Color
Clutter.Color
Clutter.Color
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:
public Color.from_hls (float hue, float luminance, float saturation)
Converts a color expressed in HLS (hue, luminance and saturation)
values into a Color .
public Color.from_pixel (uint32 pixel)
Converts pixel
from the packed representation of a four 8
bit channel color to a Color .
public Color.from_string (string str)
Parses a string definition of a color, filling the
red , green ,
blue and alpha fields of
color
.
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 #rrggbbaa , where r , g , b and a are hexadecimal digits representing
the red, green, blue and alpha components respectively.
Fields: