X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..3be926e348e2d0a3a2c278b9f2cff7843971e0c9:/src/generic/dcpsg.cpp?ds=sidebyside diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 266b12c3a8..805fe0fd82 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -22,19 +22,21 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/log.h" - #include "wx/app.h" #include "wx/utils.h" + #include "wx/dcmemory.h" + #include "wx/math.h" + #include "wx/image.h" + #include "wx/icon.h" #endif // WX_PRECOMP -#include "wx/dcmemory.h" -#include "wx/image.h" #include "wx/prntbase.h" #include "wx/generic/prntdlgg.h" #include "wx/paper.h" #include "wx/filefn.h" -#include "wx/math.h" #include "wx/stdpaths.h" +WXDLLIMPEXP_DATA_CORE(int) wxPageNumber; + #ifdef __WXMSW__ #ifdef DrawText @@ -302,7 +304,7 @@ wxPostScriptDC::~wxPostScriptDC () } } -bool wxPostScriptDC::Ok() const +bool wxPostScriptDC::IsOk() const { return m_ok; } @@ -1833,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") ); @@ -2199,16 +2201,18 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string, } // print postscript datas via required method (file, stream) -void wxPostScriptDC::PsPrintf( 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();