*/
#include <win32k.h>
-#include "math.h"
+#define _USE_MATH_DEFINES
+#include <math.h>
#define NDEBUG
#include <debug.h>
pPath = PATH_LockPath( hPath );
if (!pPath) return FALSE;
PATH_DestroyGdiPath( pPath );
- PATH_UnlockPath( pPath );
- PATH_FreeExtPathByHandle(hPath);
+ GDIOBJ_vDeleteObject(&pPath->BaseObject);
return TRUE;
}
PATH_FlattenPath(pPath);
- size = IntGdiGetObject( pdcattr->hpen, 0, NULL);
+ size = GreGetObject( pdcattr->hpen, 0, NULL);
if (!size)
{
PATH_UnlockPath( pPath );
}
elp = ExAllocatePoolWithTag(PagedPool, size, TAG_PATH);
- (VOID) IntGdiGetObject( pdcattr->hpen, size, elp);
+ GreGetObject(pdcattr->hpen, size, elp);
- obj_type = GDIOBJ_GetObjectType(pdcattr->hpen);
+ obj_type = GDI_HANDLE_GET_TYPE(pdcattr->hpen);
if(obj_type == GDI_OBJECT_TYPE_PEN)
{
penStyle = ((LOGPEN*)elp)->lopnStyle;
PATH_DestroyGdiPath(pDownPath);
ExFreePoolWithTag(pDownPath, TAG_PATH);
}
- ExFreePoolWithTag(pStrokes, TAG_PATH);
+ if (pStrokes) ExFreePoolWithTag(pStrokes, TAG_PATH);
pNewPath->state = PATH_Closed;
if (!(ret = PATH_AssignGdiPath(pPath, pNewPath)))
DPRINT1("Assign path failed\n");
PATH_DestroyGdiPath(pNewPath);
ExFreePoolWithTag(pNewPath, TAG_PATH);
+ PATH_UnlockPath(pPath);
return ret;
}
if ( !TextObj ) return FALSE;
FontGetObject( TextObj, sizeof(lf), &lf);
+ TEXTOBJ_UnlockText(TextObj);
if (lf.lfEscapement != 0)
{
}
pPath = PATH_LockPath(dc->dclevel.hPath);
+ if (!pPath)
{
DC_UnlockDc(dc);
return FALSE;
PATH_EmptyPath(pPath);
PATH_UnlockPath(pPath);
+ dc->dclevel.flPath &= ~DCPATH_ACTIVE;
+
DC_UnlockDc ( dc );
return TRUE;
}
if ( dc->dclevel.hPath )
{
- DPRINT1("BeginPath 1 0x%x\n", dc->dclevel.hPath);
+ DPRINT("BeginPath 1 0x%x\n", dc->dclevel.hPath);
if ( !(dc->dclevel.flPath & DCPATH_SAVE) )
{ // Remove previous handle.
if (!PATH_Delete(dc->dclevel.hPath))
dc->dclevel.hPath = pPath->BaseObject.hHmgr;
- DPRINT1("BeginPath 2 h 0x%x p 0x%x\n", dc->dclevel.hPath, pPath);
+ DPRINT("BeginPath 2 h 0x%x p 0x%x\n", dc->dclevel.hPath, pPath);
// Path handles are shared. Also due to recursion with in the same thread.
- GDIOBJ_UnlockObjByPtr((POBJ)pPath); // Unlock
+ GDIOBJ_vUnlockObject((POBJ)pPath); // Unlock
pPath = PATH_LockPath(dc->dclevel.hPath); // Share Lock.
/* Make sure that path is empty */
/* Set flag to indicate that path is finished */
else
{
- DPRINT1("EndPath 0x%x\n", dc->dclevel.hPath);
+ DPRINT("EndPath 0x%x\n", dc->dclevel.hPath);
pPath->state = PATH_Closed;
dc->dclevel.flPath &= ~DCPATH_ACTIVE;
}
BOOL ret = FALSE;
PPATH pPath;
PDC_ATTR pdcattr;
- PDC dc = DC_LockDc ( hDC );
+ PDC dc;
- if ( !dc )
+ dc = DC_LockDc(hDC);
+ if (!dc)
{
EngSetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
+
pPath = PATH_LockPath( dc->dclevel.hPath );
if (!pPath)
{