/[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 394 by jonathan, Mon Feb 10 15:27:13 2003 UTC revision 416 by jonathan, Wed Feb 19 16:53:08 2003 UTC
# Line 1  Line 1 
1  # Copyright (c) 2001, 2002 by Intevation GmbH  # Copyright (c) 2001, 2002 by Intevation GmbH
2  # Authors:  # Authors:
3  # Bernhard Herzog <[email protected]>  # Bernhard Herzog <[email protected]>
4    # Jonathan Coles <[email protected]>
5  #  #
6  # This program is free software under the GPL (>=v2)  # This program is free software under the GPL (>=v2)
7  # Read the file COPYING coming with Thuban for details.  # Read the file COPYING coming with Thuban for details.
# Line 21  from Thuban.Model.label import ALIGN_CEN Line 22  from Thuban.Model.label import ALIGN_CEN
22       ALIGN_LEFT, ALIGN_RIGHT, ALIGN_BASELINE       ALIGN_LEFT, ALIGN_RIGHT, ALIGN_BASELINE
23    
24  from Thuban.Model.classification import Classification  from Thuban.Model.classification import Classification
25    from Thuban.Model.color import Color
26    
27    
28  class MapRenderer:  class MapRenderer:
# Line 79  class MapRenderer: Line 81  class MapRenderer:
81          for i in self.layer_ids(layer):          for i in self.layer_ids(layer):
82              value = None              value = None
83              shape = layer.Shape(i)              shape = layer.Shape(i)
84              lc = layer.classification              lc = layer.GetClassification()
85              field = lc.field              field = lc.field
86    
87              if field is not None:              if field is not None:
# Line 98  class MapRenderer: Line 100  class MapRenderer:
100                  old_prop = prop                  old_prop = prop
101    
102                  if shapetype == SHAPETYPE_ARC:                  if shapetype == SHAPETYPE_ARC:
103                      fill = None                      fill = Color.None
104                  else:                  else:
105                      fill = prop.GetFill()                      fill = prop.GetFill()
106            
107                  if fill is None:                  if fill is Color.None:
108                      brush = wxTRANSPARENT_BRUSH                      brush = wxTRANSPARENT_BRUSH
109                  else:                  else:
110                      color = wxColour(fill.red * 255,                      color = wxColour(fill.red * 255,
# Line 112  class MapRenderer: Line 114  class MapRenderer:
114            
115                  stroke = prop.GetStroke()                  stroke = prop.GetStroke()
116                  stroke_width = prop.GetStrokeWidth()                  stroke_width = prop.GetStrokeWidth()
117                  if stroke is None:                  if stroke is Color.None:
118                      pen = wxTRANSPARENT_PEN                      pen = wxTRANSPARENT_PEN
119                  else:                  else:
120                      color = wxColour(stroke.red * 255,                      color = wxColour(stroke.red * 255,

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26