Issue #69: Dashed Line not rendered as expected

This commit is contained in:
Jakub Melka
2023-07-25 18:26:57 +02:00
parent 2daf1a6d53
commit 06e1ed1f47
5 changed files with 23 additions and 10 deletions

View File

@ -28,6 +28,7 @@
#include "pdftextlayout.h"
#include "pdfoperationcontrol.h"
#include <QVector>
#include <QTransform>
#include <QPainterPath>
#include <QSharedPointer>
@ -68,6 +69,11 @@ public:
/// Fix line dash pattern according to the specification
void fix();
/// Create dash pattern for QPen.
/// \param penWidthF Width of the pen.
/// \note Dash pattern in QPen is in pen width units
QVector<qreal> createForQPen(qreal penWidthF) const;
private:
std::vector<PDFReal> m_dashArray;
PDFReal m_dashOffset = 0.0;