Adam Petaccia : gdiplus: Implement GdipGetFontHeight.

Alexandre Julliard julliard at winehq.org
Thu Aug 28 07:00:46 CDT 2008


Module: wine
Branch: master
Commit: 5361f074a3b10be995920a81848c9e243bd9fe9a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5361f074a3b10be995920a81848c9e243bd9fe9a

Author: Adam Petaccia <adam at tpetaccia.com>
Date:   Wed Aug 27 17:22:04 2008 -0400

gdiplus: Implement GdipGetFontHeight.

---

 dlls/gdiplus/font.c       |   25 +++++++++++++++++++++++++
 dlls/gdiplus/gdiplus.spec |    2 +-
 include/gdiplusflat.h     |    2 ++
 3 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 9839a45..9d37077 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -384,6 +384,31 @@ GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont)
 }
 
 /*******************************************************************************
+ * GdipGetFontHeight [GDIPLUS.@]
+ * PARAMS
+ *  font        [I] Font to retrieve height from
+ *  graphics    [I] The current graphics context
+ *  height      [O] Resulting height
+ * RETURNS
+ *  SUCCESS: Ok
+ *  FAILURE: Another element of GpStatus
+ *
+ * NOTES
+ *  Forwards to GdipGetFontHeightGivenDPI
+ */
+GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont *font,
+        GDIPCONST GpGraphics *graphics, REAL *height)
+{
+    REAL dpi;
+
+    TRACE("%p %p %p\n", font, graphics, height);
+
+    dpi = GetDeviceCaps(graphics->hdc, LOGPIXELSY);
+
+    return GdipGetFontHeightGivenDPI(font, dpi, height);
+}
+
+/*******************************************************************************
  * GdipGetFontHeightGivenDPI [GDIPLUS.@]
  * PARAMS
  *  font        [I] Font to retrieve DPI from
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 3766dc1..95add0d 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -267,7 +267,7 @@
 @ stdcall GdipGetFamilyName(ptr ptr long)
 @ stdcall GdipGetFontCollectionFamilyCount(ptr ptr)
 @ stdcall GdipGetFontCollectionFamilyList(ptr long ptr ptr)
-@ stub GdipGetFontHeight
+@ stdcall GdipGetFontHeight(ptr ptr ptr)
 @ stdcall GdipGetFontHeightGivenDPI(ptr long ptr)
 @ stdcall GdipGetFontSize(ptr ptr)
 @ stdcall GdipGetFontStyle(ptr ptr)
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 320f02d..8a1e8f7 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -438,6 +438,8 @@ GpStatus WINGDIPAPI GdipGetFamily(GpFont*, GpFontFamily**);
 GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*, Unit*);
 GpStatus WINGDIPAPI GdipGetFontSize(GpFont*, REAL*);
 GpStatus WINGDIPAPI GdipGetFontStyle(GpFont*, INT*);
+GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont*, GDIPCONST GpGraphics*,
+        REAL*);
 GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont*, REAL, REAL*);
 
 GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*,




More information about the wine-cvs mailing list