From a973df332457ed97abacf52e11ff9eabf19acd30 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 1 Jul 2013 12:55:00 +0200 Subject: [PATCH] gdi32: Fix off-by-one error in the extent of arcs when the size is even. --- dlls/gdi32/dibdrv/graphics.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c index f9ed4c00dd3..d91ef114803 100644 --- a/dlls/gdi32/dibdrv/graphics.c +++ b/dlls/gdi32/dibdrv/graphics.c @@ -267,16 +267,16 @@ static int get_arc_points( PHYSDEV dev, const RECT *rect, POINT start, POINT end points[pos].y = rect->top + height/2 + points[i % count].y; break; case 1: - points[pos].x = rect->left + width/2 - points[count - 1 - i % count].x; + points[pos].x = rect->right-1 - width/2 - points[count - 1 - i % count].x; points[pos].y = rect->top + height/2 + points[count - 1 - i % count].y; break; case 2: - points[pos].x = rect->left + width/2 - points[i % count].x; - points[pos].y = rect->top + height/2 - points[i % count].y; + points[pos].x = rect->right-1 - width/2 - points[i % count].x; + points[pos].y = rect->bottom-1 - height/2 - points[i % count].y; break; case 3: points[pos].x = rect->left + width/2 + points[count - 1 - i % count].x; - points[pos].y = rect->top + height/2 - points[count - 1 - i % count].y; + points[pos].y = rect->bottom-1 - height/2 - points[count - 1 - i % count].y; break; } } @@ -289,14 +289,14 @@ static int get_arc_points( PHYSDEV dev, const RECT *rect, POINT start, POINT end { case 0: points[pos].x = rect->left + width/2 + points[i % count].x; - points[pos].y = rect->top + height/2 - points[i % count].y; + points[pos].y = rect->bottom-1 - height/2 - points[i % count].y; break; case 1: - points[pos].x = rect->left + width/2 - points[count - 1 - i % count].x; - points[pos].y = rect->top + height/2 - points[count - 1 - i % count].y; + points[pos].x = rect->right-1 - width/2 - points[count - 1 - i % count].x; + points[pos].y = rect->bottom-1 - height/2 - points[count - 1 - i % count].y; break; case 2: - points[pos].x = rect->left + width/2 - points[i % count].x; + points[pos].x = rect->right-1 - width/2 - points[i % count].x; points[pos].y = rect->top + height/2 + points[i % count].y; break; case 3: