From: Bartosz Kosiorek gang65@poczta.onet.pl
--- dlls/gdiplus/graphics.c | 9 ++++++--- dlls/gdiplus/tests/graphics.c | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 758889eca06..e3b5661fd67 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -3049,11 +3049,11 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image count, srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback, callbackData);
- if (count > 3) + if (count == 4) return NotImplemented;
if(!graphics || !image || !points || count != 3) - return InvalidParameter; + return InvalidParameter;
TRACE("%s %s %s\n", debugstr_pointf(&points[0]), debugstr_pointf(&points[1]), debugstr_pointf(&points[2])); @@ -3421,7 +3421,10 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRectI(GpGraphics *graphics, GpImage *imag srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback, callbackData);
- if(!points || count!=3) + if (count == 4) + return NotImplemented; + + if (!points || count != 3) return InvalidParameter;
for(i = 0; i < count; i++){ diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 0456a451970..89baff64fa4 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -1341,6 +1341,8 @@ static void test_GdipDrawImagePointsRect(void) ptf[3].Y = 10; status = GdipDrawImagePointsRect(graphics, (GpImage*)bm, ptf, 4, 0, 0, 10, 10, UnitPixel, NULL, NULL, NULL); expect(NotImplemented, status); + status = GdipDrawImagePointsRect(graphics, (GpImage*)bm, ptf, 5, 0, 0, 10, 10, UnitPixel, NULL, NULL, NULL); + expect(InvalidParameter, status); status = GdipDrawImagePointsRect(graphics, (GpImage*)bm, ptf, 2, 0, 0, 10, 10, UnitPixel, NULL, NULL, NULL); expect(InvalidParameter, status); status = GdipDrawImagePointsRect(graphics, (GpImage*)bm, ptf, 3, 0, 0, 10, 10, UnitPixel, NULL, NULL, NULL);