setting offsets for window and client dcs when not in a paint event, see #14904
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -58,6 +58,7 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window )
|
|||||||
if ( cg == NULL )
|
if ( cg == NULL )
|
||||||
{
|
{
|
||||||
SetGraphicsContext( wxGraphicsContext::Create( window ) ) ;
|
SetGraphicsContext( wxGraphicsContext::Create( window ) ) ;
|
||||||
|
SetDeviceOrigin(-window->MacGetLeftBorderSize() , -window->MacGetTopBorderSize());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -157,7 +158,11 @@ wxClientDCImpl::wxClientDCImpl( wxDC *owner, wxWindow *window ) :
|
|||||||
m_window->GetClientSize( &m_width , &m_height);
|
m_window->GetClientSize( &m_width , &m_height);
|
||||||
if ( !m_window->IsShownOnScreen() )
|
if ( !m_window->IsShownOnScreen() )
|
||||||
m_width = m_height = 0;
|
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 ) ;
|
DoSetClippingRegion( 0 , 0 , m_width , m_height ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user