if ( cg == NULL )
{
SetGraphicsContext( wxGraphicsContext::Create( window ) ) ;
+ SetDeviceOrigin(-window->MacGetLeftBorderSize() , -window->MacGetTopBorderSize());
}
else
{
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 ) ;
m_window->GetClientSize( &m_width , &m_height);
if ( !m_window->IsShownOnScreen() )
m_width = m_height = 0;
- SetDeviceOrigin( origin.x, origin.y );
+
+ int x0,y0;
+ DoGetDeviceOrigin(&x0,&y0);
+ SetDeviceOrigin( origin.x + x0, origin.y + y0 );
+
DoSetClippingRegion( 0 , 0 , m_width , m_height ) ;
}