bh: thuban/Thuban/UI view.py, 1.62, 1.62.2.1 renderer.py, 1.49, 1.49.2.1

cvs@intevation.de cvs at intevation.de
Mon Dec 13 20:02:08 CET 2004


Author: bh

Update of /thubanrepository/thuban/Thuban/UI
In directory doto:/tmp/cvs-serv14102/Thuban/UI

Modified Files:
      Tag: thuban-1-0-branch
	view.py renderer.py 
Log Message:
Backport from HEAD: Make sure the region used to determine which
shapes are visible actually matches the region on the printed
page.  If this isn't done properly some shapes might not be
printed.
Fixes RT #2692

* Thuban/UI/view.py (MapPrintout.draw_on_dc): The region for the
renderer has to be at the same position as the mapregion

* Thuban/UI/renderer.py (ExportRenderer.RenderMap): self.region
has to be moved by (self.shiftx, self.shifty) too.


Index: view.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/view.py,v
retrieving revision 1.62
retrieving revision 1.62.2.1
diff -u -d -r1.62 -r1.62.2.1
--- view.py	17 Feb 2004 13:14:49 -0000	1.62
+++ view.py	13 Dec 2004 19:02:06 -0000	1.62.2.1
@@ -94,7 +94,7 @@
         canvas_scale = self.canvas.scale
         x, y, width, height = self.region
         renderer = PrinterRenderer(dc, self.map, scale, offset,
-                                   region = (0, 0,
+                                   region = (mapregion[0], mapregion[1],
                                              (width/canvas_scale)*scale,
                                              (height/canvas_scale)*scale),
                                    resolution = resy,

Index: renderer.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/renderer.py,v
retrieving revision 1.49
retrieving revision 1.49.2.1
diff -u -d -r1.49 -r1.49.2.1
--- renderer.py	11 Nov 2003 18:16:42 -0000	1.49
+++ renderer.py	13 Dec 2004 19:02:06 -0000	1.49.2.1
@@ -1,4 +1,4 @@
-# Copyright (c) 2001, 2002, 2003 by Intevation GmbH
+# Copyright (c) 2001, 2002, 2003, 2004 by Intevation GmbH
 # Authors:
 # Bernhard Herzog <bh at intevation.de>
 # Jonathan Coles <jonathan at intevation.de>
@@ -235,6 +235,7 @@
         self.shifty = (mmaxy - mminy)*0.5 - (ury - lly)*0.5
 
         self.offset = (offx+self.shiftx, offy+self.shifty)
+        self.region = (llx + self.shiftx, lly + self.shifty, urx, ury)
 
         # Draw the map
         self.dc.BeginDrawing()





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)