.\" This is a wxWidgets manpage page generated from the XML docs .TH wxRegion 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxRegion \- A class representing a region .SH DESCRIPTION A wxRegion represents a simple or complex region on a device context or window. It uses reference counting, so copying and assignment operations are fast. .SH "PARENTS" wxGDIObject wxObject .SH "INCLUDE FILES" wx/region.h .SH MEMBERS .SS wxRegion () Default constructor. .SS wxRegion (wxCoord xwxCoord ywxCoord widthwxCoord height) Constructs a rectangular region with the given position and size. .SS wxRegion (const wxPoint& topLeftconst wxPoint& bottomRight) Constructs a rectangular region from the top left point and the bottom right point. .SS wxRegion (const wxRect& rect) Constructs a rectangular region a wxRect object. .SS wxRegion (const wxRegion& region) Constructs a region by copying another region. .SS wxRegion (size_t nconst wxPoint *pointsint fillStyle = wxWINDING_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 . NB: This constructor is only implemented for Win32 and GTK+ wxWidgets ports. .SS wxRegion (const wxBitmap& bmp) .SS wxRegion (const wxBitmap& bmpconst wxColour& transColourint tolerance = 0) Constructs a region using the non-transparent pixels of a bitmap. See Union for more details. .SS ~wxRegion () Destructor. .SS void Clear () Clears the current region. .SS wxRegionContain Contains (long& xlong& y) Returns a value indicating whether the given point is contained within the region. .SS wxRegionContain Contains (const wxPoint& pt) Returns a value indicating whether the given point is contained within the region. .SS wxRegionContain Contains (long& xlong& ylong& widthlong& height) Returns a value indicating whether the given rectangle is contained within the region. .SS wxRegionContain Contains (const wxRect& rect) Returns a value indicating whether the given rectangle is contained within the region. .SS wxBitmap ConvertToBitmap () Convert the region to a black and white bitmap with the white pixels being inside the region. .SS void GetBox (wxCoord& xwxCoord& ywxCoord& widthwxCoord& height) Returns the outer bounds of the region. .SS wxRect GetBox () Returns the outer bounds of the region. .SS bool Intersect (wxCoord xwxCoord ywxCoord widthwxCoord height) Finds the intersection of this region and another, rectangular region, specified using position and size. .SS bool Intersect (const wxRect& rect) Finds the intersection of this region and another, rectangular region. .SS bool Intersect (const wxRegion& region) Finds the intersection of this region and another region. .SS bool IsEmpty () Returns true if the region is empty, false otherwise. .SS bool Subtract (const wxRect& rect) Subtracts a rectangular region from this region. .SS bool Subtract (const wxRegion& region) Subtracts a region from this region. .SS bool Offset (wxCoord xwxCoord y) Moves the region by the specified offsets in horizontal and vertical directions. .SS bool Union (wxCoord xwxCoord ywxCoord widthwxCoord height) Finds the union of this region and another, rectangular region, specified using position and size. .SS bool Union (const wxRect& rect) Finds the union of this region and another, rectangular region. .SS bool Union (const wxRegion& region) Finds the union of this region and another region. .SS bool Union (const wxBitmap& bmp) Finds the union of this region and the non-transparent pixels of a bitmap. Bitmap's mask is used to determine transparency. If the bitmap doesn't have a mask, solid rectangle of bitmap's dimensions is used. .SS bool Union (const wxBitmap& bmpconst wxColour& transColourint tolerance = 0) 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. .SS bool Xor (wxCoord xwxCoord ywxCoord widthwxCoord height) Finds the Xor of this region and another, rectangular region, specified using position and size. .SS bool Xor (const wxRect& rect) Finds the Xor of this region and another, rectangular region. .SS bool Xor (const wxRegion& region) Finds the Xor of this region and another region. .SS void operator = (const wxRegion& region) Copies region by reference counting. .SH "SEE ALSO" wxGDIObject wxObject wxRegionIterator .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.