-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathlength.h
70 lines (57 loc) · 889 Bytes
/
length.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef LENGTH_H
#define LENGTH_H
#include "docx_global.h"
namespace Docx {
class DOCX_EXPORT Length
{
public:
Length();
Length(int emu);
float cm() const;
int emu() const;
float inches() const;
float mm() const;
int px() const;
int twips() const;
bool isEmpty() const;
private:
bool m_isEmpty = true;
int m_value;
};
class DOCX_EXPORT Inches
{
public:
static Length emus(float inches);
};
class DOCX_EXPORT Cm
{
public:
static Length emus(float cm);
};
class DOCX_EXPORT Emu
{
public:
static Length emus(float emu);
};
class DOCX_EXPORT Mm
{
public:
static Length emus(float mm);
};
class DOCX_EXPORT Pt
{
public:
static Length emus(float pts);
};
class DOCX_EXPORT Px
{
public:
static Length emus(float px);
};
class DOCX_EXPORT Twips
{
public:
static Length emus(float twips);
};
}
#endif // LENGTH_H