Commit 37b8140f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus: Implemented GdipCreateFontFromDC.

parent 64806e64
......@@ -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*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment