PlPlotUtil.hh
1.06 KB
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
/*
* PlPlotUtil.hh
*
* Created on: 22 apr. 2016
* Author: AKKA
*/
#ifndef PLPLOTUTIL_HH_
#define PLPLOTUTIL_HH_
#include <memory>
#include <vector>
#include "Font.hh"
#include "Label.hh"
#include "Page.hh"
namespace plot {
class PlPlotUtil {
public:
static const float DEFAULT_CHARACTER_SIZE;
//Fraction of title character height
static const float LINE_SPACE_TITLE;
/**
* @brief Set font to plPlot.
* @return
*/
static void setPlFont(const Font& font, std::vector<Font::Style> *styles = NULL);
/**
* @brief Calculate character height and width.
* @return Returns size of character where first element is width and second height.
*/
static CharSize getCharacterSizeInPlPage(Page* pPage);
static PLINT getPlFontFamily(const Font& font);
static PLFLT getPlFontScaleFactor(const Font& font);
static PLFLT getPlFontDef(const Font& font);
static PLINT getPlFontStyle(const std::vector<Font::Style>& styles);
static PLINT getPlFontWeight(const std::vector<Font::Style>& styles);
};
} /* namespace plot */
#endif /* PLPLOTUTIL_HH_ */