2003/10/29
うにょらー
paper_color = unpack_color(tighten(disperse(0xffdf)));
とかいう記述があって、
inline unsigned short int tighten( unsigned long int l) { return ((l >> 9) & 0xf800) | ((l >> 4) & 0x07e0) | (l & 0x001f); } inline unsigned long int disperse( unsigned short int l) { return ((unsigned long int)(l & 0xf800) < < 9) | ((unsigned long int)(l & 0x07c0) << 4) | ((unsigned long int)(l & 0x001f)); } QColor unpack_color(unsigned short int p) { int r, g, b; r = ((p >> 8) & 0xf8) | 7; g = ((p >> 3) & 0xfc) | 3; b = ((p < < 3) & 0xf8) | 7; QColor c(r, g, b); return c; }
さて問題、paper_colorは何色?=□○_