------------------------------------------------------------------------------
| 22 | |
| 23 | //------------------------------------------------------------------------------ |
| 24 | void vtkTextWidget::SetTextActor(vtkTextActor* textActor) |
| 25 | { |
| 26 | vtkTextRepresentation* textRep = reinterpret_cast<vtkTextRepresentation*>(this->WidgetRep); |
| 27 | if (!textRep) |
| 28 | { |
| 29 | this->CreateDefaultRepresentation(); |
| 30 | textRep = reinterpret_cast<vtkTextRepresentation*>(this->WidgetRep); |
| 31 | } |
| 32 | |
| 33 | if (textRep->GetTextActor() != textActor) |
| 34 | { |
| 35 | textRep->SetTextActor(textActor); |
| 36 | this->Modified(); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | //------------------------------------------------------------------------------ |
| 41 | vtkTextActor* vtkTextWidget::GetTextActor() |