/*************************************************************************** helpers.cpp Just a few functions needed in several Kjofol-classes --------------------------------------------- Maintainer: Charles Samuels ***************************************************************************/ #ifndef KJHELPERS_CPP #define KJHELPERS_CPP static int grayRgb(TQRgb r) { return tqGray(tqRed(r), tqGreen(r), tqBlue(r)); } static int isGray(TQRgb r) { // this is more tolerant than the old version // i.e. RGB 162 163 162 is treated as gray too // too many broken skins around having such colors // cerr << "r("<> 3)) |= 1 << (x & 7); else *(image.scanLine(y) + (x >> 3)) &= ~(1 << (x & 7)); } else { if (value) *(image.scanLine(y) + (x >> 3)) |= 1 << (7-(x & 7)); else *(image.scanLine(y) + (x >> 3)) &= ~(1 << (7-(x & 7))); } } #endif