X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/960a83ccad847c78a255c16fc776a2ec7c1bbc68..f36a04a7b6cacf2eb884c8cad981baee9eed0f88:/samples/drawing/drawing.cpp diff --git a/samples/drawing/drawing.cpp b/samples/drawing/drawing.cpp index f524b224f4..8e3c8734a9 100644 --- a/samples/drawing/drawing.cpp +++ b/samples/drawing/drawing.cpp @@ -513,12 +513,17 @@ void MyCanvas::DrawDefault(wxDC& dc) // mark the origin dc.DrawCircle(0, 0, 10); +#if !wxMAC_USE_CORE_GRAPHICS + // GetPixel and FloodFill not supported by Mac OS X CoreGraphics + // (FloodFill uses Blit from a non-wxMemoryDC) //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); - +#endif + dc.DrawCheckMark(5, 80, 15, 15); dc.DrawCheckMark(25, 80, 30, 30); dc.DrawCheckMark(60, 80, 60, 60); @@ -674,11 +679,12 @@ void MyCanvas::DrawDefault(wxDC& dc) wxMemoryDC memdc2; memdc2.SelectObject(bitmap2); - wxBrush yellowBrush(wxColour(255, 255, 0), wxSOLID); + wxColour clr(255, 255, 0); + wxBrush yellowBrush(clr, wxSOLID); memdc2.SetBackground(yellowBrush); memdc2.Clear(); - wxPen yellowPen(wxColour(255, 255, 0), 1, wxSOLID); + wxPen yellowPen(clr, 1, wxSOLID); // Now draw a white rectangle with red outline. It should // entirely eclipse the yellow background. @@ -951,7 +957,8 @@ void MyCanvas::OnPaint(wxPaintEvent &WXUNUSED(event)) if ( m_owner->m_textureBackground) { if ( ! m_owner->m_backgroundBrush.Ok() ) { - wxBrush b(wxColour(0,128,0), wxSOLID); + wxColour clr(0,128,0); + wxBrush b(clr, wxSOLID); dc.SetBackground(b); } }