[vtk-developers] new vtkTextProperty class and changes

Lisa Avila lisa.avila at kitware.com
Mon Jul 1 11:52:58 EDT 2002


Hi Sebastien,


>The Color and Opacity attributes of the text are now controlled by the 
>vtkTextProperty instead of the actor2D.
>     Thus, instead of:
>         actor->GetProperty()->SetColor(...)
>         actor->GetProperty()->SetOpacity(...)
>     you would do:
>         actor->GetTextProperty()->SetColor(...)
>         actor->GetTextProperty()->SetOpacity(...)

This seems somewhat awkward since a 2D actor has both a GetProperty and a 
GetTextProperty. Is it possible (since we've broken backwards compatibility 
already - right?) to force the switch to vtkTextActor? This way 
vtkTextActor could have a GetProperty method that returns a vtkTextProperty 
(that would be similar to a vtkVolume which has a GetProperty method that 
returns a vtkVolumeProperty). Or, if it is preferred the GetTextProperty 
name can be used, but a vtkTextActor would not have a GetProperty (so there 
would be only one property which would make it less confusing).

It would then seem like each of the composite actors that contain text 
should have an access method to the vtkTextActor for that text. This way 
the user can get the property from the text actor and change its attributes.

What do you think?


Lisa




More information about the vtk-developers mailing list