From: Charles Yin Date: Mon, 25 Jul 2011 04:55:32 +0000 (+1000) Subject: fix canvas arc drawing bug X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=8a79531574b820ac72de4f42a83e5436e0ca1fe1;p=konrad%2Fqtdeclarative.git fix canvas arc drawing bug Task-number:QTBUG-20523 Change-Id: I6ff71c12ffb66407cc5bbb4783e4c957ab740ac7 Reviewed-on: http://codereview.qt.nokia.com/2068 Reviewed-by: Qt Sanity Bot Reviewed-by: Charles Yin --- diff --git a/src/declarative/items/context2d/qsgcontext2d.cpp b/src/declarative/items/context2d/qsgcontext2d.cpp index 5dd796b..97234a6 100644 --- a/src/declarative/items/context2d/qsgcontext2d.cpp +++ b/src/declarative/items/context2d/qsgcontext2d.cpp @@ -1654,7 +1654,7 @@ void QSGContext2DPrivate::arc(qreal xc, qreal ear, bool antiClockWise) { - QPainterPath path; + QPainterPath p; //### HACK @@ -1689,12 +1689,12 @@ void QSGContext2DPrivate::arc(qreal xc, span += ea - sa; } - path.moveTo(QPointF(xc + radius * qCos(sar), + p.moveTo(QPointF(xc + radius * qCos(sar), yc - radius * qSin(sar))); - path.arcTo(xs, ys, width, height, sa, span); + p.arcTo(xs, ys, width, height, sa, span); - path.addPath(state.matrix.map(path)); + path.addPath(state.matrix.map(p)); } void QSGContext2DPrivate::fill()