Commit 938d42c1 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdiplus: When there is no target rectangle specified DrawImage should scale image to device dpi.

parent 7f1cb3bc
...@@ -2974,7 +2974,9 @@ GpStatus WINGDIPAPI GdipDrawImagePointRect(GpGraphics *graphics, GpImage *image, ...@@ -2974,7 +2974,9 @@ GpStatus WINGDIPAPI GdipDrawImagePointRect(GpGraphics *graphics, GpImage *image,
TRACE("(%p, %p, %f, %f, %f, %f, %f, %f, %d)\n", graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit); TRACE("(%p, %p, %f, %f, %f, %f, %f, %f, %d)\n", graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit);
scale_x = units_scale(srcUnit, graphics->unit, graphics->xres); scale_x = units_scale(srcUnit, graphics->unit, graphics->xres);
scale_x *= graphics->xres / image->xres;
scale_y = units_scale(srcUnit, graphics->unit, graphics->yres); scale_y = units_scale(srcUnit, graphics->unit, graphics->yres);
scale_y *= graphics->yres / image->yres;
width = srcwidth * scale_x; width = srcwidth * scale_x;
height = srcheight * scale_y; height = srcheight * scale_y;
......
...@@ -3642,7 +3642,6 @@ static void test_DrawImage(void) ...@@ -3642,7 +3642,6 @@ static void test_DrawImage(void)
expect(Ok, status); expect(Ok, status);
match = memcmp(white_2x2, black_2x2, sizeof(black_2x2)) == 0; match = memcmp(white_2x2, black_2x2, sizeof(black_2x2)) == 0;
todo_wine
ok(match, "data should match\n"); ok(match, "data should match\n");
if (!match) if (!match)
{ {
...@@ -3695,7 +3694,6 @@ static void test_GdipDrawImagePointRect(void) ...@@ -3695,7 +3694,6 @@ static void test_GdipDrawImagePointRect(void)
expect(Ok, status); expect(Ok, status);
match = memcmp(white_2x2, black_2x2, sizeof(black_2x2)) == 0; match = memcmp(white_2x2, black_2x2, sizeof(black_2x2)) == 0;
todo_wine
ok(match, "data should match\n"); ok(match, "data should match\n");
if (!match) if (!match)
{ {
......
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