Filter cosmetic lines using transformed, not world coordinates

Lines smaller than 1e-12 would not be drawn even when scaled up.

Fixes: QTBUG-75630
Change-Id: I8f261876c325b60f61e95ca2e5fde2cb227d4cba
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 1549dff04c49aa37333e54f8bc45900d0f35b270)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Eirik Aavitsland 2021-02-10 10:44:44 +01:00 committed by Qt Cherry-pick Bot
parent f8d209c0da
commit 8c2860672f

View File

@ -377,14 +377,14 @@ bool QCosmeticStroker::clipLine(qreal &x1, qreal &y1, qreal &x2, qreal &y2)
void QCosmeticStroker::drawLine(const QPointF &p1, const QPointF &p2)
{
if (p1 == p2) {
QPointF start = p1 * state->matrix;
QPointF end = p2 * state->matrix;
if (start == end) {
drawPoints(&p1, 1);
return;
}
QPointF start = p1 * state->matrix;
QPointF end = p2 * state->matrix;
patternOffset = state->lastPen.dashOffset()*64;
lastPixel.x = INT_MIN;
lastPixel.y = INT_MIN;