Author: greatlrd
Date: Thu Jul 26 23:25:33 2007
New Revision: 27881
URL:
http://svn.reactos.org/svn/reactos?rev=27881&view=rev
Log:
merge down 27865 and 27872 : Fixing really fuckup CreatePen / NtGdiCreatePen
NtGdiCreatePen accpect 4 param, CreatePen accpect 3 param, NtGdiCreatePenIndirect does not
exists in win32k, implement it in gdi32 direcly by timo k
Added:
branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/objects/pen.c (with props)
Modified:
branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/gdi32.def
branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/gdi32.rbuild
branches/ros-branch-0_3_3/reactos/subsystems/win32/win32k/objects/pen.c
branches/ros-branch-0_3_3/reactos/tools/nci/w32ksvc.db
Modified: branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/gdi32.def
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3/reactos/dll/wi…
==============================================================================
--- branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/gdi32.def (original)
+++ branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/gdi32.def Thu Jul 26 23:25:33 2007
@@ -79,8 +79,8 @@
CreateMetaFileW@4
CreatePalette@4=NtGdiCreatePalette@4
CreatePatternBrush@4
-CreatePen@12=NtGdiCreatePen@12
-CreatePenIndirect@4=NtGdiCreatePenIndirect@4
+CreatePen@12
+CreatePenIndirect@4
CreatePolyPolygonRgn@16=NtGdiCreatePolyPolygonRgn@16
CreatePolygonRgn@12=NtGdiCreatePolygonRgn@12
CreateRectRgn@16=NtGdiCreateRectRgn@16
Modified: branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/gdi32.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3/reactos/dll/wi…
==============================================================================
--- branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/gdi32.rbuild (original)
+++ branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/gdi32.rbuild Thu Jul 26 23:25:33
2007
@@ -46,6 +46,7 @@
<file>font.c</file>
<file>linedda.c</file>
<file>metafile.c</file>
+ <file>pen.c</file>
<file>region.c</file>
<file>text.c</file>
<file>utils.c</file>
Added: branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/objects/pen.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3/reactos/dll/wi…
==============================================================================
--- branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/objects/pen.c (added)
+++ branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/objects/pen.c Thu Jul 26 23:25:33
2007
@@ -1,0 +1,37 @@
+#include "precomp.h"
+
+#define NDEBUG
+#include <debug.h>
+
+/*
+ * @implemented
+ */
+HPEN WINAPI
+CreatePenIndirect(
+ const LOGPEN *plgpn)
+{
+ 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;
+}
+
+/*
+ * @implemented
+ */
+HPEN WINAPI
+CreatePen(
+ int nPenStyle,
+ int nWidth,
+ COLORREF crColor)
+{
+ return NtGdiCreatePen(nPenStyle, nWidth, crColor, NULL);
+}
+
Propchange: branches/ros-branch-0_3_3/reactos/dll/win32/gdi32/objects/pen.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/ros-branch-0_3_3/reactos/subsystems/win32/win32k/objects/pen.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3/reactos/subsys…
==============================================================================
--- branches/ros-branch-0_3_3/reactos/subsystems/win32/win32k/objects/pen.c (original)
+++ branches/ros-branch-0_3_3/reactos/subsystems/win32/win32k/objects/pen.c Thu Jul 26
23:25:33 2007
@@ -242,44 +242,6 @@
}
HPEN STDCALL
-NtGdiCreatePenIndirect(CONST PLOGPEN LogPen)
-{
- LOGPEN SafeLogPen = {0};
- NTSTATUS Status = STATUS_SUCCESS;
-
- _SEH_TRY
- {
- ProbeForRead(LogPen,
- sizeof(LOGPEN),
- 1);
- SafeLogPen = *LogPen;
- }
- _SEH_HANDLE
- {
- Status = _SEH_GetExceptionCode();
- }
- _SEH_END;
-
- if (!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- return 0;
- }
-
- return IntGdiExtCreatePen(SafeLogPen.lopnStyle,
- SafeLogPen.lopnWidth.x,
- BS_SOLID,
- SafeLogPen.lopnColor,
- 0,
- 0,
- 0,
- NULL,
- 0,
- TRUE,
- 0);
-}
-
-HPEN STDCALL
NtGdiExtCreatePen(
DWORD dwPenStyle,
DWORD ulWidth,
Modified: branches/ros-branch-0_3_3/reactos/tools/nci/w32ksvc.db
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3/reactos/tools/…
==============================================================================
--- branches/ros-branch-0_3_3/reactos/tools/nci/w32ksvc.db (original)
+++ branches/ros-branch-0_3_3/reactos/tools/nci/w32ksvc.db Thu Jul 26 23:25:33 2007
@@ -37,8 +37,7 @@
NtGdiCreateMetaFile 1
NtGdiCreatePalette 1
NtGdiCreatePatternBrushInternal 3
-NtGdiCreatePen 3
-NtGdiCreatePenIndirect 1
+NtGdiCreatePen 4
NtGdiCreatePolygonRgn 3
NtGdiCreatePolyPolygonRgn 4
NtGdiCreateRectRgn 4