bool wxRegion::DoXor( const wxRegion& region ) { wxCHECK_MSG( region.Ok(), false, _T("invalid region") ); if (!m_refData) { return false; } AllocExclusive(); gdk_region_xor( M_REGIONDATA->m_region, region.GetRegion() ); return true; }
bool wxRegion::DoSubtract( const wxRegion& region ) { wxCHECK_MSG( region.Ok(), false, _T("invalid region") ); if (!m_refData) { // subtracting from an invalid region doesn't make sense return false; } AllocExclusive(); gdk_region_subtract( M_REGIONDATA->m_region, region.GetRegion() ); return true; }
bool wxRegion::DoXor( const wxRegion& region ) { wxCHECK_MSG( region.Ok(), false, _T("invalid region") ); if (!m_refData) { return FALSE; } AllocExclusive(); GdkRegion *reg = gdk_regions_xor( M_REGIONDATA->m_region, region.GetRegion() ); gdk_region_destroy( M_REGIONDATA->m_region ); M_REGIONDATA->m_region = reg; return TRUE; }
bool wxRegion::DoSubtract( const wxRegion& region ) { wxCHECK_MSG( region.Ok(), false, _T("invalid region") ); if (!m_refData) { // subtracting from an invalid region doesn't make sense return FALSE; } AllocExclusive(); GdkRegion *reg = gdk_regions_subtract( M_REGIONDATA->m_region, region.GetRegion() ); gdk_region_destroy( M_REGIONDATA->m_region ); M_REGIONDATA->m_region = reg; return TRUE; }
bool wxRegion::DoUnionWithRegion( const wxRegion& region ) { wxCHECK_MSG( region.Ok(), false, _T("invalid region") ); if (!m_refData) { m_refData = new wxRegionRefData(); M_REGIONDATA->m_region = gdk_region_new(); } else { AllocExclusive(); } gdk_region_union( M_REGIONDATA->m_region, region.GetRegion() ); 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; }