Commit 1135543d authored by Bartosz Kosiorek's avatar Bartosz Kosiorek Committed by Alexandre Julliard

gdiplus: Fix returned value of GdipDrawImagePointsRect according to native lib.

parent 90c2949b
......@@ -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++){
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment