gdiplus: Implement GdipGetFontSize.

This commit is contained in:
Adam Petaccia 2008-06-21 13:02:55 -04:00 committed by Alexandre Julliard
parent 1919b124a2
commit 082529b1bf
3 changed files with 27 additions and 1 deletions

View file

@ -236,6 +236,31 @@ GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font)
return GdipCreateFontFromLogfontW(hdc, &lfw, font);
}
/******************************************************************************
* GdipGetFontSize [GDIPLUS.@]
*
* Returns the size of the font in Units
*
* PARAMS
* *font [I] The font to retrieve size from
* *size [O] Pointer to hold retrieved value
*
* RETURNS
* SUCCESS: Ok
* FAILURE: InvalidParamter (font or size was NULL)
*
* NOTES
* Size returned is actually emSize -- not internal size used for drawing.
*/
GpStatus WINGDIPAPI GdipGetFontSize(GpFont *font, REAL *size)
{
if (!(font && size)) return InvalidParameter;
*size = font->emSize;
return Ok;
}
/*******************************************************************************
* GdipGetFontUnit [GDIPLUS.@]
*

View file

@ -269,7 +269,7 @@
@ stub GdipGetFontCollectionFamilyList
@ stub GdipGetFontHeight
@ stub GdipGetFontHeightGivenDPI
@ stub GdipGetFontSize
@ stdcall GdipGetFontSize(ptr ptr)
@ stub GdipGetFontStyle
@ stdcall GdipGetFontUnit(ptr ptr)
@ stdcall GdipGetGenericFontFamilyMonospace(ptr)

View file

@ -350,6 +350,7 @@ GpStatus WINGDIPAPI GdipDeleteFont(GpFont*);
GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*);
GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**);
GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*, Unit*);
GpStatus WINGDIPAPI GdipGetFontSize(GpFont*, REAL*);
GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*,
GpFontCollection*, GpFontFamily**);