MantisBT - VTK
View Issue Details
0008372VTK(No Category)public2009-01-13 13:022016-08-12 09:55
jd 
Kitware Robot 
normalmajoralways
closedmoved 
 
 
0008372: Differences in display of vtkTextActors between vtk5.0.4 and vtk5.2.1 (shadow and accentuated characters)
I'am trying to upgrade from vtk5.0.4 to vtk5.2.1, and I have two problems with the rendering of vtkTextActor. Basically :
- the shadow property looks rather strange in 5.2.1 compared to 5.0.4
- accuentuated characters (é, è...) are no longer displayed in 5.2.1

Herebelow, a small test program that reproduces the behaviour is given.
I also joined files to illustrate the graphical output obtained in each case.

Note: both vtk versions were compiled with VC++2005 under WinVista.
// Example code to show the difference in rendering of vtkTextActor
// Compiled and run either with vtk5.0.4 or vtk5.2.1
// For the graphical output of each version see attached file.
//
>> #include "vtkCylinderSource.h"
>> #include "vtkPolyDataMapper.h"
>> #include "vtkActor.h"
>> #include "vtkRenderer.h"
>> #include "vtkRenderWindow.h"
>> #include "vtkRenderWindowInteractor.h"
>> #include "vtkProperty.h"
>> #include "vtkCamera.h"
>> #include "vtkTextProperty.h"
>> #include "vtkTextActor.h"
>>
>> int main()
>> {
>> // Create an example text actor.
>> vtkTextActor *textActor = vtkTextActor::New();
>>
>> textActor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
>> textActor->SetPosition(0.50,0.90);
>> textActor->SetInput("Geometry based on vtkCylinderSource\nGéométrie
>> basée sur vtkCylinderSource\nvtk5.x.x");
>> textActor->GetTextProperty()->SetFontSize(18);
>> textActor->GetTextProperty()->SetFontFamilyToArial();
>> textActor->GetTextProperty()->SetJustificationToCentered();
>> textActor->GetTextProperty()->BoldOn();
>> textActor->GetTextProperty()->ItalicOn();
>> textActor->GetTextProperty()->ShadowOn();
>> textActor->GetTextProperty()->SetColor(1, 0, 0);
>>
>> // Creates a polygonal cylinder model with eight circumferential facets.
>> vtkCylinderSource *cylinder = vtkCylinderSource::New();
>> cylinder->SetResolution(8);
>> vtkPolyDataMapper *cylinderMapper = vtkPolyDataMapper::New();
>> cylinderMapper->SetInputConnection(cylinder->GetOutputPort());
>> vtkActor *cylinderActor = vtkActor::New();
>> cylinderActor->SetMapper(cylinderMapper);
>> cylinderActor->GetProperty()->SetColor(1.0000, 0.3882, 0.2784);
>> cylinderActor->RotateX(30.0);
>> cylinderActor->RotateY(-45.0);
>>
>> // Create the graphics structure.
>> vtkRenderer *ren = vtkRenderer::New();
>> vtkRenderWindow *renWin = vtkRenderWindow::New();
>>
>> renWin->AddRenderer(ren);
>> renWin->SetSize(600, 600);
>>
>> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
>> iren->SetRenderWindow(renWin);
>>
>> // Add the actors to the renderer, set the background and size
>> ren->AddActor(cylinderActor);
>> ren->AddActor(textActor);
>> ren->SetBackground(0.1, 0.2, 0.4);
>>
>> // We'll zoom in a little by accessing the camera and invoking a "Zoom"
>> // method on it.
>> ren->ResetCamera();
>> ren->GetActiveCamera()->Zoom(1.5);
>> renWin->Render();
>>
>> // This starts the event loop and as a side effect causes an initial
>> render.
>> iren->Start();
>>
>> // Exiting from here, we have to delete all the instances that
>> // have been created.
>> textActor->Delete();
>> cylinder->Delete();
>> cylinderMapper->Delete();
>> cylinderActor->Delete();
>> ren->Delete();
>> renWin->Delete();
>> iren->Delete();
>>
>> return 0;
>> }
No tags attached.
zip Textvtk.zip (122,333) 2009-01-13 13:02
https://www.vtk.org/Bug/file/6989/Textvtk.zip
Issue History
2009-01-13 13:02jdNew Issue
2009-01-13 13:02jdFile Added: Textvtk.zip
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:55Kitware RobotNote Added: 0037051
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved
2016-08-12 09:55Kitware RobotAssigned To => Kitware Robot

Notes
(0037051)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.