bool wxRegionBase::IsEqual(const wxRegion& region) const
{
- if ( m_refData == region.m_refData )
+ if ( m_refData == region.GetRefData() )
{
// regions are identical, hence equal
return true;
}
- if ( !m_refData || !region.m_refData )
+ if ( !m_refData || !region.GetRefData() )
{
// one, but not both, of the regions is invalid
return false;
}
#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