From 8994bd90a4a3aebb5e989731e5567527537e2098 Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 25 Sep 2007 18:05:39 +0000 Subject: [PATCH] undo previous change as it breaks too much --- doc/info/attrs.html | 3 ++- lib/common/emit.c | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/info/attrs.html b/doc/info/attrs.html index c76ab20ad..837dca898 100644 --- a/doc/info/attrs.html +++ b/doc/info/attrs.html @@ -1805,7 +1805,8 @@ the given types. dimensions (width and height) of the viewport image, in points, in the original graph drawing. - The optional Z is the zoom factor. By default, Z is 1. + The optional Z is the zoom factor, i.e., the resulting image will be + Z*W by Z*H points in size. By default, Z is 1. The optional pair (x,y) give the position in the graph, in points, of the center of the viewport. To focus on a particular node, (x,y) can be set to the diff --git a/lib/common/emit.c b/lib/common/emit.c index b20bc11f2..71e6db278 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -637,7 +637,8 @@ static void init_job_pagination(GVJ_t * job, graph_t *g) pointf centering = {0.0, 0.0}; /* centering offset - points */ /* unpaginated image size - in points - in graph orientation */ - imageSize = job->view; + imageSize.x = job->zoom*job->view.x; + imageSize.y = job->zoom*job->view.y; /* rotate imageSize to page orientation */ if (job->rotation) @@ -2036,7 +2037,9 @@ static void init_job_viewport(GVJ_t * job, graph_t * g) /* job->view gives port size in graph units, unscaled or rotated * job->focus gives center of port in graph units - * job->zoom gives scaling factor for viewpor + * job->zoom gives scaling factor for viewport in device; that is, + * final image will be (view.x*zoom, view.y*zoom) (possibly + * rotated). */ job->view.x = X; job->view.y = Y; -- 2.40.0