From d448c26dba53f59abd1012cb6ea1df24a561a73e Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 5 Jun 2008 22:23:19 +0000 Subject: [PATCH] patch by Jeffrey Morlan (mrnobo1024 at yahoo dot com, irc: Goplat): fix coordinate transformation for NtGdiSetDIBitsToDevice, fixes bug 3200 See issue #3294 for more details. svn path=/trunk/; revision=33861 --- reactos/dll/win32/gdi32/objects/bitmap.c | 3 ++- reactos/subsystems/win32/win32k/objects/dibobj.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/reactos/dll/win32/gdi32/objects/bitmap.c b/reactos/dll/win32/gdi32/objects/bitmap.c index da07b3b7487..13e6741d0b4 100644 --- a/reactos/dll/win32/gdi32/objects/bitmap.c +++ b/reactos/dll/win32/gdi32/objects/bitmap.c @@ -447,8 +447,9 @@ SetDIBitsToDevice( ColorUse, lpbmi->bmiHeader.biSizeImage, lpbmi->bmiHeader.biSize, - FALSE, + TRUE, NULL); } + diff --git a/reactos/subsystems/win32/win32k/objects/dibobj.c b/reactos/subsystems/win32/win32k/objects/dibobj.c index 5abc026add4..7b3fe19095e 100644 --- a/reactos/subsystems/win32/win32k/objects/dibobj.c +++ b/reactos/subsystems/win32/win32k/objects/dibobj.c @@ -372,8 +372,14 @@ NtGdiSetDIBitsToDeviceInternal( rcDest.left = XDest; rcDest.top = YDest; - rcDest.right = XDest + Width; - rcDest.bottom = YDest + Height; + if (bTransformCoordinates) + { + CoordLPtoDP(pDC, (LPPOINT)&rcDest); + } + rcDest.left += pDC->ptlDCOrig.x; + rcDest.top += pDC->ptlDCOrig.y; + rcDest.right = rcDest.left + Width; + rcDest.bottom = rcDest.top + Height; ptSource.x = XSrc; ptSource.y = YSrc;