12 void visual_color_free (
VisColor* color)
19 visual_return_val_if_fail (src !=
nullptr,
nullptr);
26 visual_return_if_fail (dest !=
nullptr);
27 visual_return_if_fail (src !=
nullptr);
32 void visual_color_set (
VisColor* color, uint8_t r, uint8_t g, uint8_t b)
34 visual_return_if_fail (color !=
nullptr);
39 void visual_color_set_rgba (
VisColor* color, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
41 visual_return_if_fail (color !=
nullptr);
43 color->
set (r, g, b, a);
48 visual_return_val_if_fail (src1 !=
nullptr, FALSE);
49 visual_return_val_if_fail (src2 !=
nullptr, FALSE);
51 return ( *src1 == *src2 );
54 void visual_color_set_hsv (
VisColor* color,
float h,
float s,
float v)
56 visual_return_if_fail (color !=
nullptr);
61 void visual_color_get_hsv (
VisColor* color,
float* h,
float* s,
float* v)
63 visual_return_if_fail (color !=
nullptr);
68 void visual_color_set_from_uint32 (
VisColor* color, uint32_t rgba)
70 visual_return_if_fail (color !=
nullptr);
72 color->set_from_uint32 (rgba);
75 void visual_color_set_from_uint16 (
VisColor* color, uint16_t rgb)
77 visual_return_if_fail (color !=
nullptr);
79 color->set_from_uint16 (rgb);
82 uint32_t visual_color_to_uint32 (
VisColor* color)
84 visual_return_val_if_fail (color !=
nullptr, 0);
86 return color->to_uint32 ();
89 uint16_t visual_color_to_uint16 (
VisColor* color)
91 visual_return_val_if_fail (color !=
nullptr, 0);
93 return color->to_uint16 ();
98 return const_cast<VisColor*
> (&LV::Color::black ());
103 return const_cast<VisColor*
> (&LV::Color::white ());