build fix for older gtk2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2006-06-18 06:42:24 +00:00
parent 4f558e23ff
commit 2796f657c9

View File

@@ -368,7 +368,11 @@ void wxWindowDC::SetUpDC()
/* background colour */
m_backgroundBrush = *wxWHITE_BRUSH;
m_backgroundBrush.GetColour().CalcPixel( m_cmap );
#ifdef __WXGTK24__
const GdkColor *bg_col = m_backgroundBrush.GetColour().GetColor();
#else
GdkColor *bg_col = m_backgroundBrush.GetColour().GetColor();
#endif
/* m_textGC */
m_textForegroundColour.CalcPixel( m_cmap );
@@ -1065,7 +1069,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
wxCHECK_RET( bitmap.Ok(), wxT("invalid bitmap") );
bool is_mono = (bitmap.GetBitmap() != NULL);
bool is_mono = bitmap.GetDepth() == 1;
// scale/translate size and position
int xx = XLOG2DEV(x);
@@ -1158,7 +1162,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
GdkGC *gc = gdk_gc_new( bitmap2 );
gdk_gc_set_foreground( gc, m_textForegroundColour.GetColor() );
gdk_gc_set_background( gc, m_textBackgroundColour.GetColor() );
gdk_wx_draw_bitmap( bitmap2, gc, use_bitmap.GetBitmap(), 0, 0, 0, 0, -1, -1 );
gdk_wx_draw_bitmap( bitmap2, gc, use_bitmap.GetPixmap(), 0, 0, 0, 0, -1, -1 );
gdk_draw_drawable( m_window, m_textGC, bitmap2, 0, 0, xx, yy, -1, -1 );
@@ -1412,7 +1416,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
GdkGC *gc = gdk_gc_new( bitmap );
gdk_gc_set_foreground( gc, m_textForegroundColour.GetColor() );
gdk_gc_set_background( gc, m_textBackgroundColour.GetColor() );
gdk_wx_draw_bitmap( bitmap, gc, use_bitmap.GetBitmap(), 0, 0, 0, 0, -1, -1 );
gdk_wx_draw_bitmap( bitmap, gc, use_bitmap.GetPixmap(), 0, 0, 0, 0, -1, -1 );
gdk_draw_drawable( m_window, m_textGC, bitmap, xsrc, ysrc, cx, cy, cw, ch );
@@ -2005,7 +2009,7 @@ void wxWindowDC::SetBrush( const wxBrush &brush )
if ((m_brush.GetStyle() == wxSTIPPLE) && (m_brush.GetStipple()->Ok()))
{
if (m_brush.GetStipple()->GetPixmap())
if (m_brush.GetStipple()->GetDepth() != 1)
{
gdk_gc_set_fill( m_brushGC, GDK_TILED );
gdk_gc_set_tile( m_brushGC, m_brush.GetStipple()->GetPixmap() );
@@ -2013,7 +2017,7 @@ void wxWindowDC::SetBrush( const wxBrush &brush )
else
{
gdk_gc_set_fill( m_brushGC, GDK_STIPPLED );
gdk_gc_set_stipple( m_brushGC, m_brush.GetStipple()->GetBitmap() );
gdk_gc_set_stipple( m_brushGC, m_brush.GetStipple()->GetPixmap() );
}
}
@@ -2056,7 +2060,7 @@ void wxWindowDC::SetBackground( const wxBrush &brush )
if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->Ok()))
{
if (m_backgroundBrush.GetStipple()->GetPixmap())
if (m_backgroundBrush.GetStipple()->GetDepth() != 1)
{
gdk_gc_set_fill( m_bgGC, GDK_TILED );
gdk_gc_set_tile( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() );
@@ -2064,7 +2068,7 @@ void wxWindowDC::SetBackground( const wxBrush &brush )
else
{
gdk_gc_set_fill( m_bgGC, GDK_STIPPLED );
gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetBitmap() );
gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() );
}
}