00001 /* libwpg 00002 * Copyright (C) 2007 Ariya Hidayat (ariya@kde.org) 00003 * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Library General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Library General Public 00016 * License along with this library; if not, write to the 00017 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02111-1301 USA 00019 * 00020 * For further information visit http://libwpg.sourceforge.net 00021 */ 00022 00023 /* "This product is not manufactured, approved, or supported by 00024 * Corel Corporation or Corel Corporation Limited." 00025 */ 00026 00027 #ifndef __WPGBITMAP_H__ 00028 #define __WPGBITMAP_H__ 00029 00030 #include "WPGColor.h" 00031 #include <libwpd/libwpd.h> 00032 00033 namespace libwpg 00034 { 00035 00036 class WPGBitmap 00037 { 00038 public: 00039 WPGBitmap(int width, int height, int verticalResolution, int horizontalResolution, bool verticalFlip=false, bool horizontalFlip=false); 00040 00041 WPGBitmap(const WPGBitmap&); 00042 00043 WPGBitmap& operator=(const WPGBitmap&); 00044 00045 void copyFrom(const WPGBitmap&); 00046 00047 ~WPGBitmap(); 00048 00049 // return width in pixel 00050 int width() const; 00051 00052 // return height in pixel 00053 int height() const; 00054 00055 // return vertical resolution in pixels per inch 00056 int vres() const; 00057 00058 // return horizontal resolution in pixels per inch 00059 int hres() const; 00060 00061 void setPixel(int x, int y, const WPGColor& color); 00062 00063 const ::WPXBinaryData& getDIB() const; 00064 00065 private: 00066 class Private; 00067 Private* const d; 00068 }; 00069 00070 } // namespace libwpg 00071 00072 #endif // __WPGBITMAP_H__