- Timestamp:
- Mar 5, 2013 3:25:33 PM (11 years ago)
- Location:
- trunk/packages/vizservers/vtkvis
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/ColorMap.cpp
r3330 r3455 172 172 } 173 173 } 174 } 175 176 /** 177 * \brief Get the number of discrete color table entries 178 * 179 * The number of table entries refers to the underlying 180 * vtkLookupTable and is independent of the number of 181 * control points in the transfer function. 182 */ 183 int ColorMap::getNumberOfTableEntries() 184 { 185 return _numTableEntries; 174 186 } 175 187 -
trunk/packages/vizservers/vtkvis/ColorMap.h
r3177 r3455 95 95 void setNumberOfTableEntries(int numEntries); 96 96 97 int getNumberOfTableEntries(); 98 97 99 void addControlPoint(ControlPoint& cp); 98 100 -
trunk/packages/vizservers/vtkvis/RpVtkRenderer.cpp
r3451 r3455 1887 1887 if (_scalarBarActor == NULL) { 1888 1888 _scalarBarActor = vtkSmartPointer<vtkScalarBarActor>::New(); 1889 _scalarBarActor->DrawFrameOff(); 1890 _scalarBarActor->DrawBackgroundOff(); 1889 1891 _legendRenderer->AddViewProp(_scalarBarActor); 1890 1892 } … … 1907 1909 if (width > height) { 1908 1910 // horizontal 1909 _scalarBarActor->SetHeight( 2.5); // VTK: floor(actorHeight * .4)1910 _scalarBarActor->SetWidth(1); 1911 _scalarBarActor->SetHeight((((double)height+1.5)/((double)height))/0.4); // VTK: floor(actorHeight * .4) 1912 _scalarBarActor->SetWidth(1); // VTK: actorWidth 1911 1913 } else { 1912 1914 // vertical 1913 _scalarBarActor->SetHeight(( double)height/(.86*height)); // VTK: floor(actorHeight * .86)1915 _scalarBarActor->SetHeight((((double)height+1.5)/((double)height))/0.86); // VTK: floor(actorHeight * .86) 1914 1916 _scalarBarActor->SetWidth(((double)(width+5))/((double)width)); // VTK: actorWidth - 4 pixels 1915 1917 } … … 2054 2056 2055 2057 _scalarBarActor->SetLookupTable(lut); 2058 _scalarBarActor->SetMaximumNumberOfColors((width > height ? width : height)); 2056 2059 2057 2060 if (drawTitle) {
Note: See TracChangeset
for help on using the changeset viewer.