Angus Leeming <[EMAIL PROTECTED]> writes:
| +++ src/frontends/xforms/FormPreferences.C 2001/01/23 12:22:39
| @@ -806,9 +806,9 @@
| // Note that X stores the RGB values in the range 0 - 65535
| // whilst we require them in the range 0 - 255.
| RGBColor col;
| - col.r = static_cast<unsigned char>(xcol.red);
| - col.g = static_cast<unsigned char>(xcol.green);
| - col.b = static_cast<unsigned char>(xcol.blue);
| + col.r = xcol.red / 256;
| + col.g = xcol.green / 256;
| + col.b = xcol.blue / 256;
Can you do this by shifting instead, since that is what we really do.
We just removes the lower 8 bits.
col.r = xcol.red >> 8;
btw. I think you still need the static cast to avoid warnings.
col.r = static_cast<unsigned char>(xcol.red >> 8);
Lgb