Fix brush pattern when transparent pen is set in wxSVGFileDC

Use the default stroke settings when defining the brush pattern.
This commit is contained in:
Maarten Bent
2020-03-01 22:12:03 +01:00
parent fce84f7bd0
commit 7d2f6b4608

View File

@@ -340,11 +340,12 @@ wxString CreateBrushFill(const wxBrush& brush, wxSVGShapeRenderingMode mode)
} }
wxString brushColourStr = Col2SVG(brush.GetColour()); wxString brushColourStr = Col2SVG(brush.GetColour());
wxString brushStrokeStr = wxS("stroke-width:1; stroke-linecap:round; stroke-linejoin:round;");
s += wxString::Format(wxS(" <pattern id=\"%s%s\" patternUnits=\"userSpaceOnUse\" width=\"8\" height=\"8\">\n"), s += wxString::Format(wxS(" <pattern id=\"%s%s\" patternUnits=\"userSpaceOnUse\" width=\"8\" height=\"8\">\n"),
patternName, brushColourStr.substr(1)); patternName, brushColourStr.substr(1));
s += wxString::Format(wxS(" <path style=\"stroke:%s;\" %s %s/>\n"), s += wxString::Format(wxS(" <path style=\"stroke:%s; stroke-opacity:1.0; %s\" %s %s/>\n"),
brushColourStr, pattern, GetRenderMode(mode)); brushColourStr, brushStrokeStr, pattern, GetRenderMode(mode));
s += wxS(" </pattern>\n"); s += wxS(" </pattern>\n");
} }