summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainterpath.cpp
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-11-03 16:41:52 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-11-03 16:51:28 (GMT)
commitedc9acd6a0c082b7d6c7810700e77a9d990014c6 (patch)
tree9b0ec059521e4aab1aa64447dc8cbea27097f742 /src/gui/painting/qpainterpath.cpp
parentbf2ba79d1cdc0d5347d394a892bee287bc84fb81 (diff)
downloadQt-edc9acd6a0c082b7d6c7810700e77a9d990014c6.zip
Qt-edc9acd6a0c082b7d6c7810700e77a9d990014c6.tar.gz
Qt-edc9acd6a0c082b7d6c7810700e77a9d990014c6.tar.bz2
Fixed QPainterPath::addRoundedRect() for paths with Qt::WindingFill.
QPainterPath::addRoundRect()/addRoundedRect() added the path in counter-clockwise order, while other methods added paths in clockwise order. For Qt::OddEvenFill, the order doesn't matter, but it matters for Qt::WindingFill. Fixed by adding rounded rects in clockwise order like the other shapes. Task-number: QTBUG-1537 Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qpainterpath.cpp')
-rw-r--r--src/gui/painting/qpainterpath.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index c40bcee..8133793 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -3037,11 +3037,11 @@ void QPainterPath::addRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadi
bool first = d_func()->elements.size() < 2;
- arcMoveTo(x, y, rxx2, ryy2, 90);
- arcTo(x, y, rxx2, ryy2, 90, 90);
- arcTo(x, y+h-ryy2, rxx2, ryy2, 2*90, 90);
- arcTo(x+w-rxx2, y+h-ryy2, rxx2, ryy2, 3*90, 90);
- arcTo(x+w-rxx2, y, rxx2, ryy2, 0, 90);
+ arcMoveTo(x, y, rxx2, ryy2, 180);
+ arcTo(x, y, rxx2, ryy2, 180, -90);
+ arcTo(x+w-rxx2, y, rxx2, ryy2, 90, -90);
+ arcTo(x+w-rxx2, y+h-ryy2, rxx2, ryy2, 0, -90);
+ arcTo(x, y+h-ryy2, rxx2, ryy2, 270, -90);
closeSubpath();
d_func()->require_moveTo = true;
@@ -3094,11 +3094,11 @@ void QPainterPath::addRoundRect(const QRectF &r, int xRnd, int yRnd)
bool first = d_func()->elements.size() < 2;
- arcMoveTo(x, y, rxx2, ryy2, 90);
- arcTo(x, y, rxx2, ryy2, 90, 90);
- arcTo(x, y+h-ryy2, rxx2, ryy2, 2*90, 90);
- arcTo(x+w-rxx2, y+h-ryy2, rxx2, ryy2, 3*90, 90);
- arcTo(x+w-rxx2, y, rxx2, ryy2, 0, 90);
+ arcMoveTo(x, y, rxx2, ryy2, 180);
+ arcTo(x, y, rxx2, ryy2, 180, -90);
+ arcTo(x+w-rxx2, y, rxx2, ryy2, 90, -90);
+ arcTo(x+w-rxx2, y+h-ryy2, rxx2, ryy2, 0, -90);
+ arcTo(x, y+h-ryy2, rxx2, ryy2, 270, -90);
closeSubpath();
d_func()->require_moveTo = true;