/[escript]/trunk/pyvisi/py_src/scalarbar.py
ViewVC logotype

Diff of /trunk/pyvisi/py_src/scalarbar.py

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

revision 1194 by jongui, Thu Jun 14 05:53:49 2007 UTC revision 1388 by trankine, Fri Jan 11 07:45:58 2008 UTC
# Line 1  Line 1 
1  """  """
2  @author: John NGUI  @var __author__: name of author
3    @var __copyright__: copyrights
4    @var __license__: licence agreement
5    @var __url__: url entry point on documentation
6    @var __version__: version
7    @var __date__: date of the version
8  """  """
9    
10    __author__="John Ngui, john.ngui@uq.edu.au"
11    __copyright__="""  Copyright (c) 2006 by ACcESS MNRF
12                        http://www.access.edu.au
13                    Primary Business: Queensland, Australia"""
14    __license__="""Licensed under the Open Software License version 3.0
15                 http://www.opensource.org/licenses/osl-3.0.php"""
16    __url__="http://www.iservo.edu.au/esys"
17    __version__="$Revision$"
18    __date__="$Date$"
19    
20    
21  import vtk  import vtk
22  from position import LocalPosition  from position import LocalPosition
23  from constant import Color  from constant import Color
# Line 25  class ScalarBar: Line 41  class ScalarBar:
41          """          """
42    
43          self.__vtk_scalar_bar.GetPositionCoordinate().SetCoordinateSystemToViewport()          self.__vtk_scalar_bar.GetPositionCoordinate().SetCoordinateSystemToViewport()
44            # Set the default number of labels on the scalar bar to 8.
45          self.setNumberOfLabels(8)          self.setNumberOfLabels(8)
46          # Set the default color of the scalar bar's title and label to black.          # Set the default color of the scalar bar's title and label to black.
47          self.setTitleColor(Color.BLACK)          self.setTitleColor(Color.BLACK)
# Line 44  class ScalarBar: Line 61  class ScalarBar:
61    
62      def setNumberOfLabels(self, labels):      def setNumberOfLabels(self, labels):
63          """          """
64          Set the number of lables on the scalar bar.          Set the number of labels on the scalar bar.
65    
66          @type labels: Number          @type labels: Number
67          @param labels: Number of labels on the scalar bar          @param labels: Number of labels on the scalar bar
# Line 79  class ScalarBar: Line 96  class ScalarBar:
96          """          """
97    
98          self.__vtk_scalar_bar.SetOrientationToHorizontal()          self.__vtk_scalar_bar.SetOrientationToHorizontal()
99            # Default width, height and position for a horizontal scalar bar.
100          self.setWidth(0.8)          self.setWidth(0.8)
101          self.setHeight(0.10)          self.setHeight(0.10)
102          self.setPosition(LocalPosition(130,5))          self.setPosition(LocalPosition(130,5))
# Line 89  class ScalarBar: Line 107  class ScalarBar:
107          """          """
108    
109          self.__vtk_scalar_bar.SetOrientationToVertical()          self.__vtk_scalar_bar.SetOrientationToVertical()
110            # Default width, height and position for a vertical scalar bar.
111          self.setWidth(0.14)          self.setWidth(0.14)
112          self.setHeight(0.85)          self.setHeight(0.85)
113          self.setPosition(LocalPosition(5,150))          self.setPosition(LocalPosition(5,150))

Legend:
Removed from v.1194  
changed lines
  Added in v.1388

  ViewVC Help
Powered by ViewVC 1.1.26