X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c9f7896861f734ce044ee8601ba2d8a6959c9d9e..3be926e348e2d0a3a2c278b9f2cff7843971e0c9:/src/generic/dcpsg.cpp diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index c037c349d8..805fe0fd82 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -1835,11 +1835,11 @@ wxCoord wxPostScriptDC::GetCharHeight() const void wxPostScriptDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, wxCoord *descent, wxCoord *externalLeading, - wxFont *theFont ) const + const wxFont *theFont ) const { - wxFont *fontToUse = theFont; + const wxFont *fontToUse = theFont; - if (!fontToUse) fontToUse = (wxFont*) &m_font; + if (!fontToUse) fontToUse = &m_font; wxCHECK_RET( fontToUse, wxT("GetTextExtent: no font defined") ); @@ -2201,16 +2201,18 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, } // print postscript datas via required method (file, stream) -void wxPostScriptDC::DoPsPrintfFormat(const wxChar *fmt, ... ) +void wxPostScriptDC::DoPsPrintfFormat(const wxString& fmt, ...) { va_list argptr; va_start(argptr, fmt); - PsPrint( wxString::FormatV( fmt, argptr ).c_str() ); + PsPrint( wxString::FormatV( fmt, argptr ) ); } -void wxPostScriptDC::PsPrint( const char* psdata ) +void wxPostScriptDC::PsPrint( const wxString& str ) { + const wxWX2MBbuf psdata(str.mb_str(wxConvUTF8)); + wxPostScriptPrintNativeData *data = (wxPostScriptPrintNativeData *) m_printData.GetNativeData();