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

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

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

revision 374 by jan, Mon Jan 27 14:20:02 2003 UTC revision 394 by jonathan, Mon Feb 10 15:27:13 2003 UTC
# Line 20  from Thuban.Model.layer import SHAPETYPE Line 20  from Thuban.Model.layer import SHAPETYPE
20  from Thuban.Model.label import ALIGN_CENTER, ALIGN_TOP, ALIGN_BOTTOM, \  from Thuban.Model.label import ALIGN_CENTER, ALIGN_TOP, ALIGN_BOTTOM, \
21       ALIGN_LEFT, ALIGN_RIGHT, ALIGN_BASELINE       ALIGN_LEFT, ALIGN_RIGHT, ALIGN_BASELINE
22    
23    from Thuban.Model.classification import Classification
24    
25    
26  class MapRenderer:  class MapRenderer:
27    
# Line 77  class MapRenderer: Line 79  class MapRenderer:
79          for i in self.layer_ids(layer):          for i in self.layer_ids(layer):
80              value = None              value = None
81              shape = layer.Shape(i)              shape = layer.Shape(i)
82              field = layer.classification.field              lc = layer.classification
83                field = lc.field
84    
85              if field is not None:              if field is not None:
86                  record = layer.table.read_record(i)                  record = layer.table.read_record(i)
# Line 89  class MapRenderer: Line 92  class MapRenderer:
92              # be null, at which point this call will              # be null, at which point this call will
93              # at least retreive the NullData              # at least retreive the NullData
94              #              #
95              prop = layer.classification.getProperties(value)              prop = lc.GetProperties(value)
96    
97              if prop != old_prop:              if prop != old_prop:
98                  old_prop = prop                  old_prop = prop
# Line 97  class MapRenderer: Line 100  class MapRenderer:
100                  if shapetype == SHAPETYPE_ARC:                  if shapetype == SHAPETYPE_ARC:
101                      fill = None                      fill = None
102                  else:                  else:
103                      fill = prop['fill']                      fill = prop.GetFill()
104            
105                  if fill is None:                  if fill is None:
106                      brush = wxTRANSPARENT_BRUSH                      brush = wxTRANSPARENT_BRUSH
# Line 107  class MapRenderer: Line 110  class MapRenderer:
110                                       fill.blue * 255)                                       fill.blue * 255)
111                      brush = wxBrush(color, wxSOLID)                      brush = wxBrush(color, wxSOLID)
112            
113                  stroke = prop['stroke']                  stroke = prop.GetStroke()
114                  stroke_width = prop['stroke_width']                  stroke_width = prop.GetStrokeWidth()
115                  if stroke is None:                  if stroke is None:
116                      pen = wxTRANSPARENT_PEN                      pen = wxTRANSPARENT_PEN
117                  else:                  else:

Legend:
Removed from v.374  
changed lines
  Added in v.394

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26