gdiplus: Don't rely on an HDC in GdipGetFontHeight.

This commit is contained in:
Vincent Povirk 2010-10-30 13:19:48 -05:00 committed by Alexandre Julliard
parent 4fff9a7a52
commit cb21d1caf4
1 changed files with 6 additions and 2 deletions

View File

@ -452,12 +452,16 @@ GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont *font,
GDIPCONST GpGraphics *graphics, REAL *height)
{
REAL dpi;
GpStatus stat;
TRACE("%p %p %p\n", font, graphics, height);
dpi = GetDeviceCaps(graphics->hdc, LOGPIXELSY);
stat = GdipGetDpiY((GpGraphics*)graphics, &dpi);
return GdipGetFontHeightGivenDPI(font, dpi, height);
if (stat == Ok)
stat = GdipGetFontHeightGivenDPI(font, dpi, height);
return stat;
}
/*******************************************************************************