From: Nikolay Sivov Date: Tue, 29 Apr 2008 21:28:12 +0000 (+0400) Subject: gdiplus: Implemented GdipGetPathPointsI. X-Git-Tag: wine-0.9.61~129 X-Git-Url: http://git.etersoft.ru/projects/?a=commitdiff_plain;h=d93062f13e4f5354da36931eef465e05a7576243;p=wine%2Feterwine.git gdiplus: Implemented GdipGetPathPointsI. --- diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 4549c4b737..3b5e0b3125 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 59b018d784..8a795e0e36 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 49464d88f3..241948bc50 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*);