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. Fixes: QTBUG-91957 Fixes: QTBUG-92485 Change-Id: I238cbbe1eebddff1ce56da38127899cdbd21db0e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 004189b2d8e751021f26d9eb28948f753ea8208c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6869d2463a
commit
8eeae7ae07
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user