Skip to content

Commit adfb4b4

Browse files
committed
Fix SVG stroke-dash
1 parent 8a3f6d7 commit adfb4b4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

modules/yup_graphics/svg/yup_SVGParser.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,8 +611,6 @@ bool SVGParser::parseElement (const XmlElement& element, bool parentIsRoot, Affi
611611
e->strokeJoin = parent->strokeJoin;
612612
if (! e->strokeCap && parent->strokeCap)
613613
e->strokeCap = parent->strokeCap;
614-
if (! e->strokeDashArray && parent->strokeDashArray)
615-
e->strokeDashArray = parent->strokeDashArray;
616614
if (! e->strokeDashOffset && parent->strokeDashOffset)
617615
e->strokeDashOffset = parent->strokeDashOffset;
618616
if (! e->strokeMiterLimit && parent->strokeMiterLimit)
@@ -630,6 +628,9 @@ bool SVGParser::parseElement (const XmlElement& element, bool parentIsRoot, Affi
630628
e->hidden = parent->hidden;
631629
}
632630

631+
if (! e->strokeMiterLimit)
632+
e->strokeMiterLimit = 4.0f;
633+
633634
for (auto* child = element.getFirstChildElement(); child != nullptr; child = child->getNextElement())
634635
{
635636
if (child->isTextElement())

0 commit comments

Comments
 (0)