}
}
-typedef struct {
- adjust_mode mode;
- char *attrib;
- char *print;
-} adjust_data;
static adjust_data adjustMode[] = {
{AM_NONE, "", ""},
{AM_VOR, "", "Voronoi"},
{AM_PORTHOXY, "porthoxy", "xy pseudo-orthogonal constraints"},
{AM_PORTHOYX, "porthoyx", "yx pseudo-orthogonal constraints"},
{AM_COMPRESS, "compress", "compress"},
+ {AM_VPSC, "vpsc", "vpsc"},
+ {AM_IPSEP, "ipsep", "ipsep"},
{AM_NONE, 0, 0}
};
return adjustMode + 1;
}
+adjust_data *graphAdjustMode(graph_t *G)
+{
+ return (getAdjustMode (agget(G, "overlap")));
+}
+
/* removeOverlapAs:
* Use flag value to determine if and how to remove
* node overlaps.
AM_NONE, AM_VOR, AM_COMPRESS,
AM_SCALE, AM_NSCALE, AM_SCALEXY, AM_PUSH, AM_PUSHPULL,
AM_ORTHO, AM_ORTHO_YX, AM_ORTHOXY, AM_ORTHOYX,
- AM_PORTHO, AM_PORTHO_YX, AM_PORTHOXY, AM_PORTHOYX
+ AM_PORTHO, AM_PORTHO_YX, AM_PORTHOXY, AM_PORTHOYX,
+ AM_VPSC, AM_IPSEP
} adjust_mode;
+typedef struct {
+ adjust_mode mode;
+ char *attrib;
+ char *print;
+} adjust_data;
+
extern double expFactor(graph_t * G);
extern int adjustNodes(graph_t * G);
extern void normalize(graph_t * g);
extern int removeOverlapAs(graph_t*, char*);
extern int cAdjust(graph_t *, int);
extern int scAdjust(graph_t *, int);
+ extern adjust_data *graphAdjustMode(graph_t *G);
#ifdef __cplusplus
}
#ifdef IPSEPCOLA
else {
char* str;
+ adjust_data* am;
ipsep_options opt;
pointf nsize[nv];
cluster_data *cs = (cluster_data*)cluster_map(mg,g);
fprintf(stderr,"Generating DiG-CoLa Edge Constraints...\n");
}
else opt.diredges = 0;
- str = agget(g, "overlapconstraints");
- if (mapbool(str)) {
+ am = graphAdjustMode (g);
+ if (am->mode == AM_IPSEP) {
opt.noverlap = 1;
if(Verbose)
fprintf(stderr,"Generating Non-overlap Constraints...\n");
- } else if (str && !strncasecmp(str,"post",4)) {
+ } else if (am->mode == AM_VPSC) {
opt.noverlap = 2;
if(Verbose)
fprintf(stderr,"Removing overlaps as postprocess...\n");