]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/region.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
19 #include "wx/gdiobj.h"
20 #include "wx/gdicmn.h"
22 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
34 wxOutRegion
= 0, wxPartRegion
= 1, wxInRegion
= 2
37 // So far, for internal use only
39 wxRGN_AND
, // Creates the intersection of the two combined regions.
40 wxRGN_COPY
, // Creates a copy of the region identified by hrgnSrc1.
41 wxRGN_DIFF
, // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2.
42 wxRGN_OR
, // Creates the union of two combined regions.
43 wxRGN_XOR
// Creates the union of two combined regions except for any overlapping areas.
46 //-----------------------------------------------------------------------------
48 //-----------------------------------------------------------------------------
50 class wxRegion
: public wxGDIObject
52 DECLARE_DYNAMIC_CLASS(wxRegion
);
56 wxRegion( long x
, long y
, long w
, long h
);
57 wxRegion( const wxPoint
& topLeft
, const wxPoint
& bottomRight
);
58 wxRegion( const wxRect
& rect
);
62 inline wxRegion( const wxRegion
& r
)
64 inline wxRegion
& operator = ( const wxRegion
& r
)
65 { Ref(r
); return (*this); }
69 bool Union( long x
, long y
, long width
, long height
);
70 bool Union( const wxRect
& rect
);
71 bool Union( const wxRegion
& region
);
73 bool Intersect( long x
, long y
, long width
, long height
);
74 bool Intersect( const wxRect
& rect
);
75 bool Intersect( const wxRegion
& region
);
77 bool Subtract( long x
, long y
, long width
, long height
);
78 bool Subtract( const wxRect
& rect
);
79 bool Subtract( const wxRegion
& region
);
81 bool Xor( long x
, long y
, long width
, long height
);
82 bool Xor( const wxRect
& rect
);
83 bool Xor( const wxRegion
& region
);
85 void GetBox( long& x
, long& y
, long&w
, long &h
) const;
86 wxRect
GetBox(void) const ;
88 bool Empty(void) const;
90 wxRegionContain
Contains( long x
, long y
) const;
91 wxRegionContain
Contains( long x
, long y
, long w
, long h
) const;
95 GdkRegion
*GetRegion(void) const;