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

Alexandre Julliard julliard at winehq.org
Fri Mar 9 12:34:20 CST 2012


Module: wine
Branch: master
Commit: 53c53126d53e58ea02bb956d8db56af3f0fe6761
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=53c53126d53e58ea02bb956d8db56af3f0fe6761

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Mar  9 11:38:12 2012 +0100

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

---

 dlls/gdi32/region.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/gdi32/region.c b/dlls/gdi32/region.c
index 231a7cf..dd2827d 100644
--- a/dlls/gdi32/region.c
+++ b/dlls/gdi32/region.c
@@ -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 );
 




More information about the wine-cvs mailing list