X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/277ccdafe111a97a22431a4acc81b9e9ef7c2f8a..a8b2285edf2eb1ef1dd1cb19abf130a871821dbf:/src/mac/carbon/graphics.cpp diff --git a/src/mac/carbon/graphics.cpp b/src/mac/carbon/graphics.cpp index 7bc04419a1..0a22635202 100755 --- a/src/mac/carbon/graphics.cpp +++ b/src/mac/carbon/graphics.cpp @@ -754,6 +754,10 @@ public : virtual void Set(wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, wxDouble tx=0.0, wxDouble ty=0.0); + // gets the component valuess of the matrix + virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL, + wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const; + // makes this the inverse matrix virtual void Invert(); @@ -825,6 +829,18 @@ void wxMacCoreGraphicsMatrixData::Set(wxDouble a, wxDouble b, wxDouble c, wxDoub m_matrix = CGAffineTransformMake(a,b,c,d,tx,ty); } +// gets the component valuess of the matrix +void wxMacCoreGraphicsMatrixData::Get(wxDouble* a, wxDouble* b, wxDouble* c, + wxDouble* d, wxDouble* tx, wxDouble* ty) const +{ + if (a) *a = m_matrix.a; + if (b) *b = m_matrix.b; + if (c) *c = m_matrix.c; + if (d) *d = m_matrix.d; + if (tx) *tx= m_matrix.tx; + if (ty) *ty= m_matrix.ty; +} + // makes this the inverse matrix void wxMacCoreGraphicsMatrixData::Invert() { @@ -1181,7 +1197,7 @@ public: virtual void DrawPath( const wxGraphicsPath &path, int fillStyle = wxODDEVEN_RULE ); virtual bool ShouldOffset() const - { + { int penwidth = 0 ; if ( !m_pen.IsNull() ) { @@ -1339,6 +1355,7 @@ bool wxMacCoreGraphicsContext::SetLogicalFunction( int function ) if ( CGContextSetBlendMode != NULL ) { CGContextSetBlendMode( m_cgContext, kCGBlendModeNormal ); + CGContextSetShouldAntialias( m_cgContext, true ); } #endif } @@ -1349,6 +1366,7 @@ bool wxMacCoreGraphicsContext::SetLogicalFunction( int function ) { // change color to white CGContextSetBlendMode( m_cgContext, kCGBlendModeExclusion ); + CGContextSetShouldAntialias( m_cgContext, false ); retval = true; } #endif @@ -1818,6 +1836,9 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid *width = FixedToInt(textAfter - textBefore); ::ATSUDisposeTextLayout(atsuLayout); +#if SIZEOF_WCHAR_T == 4 + free( ubuf ) ; +#endif } void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArrayDouble& widths) const @@ -1876,6 +1897,9 @@ void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArr } ::ATSUDisposeTextLayout(atsuLayout); +#if SIZEOF_WCHAR_T == 4 + free( ubuf ) ; +#endif } void * wxMacCoreGraphicsContext::GetNativeContext()