]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImage.cxx
#3461 Feuture Export Opacity ColorLayerImageView
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkInfoTextImage.cxx
index 02e73d290df9be4ce72a1436eec563bf0a6b6ff3..66632639fbd6d771a826ce2cb2630053c9ac91b2 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "vtkInfoTextImage.h"
 
+#include "vtkProperty2D.h"
 #include "vtkTextProperty.h"
 #include <vtkImageMapToWindowLevelColors.h>
 //-------------------------------------------------------------------
@@ -60,6 +61,29 @@ void vtkInfoTextImage::Configure()
        } // if vtkText_WindowLevel
 }
 
+void vtkInfoTextImage::SetOpacity(double opacity)
+{
+       if (_vtkText_WindowLevel!=NULL) 
+       {
+               _vtkText_WindowLevel->GetProperty()->SetOpacity( opacity );
+       }
+       if (_vtkText_ColorLevel!=NULL) 
+       {
+               _vtkText_ColorLevel->GetProperty()->SetOpacity( opacity );
+       }
+       if (_vtkText_position!=NULL) 
+       {
+               _vtkText_position->GetProperty()->SetOpacity( opacity );
+       }
+       if (_vtkText_pixelIntensity!=NULL) 
+       {
+               _vtkText_pixelIntensity->GetProperty()->SetOpacity( opacity );
+       }
+       if (_vtkText_plane!=NULL) 
+       {
+               _vtkText_plane->GetProperty()->SetOpacity( opacity );
+       }
+}
 
 //-------------------------------------------------------------------