Allow to set the SVG title when creating a wxSVGFileDC.
This commit is contained in:
@@ -378,13 +378,14 @@ void wxSVGFileDC::SetBitmapHandler(wxSVGBitmapHandler* handler)
|
||||
wxIMPLEMENT_ABSTRACT_CLASS(wxSVGFileDCImpl, wxDC);
|
||||
|
||||
wxSVGFileDCImpl::wxSVGFileDCImpl( wxSVGFileDC *owner, const wxString &filename,
|
||||
int width, int height, double dpi ) :
|
||||
int width, int height, double dpi, const wxString &title ) :
|
||||
wxDCImpl( owner )
|
||||
{
|
||||
Init( filename, width, height, dpi );
|
||||
Init( filename, width, height, dpi, title );
|
||||
}
|
||||
|
||||
void wxSVGFileDCImpl::Init (const wxString &filename, int Width, int Height, double dpi)
|
||||
void wxSVGFileDCImpl::Init (const wxString &filename, int Width, int Height,
|
||||
double dpi, const wxString &title)
|
||||
{
|
||||
m_width = Width;
|
||||
m_height = Height;
|
||||
@@ -430,9 +431,9 @@ void wxSVGFileDCImpl::Init (const wxString &filename, int Width, int Height, dou
|
||||
write(s);
|
||||
s.Printf( wxT(" width=\"%scm\" height=\"%scm\" viewBox=\"0 0 %d %d \">\n"), NumStr(float(Width)/dpi*2.54), NumStr(float(Height)/dpi*2.54), Width, Height );
|
||||
write(s);
|
||||
s = wxT("<title>SVG Picture created as ") + wxFileName(filename).GetFullName() + wxT(" </title>\n");
|
||||
s = wxT("<title>") + title + wxT("</title>\n");
|
||||
write(s);
|
||||
s = wxString (wxT("<desc>Picture generated by wxSVG ")) + wxSVGVersion + wxT(" </desc>\n");
|
||||
s = wxString (wxT("<desc>Picture generated by wxSVG ")) + wxSVGVersion + wxT("</desc>\n");
|
||||
write(s);
|
||||
s = wxT("<g style=\"fill:black; stroke:black; stroke-width:1\">\n");
|
||||
write(s);
|
||||
|
Reference in New Issue
Block a user