[vtk-developers] [VTK 0013199]: vtkCharts: No more Qt text rendering with vtk 5.10

Mantis Bug Tracker mantis at public.kitware.com
Thu May 24 05:04:16 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://www.vtk.org/Bug/view.php?id=13199 
====================================================================== 
Reported By:                Arnaud BARRE
Assigned To:                
====================================================================== 
Project:                    VTK
Issue ID:                   13199
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     backlog
Project:                    Release 
Type:                       incorrect functionality 
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             2012-05-24 05:04 EDT
Last Modified:              2012-05-24 05:04 EDT
====================================================================== 
Summary:                    vtkCharts: No more Qt text rendering with vtk 5.10
Description: 
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.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-05-24 05:04 Arnaud BARRE   New Issue                                    
2012-05-24 05:04 Arnaud BARRE   File Added: vtkChartQtTexRendering.patch.zip    
               
======================================================================




More information about the vtk-developers mailing list