mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:55:41 +00:00
- Cleanup UnrealizeObject and set dvNumAxes in CreateFontIndirect.
svn path=/trunk/; revision=37163
This commit is contained in:
parent
315219e37d
commit
3e91f16362
3 changed files with 29 additions and 40 deletions
|
@ -546,7 +546,19 @@ STDCALL
|
||||||
UnrealizeObject(HGDIOBJ hgdiobj)
|
UnrealizeObject(HGDIOBJ hgdiobj)
|
||||||
{
|
{
|
||||||
BOOL retValue = TRUE;
|
BOOL retValue = TRUE;
|
||||||
|
/*
|
||||||
|
Win 2k Graphics API, Black Book. by coriolis.com
|
||||||
|
Page 62, Note that Steps 3, 5, and 6 are not required for Windows NT(tm)
|
||||||
|
and Windows 2000(tm).
|
||||||
|
|
||||||
|
Step 5. UnrealizeObject(hTrackBrush);
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
msdn.microsoft.com,
|
||||||
|
"Windows 2000/XP: If hgdiobj is a brush, UnrealizeObject does nothing,
|
||||||
|
and the function returns TRUE. Use SetBrushOrgEx to set the origin of
|
||||||
|
a brush."
|
||||||
|
*/
|
||||||
if (GDI_HANDLE_GET_TYPE(hgdiobj) != GDI_OBJECT_TYPE_BRUSH)
|
if (GDI_HANDLE_GET_TYPE(hgdiobj) != GDI_OBJECT_TYPE_BRUSH)
|
||||||
{
|
{
|
||||||
retValue = NtGdiUnrealizeObject(hgdiobj);
|
retValue = NtGdiUnrealizeObject(hgdiobj);
|
||||||
|
|
|
@ -1355,6 +1355,8 @@ CreateFontIndirectW(
|
||||||
RtlZeroMemory( &Logfont.elfEnumLogfontEx.elfScript,
|
RtlZeroMemory( &Logfont.elfEnumLogfontEx.elfScript,
|
||||||
sizeof(Logfont.elfEnumLogfontEx.elfScript));
|
sizeof(Logfont.elfEnumLogfontEx.elfScript));
|
||||||
|
|
||||||
|
Logfont.elfDesignVector.dvNumAxes = 0; // No more than MM_MAX_NUMAXES
|
||||||
|
|
||||||
RtlZeroMemory( &Logfont.elfDesignVector, sizeof(DESIGNVECTOR));
|
RtlZeroMemory( &Logfont.elfDesignVector, sizeof(DESIGNVECTOR));
|
||||||
|
|
||||||
return CreateFontIndirectExW(&Logfont);
|
return CreateFontIndirectExW(&Logfont);
|
||||||
|
|
|
@ -685,52 +685,27 @@ NtGdiSetSystemPaletteUse(HDC hDC, UINT Usage)
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
BOOL
|
||||||
Win 2k Graphics API, Black Book. by coriolis.com
|
STDCALL
|
||||||
Page 62, Note that Steps 3, 5, and 6 are not required for Windows NT(tm)
|
|
||||||
and Windows 2000(tm).
|
|
||||||
|
|
||||||
Step 5. UnrealizeObject(hTrackBrush);
|
|
||||||
*/
|
|
||||||
BOOL STDCALL
|
|
||||||
NtGdiUnrealizeObject(HGDIOBJ hgdiobj)
|
NtGdiUnrealizeObject(HGDIOBJ hgdiobj)
|
||||||
{
|
{
|
||||||
|
|
||||||
POBJ pObject;
|
|
||||||
DWORD objectType;
|
|
||||||
BOOL Ret = FALSE;
|
BOOL Ret = FALSE;
|
||||||
|
PPALGDI palGDI;
|
||||||
|
|
||||||
/* From Wine: UnrealizeObject does not SetLastError() on a null object */
|
if ( !hgdiobj ||
|
||||||
if(!hgdiobj)
|
((UINT)hgdiobj & GDI_HANDLE_STOCK_MASK) ||
|
||||||
return Ret;
|
!GDI_HANDLE_IS_TYPE(hgdiobj, GDI_OBJECT_TYPE_PALETTE) )
|
||||||
|
|
||||||
pObject = GDIOBJ_LockObj(hgdiobj, GDI_OBJECT_TYPE_DONTCARE);
|
|
||||||
if (pObject == NULL)
|
|
||||||
{
|
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
|
||||||
objectType = GDIOBJ_GetObjectType(hgdiobj);
|
|
||||||
switch(objectType)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
msdn.microsoft.com,
|
|
||||||
"Windows 2000/XP: If hgdiobj is a brush, UnrealizeObject does nothing,
|
|
||||||
and the function returns TRUE. Use SetBrushOrgEx to set the origin of
|
|
||||||
a brush."
|
|
||||||
*/
|
|
||||||
case GDI_OBJECT_TYPE_BRUSH:
|
|
||||||
{
|
|
||||||
DPRINT("GDI_OBJECT_TYPE_BRUSH\n");
|
|
||||||
Ret = TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
DPRINT1("Magic 0x%08x not implemented\n", objectType);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
GDIOBJ_UnlockObjByPtr(pObject);
|
palGDI = PALETTE_LockPalette(hgdiobj);
|
||||||
|
if (!palGDI) return FALSE;
|
||||||
|
|
||||||
|
// FIXME!!
|
||||||
|
// Need to do something!!!
|
||||||
|
// Zero out Current and Old Translated pointers?
|
||||||
|
//
|
||||||
|
Ret = TRUE;
|
||||||
|
PALETTE_UnlockPalette(palGDI);
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue