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,2017 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 namespace FX {
25 
26 
28 class FXAPI FXRegion {
29  friend class FXDC;
30  friend class FXDCWindow;
31  friend class FXWindow;
32 private:
33  void *region;
34 public:
35 
37  FXRegion();
38 
40  FXRegion(const FXRegion& r);
41 
43  FXRegion(const FXRectangle& rect);
44 
46  FXRegion(FXint x,FXint y,FXint w,FXint h);
47 
49  FXRegion(const FXPoint* points,FXuint npoints,FXbool winding=false);
50 
52  FXRegion &operator=(const FXRegion& r);
53 
55  FXbool empty() const;
56 
58  FXbool contains(FXint x,FXint y) const;
59 
61  FXbool contains(FXint x,FXint y,FXint w,FXint h) const;
62 
64  FXRectangle bounds() const;
65 
67  FXRegion& offset(FXint dx,FXint dy);
68 
70  FXbool operator==(const FXRegion& r) const;
71 
73  FXbool operator!=(const FXRegion& r) const;
74 
76  FXRegion& operator+=(const FXRegion& r);
77 
79  FXRegion& operator*=(const FXRegion& r);
80 
82  FXRegion& operator-=(const FXRegion& r);
83 
85  FXRegion& operator^=(const FXRegion& r);
86 
88  FXRegion operator+(const FXRegion& r) const;
89 
91  FXRegion operator*(const FXRegion& r) const;
92 
94  FXRegion operator-(const FXRegion& r) const;
95 
97  FXRegion operator^(const FXRegion& r) const;
98 
100  void reset();
101 
103  ~FXRegion();
104  };
105 
106 }
107 
108 #endif

Copyright © 1997-2016 Jeroen van der Zijp