Adam Petaccia : gdiplus: Implement GdipGetFontUnit.

Alexandre Julliard julliard at winehq.org
Wed Jun 25 16:44:28 CDT 2008


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

Author: Adam Petaccia <adam at tpetaccia.com>
Date:   Sat Jun 21 13:02:54 2008 -0400

gdiplus: Implement GdipGetFontUnit.

---

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

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 9762356..cdfd7f2 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -236,6 +236,26 @@ GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font)
     return GdipCreateFontFromLogfontW(hdc, &lfw, font);
 }
 
+/*******************************************************************************
+ * GdipGetFontUnit  [GDIPLUS.@]
+ *
+ * PARAMS
+ *  font    [I] Font to retrieve from
+ *  unit    [O] Return value
+ *
+ * RETURNS
+ *  FAILURE: font or unit was NULL
+ *  OK: otherwise
+ */
+GpStatus WINGDIPAPI GdipGetFontUnit(GpFont *font, Unit *unit)
+{
+    if (!(font && unit)) return InvalidParameter;
+
+    *unit = font->unit;
+
+    return Ok;
+}
+
 /* FIXME: use graphics */
 GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics,
     LOGFONTW *lfw)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index f43a63e..9950c0f 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -271,7 +271,7 @@
 @ stub GdipGetFontHeightGivenDPI
 @ stub GdipGetFontSize
 @ stub GdipGetFontStyle
-@ stub GdipGetFontUnit
+@ stdcall GdipGetFontUnit(ptr ptr)
 @ stdcall GdipGetGenericFontFamilyMonospace(ptr)
 @ stdcall GdipGetGenericFontFamilySansSerif(ptr)
 @ stdcall GdipGetGenericFontFamilySerif(ptr)
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index a8caf9b..a3a12f3 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -349,6 +349,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**)
 GpStatus WINGDIPAPI GdipDeleteFont(GpFont*);
 GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*);
 GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**);
+GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*, Unit*);
 
 GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*,
     GpFontCollection*, GpFontFamily**);




More information about the wine-cvs mailing list