Module: wine Branch: master Commit: ad4f9396e00f473f695e237ded01f461268d201f URL: https://source.winehq.org/git/wine.git/?a=commit;h=ad4f9396e00f473f695e237de...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Sep 14 21:52:23 2021 +0200
win32u: Use NtGdiSetBrushOrg in NtGdiMaskBlt.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/gdi32/bitblt.c | 2 +- dlls/gdi32/dc.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c index 0de7932aa95..83ef949ec3f 100644 --- a/dlls/gdi32/bitblt.c +++ b/dlls/gdi32/bitblt.c @@ -810,7 +810,7 @@ BOOL WINAPI NtGdiMaskBlt( HDC hdcDest, INT nXDest, INT nYDest, INT nWidth, INT n
/* combine both using the mask as a pattern brush */ NtGdiSelectBrush(hDC2, hbrMask); - SetBrushOrgEx(hDC2, -xMask, -yMask, NULL); + NtGdiSetBrushOrg( hDC2, -xMask, -yMask, NULL ); /* (D & P) | (S & ~P) */ NtGdiBitBlt(hDC2, 0, 0, nWidth, nHeight, hDC1, 0, 0, 0xac0744, 0, 0 ); NtGdiSelectBrush(hDC2, hbrTmp); diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 3c84d2024fe..21ca88bab30 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -884,6 +884,22 @@ BOOL WINAPI NtGdiGetAndSetDCDword( HDC hdc, UINT method, DWORD value, DWORD *pre }
+/*********************************************************************** + * NtGdiSetBrushOrg (win32u.@) + */ +BOOL WINAPI NtGdiSetBrushOrg( HDC hdc, INT x, INT y, POINT *oldorg ) +{ + DC *dc; + + if (!(dc = get_dc_ptr( hdc ))) return FALSE; + if (oldorg) *oldorg = dc->attr->brush_org; + dc->attr->brush_org.x = x; + dc->attr->brush_org.y = y; + release_dc_ptr( dc ); + return TRUE; +} + + /*********************************************************************** * NtGdiGetTransform (win32u.@) *