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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXRegion.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                      C l i p p i n g   R e g i o n                            *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2000,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (at your option) any later version.                                           *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXREGION_H
00022 #define FXREGION_H
00023 
00024 namespace FX {
00025 
00027 class FXAPI FXRegion {
00028   friend class FXDC;
00029   friend class FXDCWindow;
00030   friend class FXWindow;
00031 private:
00032   void *region;
00033 public:
00034 
00036   FXRegion();
00037 
00039   FXRegion(const FXRegion& r);
00040 
00042   FXRegion(const FXRectangle& rect);
00043 
00045   FXRegion(FXint x,FXint y,FXint w,FXint h);
00046 
00048   FXRegion(const FXPoint* points,FXuint npoints,FXbool winding=false);
00049 
00051   FXRegion &operator=(const FXRegion& r);
00052 
00054   FXbool empty() const;
00055 
00057   FXbool contains(FXint x,FXint y) const;
00058 
00060   FXbool contains(FXint x,FXint y,FXint w,FXint h) const;
00061 
00063   FXRectangle bounds() const;
00064 
00066   FXRegion& offset(FXint dx,FXint dy);
00067 
00069   FXbool operator==(const FXRegion& r) const;
00070 
00072   FXbool operator!=(const FXRegion& r) const;
00073 
00075   FXRegion& operator+=(const FXRegion& r);
00076 
00078   FXRegion& operator*=(const FXRegion& r);
00079 
00081   FXRegion& operator-=(const FXRegion& r);
00082 
00084   FXRegion& operator^=(const FXRegion& r);
00085 
00087   FXRegion operator+(const FXRegion& r) const;
00088 
00090   FXRegion operator*(const FXRegion& r) const;
00091 
00093   FXRegion operator-(const FXRegion& r) const;
00094 
00096   FXRegion operator^(const FXRegion& r) const;
00097 
00099   void reset();
00100 
00102  ~FXRegion();
00103   };
00104 
00105 }
00106 
00107 #endif

Copyright © 1997-2011 Jeroen van der Zijp