Author: fireball
Date: Sat Oct 17 21:47:26 2009
New Revision: 43540
URL:
http://svn.reactos.org/svn/reactos?rev=43540&view=rev
Log:
- It was really too early to remove PatBlt and BitBlt. Get them back for now, since they
are still supported.
Modified:
branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c
branches/arwinss/reactos/dll/win32/winent.drv/winent.drv.spec
Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] Sat Oct 17
21:47:26 2009
@@ -40,7 +40,6 @@
return FALSE;
}
-#if 0
BOOL CDECL RosDrv_BitBlt( NTDRV_PDEVICE *physDevDst, INT xDst, INT yDst,
INT width, INT height, NTDRV_PDEVICE *physDevSrc,
INT xSrc, INT ySrc, DWORD rop )
@@ -76,7 +75,6 @@
return RosGdiBitBlt(physDevDst->hKernelDC, xDst, yDst, width, height,
physDevSrc->hKernelDC, xSrc, ySrc, rop);
}
-#endif
int CDECL RosDrv_ChoosePixelFormat(NTDRV_PDEVICE *physDev,
const PIXELFORMATDESCRIPTOR *ppfd)
@@ -398,6 +396,29 @@
return FALSE;
}
+BOOL CDECL RosDrv_PatBlt( NTDRV_PDEVICE *physDev, INT left, INT top, INT width, INT
height, DWORD rop )
+{
+ POINT pts[2], ptBrush;
+
+ /* Map coordinates */
+ pts[0].x = left;
+ pts[0].y = top;
+ pts[1].x = left + width;
+ pts[1].y = top + height;
+
+ LPtoDP(physDev->hUserDC, pts, 2);
+ width = pts[1].x - pts[0].x;
+ height = pts[1].y - pts[0].y;
+ left = pts[0].x;
+ top = pts[0].y;
+
+ /* Update brush origin */
+ GetBrushOrgEx(physDev->hUserDC, &ptBrush);
+ RosGdiSetBrushOrg(physDev->hKernelDC, ptBrush.x, ptBrush.y);
+
+ return RosGdiPatBlt(physDev->hKernelDC, left, top, width, height, rop);
+}
+
BOOL CDECL RosDrv_Pie( NTDRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
{
@@ -752,16 +773,8 @@
GetBrushOrgEx(physDevDst->hUserDC, &ptBrush);
RosGdiSetBrushOrg(physDevDst->hKernelDC, ptBrush.x, ptBrush.y);
- if (!physDevSrc)
- {
- /* This is PatBlt */
- return RosGdiPatBlt(physDevDst->hKernelDC, xDst, yDst, widthDst, heightDst,
rop);
- }
- else
- {
- return RosGdiStretchBlt(physDevDst->hKernelDC, xDst, yDst, widthDst,
heightDst,
- physDevSrc->hKernelDC, xSrc, ySrc, widthSrc, heightSrc, rop);
- }
+ return RosGdiStretchBlt(physDevDst->hKernelDC, xDst, yDst, widthDst, heightDst,
+ physDevSrc->hKernelDC, xSrc, ySrc, widthSrc, heightSrc, rop);
}
BOOL CDECL RosDrv_SwapBuffers(NTDRV_PDEVICE *physDev)
Modified: branches/arwinss/reactos/dll/win32/winent.drv/winent.drv.spec
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winent.drv/winent.drv.spec [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winent.drv/winent.drv.spec [iso-8859-1] Sat Oct 17
21:47:26 2009
@@ -2,6 +2,7 @@
@ cdecl AlphaBlend(ptr long long long long ptr long long long long long)
RosDrv_AlphaBlend
@ cdecl Arc(ptr long long long long long long long long) RosDrv_Arc
+@ cdecl BitBlt(ptr long long long long ptr long long long) RosDrv_BitBlt
@ cdecl ChoosePixelFormat(ptr ptr) RosDrv_ChoosePixelFormat
@ cdecl Chord(ptr long long long long long long long long) RosDrv_Chord
@ cdecl CreateBitmap(ptr long ptr) RosDrv_CreateBitmap
@@ -30,6 +31,7 @@
@ cdecl GetTextMetrics(ptr ptr) RosDrv_GetTextMetrics
@ cdecl LineTo(ptr long long) RosDrv_LineTo
@ cdecl PaintRgn(ptr long) RosDrv_PaintRgn
+@ cdecl PatBlt(ptr long long long long long) RosDrv_PatBlt
@ cdecl Pie(ptr long long long long long long long long) RosDrv_Pie
@ cdecl PolyPolygon(ptr ptr ptr long) RosDrv_PolyPolygon
@ cdecl PolyPolyline(ptr ptr ptr long) RosDrv_PolyPolyline