MantisBT - VTK
View Issue Details
0013199VTK(No Category)public2012-05-24 05:042016-08-12 09:55
Arnaud BARRE 
Marcus D. Hanwell 
normalminorhave not tried
closedmoved 
5.8.0 
 
Release
incorrect functionality
0013199: vtkCharts: No more Qt text rendering with vtk 5.10
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.
No tags attached.
zip vtkChartQtTexRendering.patch.zip (1,244) 2012-05-24 05:04
https://www.vtk.org/Bug/file/9198/vtkChartQtTexRendering.patch.zip
Issue History
2012-05-24 05:04Arnaud BARRENew Issue
2012-05-24 05:04Arnaud BARREFile Added: vtkChartQtTexRendering.patch.zip
2012-05-24 10:20Marcus D. HanwellAssigned To => Marcus D. Hanwell
2012-05-24 10:20Marcus D. HanwellStatusbacklog => tabled
2012-05-24 10:22Marcus D. HanwellNote Added: 0028640
2012-05-24 12:30Arnaud BARRENote Added: 0028641
2013-07-22 20:02Dave DeMarleStatustabled => backlog
2013-07-22 20:02Dave DeMarleNote Added: 0031251
2014-10-02 17:22Marcus D. HanwellNote Added: 0033551
2014-10-02 17:22Marcus D. HanwellStatusbacklog => active development
2016-07-06 16:48Berk GeveciStatusactive development => expired
2016-07-06 16:48Berk GeveciNote Added: 0036261
2016-08-12 09:55Kitware RobotNote Added: 0037277
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved

Notes
(0028640)
Marcus D. Hanwell   
2012-05-24 10:22   
As I said, we prefer patches uncompressed as they are easier to view inline. I will take a look at this soon, but as a first step want to confirm the regression tests continue to pass for the FreeType rendering.
(0028641)
Arnaud BARRE   
2012-05-24 12:30   
There is two files in the patch (one for each patched files). I know it is not the best way to give to the developer but I use only the release version of VTK and not the GIT version. From what I saw the FreeType rendering is not affected (if you don't use Qt and that you have not executed the event loop of the QApplication). The lines which could affect the FreeType rendering are only these two:

@@ -747,8 +760,8 @@
   vtkTexture* texture = cache.Texture;
   texture->Render(this->Renderer);
 
- float width = static_cast<float>(image->GetOrigin()[0]);
- float height = static_cast<float>(image->GetOrigin()[1]);
+ float width = static_cast<float>(image->GetDimensions()[0]);
+ float height = static_cast<float>(image->GetDimensions()[1]);

And from my tests, it won't change anything for the freetype rendering.

By the way, I personally thank you for the development of the Charts module. It gives me an easy way to plot data!
(0031251)
Dave DeMarle   
2013-07-22 20:02   
moving all "tabled" bugs into "backlog" category since "tabled" is no longer used.
(0033551)
Marcus D. Hanwell   
2014-10-02 17:22   
Getting back to this, I will see what I can do (sorry about forgetting this for so long).
(0036261)
Berk Geveci   
2016-07-06 16:48   
Setting to status of bugs that have not been updated in the last year to expired. Please re-open if still important.
(0037277)
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.