Alexandre Julliard : gdi32: Draw rectangles in the order specified by the current arc direction.
Alexandre Julliard
julliard at winehq.org
Thu Jan 5 15:24:42 CST 2012
Module: wine
Branch: master
Commit: 94ffc49e0284170472d1af82ca924f1e667bdfc8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=94ffc49e0284170472d1af82ca924f1e667bdfc8
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jan 5 15:29:22 2012 +0100
gdi32: Draw rectangles in the order specified by the current arc direction.
---
dlls/gdi32/dibdrv/graphics.c | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c
index 1ba157b..bb14666 100644
--- a/dlls/gdi32/dibdrv/graphics.c
+++ b/dlls/gdi32/dibdrv/graphics.c
@@ -674,11 +674,22 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
rect.bottom--;
reset_dash_origin(pdev);
- /* 4 pts going anti-clockwise starting from top-right */
- pts[0].x = pts[3].x = rect.right;
- pts[0].y = pts[1].y = rect.top;
- pts[1].x = pts[2].x = rect.left;
- pts[2].y = pts[3].y = rect.bottom;
+ if (GetArcDirection( dev->hdc ) == AD_CLOCKWISE)
+ {
+ /* 4 pts going clockwise starting from bottom-right */
+ pts[0].x = pts[3].x = rect.right;
+ pts[0].y = pts[1].y = rect.bottom;
+ pts[1].x = pts[2].x = rect.left;
+ pts[2].y = pts[3].y = rect.top;
+ }
+ else
+ {
+ /* 4 pts going anti-clockwise starting from top-right */
+ pts[0].x = pts[3].x = rect.right;
+ pts[0].y = pts[1].y = rect.top;
+ pts[1].x = pts[2].x = rect.left;
+ pts[2].y = pts[3].y = rect.bottom;
+ }
pdev->pen_lines(pdev, 4, pts, TRUE, outline);
More information about the wine-cvs
mailing list