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

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

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

revision 608 by jonathan, Fri Apr 4 12:12:18 2003 UTC revision 609 by jonathan, Fri Apr 4 13:55:59 2003 UTC
# Line 277  class Classification: Line 277  class Classification:
277          items = []          items = []
278    
279          def build_color_item(text, color):          def build_color_item(text, color):
280              if color is Color.None:              if color is Color.Transparent:
281                  return ("%s: %s" % (text, _("None")), None)                  return ("%s: %s" % (text, _("None")), None)
282    
283              return ("%s: (%.3f, %.3f, %.3f)" %              return ("%s: (%.3f, %.3f, %.3f)" %
# Line 373  class ClassGroupProperties: Line 373  class ClassGroupProperties:
373          props -- a ClassGroupProperties object. The class is copied if          props -- a ClassGroupProperties object. The class is copied if
374                   prop is not None. Otherwise, a default set of properties                   prop is not None. Otherwise, a default set of properties
375                   is created such that: line color = Color.Black, line width = 1,                   is created such that: line color = Color.Black, line width = 1,
376                   and fill color = Color.None                   and fill color = Color.Transparent
377          """          """
378    
379          self.stroke = None          self.stroke = None
# Line 385  class ClassGroupProperties: Line 385  class ClassGroupProperties:
385          else:          else:
386              self.SetLineColor(Color.Black)              self.SetLineColor(Color.Black)
387              self.SetLineWidth(1)              self.SetLineWidth(1)
388              self.SetFill(Color.None)              self.SetFill(Color.Transparent)
389    
390      def SetProperties(self, props):      def SetProperties(self, props):
391          """Set this class's properties to those in class props."""          """Set this class's properties to those in class props."""
# Line 406  class ClassGroupProperties: Line 406  class ClassGroupProperties:
406          """          """
407    
408          assert isinstance(color, Color)          assert isinstance(color, Color)
409          #self.stroke = Color(color.red, color.green, color.blue)          self.stroke = color
         self.stroke = copy.copy(color)  
410    
411      def GetLineWidth(self):      def GetLineWidth(self):
412          """Return the line width."""          """Return the line width."""
# Line 435  class ClassGroupProperties: Line 434  class ClassGroupProperties:
434          """          """
435    
436          assert isinstance(fill, Color)          assert isinstance(fill, Color)
437          self.fill = copy.copy(fill)          self.fill = fill
         #self.fill = Color(fill.red, fill.green, fill.blue)  
438    
439      def __eq__(self, other):      def __eq__(self, other):
440          """Return true if 'props' has the same attributes as this class"""          """Return true if 'props' has the same attributes as this class"""

Legend:
Removed from v.608  
changed lines
  Added in v.609

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26