vtkCharts: No more Qt text rendering with vtk 5.10
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
As reported in this post http://www.vtk.org/pipermail/vtkusers/2012-May/123540.html, I am no more able to render text into charts using the Qt text renderer.
Since this post, I looked into to code of VTK 5.10 and found some issues:
First, the constructor of the class vtkOpenGLContextDevice2D doesn't use anymore the QApplication::instance condition as it was done in VTK 5.6.1. Then everytime, it is a FreeType text rendering which is used. Trying to force the rendering to Qt using the method vtkOpenGLContextDevice2D::SetStringRendererToQt has no effect.
If in the constructor of the class vtkOpenGLContextDevice2D you set the rendering to Qt, then it works! But there is no text (everything is like blank text). This problem is related to the use of the origin instead of the geometry in the method void vtkOpenGLContextDevice2D::DrawString(float *point, const vtkStdString &string). Using the geometry fix this problem, but then the text is not align correctly. This last problem is related to the use of some pixel padding, the shadow even if not enabled and the creation of a bigger image than expected.
The joined patch resolve all of these problems.