------------------------------------------------------------------------------
| 35 | |
| 36 | //------------------------------------------------------------------------------ |
| 37 | int TestStringToPath(int vtkNotUsed(argc), char* vtkNotUsed(argv)[]) |
| 38 | { |
| 39 | // Set up a 2D context view, context test object and add it to the scene |
| 40 | vtkNew<vtkContextView> view; |
| 41 | view->GetRenderer()->SetBackground(1.0, 1.0, 1.0); |
| 42 | view->GetRenderWindow()->SetSize(325, 150); |
| 43 | vtkNew<StringToPathContextTest> test; |
| 44 | view->GetScene()->AddItem(test); |
| 45 | |
| 46 | vtkNew<vtkPath> path; |
| 47 | vtkNew<vtkTextProperty> tprop; |
| 48 | |
| 49 | vtkMathTextUtilities::GetInstance()->StringToPath( |
| 50 | "$\\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}$", path, tprop, view->GetRenderWindow()->GetDPI()); |
| 51 | |
| 52 | test->SetPath(path); |
| 53 | |
| 54 | view->GetRenderWindow()->SetMultiSamples(0); |
| 55 | view->GetInteractor()->Initialize(); |
| 56 | view->GetInteractor()->Start(); |
| 57 | |
| 58 | return EXIT_SUCCESS; |
| 59 | } |
| 60 | |
| 61 | // Make our new derived class to draw a diagram |
| 62 | vtkStandardNewMacro(StringToPathContextTest); |
nothing calls this directly
no test coverage detected