X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/45e6e6f8ab806b337dffeb3b52fec7eba3c845ef..7379e47609b16a9fef59e1d2a6b2e47f216dd85c:/samples/printing/printing.cpp?ds=inline diff --git a/samples/printing/printing.cpp b/samples/printing/printing.cpp index d7cdd08585..c424da9b46 100644 --- a/samples/printing/printing.cpp +++ b/samples/printing/printing.cpp @@ -50,12 +50,6 @@ #include "mondrian.xpm" #endif -#if wxUSE_LIBGNOMEPRINT -#include "wx/html/forcelnk.h" -FORCE_LINK(gnome_print) -#endif - - // Declare a frame MyFrame *frame = (MyFrame *) NULL; // int orientation = wxPORTRAIT; @@ -337,10 +331,10 @@ void MyFrame::Draw(wxDC& dc) // between the screen image, the print preview image (at various zoom // levels), and the printed page. dc.SetBackground(*wxWHITE_BRUSH); - dc.Clear(); + // dc.Clear(); dc.SetFont(wxGetApp().m_testFont); - dc.SetBackgroundMode(wxTRANSPARENT); + // dc.SetBackgroundMode(wxTRANSPARENT); dc.SetPen(*wxBLACK_PEN); dc.SetBrush(*wxLIGHT_GREY_BRUSH); @@ -353,7 +347,7 @@ void MyFrame::Draw(wxDC& dc) dc.SetPen(*wxRED_PEN); dc.DrawRoundedRectangle(0, 20, 200, 80, 20); - + dc.DrawText( wxT("Rectangle 200 by 80"), 40, 40); dc.SetPen( wxPen(*wxBLACK,0,wxDOT_DASH) ); @@ -609,7 +603,7 @@ void MyPrintout::DrawPageTwo() { // GetTextExtent demo: wxString words[7] = {_T("This "), _T("is "), _T("GetTextExtent "), _T("testing "), _T("string. "), _T("Enjoy "), _T("it!")}; - long w, h; + wxCoord w, h; long x = 200, y= 250; wxFont fnt(15, wxSWISS, wxNORMAL, wxNORMAL); @@ -681,7 +675,7 @@ dc->SetFont(headerFont); float topMarginLogical = (float)(mmToLogical*topMargin); float rightMarginLogical = (float)(mmToLogical*(pageWidthMM - rightMargin)); - long xExtent, yExtent; + wxCoord xExtent, yExtent; dc->GetTextExtent(text, &xExtent, &yExtent); float xPos = (float)(((((pageWidthMM - leftMargin - rightMargin)/2.0)+leftMargin)*mmToLogical) - (xExtent/2.0)); dc->DrawText(text, (long)xPos, (long)topMarginLogical);