Alexandre Julliard : gdi32: Use the correct brush origin when the blit operation requires an intermediate bitmap.
Alexandre Julliard
julliard at winehq.org
Mon Aug 28 14:05:16 CDT 2017
Module: wine
Branch: master
Commit: 1c56b3b5168844eb72e0dd22cbe98713c1da7b4f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c56b3b5168844eb72e0dd22cbe98713c1da7b4f
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Aug 28 09:10:45 2017 +0200
gdi32: Use the correct brush origin when the blit operation requires an intermediate bitmap.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdi32/dibdrv/bitblt.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/dibdrv/bitblt.c b/dlls/gdi32/dibdrv/bitblt.c
index f4efc8f..0acb23f 100644
--- a/dlls/gdi32/dibdrv/bitblt.c
+++ b/dlls/gdi32/dibdrv/bitblt.c
@@ -742,6 +742,7 @@ static DWORD execute_rop( dibdrv_physdev *pdev, const RECT *dst_rect, dib_info *
{
dib_info *dibs[3], *result = src, tmp;
RECT rects[3];
+ POINT origin;
int width = dst_rect->right - dst_rect->left;
int height = dst_rect->bottom - dst_rect->top;
const BYTE *opcode = BITBLT_Opcodes[(rop >> 16) & 0xff];
@@ -788,7 +789,10 @@ static DWORD execute_rop( dibdrv_physdev *pdev, const RECT *dst_rect, dib_info *
brush_org, OP_ROP(*opcode) );
break;
case OP_ARGS(PAT,SRC):
- pdev->brush.rects( pdev, &pdev->brush, dibs[SRC], 1, &rects[SRC], brush_org, OP_ROP(*opcode) );
+ /* offset the brush origin to match the final dest rectangle */
+ origin.x = brush_org->x + rects[DST].left - rects[SRC].left;
+ origin.y = brush_org->y + rects[DST].top - rects[SRC].top;
+ pdev->brush.rects( pdev, &pdev->brush, dibs[SRC], 1, &rects[SRC], &origin, OP_ROP(*opcode) );
break;
}
}
More information about the wine-cvs
mailing list