// Author: Stefan Csomor
// Modified by:
// Created: 2006-10-03
-// RCS-ID: $Id$
// Copyright: (c) 2006 Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// fully transparent or fully opaque
if (bmpSource.GetMask())
{
- wxBitmap bmpMask = bmpSource.GetMaskBitmap();
+ wxBitmap bmpMask = bmpSource.GetMask()->GetBitmap();
bufferFormat = CAIRO_FORMAT_ARGB32;
data = (wxUint32*)m_buffer;
wxNativePixelData
#ifdef __WXGTK20__
const wxDCImpl *impl = dc.GetImpl();
- Init( (cairo_t*) impl->GetCairoContext() );
+ cairo_t* cr = static_cast<cairo_t*>(impl->GetCairoContext());
+ if (cr)
+ Init(cairo_reference(cr));
#endif
wxSize sz = dc.GetSize();
m_width = sz.x;
#ifdef __WXGTK3__
cairo_t* cr = static_cast<cairo_t*>(dc.GetImpl()->GetCairoContext());
if (cr)
- Init(cr);
+ Init(cairo_reference(cr));
#elif defined __WXGTK20__
wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl();
Init( gdk_cairo_create( impldc->GetGDKWindow() ) );
#ifdef __WXGTK3__
cairo_t* cr = static_cast<cairo_t*>(dc.GetImpl()->GetCairoContext());
if (cr)
- Init(cr);
+ Init(cairo_reference(cr));
#elif defined __WXGTK20__
wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl();
Init( gdk_cairo_create( impldc->GetGDKWindow() ) );