gdi32: Fix rounding error for odd ellipse sizes in CreateRoundRectRgn.

This commit is contained in:
Alexandre Julliard 2012-03-09 11:38:12 +01:00
parent 29c1b8fa08
commit 53c53126d5

View File

@ -824,12 +824,12 @@ HRGN WINAPI CreateRoundRectRgn( INT left, INT top,
rects[i].top = top + i;
rects[i].bottom = rects[i].top + 1;
}
rects[i - 1].bottom = bottom - ellipse_height + i; /* extend to bottom of rectangle */
for (; i < ellipse_height; i++)
{
rects[i].top = bottom - ellipse_height + i;
rects[i].bottom = rects[i].top + 1;
}
rects[ellipse_height / 2].top = top + ellipse_height / 2; /* extend to top of rectangle */
hrgn = alloc_gdi_handle( &obj->header, OBJ_REGION, &region_funcs );