<div dir="ltr"><div><div><div><div><div><div>Hi!<br><br></div>I seem to have problems using vtkTextActor, when using the latest VTK from Git. Instead of text, I am getting a white rectangle where the text should be. This happens with the small test program that I'm including in this email, but also with the example program here:<br>
<br><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayText">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayText</a><br><br></div>In the latter case, I'm seeing no text because the background is also white, but if I change the background to black, I can see a white rectangle instead of text.<br>
<br></div>Here is my test program:<br><br>#include "vtkActor.h"<br>#include "vtkRenderer.h"<br>#include "vtkRenderWindow.h"<br>#include "vtkRenderWindowInteractor.h"<br>#include "vtkSmartPointer.h"<br>
#include "vtkTextActor.h"<br><br>int main()<br>{<br> vtkSmartPointer<vtkRenderer> ren = vtkSmartPointer<vtkRenderer>::New();<br><br> vtkSmartPointer<vtkRenderWindow> ren_win = vtkSmartPointer<vtkRenderWindow>::New();<br>
ren_win->AddRenderer(ren);<br><br> vtkSmartPointer<vtkRenderWindowInteractor> ren_win_int = vtkSmartPointer<vtkRenderWindowInteractor>::New();<br> ren_win_int->SetRenderWindow(ren_win);<br><br>
vtkSmartPointer<vtkTextActor> textActor = vtkSmartPointer<vtkTextActor>::New();<br> textActor->SetInput("Text");<br><br> textActor->Print(cout);<br><br> ren->AddActor(textActor);<br>
<br> ren_win_int->Initialize();<br> ren_win_int->Start();<br><br> return 0;<br>}<br><br></div><div>If it helps,I have included a Print() command, and the resulting output is:<br></div><br>vtkTextActor (0x254d420)<br>
Debug: Off<br> Modified Time: 1204<br> Reference Count: 1<br> Registered Events: (none)<br> Dragable: On<br> Pickable: On<br> AllocatedRenderTime: 10<br> EstimatedRenderTime: 0<br> NumberOfConsumers: 0<br> RenderTimeMultiplier: 1<br>
Visibility: On<br> PropertyKeys: none.<br> useBounds: 1<br> Layer Number: 0<br> PositionCoordinate: 0x254d570<br> Debug: Off<br> Modified Time: 1001<br> Reference Count: 2<br> Registered Events: (none)<br>
Coordinate System: Viewport<br> Value: (0,0,0)<br> ReferenceCoordinate: (none)<br> Viewport: (none)<br> Position2 Coordinate: 0x254d640<br> Debug: Off<br> Modified Time: 1005<br> Reference Count: 1<br>
Registered Events: (none)<br> Coordinate System: Normalized Viewport<br> Value: (0.5,0.5,0)<br> ReferenceCoordinate: 0x254d570<br> Viewport: (none)<br> Property: 0<br> Mapper: 0x2551220<br> Debug: Off<br>
Modified Time: 1193<br> Reference Count: 2<br> Registered Events: (none)<br> Executive: 0x2552210<br> ErrorCode: Success<br> Information: 0x25516c0<br> AbortExecute: Off<br> Progress: 0<br> Progress Text: (None)<br>
TimeToDraw: 0<br> ClippingPlanes: (none)<br> Lookup Table: (none)<br> Scalar Visibility: On<br> Scalar Mode: Default<br> Scalar Range: (0, 1)<br> UseLookupTableScalarRange: 0<br> Color Mode: Default<br>
No Transform Coordinate<br> Transform Coordinate use double: False<br><br> Input: Text<br> Text Property:<br> Debug: Off<br> Modified Time: 1197<br> Reference Count: 1<br> Registered Events: (none)<br>
Color: (1, 1, 1)<br> Opacity: 1<br> FontFamilyAsString: Arial<br> FontFile: (null)<br> FontSize: 12<br> Bold: Off<br> Italic: Off<br> Shadow: Off<br> ShadowOffset: (1, -1)<br> Justification: Left<br>
Vertical justification: Bottom<br> Orientation: 0<br> Line Offset: 0<br> Line Spacing: 1.1<br> Scaled Text Property:<br> Debug: Off<br> Modified Time: 1199<br> Reference Count: 1<br> Registered Events: (none)<br>
Color: (1, 1, 1)<br> Opacity: 1<br> FontFamilyAsString: Arial<br> FontFile: (null)<br> FontSize: 12<br> Bold: Off<br> Italic: Off<br> Shadow: Off<br> ShadowOffset: (1, -1)<br> Justification: Left<br>
Vertical justification: Bottom<br> Orientation: 0<br> Line Offset: 0<br> Line Spacing: 1.1<br> MaximumLineHeight: 1<br> MinimumSize: 10 10<br> TextScaleMode: 0<br> Orientation: 0<br> FontScaleExponent: 1<br>
Texture: 0x254e620<br> UseBorderAlign: 0<br> Debug: Off<br> Modified Time: 1121<br> Reference Count: 2<br> Registered Events: (none)<br> Executive: 0x254efe0<br> ErrorCode: Success<br> Information: 0x254d1b0<br>
AbortExecute: Off<br> Progress: 0<br> Progress Text: (None)<br> Interpolate: Off<br> Repeat: On<br> EdgeClamp: Off<br> Quality: Default<br> MapColorScalarsThroughLookupTable: Off<br> PremultipliedAlpha: Off<br>
Input: (0x254e010)<br> LookupTable: (none)<br> Mapped Scalars: (none)<br> Transform: (none)<br> MultiTexture Blending Mode: None<br> RestrictPowerOf2ImageSmaller: Off<br> Index: 0<br></div><div>
<br></div>Best regards<br></div>Torquil Sørensen<br></div>