clipping to client area
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -116,7 +116,7 @@ wxWindowDC::wxWindowDC(wxWindow *window)
|
|||||||
m_graphicContext = new wxMacCGContext( (CGContextRef) window->MacGetCGContextRef() ) ;
|
m_graphicContext = new wxMacCGContext( (CGContextRef) window->MacGetCGContextRef() ) ;
|
||||||
m_graphicContext->SetPen( m_pen ) ;
|
m_graphicContext->SetPen( m_pen ) ;
|
||||||
m_graphicContext->SetBrush( m_brush ) ;
|
m_graphicContext->SetBrush( m_brush ) ;
|
||||||
SetBackground(MacGetBackgroundBrush(window));
|
SetBackground(MacGetBackgroundBrush(window));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -187,6 +187,9 @@ wxClientDC::wxClientDC(wxWindow *window)
|
|||||||
m_graphicContext = new wxMacCGContext( (CGContextRef) window->MacGetCGContextRef() ) ;
|
m_graphicContext = new wxMacCGContext( (CGContextRef) window->MacGetCGContextRef() ) ;
|
||||||
m_graphicContext->SetPen( m_pen ) ;
|
m_graphicContext->SetPen( m_pen ) ;
|
||||||
m_graphicContext->SetBrush( m_brush ) ;
|
m_graphicContext->SetBrush( m_brush ) ;
|
||||||
|
wxSize size = window->GetClientSize() ;
|
||||||
|
m_ok = TRUE ;
|
||||||
|
SetClippingRegion( 0 , 0 , size.x , size.y ) ;
|
||||||
SetBackground(MacGetBackgroundBrush(window));
|
SetBackground(MacGetBackgroundBrush(window));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -209,9 +212,8 @@ wxClientDC::wxClientDC(wxWindow *window)
|
|||||||
m_graphicContext = new wxMacCGContext( port ) ;
|
m_graphicContext = new wxMacCGContext( port ) ;
|
||||||
m_graphicContext->SetPen( m_pen ) ;
|
m_graphicContext->SetPen( m_pen ) ;
|
||||||
m_graphicContext->SetBrush( m_brush ) ;
|
m_graphicContext->SetBrush( m_brush ) ;
|
||||||
SetBackground(MacGetBackgroundBrush(window));
|
m_ok = TRUE ;
|
||||||
}
|
}
|
||||||
m_ok = TRUE ;
|
|
||||||
#else
|
#else
|
||||||
wxTopLevelWindowMac* rootwindow = window->MacGetTopLevelWindow() ;
|
wxTopLevelWindowMac* rootwindow = window->MacGetTopLevelWindow() ;
|
||||||
if (!rootwindow)
|
if (!rootwindow)
|
||||||
|
Reference in New Issue
Block a user