gdi32: Fix bounding box calculation for EMR_STRETCHDIBITS.

rclBounds should denote a closed interval for each axis.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jinoh Kang 2021-11-06 01:37:33 +09:00 committed by Alexandre Julliard
parent 3f7df2a5f6
commit 03e9b882a2
2 changed files with 2 additions and 8 deletions

View File

@ -1639,8 +1639,8 @@ BOOL EMFDC_StretchDIBits( DC_ATTR *dc_attr, INT x_dst, INT y_dst, INT width_dst,
emr->rclBounds.left = x_dst;
emr->rclBounds.top = y_dst;
emr->rclBounds.right = x_dst + width_dst;
emr->rclBounds.bottom = y_dst + height_dst;
emr->rclBounds.right = x_dst + width_dst - 1;
emr->rclBounds.bottom = y_dst + height_dst - 1;
/* save the record we just created */
ret = emfdc_record( dc_attr->emf, &emr->emr );

View File

@ -6376,12 +6376,6 @@ static void test_emf_StretchDIBits(void)
{32, 4, 4, BI_BITFIELDS, 1, EMF_STRETCHDIBITS_32BIT_4X4_SIZED, sizeof(EMF_STRETCHDIBITS_32BIT_4X4_SIZED), 0, 3, {{0x00, 0x00, 0xff}, {0xe0, 0xff, 0x00}, {0xff, 0x00, 0x00}}},
};
if (!strcmp(winetest_platform, "wine"))
{
skip("Wine sets EMRSTRETCHDIBITS::rclBounds incorrectly\n");
return;
}
hdc = GetDC(0);
for (test_idx = 0; test_idx < ARRAY_SIZE(tests); ++test_idx)