/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/layer.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/layer.py

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

revision 529 by jonathan, Wed Mar 12 19:55:24 2003 UTC revision 610 by jonathan, Fri Apr 4 13:56:59 2003 UTC
# Line 16  from Thuban import _ Line 16  from Thuban import _
16  import shapelib, shptree  import shapelib, shptree
17    
18  from messages import LAYER_PROJECTION_CHANGED, LAYER_LEGEND_CHANGED, \  from messages import LAYER_PROJECTION_CHANGED, LAYER_LEGEND_CHANGED, \
19       LAYER_VISIBILITY_CHANGED       LAYER_VISIBILITY_CHANGED, LAYER_CHANGED
20    
21  from color import Color  from color import Color
22    
# Line 107  class Layer(BaseLayer): Line 107  class Layer(BaseLayer):
107      """      """
108    
109      def __init__(self, title, filename, projection = None,      def __init__(self, title, filename, projection = None,
110                   fill = Color.None,                   fill = Color.Transparent,
111                   stroke = Color.Black,                   stroke = Color.Black,
112                   lineWidth = 1,                   lineWidth = 1,
113                   visible = 1):                   visible = 1):
# Line 118  class Layer(BaseLayer): Line 118  class Layer(BaseLayer):
118          projection -- the projection object. Its Inverse method is          projection -- the projection object. Its Inverse method is
119                 assumed to map the layer's coordinates to lat/long                 assumed to map the layer's coordinates to lat/long
120                 coordinates                 coordinates
121          fill -- the fill color or Color.None if the shapes are not filled          fill -- the fill color or Color.Transparent if the shapes are
122          stroke -- the stroke color or Color.None if the shapes are not stroked                  not filled
123            stroke -- the stroke color or Color.Transparent if the shapes
124                    are not stroked
125          visible -- boolean. If true the layer is visible.          visible -- boolean. If true the layer is visible.
126    
127          colors are expected to be instances of Color class          colors are expected to be instances of Color class
# Line 295  class Layer(BaseLayer): Line 297  class Layer(BaseLayer):
297                  self.__setClassLock = False                  self.__setClassLock = False
298                  raise ValueError                  raise ValueError
299    
300          self.changed(LAYER_LEGEND_CHANGED, self)          self.changed(LAYER_CHANGED, self)
301    
302          self.__setClassLock = False          self.__setClassLock = False
303    
304      def ClassChanged(self):      def ClassChanged(self):
305          """Called from the classification object when it has changed."""          """Called from the classification object when it has changed."""
306          self.changed(LAYER_LEGEND_CHANGED, self)          self.changed(LAYER_CHANGED, self)
307    
308      def TreeInfo(self):      def TreeInfo(self):
309          items = []          items = []

Legend:
Removed from v.529  
changed lines
  Added in v.610

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26