Fixes: assert in QPainter::fillRect on very large paint devices
For devices taller than 32768, fillRect with linear gradient would go below the cliprect. Task-number: QTBUG-26766 Change-Id: I516ede1545909e9ce2de5812c61bb473f99f5759 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
parent
1e97a1ad8c
commit
db775741ed
@ -891,6 +891,8 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
|
|||||||
const Q16Dot16 rowHeight = qMin(yFP + Q16Dot16Factor, yPb)
|
const Q16Dot16 rowHeight = qMin(yFP + Q16Dot16Factor, yPb)
|
||||||
- qMax(yFP, yPa);
|
- qMax(yFP, yPa);
|
||||||
const int y = Q16Dot16ToInt(yFP);
|
const int y = Q16Dot16ToInt(yFP);
|
||||||
|
if (y > d->clipRect.bottom())
|
||||||
|
break;
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
buffer.addSpan(x[i], len[i], y,
|
buffer.addSpan(x[i], len[i], y,
|
||||||
Q16Dot16ToInt(Q16Dot16Multiply(rowHeight, coverage[i])));
|
Q16Dot16ToInt(Q16Dot16Multiply(rowHeight, coverage[i])));
|
||||||
|
Loading…
Reference in New Issue
Block a user