make things compile under 10.3 again

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2006-10-31 08:56:07 +00:00
parent 170acdc90e
commit 23a3e8fbda

View File

@@ -795,6 +795,14 @@ void wxMacCoreGraphicsMatrixData::Invert()
bool wxMacCoreGraphicsMatrixData::IsEqual( const wxGraphicsMatrixData* t) const bool wxMacCoreGraphicsMatrixData::IsEqual( const wxGraphicsMatrixData* t) const
{ {
const CGAffineTransform* tm = (CGAffineTransform*) t->GetNativeMatrix(); const CGAffineTransform* tm = (CGAffineTransform*) t->GetNativeMatrix();
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
if ( CGAffineTransformEqualToTransform )
{
return CGAffineTransformEqualToTransform(m_matrix, *((CGAffineTransform*) t->GetNativeMatrix()));
}
else
#endif
{
return ( return (
m_matrix.a == tm->a && m_matrix.a == tm->a &&
m_matrix.b == tm->b && m_matrix.b == tm->b &&
@@ -802,8 +810,7 @@ bool wxMacCoreGraphicsMatrixData::IsEqual( const wxGraphicsMatrixData* t) const
m_matrix.d == tm->d && m_matrix.d == tm->d &&
m_matrix.tx == tm->tx && m_matrix.tx == tm->tx &&
m_matrix.ty == tm->ty ) ; m_matrix.ty == tm->ty ) ;
}
return CGAffineTransformEqualToTransform(m_matrix, *((CGAffineTransform*) t->GetNativeMatrix()));
} }
// return true if this is the identity matrix // return true if this is the identity matrix
@@ -1041,9 +1048,20 @@ void wxMacCoreGraphicsPathData::GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wx
} }
bool wxMacCoreGraphicsPathData::Contains( wxDouble x, wxDouble y, int fillStyle) const bool wxMacCoreGraphicsPathData::Contains( wxDouble x, wxDouble y, int fillStyle) const
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
if ( CGPathContainsPoint )
{ {
return CGPathContainsPoint( m_path, NULL, CGPointMake(x,y), fillStyle == wxODDEVEN_RULE ); return CGPathContainsPoint( m_path, NULL, CGPointMake(x,y), fillStyle == wxODDEVEN_RULE );
} }
else
#endif
{
// TODO : implementation for 10.3
CGRect bounds = CGPathGetBoundingBox( m_path ) ;
return CGRectContainsPoint( bounds, CGPointMake(x,y) ) == 1;
}
}
// //
// Graphics Context // Graphics Context