[vtkusers] modify a text in the renderer with the mose move event
Jérôme
jerome.velut at gmail.com
Wed Nov 18 09:38:22 EST 2009
Hi,
If this part of code is inside your MoveMouse callback function, then you
create a new actor as soon as you move, without hiding/removing the previous
one.
2 solutions, if this is the problem:
- remove the actor before adding a new one
- make Tactorx a member and instanciate it only once
HTH
Jerome
2009/11/18 RimAY <rim.ayari at gmail.com>
>
> Dear All ,
> Can someone give me an idea how can i change a text in the renderer with
> the
> mouse move event.
> I try with vtktextactor this is the part of my code:
>
> Tactorx = vtkTextActor()
> Tactorx.SetInput(cx)
> Tactorx.SetDisplayPosition(70,170)
> Tactorx.GetTextProperty().SetJustificationToCentered()
> renderer.AddActor(Tactorx)
> Tactorx.Modified()
>
> cx change its value with the mose move, i get the new value above the
> ancien
> one, the result is an illegible text :(
>
> Thanks a lot
>
> --
> View this message in context:
> http://old.nabble.com/modify-a-text-in-the-renderer-with-the-mose-move-event-tp26403090p26403090.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091118/8e34cf50/attachment.htm>
More information about the vtkusers
mailing list