PlPlotUtil.hh 1.06 KB
/*
 * 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_ */