[vtk-developers] [ARB?] Plans for the vtkGL2PSExporter class.
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Mon Jun 2 13:05:46 EDT 2003
Hi,
For some strange reason this mail (which I am replying to) never
reached me although its there in the archives!
>>>>> "PR" == Prabhu Ramachandran <prabhu at aero.iitm.ernet.in> writes:
[snip]
PR> When this is turned on gl2psText function calls are made
PR> (inside the text mappers) when the mapper is rendering its
PR> text. As soon as gl2ps is finished one can turn it off:
PR> vtkTextMapper::GlobalGL2PSOff();
PR> Or something like that. Alternatively, I would need to find
PR> all active actors in the renderwindow, check if they are text
PR> actors, then call gl2psText appropriately. I am not sure
PR> which is the best approach. I thought that the Global flag
PR> was simpler to do. Finding all active actors and searching
PR> for text actors is a possiblility but the code could be more
PR> complicated. OTOH if everyone starts using global flags things
PR> can get messy.
I thought more about this and poked around with more code and I'm
beginning to think that it makes more sense to do this in the
vtkOpenGLFreeTypeTextMapper. This is because some of the classes that
use text do not add these actors to the renderwindow and use them
directly in their Render* methods. The vtkScalarBarActor and the
vtkCubeAxesActor2D are good examples. So finding all renderered
actors and then calling gl2psText appropriately will not work.
However adding a few lines to the TextMapper code will do the job just
fine. I also will not need a global flag or anything of the sort
since gl2psText will test to see if gl2ps is initialized. If it is
not then it does nothing. So I think I'll just go ahead with this
approach and test it out. If you have any better suggestions please
do let me know.
Thanks.
prabhu
More information about the vtk-developers
mailing list