Commit 03e9b882 authored by Jinoh Kang's avatar Jinoh Kang Committed by Alexandre Julliard

gdi32: Fix bounding box calculation for EMR_STRETCHDIBITS.

rclBounds should denote a closed interval for each axis. Signed-off-by: 's avatarJinoh Kang <jinoh.kang.kr@gmail.com> Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 3f7df2a5
......@@ -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 );
......
......@@ -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)
......
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