MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / build_node_style

Function build_node_style

src/graphviz.cpp:86–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86std::string build_node_style(const graphviz_node_style& node_style)
87{
88 std::ostringstream ss;
89 ss << "style=\"" << node_style.style << "\" ";
90
91 if(is_hex_color(node_style.fillcolor))
92 ss << "fillcolor=\"" << node_style.fillcolor << "\" ";
93 else
94 ss << "fillcolor=" << node_style.fillcolor << " ";
95
96 if(is_hex_color(node_style.fontcolor))
97 ss << "fontcolor=\"" << node_style.fontcolor << "\" ";
98 else
99 ss << "fontcolor=" << node_style.fontcolor << " ";
100
101 if(node_style.bordercolor.empty() or is_hex_color(node_style.bordercolor))
102 ss << "color=\"" << node_style.bordercolor << "\" ";
103 else
104 ss << "color=" << node_style.bordercolor << " ";
105
106 ss << "shape=" << node_style.shape << " ";
107 ss << "fontname=" << node_style.fontname;
108 return ss.str();
109}
110
111std::string get_graph_color(const instruction_ref& ins)
112{

Callers 1

print_graphMethod · 0.85

Calls 3

is_hex_colorFunction · 0.85
emptyMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected