Author: greatlrd
Date: Thu Aug 23 23:21:16 2007
New Revision: 28484
URL:
http://svn.reactos.org/svn/reactos?rev=28484&view=rev
Log:
remove redirect of CreatePolyPolygonRgn@16 and implement own stub for it, it is hacked, it
should doing, return (HRGN) NtGdiPolyPolyDraw(fnPolyFillMode, lppt, lpPolyCounts,
nCount, 6 );
remove redirect of CreatePolygonRgn@12 and implement own stub for it, it is hacked, it
should doing return NtGdiPolyPolyDraw(fnPolyFillMode,lppt,cPoints,1,6);
remove redirect of CreateRectRgn@16 and implement own stub for it, some part need be done
in user mode
Fix CreateRectRgnIndirect it call now on CreateRectRgn for some part need be done in user
mode, and it crash if NULL comes in as param, like windows does.
Fix CreatePenIndirect ir call now on CreatePen for some stuff need be done in user mode.
Add comment to CreatePen it need be fix.
Modified:
trunk/reactos/dll/win32/gdi32/gdi32.def
trunk/reactos/dll/win32/gdi32/objects/pen.c
trunk/reactos/dll/win32/gdi32/objects/region.c
Modified: trunk/reactos/dll/win32/gdi32/gdi32.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.def?…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/gdi32.def (original)
+++ trunk/reactos/dll/win32/gdi32/gdi32.def Thu Aug 23 23:21:16 2007
@@ -76,19 +76,19 @@
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
Modified: trunk/reactos/dll/win32/gdi32/objects/pen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/pe…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/pen.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/pen.c Thu Aug 23 23:21:16 2007
@@ -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 @@
int nWidth,
COLORREF crColor)
{
+ /* FIXME Some part need be done in user mode */
return NtGdiCreatePen(nPenStyle, nWidth, crColor, NULL);
}
Modified: trunk/reactos/dll/win32/gdi32/objects/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/re…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/region.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/region.c Thu Aug 23 23:21:16 2007
@@ -24,30 +24,41 @@
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 @@
}
+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);
+
}