X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f566b4fe822694a0b33e490edb730ede39d731ad..30827629fa11f6365f69bd2917e1a35d22c35363:/samples/erase/erase.cpp diff --git a/samples/erase/erase.cpp b/samples/erase/erase.cpp index eeddaad927..f25a792739 100644 --- a/samples/erase/erase.cpp +++ b/samples/erase/erase.cpp @@ -188,6 +188,18 @@ void MyCanvas::OnPaint( wxPaintEvent &event ) dc.SetBrush( *wxRED_BRUSH ); 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 )