replacing old core graphics with new graphics context implementation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2006-10-20 10:56:36 +00:00
parent 6ff41b1697
commit cd7d36c065
3 changed files with 7 additions and 5 deletions

View File

@@ -1080,7 +1080,7 @@ public:
// graphics implementation // graphics implementation
// ============================================================================ // ============================================================================
#if wxMAC_USE_CORE_GRAPHICS #if wxMAC_USE_CORE_GRAPHICS && !wxUSE_GRAPHICS_CONTEXT
class WXDLLEXPORT wxMacCGPath : public wxGraphicPath class WXDLLEXPORT wxMacCGPath : public wxGraphicPath
{ {

View File

@@ -561,7 +561,7 @@
// //
// Recommended setting: 1 // Recommended setting: 1
#ifndef wxUSE_GRAPHICS_CONTEXT #ifndef wxUSE_GRAPHICS_CONTEXT
#define wxUSE_GRAPHICS_CONTEXT 0 #define wxUSE_GRAPHICS_CONTEXT 1
#endif #endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -1270,6 +1270,9 @@ void wxOverlayImpl::Init( wxWindowDC* dc, int x , int y , int width , int height
void wxOverlayImpl::BeginDrawing( wxWindowDC* dc) void wxOverlayImpl::BeginDrawing( wxWindowDC* dc)
{ {
// TODO CS
dc->SetGraphicsContext( wxGraphicsContext::CreateFromNative( m_overlayContext ) );
/*
delete dc->m_graphicContext ; delete dc->m_graphicContext ;
dc->m_graphicContext = new wxMacCGContext( m_overlayContext ); dc->m_graphicContext = new wxMacCGContext( m_overlayContext );
// we are right now startin at 0,0 not at the wxWindow's origin, so most of the calculations // we are right now startin at 0,0 not at the wxWindow's origin, so most of the calculations
@@ -1277,15 +1280,14 @@ void wxOverlayImpl::BeginDrawing( wxWindowDC* dc)
// just to make sure : // just to make sure :
dc->m_macLocalOrigin.x = 0 ; dc->m_macLocalOrigin.x = 0 ;
dc->m_macLocalOrigin.y = 0 ; dc->m_macLocalOrigin.y = 0 ;
*/
wxSize size = m_window->GetSize() ; wxSize size = m_window->GetSize() ;
dc->SetClippingRegion( 0 , 0 , size.x , size.y ) ; dc->SetClippingRegion( 0 , 0 , size.x , size.y ) ;
} }
void wxOverlayImpl::EndDrawing( wxWindowDC* dc) void wxOverlayImpl::EndDrawing( wxWindowDC* dc)
{ {
delete dc->m_graphicContext ; dc->SetGraphicsContext(NULL);
dc->m_graphicContext = NULL ;
} }
void wxOverlayImpl::Clear(wxWindowDC* dc) void wxOverlayImpl::Clear(wxWindowDC* dc)