gdiplus: Implement GdipAddPathLine2I.
authorNikolay Sivov <bunglehead@gmail.com>
Wed, 16 Apr 2008 17:47:19 +0000 (21:47 +0400)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 17 Apr 2008 10:53:00 +0000 (12:53 +0200)
dlls/gdiplus/gdiplus.spec
dlls/gdiplus/graphicspath.c
include/gdiplusflat.h

index 5c5e0a8b4d1574cb2ec48e0f166e365e4291fb87..4ccd2133207a6a77c9e264267c12fccb0aa8506a 100644 (file)
@@ -17,7 +17,7 @@
 @ stdcall GdipAddPathEllipse(ptr long long long long)
 @ stub GdipAddPathEllipseI
 @ stdcall GdipAddPathLine2(ptr ptr long)
-@ stub GdipAddPathLine2I
+@ stdcall GdipAddPathLine2I(ptr ptr long)
 @ stub GdipAddPathLine
 @ stdcall GdipAddPathLineI(ptr long long long long)
 @ stdcall GdipAddPathPath(ptr ptr long)
index adeaa89187210c85ffa7bf31ff9102a20200a9f8..5d5e5fce09666ee6fb468265af1e2dfe45857f16 100644 (file)
@@ -217,6 +217,30 @@ GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points,
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipAddPathLine2I(GpPath *path, GDIPCONST GpPoint *points, INT count)
+{
+    GpPointF *pointsF;
+    INT i;
+    GpStatus stat;
+
+    if(count <= 0)
+        return InvalidParameter;
+
+    pointsF = GdipAlloc(sizeof(GpPointF) * count);
+    if(!pointsF)    return OutOfMemory;
+
+    for(i = 0;i < count; i++){
+        pointsF[i].X = (REAL)points[i].X;
+        pointsF[i].Y = (REAL)points[i].Y;
+    }
+
+    stat = GdipAddPathLine2(path, pointsF, count);
+
+    GdipFree(pointsF);
+
+    return stat;
+}
+
 GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2)
 {
     INT old_count;
index f615e5b5944044d3161c679f4469d35bcfb25236..bc97ef4236b6bbf632e47cecef1f9829fc96910b 100644 (file)
@@ -188,6 +188,7 @@ GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
 GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT);
 GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL);
 GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT);
+GpStatus WINGDIPAPI GdipAddPathLine2I(GpPath*,GDIPCONST GpPoint*,INT);
 GpStatus WINGDIPAPI GdipAddPathLineI(GpPath*,INT,INT,INT,INT);
 GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL);
 GpStatus WINGDIPAPI GdipClonePath(GpPath*,GpPath**);