gdiplus: Implemented GdipGetPathPointsI.
authorNikolay Sivov <bunglehead@gmail.com>
Tue, 29 Apr 2008 21:28:12 +0000 (01:28 +0400)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 30 Apr 2008 08:26:21 +0000 (10:26 +0200)
dlls/gdiplus/gdiplus.spec
dlls/gdiplus/graphicspath.c
include/gdiplusflat.h

index 4549c4b737746a7e8c29f96d14ff009937e01a9e..3b5e0b3125eea5d381b667e4d4929b827a4e0296 100644 (file)
 @ 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
index 59b018d7848bd350691cf99c38ef3a167dd29455..8a795e0e36f1d4fbd7ffcfde41956d53c857eec0 100644 (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)
index 49464d88f359853756dd1270f7250715165ebd7e..241948bc5083b134eaca38c4b96f3d6c558d3bd4 100644 (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*);