- // Don't change shared data
- if (!m_refData) {
- m_refData = new wxRegionRefData();
- } else if (m_refData->GetRefCount() > 1) {
- wxRegionRefData* ref = (wxRegionRefData*)m_refData;
- UnRef();
- m_refData = new wxRegionRefData(*ref);
- }
- // If ref count is 1, that means it's 'ours' anyway so no action.
-
- HRGN rectRegion = ::CreateRectRgn(x, y, x + width, y + height);
-
- int mode = 0;
- switch (op)
+ UnRef();
+}
+
+bool wxRegion::DoOffset(wxCoord x, wxCoord y)
+{
+ wxCHECK_MSG( M_REGION, false, wxT("invalid wxRegion") );
+
+ if ( !x && !y )