Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXRegion.h
1 /********************************************************************************
2 * *
3 * C l i p p i n g R e g i o n *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2000,2013 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXREGION_H
22 #define FXREGION_H
23 
24 
25 namespace FX {
26 
27 
29 class FXAPI FXRegion {
30  friend class FXDC;
31  friend class FXDCWindow;
32  friend class FXWindow;
33 private:
34  void *region;
35 public:
36 
38  FXRegion();
39 
41  FXRegion(const FXRegion& r);
42 
44  FXRegion(const FXRectangle& rect);
45 
47  FXRegion(FXint x,FXint y,FXint w,FXint h);
48 
50  FXRegion(const FXPoint* points,FXuint npoints,FXbool winding=false);
51 
53  FXRegion &operator=(const FXRegion& r);
54 
56  FXbool empty() const;
57 
59  FXbool contains(FXint x,FXint y) const;
60 
62  FXbool contains(FXint x,FXint y,FXint w,FXint h) const;
63 
65  FXRectangle bounds() const;
66 
68  FXRegion& offset(FXint dx,FXint dy);
69 
71  FXbool operator==(const FXRegion& r) const;
72 
74  FXbool operator!=(const FXRegion& r) const;
75 
77  FXRegion& operator+=(const FXRegion& r);
78 
80  FXRegion& operator*=(const FXRegion& r);
81 
83  FXRegion& operator-=(const FXRegion& r);
84 
86  FXRegion& operator^=(const FXRegion& r);
87 
89  FXRegion operator+(const FXRegion& r) const;
90 
92  FXRegion operator*(const FXRegion& r) const;
93 
95  FXRegion operator-(const FXRegion& r) const;
96 
98  FXRegion operator^(const FXRegion& r) const;
99 
101  void reset();
102 
104  ~FXRegion();
105  };
106 
107 }
108 
109 #endif

Copyright © 1997-2013 Jeroen van der Zijp