merged 2.4 branch into the trunk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -287,16 +287,38 @@ void wxMacToolTip::Draw()
|
||||
m_rect.right += kTipBorder ;
|
||||
#endif
|
||||
m_rect.bottom = m_rect.top + height + 2 * kTipBorder;
|
||||
Rect r ;
|
||||
GetPortBounds( GetWindowPort( m_window ) , &r ) ;
|
||||
if ( m_rect.top < 0 )
|
||||
{
|
||||
m_rect.bottom += -m_rect.top ;
|
||||
m_rect.top = 0 ;
|
||||
}
|
||||
if ( m_rect.left < 0 )
|
||||
{
|
||||
m_rect.right += -m_rect.left ;
|
||||
m_rect.left = 0 ;
|
||||
}
|
||||
if ( m_rect.right > r.right )
|
||||
{
|
||||
m_rect.left -= (m_rect.right - r.right ) ;
|
||||
m_rect.right = r.right ;
|
||||
}
|
||||
if ( m_rect.bottom > r.bottom )
|
||||
{
|
||||
m_rect.top -= (m_rect.bottom - r.bottom) ;
|
||||
m_rect.bottom = r.bottom ;
|
||||
}
|
||||
ClipRect( &m_rect ) ;
|
||||
BackColor( whiteColor ) ;
|
||||
ForeColor(blackColor ) ;
|
||||
GWorldPtr port ;
|
||||
NewGWorld( &port , wxDisplayDepth() , &m_rect , NULL , NULL , 0 ) ;
|
||||
CGrafPtr origPort ;
|
||||
GDHandle origDevice ;
|
||||
|
||||
GetGWorld( &origPort , &origDevice ) ;
|
||||
SetGWorld( port , NULL ) ;
|
||||
GWorldPtr port ;
|
||||
NewGWorld( &port , wxDisplayDepth() , &m_rect , NULL , NULL , 0 ) ;
|
||||
CGrafPtr origPort ;
|
||||
GDHandle origDevice ;
|
||||
|
||||
GetGWorld( &origPort , &origDevice ) ;
|
||||
SetGWorld( port , NULL ) ;
|
||||
|
||||
m_backpict = OpenPicture(&m_rect);
|
||||
|
||||
|
Reference in New Issue
Block a user