Module: wine Branch: master Commit: c3bd7c003ea3ce13d5e1c48efaed855994cc2216 URL: https://gitlab.winehq.org/wine/wine/-/commit/c3bd7c003ea3ce13d5e1c48efaed855...
Author: Piotr Caban piotr@codeweavers.com Date: Tue Mar 28 12:01:36 2023 +0200
wineps: Handle EMR_BITBLT record in spool files.
---
dlls/wineps.drv/printproc.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
diff --git a/dlls/wineps.drv/printproc.c b/dlls/wineps.drv/printproc.c index 39850af9311..22713229c26 100644 --- a/dlls/wineps.drv/printproc.c +++ b/dlls/wineps.drv/printproc.c @@ -493,6 +493,34 @@ static int WINAPI hmf_proc(HDC hdc, HANDLETABLE *htable, DeleteObject(rgn); return ret; } + case EMR_BITBLT: + { + const EMRBITBLT *p = (const EMRBITBLT *)rec; + const BITMAPINFO *bi = (const BITMAPINFO *)((BYTE *)p + p->offBmiSrc); + const BYTE *src_bits = (BYTE *)p + p->offBitsSrc; + EMRSTRETCHBLT blt; + + + blt.rclBounds = p->rclBounds; + blt.xDest = p->xDest; + blt.yDest = p->yDest; + blt.cxDest = p->cxDest; + blt.cyDest = p->cyDest; + blt.dwRop = p->dwRop; + blt.xSrc = p->xSrc; + blt.ySrc = p->ySrc; + blt.xformSrc = p->xformSrc; + blt.crBkColorSrc = p->crBkColorSrc; + blt.iUsageSrc = p->iUsageSrc; + blt.offBmiSrc = p->offBmiSrc; + blt.cbBmiSrc = p->cbBmiSrc; + blt.offBitsSrc = p->offBitsSrc; + blt.cbBitsSrc = p->cbBitsSrc; + blt.cxSrc = p->cxDest; + blt.cySrc = p->cyDest; + + return stretch_blt(&data->pdev->dev, &blt, bi, src_bits); + } case EMR_STRETCHBLT: { const EMRSTRETCHBLT *p = (const EMRSTRETCHBLT *)rec;