[5/9] gdiplus: added GdipPathIterCopyData

Evan Stade estade at gmail.com
Mon Jul 16 21:45:06 CDT 2007


Hi,

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

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index b1d9490..f1ecbc1 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -431,7 +431,7 @@
 @ stub GdipMultiplyWorldTransform
 @ stub GdipNewInstalledFontCollection
 @ stub GdipNewPrivateFontCollection
-@ stub GdipPathIterCopyData
+@ stdcall GdipPathIterCopyData(ptr ptr ptr ptr long long)
 @ stub GdipPathIterEnumerate
 @ stub GdipPathIterGetCount
 @ stub GdipPathIterGetSubpathCount
diff --git a/dlls/gdiplus/pathiterator.c b/dlls/gdiplus/pathiterator.c
index 9d4dc85..de71e6e 100644
--- a/dlls/gdiplus/pathiterator.c
+++ b/dlls/gdiplus/pathiterator.c
@@ -62,3 +62,24 @@ GpStatus WINGDIPAPI GdipDeletePathIter(G
 
     return Ok;
 }
+
+GpStatus WINGDIPAPI GdipPathIterCopyData(GpPathIterator* iterator,
+    INT* resultCount, GpPointF* points, BYTE* types, INT startIndex, INT endIndex)
+{
+    if(!iterator || !types || !points)
+        return InvalidParameter;
+
+    if(endIndex > iterator->pathdata.Count - 1 || startIndex < 0 ||
+        endIndex < startIndex){
+        *resultCount = 0;
+        return Ok;
+    }
+
+    *resultCount = endIndex - startIndex + 1;
+
+    memcpy(types, &(iterator->pathdata.Types[startIndex]), *resultCount);
+    memcpy(points, &(iterator->pathdata.Points[startIndex]),
+        *resultCount * sizeof(PointF));
+
+    return Ok;
+}
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index e6751b1..0aa2e7d 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -87,6 +87,8 @@ GpStatus WINGDIPAPI GdipTransformMatrixP
 
 GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator**,GpPath*);
 GpStatus WINGDIPAPI GdipDeletePathIter(GpPathIterator*);
+GpStatus WINGDIPAPI GdipPathIterCopyData(GpPathIterator*,INT*,GpPointF*,BYTE*,
+    INT,INT);
 
 #ifdef __cplusplus
 }
-- 
1.4.1


More information about the wine-patches mailing list