X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0903bd055aef36924bd492c277eace3e6f48a599..c4807c0a8fdce8c8a21f7296cc224c08297ca54b:/src/mac/carbon/region.cpp diff --git a/src/mac/carbon/region.cpp b/src/mac/carbon/region.cpp index 901b72c08a..3ee709f722 100644 --- a/src/mac/carbon/region.cpp +++ b/src/mac/carbon/region.cpp @@ -165,7 +165,7 @@ bool wxRegion::DoOffset(wxCoord x, wxCoord y) // nothing to do return true; - HIShapeOffset( M_REGION , x , y ) ; + verify_noerr( HIShapeOffset( M_REGION , x , y ) ) ; return true ; } @@ -191,11 +191,11 @@ bool wxRegion::DoCombine(const wxRegion& region, wxRegionOp op) switch (op) { case wxRGN_AND: - HIShapeIntersect( M_REGION , OTHER_M_REGION(region) , M_REGION ) ; + verify_noerr( HIShapeIntersect( M_REGION , OTHER_M_REGION(region) , M_REGION ) ); break ; case wxRGN_OR: - HIShapeUnion( M_REGION , OTHER_M_REGION(region) , M_REGION ) ; + verify_noerr( HIShapeUnion( M_REGION , OTHER_M_REGION(region) , M_REGION ) ); break ; 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 wxCFRef< HIShapeRef > unionshape( HIShapeCreateUnion( 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 ; case wxRGN_DIFF: - HIShapeDifference( M_REGION , OTHER_M_REGION(region) , M_REGION ) ; + verify_noerr( HIShapeDifference( M_REGION , OTHER_M_REGION(region) , M_REGION ) ) ; break ; case wxRGN_COPY: @@ -298,8 +298,10 @@ wxRegionContain wxRegion::DoContainsRect(const wxRect& r) const if ( HIShapeIsRectangular(intersect) && CGRectEqualToRect(rect,bounds) ) return wxInRegion; - else + else if ( HIShapeIsEmpty( intersect ) ) return wxOutRegion; + else + return wxPartRegion; } ///////////////////////////////////////////////////////////////////////////////