Nikolay Sivov : gdiplus: Implement GdipCreatePath2I.

Alexandre Julliard julliard at winehq.org
Thu Apr 17 07:38:45 CDT 2008


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

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Thu Apr 17 03:02:27 2008 +0400

gdiplus: Implement GdipCreatePath2I.

---

 dlls/gdiplus/gdiplus.spec   |    2 +-
 dlls/gdiplus/graphicspath.c |   21 +++++++++++++++++++++
 include/gdiplusflat.h       |    1 +
 3 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 14e32eb..f697e50 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -114,7 +114,7 @@
 @ stdcall GdipCreateMetafileFromWmf(ptr long ptr ptr)
 @ stub GdipCreateMetafileFromWmfFile
 @ stdcall GdipCreatePath2(ptr ptr long long ptr)
-@ stub GdipCreatePath2I
+@ stdcall GdipCreatePath2I(ptr ptr long long ptr)
 @ stdcall GdipCreatePath(long ptr)
 @ stdcall GdipCreatePathGradient(ptr long long ptr)
 @ stdcall GdipCreatePathGradientFromPath(ptr ptr)
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c
index 5c2e287..0375f8e 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -403,6 +403,27 @@ GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF* points,
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint* points,
+    GDIPCONST BYTE* types, INT count, GpFillMode fill, GpPath **path)
+{
+    GpPointF *ptF;
+    GpStatus ret;
+    INT i;
+
+    ptF = GdipAlloc(sizeof(GpPointF)*count);
+
+    for(i = 0;i < count; i++){
+        ptF[i].X = (REAL)points[i].X;
+        ptF[i].Y = (REAL)points[i].Y;
+    }
+
+    ret = GdipCreatePath2(ptF, types, count, fill, path);
+
+    GdipFree(ptF);
+
+    return ret;
+}
+
 GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
 {
     if(!path)
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 3819e99..a9cdc54 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -198,6 +198,7 @@ GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*);
 GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**);
 GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF*,GDIPCONST BYTE*,INT,
     GpFillMode,GpPath**);
+GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint*,GDIPCONST BYTE*,INT,GpFillMode,GpPath**);
 GpStatus WINGDIPAPI GdipDeletePath(GpPath*);
 GpStatus WINGDIPAPI GdipGetPathFillMode(GpPath*,GpFillMode*);
 GpStatus WINGDIPAPI GdipGetPathPoints(GpPath*,GpPointF*,INT);




More information about the wine-cvs mailing list