WPGBitmap.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00002 /* libwpg
00003  * Version: MPL 2.0 / LGPLv2.1+
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * Major Contributor(s):
00010  * Copyright (C) 2007 Ariya Hidayat (ariya@kde.org)
00011  * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
00012  *
00013  * For minor contributions see the git repository.
00014  *
00015  * Alternatively, the contents of this file may be used under the terms
00016  * of the GNU Lesser General Public License Version 2.1 or later
00017  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
00018  * applicable instead of those above.
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__
00073 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */