diff options
| author | Allan Sandfeld Jensen <[email protected]> | 2021-04-14 12:59:20 +0200 |
|---|---|---|
| committer | Allan Sandfeld Jensen <[email protected]> | 2021-04-14 14:28:54 +0200 |
| commit | 004189b2d8e751021f26d9eb28948f753ea8208c (patch) | |
| tree | f9050d77ed2ee9e5fbe81ef269c6b1fa2565112c | |
| parent | b7a3aa39e7bdfcee05ab4fcd01bf4e7a66d2d73c (diff) | |
Fix partial pixel coverage calculation
We want right - left, but the numbers we have are (1 - left) and right,
so we need right - (1 - left) = right + left - 1.
Pick-to: 6.1 6.0
Fixes: QTBUG-91957
Fixes: QTBUG-92485
Change-Id: I238cbbe1eebddff1ce56da38127899cdbd21db0e
Reviewed-by: Eirik Aavitsland <[email protected]>
| -rw-r--r-- | src/gui/painting/qrasterizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp index 48d41f41f02..e851a3876a7 100644 --- a/src/gui/painting/qrasterizer.cpp +++ b/src/gui/painting/qrasterizer.cpp @@ -864,7 +864,7 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, if (leftWidth == QScFixedFactor) coverage[0] = rightWidth * 255; else - coverage[0] = (leftWidth + rightWidth) * 255; + coverage[0] = (rightWidth + leftWidth - QScFixedFactor) * 255; x[0] = iLeft; len[0] = 1; } else { |
