#include <wx/region.h>

This class uses 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.
Predefined objects/pointers:
Public Member Functions | |
| wxRegion () | |
| wxRegion (wxCoord x, wxCoord y, wxCoord width, wxCoord height) | |
| wxRegion (const wxPoint &topLeft, const wxPoint &bottomRight) | |
| wxRegion (const wxRect &rect) | |
| wxRegion (const wxRegion ®ion) | |
| wxRegion (size_t n, const wxPoint *points, int fillStyle=wxODDEVEN_RULE) | |
| wxRegion (const wxBitmap &bmp) | |
| wxRegion (const wxBitmap &bmp, const wxColour &transColour, int tolerance=0) | |
| virtual | ~wxRegion () |
| virtual void | Clear () |
| wxRegionContain | Contains (wxCoord x, wxCoord y) const |
| wxRegionContain | Contains (const wxPoint &pt) const |
| wxRegionContain | Contains (wxCoord x, wxCoord y, wxCoord width, wxCoord height) const |
| wxRegionContain | Contains (const wxRect &rect) const |
| wxBitmap | ConvertToBitmap () const |
| bool | Intersect (wxCoord x, wxCoord y, wxCoord width, wxCoord height) |
| bool | Intersect (const wxRect &rect) |
| bool | Intersect (const wxRegion ®ion) |
| virtual bool | IsEmpty () const |
| bool | IsEqual (const wxRegion ®ion) const |
| bool | Subtract (const wxRect &rect) |
| bool | Subtract (const wxRegion ®ion) |
| bool | Union (wxCoord x, wxCoord y, wxCoord width, wxCoord height) |
| bool | Union (const wxRect &rect) |
| bool | Union (const wxRegion ®ion) |
| bool | Union (const wxBitmap &bmp) |
| bool | Union (const wxBitmap &bmp, const wxColour &transColour, int tolerance=0) |
| bool | Xor (wxCoord x, wxCoord y, wxCoord width, wxCoord height) |
| bool | Xor (const wxRect &rect) |
| bool | Xor (const wxRegion ®ion) |
| wxRegion & | operator= (const wxRegion ®ion) |
| void | GetBox (wxCoord &x, wxCoord &y, wxCoord &width, wxCoord &height) const |
| wxRect | GetBox () const |
| bool | Offset (wxCoord x, wxCoord y) |
| bool | Offset (const wxPoint &pt) |
| wxRegion::wxRegion | ( | ) |
Default constructor.
| wxRegion::wxRegion | ( | wxCoord | x, | |
| wxCoord | y, | |||
| wxCoord | width, | |||
| wxCoord | height | |||
| ) |
Constructs a rectangular region with the given position and size.
Constructs a rectangular region from the top left point and the bottom right point.
| wxRegion::wxRegion | ( | const wxRegion & | region | ) |
Copy constructor, uses Reference Counting.
| wxRegion::wxRegion | ( | size_t | n, | |
| const wxPoint * | points, | |||
| int | fillStyle = wxODDEVEN_RULE | |||
| ) |
Constructs a region corresponding to the polygon made of n points in the provided array. fillStyle parameter may have values wxWINDING_RULE or wxODDEVEN_RULE.
| wxRegion::wxRegion | ( | const wxBitmap & | bmp | ) |
Constructs a region using a bitmap. See Union() for more details.
Constructs a region using the non-transparent pixels of a bitmap. See Union() for more details.
| virtual wxRegion::~wxRegion | ( | ) | [virtual] |
Destructor. See reference-counted object destruction for more info.
| virtual void wxRegion::Clear | ( | ) | [virtual] |
Clears the current region.
| wxRegionContain wxRegion::Contains | ( | wxCoord | x, | |
| wxCoord | y | |||
| ) | const |
Returns a value indicating whether the given point is contained within the region.
wxOutRegion and wxInRegion. | wxRegionContain wxRegion::Contains | ( | const wxPoint & | pt | ) | const |
Returns a value indicating whether the given point is contained within the region.
wxOutRegion and wxInRegion. | wxRegionContain wxRegion::Contains | ( | wxCoord | x, | |
| wxCoord | y, | |||
| wxCoord | width, | |||
| wxCoord | height | |||
| ) | const |
Returns a value indicating whether the given rectangle is contained within the region.
| wxRegionContain wxRegion::Contains | ( | const wxRect & | rect | ) | const |
Returns a value indicating whether the given rectangle is contained within the region.
| wxBitmap wxRegion::ConvertToBitmap | ( | ) | const |
Convert the region to a black and white bitmap with the white pixels being inside the region.
| void wxRegion::GetBox | ( | wxCoord & | x, | |
| wxCoord & | y, | |||
| wxCoord & | width, | |||
| wxCoord & | height | |||
| ) | const |
Returns the outer bounds of the region.
| wxRect wxRegion::GetBox | ( | ) | const |
Returns the outer bounds of the region.
| bool wxRegion::Intersect | ( | wxCoord | x, | |
| wxCoord | y, | |||
| wxCoord | width, | |||
| wxCoord | height | |||
| ) |
Finds the intersection of this region and another, rectangular region, specified using position and size.
| bool wxRegion::Intersect | ( | const wxRect & | rect | ) |
Finds the intersection of this region and another, rectangular region.
| bool wxRegion::Intersect | ( | const wxRegion & | region | ) |
Finds the intersection of this region and another region.
| virtual bool wxRegion::IsEmpty | ( | ) | const [virtual] |
Returns true if the region is empty, false otherwise.
| bool wxRegion::IsEqual | ( | const wxRegion & | region | ) | const |
Returns true if the region is equal to, i.e. covers the same area as, another one.
| bool wxRegion::Offset | ( | wxCoord | x, | |
| wxCoord | y | |||
| ) |
Moves the region by the specified offsets in horizontal and vertical directions.
| bool wxRegion::Offset | ( | const wxPoint & | pt | ) |
Moves the region by the specified offsets in horizontal and vertical directions.
| bool wxRegion::Subtract | ( | const wxRect & | rect | ) |
Subtracts a rectangular region from this region.
| bool wxRegion::Subtract | ( | const wxRegion & | region | ) |
Subtracts a region from this region.
| bool wxRegion::Union | ( | wxCoord | x, | |
| wxCoord | y, | |||
| wxCoord | width, | |||
| wxCoord | height | |||
| ) |
Finds the union of this region and another, rectangular region, specified using position and size.
| bool wxRegion::Union | ( | const wxRect & | rect | ) |
Finds the union of this region and another, rectangular region.
| bool wxRegion::Union | ( | const wxRegion & | region | ) |
Finds the union of this region and another region.
| bool wxRegion::Union | ( | const wxBitmap & | bmp | ) |
Finds the union of this region and the non-transparent pixels of a bitmap. The bitmap's mask is used to determine transparency. If the bitmap doesn't have a mask, the bitmap's full dimensions are used.
Finds the union of this region and the non-transparent pixels of a bitmap. Colour to be treated as transparent is specified in the transColour argument, along with an optional colour tolerance value.
| bool wxRegion::Xor | ( | wxCoord | x, | |
| wxCoord | y, | |||
| wxCoord | width, | |||
| wxCoord | height | |||
| ) |
Finds the Xor of this region and another, rectangular region, specified using position and size.
| bool wxRegion::Xor | ( | const wxRect & | rect | ) |
Finds the Xor of this region and another, rectangular region.
| bool wxRegion::Xor | ( | const wxRegion & | region | ) |
Finds the Xor of this region and another region.
Assignment operator, using Reference Counting.
|
[ top ] |