Avoid coverage overflow
We end up excluding more than 65536 from 65536 of rowHeight. Perhaps better fixed earlier, but I can't figure this logic out right now. Pick-to: 6.1 5.15 Change-Id: I5721c469441f15ac112180f971c857cd67edbf96 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
ddc5af9f17
commit
036c13a0f4
@ -1096,6 +1096,8 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
|
||||
bottomRightIntersectBf, topRightIntersectBf,
|
||||
bottomRightSlopeFP, invBottomRightSlopeFP);
|
||||
}
|
||||
if (excluded > QScFixedFactor)
|
||||
excluded = excluded % QScFixedFactor;
|
||||
|
||||
QScFixed coverage = rowHeight - excluded;
|
||||
buffer.addSpan(x, 1, QScFixedToInt(yFP),
|
||||
@ -1117,6 +1119,8 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
|
||||
excluded += (rowBottom - rowTopRight) - intersectPixelFP(x, rowTopRight, rowBottom,
|
||||
bottomRightIntersectBf, topRightIntersectBf,
|
||||
bottomRightSlopeFP, invBottomRightSlopeFP);
|
||||
if (excluded > QScFixedFactor)
|
||||
excluded = excluded % QScFixedFactor;
|
||||
|
||||
QScFixed coverage = rowHeight - excluded;
|
||||
buffer.addSpan(x, 1, QScFixedToInt(yFP),
|
||||
|
Loading…
x
Reference in New Issue
Block a user