]> granicus.if.org Git - graphviz/commitdiff
increase pageBox size to include margins so that objects in margins overlap
authorellson <devnull@localhost>
Sat, 26 Feb 2005 04:00:33 +0000 (04:00 +0000)
committerellson <devnull@localhost>
Sat, 26 Feb 2005 04:00:33 +0000 (04:00 +0000)
when paging

lib/common/emit.c

index 3d3ffab6668ef1c528668b3f803128be97bdc4d4..c6608f74719d18d0beb51a6e29f836d25eaf5e3b 100644 (file)
@@ -399,6 +399,11 @@ static void setup_page(GVC_t * gvc, graph_t * g)
     job->pageBox.UR.x = job->pageBox.LL.x + job->pageSize.x;
     job->pageBox.UR.y = job->pageBox.LL.y + job->pageSize.y;
 
+    /* increase pageBox to include margins so that overlapping nodes and edges
+       are drawn in the margins of each page */
+    job->pageBox.LL = sub_pointfs(job->pageBox.LL,job->margin);
+    job->pageBox.UR = add_pointfs(job->pageBox.UR,job->margin);
+
     /* establish pageOffset to be applied, in graph coordinates */
     if (job->rotation == 0) {
        job->pageOffset.x =  -(job->pagesArrayElem.x)    * job->pageSize.x;