jan: thuban/Thuban/UI baserenderer.py,1.11,1.12
cvs@intevation.de
cvs at intevation.de
Sun Oct 3 23:45:50 CEST 2004
Author: jan
Update of /thubanrepository/thuban/Thuban/UI
In directory doto:/tmp/cvs-serv6406
Modified Files:
baserenderer.py
Log Message:
(BaseRenderer.draw_shape_layer_incrementally): If the draw function
is for points, call it with the size as additional parameter.
BaseRenderer.draw_point_shape): Added additional, optional parameter for
the size. Compute the radius using the size.
Index: baserenderer.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/baserenderer.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- baserenderer.py 13 Jul 2004 11:07:45 -0000 1.11
+++ baserenderer.py 3 Oct 2004 21:45:48 -0000 1.12
@@ -289,7 +289,11 @@
data = shape.RawData()
else:
data = shape.Points()
- draw_func(draw_func_param, data, pen, brush)
+ if draw_func == self.draw_point_shape:
+ draw_func(draw_func_param, data, pen, brush,
+ size = group.GetProperties().GetSize())
+ else:
+ draw_func(draw_func_param, data, pen, brush)
if count % 500 == 0:
yield True
@@ -421,7 +425,7 @@
for part in points:
self.dc.DrawLines(part)
- def draw_point_shape(self, layer, points, pen, brush):
+ def draw_point_shape(self, layer, points, pen, brush, size = 5):
"""Draw a point shape from layer with the given brush and pen
The shape is given by points argument which is a the return
@@ -435,7 +439,7 @@
if not points:
return
- radius = int(round(self.resolution * 5))
+ radius = int(round(self.resolution * size))
self.dc.SetBrush(brush)
self.dc.SetPen(pen)
for part in points:
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)