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

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

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

revision 1147 by ksteube, Wed May 16 06:39:11 2007 UTC revision 1148 by jongui, Wed May 16 22:45:33 2007 UTC
# Line 23  class Logo(ImageMapper, ImageReslice, Ac Line 23  class Logo(ImageMapper, ImageReslice, Ac
23          @type scene: L{Scene <scene.Scene>} object          @type scene: L{Scene <scene.Scene>} object
24          @param scene: Scene in which the logo is to be displayed          @param scene: Scene in which the logo is to be displayed
25          @type image_reader: L{ImageReader <imagereader.ImageReader>}          @type image_reader: L{ImageReader <imagereader.ImageReader>}
26                  object          object
27          @param image_reader: Deal with source of data for vizualisation          @param image_reader: Deal with source of data for vizualisation
28          @type viewport: L{Viewport <constant.Viewport>} constant            @type viewport: L{Viewport <constant.Viewport>} constant  
29          @param viewport: Viewport in which the logo is to be displayed          @param viewport: Viewport in which the logo is to be displayed
30          """          """
31    
32            self.__scene = scene
33            self.__image_reader = image_reader
34            self.__viewport = viewport
35    
36            self.__modified = True # Keeps track whether Logo has been modified.
37            ImageReslice.__init__(self)
38            ImageMapper.__init__(self)
39            Actor2D.__init__(self)
40            scene._addVisualizationModules(self)
41    
42          # ----- Logo -----          # ----- Logo -----
43    
44          ImageReslice.__init__(self, image_reader._getOutput())          self._setupImageReslice(self.__image_reader._getImageReaderOutput())
45          ImageMapper.__init__(self, ImageReslice._getOutput(self))          self._setupImageMapper(self._getImageResliceOutput())
46    
47            self._setupActor2D(self._getImageMapper())
48            self.__scene._addActor2D(self.__viewport, self._getActor2D())
49    
50        def _isModified(self):  
51            """
52            Return whether the Logo or DataCollector has been modified.
53    
54            @rtype: Boolean
55            @return: True or False
56            """
57    
58            return self.__modified or self.__data_collector._isModified()
59    
60        def _render(self):
61            """
62            Render the logo.
63            """
64    
65            if (self._isModified() == True):
66                self.__modified = False
67    
68    
         Actor2D.__init__(self, ImageMapper._getImageMapper(self))  
         scene._addActor2D(viewport, Actor2D._getActor2D(self))  
69    

Legend:
Removed from v.1147  
changed lines
  Added in v.1148

  ViewVC Help
Powered by ViewVC 1.1.26