]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/samples/canvas/test/test.cpp
removed incorrect param from docs
[wxWidgets.git] / contrib / samples / canvas / test / test.cpp
index 230cbb774a45d61c065478826f3483c60b23885d..d9e9199a98cbe58e9f6e1b72d7963b9f4f54462d 100644 (file)
@@ -209,30 +209,40 @@ MyFrame::MyFrame()
     wxBitmap bitmap( smile_xpm );
     wxImage image( bitmap );
 
-    m_sm1 = new wxCanvasImage( image, 0,70,16,16 );
+    m_sm1 = new wxCanvasImage( image, 0,70,32,32 );
     m_canvas->Append( m_sm1 );
 
     int i;
     for (i = 10; i < 300; i+=10)
-        m_canvas->Append( new wxCanvasRect( i,50,3,140, 255,0,0 ) );
+    {
+        wxCanvasRect *r = new wxCanvasRect( i,50,3,140 );
+        r->SetBrush( *wxRED_BRUSH );
+        m_canvas->Append( r );
+    }
 
     m_sm2 = new wxCanvasImage( image, 0,140,24,24 );
     m_canvas->Append( m_sm2 );
 
     for (i = 15; i < 300; i+=10)
-        m_canvas->Append( new wxCanvasRect( i,50,3,140, 255,0,0 ) );
+        m_canvas->Append( new wxCanvasRect( i,50,3,140 ) );
 
     wxButton *button = new wxButton( m_canvas, -1, "Hello", wxPoint(80,50) );
     m_canvas->Append( new wxCanvasControl( button ) );
 
-    m_canvas->Append( new wxCanvasText( "Hello", 180, 50,
-                      wxGetApp().GetFontPath() + "/times.ttf", 20 ) );
+    m_canvas->Append( new wxCanvasText( "How are you?", 180, 10,
+                      wxGetApp().GetFontPath() + "/times.ttf", 8 ) );
+
+    m_canvas->Append( new wxCanvasText( "How are you?", 180, 20,
+                      wxGetApp().GetFontPath() + "/times.ttf", 10 ) );
+
+    m_canvas->Append( new wxCanvasText( "How are you?", 180, 30,
+                      wxGetApp().GetFontPath() + "/times.ttf", 12 ) );
 
     m_sm3 = new wxCanvasImage( image, 0,210,32,32 );
     m_canvas->Append( m_sm3 );
 
     for (i = 10; i < 300; i+=10)
-        m_canvas->Append( new wxCanvasLine( 10,-15,i,300, 0,255,0 ) );
+        m_canvas->Append( new wxCanvasLine( 10,-15,i,300 ) );
 
     m_sm4 = new MywxCanvasImage( image, 0,270,64,32 );
     m_canvas->Append( m_sm4 );
@@ -241,13 +251,13 @@ MyFrame::MyFrame()
 //    m_canvas->Append( new wxCanvasLine( 10,-1500e6,50,300000e6, 0,255,0 ) );
 //    m_canvas->Append( new wxCanvasLine( 10,-150000,50,300000, 0,255,0 ) );
 
+/*
     //make a group of wxCanvasObjects
     wxCanvasObjectGroup* group1 = new wxCanvasObjectGroup();
-    group1->Prepend( new wxCanvasLine( 10,-35,50,190,100,255,0 ) );
+    group1->Prepend( new wxCanvasLine( 10,-35,50,190 ) );
     group1->Prepend( new wxCanvasImage( image, 4,38,32,32 ) );
     group1->Prepend( new wxCanvasRect(20,-20,50,170,0,20,240 ) );
 
-
     //make another group of wxCanvasObjects
     wxCanvasObjectGroup* group2 = new wxCanvasObjectGroup();
     group2->Prepend( new wxCanvasImage( image, 60,38,52,32 ) );
@@ -258,13 +268,12 @@ MyFrame::MyFrame()
     group1->Prepend( m_subref );
 
     //now make two refrences to group1 into root group of the canvas
-/*
     m_ref = new MywxCanvasObjectGroupRef(40,200, group1);
     m_canvas->Prepend( m_ref );
-*/
 
     m_ref2 = new MywxCanvasObjectGroupRef(80,350, group1);
     m_canvas->Prepend( m_ref2 );
+*/
 
     m_log = new wxTextCtrl( this, -1, "", wxPoint(0,0), wxSize(100,100), wxTE_MULTILINE );
     wxLog *old_log = wxLog::SetActiveTarget( new wxLogTextCtrl( m_log ) );