Bad public color on *.gv
grekon opened this issue · comments
Sometimes we have lines like this: "OnFilterScriptInit" [color="nan, nan, 1", shape=octagon];
Something wrong here:
auto time = node->info()->GetSelfTime();
auto ratio = static_cast(time) / static_cast(max_time);
// We encode color in HSB.
auto hsb = std::make_tuple(
(1.0 - ratio) * 0.6, // hue
(ratio * 0.9) + 0.1, // saturation
1.0 // brightness
);
temporary correct to:
auto ratio = 0;
if (max_time != 0)
ratio = static_cast(time) / static_cast(max_time);
because can't understand syntax of
graph.Traverse( [ &max_time, this, &graph ](const std::shared_ptr &node) {
Is it a unusual function call or function declaration? I see such thing at a the first time.
P.S. I have set gv font size from 10.8 to 20 for me, as at my huge gamemode the letters was undereadble.
This seems outdated.