From f994306a028cd1bc1e99abf9254cfd6a53bad9f0 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 23 Apr 2008 01:12:59 +0400 Subject: [PATCH] gdiplus: Implemented GdipCloneFont. --- dlls/gdiplus/font.c | 13 +++++++++++++ dlls/gdiplus/gdiplus.spec | 2 +- include/gdiplusflat.h | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index be60843e3a9..d5d7e944c0f 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -99,3 +99,16 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, return Ok; } + +GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont) +{ + if(!font || !cloneFont) + return InvalidParameter; + + *cloneFont = GdipAlloc(sizeof(GpFont)); + if(!*cloneFont) return OutOfMemory; + + **cloneFont = *font; + + return Ok; +} diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index cbea1b98c13..e301f5713b9 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -50,7 +50,7 @@ @ stub GdipCloneBitmapAreaI @ stdcall GdipCloneBrush(ptr ptr) @ stdcall GdipCloneCustomLineCap(ptr ptr) -@ stub GdipCloneFont +@ stdcall GdipCloneFont(ptr ptr) @ stub GdipCloneFontFamily @ stub GdipCloneImage @ stub GdipCloneImageAttributes diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index a8f6568e2ac..5765795add9 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -313,6 +313,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC,GDIPCONST LOGFONTA*,GpFont**) GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**); GpStatus WINGDIPAPI GdipDeleteFont(GpFont*); GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*); +GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**); GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**); GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat*);