00001 /* Pixel buffer manager. 00002 * Copyright (C) 2010 Francois Galea <fgalea@free.fr> 00003 * 00004 * This file is part of Freezer. 00005 * 00006 * Freezer is free software: you can redistribute it and/or modify it under 00007 * the terms of the GNU Lesser General Public License as published by the 00008 * Free Software Foundation, either version 3 of the License, or (at your 00009 * option) any later version. 00010 * 00011 * Freezer is distributed in the hope that it will be useful, but WITHOUT 00012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00014 * License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public License 00017 * along with Freezer. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 /* 00020 * frz_pixbuf.hpp - pixel buffer manager for the Freezer animation system 00021 * by François Galea <fgalea@free.fr> 00022 */ 00023 00024 #ifndef _FRZ_PIXBUF_HPP_ 00025 #define _FRZ_PIXBUF_HPP_ 00026 00027 #include <cstdlib> 00028 #include <iostream> 00029 #include <stdint.h> 00030 00031 namespace Frz { 00032 00038 class Pixbuf 00039 { 00040 protected: 00042 int width; 00044 int height; 00046 int pitch; 00048 uint32_t * pixbuf; 00049 00050 public: 00057 Pixbuf(int w, int h, bool allocPixbuf = false); 00059 virtual ~Pixbuf(); 00066 void saveBitmap(const char *filename); 00067 }; 00068 00069 }; // namespace Frz 00070 00071 #endif
1.6.3