[vtkusers] Placing scaled fonts -- am I missing something ?
Oliver Kania
ptw.freiburg at googlemail.com
Tue Dec 16 02:40:48 EST 2008
I want to place scaled fonts in viewport coordinates
and also want to define the maximum pixel-height of the
font.
Shouldnt the following code work ?
----------------------------------------------------------------------------------------------
vtkTextActor m_textActTop = vtkTextActor::New();
....
m_textActTop->SetTextScaleModeToProp();
m_textActTop->GetTextProperty()->SetFontFamilyToArial();
m_textActTop->GetTextProperty()->SetColor(1.0,0.0,0.0);
m_textActTop->GetPositionCoordinate()->SetCoordinateSystemToViewport();
m_textActTop->GetPositionCoordinate()->SetValue(X1,Y1);
m_textActTop->GetPosition2Coordinate()->SetCoordinateSystemToViewport();
m_textActTop->GetPosition2Coordinate()->SetValue(X2,Y2);
----------------------------------------------------------------------------------------------
as I understand it, the position2 coordinates (X2,Y2) are relative to
(X1,Y1)
and therefore Y2 should determine the maximum height.
However, what happens is that position2 seems to control the actual
placement and position1 doesnt have any effect at all.
regards,
Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081216/2bdf8314/attachment.htm>
More information about the vtkusers
mailing list