Gdk::Color Principal::get_rgb_from_xml(xmlNodePtr nodo)
{
- unsigned r,g,b;
+ gushort r,g,b;
while (nodo != NULL) {
if (nodo->type == XML_ELEMENT_NODE) {
if (xmlStrcmp(nodo->name, BAD_CAST"r")==0)
}
nodo = nodo->next;
}
- r = 65535 * r / 255;
- g = 65535 * g / 255;
- b = 65535 * b / 255;
+ r = static_cast<gushort>(65535 * (r / 255.0f));
+ g = static_cast<gushort>(65535 * (g / 255.0f));
+ b = static_cast<gushort>(65535 * (b / 255.0f));
Gdk::Color c;
c.set_rgb(r,g,b);
-
return c;
}
+
float Principal::get_float_from_xml(xmlNodePtr nodo)
{
float tmp = -1;