diff --git a/src/common/dcsvg.cpp b/src/common/dcsvg.cpp
index 0446afeee2..14c2484e3d 100644
--- a/src/common/dcsvg.cpp
+++ b/src/common/dcsvg.cpp
@@ -305,25 +305,38 @@ wxSize wxSVGFileDCImpl::GetPPI() const
return wxSize( wxRound(m_dpi), wxRound(m_dpi) );
}
-void wxSVGFileDCImpl::DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
+void wxSVGFileDCImpl::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
{
NewGraphicsIfNeeded();
+
wxString s;
- s.Printf ( wxT(" \n"), x1,y1,x2,y2 );
- if (m_OK)
- {
- write(s);
- }
+ s = wxString::Format(wxS(" \n"), x1, y1, x2, y2);
+
+ write(s);
+
CalcBoundingBox(x1, y1);
CalcBoundingBox(x2, y2);
}
-void wxSVGFileDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset , wxCoord yoffset )
+void wxSVGFileDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset)
{
- for ( int i = 1; i < n; i++ )
+ if (n > 1)
{
- DoDrawLine ( points [i-1].x + xoffset, points [i-1].y + yoffset,
- points [ i ].x + xoffset, points [ i ].y + yoffset );
+ NewGraphicsIfNeeded();
+ wxString s;
+
+ s = wxString::Format(wxS(" \n");
+
+ write(s);
}
}