From: ellson Date: Tue, 10 Feb 2009 16:15:48 +0000 (+0000) Subject: temporarily commit Sandip's version - for posterity - but I think I need to revert X-Git-Tag: LAST_LIBGRAPH~32^2~2556 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b9290f39dc6dfe4c9eb780579d8940d09f135bf4;p=graphviz temporarily commit Sandip's version - for posterity - but I think I need to revert to the old format to avaid unnecessary script and documentation breakage --- diff --git a/plugin/core/gvrender_core_tk.c b/plugin/core/gvrender_core_tk.c index f76ee667c..a52fde3b2 100644 --- a/plugin/core/gvrender_core_tk.c +++ b/plugin/core/gvrender_core_tk.c @@ -59,60 +59,78 @@ static void tkgen_print_color(GVJ_t * job, gvcolor_t color) static void tkgen_print_tags(GVJ_t *job) { - char *ObjType; + char *ObjType, *ObjPart; unsigned int ObjId; obj_state_t *obj = job->obj; + int ObjHandle; switch (obj->emit_state) { case EMIT_NDRAW: ObjType = "node"; + ObjPart = "shape"; ObjId = AGID(obj->u.n); + ObjHandle = obj->u.n->handle; break; case EMIT_NLABEL: - ObjType = "node label"; + ObjType = "node"; + ObjPart = "label"; ObjId = AGID(obj->u.n); + ObjHandle = obj->u.n->handle; break; case EMIT_EDRAW: case EMIT_TDRAW: case EMIT_HDRAW: ObjType = "edge"; + ObjPart = "shape"; ObjId = AGID(obj->u.e); + ObjHandle = obj->u.e->handle; break; case EMIT_ELABEL: case EMIT_TLABEL: case EMIT_HLABEL: - ObjType = "edge label"; + ObjType = "edge"; + ObjPart = "label"; ObjId = AGID(obj->u.e); + ObjHandle = obj->u.e->handle; break; case EMIT_GDRAW: ObjType = "graph"; + ObjPart = "shape"; ObjId = -1; /* hack! */ + ObjHandle = obj->u.g->handle; break; case EMIT_GLABEL: + ObjType = "graph"; + ObjPart = "label"; ObjType = "graph label"; ObjId = -1; /* hack! */ + ObjHandle = obj->u.g->handle; break; case EMIT_CDRAW: ObjType = "cluster"; + ObjPart = "shape"; #ifndef WITH_CGRAPH ObjId = obj->u.sg->meta_node->id; #else ObjId = AGID(obj->u.sg); #endif + ObjHandle = obj->u.sg->handle; break; case EMIT_CLABEL: - ObjType = "cluster label"; + ObjType = "cluster"; + ObjPart = "label"; #ifndef WITH_CGRAPH ObjId = obj->u.sg->meta_node->id; #else ObjId = AGID(obj->u.sg); #endif + ObjHandle = obj->u.sg->handle; break; default: assert (0); break; } - gvprintf(job, " -tags {id%ld %s}", ObjId, ObjType); + gvprintf(job, " -tags {id%d %s%d %s %s}", ObjId, ObjType, ObjHandle, ObjType, ObjPart); } static void tkgen_canvas(GVJ_t * job)