+ if ( m_selected.Ok() &&
+ 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.Ok() && m_selected.GetBitmap() )
+ {
+ wxWindowDCImpl::SetTextForeground( col == *wxWHITE ? *wxBLACK : *wxWHITE);
+ }
+ else
+ {
+ wxWindowDCImpl::SetTextForeground( col );
+ }
+}
+
+void wxMemoryDCImpl::SetTextBackground( const wxColour &col )
+{
+ if (m_selected.Ok() && m_selected.GetBitmap())
+ {
+ wxWindowDCImpl::SetTextBackground( col == *wxWHITE ? *wxBLACK : *wxWHITE );
+ }
+ else
+ {
+ wxWindowDCImpl::SetTextBackground( col );
+ }
+}
+
+void wxMemoryDCImpl::DoGetSize( int *width, int *height ) const
+{
+ if (m_selected.Ok())
+ {
+ if (width) (*width) = m_selected.GetWidth();
+ if (height) (*height) = m_selected.GetHeight();
+ }
+ else
+ {
+ if (width) (*width) = 0;
+ if (height) (*height) = 0;
+ }
+}