+ wxBrush brush( brushOrig );
+ if ( m_selected.IsOk() &&
+ m_selected.GetBitmap() &&
+ (brush != *wxTRANSPARENT_BRUSH) )
+ {
+ brush.SetColour( brush.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE);
+ }
+
+ wxWindowDCImpl::SetBrush( brush );
+}
+
+void wxMemoryDCImpl::SetBackground( const wxBrush& brushOrig )
+{
+ wxBrush brush(brushOrig);
+
+ if ( m_selected.IsOk() &&
+ m_selected.GetBitmap() &&
+ (brush != *wxTRANSPARENT_BRUSH) )
+ {
+ brush.SetColour( brush.GetColour() == *wxWHITE ? *wxBLACK : *wxWHITE );
+ }
+
+ wxWindowDCImpl::SetBackground( brush );
+}
+
+void wxMemoryDCImpl::SetTextForeground( const wxColour& col )
+{
+ if ( m_selected.IsOk() && m_selected.GetBitmap() )
+ {
+ wxWindowDCImpl::SetTextForeground( col == *wxWHITE ? *wxBLACK : *wxWHITE);
+ }
+ else
+ {
+ wxWindowDCImpl::SetTextForeground( col );
+ }
+}
+
+void wxMemoryDCImpl::SetTextBackground( const wxColour &col )
+{
+ if (m_selected.IsOk() && m_selected.GetBitmap())
+ {
+ wxWindowDCImpl::SetTextBackground( col == *wxWHITE ? *wxBLACK : *wxWHITE );
+ }
+ else
+ {
+ wxWindowDCImpl::SetTextBackground( col );
+ }
+}
+
+void wxMemoryDCImpl::DoGetSize( int *width, int *height ) const
+{
+ if (m_selected.IsOk())