BMIParser.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/*
3 * This file is a part of the libzmf project.
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
10#ifndef BMIPARSER_H_INCLUDED
11#define BMIPARSER_H_INCLUDED
12
13#include <librevenge/librevenge.h>
14
15#include "libzmf_utils.h"
16
17#include "BMIHeader.h"
18#include "ZMFTypes.h"
19
20namespace libzmf
21{
22
24{
25 // disable copying
26 BMIParser(const BMIParser &other);
28
29public:
30 explicit BMIParser(const RVNGInputStreamPtr &input, librevenge::RVNGDrawingInterface *painter = 0);
31
34 bool parse();
35
39
40 const BMIHeader &header() const;
41
42private:
44
45 std::vector<uint8_t> readData(unsigned endOffset);
46
47 std::vector<Color> readColorPalette(unsigned colorDepth);
48
50 librevenge::RVNGDrawingInterface *m_painter;
51
53};
54
55}
56
57#endif // BMIPARSER_H_INCLUDED
58
59/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition BMIHeader.h:21
Definition BMIParser.h:24
Image readImage()
Parse the bitmap and convert it to PNG.
Definition BMIParser.cpp:328
BMIParser(const BMIParser &other)
BMIHeader m_header
Definition BMIParser.h:52
std::vector< Color > readColorPalette(unsigned colorDepth)
Definition BMIParser.cpp:480
BMIParser & operator=(const BMIParser &other)
const BMIHeader & header() const
Definition BMIParser.cpp:365
ColorBitmap readColorBitmap(BMIOffset offset)
Definition BMIParser.cpp:370
librevenge::RVNGDrawingInterface * m_painter
Definition BMIParser.h:50
bool parse()
Parse the bitmap and output it as a drawing doc with an inserted image.
Definition BMIParser.cpp:306
const RVNGInputStreamPtr m_input
Definition BMIParser.h:49
std::vector< uint8_t > readData(unsigned endOffset)
Definition BMIParser.cpp:458
Definition BMIHeader.cpp:14
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
Definition libzmf_utils.h:72
Definition BMITypes.h:28
Definition BMITypes.h:42
Definition ZMFTypes.h:204

Generated for libzmf by doxygen 1.9.8