ionflux.org | Impressum

CairoImageSurface.hpp

Go to the documentation of this file.
00001 #ifndef IONFLUX_TOOLS_CAIRO_IMAGESURFACE
00002 #define IONFLUX_TOOLS_CAIRO_IMAGESURFACE
00003 /* ==========================================================================
00004  * Ionflux Tools
00005  * Copyright (c) 2005 Joern P. Meier
00006  * mail@ionflux.org
00007  * --------------------------------------------------------------------------
00008  * CairoImageSurface.hpp                  Cairo image 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 "ionflux/CairoSurface.hpp"
00030 
00031 namespace Ionflux
00032 {
00033 
00034 namespace Tools
00035 {
00036 
00037 namespace Cairo
00038 {
00039 
00048 class ImageSurface
00049 : public Surface
00050 {
00051     private:
00052         
00053     protected:
00054         
00055     public:
00060         ImageSurface();
00061         
00068         ImageSurface(const ImageSurface& initSurface);
00069         
00076         ImageSurface(cairo_surface_t* initSurface);
00077         
00086         ImageSurface(cairo_format_t format, int width, int height);
00087         
00098         ImageSurface(unsigned char* data, cairo_format_t format, int width, int 
00099         height, int stride);
00100         
00107         ImageSurface(const std::string& pngFilename);
00108         
00116         ImageSurface(cairo_read_func_t pngReadFunc, void* closure);
00117         
00122         virtual ~ImageSurface();
00123         
00132         virtual cairo_status_t writeToPng(const std::string& pngFilename);
00133         
00143         virtual cairo_status_t writeToPngStream(cairo_write_func_t write_func, 
00144         void* closure);
00145         
00152         virtual int getWidth();
00153         
00160         virtual int getHeight();
00161         
00170         virtual ImageSurface& operator=(const ImageSurface& newCairoSurface);
00171         
00180         virtual ImageSurface& operator=(cairo_surface_t* newCairoSurface);
00181 };
00182 
00183 }
00184 
00185 }
00186 
00187 }
00188 
00192 #endif

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