-//-----------------------------------------------------------------------------
-// wxRegion
-//-----------------------------------------------------------------------------
+wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const
+{
+ return new wxRegionRefData(*(wxRegionRefData *)data);
+}
+
+// ----------------------------------------------------------------------------
+// wxRegion comparison
+// ----------------------------------------------------------------------------
+
+bool wxRegion::operator==( const wxRegion& region ) const
+{
+ if (m_refData == region.m_refData) return true;
+
+ if (!m_refData || !region.m_refData) return false;
+
+ // compare the regions themselves, not the pointers to ref data!
+ return XEqualRegion( M_REGIONDATA->m_region,
+ M_REGIONDATA_OF(region)->m_region ) == True;
+}
+
+// ----------------------------------------------------------------------------
+// wxRegion operations
+// ----------------------------------------------------------------------------