-
- //# Tests
- // Does the region contain the point (x,y)?
- wxRegionContain Contains(long x, long y) const;
- // Does the region contain the point pt?
- wxRegionContain Contains(const wxPoint& pt) const;
- // Does the region contain the rectangle (x, y, w, h)?
- wxRegionContain Contains(long x, long y, long w, long h) const;
- // Does the region contain the rectangle rect?
- wxRegionContain Contains(const wxRect& rect) const;
-
-// Internal
- bool Combine(long x, long y, long width, long height, wxRegionOp op);
- bool Combine(const wxRegion& region, wxRegionOp op);
- bool Combine(const wxRect& rect, wxRegionOp op);
+ bool Ok() const { return (m_refData != NULL) ; }
+
+ //# Tests
+ // Does the region contain the point (x,y)?
+ wxRegionContain Contains(wxCoord x, wxCoord y) const;
+ // Does the region contain the point pt?
+ wxRegionContain Contains(const wxPoint& pt) const;
+ // Does the region contain the rectangle (x, y, w, h)?
+ wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h) const;
+ // Does the region contain the rectangle rect?
+ wxRegionContain Contains(const wxRect& rect) const;
+
+ // Convert the region to a B&W bitmap with the white pixels being inside
+ // the region.
+ wxBitmap ConvertToBitmap() const;
+
+ // Use the non-transparent pixels of a wxBitmap for the region to combine
+ // with this region. If the bitmap has a mask then it will be used,
+ // otherwise the colour to be treated as transparent may be specified,
+ // along with an optional tolerance value.
+ bool Union(const wxBitmap& bmp,
+ const wxColour& transColour = wxNullColour,
+ int tolerance = 0);
+
+ // Internal
+ bool Combine(wxCoord x, wxCoord y, wxCoord width, wxCoord height, wxRegionOp op);
+ bool Combine(const wxRegion& region, wxRegionOp op);
+ bool Combine(const wxRect& rect, wxRegionOp op);
+
+ // Get the internal Region handle
+ WXRegion GetXRegion() const;
+
+ // 'Naughty' functions that allow wxWindows to use a list of rects
+ // instead of the region, in certain circumstances (e.g. when
+ // making a region out of the update rectangles).
+ // These are used by wxPaintDC::wxPaintDC and wxRegionIterator::Reset.
+ bool UsingRects() const;
+ wxRect* GetRects();
+ int GetRectCount() const;
+ void SetRects(const wxRectList& rectList);
+ void SetRects(int count, const wxRect* rects);