X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/66a09d4776b8ae390d5aa51dbd678b694f2c81d6..8caf72d33efedf5252ffeb5177441b10f3a72141:/src/mac/dc.cpp diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index aaabc6607b..de479fbeec 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -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()