BRegion¶
A BRegion
object comprises a set of rectangles in a two-dimensional coordinate system.
The rectangles needn’t overlap; a single BRegion
can contain a little rectangle way
down there, a big one over yonder, and another that lives somewhere to the left of Baden Baden.
You define and modify the contains of a region through Set()
,
Include()
, Exclude()
, and
IntersectWith()
. You can examine a region’s rectangle’s through
RectAt()
, but note that the object coalesces rectangles when it can, so the
rectangles that you retrieve may not match the ones that you passed in.
Warning
The BRegion
class is designed to be used with coordinates with integral values only; if
any non-integral values are used in the BRegion
, functions in the class may behave
unpredictably.
BRegion
objects can be allocted on the stack.