From 136a1de914abbd16e6bb15d7d585e50b76ae0160 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 16 Apr 2011 12:47:22 +0000 Subject: [PATCH] supprting flag for pixel offsetting for cairo, see #11853 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/graphicc.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 942357e984..c7bbf5cbcf 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -340,6 +340,9 @@ public: virtual bool ShouldOffset() const { + if ( !m_enableOffset ) + return false; + int penwidth = 0 ; if ( !m_pen.IsNull() ) { @@ -1213,6 +1216,8 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC& m_width = width; m_height = height; + m_enableOffset = true; + #ifdef __WXGTK20__ wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); Init( gdk_cairo_create( impldc->GetGDKWindow() ) ); @@ -1250,6 +1255,8 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC& m_width = width; m_height = height; + m_enableOffset = true; + #ifdef __WXGTK20__ wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); Init( gdk_cairo_create( impldc->GetGDKWindow() ) ); @@ -1315,6 +1322,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, cairo_t *context ) wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, wxWindow *window) : wxGraphicsContext(renderer) { + m_enableOffset = true; #ifdef __WXGTK__ // something along these lines (copied from dcclient) -- 2.45.2