Clean up blend_colour macro.

svn path=/trunk/netsurf/; revision=13753
This commit is contained in:
Michael Drake 2012-03-27 21:34:55 +00:00
parent f0dbe1d689
commit ca7ef937ff

View File

@ -60,9 +60,9 @@
* colour and adding them to half the intensity of each channel in the second
* colour */
#define blend_colour(c0, c1) \
((((c0 >> 16) + (c1 >> 16)) >> 1) << 16) | \
(((((c0 >> 8) & 0xff) + ((c1 >> 8) & 0xff)) >> 1) << 8) | \
((((c0 & 0xff) + (c1 & 0xff)) >> 1) << 0)
(((((c0 >> 16) & 0xff) + ((c1 >> 16) & 0xff)) >> 1) << 16) | \
(((((c0 >> 8) & 0xff) + ((c1 >> 8) & 0xff)) >> 1) << 8) | \
(((( c0 & 0xff) + ( c1 & 0xff)) >> 1) << 0)
/* get a bitmap pixel (image/bitmap.h) into a plot colour */
#define pixel_to_colour(b) \