[vtk-developers] new vtkTextActor class and slight mapperchanges

Sebastien BARRE sebastien.barre at kitware.com
Wed Jun 5 11:43:26 EDT 2002


At 6/5/2002 11:27 AM, John Biddiscombe wrote:

> > It would be better if both behave in the same way, for consistency, don't
> > you think so ? I mean, that's a bit painful now.
> >
> > What do you think ?
>
>Ummm. Yes. I made vtkTextActor use display coordinates by default because
>there are more TextMapper/Actor2D pairs in vtk code than there were
>ScaledTextActors (only vtkCaptionActor2D used it in vtk itself) - thus it'd
>be a bit less painful to change them to the new textactor.

What do you mean ? If there are more TextMapper/Actor2D pairs, then I'd 
have stick to display coords, since that's what they most probably use, 
don't you think so ?

>vtkScaledTextActor used to initialize itself with NormalizedViewport coords,
>so one or the other had to give :(

Well, then the logical conclusion seems to me that since the new 
vtkTextActor class is *not* scaled by default (thus, equivalent to a 
TextMapper/Actor2D pair), display coord should be used. If someone sets 
ScaledText to 1, then he can also set the coord to normalized at this 
point. Or you can have it set automatically to normalized if ScaledText is 
changed.

My point is that playing with coord system through vtkCoordinates is tricky 
enough that we might lose some users here, and since text actors are 
useful, let's keep it simple (or backward compatible, and/or consistent, 
etc.). But I agree that grouping the mapper + actor is a good idea that 
goes into that "user friendly" way.

>(He says, wishing he'd just left everything alone and could go back to
>hiding under a rock...)

That's fine, Berk keeps going back and forth between his office and the 
cluster room to hit the "OK" dialog box raised by all the warnings during 
the test :) He needed some sport anyway.


--
Sebastien Barre




More information about the vtk-developers mailing list