// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
}
wxRegion::wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
}
wxRegion::wxRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
m_refData = new wxRegionRefData;
MGLRect rect(x, y, x + w, y + h);
M_REGION = rect;
m_refData = new wxRegionRefData;
MGLRect rect(x, y, x + w, y + h);
M_REGION = rect;
// Outer bounds of region
void wxRegion::GetBox(wxCoord& x, wxCoord& y, wxCoord&w, wxCoord &h) const
{
// Outer bounds of region
void wxRegion::GetBox(wxCoord& x, wxCoord& y, wxCoord&w, wxCoord &h) const
{
{
AllocExclusive();
M_REGION += MGLRect(x, y, x + width, y + height);
{
AllocExclusive();
M_REGION += MGLRect(x, y, x + width, y + height);
{
AllocExclusive();
M_REGION &= MGLRect(x, y, x + width, y + height);
{
AllocExclusive();
M_REGION &= MGLRect(x, y, x + width, y + height);
{
AllocExclusive();
M_REGION -= MGLRect(x, y, x + width, y + height);
{
AllocExclusive();
M_REGION -= MGLRect(x, y, x + width, y + height);
MGLRegion rg1 = M_REGION + M_REGION_OF(region),
rg2 = M_REGION & M_REGION_OF(region);
M_REGION = rg1 - rg2;
MGLRegion rg1 = M_REGION + M_REGION_OF(region),
rg2 = M_REGION & M_REGION_OF(region);
M_REGION = rg1 - rg2;
MGLRect rect(x, y, x + w, y + h);
MGLRegion rg;
MGLRect rect(x, y, x + w, y + h);
MGLRegion rg;
// 1) is the rectangle entirely covered by the region?
rg = MGLRegion(rect) - M_REGION;
if (rg.isEmpty()) return wxInRegion;
// 1) is the rectangle entirely covered by the region?
rg = MGLRegion(rect) - M_REGION;
if (rg.isEmpty()) return wxInRegion;
// 2) is the rectangle completely outside the region?
rg = M_REGION & rect; // intersection
if (rg.isEmpty()) return wxOutRegion;
// 2) is the rectangle completely outside the region?
rg = M_REGION & rect; // intersection
if (rg.isEmpty()) return wxOutRegion;