vtkQtStringToImage::GetBounds doesn't take into account the rotation of the text
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
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.