瀏覽代碼

ENH: vtkLightBoxRendererManager - Add method Set/GetRenderWindowRowCount and Set/GetRenderWindowColumnCount

Jean-Christophe Fillion-Robin 14 年之前
父節點
當前提交
6f81fbcc5d

+ 24 - 0
Libs/Visualization/VTK/Core/vtkLightBoxRendererManager.cpp

@@ -552,6 +552,30 @@ void vtkLightBoxRendererManager::SetRenderWindowLayout(int rowCount, int columnC
 }
 
 //----------------------------------------------------------------------------
+int vtkLightBoxRendererManager::GetRenderWindowRowCount()
+{
+  return this->Internal->RenderWindowRowCount;
+}
+
+//----------------------------------------------------------------------------
+void vtkLightBoxRendererManager::SetRenderWindowRowCount(int newRowCount)
+{
+  this->SetRenderWindowLayout(newRowCount, this->GetRenderWindowColumnCount());
+}
+
+//----------------------------------------------------------------------------
+int vtkLightBoxRendererManager::GetRenderWindowColumnCount()
+{
+  return this->Internal->RenderWindowColumnCount;
+}
+
+//----------------------------------------------------------------------------
+void vtkLightBoxRendererManager::SetRenderWindowColumnCount(int newColumnCount)
+{
+  this->SetRenderWindowLayout(this->GetRenderWindowRowCount(), newColumnCount);
+}
+
+//----------------------------------------------------------------------------
 void vtkLightBoxRendererManager::SetHighlightedById(int id, bool highlighted)
 {
   if (!this->IsInitialized())

+ 16 - 0
Libs/Visualization/VTK/Core/vtkLightBoxRendererManager.h

@@ -61,6 +61,22 @@ class CTK_VISUALIZATION_VTK_CORE_EXPORT vtkLightBoxRendererManager : public vtkO
   /// Split the current vtkRenderWindow in \a rowCount per \a columnCount grid
   void SetRenderWindowLayout(int rowCount, int columnCount);
 
+  /// Set the \a rowCount
+  /// \sa SetRenderWindowLayout
+  void SetRenderWindowRowCount(int newRowCount);
+
+  /// Get number of rows
+  /// \sa SetRenderWindowLayout
+  int GetRenderWindowRowCount();
+
+  /// Set the \a columnCount
+  /// \sa SetRenderWindowLayout
+  void SetRenderWindowColumnCount(int newColumnCount);
+
+  /// Get number of columns
+  /// \sa SetRenderWindowLayout
+  int GetRenderWindowColumnCount();
+
   /// Highlight / Unhighlight a render view item given its \a id
   void SetHighlightedById(int id, bool highlighted);