if(_show_text)
{
_wxvtkbaseview->GetRenderer()->AddActor2D( _textActor );
+ _wxvtkbaseview->GetRenderer()->AddActor2D( _textActor2 );
}
}
// ----------------------------------------------------------------------------
if(_show_text)
{
_wxvtkbaseview->GetRenderer()->RemoveActor2D( _textActor );
+ _wxvtkbaseview->GetRenderer()->RemoveActor2D( _textActor2 );
}
}
// ----------------------------------------------------------------------------
InitTextActor();
}
+// ----------------------------------------------------------------------------
void manualViewBaseContour::InitTextActor()
{
// Text
tprop->SetFontSize(14);
tprop->SetFontFamilyToArial();
tprop->SetColor(0, 0, 1);
+
+
+ // Text 2
+ _textActor2 = vtkTextActor::New();
+// _textActor->SetDisplayPosition(200, 200);
+ _textActor2->SetInput("00");
+ // Set coordinates to match the old vtkScaledTextActor default value
+// _textActor2->GetPosition2Coordinate()->SetCoordinateSystemToNormalizedViewport();
+// _textActor2->GetPosition2Coordinate()->SetValue( 0.2 , 0.2 );
+ _textActor2->GetPositionCoordinate()->SetCoordinateSystemToWorld ();
+// _textActor2->GetPositionCoordinate()->SetValue( 0.8 , 0.8 );
+
+ vtkTextProperty *tprop2 = _textActor2->GetTextProperty();
+ tprop2->SetFontSize(14);
+ tprop2->SetFontFamilyToArial();
+ tprop2->SetColor(0, 0, 1);
+
}
// ----------------------------------------------------------------------------
void manualViewBaseContour::RefreshText() // virtual
{
if( _textActor!=NULL)
+ {
_textActor -> SetInput("00");
+ _textActor2 -> SetInput("00");
+ }
}
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetColorNormalContour(double r, double g, double b)
_contourVtkActor->GetProperty()->SetOpacity( opacity );
_textActor->GetProperty()->SetOpacity( opacity );
_textActor->SetInput("00");
+ _textActor2->GetProperty()->SetOpacity( opacity );
+ _textActor2->SetInput("00");
}
// ----------------------------------------------------------------------------
if (_show_text==false && _textActor!=NULL)
{
_textActor->SetInput("00");
+ _textActor2->SetInput("00");
}
}
// ----------------------------------------------------------------------------