- DECLARE_DYNAMIC_CLASS(wxRegion);
-
- public:
-
- wxRegion( long x, long y, long w, long h );
- wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight );
- wxRegion( const wxRect& rect );
- wxRegion(void);
- ~wxRegion(void);
-
- inline wxRegion( const wxRegion& r ): wxGDIObject()
- { Ref(r); }
- inline wxRegion& operator = ( const wxRegion& r )
- { Ref(r); return (*this); }
-
- void Clear(void);
-
- bool Union( long x, long y, long width, long height );
+public:
+ wxRegion() { }
+
+ wxRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h )
+ {
+ InitRect(x, y, w, h);
+ }
+
+ wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight )
+ {
+ InitRect(topLeft.x, topLeft.y,
+ bottomRight.x - topLeft.x, bottomRight.y - topLeft.y);
+ }
+
+ wxRegion( const wxRect& rect )
+ {
+ InitRect(rect.x, rect.y, rect.width, rect.height);
+ }
+
+ wxRegion( size_t n, const wxPoint *points, int fillStyle = wxODDEVEN_RULE );
+
+ wxRegion( const wxBitmap& bmp)
+ {
+ Union(bmp);
+ }
+ wxRegion( const wxBitmap& bmp,
+ const wxColour& transColour, int tolerance = 0)
+ {
+ Union(bmp, transColour, tolerance);
+ }
+
+ ~wxRegion();
+
+ bool Ok() const { return m_refData != NULL; }
+
+ bool operator == ( const wxRegion& region ) const;
+ bool operator != ( const wxRegion& region ) const { return !(*this == region); }
+
+ void Clear();
+
+ bool Offset( wxCoord x, wxCoord y );
+
+ bool Union( wxCoord x, wxCoord y, wxCoord width, wxCoord height );