[Gdiplus 14/16] Implement GdipGetCellAscent

Adam Petaccia adam at tpetaccia.com
Wed Jul 2 12:25:58 CDT 2008


---
 dlls/gdiplus/font.c       |    7 ++++---
 dlls/gdiplus/tests/font.c |    6 ++++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index d89c275..367b9e7 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -525,13 +525,14 @@ GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily)
     return Ok;
 }
 
-GpStatus WINGDIPAPI GdipGetCellAscent(GDIPCONST GpFontFamily *family, INT style, UINT16 * CellAscent)
+GpStatus WINGDIPAPI GdipGetCellAscent(GDIPCONST GpFontFamily *family,
+        INT style, UINT16* CellAscent)
 {
     if (!(family && CellAscent)) return InvalidParameter;
 
-    FIXME("stub!\n");
+    *CellAscent = family->tmw.tmAscent;
 
-    return NotImplemented;
+    return Ok;
 }
 
 GpStatus WINGDIPAPI GdipGetCellDescent(GDIPCONST GpFontFamily *family, INT style, UINT16 * CellDescent)
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index d9d3278..c788dfb 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -209,11 +209,14 @@ todo_wine
     stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result);
     expect(Ok, stat);
     ok(result == 2048, "Expected 2048, got %d\n", result);
+}
     result = 0;
     stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result);
     expect(Ok, stat);
     ok(result == 1854, "Expected 1854, got %d\n", result);
     result = 0;
+todo_wine
+{
     stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result);
     ok(result == 434, "Expected 434, got %d\n", result);
 }
@@ -230,11 +233,14 @@ todo_wine
     stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result);
     expect(Ok, stat);
     ok(result == 2048, "Expected 2048, got %d\n", result);
+}
     result = 0;
     stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result);
     expect(Ok, stat);
     ok(result == 1825, "Expected 1825, got %d\n", result);
     result = 0;
+todo_wine
+{
     stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result);
     ok(result == 443, "Expected 443 got %d\n", result);
 }
-- 
1.5.4.3




More information about the wine-patches mailing list