[vtkusers] Text Justification with vtkFollower
Dave Ardrey
daveardrey at gmail.com
Wed Apr 11 10:46:13 EDT 2007
Greetings all,
I am using vtkFollower to add labels to an axis. Everything is working
fine, however the about the point to the left of the text. I would like the
text to oriet itself about the center. In a sense I would like it Center
justified instead of left justified.
I have attempted to change the origin of the vtkFollower as follows:
double *center = new double[3];
double *position = new double[3];
center = follower->GetCenter();
position = follower->GetPosition();
for (int i=0;i<3;i++) center[i] = center[i]-position[i];
follower->SetOrigin(center);
However, this seems to do something funny where it changes the position of
the text as well.
Anyone have any ideas how to solve this problem?
Thanks!
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070411/403f2e20/attachment.htm>
More information about the vtkusers
mailing list