mirror of
https://github.com/brl/mutter.git
synced 2024-12-03 05:10:40 -05:00
2007-08-02 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-color.c (clutter_color_subtract): Invert the operands and match what the function says it does.
This commit is contained in:
parent
a6a998e4d8
commit
337571a805
@ -1,3 +1,8 @@
|
||||
2007-08-02 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/clutter-color.c (clutter_color_subtract): Invert the
|
||||
operands and match what the function says it does.
|
||||
|
||||
2007-08-01 Matthew Allum <mallum@openedhand.com>
|
||||
|
||||
* clutter/clutter-color.c: (clutter_color_from_pixel):
|
||||
|
@ -74,7 +74,9 @@ clutter_color_add (const ClutterColor *src1,
|
||||
* @dest: return location for the result
|
||||
*
|
||||
* Subtracts @src2 from @src1 and saves the resulting
|
||||
* color inside @dest.
|
||||
* color inside @dest. This function assumes that the components
|
||||
* of @src1 are greater than the components of @src2; the result is,
|
||||
* otherwise, undefined.
|
||||
*
|
||||
* The alpha channel of @dest is set as the minimum value
|
||||
* between the alpha channels of @src1 and @src2.
|
||||
@ -88,9 +90,9 @@ clutter_color_subtract (const ClutterColor *src1,
|
||||
g_return_if_fail (src2 != NULL);
|
||||
g_return_if_fail (dest != NULL);
|
||||
|
||||
dest->red = CLAMP (src2->red - src1->red, 0, 255);
|
||||
dest->green = CLAMP (src2->green - src1->green, 0, 255);
|
||||
dest->blue = CLAMP (src2->blue - src1->blue, 0, 255);
|
||||
dest->red = CLAMP (src1->red - src2->red, 0, 255);
|
||||
dest->green = CLAMP (src1->green - src2->green, 0, 255);
|
||||
dest->blue = CLAMP (src1->blue - src2->blue, 0, 255);
|
||||
|
||||
dest->alpha = MIN (src1->alpha, src2->alpha);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user