Commit 53c53126 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 29c1b8fa
......@@ -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 );
......
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