virtual bool ShouldOffset() const
{
+ if ( !m_enableOffset )
+ return false;
+
int penwidth = 0 ;
if ( !m_pen.IsNull() )
{
{
Init();
m_windowRef = window;
+ m_enableOffset = true;
}
#endif
{
Init();
+ m_enableOffset = true;
wxSize sz = window->GetSize();
m_width = sz.x;
m_height = sz.y;
// having a cgctx being NULL is fine (will be created on demand)
// this is the case for all wxWindowDCs except wxPaintDC
- return new wxMacCoreGraphicsContext( this, cgctx, (wxDouble) w, (wxDouble) h );
+ wxMacCoreGraphicsContext *context =
+ new wxMacCoreGraphicsContext( this, cgctx, (wxDouble) w, (wxDouble) h );
+ context->EnableOffset(true);
+ return context;
}
return NULL;
}
{
int w, h;
mem_impl->GetSize( &w, &h );
- return new wxMacCoreGraphicsContext( this,
+ wxMacCoreGraphicsContext* context = new wxMacCoreGraphicsContext( this,
(CGContextRef)(mem_impl->GetGraphicsContext()->GetNativeContext()), (wxDouble) w, (wxDouble) h );
+ context->EnableOffset(true);
+ return context;
}
#endif
return NULL;
wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContextFromNativeWindow( void * window )
{
#if wxOSX_USE_CARBON
- return new wxMacCoreGraphicsContext(this,(WindowRef)window);
+ wxMacCoreGraphicsContext* context = new wxMacCoreGraphicsContext(this,(WindowRef)window);
+ context->EnableOffset(true);
+ return context;
#else
wxUnusedVar(window);
return NULL;