// resources
// ----------------------------------------------------------------------------
// the application icon
-#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__)
+#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
#include "mondrian.xpm"
#endif
wxPaintDC dc(this);
PrepareDC( dc );
+ wxRegion region( 110, 110, 80, 80 );
+ wxRegion hole( 130, 130, 40, 1 );
+ region.Intersect( hole );
+ dc.SetClippingRegion( region );
+
dc.SetBrush( *wxRED_BRUSH );
- dc.DrawRectangle( 100, 100, 300, 500 );
+ dc.DrawRectangle( 100, 100, 200, 200 );
+
+ dc.DestroyClipingRegion();
+
+ dc.SetPen( *wxTRANSPARENT_PEN );
+
+ wxRegion strip( 110, 200, 30, 1 );
+ wxRegionIterator it( strip );
+ while (it)
+ {
+ dc.DrawRectangle( it.GetX(), it.GetY(), it.GetWidth(), it.GetHeight() );
+ it ++;
+ }
}
void MyCanvas::OnEraseBackground( wxEraseEvent &event )