use doublecirlce for endpoint nodes

This commit is contained in:
c9s 2014-05-20 23:48:35 +08:00
parent a706b48f14
commit 7ba0efc60c
6 changed files with 13 additions and 7 deletions

View file

@ -1,6 +1,9 @@
/* config.h. Generated from config.h.in by configure. */ /* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */ /* config.h.in. Generated from configure.ac by autoheader. */
/* "whether graphviz is enable" */
#define ENABLE_GRAPHVIZ test "x$enable_graphviz" = "xyes"
/* Define to 1 if you have the <dlfcn.h> header file. */ /* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1 #define HAVE_DLFCN_H 1

View file

@ -1,5 +1,8 @@
/* config.h.in. Generated from configure.ac by autoheader. */ /* config.h.in. Generated from configure.ac by autoheader. */
/* "whether graphviz is enable" */
#undef ENABLE_GRAPHVIZ
/* Define to 1 if you have the <dlfcn.h> header file. */ /* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H #undef HAVE_DLFCN_H

View file

@ -45,6 +45,7 @@ AC_ARG_ENABLE(debug,
AM_CONDITIONAL(ENABLE_DEBUG, test "x$enable_debug" = "xyes") AM_CONDITIONAL(ENABLE_DEBUG, test "x$enable_debug" = "xyes")
AM_CONDITIONAL(ENABLE_GRAPHVIZ, test "x$enable_graphviz" = "xyes") AM_CONDITIONAL(ENABLE_GRAPHVIZ, test "x$enable_graphviz" = "xyes")
AC_DEFINE(ENABLE_GRAPHVIZ, test "x$enable_graphviz" = "xyes", "whether graphviz is enable")
PKG_CHECK_MODULES(DEPS, [libpcre check]) PKG_CHECK_MODULES(DEPS, [libpcre check])

View file

@ -4,7 +4,6 @@
* *
* Distributed under terms of the MIT license. * Distributed under terms of the MIT license.
*/ */
#ifndef R3_GVC_H #ifndef R3_GVC_H
#define R3_GVC_H #define R3_GVC_H

View file

@ -12,7 +12,7 @@
#include "r3_gvc.h" #include "r3_gvc.h"
char * node_id_str(int id) { static char * node_id_str(int id) {
char * name = malloc(sizeof(char) * 20); char * name = malloc(sizeof(char) * 20);
sprintf(name, "#%d", id); sprintf(name, "#%d", id);
return name; return name;
@ -30,12 +30,10 @@ void r3_tree_build_ag_nodes(Agraph_t * g, Agnode_t * ag_parent_node, node * n, i
agn_child = agnode(g, node_id_str(node_cnt) , 1); agn_child = agnode(g, node_id_str(node_cnt) , 1);
agn_edge = agedge(g, ag_parent_node, agn_child, 0, 1); agn_edge = agedge(g, ag_parent_node, agn_child, 0, 1);
agsafeset(agn_edge, "label", e->pattern, ""); agsafeset(agn_edge, "label", e->pattern, "");
if (e->child && e->child->endpoint) {
agsafeset(agn_child, "shape", "doublecircle", "");
}
r3_tree_build_ag_nodes(g, agn_child, e->child, node_cnt); r3_tree_build_ag_nodes(g, agn_child, e->child, node_cnt);
// agedgeattr(agn_edge, "label", e->pattern );
// agattr(gr, AGEDGE, "style","invis");
// agattr(agn_edge, AGEDGE, "label", "test");
} }
} }

View file

@ -391,3 +391,5 @@
1400600045,13977543.80 1400600045,13977543.80
1400600057,13901438.41 1400600057,13901438.41
1400600326,14049707.03 1400600326,14049707.03
1400600677,13384789.38
1400600754,13649118.34

1 1400242718 5649455.80
391 1400600045 13977543.80
392 1400600057 13901438.41
393 1400600326 14049707.03
394 1400600677 13384789.38
395 1400600754 13649118.34