59 Dimension(
const std::string& _configX,
const std::string& _configY) :
62 set(_configX, _configY);
72 operator std::string()
const;
100 void set(std::string _config);
106 void set(std::string _configX, std::string _configY);
119 m_data = _obj.m_data;
120 m_type = _obj.m_type;
127 bool operator == (
const Dimension& _obj)
const {
128 if( m_data == _obj.m_data
129 && m_type == _obj.m_type) {
137 bool operator!= (
const Dimension& _obj)
const {
138 if( m_data != _obj.m_data
139 || m_type != _obj.m_type) {
145 std::ostream& operator <<(std::ostream& _os,
enum esvg::distance _obj);
146 std::ostream& operator <<(std::ostream& _os,
const esvg::Dimension& _obj);
183 operator std::string()
const;
204 void set(
float _size,
enum distance _type);
211 void set(std::string _config);
218 float getPixel(
float _upperSize)
const;
224 m_data = _obj.m_data;
225 m_type = _obj.m_type;
233 if( m_data == _obj.m_data
234 && m_type == _obj.m_type) {
243 if( m_data != _obj.m_data
244 || m_type != _obj.m_type) {
Main esvg namespace.
Definition: Base.hpp:24
"px"
Definition: Dimension.hpp:14
"%"
Definition: Dimension.hpp:13
Dimension(const std::string &_configX, const std::string &_configY)
Constructor.
Definition: Dimension.hpp:59
"cm"
Definition: Dimension.hpp:16
const vec2 & getValue() const
get the current dimention.
Definition: Dimension.hpp:78
vec2 getPixel(const vec2 &_upperSize) const
get the current dimention in pixel
"em"
Definition: Dimension.hpp:21
"pc"
Definition: Dimension.hpp:24
Dimension()
Constructor (default :0,0 mode pixel)
distance
Definition: Dimension.hpp:12
const float & getValue() const
get the current dimention.
Definition: Dimension.hpp:189
Dimension1D(const std::string &_config)
Constructor.
Definition: Dimension.hpp:170
enum distance getType() const
Definition: Dimension.hpp:85
"in"
Definition: Dimension.hpp:19
in the dimention class we store the data as the more usefull unit (pixel) but one case need to be dyn...
Definition: Dimension.hpp:30
in the dimention class we store the data as the more usefull unit (pixel) but one case need to be dyn...
Definition: Dimension.hpp:151
"pt"
Definition: Dimension.hpp:23
"km"
Definition: Dimension.hpp:18
Dimension(const std::string &_config)
Constructor.
Definition: Dimension.hpp:49
"ex"
Definition: Dimension.hpp:22
"mm"
Definition: Dimension.hpp:17
"m"
Definition: Dimension.hpp:15
"ft"
Definition: Dimension.hpp:20