]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/gnome/gprint.cpp
update for 2.8.0; also switched to UTF-8 from ISO8859-2
[wxWidgets.git] / src / gtk / gnome / gprint.cpp
index 0d12dfa502cb24f8128b9d7a1aae910c9ce02cad..aae14b599384ae5b497382463d3cb6e0320802a2 100644 (file)
@@ -736,7 +736,6 @@ bool wxGnomePrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt )
     int mw, mh;
     dc->GetSizeMM(&mw, &mh);
     printout->SetPageSizeMM((int)mw, (int)mh);
-
     printout->OnPreparePrinting();
 
     // Get some parameters from the printout, if defined
@@ -854,6 +853,8 @@ wxGnomePrintDC::wxGnomePrintDC( wxGnomePrinter *printer )
 
     m_signX =  1;  // default x-axis left to right
     m_signY = -1;  // default y-axis bottom up -> top down
+    
+    GetSize( NULL, &m_deviceOffsetY );
 }
 
 wxGnomePrintDC::wxGnomePrintDC( const wxPrintData& data )
@@ -877,6 +878,8 @@ wxGnomePrintDC::wxGnomePrintDC( const wxPrintData& data )
 
     m_signX =  1;  // default x-axis left to right
     m_signY = -1;  // default y-axis bottom up -> top down    
+    
+    GetSize( NULL, &m_deviceOffsetY );
 }
 
 wxGnomePrintDC::~wxGnomePrintDC()
@@ -1669,8 +1672,6 @@ void wxGnomePrintDC::DestroyClippingRegion()
 
 bool wxGnomePrintDC::StartDoc(const wxString& message)
 {
-    SetDeviceOrigin( 0,0 );
-
     return true;
 }
 
@@ -1782,7 +1783,6 @@ void wxGnomePrintDC::DoGetSize(int* width, int* height) const
       (wxGnomePrintNativeData*) m_printData.GetNativeData();
 
     // Query page size. This seems to omit the margins
-    // right now, although it shouldn't
     double pw,ph;
     gs_lgp->gnome_print_job_get_page_size( native->GetPrintJob(), &pw, &ph );
 
@@ -1828,13 +1828,14 @@ void wxGnomePrintDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
     ComputeScaleAndOrigin();
 }
 
-void wxGnomePrintDC::SetDeviceOrigin( wxCoord x, wxCoord y )
+void wxGnomePrintDC::SetLogicalOrigin( wxCoord x, wxCoord y )
 {
-    int h = 0;
-    int w = 0;
-    GetSize( &w, &h );
+    wxDC::SetLogicalOrigin( x, y );
+}
 
-    wxDC::SetDeviceOrigin( x, h-y );
+void wxGnomePrintDC::SetDeviceOrigin( wxCoord x, wxCoord y )
+{
+    wxDC::SetDeviceOrigin( x, y );
 }
 
 void wxGnomePrintDC::SetResolution(int ppi)