Avoid -Wdouble-promotion warnings
This commit is contained in:
@@ -57,6 +57,11 @@ inline wxString NumStr(double f)
|
||||
return wxString::FromCDouble(f, 2);
|
||||
}
|
||||
|
||||
inline wxString NumStr(float f)
|
||||
{
|
||||
return NumStr(double(f));
|
||||
}
|
||||
|
||||
// Return the colour representation as HTML-like "#rrggbb" string and also
|
||||
// returns its alpha as opacity number in 0..1 range.
|
||||
wxString Col2SVG(wxColour c, float* opacity = NULL)
|
||||
@@ -546,7 +551,7 @@ void wxSVGFileDCImpl::Init(const wxString& filename, int width, int height,
|
||||
s += wxS("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n");
|
||||
s += wxS("<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n\n");
|
||||
s += wxS("<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"");
|
||||
s += wxString::Format(wxS(" width=\"%scm\" height=\"%scm\" viewBox=\"0 0 %d %d\">\n"), NumStr(float(m_width) / dpi * 2.54), NumStr(float(m_height) / dpi * 2.54), m_width, m_height);
|
||||
s += wxString::Format(wxS(" width=\"%scm\" height=\"%scm\" viewBox=\"0 0 %d %d\">\n"), NumStr(m_width / dpi * 2.54), NumStr(m_height / dpi * 2.54), m_width, m_height);
|
||||
s += wxString::Format(wxS("<title>%s</title>\n"), title);
|
||||
s += wxString(wxS("<desc>Picture generated by wxSVG ")) + wxSVGVersion + wxS("</desc>\n\n");
|
||||
s += wxS("<g style=\"fill:black; stroke:black; stroke-width:1\">\n");
|
||||
|
||||
Reference in New Issue
Block a user