ionflux.org | Impressum

CairoSurface.hpp

Go to the documentation of this file.
00001 #ifndef IONFLUX_TOOLS_CAIRO_SURFACE
00002 #define IONFLUX_TOOLS_CAIRO_SURFACE
00003 /* ==========================================================================
00004  * Ionflux Tools
00005  * Copyright (c) 2005 Joern P. Meier
00006  * mail@ionflux.org
00007  * --------------------------------------------------------------------------
00008  * CairoSurface.hpp                       Cairo surface.
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/ManagedObject.hpp"
00031 
00032 namespace Ionflux
00033 {
00034 
00035 namespace Tools
00036 {
00037 
00038 namespace Cairo
00039 {
00040 
00049 class Surface
00050 : public Ionflux::Tools::ManagedObject
00051 {
00052     private:
00053         
00054     protected:
00056         cairo_surface_t* cairoSurface;
00057         
00058     public:
00063         Surface();
00064         
00071         Surface(const Surface& initSurface);
00072         
00079         Surface(cairo_surface_t* initSurface);
00080         
00085         virtual ~Surface();
00086         
00097         virtual cairo_surface_t* createSimilar(cairo_content_t content, 
00098         int width, int height);
00099         
00104         virtual void reference();
00105         
00110         virtual void destroy();
00111         
00116         virtual void finish();
00117         
00126         virtual void* getUserData(const cairo_user_data_key_t* key);
00127         
00138         virtual cairo_status_t setUserData(const cairo_user_data_key_t* key, 
00139         void* user_data, cairo_destroy_func_t destroy);
00140         
00148         virtual void setDeviceOffset(double x_offset, double y_offset);
00149         
00158         virtual Surface& operator=(const Surface& newCairoSurface);
00159         
00168         virtual Surface& operator=(cairo_surface_t* newCairoSurface);
00169         
00176         virtual void setCairoSurface(cairo_surface_t* newCairoSurface);
00177         
00182         virtual cairo_surface_t* getCairoSurface() const;
00183 };
00184 
00185 }
00186 
00187 }
00188 
00189 }
00190 
00194 #endif

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