Author: greatlrd
Date: Tue Sep 26 00:12:43 2006
New Revision: 24270
URL:
http://svn.reactos.org/svn/reactos?rev=24270&view=rev
Log:
implement PEN_GetObject, we can now get pen from GetopjectType. and manger pass some new
wine test
Modified:
trunk/reactos/subsystems/win32/win32k/include/pen.h
trunk/reactos/subsystems/win32/win32k/objects/dc.c
trunk/reactos/subsystems/win32/win32k/objects/pen.c
Modified: trunk/reactos/subsystems/win32/win32k/include/pen.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/pen.h (original)
+++ trunk/reactos/subsystems/win32/win32k/include/pen.h Tue Sep 26 00:12:43 2006
@@ -11,4 +11,6 @@
#define PENOBJ_LockPen(hBMObj) ((PGDIBRUSHOBJ)GDIOBJ_LockObj(GdiHandleTable, (HGDIOBJ)
hBMObj, GDI_OBJECT_TYPE_PEN))
#define PENOBJ_UnlockPen(pPenObj) GDIOBJ_UnlockObjByPtr(GdiHandleTable, pPenObj)
+INT STDCALL PEN_GetObject(PGDIBRUSHOBJ hPen, INT Count, PLOGPEN Buffer);
+
#endif
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Tue Sep 26 00:12:43 2006
@@ -1734,11 +1734,11 @@
ObjectType = GDIOBJ_GetObjectType(Handle);
switch (ObjectType)
{
-#if 0
+
case GDI_OBJECT_TYPE_PEN:
- Result = PEN_GetObject((PENOBJ *) GdiObject, Count, Buffer);
+ Result = PEN_GetObject((PGDIBRUSHOBJ) GdiObject, Count, (PLOGPEN) Buffer); //
IntGdiCreatePenIndirect
break;
-#endif
+
case GDI_OBJECT_TYPE_BRUSH:
Result = BRUSH_GetObject((PGDIBRUSHOBJ ) GdiObject, Count, (LPLOGBRUSH)Buffer);
break;
Modified: trunk/reactos/subsystems/win32/win32k/objects/pen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/pen.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/pen.c Tue Sep 26 00:12:43 2006
@@ -84,12 +84,29 @@
break;
default:
- DPRINT1("FIXME: IntGdiCreatePenIndirect is UNIMPLEMENTED\n");
+ DPRINT1("FIXME: IntGdiCreatePenIndirect is UNIMPLEMENTED pen
%x\n",LogPen->lopnStyle);
}
PENOBJ_UnlockPen(PenObject);
return hPen;
+}
+
+INT STDCALL
+PEN_GetObject(PGDIBRUSHOBJ PenObject, INT Count, PLOGPEN Buffer)
+{
+
+ LOGPEN LogPen;
+
+ if( Buffer == NULL ) return sizeof(LOGPEN);
+
+ LogPen.lopnWidth = PenObject->ptPenWidth;
+ LogPen.lopnStyle = PenObject->ulPenStyle;
+ LogPen.lopnColor = PenObject->BrushAttr.lbColor;
+ memcpy(Buffer, &LogPen, Count);
+
+ return Count;
+
}
/* PUBLIC FUNCTIONS ***********************************************************/