X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/53c6e7ccd2c012afe1819485260e9d34eba09538..50c319beec2454b4f669b6c8cf3d089f53c979f6:/src/common/postscrp.cpp diff --git a/src/common/postscrp.cpp b/src/common/postscrp.cpp index 22aa99fae9..2987647f36 100644 --- a/src/common/postscrp.cpp +++ b/src/common/postscrp.cpp @@ -29,7 +29,6 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/frame.h" -#include "wx/postscrp.h" #include "wx/utils.h" #include "wx/filedlg.h" #include "wx/msgdlg.h" @@ -42,6 +41,7 @@ #include "wx/list.h" #endif +#include "wx/postscrp.h" #include "wx/dcmemory.h" #ifdef __WXMSW__ @@ -124,6 +124,15 @@ wxPrintSetupData *wxThePrintSetupData = (wxPrintSetupData *) NULL; +#if !USE_SHARED_LIBRARY +IMPLEMENT_DYNAMIC_CLASS(wxPostScriptModule, wxModule) +IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC) +IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject) +IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject) +#endif + +#ifndef __WXGTK__ + // these should move into wxPostscriptDC: double UnderlinePosition = 0.0F; double UnderlineThickness = 0.0F; @@ -164,13 +173,6 @@ static const char *wxPostScriptHeaderSpline = (char *) NULL; static char *fileBuffer = NULL; #endif -#if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxPostScriptModule, wxModule) -IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC) -IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject) -IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject) -#endif - wxPostScriptDC::wxPostScriptDC () { // m_yOrigin = 792; // For EPS output @@ -304,6 +306,10 @@ void wxPostScriptDC::SetClippingRegion (long cx, long cy, long cw, long ch) *m_pstream << "closepath clip newpath\n"; } +void wxPostScriptDC::SetClippingRegion( const wxRegion &WXUNUSED(region) ) +{ +} + void wxPostScriptDC::DestroyClippingRegion () { if (!m_pstream) @@ -319,7 +325,7 @@ void wxPostScriptDC::Clear () { } -void wxPostScriptDC::FloodFill (long WXUNUSED(x), long WXUNUSED(y), wxColour * WXUNUSED(col), int WXUNUSED(style)) +void wxPostScriptDC::FloodFill (long WXUNUSED(x), long WXUNUSED(y), const wxColour &WXUNUSED(col), int WXUNUSED(style)) { } @@ -685,6 +691,10 @@ void wxPostScriptDC::DrawIcon (const wxIcon& icon, long x, long y) #endif } +void wxPostScriptDC::DrawBitmap( const wxBitmap& bitmap, long x, long y, bool useMask ) +{ +} + void wxPostScriptDC::SetFont (const wxFont& the_font) { if (!m_pstream) @@ -2044,6 +2054,9 @@ void wxPostScriptDC::CalcBoundingBox(long x, long y) if (device_y > m_maxY) m_maxY = device_y; } +#endif + // __WXGTK__ + IMPLEMENT_CLASS(wxPostScriptPrintDialog, wxDialog) wxPostScriptPrintDialog::wxPostScriptPrintDialog (wxWindow *parent, const wxString& title, @@ -2553,6 +2566,14 @@ wxPrintPaperType::~wxPrintPaperType() delete[] pageName; } +/* + * Print paper database for PostScript + */ + +#if !USE_SHARED_LIBRARIES +IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList) +#endif + wxPrintPaperDatabase::wxPrintPaperDatabase():wxList(wxKEY_STRING) { DeleteContents(TRUE); @@ -2578,6 +2599,15 @@ void wxPrintPaperDatabase::CreateDatabase() AddPaperType(_("A3 297 x 420 mm"), 297, 420, 842, 1191); AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279, 612, 791); AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356, 612, 1009); + +/* + This is for 100 ppi + + AddPaperType(_("A4 210 x 297 mm"), 210, 297, 210*4, 297*4 ); + AddPaperType(_("A3 297 x 420 mm"), 297, 420, 297*4, 420*4 ); + AddPaperType(_("Letter 8 1/2 x 11 in"), 216, 279, 216*4, 279*4 ); + AddPaperType(_("Legal 8 1/2 x 14 in"), 216, 356, 216*4, 356*4 ); +*/ } void wxPrintPaperDatabase::ClearDatabase()