diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 14e32eb99b0..f697e50e302 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -114,7 +114,7 @@ @ stdcall GdipCreateMetafileFromWmf(ptr long ptr ptr) @ stub GdipCreateMetafileFromWmfFile @ stdcall GdipCreatePath2(ptr ptr long long ptr) -@ stub GdipCreatePath2I +@ stdcall GdipCreatePath2I(ptr ptr long long ptr) @ stdcall GdipCreatePath(long ptr) @ stdcall GdipCreatePathGradient(ptr long long ptr) @ stdcall GdipCreatePathGradientFromPath(ptr ptr) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 5c2e287304b..0375f8e7464 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -403,6 +403,27 @@ GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF* points, return Ok; } +GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint* points, + GDIPCONST BYTE* types, INT count, GpFillMode fill, GpPath **path) +{ + GpPointF *ptF; + GpStatus ret; + INT i; + + ptF = GdipAlloc(sizeof(GpPointF)*count); + + for(i = 0;i < count; i++){ + ptF[i].X = (REAL)points[i].X; + ptF[i].Y = (REAL)points[i].Y; + } + + ret = GdipCreatePath2(ptF, types, count, fill, path); + + GdipFree(ptF); + + return ret; +} + GpStatus WINGDIPAPI GdipDeletePath(GpPath *path) { if(!path) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 3819e992f9c..a9cdc54c315 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -198,6 +198,7 @@ GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*); GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**); GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF*,GDIPCONST BYTE*,INT, GpFillMode,GpPath**); +GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint*,GDIPCONST BYTE*,INT,GpFillMode,GpPath**); GpStatus WINGDIPAPI GdipDeletePath(GpPath*); GpStatus WINGDIPAPI GdipGetPathFillMode(GpPath*,GpFillMode*); GpStatus WINGDIPAPI GdipGetPathPoints(GpPath*,GpPointF*,INT);