[DEV] add debug in shaper
This commit is contained in:
parent
01ca0392fe
commit
03232752f1
@ -622,11 +622,38 @@ bool ewol::compositing::Shaper::hasSources() {
|
|||||||
const etk::Color<float>& ewol::compositing::Shaper::getColor(int32_t _id) {
|
const etk::Color<float>& ewol::compositing::Shaper::getColor(int32_t _id) {
|
||||||
static const etk::Color<float> errorValue(0,0,0,0);
|
static const etk::Color<float> errorValue(0,0,0,0);
|
||||||
if (m_colorProperty == nullptr) {
|
if (m_colorProperty == nullptr) {
|
||||||
|
EWOL_WARNING("nullptr of m_colorProperty ==> return #0000 for id " << _id);
|
||||||
return errorValue;
|
return errorValue;
|
||||||
}
|
}
|
||||||
return m_colorProperty->get(_id);
|
return m_colorProperty->get(_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t ewol::compositing::Shaper::requestColor(const std::string& _name) {
|
||||||
|
if (m_colorProperty == nullptr) {
|
||||||
|
EWOL_WARNING("nullptr of m_colorProperty ==> return -1 for name " << _name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return m_colorProperty->request(_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t ewol::compositing::Shaper::requestConfig(const std::string& _name) {
|
||||||
|
if (m_config == nullptr) {
|
||||||
|
EWOL_WARNING("nullptr of m_config ==> return -1 for name " << _name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return m_config->request(_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
double ewol::compositing::Shaper::getConfigNumber(int32_t _id) {
|
||||||
|
if ( _id == -1
|
||||||
|
|| m_config == nullptr) {
|
||||||
|
EWOL_WARNING("nullptr of m_config ==> return 0.0 for id " << _id);
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
return m_config->getNumber(_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace etk {
|
namespace etk {
|
||||||
template<> std::string to_string<ewol::compositing::Shaper>(const ewol::compositing::Shaper& _obj) {
|
template<> std::string to_string<ewol::compositing::Shaper>(const ewol::compositing::Shaper& _obj) {
|
||||||
return _obj.getSource();
|
return _obj.getSource();
|
||||||
@ -642,4 +669,3 @@ namespace etk {
|
|||||||
return from_string(_variableRet, etk::to_string(_value));
|
return from_string(_variableRet, etk::to_string(_value));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -231,12 +231,7 @@ namespace ewol {
|
|||||||
* @param[in] _name Name of the element requested
|
* @param[in] _name Name of the element requested
|
||||||
* @return The Id of the color
|
* @return The Id of the color
|
||||||
*/
|
*/
|
||||||
int32_t requestColor(const std::string& _name) {
|
int32_t requestColor(const std::string& _name);
|
||||||
if (m_colorProperty == nullptr) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return m_colorProperty->request(_name);
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* @brief Get The color associated at an ID.
|
* @brief Get The color associated at an ID.
|
||||||
* @param[in] _id Id of the color
|
* @param[in] _id Id of the color
|
||||||
@ -249,24 +244,13 @@ namespace ewol {
|
|||||||
* @param[in] _name Name of the element requested
|
* @param[in] _name Name of the element requested
|
||||||
* @return The Id of the element
|
* @return The Id of the element
|
||||||
*/
|
*/
|
||||||
int32_t requestConfig(const std::string& _name) {
|
int32_t requestConfig(const std::string& _name);
|
||||||
if (m_config == nullptr) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return m_config->request(_name);
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* @brief Get The number associated at an ID.
|
* @brief Get The number associated at an ID.
|
||||||
* @param[in] _id Id of the parameter
|
* @param[in] _id Id of the parameter
|
||||||
* @return the requested number.
|
* @return the requested number.
|
||||||
*/
|
*/
|
||||||
double getConfigNumber(int32_t _id) {
|
double getConfigNumber(int32_t _id);
|
||||||
if ( _id == -1
|
|
||||||
|| m_config == nullptr) {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
return m_config->getNumber(_id);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Set activate state of the element
|
* @brief Set activate state of the element
|
||||||
|
Loading…
x
Reference in New Issue
Block a user