diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 976bd3aa13a..a59297142c5 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -9,7 +9,7 @@ @ stub GdipAddPathClosedCurve @ stub GdipAddPathClosedCurveI @ stdcall GdipAddPathCurve2(ptr ptr long long) -@ stub GdipAddPathCurve2I +@ stdcall GdipAddPathCurve2I(ptr ptr long long) @ stub GdipAddPathCurve3 @ stub GdipAddPathCurve3I @ stub GdipAddPathCurve diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index bf580b0775b..8e8930d439d 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -247,6 +247,32 @@ GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath *path, GDIPCONST GpPointF *points, return stat; } +GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath *path, GDIPCONST GpPoint *points, + INT count, REAL tension) +{ + GpPointF *ptf; + INT i; + GpStatus stat; + + if(!path || !points || count <= 1) + return InvalidParameter; + + ptf = GdipAlloc(sizeof(GpPointF)*count); + if(!ptf) + return OutOfMemory; + + for(i = 0; i < count; i++){ + ptf[i].X = (REAL)points[i].X; + ptf[i].Y = (REAL)points[i].Y; + } + + stat = GdipAddPathCurve2(path, ptf, count, tension); + + GdipFree(ptf); + + return stat; +} + GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width, REAL height) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 2928500058e..da5c930cf35 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -247,6 +247,7 @@ GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath*,INT,INT,INT,INT,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipAddPathBeziersI(GpPath*,GDIPCONST GpPoint*,INT); GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL); +GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath*,GDIPCONST GpPoint*,INT,REAL); GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL);