ionflux.org | Impressum

CairoPath.hpp

Go to the documentation of this file.
00001 #ifndef IONFLUX_TOOLS_CAIRO_PATH
00002 #define IONFLUX_TOOLS_CAIRO_PATH
00003 /* ==========================================================================
00004  * Ionflux Tools
00005  * Copyright (c) 2005 Joern P. Meier
00006  * mail@ionflux.org
00007  * --------------------------------------------------------------------------
00008  * Path.hpp                          Cairo path.
00009  * ==========================================================================
00010  * 
00011  * This file is part of Ionflux Tools.
00012  * 
00013  * Ionflux Tools is free software; you can redistribute it and/or modify it
00014  * under the terms of the GNU General Public License as published by the 
00015  * Free Software Foundation; either version 2 of the License, or (at your 
00016  * option) any later version.
00017  * 
00018  * Ionflux Tools is distributed in the hope that it will be useful, but 
00019  * WITHOUT ANY WARRANTY; without even the implied warranty of 
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00021  * General Public License for more details.
00022  * 
00023  * You should have received a copy of the GNU General Public License along 
00024  * with Ionflux Tools; if not, write to the Free Software Foundation, Inc.,
00025  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00026  * 
00027  * ========================================================================== */
00028 
00029 #include "cairo.h"
00030 #include "ionflux/ObjectPool.hpp"
00031 #include "ionflux/CairoPathIterator.hpp"
00032 
00033 namespace Ionflux
00034 {
00035 
00036 namespace Tools
00037 {
00038 
00039 namespace Cairo
00040 {
00041 
00042 class PathIterator;
00043 
00052 class Path
00053 : public Ionflux::Tools::ManagedObject
00054 {
00055     private:
00056         
00057     protected:
00059         Ionflux::Tools::ObjectPool pool;
00061         std::vector<PathData*> pathData;
00063         cairo_path_t* cairoPath;
00064         
00069         virtual void initPathData();
00070         
00075         virtual void clearPathData();
00076         
00077     public:
00078         
00083         Path();
00084         
00091         Path(const Path& initPath);
00092         
00099         Path(cairo_path_t* initPath);
00100         
00105         virtual ~Path();
00106         
00111         virtual void destroy();
00112         
00119         virtual cairo_status_t getStatus();
00120         
00127         virtual cairo_path_data_t* getData();
00128         
00138         virtual PathData* getDataElement(unsigned int elementIndex);
00139         
00146         virtual unsigned int getNumData();
00147         
00154         virtual PathIterator begin();
00155         
00162         virtual PathIterator end();
00163         
00172         virtual Path& operator=(const Path& newCairoPath);
00173         
00182         virtual Path& operator=(cairo_path_t* newCairoPath);
00183         
00190         virtual void setCairoPath(cairo_path_t* newCairoPath);
00191         
00196         virtual cairo_path_t* getCairoPath() const;
00197 };
00198 
00199 }
00200 
00201 }
00202 
00203 }
00204 
00208 #endif

Generated on Tue Mar 14 20:58:29 2006 for Ionflux Tools Class Library (iftools) by  doxygen 1.4.6