]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkText2D.cxx
Text2D FontSize, Color
[bbtk.git] / packages / vtk / src / bbvtkText2D.cxx
index 75967a29bf3c61c972dac289ede0e79257bf0d51..c5d9d73383fbf0f5e6ba2def8138291a2378ae14 100644 (file)
@@ -70,13 +70,18 @@ void Text2D::Process()
 // textActor->GetPosition2Coordinate()->SetValue(0.6, 0.1);
 
  vtkTextProperty *tprop = _textActor->GetTextProperty();
- tprop->SetFontSize(10);
+ tprop->SetFontSize( bbGetInputFontSize() );
  tprop->SetFontFamilyToArial();
  tprop->SetJustificationToCentered();
 // tprop->BoldOn();
 // tprop->ItalicOn();
 // tprop->ShadowOn();
- tprop->SetColor(0, 0, 1);
+
+ if (bbGetInputColor().size()>=3)
+ {
+    tprop->SetColor( bbGetInputColor()[0] , bbGetInputColor()[1] , bbGetInputColor()[2] );
+ }
+
  tprop->SetOpacity( bbGetInputOpacity() );
   
 }
@@ -92,13 +97,19 @@ void Text2D::bbUserSetDefaultValues()
  _textActor=NULL;
  bbSetInputIn("VOID");  
  bbSetInputOpacity(1);  
- bbSetInputRenderer(NULL); 
+ bbSetInputFontSize(14);  
  std::vector<double> spc;
  spc.push_back(1); 
  spc.push_back(1); 
  spc.push_back(1); 
  bbSetInputSpacing(spc);  
+ std::vector<double> color;
+ color.push_back(0); 
+ color.push_back(0); 
+ color.push_back(1); 
+ bbSetInputColor(color);  
 
+ bbSetInputRenderer(NULL); 
 
 }
 //=====