Author: fireball Date: Tue Aug 11 15:20:32 2009 New Revision: 42613
URL: http://svn.reactos.org/svn/reactos?rev=42613&view=rev Log: - Implement usermode part of Get/SetPixel. - Add RosDrv_UpdateZOrder declaration to winent.h
Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c branches/arwinss/reactos/dll/win32/winent.drv/winent.h
Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winent... ============================================================================== --- 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] Tue Aug 11 15:20:32 2009 @@ -343,8 +343,13 @@
COLORREF CDECL RosDrv_GetPixel( NTDRV_PDEVICE *physDev, INT x, INT y ) { - UNIMPLEMENTED; - return 0; + POINT ptPixel; + + /* Transform to device coordinates */ + ptPixel.x = x; ptPixel.y = y; + LPtoDP(physDev->hUserDC, &ptPixel, 1); + + return RosGdiGetPixel(physDev->hKernelDC, ptPixel.x, ptPixel.y); }
int CDECL RosDrv_GetPixelFormat(NTDRV_PDEVICE *physDev) @@ -699,8 +704,13 @@
COLORREF CDECL RosDrv_SetPixel( NTDRV_PDEVICE *physDev, INT x, INT y, COLORREF color ) { - UNIMPLEMENTED; - return 0; + POINT ptPixel; + + /* Transform to device coordinates */ + ptPixel.x = x; ptPixel.y = y; + LPtoDP(physDev->hUserDC, &ptPixel, 1); + + return RosGdiSetPixel(physDev->hKernelDC, ptPixel.x, ptPixel.y, color); }
BOOL CDECL RosDrv_SetPixelFormat(NTDRV_PDEVICE *physDev,
Modified: branches/arwinss/reactos/dll/win32/winent.drv/winent.h URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winent... ============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/winent.h [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/winent.h [iso-8859-1] Tue Aug 11 15:20:32 2009 @@ -63,3 +63,4 @@ struct ntdrv_win_data *NTDRV_get_win_data( HWND hwnd ); struct ntdrv_win_data *NTDRV_create_win_data( HWND hwnd ); void NTDRV_destroy_win_data( HWND hwnd ); +VOID CDECL RosDrv_UpdateZOrder(HWND hwnd, RECT *rect);