X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/81e4cb8bdfe9f52259ecc24f18563316c6f61906..6e1609b1e0784f299933742e02c58462df809acc:/src/common/rgncmn.cpp?ds=sidebyside diff --git a/src/common/rgncmn.cpp b/src/common/rgncmn.cpp index 8b6530c78d..a18bb20708 100644 --- a/src/common/rgncmn.cpp +++ b/src/common/rgncmn.cpp @@ -157,3 +157,36 @@ bool wxRegionBase::Union(const wxBitmap& bmp, } #endif // wxUSE_IMAGE + +#ifdef wxHAS_REGION_COMBINE +// ============================================================================ +// wxRegionWithCombine +// ============================================================================ + +// implement some wxRegionBase pure virtuals in terms of Combine() +bool wxRegionWithCombine::DoUnionWithRect(const wxRect& rect) +{ + return Combine(rect, wxRGN_OR); +} + +bool wxRegionWithCombine::DoUnionWithRegion(const wxRegion& region) +{ + return DoCombine(region, wxRGN_OR); +} + +bool wxRegionWithCombine::DoIntersect(const wxRegion& region) +{ + return DoCombine(region, wxRGN_AND); +} + +bool wxRegionWithCombine::DoSubtract(const wxRegion& region) +{ + return DoCombine(region, wxRGN_DIFF); +} + +bool wxRegionWithCombine::DoXor(const wxRegion& region) +{ + return DoCombine(region, wxRGN_XOR); +} + +#endif // wxHAS_REGION_COMBINE