diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-06-06 14:54:37 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-06-08 10:32:18 +0000 |
commit | f4f89858cffa1107af5139dfb1e1d7b16ca3a1a0 (patch) | |
tree | 848471b6d85eebfea8915f1da89b26286f0dbbc7 /src/imports/shapes/qquickshapenvprrenderer.cpp | |
parent | 8a5837467d153c50c869625390a584b0335b77b7 (diff) |
Use GradientStop and rename ShapeLinearGradient to LinearGradient
Thus application code becomes:
ShapePath {
...
fillGradient: LinearGradient {
...
GradientStop { ... }
}
}
which is even more clean and readable. The duplication for stops is
now avoided.
Change-Id: I50ae2f388e21683a37dc4787763dc71e16eef4f5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/shapes/qquickshapenvprrenderer.cpp')
-rw-r--r-- | src/imports/shapes/qquickshapenvprrenderer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/shapes/qquickshapenvprrenderer.cpp b/src/imports/shapes/qquickshapenvprrenderer.cpp index a3e9d31be5..f3f8d807ec 100644 --- a/src/imports/shapes/qquickshapenvprrenderer.cpp +++ b/src/imports/shapes/qquickshapenvprrenderer.cpp @@ -135,7 +135,7 @@ void QQuickShapeNvprRenderer::setFillGradient(int index, QQuickShapeGradient *gr ShapePathGuiData &d(m_sp[index]); d.fillGradientActive = gradient != nullptr; if (gradient) { - d.fillGradient.stops = gradient->sortedGradientStops(); + d.fillGradient.stops = gradient->gradientStops(); // sorted d.fillGradient.spread = gradient->spread(); if (QQuickShapeLinearGradient *g = qobject_cast<QQuickShapeLinearGradient *>(gradient)) { d.fillGradient.start = QPointF(g->x1(), g->y1()); |