Public Member Functions | |
| Region () | |
| Initializes a region. The region will have no rects, and its bound will be invalid. | |
| Region (const Region ®ion) | |
| Initializes a region to be a copy of another. | |
| Region (const Rect rect) | |
| Initializes a region to contain a Rect. | |
| virtual | ~Region () |
| Frees the allocated memory. | |
| Region & | operator= (const Region &from) |
| Modifies the region to be a copy of the given Region. | |
| Rect | Frame () const |
| Returns the bounds of the region. | |
| clipping_rect | FrameInt () const |
| Returns the bounds of the region as a clipping_rect (which has integer coordinates). | |
| Rect | RectAt (int index) |
| Returns the regions's Rect at the given index. | |
| clipping_rect | RectAtInt (int index) |
| Returns the regions's clipping_rect at the given index. | |
| int | CountRects () |
| Counts the region rects. | |
| void | Set (Rect newBounds) |
| Set the region to contain just the given Rect. | |
| void | Set (clipping_rect newBounds) |
| Set the region to contain just the given clipping_rect. | |
| bool | Intersects (Rect r) const |
| Check if the region has any area in common with the given Rect. | |
| bool | Intersects (clipping_rect r) const |
| Check if the region has any area in common with the given clipping_rect. | |
| bool | Contains (Point pt) const |
| Check if the region contains the given Point. | |
| bool | Contains (int x, int y) |
| Check if the region contains the given coordinates. | |
| void | PrintToStream () const |
| Prints the Region to stdout. | |
| void | OffsetBy (int dh, int dv) |
| Offsets all region's rects, and bounds by the given values. | |
| void | MakeEmpty () |
| Empties the region, so that it doesn't include any rect, and invalidates its bounds. | |
| void | Include (Rect r) |
| Modifies the region, so that it includes the given Rect. | |
| void | Include (clipping_rect r) |
| Modifies the region, so that it includes the given clipping_rect. | |
| void | Include (const Region *) |
| Modifies the region, so that it includes the area of the given region. | |
| void | Exclude (Rect r) |
| Modifies the region, excluding the area represented by the given Rect. | |
| void | Exclude (clipping_rect r) |
| Modifies the region, excluding the area represented by the given clipping_rect. | |
| void | Exclude (const Region *) |
| Modifies the region, excluding the area contained in the given Region. | |
| void | IntersectWith (const Region *) |
| Modifies the region, so that it will contain just the area in common with the given Region. | |
Friends | |
| class | RegionSupport |
| Region::Region | ( | ) |
Initializes a region. The region will have no rects, and its bound will be invalid.
| Region::Region | ( | const Region & | region | ) |
Initializes a region to be a copy of another.
| region | The region to copy. |
| Region::Region | ( | const Rect | rect | ) |
| Region::~Region | ( | ) | [virtual] |
Frees the allocated memory.
| Rect Region::Frame | ( | ) | const |
| clipping_rect Region::FrameInt | ( | ) | const |
Returns the bounds of the region as a clipping_rect (which has integer coordinates).
| Rect Region::RectAt | ( | int | index | ) |
| clipping_rect Region::RectAtInt | ( | int | index | ) |
Returns the regions's clipping_rect at the given index.
| index | The index (zero based) of the wanted rectangle. |
| int Region::CountRects | ( | ) |
Counts the region rects.
| void Region::Set | ( | Rect | newBounds | ) |
| void Region::Set | ( | clipping_rect | newBounds | ) |
| bool Region::Intersects | ( | Rect | rect | ) | const |
| bool Region::Intersects | ( | clipping_rect | rect | ) | const |
Check if the region has any area in common with the given clipping_rect.
| rect | The clipping_rect to check the region against to. |
| bool Region::Contains | ( | Point | pt | ) | const |
| bool Region::Contains | ( | int | x, | |
| int | y | |||
| ) |
Check if the region contains the given coordinates.
| x | The coordinate of the point to be checked. | |
| y | The coordinate of the point to be checked. |
| void Region::PrintToStream | ( | ) | const |
Prints the Region to stdout.
| void Region::OffsetBy | ( | int | dh, | |
| int | dv | |||
| ) |
Offsets all region's rects, and bounds by the given values.
| dh | The horizontal offset. | |
| dv | The vertical offset. |
| void Region::MakeEmpty | ( | ) |
Empties the region, so that it doesn't include any rect, and invalidates its bounds.
| void Region::Include | ( | Rect | rect | ) |
| void Region::Include | ( | clipping_rect | rect | ) |
Modifies the region, so that it includes the given clipping_rect.
| rect | The clipping_rect to be included by the region. |
| void Region::Include | ( | const Region * | region | ) |
Modifies the region, so that it includes the area of the given region.
| region | The region to be included. |
| void Region::Exclude | ( | Rect | rect | ) |
| void Region::Exclude | ( | clipping_rect | rect | ) |
Modifies the region, excluding the area represented by the given clipping_rect.
| rect | The clipping_rect to be excluded. |
| void Region::Exclude | ( | const Region * | region | ) |
| void Region::IntersectWith | ( | const Region * | region | ) |
friend class RegionSupport [friend] |
1.5.1-p1