+wxMask::wxMask(const wxMask& mask)
+{
+ m_display = mask.m_display;
+ if ( !mask.m_bitmap )
+ {
+ m_bitmap = NULL;
+ return;
+ }
+
+ m_size = mask.m_size;
+
+ // Duplicate the mask bitmap using the existing wxGetSubPixmap() function.
+ // There are probably/surely better ways to do it.
+ m_bitmap = wxGetSubPixmap(m_display, mask.m_bitmap,
+ 0, 0, m_size.x, m_size.y,
+ 1);
+}
+