m_owner = (wxWindow *)NULL;
m_isMemDC = FALSE;
- wxASSERT_MSG( window, "DC needs a window" );
+ wxASSERT_MSG( window, _T("DC needs a window") );
GtkWidget *widget = window->m_wxwindow;
- wxASSERT_MSG( widget, "DC needs a widget" );
+ wxASSERT_MSG( widget, _T("DC needs a widget") );
m_window = widget->window;
wxCHECK_RET( bitmap.Ok(), _T("invalid bitmap") );
- if (!m_window) return;
-
/* scale/translate size and position */
int xx = XLOG2DEV(x);
int w = bitmap.GetWidth();
int h = bitmap.GetHeight();
+ CalcBoundingBox( x, y );
+ CalcBoundingBox( x + w, y + h );
+
+ if (!m_window) return;
+
int ww = XLOG2DEVREL(w);
int hh = YLOG2DEVREL(h);
gdk_gc_set_clip_mask( m_penGC, (GdkBitmap *) NULL );
gdk_gc_set_clip_origin( m_penGC, 0, 0 );
}
-
- CalcBoundingBox( x, y );
- CalcBoundingBox( x + w, y + h );
}
bool wxWindowDC::DoBlit( long xdest, long ydest, long width, long height,
#endif
default:
{
- wxFAIL_MSG( "unsupported logical function" );
+ wxFAIL_MSG( _T("unsupported logical function") );
break;
}
}
m_brush = wxNullBrush;
SetBrush( tmp_brush );
+/*
tmp_brush = m_backgroundBrush;
m_backgroundBrush = wxNullBrush;
SetBackground( tmp_brush );
+*/
+ tmp_brush = m_backgroundBrush;
+ m_backgroundBrush = wxNullBrush;
+ SetBackground( *wxWHITE_BRUSH );
+ m_backgroundBrush = tmp_brush;
if (!hatch_bitmap)
{
m_bgGC = (GdkGC*) NULL;
}
+void wxWindowDC::ComputeScaleAndOrigin()
+{
+ /* CMB: copy scale to see if it changes */
+ double origScaleX = m_scaleX;
+ double origScaleY = m_scaleY;
+
+ wxDC::ComputeScaleAndOrigin();
+
+ /* CMB: if scale has changed call SetPen to recalulate the line width */
+ if ((m_scaleX != origScaleX || m_scaleY != origScaleY) &&
+ (m_pen.Ok()))
+ {
+ /* this is a bit artificial, but we need to force wxDC to think
+ the pen has changed */
+ wxPen pen = m_pen;
+ m_pen = wxNullPen;
+ SetPen( pen );
+ }
+}
+
// Resolution in pixels per logical inch
wxSize wxWindowDC::GetPPI() const
{