/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/baserenderer.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/baserenderer.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2376 by bh, Tue Jul 13 11:07:45 2004 UTC revision 2377 by jan, Sun Oct 3 21:45:48 2004 UTC
# Line 289  class BaseRenderer: Line 289  class BaseRenderer:
289                  data = shape.RawData()                  data = shape.RawData()
290              else:              else:
291                  data = shape.Points()                  data = shape.Points()
292              draw_func(draw_func_param, data, pen, brush)              if draw_func == self.draw_point_shape:
293                     draw_func(draw_func_param, data, pen, brush,
294                               size = group.GetProperties().GetSize())
295                else:
296                     draw_func(draw_func_param, data, pen, brush)
297              if count % 500 == 0:              if count % 500 == 0:
298                  yield True                  yield True
299    
# Line 421  class BaseRenderer: Line 425  class BaseRenderer:
425          for part in points:          for part in points:
426              self.dc.DrawLines(part)              self.dc.DrawLines(part)
427    
428      def draw_point_shape(self, layer, points, pen, brush):      def draw_point_shape(self, layer, points, pen, brush, size = 5):
429          """Draw a point shape from layer with the given brush and pen          """Draw a point shape from layer with the given brush and pen
430    
431          The shape is given by points argument which is a the return          The shape is given by points argument which is a the return
# Line 435  class BaseRenderer: Line 439  class BaseRenderer:
439          if not points:          if not points:
440              return              return
441    
442          radius = int(round(self.resolution * 5))          radius = int(round(self.resolution * size))
443          self.dc.SetBrush(brush)          self.dc.SetBrush(brush)
444          self.dc.SetPen(pen)          self.dc.SetPen(pen)
445          for part in points:          for part in points:

Legend:
Removed from v.2376  
changed lines
  Added in v.2377

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26