(actor, anchor)
| 32 | import vtkmodules.vtkRenderingUI |
| 33 | |
| 34 | def setupTextActor(actor, anchor): |
| 35 | p = actor.GetTextProperty() |
| 36 | label = (str(p.GetVerticalJustificationAsString()[0]) + |
| 37 | str(p.GetJustificationAsString()[0]) + " " + |
| 38 | "$\\theta = " + str(round(p.GetOrientation())) + "$") |
| 39 | actor.SetInput(label) |
| 40 | |
| 41 | # Add the anchor point: |
| 42 | pos = actor.GetPosition() |
| 43 | col = p.GetColor() |
| 44 | ptId = reference((anchor.GetPoints().InsertNextPoint(pos[0], pos[1], 0.),)) |
| 45 | anchor.GetVerts().InsertNextCell(1, ptId) |
| 46 | anchor.GetCellData().GetScalars().InsertNextTuple4( |
| 47 | col[0] * 255, col[1] * 255, col[2] * 255, 255) |
| 48 | |
| 49 | ren = vtkRenderer() |
| 50 |
no test coverage detected