WPGBitmap.h
Go to the documentation of this file.
1 /* libwpg
2  * Copyright (C) 2007 Ariya Hidayat (ariya@kde.org)
3  * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02111-1301 USA
19  *
20  * For further information visit http://libwpg.sourceforge.net
21  */
22 
23 /* "This product is not manufactured, approved, or supported by
24  * Corel Corporation or Corel Corporation Limited."
25  */
26 
27 #ifndef __WPGBITMAP_H__
28 #define __WPGBITMAP_H__
29 
30 #include "WPGColor.h"
31 #include <libwpd/libwpd.h>
32 
33 namespace libwpg
34 {
35 
36 class WPGBitmap
37 {
38 public:
39  WPGBitmap(int width, int height, int verticalResolution, int horizontalResolution, bool verticalFlip=false, bool horizontalFlip=false);
40 
41  WPGBitmap(const WPGBitmap&);
42 
43  WPGBitmap& operator=(const WPGBitmap&);
44 
45  void copyFrom(const WPGBitmap&);
46 
47  ~WPGBitmap();
48 
49  // return width in pixel
50  int width() const;
51 
52  // return height in pixel
53  int height() const;
54 
55  // return vertical resolution in pixels per inch
56  int vres() const;
57 
58  // return horizontal resolution in pixels per inch
59  int hres() const;
60 
61  void setPixel(int x, int y, const WPGColor& color);
62 
63  const ::WPXBinaryData& getDIB() const;
64 
65 private:
66  class Private;
67  Private* const d;
68 };
69 
70 } // namespace libwpg
71 
72 #endif // __WPGBITMAP_H__

Generated for libwpg by doxygen 1.8.3.1