diff --git a/reactos/dll/win32/gdi32/gdi32.def b/reactos/dll/win32/gdi32/gdi32.def index a4065da87bb..1e1272e65ea 100644 --- a/reactos/dll/win32/gdi32/gdi32.def +++ b/reactos/dll/win32/gdi32/gdi32.def @@ -76,19 +76,19 @@ CreateMetaFileA@4 CreateMetaFileW@4 CreatePalette@4 CreatePatternBrush@4 - -ClearBitmapAttributes@8 -ClearBrushAttributes@8 CreatePen@12 CreatePenIndirect@4 -CreatePolyPolygonRgn@16=NtGdiCreatePolyPolygonRgn@16 -CreatePolygonRgn@12=NtGdiCreatePolygonRgn@12 -CreateRectRgn@16=NtGdiCreateRectRgn@16 +CreatePolyPolygonRgn@16 +CreatePolygonRgn@12 +CreateRectRgn@16 CreateRectRgnIndirect@4 CreateRoundRectRgn@24=NtGdiCreateRoundRectRgn@24 CreateScalableFontResourceA@16 CreateScalableFontResourceW@16 CreateSolidBrush@4 + +ClearBitmapAttributes@8 +ClearBrushAttributes@8 DPtoLP@12 DeleteColorSpace@4 DeleteDC@4 diff --git a/reactos/dll/win32/gdi32/objects/pen.c b/reactos/dll/win32/gdi32/objects/pen.c index 62193c6fab3..f10ef062336 100644 --- a/reactos/dll/win32/gdi32/objects/pen.c +++ b/reactos/dll/win32/gdi32/objects/pen.c @@ -8,19 +8,10 @@ */ HPEN WINAPI CreatePenIndirect( - const LOGPEN *plgpn) + const LOGPEN *lplgpn) { - if (plgpn) - { - return NtGdiCreatePen(plgpn->lopnStyle, - /* FIXME: MSDN says in docs for LOGPEN: - "If the pointer member is NULL, the pen is one pixel - wide on raster devices." Do we need to handle this? */ - plgpn->lopnWidth.x, - plgpn->lopnColor, - NULL); - } - return NULL; + /* Note same behoir as Windows 2000/XP/VISTA, they do not care if plgpn is NULLī, it will crash */ + return CreatePen(lplgpn->lopnStyle, lplgpn->lopnWidth.x, lplgpn->lopnColor); } /* @@ -32,6 +23,7 @@ CreatePen( int nWidth, COLORREF crColor) { + /* FIXME Some part need be done in user mode */ return NtGdiCreatePen(nPenStyle, nWidth, crColor, NULL); } diff --git a/reactos/dll/win32/gdi32/objects/region.c b/reactos/dll/win32/gdi32/objects/region.c index 1bc24a8c025..5f47f32806a 100644 --- a/reactos/dll/win32/gdi32/objects/region.c +++ b/reactos/dll/win32/gdi32/objects/region.c @@ -24,30 +24,41 @@ GetClipRgn( HRGN hrgn ) { - return NtGdiGetRandomRgn(hdc, hrgn, 1); + return NtGdiGetRandomRgn(hdc, hrgn, 1); } HRGN WINAPI -CreatePolygonRgn( const POINT* Point, int Count, int Mode) +CreatePolygonRgn( const POINT* lppt, int cPoints, int fnPolyFillMode) { - return CreatePolyPolygonRgn(Point, (const INT*)&Count, 1, Mode); + /* FIXME NtGdiPolyPolyDraw */ +#if 0 + return NtGdiPolyPolyDraw(fnPolyFillMode,lppt,cPoints,1,6); +#else + return CreatePolyPolygonRgn(lppt, (const INT*)&cPoints, 1, fnPolyFillMode); +#endif } HRGN WINAPI -CreatePolyPolygonRgn( const POINT* Point, - const INT* Count, - int inPolygons, - int Mode) +CreatePolyPolygonRgn( const POINT* lppt, + const INT* lpPolyCounts, + int nCount, + int fnPolyFillMode) { - return (HRGN) NtGdiPolyPolyDraw( (HDC) Mode, - (PPOINT) Point, - (PULONG) Count, - (ULONG) inPolygons, + /* FIXME NtGdiPolyPolyDraw */ +#if 0 + return (HRGN) NtGdiPolyPolyDraw( (HDC) fnPolyFillMode, + (PPOINT) lppt, + (PULONG) lpPolyCounts, + (ULONG) nCount, GdiPolyPolyRgn ); +#else + return NtGdiCreatePolyPolygonRgn( (PPOINT)lppt, (PINT)lpPolyCounts, nCount, fnPolyFillMode); +#endif + } HRGN @@ -61,18 +72,22 @@ CreateEllipticRgnIndirect( } +HRGN +WINAPI +CreateRectRgn(int x1, int y1, int x2,int y2) +{ + /* FIXME Some part need be done in user mode */ + return NtGdiCreateRectRgn(x1,y1,x2,y2); +} + + HRGN WINAPI CreateRectRgnIndirect( const RECT *prc ) { - if (prc) - { - return NtGdiCreateRectRgn(prc->left, - prc->top, - prc->right, - prc->bottom); - } - return NULL; + /* Notes if prc is NULL it will crash on All Windows NT I checked 2000/XP/VISTA */ + return CreateRectRgn(prc->left, prc->top, prc->right, prc->bottom); + }