Vincent Povirk : gdiplus: Don't rely on an HDC in GdipGetFontHeight.
Alexandre Julliard
julliard at winehq.org
Mon Nov 1 11:54:32 CDT 2010
Module: wine
Branch: master
Commit: cb21d1caf441b5adeeb52f3c6e3af03a0dcfc844
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cb21d1caf441b5adeeb52f3c6e3af03a0dcfc844
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Sat Oct 30 13:19:48 2010 -0500
gdiplus: Don't rely on an HDC in GdipGetFontHeight.
---
dlls/gdiplus/font.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 2670e81..843cfb5 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -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);
+
+ if (stat == Ok)
+ stat = GdipGetFontHeightGivenDPI(font, dpi, height);
- return GdipGetFontHeightGivenDPI(font, dpi, height);
+ return stat;
}
/*******************************************************************************
More information about the wine-cvs
mailing list