// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+wxObjectRefData *wxRegion::CreateRefData() const
+{
+ return new wxRegionRefData;
+}
+
+wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const
+{
+ return new wxRegionRefData(*(wxRegionRefData *)data);
+}
+
}
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;
wxRegion::wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight)
{
m_refData = new wxRegionRefData;
wxRegion::wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight)
{
m_refData = new wxRegionRefData;
- MGLRect rect(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y);
+ MGLRect rect(topLeft.x, topLeft.y, bottomRight.x+1, bottomRight.y+1);
- MGLRect rect(r.GetLeft(), r.GetTop(), r.GetRight(), r.GetBottom());
+ MGLRect rect(r.GetLeft(), r.GetTop(), r.GetRight()+1, r.GetBottom()+1);
// 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
{
}
//-----------------------------------------------------------------------------
// Modifications
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
// Modifications
//-----------------------------------------------------------------------------
// Union rectangle or region with this.
bool wxRegion::Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
// Union rectangle or region with this.
bool wxRegion::Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
M_REGION += MGLRect(x, y, x + width, y + height);
M_REGION += MGLRect(x, y, x + width, y + height);
}
// Intersect rectangle or region with this.
bool wxRegion::Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
}
// Intersect rectangle or region with this.
bool wxRegion::Intersect(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
M_REGION &= MGLRect(x, y, x + width, y + height);
M_REGION &= MGLRect(x, y, x + width, y + height);
}
// Subtract rectangle or region from this:
// Combines the parts of 'this' that are not part of the second region.
bool wxRegion::Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
}
// Subtract rectangle or region from this:
// Combines the parts of 'this' that are not part of the second region.
bool wxRegion::Subtract(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
M_REGION -= MGLRect(x, y, x + width, y + height);
M_REGION -= MGLRect(x, y, x + width, y + height);
}
// XOR: the union of two combined regions except for any overlapping areas.
bool wxRegion::Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
}
// XOR: the union of two combined regions except for any overlapping areas.
bool wxRegion::Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{
MGLRect rect(x, y, x + width, y + height);
MGLRegion rg1 = M_REGION + rect,
rg2 = M_REGION & rect;
M_REGION = rg1 - rg2;
MGLRect rect(x, y, x + width, y + height);
MGLRegion rg1 = M_REGION + rect,
rg2 = M_REGION & rect;
M_REGION = rg1 - rg2;
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;
-
-///////////////////////////////////////////////////////////////////////////////
-// wxRegionIterator //
-///////////////////////////////////////////////////////////////////////////////
+ DECLARE_DYNAMIC_CLASS(wxMglRegionModule)
+};
+IMPLEMENT_DYNAMIC_CLASS(wxMglRegionModule, wxModule)
+#endif