diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index a49da934e75..2a3aa8a01d0 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -180,7 +180,7 @@ @ stub GdipDrawImagePoints @ stub GdipDrawImagePointsI @ stdcall GdipDrawImagePointsRect(ptr ptr ptr long long long long long long ptr ptr ptr) -@ stub GdipDrawImagePointsRectI +@ stdcall GdipDrawImagePointsRectI(ptr ptr ptr long long long long long long ptr ptr ptr) @ stdcall GdipDrawImageRect(ptr ptr long long long long) @ stdcall GdipDrawImageRectI(ptr ptr long long long long) @ stdcall GdipDrawImageRectRect(ptr ptr long long long long long long long long long ptr long ptr) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 4559390e2a1..4982c84dd75 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1201,6 +1201,27 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image return Ok; } +GpStatus WINGDIPAPI GdipDrawImagePointsRectI(GpGraphics *graphics, GpImage *image, + GDIPCONST GpPoint *points, INT count, INT srcx, INT srcy, INT srcwidth, + INT srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes* imageAttributes, + DrawImageAbort callback, VOID * callbackData) +{ + GpPointF pointsF[3]; + INT i; + + if(!points || count!=3) + return InvalidParameter; + + for(i = 0; i < count; i++){ + pointsF[i].X = (REAL)points[i].X; + pointsF[i].Y = (REAL)points[i].Y; + } + + return GdipDrawImagePointsRect(graphics, image, pointsF, count, (REAL)srcx, (REAL)srcy, + (REAL)srcwidth, (REAL)srcheight, srcUnit, imageAttributes, + callback, callbackData); +} + GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics *graphics, GpImage *image, REAL dstx, REAL dsty, REAL dstwidth, REAL dstheight, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, GpUnit srcUnit, diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 15ab1343bea..73bf7c0edc4 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -80,7 +80,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics*,GpImage*, GDIPCONST GpPointF*,INT,REAL,REAL,REAL,REAL,GpUnit, GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); GpStatus WINGDIPAPI GdipDrawImagePointsRectI(GpGraphics*,GpImage*, - GDIPCONST GpPointF*,INT,INT,INT,INT,INT,GpUnit, + GDIPCONST GpPoint*,INT,INT,INT,INT,INT,GpUnit, GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics*,GpImage*,REAL,REAL,REAL, REAL,REAL,REAL,REAL,REAL,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort,