gdiplus: Implemented GdipCreateFontFromDC.
This commit is contained in:
parent
64806e642f
commit
37b8140f56
|
@ -88,6 +88,24 @@ GpStatus WINGDIPAPI GdipDeleteFont(GpFont* font)
|
|||
return Ok;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font)
|
||||
{
|
||||
HFONT hfont;
|
||||
LOGFONTW lfw;
|
||||
|
||||
if(!font)
|
||||
return InvalidParameter;
|
||||
|
||||
hfont = (HFONT)GetCurrentObject(hdc, OBJ_FONT);
|
||||
if(!hfont)
|
||||
return GenericError;
|
||||
|
||||
if(!GetObjectW(hfont, sizeof(LOGFONTW), &lfw))
|
||||
return GenericError;
|
||||
|
||||
return GdipCreateFontFromLogfontW(hdc, &lfw, font);
|
||||
}
|
||||
|
||||
/* FIXME: use graphics */
|
||||
GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics,
|
||||
LOGFONTW *lfw)
|
||||
|
|
|
@ -86,9 +86,9 @@
|
|||
@ stub GdipCreateEffect
|
||||
@ stub GdipCreateFont
|
||||
@ stub GdipCreateFontFamilyFromName
|
||||
@ stub GdipCreateFontFromDC
|
||||
@ stdcall GdipCreateFontFromLogfontA(ptr ptr ptr)
|
||||
@ stdcall GdipCreateFontFromLogfontW(ptr ptr ptr)
|
||||
@ stdcall GdipCreateFontFromDC(long ptr)
|
||||
@ stdcall GdipCreateFontFromLogfontA(long ptr ptr)
|
||||
@ stdcall GdipCreateFontFromLogfontW(long ptr ptr)
|
||||
@ stdcall GdipCreateFromHDC2(long long ptr)
|
||||
@ stdcall GdipCreateFromHDC(long ptr)
|
||||
@ stdcall GdipCreateFromHWND(long ptr)
|
||||
|
|
|
@ -330,6 +330,7 @@ GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes*,
|
|||
GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes*,WrapMode,
|
||||
ARGB,BOOL);
|
||||
|
||||
GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC,GpFont**);
|
||||
GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC,GDIPCONST LOGFONTA*,GpFont**);
|
||||
GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**);
|
||||
GpStatus WINGDIPAPI GdipDeleteFont(GpFont*);
|
||||
|
|
Loading…
Reference in New Issue