55 #define COLOR_SCHEME_NODE_CLASS 1
62 #ifdef COLOR_SCHEME_NODE_TYPE
63 static const char *deg_debug_colors[] = {
95 #ifdef COLOR_SCHEME_NODE_TYPE
96 static const int deg_debug_node_type_color_map[][2] = {
119 #ifdef COLOR_SCHEME_NODE_CLASS
149 #ifdef COLOR_SCHEME_NODE_TYPE
151 for (pair = deg_debug_node_type_color_map; (*pair)[0] >= 0; pair++) {
169 std::stringstream &ss)
173 ss <<
"<TD>" << name <<
"</TD>";
174 ss <<
"<TD BGCOLOR=\"" << color <<
"\"></TD>";
185 std::stringstream ss;
187 ss << R
"(<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">)";
188 ss << "<TR><TD COLSPAN=\"2\"><B>Legend</B></TD></TR>";
190 #ifdef COLOR_SCHEME_NODE_CLASS
199 #ifdef COLOR_SCHEME_NODE_TYPE
201 for (pair = deg_debug_node_type_color_map; (*pair)[0] >= 0; pair++) {
218 const char *color_default =
"black";
219 const char *color_modified =
"orangered4";
220 const char *color_update =
"dodgerblue3";
221 const char *color = color_default;
226 color = color_modified;
229 color = color_update;
233 dot_attributes.
set(
"color", color);
240 float penwidth_default = 1.0f;
241 float penwidth_modified = 4.0f;
242 float penwidth_update = 4.0f;
243 float penwidth = penwidth_default;
248 penwidth = penwidth_modified;
251 penwidth = penwidth_update;
255 dot_attributes.
set(
"penwidth", penwidth);
260 const char *defaultcolor =
"gainsboro";
262 const char *fillcolor = color_index < 0 ?
265 dot_attributes.
set(
"fillcolor", fillcolor);
270 const char *color_default =
"black";
271 const char *color_cyclic =
"red4";
272 const char *color_godmode =
"blue4";
273 const char *color = color_default;
275 color = color_cyclic;
278 color = color_godmode;
285 const char *style_default =
"solid";
286 const char *style_no_flush =
"dashed";
287 const char *style_flush_user_only =
"dotted";
288 const char *style = style_default;
290 style = style_no_flush;
293 style = style_flush_user_only;
300 const char *shape_default =
"normal";
301 const char *shape_no_cow =
"box";
302 const char *shape = shape_default;
308 !op_to->owner->need_tag_cow_before_update()) {
309 shape = shape_no_cow;
324 base_style =
"striped";
330 dot_attributes.
set(
"style", base_style);
333 dot_attributes.
set(
"style", base_style);
336 dot_attributes.
set(
"style", base_style +
",rounded");
455 float penwidth = 2.0f;
457 const Node *head = rel->
to;
475 if (tail_cluster !=
nullptr && tail_cluster->
contains(dot_head)) {
479 if (head_cluster !=
nullptr && head_cluster->
contains(dot_tail)) {
491 if (time_source !=
nullptr) {
507 if (time_source !=
nullptr) {
525 digraph.
set_rankdir(dot::Attr_rankdir::LeftToRight);
540 fprintf(fp,
"%s", dot_string.c_str());
struct Depsgraph Depsgraph
These structs are the foundation for all linked lists in the library system.
void set(StringRef key, StringRef value)
void set_parent_cluster(Cluster *new_parent)
bool contains(Node &node) const
DirectedEdge & new_edge(NodePort from, NodePort to)
std::string to_dot_string() const
Cluster & new_cluster(StringRef label="")
Node & new_node(StringRef label)
void set_rankdir(Attr_rankdir rankdir)
void set_parent_cluster(Cluster *cluster)
void DEG_debug_relations_graphviz(const Depsgraph *graph, FILE *fp, const char *label)
static int deg_debug_node_color_index(const Node *node)
@ RELATION_FLAG_FLUSH_USER_EDIT_ONLY
static void deg_debug_graphviz_graph_relations(DotExportContext &ctx, const Depsgraph *graph)
static void deg_debug_graphviz_legend(DotExportContext &ctx)
static float deg_debug_graphviz_node_label_size
static const char * deg_debug_colors_light[]
static void deg_debug_graphviz_node(DotExportContext &ctx, const Node *node, dot::Cluster *parent_cluster)
static const int deg_debug_max_colors
static float deg_debug_graphviz_graph_label_size
static void deg_debug_graphviz_graph_nodes(DotExportContext &ctx, const Depsgraph *graph)
DepsNodeFactory * type_get_factory(const NodeType type)
static void deg_debug_graphviz_node_single(DotExportContext &ctx, const Node *node, dot::Cluster *parent_cluster)
static void deg_debug_graphviz_node_fillcolor(const Node *node, dot::Attributes &dot_attributes)
static void deg_debug_graphviz_relation_style(const Relation *rel, dot::DirectedEdge &edge)
static void deg_debug_graphviz_relation_arrowhead(const Relation *rel, dot::DirectedEdge &edge)
static void deg_debug_graphviz_legend_color(const char *name, const char *color, std::stringstream &ss)
static dot::Cluster & deg_debug_graphviz_node_cluster_create(DotExportContext &ctx, const Node *node, dot::Cluster *parent_cluster)
static void deg_debug_graphviz_node_relations(DotExportContext &ctx, const Node *node)
@ DEPSOP_FLAG_NEEDS_UPDATE
@ DEPSOP_FLAG_DIRECTLY_MODIFIED
static const char * deg_debug_graphviz_fontname
static void deg_debug_graphviz_relation_color(const Relation *rel, dot::DirectedEdge &edge)
static void deg_debug_graphviz_node_style(DotExportContext &ctx, const Node *node, dot::Attributes &dot_attributes)
static void deg_debug_graphviz_node_penwidth(DotExportContext &ctx, const Node *node, dot::Attributes &dot_attributes)
static void deg_debug_graphviz_node_color(DotExportContext &ctx, const Node *node, dot::Attributes &dot_attributes)
Vector< OperationNode * > operations
TimeSourceNode * find_time_source() const
dot::DirectedGraph & digraph
Map< const Node *, dot::Cluster * > clusters_map
Map< const Node *, dot::Node * > nodes_map
Map< ComponentIDKey, ComponentNode * > components
virtual NodeClass get_class() const
virtual string identifier() const override
ccl_device_inline float dot(const float2 &a, const float2 &b)