#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;
bool MyApp::OnInit(void)
{
+ if ( !wxApp::OnInit() )
+ return false;
+
wxInitAllImageHandlers();
m_testFont.Create(10, wxSWISS, wxNORMAL, wxNORMAL);
// 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);
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) );
{ // 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);
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);