From c1d139da695346a68b0cbbd9fae50dd8df065dce Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Garcia Date: Tue, 15 Feb 2000 15:21:59 +0000 Subject: [PATCH] added tests for filled rects git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/drawing/drawing.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/samples/drawing/drawing.cpp b/samples/drawing/drawing.cpp index 66a672bcf3..b6649b9f85 100644 --- a/samples/drawing/drawing.cpp +++ b/samples/drawing/drawing.cpp @@ -802,6 +802,19 @@ void MyCanvas::DrawWithLogicalOps(wxDC& dc) dc.DrawLine(x, y, x + w, y + h); dc.DrawLine(x + w, y, x, y + h); } + + // now some filled rectangles + dc.SetBrush(wxBrush(m_owner->m_colourForeground, wxSOLID)); + + for ( size_t n = 0; n < WXSIZEOF(rasterOperations); n++ ) + { + wxCoord x = 20 + 150*(n%4), + y = 500 + 100*(n/4); + + dc.DrawText(rasterOperations[n].name, x, y - 20); + dc.SetLogicalFunction(rasterOperations[n].rop); + dc.DrawRectangle(x, y, w, h); + } } void MyCanvas::OnPaint(wxPaintEvent &WXUNUSED(event)) -- 2.45.2