diff options
author | Matthias Rauter <[email protected]> | 2023-06-19 16:14:47 +0200 |
---|---|---|
committer | Matthias Rauter <[email protected]> | 2023-06-20 13:52:58 +0200 |
commit | 57eeb608dbda01877f8f0451ba676f4638e1040d (patch) | |
tree | f1434cd7070d976259be42b5cbe7258302f39b49 /src/quick/scenegraph/adaptations/software | |
parent | 3c1f1b72c64e313e216bf2e7580270c7e5b92bc4 (diff) |
Make Rectangle software renderer conform with RHI renderer
Software renderer and RHI renderer produce different
gradients in rectangles. This patch changes the software
renderer to match the RHI renderer.
Pick-to: 6.5 6.6
Fixes: QTBUG-114691
Change-Id: I0b6e2a28c17d24e2246eff95a1429ef598d8d91f
Reviewed-by: Andy Nichols <[email protected]>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode.cpp index 488f622dce..75765a7336 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode.cpp @@ -185,9 +185,8 @@ void QSGSoftwareInternalRectangleNode::update() } if (!m_stops.isEmpty()) { - QLinearGradient gradient(QPoint(0,0), QPoint(m_vertical ? 0 : 1, m_vertical ? 1 : 0)); + QLinearGradient gradient(QPoint(0,0), QPoint(m_vertical ? 0 : m_rect.width(), m_vertical ? m_rect.height() : 0)); gradient.setStops(m_stops); - gradient.setCoordinateMode(QGradient::ObjectBoundingMode); m_brush = QBrush(gradient); } else { m_brush = QBrush(m_color); |