gdiplus: Implemented GdipGetPathPointsI.

This commit is contained in:
Nikolay Sivov 2008-04-30 01:28:12 +04:00 committed by Alexandre Julliard
parent acf8e0f5a1
commit d93062f13e
3 changed files with 25 additions and 1 deletions

View File

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

View File

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

View File

@ -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*);