From be4c4877b35ad1b6983cf194e61f0dad1d123af5 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Sat, 12 May 2018 00:12:24 +0200 Subject: Pass the arguments correctly to QRadialGradient The parameters for createRadialGradient indicate the position and radius for the two circles. Therefore the radius arguments should be used with their respective circle positions. Task-number: QTBUG-67960 Change-Id: Ifacba4d43939bafeed451e713250f716a11d30d1 Reviewed-by: Shawn Rutledge --- src/quick/items/context2d/qquickcontext2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index af8048f2e4..addcf9b540 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -1637,7 +1637,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_createRadialGradient(const QV4::Scoped gradient(scope, scope.engine->memoryManager->allocObject()); QV4::ScopedObject p(scope, ed->gradientProto.value()); gradient->setPrototype(p); - *gradient->d()->brush = QRadialGradient(QPointF(x1, y1), r0+r1, QPointF(x0, y0)); + *gradient->d()->brush = QRadialGradient(QPointF(x1, y1), r1, QPointF(x0, y0), r0); RETURN_RESULT(*gradient); } -- cgit v1.2.3