interpreting DrawBitmap for mono bitmaps according to the docs : using textfore- and background-colors

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2006-11-02 09:16:04 +00:00
parent 74a94478c9
commit f889bdb323

View File

@ -109,7 +109,18 @@ void wxGCDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool WXUNU
wxCHECK_RET( Ok(), wxT("wxGCDC(cg)::DoDrawBitmap - invalid DC") );
wxCHECK_RET( bmp.Ok(), wxT("wxGCDC(cg)::DoDrawBitmap - invalid bitmap") );
m_graphicContext->DrawBitmap( bmp, x , y , bmp.GetWidth() , bmp.GetHeight() );
if ( bmp.GetDepth() == 1 )
{
m_graphicContext->SetPen(*wxTRANSPARENT_PEN);
m_graphicContext->SetBrush( wxBrush( m_textBackgroundColour , wxSOLID ) );
m_graphicContext->DrawRectangle( x , y , bmp.GetWidth() , bmp.GetHeight() );
m_graphicContext->SetBrush( wxBrush( m_textForegroundColour , wxSOLID ) );
m_graphicContext->DrawBitmap( bmp, x , y , bmp.GetWidth() , bmp.GetHeight() );
m_graphicContext->SetBrush( m_graphicContext->CreateBrush(m_brush));
m_graphicContext->SetPen( m_graphicContext->CreatePen(m_pen));
}
else
m_graphicContext->DrawBitmap( bmp, x , y , bmp.GetWidth() , bmp.GetHeight() );
}
void wxGCDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y )