bool wxRegion::DoIsEqual(const wxRegion& region) const { #ifdef __WXGTK3__ return cairo_region_equal( M_REGIONDATA->m_region, M_REGIONDATA_OF(region)->m_region); #else return gdk_region_equal(M_REGIONDATA->m_region, M_REGIONDATA_OF(region)->m_region) != 0; #endif }
bool wxRegion::Intersect( const wxRegion& region ) { #if 0 if (region.IsNull()) return FALSE; if (!m_refData) { m_refData = new wxRegionRefData(); M_REGIONDATA->m_region = XCreateRegion(); // leave here return TRUE; } else { AllocExclusive(); } XIntersectRegion( M_REGIONDATA->m_region, M_REGIONDATA_OF(region)->m_region, M_REGIONDATA->m_region ); #endif return TRUE; }
bool wxRegion::DoUnionWithRegion( const wxRegion& region ) { if (region.m_refData == NULL) { } else if (m_refData == NULL) { m_refData = new wxRegionRefData(*M_REGIONDATA_OF(region)); } else { AllocExclusive(); #ifdef __WXGTK3__ cairo_region_union(M_REGIONDATA->m_region, M_REGIONDATA_OF(region)->m_region); #else gdk_region_union( M_REGIONDATA->m_region, region.GetRegion() ); #endif } return true; }
bool wxRegion::operator==( const wxRegion& region ) { #if 0 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 ); #endif }
bool wxRegion::DoXor( const wxRegion& region ) { if (region.m_refData == NULL) { } else if (m_refData == NULL) { // XOR-ing with an invalid region is the same as XOR-ing with an empty // one, i.e. it is simply a copy. m_refData = new wxRegionRefData(*M_REGIONDATA_OF(region)); } else { AllocExclusive(); #ifdef __WXGTK3__ cairo_region_xor(M_REGIONDATA->m_region, M_REGIONDATA_OF(region)->m_region); #else gdk_region_xor( M_REGIONDATA->m_region, region.GetRegion() ); #endif } return true; }
bool wxRegion::DoSubtract( const wxRegion& region ) { if (region.m_refData == NULL || m_refData == NULL) return false; AllocExclusive(); #ifdef __WXGTK3__ cairo_region_subtract(M_REGIONDATA->m_region, M_REGIONDATA_OF(region)->m_region); #else gdk_region_subtract( M_REGIONDATA->m_region, region.GetRegion() ); #endif return true; }
bool wxRegion::DoXor( const wxRegion& region ) { wxCHECK_MSG( region.Ok(), false, wxT("invalid region") ); if (!m_refData) { m_refData = new wxRegionRefData(); M_REGIONDATA->m_region = XCreateRegion(); } else { AllocExclusive(); } XXorRegion( M_REGIONDATA->m_region, M_REGIONDATA_OF(region)->m_region, M_REGIONDATA->m_region ); return true; }
bool wxRegion::DoIsEqual(const wxRegion& region) const { return gdk_region_equal(M_REGIONDATA->m_region, M_REGIONDATA_OF(region)->m_region); }
bool wxRegion::DoIsEqual(const wxRegion& region) const { return XEqualRegion( M_REGIONDATA->m_region, M_REGIONDATA_OF(region)->m_region ) == True; }