I hope this is appropriate newsgroup for this posting.
I am building a Windows NT 4.0 Printer driver that basically lets GDI
render into a bitmap. I am not using the Unidriver approach because of
certain limitations, hence I am basing this driver on the Postscript and
FrameBuffer source. For now, the bitmap is 1 Bit Per Pixel (Monochrome),
and later I would like it to be configurable to 24 Bits Per Pixel.
So far, my driver is working pretty well except for 1 thing. Somehow, GDI
is not halftoning or dithering into the bitmap. I am probably not setting
something correctly in GDIINFO or DEVINFO at DrvEnablePDEV().
I am setting the following:
devinfo.iDitherFormat = BMF_1BPP;
// my driver does not create its own brush
devinfo.cxDither = 0;
devinfo.cyDither = 0;
devinfo.hPalDefault = EngCreatePalette(PAL_RGB, 0, 0, 0, 0, 0); // <--Is
gdiinfo.ulHTPatternSize = HT_PATSIZE_8x8; // Tried others, still same
gdiinfo.ulHTOutputFormat = HT_FORMAT_1BPP;
gdiinfo.ulHTFlags = HT_FLAG_HAS_BLACK_DYE;
gdiinfo.ulNumColors = 2;
gdiinfo.cBitsPixel = 1;
gdiinfo.ulDACRed = 8; // Are these applicable to printers????
gdiinfo.ulDACGreen = 8;
gdiinfo.ulDACBlue = 8;
gdiinfo.ulNumPalReg = 2;
I searched thru' the DDK/MSDN documentation, and I am confounded by this
problem. I would appreciate any help.
T. S. Lim