gdiplus: Added GdipPathIterCopyData.

This commit is contained in:
Evan Stade 2007-07-16 19:45:06 -07:00 committed by Alexandre Julliard
parent 085082897a
commit ef6c416631
3 changed files with 24 additions and 1 deletions

View file

@ -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

View file

@ -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;
}

View file

@ -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
}