From 28de227342a663fe00dc853c84d624b582c73a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20S=C3=A1nchez?= Date: Sat, 23 Jul 2005 06:05:11 +0000 Subject: [PATCH] * src/plugins/GraphViz.py: Fix computation of landscape dimensions, especially when generating multiple sheets svn: r4964 --- gramps2/ChangeLog | 5 ++++- gramps2/src/plugins/GraphViz.py | 14 ++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 83fe60032..873abdfb5 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,8 +1,11 @@ +2005-07-23 Julio Sanchez + * src/plugins/GraphViz.py: Fix computation of landscape dimensions, + especially when generating multiple sheets + 2005-07-22 Don Allingham * src/ImgManip.py: provide path of a thumbnail * src/NavWebPage.py: add user defined header/footer, add thumbnails -2005-07-22 Julio Sanchez * src/dates/Date_es.py: fix translation table for date qualifiers * src/dates/Date_fr.py: fix translation table for date qualifiers * src/plugins/DetAncestralReport.py: show events even if they have diff --git a/gramps2/src/plugins/GraphViz.py b/gramps2/src/plugins/GraphViz.py index 8844c4863..5dd3703a5 100644 --- a/gramps2/src/plugins/GraphViz.py +++ b/gramps2/src/plugins/GraphViz.py @@ -207,10 +207,16 @@ class GraphViz: self.f.write("center=1;\n") self.f.write("margin=%3.2f;\n" % self.margin_small) self.f.write("ratio=fill;\n") - self.f.write("size=\"%3.2f,%3.2f\";\n" % ( - (self.width-self.margin*2)*self.hpages, - (self.height-self.margin*2)*self.vpages - )) + if self.orient == PAPER_LANDSCAPE: + self.f.write("size=\"%3.2f,%3.2f\";\n" % ( + (self.height-self.margin*2)*self.hpages, + (self.width-self.margin*2)*self.vpages + )) + else: + self.f.write("size=\"%3.2f,%3.2f\";\n" % ( + (self.width-self.margin*2)*self.hpages, + (self.height-self.margin*2)*self.vpages + )) self.f.write("page=\"%3.2f,%3.2f\";\n" % (self.width,self.height)) if self.orient == PAPER_LANDSCAPE: