]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/graphicc.cpp
Added wxRichTextTableBlock class to help with table UI operations
[wxWidgets.git] / src / generic / graphicc.cpp
index 900acd4957e388a77da756e9cd3cab6f07eddef0..c89d338f51566603672b402d19030d9b450ecdf7 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     2006-10-03
-// RCS-ID:      $Id$
 // Copyright:   (c) 2006 Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1404,7 +1403,7 @@ wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitm
     // 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
@@ -1655,7 +1654,9 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC&
 
 #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;
@@ -1701,7 +1702,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC&
 #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() ) );
@@ -1776,7 +1777,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC&
 #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() ) );
@@ -2516,7 +2517,7 @@ wxGraphicsPen wxCairoRenderer::CreatePen(const wxPen& pen)
 {
     wxGraphicsPen p;
     ENSURE_LOADED_OR_RETURN(p);
-    if (pen.IsOk() && pen.GetStyle() == wxPENSTYLE_TRANSPARENT)
+    if (pen.IsOk() && pen.GetStyle() != wxPENSTYLE_TRANSPARENT)
     {
         p.SetRefData(new wxCairoPenData( this, pen ));
     }
@@ -2527,7 +2528,7 @@ wxGraphicsBrush wxCairoRenderer::CreateBrush(const wxBrush& brush )
 {
     wxGraphicsBrush p;
     ENSURE_LOADED_OR_RETURN(p);
-    if (brush.IsOk() && brush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT)
+    if (brush.IsOk() && brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT)
     {
         p.SetRefData(new wxCairoBrushData( this, brush ));
     }