]> git.saurik.com Git - wxWidgets.git/commitdiff
cleaning up, adding support for Quartz / Themeing before 10.3
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 19 Feb 2005 15:34:35 +0000 (15:34 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 19 Feb 2005 15:34:35 +0000 (15:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/dccg.cpp

index 255a315b60732d6bf9af24d3c81915db1d76b7a3..ee8e6e608eadd04530a10c7b630c79b27f735f8f 100755 (executable)
@@ -105,6 +105,20 @@ wxMacWindowStateSaver::~wxMacWindowStateSaver()
     SetThemeDrawingState( m_themeDrawingState , true ) ;
 }
 
+// minimal implementation only used for appearance drawing < 10.3
+
+wxMacPortSetter::wxMacPortSetter( const wxDC* dc ) :
+    m_ph( (GrafPtr) dc->m_macPort )
+{
+    wxASSERT( dc->Ok() ) ;
+    m_dc = dc ;
+//    dc->MacSetupPort(&m_ph) ;
+}
+wxMacPortSetter::~wxMacPortSetter()
+{
+//    m_dc->MacCleanupPort(&m_ph) ;
+}
+
 //-----------------------------------------------------------------------------
 // Local functions
 //-----------------------------------------------------------------------------
@@ -1228,7 +1242,7 @@ bool  wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
     }
 
     wxMemoryDC* memdc = dynamic_cast<wxMemoryDC*>(source) ;
-    if ( memdc )
+    if ( memdc && logical_func == wxCOPY )
     {
         wxBitmap blit = memdc->GetSelectedObject() ;
         wxASSERT_MSG( blit.Ok() , wxT("Invalid bitmap for blitting") ) ;
@@ -1256,7 +1270,7 @@ bool  wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
     }
     else
     {
-        wxFAIL_MSG( wxT("Blitting is only supported from bitmap contexts") ) ;
+        return FALSE ; // wxFAIL_MSG( wxT("Blitting is only supported from bitmap contexts") ) ;
     }
     return TRUE;
 }