diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-06-30 09:08:35 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-06-30 09:08:35 +0200 |
commit | 5112821a37ab749f758e354e84703df2d09d5471 (patch) | |
tree | 8f19ba6e7661109675b5e1e9b0ddae94b4c96d4f /src/quick/scenegraph/qsgdefaultrectanglenode.cpp | |
parent | 5d2ea1d5e9d6e29a16d0e9333cfc2dc8e7c5b677 (diff) | |
parent | a3f686cf7cc14ff481b972b1170a7ff76d0e0fd0 (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
.qmake.conf
src/qml/qml/qqmlengine.cpp
src/quick/items/qquickitemsmodule.cpp
tools/qml/main.cpp
Change-Id: Ida8daf6b4d7e675385f2f5514c446e52dedaf136
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultrectanglenode.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultrectanglenode.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp index 3e251a4051..f3f5c7f79f 100644 --- a/src/quick/scenegraph/qsgdefaultrectanglenode.cpp +++ b/src/quick/scenegraph/qsgdefaultrectanglenode.cpp @@ -323,11 +323,11 @@ void QSGDefaultRectangleNode::updateGeometry() const QGradientStops &stops = m_gradient_stops; int nextGradientStop = 0; - float gradientPos = 0.5f * penWidth / height; + float gradientPos = penWidth / height; while (nextGradientStop < stops.size() && stops.at(nextGradientStop).first <= gradientPos) ++nextGradientStop; int lastGradientStop = stops.size() - 1; - float lastGradientPos = 1.0f - 0.5f * penWidth / height; + float lastGradientPos = 1.0f - penWidth / height; while (lastGradientStop >= nextGradientStop && stops.at(lastGradientStop).first >= lastGradientPos) --lastGradientStop; int gradientIntersections = (lastGradientStop - nextGradientStop + 1); @@ -643,11 +643,11 @@ void QSGDefaultRectangleNode::updateGeometry() for (int part = -1; part <= 1; part += 2) { float y = (part == 1 ? innerRect.bottom() : innerRect.top()); float Y = (part == 1 ? outerRect.bottom() : outerRect.top()); - gradientPos = (y - innerRect.top() + 0.5f * penWidth) / height; + gradientPos = (y - innerRect.top() + penWidth) / height; while (nextGradientStop <= lastGradientStop && stops.at(nextGradientStop).first <= gradientPos) { // Insert vertices at gradient stops. - float gy = (innerRect.top() - 0.5f * penWidth) + stops.at(nextGradientStop).first * height; + float gy = (innerRect.top() - penWidth) + stops.at(nextGradientStop).first * height; fillColor = colorToColor4ub(stops.at(nextGradientStop).second); |