X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca65c0440a7163e4e37e48b1c4329709d722db47..511bec9640556c23969942f7912ada90c19d36ac:/src/generic/regiong.cpp diff --git a/src/generic/regiong.cpp b/src/generic/regiong.cpp index 4ed586112c..c81364b059 100644 --- a/src/generic/regiong.cpp +++ b/src/generic/regiong.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: generic/region.cpp +// Name: src/generic/region.cpp // Purpose: generic wxRegion class // Author: David Elliott // Modified by: @@ -9,8 +9,19 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + #include "wx/generic/region.h" -#include "wx/utils.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" +#endif // ======================================================================== // Classes to interface with X.org code @@ -28,6 +39,7 @@ struct REGION public: // Default constructor initializes nothing REGION() {} + REGION(const wxRect& rect) { rects = &extents; @@ -38,7 +50,11 @@ public: extents.y2 = rect.y + rect.height; size = 1; } - BoxPtr GetBox(int i) { if(iGetBox(m_current); wxASSERT(box); return wxRect @@ -456,7 +484,7 @@ wxRect wxRegionIteratorGeneric::GetRect() const long wxRegionIteratorGeneric::GetX() const { - wxASSERT(m_refData); + wxASSERT(m_region.m_refData); const Box *box = M_REGIONDATA_OF(m_region)->GetBox(m_current); wxASSERT(box); return box->x1; @@ -464,7 +492,7 @@ long wxRegionIteratorGeneric::GetX() const long wxRegionIteratorGeneric::GetY() const { - wxASSERT(m_refData); + wxASSERT(m_region.m_refData); const Box *box = M_REGIONDATA_OF(m_region)->GetBox(m_current); wxASSERT(box); return box->y1; @@ -472,7 +500,7 @@ long wxRegionIteratorGeneric::GetY() const long wxRegionIteratorGeneric::GetW() const { - wxASSERT(m_refData); + wxASSERT(m_region.m_refData); const Box *box = M_REGIONDATA_OF(m_region)->GetBox(m_current); wxASSERT(box); return box->x2 - box->x1; @@ -480,7 +508,7 @@ long wxRegionIteratorGeneric::GetW() const long wxRegionIteratorGeneric::GetH() const { - wxASSERT(m_refData); + wxASSERT(m_region.m_refData); const Box *box = M_REGIONDATA_OF(m_region)->GetBox(m_current); wxASSERT(box); return box->y2 - box->y1; @@ -1936,4 +1964,3 @@ XRectInRegion( return(partIn ? ((ry < prect->y2) ? wxPartRegion : wxInRegion) : wxOutRegion); } -