Hello!
I am using VTK 9.1.0 and Qt 5.15.3 and encountered the following problem with vtkLabelPlacementMapper:
Without setting a render strategy the labels are corrected:
vtkLabelPlacementMapper added to vtkRenderer with viewport [0 0 1 1]:
vtkLabelPlacementMapper added to vtkRenderer with viewport [0.3 0 1 1]:
After setting an instance of “vtkQtLabelRenderStrategy” to vtkLabelPlacementMapper by
using the “SetRenderStrategy(…)” method, the result is as follows:
vtkLabelPlacementMapper added to vtkRenderer with viewport [0 0 1 1]:
vtkLabelPlacementMapper added to vtkRenderer with viewport [0.3 0 1 1]:
Unfortunately, the label positions are wrong if the viewport is different.
Any idea why this happens? I think there should be no difference.
Initially, GetRenderStrategy()->GetClassName() returns “vtkFreeTypeLabelRenderStrategy”, so
there might be a bug in vtkQtLabelRenderStrategy?
Thank you!