Package DejaVu :: Module colorMapLegend :: Class ColorMapLegend
[hide private]
[frames] | no frames]

Class ColorMapLegend

source code

Common2d3dObject.Common2d3dObject --+    
                                    |    
                    Insert2d.Insert2d --+
                                        |
                                       ColorMapLegend

Class for displaying a colormap legend.
arguments for the constructor or Set method are:
   ramp: Numeric array of shape Nx3 or Nx4 (default is RBGRamp())
   height: height of colormap legend
   width:  width of colormap legend
   interp: 1 or 0 to turn color interpolation on and off resp.
   mini:   minimum values (i.e which corresponds to the first color)
   maxi:   maximum values (i.e which corresponds to the last color)

If interp is set to 1 QUAD_STRIPS are used and colors are interpolated,
else one QUAD is drawn for each entry in the colormap.
If the color provide alpha values, a chechered background is drawn.



Instance Methods [hide private]
  __init__(self, colormapgui, name='color map legend', check=1, **kw)
Constructor
  Set(self, check=1, redo=1, updateOwnGui=True, **kw)
set data for this object: add faces (polygon or lines) to this object check=1 : verify that all the keywords present can be handle by this func redo=1 : append self to viewer.objectsNeedingRedo updateOwnGui=True : allow to update owngui at the end this func
  Draw(self)
set the projection matrices, the subclass must call this in their Draw func, otherwise tile rendering and stereo won't work
  pickDraw(self)
called by the picking process to operate the selection
  setPosition(self, event, redo=1)
the trackball transmit the translation info
  setSize(self, event, redo=1)
override the Insert2d function
  ResetPosition(self)
  respondToDoubleClick(self, event)
  processHit_cb(self, pick)
  createOwnGui(self)
  setWithOwnGui(self, event=None)
  updateOwnGui(self)

Inherited from Insert2d.Insert2d: ResetSize, ResetTransformation, calculateAnchorAndPosition, getState, respondToMouseMove, setViewer

Inherited from Common2d3dObject.Common2d3dObject: AllObjects, AllVisibleObjects, BuildFullName, DisplayFunction, LastParentBeforeRoot, RedoDisplayList, deleteOpenglList, getDepthMask, getVisible, hideOwnGui, showOwnGui

Inherited from Common2d3dObject.Common2d3dObject (private): _Hide, _Remove


Class Variables [hide private]
  keywords = ['immediateRendering', 'listed', 'name', 'needsRedoD...
  glfVectorFontList = ['arial1.glf', 'courier1.glf', 'crystal1.glf', 'tech...

Method Details [hide private]

__init__(self, colormapgui, name='color map legend', check=1, **kw)
(Constructor)

source code 
Constructor
Overrides: Insert2d.Insert2d.__init__

Set(self, check=1, redo=1, updateOwnGui=True, **kw)

source code 
set data for this object: add faces (polygon or lines) to this object check=1 : verify that all the keywords present can be handle by this func redo=1 : append self to viewer.objectsNeedingRedo updateOwnGui=True : allow to update owngui at the end this func
Overrides: Insert2d.Insert2d.Set

Draw(self)

source code 
set the projection matrices, the subclass must call this in their Draw func, otherwise tile rendering and stereo won't work
Overrides: Insert2d.Insert2d.Draw
(inherited documentation)

pickDraw(self)

source code 
called by the picking process to operate the selection
Overrides: Insert2d.Insert2d.pickDraw

setPosition(self, event, redo=1)

source code 
the trackball transmit the translation info
Overrides: Insert2d.Insert2d.setPosition

setSize(self, event, redo=1)

source code 
override the Insert2d function
Overrides: Insert2d.Insert2d.setSize

ResetPosition(self)

source code 
None
Overrides: Insert2d.Insert2d.ResetPosition

respondToDoubleClick(self, event)

source code 
Overrides: Insert2d.Insert2d.respondToDoubleClick

processHit_cb(self, pick)

source code 
None
Overrides: Insert2d.Insert2d.processHit_cb

createOwnGui(self)

source code 
None

setWithOwnGui(self, event=None)

source code 
None

updateOwnGui(self)

source code 
None

Class Variable Details [hide private]

keywords

None
Value:
['immediateRendering',
 'listed',
 'name',
 'needsRedoDpyListOnResize',
 'pickable',
 'protected',
 'replace',
 'tagModified',
...                                                                    
      

glfVectorFontList

None
Value:
['arial1.glf',
 'courier1.glf',
 'crystal1.glf',
 'techno0.glf',
 'techno1.glf',
 'times_new1.glf',
 'aksent1.glf',
 'alpine1.glf',
...