mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
don't stroke a path if it's not specified in the SVG
upstream commits:
14fa3c45fc
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
da7bb6270d
commit
d702f0f982
3 changed files with 4 additions and 7 deletions
|
@ -398,6 +398,7 @@ public:
|
|||
qWarning("Unhandled cap style");
|
||||
}
|
||||
switch (spen.joinStyle()) {
|
||||
case Qt::SvgMiterJoin:
|
||||
case Qt::MiterJoin:
|
||||
stream() << "stroke-linejoin=\"miter\" "
|
||||
"stroke-miterlimit=\""<<spen.miterLimit()<<"\" ";
|
||||
|
@ -408,10 +409,6 @@ public:
|
|||
case Qt::RoundJoin:
|
||||
stream() << "stroke-linejoin=\"round\" ";
|
||||
break;
|
||||
case Qt::SvgMiterJoin:
|
||||
stream() << "stroke-linejoin=\"miter\" "
|
||||
"stroke-miterlimit=\""<<spen.miterLimit()<<"\" ";
|
||||
break;
|
||||
default:
|
||||
qWarning("Unhandled join style");
|
||||
}
|
||||
|
|
|
@ -210,7 +210,7 @@ QRectF QSvgNode::transformedBounds() const
|
|||
QPainter p(&dummy);
|
||||
QSvgExtraStates states;
|
||||
|
||||
QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
|
||||
QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::SvgMiterJoin);
|
||||
pen.setMiterLimit(4);
|
||||
p.setPen(pen);
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ void QSvgTinyDocument::draw(QPainter *p, const QRectF &bounds)
|
|||
//sets default style on the painter
|
||||
//### not the most optimal way
|
||||
mapSourceToTarget(p, bounds);
|
||||
QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
|
||||
QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::SvgMiterJoin);
|
||||
pen.setMiterLimit(4);
|
||||
p->setPen(pen);
|
||||
p->setBrush(Qt::black);
|
||||
|
@ -283,7 +283,7 @@ void QSvgTinyDocument::draw(QPainter *p, const QString &id,
|
|||
QTransform originalTransform = p->worldTransform();
|
||||
|
||||
//XXX set default style on the painter
|
||||
QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
|
||||
QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::SvgMiterJoin);
|
||||
pen.setMiterLimit(4);
|
||||
p->setPen(pen);
|
||||
p->setBrush(Qt::black);
|
||||
|
|
Loading…
Add table
Reference in a new issue