WPGBitmap.h Source File documentation

WPGBitmap.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwpg
3 * Version: MPL 2.0 / LGPLv2.1+
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * Major Contributor(s):
10 * Copyright (C) 2007 Ariya Hidayat (ariya@kde.org)
11 * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
12 *
13 * For minor contributions see the git repository.
14 *
15 * Alternatively, the contents of this file may be used under the terms
16 * of the GNU Lesser General Public License Version 2.1 or later
17 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
18 * applicable instead of those above.
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 <memory>
31
32 #include <librevenge/librevenge.h>
33
34 #include "WPGColor.h"
35
36 namespace libwpg
37 {
38
39 class WPGBitmap
40 {
41 public:
42 WPGBitmap(int width, int height, int verticalResolution, int horizontalResolution, bool verticalFlip=false, bool horizontalFlip=false);
43
44 WPGBitmap(const WPGBitmap &);
45
46 WPGBitmap &operator=(const WPGBitmap &);
47
48 ~WPGBitmap();
49
50 // return width in pixel
51 int width() const;
52
53 // return height in pixel
54 int height() const;
55
56 // return vertical resolution in pixels per inch
57 int vres() const;
58
59 // return horizontal resolution in pixels per inch
60 int hres() const;
61
62 void setPixel(int x, int y, const WPGColor &color);
63
64 const librevenge::RVNGBinaryData &getDIB() const;
65
66 private:
67 void copyFrom(const WPGBitmap &);
68
69 private:
70 class Private;
71 std::unique_ptr<Private> const d;
72 };
73
74 } // namespace libwpg
75
76 #endif // __WPGBITMAP_H__
77 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
libwpg::WPGBitmap::Private::width
int width
Definition: WPGBitmap.cpp:68
WPGBitmap.h
libwpg::WPGBitmap::Private::hRes
int hRes
Definition: WPGBitmap.cpp:71
libwpg::WPGBitmap::Private::dib
librevenge::RVNGBinaryData dib
Definition: WPGBitmap.cpp:75
libwpg::WPGBitmap::Private::hFlip
bool hFlip
Definition: WPGBitmap.cpp:73
libwpg::WPGBitmap::Private::vRes
int vRes
Definition: WPGBitmap.cpp:70
libwpg::WPGColor
Definition: WPGColor.h:35
libwpg::WPGBitmap::Private::Private
Private(int w, int h)
Definition: WPGBitmap.cpp:77
libwpg::WPGBitmap
Definition: WPGBitmap.h:40
libwpg::WPGBitmap::~WPGBitmap
~WPGBitmap()
Definition: WPGBitmap.cpp:96
libwpg_utils.h
libwpg::WPGBitmap::height
int height() const
Definition: WPGBitmap.cpp:126
WPGColor.h
libwpg::WPGBitmap::vres
int vres() const
Definition: WPGBitmap.cpp:131
libwpg::WPGBitmap::Private::vFlip
bool vFlip
Definition: WPGBitmap.cpp:72
libwpg::WPGBitmap::WPGBitmap
WPGBitmap(int width, int height, int verticalResolution, int horizontalResolution, bool verticalFlip=false, bool horizontalFlip=false)
Definition: WPGBitmap.cpp:84
libwpg::WPGBitmap::getDIB
const librevenge::RVNGBinaryData & getDIB() const
Definition: WPGBitmap.cpp:149
libwpg::WPGBitmap::Private::operator=
Private & operator=(const Private &)
libwpg::WPGBitmap::copyFrom
void copyFrom(const WPGBitmap &)
Definition: WPGBitmap.cpp:112
libwpg::WPGBitmap::d
std::unique_ptr< Private > const d
Definition: WPGBitmap.h:70
libwpg::WPGBitmap::Private::Private
Private(const Private &)
libwpg::WPGBitmap::Private::height
int height
Definition: WPGBitmap.cpp:69
libwpg::WPGBitmap::Private
Definition: WPGBitmap.cpp:66
libwpg::WPGBitmap::setPixel
void setPixel(int x, int y, const WPGColor &color)
Definition: WPGBitmap.cpp:141
WPG_DEBUG_MSG
#define WPG_DEBUG_MSG(M)
Definition: libwpg_utils.h:56
libwpg
Definition: libwpg_utils.cpp:26
libwpg::WPGBitmap::Private::pixels
std::unique_ptr< WPGColor[]> pixels
Definition: WPGBitmap.cpp:74
libwpg::WPGBitmap::operator=
WPGBitmap & operator=(const WPGBitmap &)
Definition: WPGBitmap.cpp:105
libwpg::WPGBitmap::width
int width() const
Definition: WPGBitmap.cpp:121
libwpg::WPGBitmap::hres
int hres() const
Definition: WPGBitmap.cpp:136