Evan Stade : gdiplus: Added GdipPathIterCopyData.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jul 17 07:36:50 CDT 2007
Module: wine
Branch: master
Commit: ef6c41663159c38eba19a166773c5b871ef5ec25
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ef6c41663159c38eba19a166773c5b871ef5ec25
Author: Evan Stade <estade at gmail.com>
Date: Mon Jul 16 19:45:06 2007 -0700
gdiplus: Added GdipPathIterCopyData.
---
dlls/gdiplus/gdiplus.spec | 2 +-
dlls/gdiplus/pathiterator.c | 21 +++++++++++++++++++++
include/gdiplusflat.h | 2 ++
3 files changed, 24 insertions(+), 1 deletions(-)
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(GpPathIterator *iter)
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 GdipTransformMatrixPoints(GpMatrix*,GpPointF*,INT);
GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator**,GpPath*);
GpStatus WINGDIPAPI GdipDeletePathIter(GpPathIterator*);
+GpStatus WINGDIPAPI GdipPathIterCopyData(GpPathIterator*,INT*,GpPointF*,BYTE*,
+ INT,INT);
#ifdef __cplusplus
}
More information about the wine-cvs
mailing list