This class is used to iterate through the rectangles in a region,
typically when examining the damaged regions of a window within an OnPaint call.
This class is used to iterate through the rectangles in a region,
typically when examining the damaged regions of a window within an OnPaint call.
To use it, construct an iterator object on the stack and loop through the
regions, testing the object and incrementing the iterator at the end of the
loop.
To use it, construct an iterator object on the stack and loop through the
regions, testing the object and incrementing the iterator at the end of the
loop.
This class uses @ref overview_trefcount "reference counting and copy-on-write"
internally so that assignments between two instances of this class are very
cheap. You can therefore use actual objects instead of pointers without
efficiency problems. If an instance of this class is changed it will create
its own data internally so that other instances, which previously shared the
data using the reference counting, are not affected.
This class uses @ref overview_trefcount "reference counting and copy-on-write"
internally so that assignments between two instances of this class are very
cheap. You can therefore use actual objects instead of pointers without
efficiency problems. If an instance of this class is changed it will create
its own data internally so that other instances, which previously shared the
data using the reference counting, are not affected.
- wxRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight);
- wxRegion(const wxRect& rect);
- wxRegion(const wxRegion& region);
- wxRegion(size_t n, const wxPoint points,
- int fillStyle = wxWINDING_RULE);
- wxRegion(const wxBitmap& bmp);
- wxRegion(const wxBitmap& bmp, const wxColour& transColour,
- int tolerance = 0);
+ wxRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
+ wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight);
+ wxRegion(const wxRect& rect);
+ wxRegion(const wxRegion& region);
+ wxRegion(size_t n, const wxPoint points,
+ int fillStyle = wxWINDING_RULE);
+ wxRegion(const wxBitmap& bmp);
+ wxRegion(const wxBitmap& bmp, const wxColour& transColour,
+ int tolerance = 0);
- wxRegionContain Contains(long& x, long& y);
- wxRegionContain Contains(const wxPoint& pt);
- wxRegionContain Contains(long& x, long& y,
- long& width,
- long& height);
- wxRegionContain Contains(const wxRect& rect);
+ wxRegionContain Contains(long& x, long& y) const;
+ const wxRegionContain Contains(const wxPoint& pt) const;
+ const wxRegionContain Contains(long& x, long& y,
+ long& width,
+ long& height) const;
+ const wxRegionContain Contains(const wxRect& rect) const;
//@{
/**
Returns the outer bounds of the region.
*/
void GetBox(wxCoord& x, wxCoord& y, wxCoord& width,
//@{
/**
Returns the outer bounds of the region.
*/
void GetBox(wxCoord& x, wxCoord& y, wxCoord& width,
*/
bool Intersect(wxCoord x, wxCoord y, wxCoord width,
wxCoord height);
*/
bool Intersect(wxCoord x, wxCoord y, wxCoord width,
wxCoord height);
//@}
//@{
/**
Finds the union of this region and the non-transparent pixels of a
bitmap. Colour to be treated as transparent is specified in the
//@}
//@{
/**
Finds the union of this region and the non-transparent pixels of a
bitmap. Colour to be treated as transparent is specified in the
*/
bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
*/
bool Union(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- bool Union(const wxRect& rect);
- bool Union(const wxRegion& region);
- bool Union(const wxBitmap& bmp);
- bool Union(const wxBitmap& bmp, const wxColour& transColour,
- int tolerance = 0);
+ bool Union(const wxRect& rect);
+ bool Union(const wxRegion& region);
+ bool Union(const wxBitmap& bmp);
+ bool Union(const wxBitmap& bmp, const wxColour& transColour,
+ int tolerance = 0);
- and the second region, except for any overlapping
- areas. The result is stored in this region.
+ and the second region, except for any overlapping
+ areas. The result is stored in this region.
*/
bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
*/
bool Xor(wxCoord x, wxCoord y, wxCoord width, wxCoord height);