How to print superscript in vtkTextActor?
For example: for
text.SetInput('mm^2'), I hope it show:
import vtkmodules.all as vtk
text = vtk.vtkTextActor()
property = text.GetTextProperty()
render = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
iren = vtk.vtkRenderWindowInteractor()
I can not find a solution in network.
This document should help. I would look for tests that exercise the math text feature.
@danlipsa Thank you for the kindly reply. The document said
ParaView will check text for a pair of "$" symbols surrounding a MathText expression..
So, the code is modified as
vtkTextActor can show the superscript.
However, it also report some bugs:
matplotlib is installed. And it do not support multiple lines.
Hope vtk provide native method to render superscript.
Multiline support has been fixed recently:
I don’t know about the warning you see. Please file a bug report if it is not there alread.
@danlipsa I have posted a question about this warning. Please have a look about more details.