I want to place scaled fonts in viewport coordinates<br>and also want to define the maximum pixel-height of the<br>font.<br>Shouldnt the following code work ?<br> <br>----------------------------------------------------------------------------------------------<br>
vtkTextActor m_textActTop = vtkTextActor::New();<br> ....<br> m_textActTop->SetTextScaleModeToProp();<br> m_textActTop->GetTextProperty()->SetFontFamilyToArial();<br> m_textActTop->GetTextProperty()->SetColor(1.0,0.0,0.0);<br>
m_textActTop->GetPositionCoordinate()->SetCoordinateSystemToViewport();<br> m_textActTop->GetPositionCoordinate()->SetValue(X1,Y1);<br> m_textActTop->GetPosition2Coordinate()->SetCoordinateSystemToViewport();<br>
m_textActTop->GetPosition2Coordinate()->SetValue(X2,Y2);<br><br>----------------------------------------------------------------------------------------------<br><br>as I understand it, the position2 coordinates (X2,Y2) are relative to (X1,Y1)<br>
and therefore Y2 should determine the maximum height.<br>However, what happens is that position2 seems to control the actual<br>placement and position1 doesnt have any effect at all.<br><br>regards,<br>Oliver<br>