Respect QPen::dashOffset when generating PDF

Change-Id: I26de1cd4a14d1b8978be6d0377cb2cba573fc82a
Task-number: QTBUG-47164
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
Lars Knoll 2015-10-16 13:34:20 +02:00
parent 661bcb79c8
commit cefc393059

View File

@ -377,8 +377,8 @@ QByteArray QPdf::generateDashes(const QPen &pen)
s << dw;
}
s << ']';
//qDebug() << "dasharray: pen has" << dasharray;
//qDebug() << " => " << result;
s << pen.dashOffset() * w;
s << " d\n";
return result;
}
@ -1209,7 +1209,7 @@ void QPdfEngine::setPen()
}
*d->currentPage << pdfJoinStyle << "j ";
*d->currentPage << QPdf::generateDashes(d->pen) << " 0 d\n";
*d->currentPage << QPdf::generateDashes(d->pen);
}