-.TH GVPACK 1 "8 April 2003"
+.TH GVPACK 1 "27 May 2010"
.SH NAME
gvpack \- merge and pack disjoint graphs
.SH SYNOPSIS
.BI \-m margin
]
[
+.B \-array\fI[_flags][n]\fP
+]
+[
.BI \-o outfile
]
[
Combines the graphs at the graph level. This uses more space, but prevents
parts of one graph from occurring between parts of another.
.TP
+.BI \-array\fI[_flags][n]\fP
+Combines the graphs at the graph level, placing them in an array.
+By default, the layout is done in row-major order. The number of columns
+used is roughly the square root of the number of graphs. If the optional
+integer \fIn\fP is supplied, this indicates the number of columns to use.
+.TP
+
+If optional flags are supplied, these consist of an underscore followed
+by any of the letters "c", "t", "b", "l", "r" or "u".
+If "c" is supplied, the graphs are packed in column-major order, in which
+case a final integer specifies the number of rows.
+The flags "t", "b", "l", "r" indicate that components are aligned
+along the top, bottom, left or right, respectively.
+The "u" flag indicates that the insertion order is based on the
+\fIsortv\fP attribute attached to each graph.
+.TP
.BI \-G "name\fB=\fPvalue"
Specifies attributes to be added to the resulting union graph. For
example, this can be used to specify a graph label.
starting in the upper left and going down the first column, then
down the second column, etc., until all components are used.
<P>
+ If a graph is smaller than the array cell it occupies, it is centered by default.
+ The optional flags may contain "t", "b", "l", or "r", indicating that the graphs
+ should be aligned along the top, bottom, left or right, respectively.
+ <P>
If the optional flags contains "u", this causes the insertion
order of elements in the array to be determined by user-supplied
values. Each component can specify its sort value by a
starting in the upper left and going down the first column, then
down the second column, etc., until all components are used.
<P>
+If a graph is smaller than the array cell it occupies, it is centered by default.
+The optional flags may contain "t", "b", "l", or "r", indicating that the graphs
+should be aligned along the top, bottom, left or right, respectively.
+<P>
If the optional flags contains "u", this causes the insertion
order of elements in the array to be determined by user-supplied
values. Each component can specify its sort value by a
ip = sinfo[i];
idx = ip->index;
bb = gs[idx];
- places[idx].x = (widths[c] + widths[c+1] - bb.UR.x - bb.LL.x)/2.0;
- places[idx].y = (heights[r] + heights[r+1] - bb.UR.y - bb.LL.y)/2.0;
+ if (pinfo->flags & PK_LEFT_ALIGN)
+ places[idx].x = widths[c];
+ else if (pinfo->flags & PK_RIGHT_ALIGN)
+ places[idx].x = widths[c+1] - (bb.UR.x - bb.LL.x);
+ else
+ places[idx].x = (widths[c] + widths[c+1] - bb.UR.x - bb.LL.x)/2.0;
+ if (pinfo->flags & PK_TOP_ALIGN)
+ places[idx].y = heights[r] - (bb.UR.y - bb.LL.y);
+ else if (pinfo->flags & PK_BOT_ALIGN)
+ places[idx].y = heights[r+1];
+ else
+ places[idx].y = (heights[r] + heights[r+1] - bb.UR.y - bb.LL.y)/2.0;
INC(rowMajor,c,r);
}
pinfo->flags |= PK_USER_VALS;
p++;
break;
+ case 't' :
+ pinfo->flags |= PK_TOP_ALIGN;
+ p++;
+ break;
+ case 'b' :
+ pinfo->flags |= PK_BOT_ALIGN;
+ p++;
+ break;
+ case 'l' :
+ pinfo->flags |= PK_LEFT_ALIGN;
+ p++;
+ break;
+ case 'r' :
+ pinfo->flags |= PK_RIGHT_ALIGN;
+ p++;
+ break;
default :
more = 0;
break;
*/
typedef enum { l_undef, l_clust, l_node, l_graph, l_array, l_aspect } pack_mode;
-#define PK_COL_MAJOR 1
-#define PK_USER_VALS 2
+#define PK_COL_MAJOR (1 << 0)
+#define PK_USER_VALS (1 << 1)
+#define PK_LEFT_ALIGN (1 << 2)
+#define PK_RIGHT_ALIGN (1 << 3)
+#define PK_TOP_ALIGN (1 << 4)
+#define PK_BOT_ALIGN (1 << 5)
typedef unsigned char packval_t;