Changed: Added set8888() method to CGRBA

--HG--
branch : develop
This commit is contained in:
kervala 2016-01-01 16:01:03 +01:00
parent 2ed7c0be88
commit 27a2263bd6

View file

@ -177,6 +177,17 @@ public:
B= (B<<3) + (B>>2);
}
/**
* Set the RGBA fields with a 32 bits 8888 pixel.
*/
void set8888(uint32 col)
{
R = col & 255;
G = (col >> 8) & 255;
B = (col >> 16) & 255;
A = (col >> 24) & 255;
}
/**
* Compute in this the average of 2 RGBA.