#define GNEW(t) (t*)malloc(sizeof(t))
+/* #define NEW_XDOT */
+
typedef enum {
FORMAT_DOT,
FORMAT_CANON,
penwidth[EMIT_HLABEL] = 1;
}
+#ifdef NEW_XDOT
+/* xdot_begin_anchor:
+ * The encoding of which fields are present assumes that one of the fields is present,
+ * so there is never a 0 after the H.
+ */
+static void xdot_begin_anchor(GVJ_t * job, char *href, char *tooltip, char *target, char *id)
+{
+ emit_state_t emit_state = job->obj->emit_state;
+ char buf[3]; /* very small integer */
+ unsigned int flags = 0;
+
+ agxbput(xbufs[emit_state], "H ");
+ if (href)
+ flags |= 1;
+ if (tooltip)
+ flags |= 2;
+ if (target)
+ flags |= 4;
+ sprintf (buf, "%d ", flags);
+ agxbput(xbufs[emit_state], buf);
+ if (href)
+ xdot_str (job, "", href);
+ if (tooltip)
+ xdot_str (job, "", tooltip);
+ if (target)
+ xdot_str (job, "", target);
+}
+
+static void xdot_end_anchor(GVJ_t * job)
+{
+ emit_state_t emit_state = job->obj->emit_state;
+
+ agxbput(xbufs[emit_state], "H 0 ");
+}
+#endif
+
static void xdot_end_cluster(GVJ_t * job)
{
Agraph_t* cluster_g = job->obj->u.sg;
xdot_end_node,
0, /* xdot_begin_edge */
xdot_end_edge,
- 0, /* xdot_begin_anchor */
- 0, /* xdot_end_anchor */
+#ifdef NEW_XDOT
+ xdot_begin_anchor,
+ xdot_end_anchor,
+#else
+ 0, /* xdot_begin_anchor */
+ 0, /* xdot_end_anchor */
+#endif
0, /* xdot_begin_label */
0, /* xdot_end_label */
xdot_textpara,
};
gvrender_features_t render_features_xdot = {
- GVRENDER_DOES_TRANSFORM, /* not really - uses raw graph coords */ /* flags */
+ GVRENDER_DOES_TRANSFORM /* not really - uses raw graph coords */
+ | GVRENDER_DOES_MAPS
+ | GVRENDER_DOES_TARGETS
+ | GVRENDER_DOES_TOOLTIPS, /* flags */
0., /* default pad - graph units */
NULL, /* knowncolors */
0, /* sizeof knowncolors */