benefit from 10.5+ call HIShapeUnionWithRect

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2012-12-20 13:00:42 +00:00
parent c6f41dc81e
commit 833e100f7f
2 changed files with 16 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ protected:
virtual bool DoOffset(wxCoord x, wxCoord y);
virtual bool DoCombine(const wxRegion& region, wxRegionOp op);
virtual bool DoUnionWithRect(const wxRect& rect);
private:
DECLARE_DYNAMIC_CLASS(wxRegion)

View File

@@ -169,6 +169,21 @@ bool wxRegion::DoOffset(wxCoord x, wxCoord y)
return true ;
}
bool wxRegion::DoUnionWithRect(const wxRect& rect)
{
if ( !m_refData )
{
m_refData = new wxRegionRefData(rect.x , rect.y , rect.width , rect.height);
return true;
}
AllocExclusive();
CGRect r = CGRectMake(rect.x , rect.y , rect.width , rect.height);
HIShapeUnionWithRect(M_REGION , &r);
return true;
}
//! Union /e region with this.
bool wxRegion::DoCombine(const wxRegion& region, wxRegionOp op)