Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

region.h

00001 00003 // This software is distributed as part of the Improla library. 00004 // Improla is a GUI framework for image processing. 00005 // 00006 // Copyright (c) 2004, B. R. Siva Chandra, India 00007 // 00008 // This program is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU General Public License 00010 // as published by the Free Software Foundation; either version 2 00011 // of the License, or (at your option) any later version. 00012 // 00013 // This program 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 General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU General Public License 00019 // along with this program; if not, write to the Free Software 00020 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 // 00022 // In case you would like to contact the author, use the following e-mail 00023 // address: sivachandra_br@yahoo.com 00025 00026 #ifndef __REGION_H__ 00027 #define __REGION_H__ 00028 00029 #include <point.h> 00030 #include <stdio.h> 00031 00032 namespace gutk 00033 { // Start of namespace brace. 00034 00037 class PointNode 00038 { 00039 public: 00042 PointNode(const gutk::Point &p); 00043 00046 PointNode(double n, double m); 00047 00050 gutk::Point point; 00051 00054 PointNode *nextPoint; 00055 00058 PointNode *prevPoint; 00059 }; 00060 00064 class Region 00065 { 00066 public: 00069 Region(void); 00070 00090 Region(const Region &r); 00091 00096 ~Region(); 00097 00101 void addPoint(const gutk::Point &p); 00102 00106 void addPoint(double n, double m); 00107 00108 /* To be implemented. 00111 void deletePoint(int l); 00112 */ 00113 00119 void pop(void); 00120 00124 gutk::Point getPoint(void); 00125 00128 void refresh(void); 00129 00132 int getSize(void); 00133 00136 gutk::Point getLastPoint(void); 00137 00144 void destroy(void); 00145 00149 void operator=(const Region &r); 00150 00151 private: 00152 int *size, *refCount; 00153 PointNode *firstPoint, *currentPoint, *lastPoint; 00154 00155 }; 00156 00157 } // End of namespace brace. 00158 00159 #endif // __REGION_H__ 00160

Generated on Mon Nov 22 11:12:41 2004 for ImprolaLib by doxygen 1.3.7