adding wxPartRegion and catching errors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -165,7 +165,7 @@ bool wxRegion::DoOffset(wxCoord x, wxCoord y)
|
|||||||
// nothing to do
|
// nothing to do
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
HIShapeOffset( M_REGION , x , y ) ;
|
verify_noerr( HIShapeOffset( M_REGION , x , y ) ) ;
|
||||||
|
|
||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
@@ -191,11 +191,11 @@ bool wxRegion::DoCombine(const wxRegion& region, wxRegionOp op)
|
|||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
case wxRGN_AND:
|
case wxRGN_AND:
|
||||||
HIShapeIntersect( M_REGION , OTHER_M_REGION(region) , M_REGION ) ;
|
verify_noerr( HIShapeIntersect( M_REGION , OTHER_M_REGION(region) , M_REGION ) );
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case wxRGN_OR:
|
case wxRGN_OR:
|
||||||
HIShapeUnion( M_REGION , OTHER_M_REGION(region) , M_REGION ) ;
|
verify_noerr( HIShapeUnion( M_REGION , OTHER_M_REGION(region) , M_REGION ) );
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case wxRGN_XOR:
|
case wxRGN_XOR:
|
||||||
@@ -203,12 +203,12 @@ bool wxRegion::DoCombine(const wxRegion& region, wxRegionOp op)
|
|||||||
// XOR is defined as the difference between union and intersection
|
// XOR is defined as the difference between union and intersection
|
||||||
wxCFRef< HIShapeRef > unionshape( HIShapeCreateUnion( M_REGION , OTHER_M_REGION(region) ) );
|
wxCFRef< HIShapeRef > unionshape( HIShapeCreateUnion( M_REGION , OTHER_M_REGION(region) ) );
|
||||||
wxCFRef< HIShapeRef > intersectionshape( HIShapeCreateIntersection( M_REGION , OTHER_M_REGION(region) ) );
|
wxCFRef< HIShapeRef > intersectionshape( HIShapeCreateIntersection( M_REGION , OTHER_M_REGION(region) ) );
|
||||||
HIShapeDifference( unionshape, intersectionshape, M_REGION );
|
verify_noerr( HIShapeDifference( unionshape, intersectionshape, M_REGION ) );
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case wxRGN_DIFF:
|
case wxRGN_DIFF:
|
||||||
HIShapeDifference( M_REGION , OTHER_M_REGION(region) , M_REGION ) ;
|
verify_noerr( HIShapeDifference( M_REGION , OTHER_M_REGION(region) , M_REGION ) ) ;
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case wxRGN_COPY:
|
case wxRGN_COPY:
|
||||||
@@ -298,8 +298,10 @@ wxRegionContain wxRegion::DoContainsRect(const wxRect& r) const
|
|||||||
|
|
||||||
if ( HIShapeIsRectangular(intersect) && CGRectEqualToRect(rect,bounds) )
|
if ( HIShapeIsRectangular(intersect) && CGRectEqualToRect(rect,bounds) )
|
||||||
return wxInRegion;
|
return wxInRegion;
|
||||||
else
|
else if ( HIShapeIsEmpty( intersect ) )
|
||||||
return wxOutRegion;
|
return wxOutRegion;
|
||||||
|
else
|
||||||
|
return wxPartRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
Reference in New Issue
Block a user