black now denotes 0 on mono-bitmaps.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2000-01-15 10:39:27 +00:00
parent 5dd26b0839
commit 41fbc84101
7 changed files with 156 additions and 7 deletions

View File

@@ -66,6 +66,66 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
}
}
void wxMemoryDC::SetPen( const wxPen &pen )
{
if (m_selected.Ok() && m_selected.GetBitmap() && (*wxTRANSPARENT_PEN != pen))
{
if (*wxWHITE_PEN == pen)
wxWindowDC::SetPen( *wxBLACK_PEN );
else
wxWindowDC::SetPen( *wxWHITE_PEN );
}
else
{
wxWindowDC::SetPen( pen );
}
}
void wxMemoryDC::SetBrush( const wxBrush &brush )
{
if (m_selected.Ok() && m_selected.GetBitmap() && (*wxTRANSPARENT_BRUSH != brush))
{
if (*wxWHITE_BRUSH == brush)
wxWindowDC::SetBrush( *wxBLACK_BRUSH );
else
wxWindowDC::SetBrush( *wxWHITE_BRUSH );
}
else
{
wxWindowDC::SetBrush( brush );
}
}
void wxMemoryDC::SetTextForeground( const wxColour &col )
{
if (m_selected.Ok() && m_selected.GetBitmap())
{
if (col == *wxWHITE)
wxWindowDC::SetTextForeground( *wxBLACK );
else
wxWindowDC::SetTextForeground( *wxWHITE );
}
else
{
wxWindowDC::SetTextForeground( col );
}
}
void wxMemoryDC::SetTextBackground( const wxColour &col )
{
if (m_selected.Ok() && m_selected.GetBitmap())
{
if (col == *wxWHITE)
wxWindowDC::SetTextBackground( *wxBLACK );
else
wxWindowDC::SetTextBackground( *wxWHITE );
}
else
{
wxWindowDC::SetTextBackground( col );
}
}
void wxMemoryDC::DoGetSize( int *width, int *height ) const
{
if (m_selected.Ok())