Module: wine Branch: master Commit: d93062f13e4f5354da36931eef465e05a7576243 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d93062f13e4f5354da36931eef...
Author: Nikolay Sivov bunglehead@gmail.com Date: Wed Apr 30 01:28:12 2008 +0400
gdiplus: Implemented GdipGetPathPointsI.
---
dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 23 +++++++++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 4549c4b..3b5e0b3 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 59b018d..8a795e0 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 49464d8..241948b 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*);