X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/4c30f5939017e47c70f79df3a9f737d9ea743db5..e7bc59fe98396b7c67024911b03bf1e08728df3e:/Client/src/principal.cpp diff --git a/Client/src/principal.cpp b/Client/src/principal.cpp index 845de81..870c06a 100644 --- a/Client/src/principal.cpp +++ b/Client/src/principal.cpp @@ -799,7 +799,7 @@ void Principal::read_status_xml(const std::string &frame) 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) @@ -811,14 +811,14 @@ Gdk::Color Principal::get_rgb_from_xml(xmlNodePtr nodo) } nodo = nodo->next; } - r = 65535 * r / 255; - g = 65535 * g / 255; - b = 65535 * b / 255; + r = static_cast(65535 * (r / 255.0f)); + g = static_cast(65535 * (g / 255.0f)); + b = static_cast(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;