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 wx.PaintEvent for an example of use.
See also
Default constructor. |
|
An alias for |
|
Returns the height value for the current region. |
|
Returns the current rectangle. |
|
An alias for |
|
Returns the width value for the current region. |
|
Returns the x value for the current region. |
|
Returns the y value for the current region. |
|
Returns |
|
Move the iterator to the next rectangle in the region. |
|
Resets the iterator to the beginning of the rectangles. |
|
Returns |
|
Returns |
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
wx.
RegionIterator
(Object)¶Possible constructors:
RegionIterator() -> None
RegionIterator(region : Region) -> None
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.
__init__
(self, *args, **kw)¶__init__ (self)
Default constructor.
None
__init__ (self, region : Region)
Creates an iterator object given a region.
region (wx.Region) –
None
GetHeight
(self)¶Returns the height value for the current region.
int
GetWidth
(self)¶Returns the width value for the current region.
int
GetX
(self)¶Returns the x value for the current region.
int
GetY
(self)¶Returns the y value for the current region.
int
HaveRects
(self)¶Returns True
if there are still some rectangles; otherwise returns False
.
bool
Next
(self)¶Move the iterator to the next rectangle in the region.
None
Reset
(self, *args, **kw)¶Reset (self)
Resets the iterator to the beginning of the rectangles.
None
Reset (self, region : Region)
Resets the iterator to the given region.
region (wx.Region) –
None
__bool__
(self)¶Returns True
while there are still rectangles available in the iteration.
int
__nonzero__
(self)¶Returns True
while there are still rectangles available in the iteration.
int