From 7f459b49f0a2098df65d7d7ff921485d398981e2 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 6 May 2026 14:45:33 +0300 Subject: [PATCH] [WIN32K:NTGDI] Fix brush origin for pattern painting Use pdc->ptlFillOrigin (which is adjusted by the Window origin already) instead of pdc->pdcattr->ptlBrushOrigin. Fixes several gdiplus_winetest:brush tests --- win32ss/gdi/ntgdi/bitblt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/win32ss/gdi/ntgdi/bitblt.c b/win32ss/gdi/ntgdi/bitblt.c index 8c1eba02488..cafd4324ec6 100644 --- a/win32ss/gdi/ntgdi/bitblt.c +++ b/win32ss/gdi/ntgdi/bitblt.c @@ -1274,7 +1274,7 @@ IntGdiFillRgn( bRet = IntEngPaint(&pdc->dclevel.pSurface->SurfObj, (CLIPOBJ *)&xcoClip, pbo, - &pdc->pdcattr->ptlBrushOrigin, + &pdc->ptlFillOrigin, mix); DC_vFinishBlit(pdc, NULL); @@ -1547,10 +1547,10 @@ NtGdiGetPixel( ptlSrc.x += pdc->ptlDCOrig.x; ptlSrc.y += pdc->ptlDCOrig.y; - rcDest.left = x; - rcDest.top = y; - rcDest.right = x + 1; - rcDest.bottom = y + 1; + rcDest.left = ptlSrc.x; + rcDest.top = ptlSrc.y; + rcDest.right = ptlSrc.x + 1; + rcDest.bottom = ptlSrc.y + 1; /* Prepare DC for blit */ DC_vPrepareDCsForBlit(pdc, &rcDest, NULL, NULL);