cairo_font_weight_t m_weight;
};
-class wxCairoBitmapData : public wxGraphicsObjectRefData
+class wxCairoBitmapData : public wxGraphicsBitmapData
{
public:
wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitmap& bmp );
virtual cairo_surface_t* GetCairoSurface() { return m_surface; }
virtual cairo_pattern_t* GetCairoPattern() { return m_pattern; }
+ virtual void* GetNativeBitmap() const { return m_surface; }
virtual wxSize GetSize() { return wxSize(m_width, m_height); }
#if wxUSE_IMAGE
}
wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, cairo_surface_t* bitmap ) :
- wxGraphicsObjectRefData( renderer )
+ wxGraphicsBitmapData( renderer )
{
m_surface = bitmap;
m_pattern = cairo_pattern_create_for_surface(m_surface);
}
-wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitmap& bmp ) : wxGraphicsObjectRefData( renderer )
+wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitmap& bmp ) : wxGraphicsBitmapData( renderer )
{
wxCHECK_RET( bmp.IsOk(), wxT("Invalid bitmap in wxCairoContext::DrawBitmap"));
wxCairoBitmapData::wxCairoBitmapData(wxGraphicsRenderer* renderer,
const wxImage& image)
- : wxGraphicsObjectRefData(renderer)
+ : wxGraphicsBitmapData(renderer)
{
const cairo_format_t bufferFormat = image.HasAlpha()
? CAIRO_FORMAT_ARGB32
ENSURE_LOADED_OR_RETURN(NULL);
#ifdef __WXGTK__
return CreateContextFromNativeWindow(gdk_get_default_root_window());
-#endif
+#else
return NULL;
// TODO
+#endif
}
wxGraphicsContext * wxCairoRenderer::CreateContext( wxWindow* window )