I am reporting a minor problem when I recover the background color (RGB string) of the nodes ("interior color" property).
I can read the interior color, but SMILE returns a different color, both on Windows as Linux.
Fortunatelly, I could trace the problem (I think!), so I wrote an example.
The first code window contains the xml data for the variable (only the relevant stuff).
The second contains the code.
Code: Select all
<node id="Animals">
<name>Animals</name>
<interior color="6789ab" />
</node>
Code: Select all
#include "smile.h"
#include <iostream>
int main() {
using namespace std;
DSL_network net;
const char *file = "/home/thalesl/projetos/CTEEP/gestin/unix/example.xdsl";
net.ReadFile(file, DSL_XDSL_FORMAT);
int nodeId = net.FindNode("Animals");
DSL_node *node = net.GetNode(nodeId);
cout << "Returned color (hex): " << hex << node->Info().Screen().color << endl;
cout << "Expected color (hex): " << "6789ab" << endl;
return 0;
}
/*
Returned color (hex): ab8967
Expected color (hex): 6789ab
*/
Did someone face this problem too?
Best Regards,
Thales Lange.