X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/389d906b21e2cf2939fad5990383f2b33dcc6373..bb28b47763782647dcc1bec72786c16f39c48d35:/samples/drawing/drawing.cpp diff --git a/samples/drawing/drawing.cpp b/samples/drawing/drawing.cpp index b8c1079ae3..5c71ee2b09 100644 --- a/samples/drawing/drawing.cpp +++ b/samples/drawing/drawing.cpp @@ -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);