gdiplus: Don't rely on an HDC in GdipGetFontHeight.
This commit is contained in:
parent
4fff9a7a52
commit
cb21d1caf4
|
@ -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;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
Loading…
Reference in New Issue