[vtkusers] Positioning vtkActor2D
Allan James
ar.james at qut.edu.au
Mon Feb 1 18:38:16 EST 2010
Hi vtk'ers
Could someone point me in the direction of the best way to position a vtkActor2D (eg. vtkScalarBarActor / vtkLegendBoxActor) so that when the viewport is resized the actual size of the actor remains static, and the top remains a constant distance from the top of the viewport?
It seems to be because the Position2Coordinate (top-right) is relative to the first coordinate (lower-left). If I want an actor to display in the top left corner for example - I set the position1 to a normalized viewport position (ie. ~0.75) and then set the position2 coordinate using display coords (i.e I want the actor to be exactly 200x100 pixels in size). However because the first coordinate remains in the correct place relative to the viewport and the actor is a constant size, the top of the actor disappears off the top of the screen when the viewport is reduced.
I hope this makes sense! Does anyone have any techniques for setting constant size overlay actors (2D) to be a set distance from the corners of the viewport?
Thanks,
Allan James
High Performance Computing & Research Support
Queensland University of Technology
(07) 3138 9264
ar.james at qut.edu.au
http://www.qut.edu.au/its/hpc
><(((º> ._.·´¯`·.. >++(((º> ._.·´¯`·.. >++(((º>
More information about the vtkusers
mailing list