-// print postscript datas via required method (file, stream)
-void wxPostScriptDC::PsPrintf( const wxChar* fmt, ... )
-{
- va_list argptr;
- va_start(argptr, fmt);
-
- PsPrint( wxString::FormatV( fmt, argptr ).c_str() );
-}
-
-void wxPostScriptDC::PsPrint( const char* psdata )
-{
- wxPostScriptPrintNativeData *data =
- (wxPostScriptPrintNativeData *) m_printData.GetNativeData();
-
- switch (m_printData.GetPrintMode())
- {
-#if wxUSE_STREAMS
- // append to output stream
- case wxPRINT_MODE_STREAM:
- {
- wxOutputStream* outputstream = data->GetOutputStream();
- wxCHECK_RET( outputstream, wxT("invalid outputstream") );
- outputstream->Write( psdata, strlen( psdata ) );
- }
- break;
-#endif // wxUSE_STREAMS
-
- // save data into file
- default:
- wxCHECK_RET( m_pstream, wxT("invalid postscript dc") );
- fwrite( psdata, 1, strlen( psdata ), m_pstream );
- }
-}
-
-void wxPostScriptDC::PsPrint( int ch )
-{
- wxPostScriptPrintNativeData *data =
- (wxPostScriptPrintNativeData *) m_printData.GetNativeData();
-
- switch (m_printData.GetPrintMode())
- {
-#if wxUSE_STREAMS
- // append to output stream
- case wxPRINT_MODE_STREAM:
- {
- wxOutputStream* outputstream = data->GetOutputStream();
- wxCHECK_RET( outputstream, wxT("invalid outputstream") );
- outputstream->PutC( ch );
- }
- break;
-#endif // wxUSE_STREAMS
-
- // save data into file
- default:
- wxCHECK_RET( m_pstream, wxT("invalid postscript dc") );
- fputc( ch, m_pstream );
- }
-}
-
-#endif
- // wxUSE_POSTSCRIPT
-
-#endif
- // wxUSE_PRINTING_ARCHITECTURE