Printer driver: Calling EngBitBlt from DrvBitBlt ok to do?
From: Scott Robins (ScottRobins_at_discussions.microsoft.com)
Date: 01/27/05
- Next message: Stephan Wolf [MVP]: "Re: NdisQueryBufferSafe question"
- Previous message: Don Burn: "Re: memory mapping"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 27 Jan 2005 12:05:05 -0800
The printer that my (monolithic, user mode) driver is for doesn't handle
certain raster ops well.
So, in an attempt to improve image quality, I am trying to do more rendering
in my
driver.
My first attempt was to take certain operations and attempt to do them myself,
by creating a bitmap and calling EngBitBlt instead of passing the request to
the printer. Here is a code excerpt from my driver's implementation of
BitBlt:
if (I decide the printer can't handle this rop)
{
SURFOBJ* psoTmp=NULL;
HSURF hbmTmp;
BOOL bSuccess;
hbmTmp = (HSURF)EngCreateBitmap(sizl, (LONG)sizl.cx, BMF_24BPP, 0, NULL);
if (hbmTmp != NULL) {
if ((psoTmp = EngLockSurface((HSURF)hbmTmp)) != NULL) {
if ((psoSrc->iType == STYPE_BITMAP) && (psoTrg->iType ==
STYPE_DEVICE))
{
bSuccess = EngBitBlt(psoTmp, psoSrc, psoMask, pco, pxlo,
prclTrg,pptlSrc,ptlMask, pbo,
pptlBrush, rop4);
if (!bSuccess) {
ASSERT(0);
return(FALSE);
}
}
}
}
}
My theory is that I'll now take psoTmp and send it to the printer, already
rendered. But, the call to EngBitBlt ALWAYS returns false.
Is this just not possible? I do something *very* similar in my driver's
CopyBits (calling EngCopyBits) and that works.
Any ideas?
Thanks,
ScottR
-- Scott Robins Scott dot Robins at usa dot xerox dot com
- Next message: Stephan Wolf [MVP]: "Re: NdisQueryBufferSafe question"
- Previous message: Don Burn: "Re: memory mapping"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|