Add Qt::SvgMiterJoin option to pathstroke example
Qt::SvgMiterJoin is more important than the name suggests: It is used not only by SVG but also by PDF. It differs from Qt::MiterJoin in the miter limit behavior. Task-number: QTBUG-52640 Change-Id: I8ad04b1231958628caab18a233d54d42ea6449e7 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
This commit is contained in:
parent
fc8fd50816
commit
4c0e27ae6f
@ -87,10 +87,12 @@ void PathStrokeControls::createCommonControls(QWidget* parent)
|
||||
m_joinGroup->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
|
||||
QRadioButton *bevelJoin = new QRadioButton(m_joinGroup);
|
||||
QRadioButton *miterJoin = new QRadioButton(m_joinGroup);
|
||||
QRadioButton *svgMiterJoin = new QRadioButton(m_joinGroup);
|
||||
QRadioButton *roundJoin = new QRadioButton(m_joinGroup);
|
||||
m_joinGroup->setTitle(tr("Join Style"));
|
||||
bevelJoin->setText(tr("Bevel"));
|
||||
miterJoin->setText(tr("Miter"));
|
||||
svgMiterJoin->setText(tr("SvgMiter"));
|
||||
roundJoin->setText(tr("Round"));
|
||||
|
||||
m_styleGroup = new QGroupBox(parent);
|
||||
@ -145,6 +147,7 @@ void PathStrokeControls::createCommonControls(QWidget* parent)
|
||||
QVBoxLayout *joinGroupLayout = new QVBoxLayout(m_joinGroup);
|
||||
joinGroupLayout->addWidget(bevelJoin);
|
||||
joinGroupLayout->addWidget(miterJoin);
|
||||
joinGroupLayout->addWidget(svgMiterJoin);
|
||||
joinGroupLayout->addWidget(roundJoin);
|
||||
|
||||
QVBoxLayout *styleGroupLayout = new QVBoxLayout(m_styleGroup);
|
||||
@ -167,6 +170,7 @@ void PathStrokeControls::createCommonControls(QWidget* parent)
|
||||
|
||||
connect(bevelJoin, SIGNAL(clicked()), m_renderer, SLOT(setBevelJoin()));
|
||||
connect(miterJoin, SIGNAL(clicked()), m_renderer, SLOT(setMiterJoin()));
|
||||
connect(svgMiterJoin, SIGNAL(clicked()), m_renderer, SLOT(setSvgMiterJoin()));
|
||||
connect(roundJoin, SIGNAL(clicked()), m_renderer, SLOT(setRoundJoin()));
|
||||
|
||||
connect(curveMode, SIGNAL(clicked()), m_renderer, SLOT(setCurveMode()));
|
||||
|
@ -92,6 +92,7 @@ public slots:
|
||||
|
||||
void setBevelJoin() { m_joinStyle = Qt::BevelJoin; update(); }
|
||||
void setMiterJoin() { m_joinStyle = Qt::MiterJoin; update(); }
|
||||
void setSvgMiterJoin() { m_joinStyle = Qt::SvgMiterJoin; update(); }
|
||||
void setRoundJoin() { m_joinStyle = Qt::RoundJoin; update(); }
|
||||
|
||||
void setCurveMode() { m_pathMode = CurveMode; update(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user