Black on White (bwtwo sun3)
Michael Koehne
kaffe@rufus.w3.org
Sat, 25 Jul 1998 05:56:54 +0000 ()
Hy Gurus,
this would allow to view the WidgetsDemo and TextEdit on
a monocrome XServer. Just the JPEG is still black/on/black.
I think that it would need dithering.
*** libraries/clib/awt/X/toolkit.h~ Sat Jul 18 00:22:12 1998
--- libraries/clib/awt/X/toolkit.h Sat Jul 25 05:35:22 1998
***************
*** 208,213 ****
--- 208,221 ----
case PseudoColor:
return X->pclr->pix [JI8(JRED(rgb))] [JI8(JGREEN(rgb))] [JI8(JBLUE(rgb))];
+
+ case StaticGray:
+ /*
+ return (JRED(rgb)*JRED(rgb)+
+ JGREEN(rgb)*JGREEN(rgb)+
+ JBLUE(rgb)*JBLUE(rgb) < 16384);
+ */
+ return (JRED(rgb)+ JGREEN(rgb)+ JBLUE(rgb) < 196);
}
}
***************
*** 233,238 ****
--- 241,251 ----
*g = X->pclr->rgb[(unsigned char)pixel].g;
*b = X->pclr->rgb[(unsigned char)pixel].b;
break;
+
+ case StaticGray:
+ *r = *g = *b = (JRED(pixel)+JGREEN(pixel)+JBLUE(pixel)/3);
+ break;
+
}
}
--
mailto:kraehe@bakunin.north.de http://human.is-bremen.de/~kraehe
" CETERUM CENSEO MSDOS ESSE DELENDAM "