/[thuban]/trunk/thuban/Thuban/Model/layer.py
ViewVC logotype

Diff of /trunk/thuban/Thuban/Model/layer.py

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

revision 216 by bh, Wed May 15 14:02:49 2002 UTC revision 217 by bh, Wed Jul 17 10:50:40 2002 UTC
# Line 239  class Layer(BaseLayer): Line 239  class Layer(BaseLayer):
239          """Set the layer's stroke width."""          """Set the layer's stroke width."""
240          self.stroke_width = width          self.stroke_width = width
241          self.changed(LAYER_LEGEND_CHANGED, self)          self.changed(LAYER_LEGEND_CHANGED, self)
242    
243        def TreeInfo(self):
244            items = []
245    
246            if self.Visible():
247                items.append("Shown")
248            else:
249                items.append("Hidden")
250            items.append("Shapes: %d" % self.NumShapes())
251    
252            bbox = self.LatLongBoundingBox()
253            if bbox is not None:
254                items.append("Extent (lat-lon): (%g, %g, %g, %g)" % bbox)
255            else:
256                items.append("Extent (lat-lon):")
257            items.append("Shapetype: %s" % shapetype_names[self.ShapeType()])
258    
259            def color_string(color):
260                if color is None:
261                    return "None"
262                return "(%.3f, %.3f, %.3f)" % (color.red, color.green, color.blue)
263            items.append("Fill: " + color_string(self.fill))
264            items.append("Outline: " + color_string(self.stroke))
265    
266            return ("Layer '%s'" % self.Title(), items)

Legend:
Removed from v.216  
changed lines
  Added in v.217

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26