.TP
If optional flags are supplied, these consist of an underscore followed
-by any of the letters "c", "t", "b", "l", "r" or "u".
+by any of the letters "c", "t", "b", "l", "r", "u" or "i".
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
+By default, the insertion order is determined by sorting the graphs by size,
+largest to smallest. If
+the "u" flag is set, the graphs are sorted based on the non-negative integer
\fIsortv\fP attribute attached to each graph.
+The "i" flag indicates that no sorting is done, with the graphs inserted in
+input order.
.TP
.BI \-G "name\fB=\fPvalue"
Specifies attributes to be added to the resulting union graph. For
userVals = pinfo->vals;
qsort(sinfo, ng, sizeof(ainfo *), ucmpf);
}
- else {
+ else if (!(pinfo->flags & PK_INPUT_ORDER)) {
qsort(sinfo, ng, sizeof(ainfo *), acmpf);
}
if (pinfo->mode == l_array) {
if (pinfo->flags & PK_USER_VALS) {
- pinfo->vals = N_NEW(ng, unsigned char);
+ pinfo->vals = N_NEW(ng, packval_t);
for (i = 0; i < ng; i++) {
s = agget (gs[i], "sortv");
if (s && (sscanf (s, "%d", &v) > 0) && (v >= 0))
pinfo->flags |= PK_COL_MAJOR;
p++;
break;
+ case 'i' :
+ pinfo->flags |= PK_INPUT_ORDER;
+ p++;
+ break;
case 'u' :
pinfo->flags |= PK_USER_VALS;
p++;
#define PK_RIGHT_ALIGN (1 << 3)
#define PK_TOP_ALIGN (1 << 4)
#define PK_BOT_ALIGN (1 << 5)
+#define PK_INPUT_ORDER (1 << 6)
-typedef unsigned char packval_t;
+typedef unsigned int packval_t;
typedef struct {
float aspect; /* desired aspect ratio */