Author: jimtabor
Date: Tue Jun 17 15:19:30 2008
New Revision: 34004
URL:
http://svn.reactos.org/svn/reactos?rev=34004&view=rev
Log:
Implement Get/SetMiterLimit, with proper float containment.
Modified:
trunk/reactos/dll/win32/gdi32/objects/path.c
trunk/reactos/subsystems/win32/win32k/objects/dc.c
trunk/reactos/subsystems/win32/win32k/objects/path.c
Modified: trunk/reactos/dll/win32/gdi32/objects/path.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/pa…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/path.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/path.c [iso-8859-1] Tue Jun 17 15:19:30 2008
@@ -136,7 +136,13 @@
PFLOAT a2
)
{
- return NtGdiSetMiterLimit ( hdc, a1, (PDWORD)a2 );
+ BOOL Ret;
+ gxf_long worker, worker1;
+
+ worker.f = a1;
+ Ret = NtGdiSetMiterLimit ( hdc, worker.l, a2 ? &worker1.l : NULL );
+ if (a2 && Ret) *a2 = worker1.f;
+ return Ret;
}
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 [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c [iso-8859-1] Tue Jun 17 15:19:30
2008
@@ -3442,7 +3442,7 @@
OUT LPRECT prc,
IN DWORD f)
{
- DPRINT1("stub");
+ DPRINT1("stub\n");
return DCB_RESET; /* bounding rectangle always empty */
}
@@ -3453,7 +3453,7 @@
IN LPRECT prc,
IN DWORD f)
{
- DPRINT1("stub");
+ DPRINT1("stub\n");
return DCB_DISABLE; /* bounding rectangle always empty */
}
Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] Tue Jun 17 15:19:30
2008
@@ -195,8 +195,39 @@
IN HDC hdc,
OUT PDWORD pdwOut)
{
- UNIMPLEMENTED;
- return FALSE;
+ DC *pDc;
+ gxf_long worker;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ if(!(pDc = DC_LockDc(hdc))) return FALSE;
+
+ worker.f = pDc->DcLevel.laPath.eMiterLimit;
+
+ if (pdwOut)
+ {
+ _SEH_TRY
+ {
+ ProbeForWrite(pdwOut,
+ sizeof(DWORD),
+ 1);
+ *pdwOut = worker.l;
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ DC_UnlockDc(pDc);
+ return FALSE;
+ }
+ }
+
+ DC_UnlockDc(pDc);
+ return TRUE;
+
}
INT
@@ -298,8 +329,40 @@
IN DWORD dwNew,
IN OUT OPTIONAL PDWORD pdwOut)
{
- UNIMPLEMENTED;
- return FALSE;
+ DC *pDc;
+ gxf_long worker, worker1;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ if(!(pDc = DC_LockDc(hdc))) return FALSE;
+
+ worker.l = dwNew;
+ worker1.f = pDc->DcLevel.laPath.eMiterLimit;
+ pDc->DcLevel.laPath.eMiterLimit = worker.f;
+
+ if (pdwOut)
+ {
+ _SEH_TRY
+ {
+ ProbeForWrite(pdwOut,
+ sizeof(DWORD),
+ 1);
+ *pdwOut = worker1.l;
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ DC_UnlockDc(pDc);
+ return FALSE;
+ }
+ }
+
+ DC_UnlockDc(pDc);
+ return TRUE;
}
BOOL