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:
@@ -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( Ok(), wxT("wxGCDC(cg)::DoDrawBitmap - invalid DC") );
|
||||||
wxCHECK_RET( bmp.Ok(), wxT("wxGCDC(cg)::DoDrawBitmap - invalid bitmap") );
|
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 )
|
void wxGCDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y )
|
||||||
|
Reference in New Issue
Block a user