[2/2] gdiplus: GdipCreatePath2I

Nikolay Sivov bunglehead at gmail.com
Wed Apr 16 18:02:27 CDT 2008


Changelog:
   - implemented using float args version.
---
 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 337ffb2..53830a1 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 adeaa89..11a66e3 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -373,6 +373,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 e92c646..aeb2376 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -196,6 +196,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);
-- 
1.4.4.4






More information about the wine-patches mailing list