]> git.saurik.com Git - wxWidgets.git/commitdiff
added tests for filled rects
authorGuillermo Rodriguez Garcia <guille@iies.es>
Tue, 15 Feb 2000 15:21:59 +0000 (15:21 +0000)
committerGuillermo Rodriguez Garcia <guille@iies.es>
Tue, 15 Feb 2000 15:21:59 +0000 (15:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/drawing/drawing.cpp

index 66a672bcf33aaca69ed3c338bf866fc8ccaf99d2..b6649b9f85d414dd47246c5c441dbb55019fe8fc 100644 (file)
@@ -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))