X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e40298d54ecd5b109222a7c60aa2ef084a304d69..d46342af50c9d995c6a2752f0200907a86d40263:/src/mac/carbon/dc.cpp diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index 9dff84e4d3..ed0648f9dc 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -17,6 +17,7 @@ #include "wx/app.h" #include "wx/mac/uma.h" #include "wx/dcmemory.h" +#include "wx/dcprint.h" #include "wx/region.h" #include "wx/image.h" #include "wx/log.h" @@ -25,6 +26,7 @@ #include "math.h" using namespace std ; #endif + #include "wx/mac/private.h" #include "ATSUnicode.h" #include "TextCommon.h" @@ -88,7 +90,6 @@ wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win ) SetClip( m_newClip ) ; DisposeRgn( insidergn ) ; #endif - RgnHandle insidergn = NewRgn() ; int x = 0 , y = 0; win->MacWindowToRootWindow( &x,&y ) ; CopyRgn( (RgnHandle) ((wxWindow*)win)->MacGetVisibleRegion().GetWXHRGN() , m_newClip ) ; @@ -1054,7 +1055,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, switch ( logical_func ) { case wxAND: // src AND dst - mode = srcOr ; // ok + mode = adMin ; // ok break ; case wxAND_INVERT: // (NOT src) AND dst mode = notSrcOr ; // ok @@ -1385,7 +1386,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y) long yy = YLOG2DEVMAC(y); #if TARGET_CARBON bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ; - if ( m_font.GetNoAntiAliasing() ) + if ( IsKindOf(CLASSINFO( wxPrinterDC ) ) || m_font.GetNoAntiAliasing() ) useDrawThemeText = false ; #endif MacInstallFont() ; @@ -1478,6 +1479,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y) { Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ; CFStringRef mString = CFStringCreateWithCString( NULL , text + laststop , kCFStringEncodingMacRoman ) ; + if ( m_backgroundMode != wxTRANSPARENT ) { Point bounds={0,0} ; @@ -1534,7 +1536,7 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he ::GetFontInfo( &fi ) ; #if TARGET_CARBON bool useGetThemeText = ( GetThemeTextDimensions != (void*) kUnresolvedCFragSymbolAddress ) ; - if ( ((wxFont*)&m_font)->GetNoAntiAliasing() ) + if ( IsKindOf(CLASSINFO( wxPrinterDC ) ) || ((wxFont*)&m_font)->GetNoAntiAliasing() ) useGetThemeText = false ; #endif if ( height ) @@ -1747,10 +1749,12 @@ void wxDC::MacInstallFont() const case wxSRC_INVERT: // (NOT src) mode = notPatCopy ; break ; + case wxAND: // src AND dst + mode = adMin ; + break ; // unsupported TODO case wxCLEAR: // 0 case wxAND_REVERSE:// src AND (NOT dst) - case wxAND: // src AND dst case wxAND_INVERT: // (NOT src) AND dst case wxNO_OP: // dst case wxNOR: // (NOT src) AND (NOT dst) @@ -1951,10 +1955,12 @@ void wxDC::MacInstallPen() const case wxSRC_INVERT: // (NOT src) mode = notPatCopy ; break ; + case wxAND: // src AND dst + mode = adMin ; + break ; // unsupported TODO case wxCLEAR: // 0 case wxAND_REVERSE:// src AND (NOT dst) - case wxAND: // src AND dst case wxAND_INVERT: // (NOT src) AND dst case wxNO_OP: // dst case wxNOR: // (NOT src) AND (NOT dst) @@ -2131,10 +2137,12 @@ void wxDC::MacInstallBrush() const case wxSRC_INVERT: // (NOT src) mode = notPatCopy ; break ; + case wxAND: // src AND dst + mode = adMin ; + break ; // unsupported TODO case wxCLEAR: // 0 case wxAND_REVERSE:// src AND (NOT dst) - case wxAND: // src AND dst case wxAND_INVERT: // (NOT src) AND dst case wxNO_OP: // dst case wxNOR: // (NOT src) AND (NOT dst) @@ -2195,4 +2203,4 @@ wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const { return ((wxDC *)this)->YLOG2DEVREL(y); -} \ No newline at end of file +}