コード例 #1
0
ファイル: region.cpp プロジェクト: 0ryuO/dolphin-avsync
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
}
コード例 #2
0
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;
}
コード例 #3
0
ファイル: region.cpp プロジェクト: 0ryuO/dolphin-avsync
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;
}
コード例 #4
0
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
}
コード例 #5
0
ファイル: region.cpp プロジェクト: 0ryuO/dolphin-avsync
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;
}
コード例 #6
0
ファイル: region.cpp プロジェクト: 0ryuO/dolphin-avsync
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;
}
コード例 #7
0
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;
}
コード例 #8
0
ファイル: region.cpp プロジェクト: EdgarTx/wx
bool wxRegion::DoIsEqual(const wxRegion& region) const
{
    return gdk_region_equal(M_REGIONDATA->m_region,
                            M_REGIONDATA_OF(region)->m_region);
}
コード例 #9
0
bool wxRegion::DoIsEqual(const wxRegion& region) const
{
    return XEqualRegion( M_REGIONDATA->m_region,
                         M_REGIONDATA_OF(region)->m_region ) == True;
}