MantisBT - VTK
View Issue Details
0013206VTK(No Category)public2012-05-26 05:202016-08-12 09:55
Arnaud BARRE 
Dave DeMarle 
normalminorhave not tried
closedmoved 
5.8.0 
 
Release
incorrect functionality
0013206: vtkQtStringToImage::GetBounds doesn't take into account the rotation of the text
For both type of strings (vtkStdString, vtkUnicodeString), the Qt text renderer doesn't take the orientation of the text as the FreeType text renderer do.

For both GetBounds methods, the code line 107-110 and line 138-141

QRectF rect;
QPainterPath path;
path.addText(0, 0, fontSpec, text);
rect = path.boundingRect();

could be replaced by this one:

QRectF rect;
QPainterPath path;
path.addText(0, 0, fontSpec, text);
QMatrix mat;
mat.rotate(-property->GetOrientation());
path = mat.map(path);
rect = path.boundingRect();

The result of this modification is visible in the uploaded picture.
No tags attached.
png vtkQtStringImageGetBoundsFix.png (89,461) 2012-05-26 05:20
https://www.vtk.org/Bug/file/9203/vtkQtStringImageGetBoundsFix.png
png
Issue History
2012-05-26 05:20Arnaud BARRENew Issue
2012-05-26 05:20Arnaud BARREFile Added: vtkQtStringImageGetBoundsFix.png
2013-06-25 16:34Dave DeMarleNote Added: 0031074
2013-07-22 14:47Dave DeMarleNote Added: 0031162
2013-07-22 14:47Dave DeMarleStatusbacklog => expired
2013-07-22 14:47Dave DeMarleResolutionopen => fixed
2013-07-22 14:47Dave DeMarleAssigned To => Dave DeMarle
2016-08-12 09:55Kitware RobotNote Added: 0037279
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionfixed => moved

Notes
(0031074)
Dave DeMarle   
2013-06-25 16:34   
Thanks Arnaud.
Would you mind submitting the fix through gerrit? That will automate testing and review.
For details on how to do so see http://www.vtk.org/Wiki/VTK/Git/Develop [^]
(0031162)
Dave DeMarle   
2013-07-22 14:47   
If this is still present in 6.0, please reopen this bug report.
(0037279)
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.