gdiplus: Implemented GdipDrawCurve2I.
authorNikolay Sivov <bunglehead@gmail.com>
Mon, 28 Apr 2008 20:09:44 +0000 (00:09 +0400)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 29 Apr 2008 11:45:48 +0000 (13:45 +0200)
dlls/gdiplus/gdiplus.spec
dlls/gdiplus/graphics.c

index 2c708235b83809d53240c9aa6a79e7b4a60749b7..298c5f76ab1bc78afcf0b15b0d5a7416c0f36306 100644 (file)
 @ stub GdipDrawClosedCurve
 @ stub GdipDrawClosedCurveI
 @ stdcall GdipDrawCurve2(ptr ptr ptr long long)
-@ stub GdipDrawCurve2I
+@ stdcall GdipDrawCurve2I(ptr ptr ptr long long)
 @ stub GdipDrawCurve3
 @ stub GdipDrawCurve3I
 @ stub GdipDrawCurve
index b8a2efade1d43ab45976a8ff87299a9669e05136..d918d9917f759750566ef2183f259583e61902a7 100644 (file)
@@ -1059,6 +1059,31 @@ GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics *graphics, GpPen *pen,
     return retval;
 }
 
+GpStatus WINGDIPAPI GdipDrawCurve2I(GpGraphics *graphics, GpPen *pen,
+    GDIPCONST GpPoint *points, INT count, REAL tension)
+{
+    GpPointF *pointsF;
+    GpStatus ret;
+    INT i;
+
+    if(!points || 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;
+    }
+
+    ret = GdipDrawCurve2(graphics,pen,pointsF,count,tension);
+    GdipFree(pointsF);
+
+    return ret;
+}
+
 GpStatus WINGDIPAPI GdipDrawImageI(GpGraphics *graphics, GpImage *image, INT x,
     INT y)
 {