DependencyGraph: Fix colors and unflatten

This commit is contained in:
Stefan Tröger
2017-01-31 06:23:07 +01:00
committed by wmayer
parent aaea43603e
commit 25df3c549d
2 changed files with 30 additions and 12 deletions

View File

@@ -471,9 +471,14 @@ void Document::exportGraphviz(std::ostream& out) const
auto graph = parent ? GraphList[parent] : &DepList;
auto& sub = graph->create_subgraph();
GraphList[cs] = ⊂
get_property(sub, graph_name) = getClusterName(cs);
std::stringstream stream;
//build random color string
std::stringstream stream;
stream << "#" << std::setfill('0') << std::setw(2)<< std::hex << distribution(seed)
<< std::setfill('0') << std::setw(2)<< std::hex << distribution(seed)
<< std::setfill('0') << std::setw(2)<< std::hex << distribution(seed) << 80;
std::string result(stream.str());
get_property(sub, graph_graph_attribute)["bgcolor"] = result;
get_property(sub, graph_graph_attribute)["style"] = "rounded,filled";