BMITypes.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 BMITYPES_H_INCLUDED
11#define BMITYPES_H_INCLUDED
12
13#include "libzmf_utils.h"
14#include "ZMFTypes.h"
15#include <vector>
16
17 namespace libzmf
18{
19
20 enum class BMIStreamType
21{
22 UNKNOWN,
23 BITMAP,
24 END_OF_FILE
25};
26
27 struct BMIOffset
28{
29 BMIStreamType type;
30 uint32_t start;
31 uint32_t end;
32
33 BMIOffset()
34 : type(BMIStreamType::UNKNOWN), start(0), end(0)
35 { }
36};
37
38 bool operator==(const BMIOffset &lhs, const BMIOffset &rhs);
39 bool operator!=(const BMIOffset &lhs, const BMIOffset &rhs);
40
41 struct ColorBitmap
42{
43 uint32_t width;
44 uint32_t height;
45 std::vector<Color> data;
46
47 ColorBitmap()
48 : width(0), height(0), data()
49 { }
50};
51
52}
53
54#endif // BMITYPES_H_INCLUDED
55
56/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
ZMFTypes.h
libzmf_utils.h
libzmf
Definition: BMIHeader.cpp:14
libzmf::operator==
bool operator==(const BMIOffset &lhs, const BMIOffset &rhs)
Definition: BMITypes.cpp:15
libzmf::operator!=
bool operator!=(const BMIOffset &lhs, const BMIOffset &rhs)
Definition: BMITypes.cpp:20
libzmf::BMIStreamType
BMIStreamType
Definition: BMITypes.h:21
libzmf::BMIStreamType::END_OF_FILE
@ END_OF_FILE
libzmf::BMIStreamType::UNKNOWN
@ UNKNOWN
libzmf::BMIStreamType::BITMAP
@ BITMAP
libzmf::BMIOffset
Definition: BMITypes.h:28
libzmf::BMIOffset::start
uint32_t start
Definition: BMITypes.h:30
libzmf::BMIOffset::end
uint32_t end
Definition: BMITypes.h:31
libzmf::BMIOffset::BMIOffset
BMIOffset()
Definition: BMITypes.h:33
libzmf::BMIOffset::type
BMIStreamType type
Definition: BMITypes.h:29
libzmf::ColorBitmap
Definition: BMITypes.h:42
libzmf::ColorBitmap::data
std::vector< Color > data
Definition: BMITypes.h:45
libzmf::ColorBitmap::ColorBitmap
ColorBitmap()
Definition: BMITypes.h:47
libzmf::ColorBitmap::width
uint32_t width
Definition: BMITypes.h:43
libzmf::ColorBitmap::height
uint32_t height
Definition: BMITypes.h:44