m_height = 0;
}
+wxGTKCairoDCImpl::wxGTKCairoDCImpl(wxDC* owner, int)
+ : base_type(owner, 0)
+{
+ m_width = 0;
+ m_height = 0;
+}
+
wxGTKCairoDCImpl::wxGTKCairoDCImpl(wxDC* owner, wxWindow* window)
- : base_type(owner)
+ : base_type(owner, 0)
{
m_window = window;
m_font = window->GetFont();
{
wxMask* mask = bitmap.GetMask();
if (mask)
- maskSurf = mask->GetBitmap();
+ maskSurf = *mask;
}
}
if (maskSurf)
if (x || y)
SetDeviceLocalOrigin(x, y);
}
+ else
+ SetGraphicsContext(wxGraphicsContext::Create());
}
//-----------------------------------------------------------------------------
}
}
else
- {
- // create something that can be used for measuring, but not drawing
- cairo_t* cr = gdk_cairo_create(gdk_get_default_root_window());
- cairo_rectangle(cr, 0, 0, 0, 0);
- cairo_clip(cr);
- SetGraphicsContext(wxGraphicsContext::CreateFromNative(cr));
- }
+ SetGraphicsContext(wxGraphicsContext::Create());
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
wxScreenDCImpl::wxScreenDCImpl(wxScreenDC* owner)
- : base_type(owner)
+ : base_type(owner, 0)
{
GdkWindow* window = gdk_get_default_root_window();
m_width = gdk_window_get_width(window);
}
wxMemoryDCImpl::wxMemoryDCImpl(wxMemoryDC* owner, wxBitmap& bitmap)
- : base_type(owner)
+ : base_type(owner, 0)
, m_bitmap(bitmap)
{
Setup();
//-----------------------------------------------------------------------------
wxGTKCairoDC::wxGTKCairoDC(cairo_t* cr)
- : base_type(new wxGTKCairoDCImpl(this))
+ : base_type(new wxGTKCairoDCImpl(this, 0))
{
cairo_reference(cr);
SetGraphicsContext(wxGraphicsContext::CreateFromNative(cr));