[1/6] gdiplus: GdipGetPathPointsI

Nikolay Sivov bunglehead at gmail.com
Tue Apr 29 16:28:12 CDT 2008


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

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 8e8e94f..5c4aa52 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -344,7 +344,7 @@
 @ stub GdipGetPathGradientWrapMode
 @ stub GdipGetPathLastPoint
 @ stdcall GdipGetPathPoints(ptr ptr long)
-@ stub GdipGetPathPointsI
+@ stdcall GdipGetPathPointsI(ptr ptr long)
 @ stdcall GdipGetPathTypes(ptr ptr long)
 @ stdcall GdipGetPathWorldBounds(ptr ptr ptr ptr)
 @ stub GdipGetPathWorldBoundsI
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c
index 59b018d..261a0d7 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -502,6 +502,29 @@ GpStatus WINGDIPAPI GdipGetPathPoints(GpPath *path, GpPointF* points, INT count)
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipGetPathPointsI(GpPath *path, GpPoint* points, INT count)
+{
+    GpStatus ret;
+    GpPointF *ptf;
+    INT i;
+    
+    if(count <= 0)
+        return InvalidParameter;
+
+    ptf = GdipAlloc(sizeof(GpPointF)*count);
+    if(!ptf)    return OutOfMemory;
+
+    ret = GdipGetPathPoints(path,ptf,count);
+    if(ret == Ok)
+        for(i = 0;i < count;i++){
+            points[i].X = roundr(ptf[i].X);
+            points[i].Y = roundr(ptf[i].Y);
+        };
+    GdipFree(ptf);
+
+    return ret;
+}
+
 GpStatus WINGDIPAPI GdipGetPathTypes(GpPath *path, BYTE* types, INT count)
 {
     if(!path)
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 49464d8..241948b 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -218,6 +218,7 @@ GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint*,GDIPCONST BYTE*,INT,GpFi
 GpStatus WINGDIPAPI GdipDeletePath(GpPath*);
 GpStatus WINGDIPAPI GdipGetPathFillMode(GpPath*,GpFillMode*);
 GpStatus WINGDIPAPI GdipGetPathPoints(GpPath*,GpPointF*,INT);
+GpStatus WINGDIPAPI GdipGetPathPointsI(GpPath*,GpPoint*,INT);
 GpStatus WINGDIPAPI GdipGetPathTypes(GpPath*,BYTE*,INT);
 GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath*,GpRectF*,GDIPCONST GpMatrix*,GDIPCONST GpPen*);
 GpStatus WINGDIPAPI GdipGetPathWorldBoundsI(GpPath*,GpRect*,GDIPCONST GpMatrix*,GDIPCONST GpPen*);
-- 
1.4.4.4






More information about the wine-patches mailing list