]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/drawing/drawing.cpp
Removed spurious </a> after <img> tag
[wxWidgets.git] / samples / drawing / drawing.cpp
index b8c1079ae33f309bfad89f5985c1fc08f5715b0d..4b7f12ac5e05f636194d669c5f790763af1949fe 100644 (file)
@@ -475,10 +475,12 @@ void MyCanvas::DrawDefault(wxDC& dc)
 {
     // mark the origin
     dc.DrawCircle(0, 0, 10);
-#if !(defined __WXGTK__) && !(defined __WXX11__) && !(defined __WXMOTIF__) && !(defined __WXMGL__)
-    // not implemented in wxGTK or wxMOTIF or wxX11 :-(
-    dc.FloodFill(0, 0, wxColour(255, 0, 0));
-#endif //
+
+    //flood fill using brush, starting at 1,1 and replacing whatever colour we find there
+    dc.SetBrush(wxBrush(wxColour(128,128,0), wxSOLID));
+    wxColour tmpColour ;
+    dc.GetPixel(1,1, &tmpColour);
+    dc.FloodFill(1,1, tmpColour, wxFLOOD_SURFACE);
 
     dc.DrawCheckMark(5, 80, 15, 15);
     dc.DrawCheckMark(25, 80, 30, 30);
@@ -876,9 +878,10 @@ void MyCanvas::DrawRegionsHelper(wxDC& dc, wxCoord x, bool firstTime)
     dc.DestroyClippingRegion();
 
     wxRegion region(x + 110, y + 20, 100, 270);
+#ifndef __WXMOTIF__
     if ( !firstTime )
         region.Offset(10, 10);
-
+#endif
     dc.SetClippingRegion(region);
 
     dc.SetBrush( *wxGREY_BRUSH );