: wxGCDCImpl( owner )
{
m_window = window;
-
+
m_ok = true ;
m_window->GetSize( &m_width , &m_height);
if ( window->MacGetLeftBorderSize() != 0 || window->MacGetTopBorderSize() != 0 )
CGContextTranslateCTM( cg , -window->MacGetLeftBorderSize() , -window->MacGetTopBorderSize() );
- SetGraphicsContext( wxGraphicsContext::CreateFromNative( cg ) );
+ wxGraphicsContext* context = wxGraphicsContext::CreateFromNative( cg );
+ context->EnableOffset(true);
+ SetGraphicsContext( context );
}
DoSetClippingRegion( 0 , 0 , m_width , m_height ) ;
ControlRef handle = (ControlRef) m_window->GetHandle();
if ( !handle )
return wxNullBitmap;
-
+
HIRect rect;
CGImageRef image;
CGContextRef context;
int height = subrect != NULL ? subrect->height : (int)rect.size.height ;
wxBitmap bmp = wxBitmap(width, height, 32);
-
+
context = (CGContextRef)bmp.GetHBITMAP();
-
+
CGContextSaveGState(context);
-
+
CGContextTranslateCTM( context, 0, height );
CGContextScaleCTM( context, 1, -1 );
wxClientDCImpl::~wxClientDCImpl()
{
+ if( GetGraphicsContext() && GetGraphicsContext()->GetNativeContext() )
+ Flush();
}
/*