]> granicus.if.org Git - graphviz/commitdiff
Fix bug 1057; also fix bug where the user can't specify a different
authorerg <devnull@localhost>
Sat, 23 Dec 2006 00:10:55 +0000 (00:10 +0000)
committererg <devnull@localhost>
Sat, 23 Dec 2006 00:10:55 +0000 (00:10 +0000)
page size and use centering; still not sure that pageOffset is computed
correctly, but it is only used now in hpglgen.

lib/common/emit.c

index 71fd16e6e680b9784f9871dbc441cb33524abb35..7c15cd2e3f0e52536c33fb1e741f229d59d029e4 100644 (file)
@@ -586,10 +586,6 @@ static void init_job_pagination(GVJ_t * job, graph_t *g)
        pageSize.x = gvc->pageSize.x - 2 * margin.x;
        pageSize.y = gvc->pageSize.y - 2 * margin.y;
 
-       /* we don't want graph page to exceed its bounding box */
-       pageSize.x = MIN(pageSize.x, imageSize.x);
-       pageSize.y = MIN(pageSize.y, imageSize.y);
-
        if (pageSize.x < EPSILON)
            job->pagesArraySize.x = 1;
        else {
@@ -618,6 +614,8 @@ static void init_job_pagination(GVJ_t * job, graph_t *g)
            pageSize.y = job->render.features->default_pagesize.y - 2*margin.y;
            if (pageSize.y < 0.)
                pageSize.y = 0.;
+           if (job->rotation)
+               pageSize = exch_xyf(pageSize);
        }
        else
            pageSize.x = pageSize.y = 0.;