+ m_rects = NULL;
+ }
+}
+
+wxRegionIterator::wxRegionIterator(const wxRegionIterator& iterator)
+ : wxObject()
+ , m_current(iterator.m_current)
+ , m_numRects(0)
+ , m_rects(NULL)
+{
+ SetRects(iterator.m_numRects, iterator.m_rects);
+}
+
+wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& iterator)
+{
+ m_current = iterator.m_current;
+ SetRects(iterator.m_numRects, iterator.m_rects);
+ return *this;
+}
+
+/*!
+ * Set iterator rects for region
+ */
+void wxRegionIterator::SetRects(long numRects, wxRect *rects)
+{
+ if (m_rects) {
+ delete[] m_rects;
+ m_rects = NULL;
+ }
+ if (rects)
+ {
+ int i;
+ m_rects = new wxRect[numRects];
+ for (i = 0; i < numRects; i++)
+ m_rects[i] = rects[i];
+ }
+ m_numRects = numRects;