## wxRegionIterator

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.

See wxPaintEvent for an example of use.

Derived from

wxObject

Include files

<wx/region.h>

See also

wxPaintEvent

Members

wxRegionIterator::wxRegionIterator
wxRegionIterator::GetX
wxRegionIterator::GetY
wxRegionIterator::GetW
wxRegionIterator::GetWidth
wxRegionIterator::GetH
wxRegionIterator::GetHeight
wxRegionIterator::GetRect
wxRegionIterator::HaveRects
wxRegionIterator::Reset
wxRegionIterator::operator ++
wxRegionIterator::operator bool

### wxRegionIterator::wxRegionIterator

wxRegionIterator()

Default constructor.

wxRegionIterator(const wxRegion& region)

Creates an iterator object given a region.

### wxRegionIterator::GetX

wxCoord GetX() const

Returns the x value for the current region.

### wxRegionIterator::GetY

wxCoord GetY() const

Returns the y value for the current region.

### wxRegionIterator::GetW

wxCoord GetW() const

An alias for GetWidth.

### wxRegionIterator::GetWidth

wxCoord GetWidth() const

Returns the width value for the current region.

### wxRegionIterator::GetH

wxCoord GetH() const

An alias for GetHeight.

### wxRegionIterator::GetHeight

wxCoord GetWidth() const

Returns the width value for the current region.

### wxRegionIterator::GetRect

wxRect GetRect() const

Returns the current rectangle.

### wxRegionIterator::HaveRects

bool HaveRects() const

Returns `TRUE` if there are still some rectangles; otherwise returns `FALSE`.

### wxRegionIterator::Reset

void Reset()

Resets the iterator to the beginning of the rectangles.

void Reset(const wxRegion& region)

Resets the iterator to the given region.

### wxRegionIterator::operator ++

void operator ++()

Increment operator. Increments the iterator to the next region.

wxPython note: A wxPython alias for this operator is called `Next`.

### wxRegionIterator::operator bool

operator bool() const

Returns `TRUE` if there are still some rectangles; otherwise returns `FALSE`.

You can use this to test the iterator object as if it were of type bool.