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:
@@ -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)
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user