[DEV] add debug on dimention
This commit is contained in:
parent
810abe02bc
commit
11515a82f5
2
external/etk
vendored
2
external/etk
vendored
@ -1 +1 @@
|
|||||||
Subproject commit b75f2ea69853af387d92374a0cd56fedf766ddbf
|
Subproject commit 7dca8979c6548a6d0f355c2c33535c3a553ef8a0
|
@ -79,13 +79,17 @@ ewol::Dimension::Dimension(void) :
|
|||||||
// notinh to do ...
|
// notinh to do ...
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Dimension::Dimension(const vec2& _size, ewol::Dimension::distance_te _type)
|
ewol::Dimension::Dimension(const vec2& _size, ewol::Dimension::distance_te _type) :
|
||||||
|
m_data(0,0),
|
||||||
|
m_type(ewol::Dimension::Pixel)
|
||||||
{
|
{
|
||||||
Set(_size, _type);
|
Set(_size, _type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Dimension::Set(etk::UString _config)
|
void ewol::Dimension::Set(etk::UString _config)
|
||||||
{
|
{
|
||||||
|
m_data.setValue(0,0);
|
||||||
|
m_type = ewol::Dimension::Pixel;
|
||||||
distance_te type = ewol::Dimension::Pixel;
|
distance_te type = ewol::Dimension::Pixel;
|
||||||
if (_config.EndWith("%",false)==true) {
|
if (_config.EndWith("%",false)==true) {
|
||||||
type = ewol::Dimension::Pourcent;
|
type = ewol::Dimension::Pourcent;
|
||||||
@ -111,9 +115,13 @@ void ewol::Dimension::Set(etk::UString _config)
|
|||||||
} else if (_config.EndWith("m",false)==true) {
|
} else if (_config.EndWith("m",false)==true) {
|
||||||
type = ewol::Dimension::Meter;
|
type = ewol::Dimension::Meter;
|
||||||
_config.Remove(_config.Size()-1, 1);
|
_config.Remove(_config.Size()-1, 1);
|
||||||
|
} else {
|
||||||
|
EWOL_CRITICAL("Can not parse dimention : \"" << _config << "\"");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
vec2 tmp = _config;
|
vec2 tmp = _config;
|
||||||
Set(tmp, type);
|
Set(tmp, type);
|
||||||
|
EWOL_ERROR(" config dimention : \"" << _config << "\" ==> " << *this );
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Dimension::~Dimension(void)
|
ewol::Dimension::~Dimension(void)
|
||||||
|
@ -50,12 +50,12 @@ namespace ewol
|
|||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
* @param[in] _config dimension configuration.
|
* @param[in] _config dimension configuration.
|
||||||
*/
|
*/
|
||||||
Dimension(const etk::UString& _config) { Set(_config); };
|
Dimension(const etk::UString& _config) : m_data(0,0),m_type(ewol::Dimension::Pixel) { Set(_config); };
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
* @param[in] _config dimension configuration.
|
* @param[in] _config dimension configuration.
|
||||||
*/
|
*/
|
||||||
Dimension(const char* _config) { Set(_config); };
|
Dimension(const char* _config) : m_data(0,0),m_type(ewol::Dimension::Pixel) { Set(_config); };
|
||||||
/**
|
/**
|
||||||
* @brief Destructor
|
* @brief Destructor
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user