corrected GetDepth method and wrong disposal calls for pixmap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
66689a9ee9
commit
c99d6f997c
@ -250,14 +250,14 @@ void wxDC::MacCleanupPort(wxMacPortStateHelper* help) const
|
||||
{
|
||||
Pattern blackColor ;
|
||||
::PenPat(GetQDGlobalsBlack(&blackColor));
|
||||
DisposePixMap( (PixMapHandle) m_macForegroundPixMap ) ;
|
||||
DisposePixPat( (PixPatHandle) m_macForegroundPixMap ) ;
|
||||
m_macForegroundPixMap = NULL ;
|
||||
}
|
||||
if ( m_macBackgroundPixMap )
|
||||
{
|
||||
Pattern whiteColor ;
|
||||
::BackPat(GetQDGlobalsWhite(&whiteColor));
|
||||
DisposePixMap( (PixMapHandle) m_macBackgroundPixMap ) ;
|
||||
DisposePixPat( (PixPatHandle) m_macBackgroundPixMap ) ;
|
||||
m_macBackgroundPixMap = NULL ;
|
||||
}
|
||||
}
|
||||
@ -563,7 +563,11 @@ wxSize wxDC::GetPPI() const
|
||||
|
||||
int wxDC::GetDepth() const
|
||||
{
|
||||
return wxDisplayDepth() ;
|
||||
if ( IsPortColor( (CGrafPtr) m_macPort ) )
|
||||
{
|
||||
return ( (**GetPortPixMap( (CGrafPtr) m_macPort)).pixelSize ) ;
|
||||
}
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
void wxDC::ComputeScaleAndOrigin()
|
||||
|
@ -250,14 +250,14 @@ void wxDC::MacCleanupPort(wxMacPortStateHelper* help) const
|
||||
{
|
||||
Pattern blackColor ;
|
||||
::PenPat(GetQDGlobalsBlack(&blackColor));
|
||||
DisposePixMap( (PixMapHandle) m_macForegroundPixMap ) ;
|
||||
DisposePixPat( (PixPatHandle) m_macForegroundPixMap ) ;
|
||||
m_macForegroundPixMap = NULL ;
|
||||
}
|
||||
if ( m_macBackgroundPixMap )
|
||||
{
|
||||
Pattern whiteColor ;
|
||||
::BackPat(GetQDGlobalsWhite(&whiteColor));
|
||||
DisposePixMap( (PixMapHandle) m_macBackgroundPixMap ) ;
|
||||
DisposePixPat( (PixPatHandle) m_macBackgroundPixMap ) ;
|
||||
m_macBackgroundPixMap = NULL ;
|
||||
}
|
||||
}
|
||||
@ -563,7 +563,11 @@ wxSize wxDC::GetPPI() const
|
||||
|
||||
int wxDC::GetDepth() const
|
||||
{
|
||||
return wxDisplayDepth() ;
|
||||
if ( IsPortColor( (CGrafPtr) m_macPort ) )
|
||||
{
|
||||
return ( (**GetPortPixMap( (CGrafPtr) m_macPort)).pixelSize ) ;
|
||||
}
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
void wxDC::ComputeScaleAndOrigin()
|
||||
|
Loading…
Reference in New Issue
Block a user