| 5 | #include <vtkTextSource.h> |
| 6 | |
| 7 | int TestTextSource(int vtkNotUsed(argc), char* vtkNotUsed(argv)[]) |
| 8 | { |
| 9 | vtkSmartPointer<vtkTextSource> textSource = vtkSmartPointer<vtkTextSource>::New(); |
| 10 | textSource->SetBackgroundColor(0.0, 0.0, 0.0); |
| 11 | textSource->SetForegroundColor(1.0, 1.0, 1.0); |
| 12 | textSource->BackingOn(); |
| 13 | |
| 14 | textSource->SetOutputPointsPrecision(vtkAlgorithm::SINGLE_PRECISION); |
| 15 | |
| 16 | textSource->SetText("1234567890abcdefghijklmnopqrstuvwxyz"); |
| 17 | textSource->Update(); |
| 18 | |
| 19 | vtkSmartPointer<vtkPolyData> polyData = textSource->GetOutput(); |
| 20 | vtkSmartPointer<vtkPoints> points = polyData->GetPoints(); |
| 21 | |
| 22 | if (points->GetDataType() != VTK_FLOAT) |
| 23 | { |
| 24 | return EXIT_FAILURE; |
| 25 | } |
| 26 | |
| 27 | textSource->SetOutputPointsPrecision(vtkAlgorithm::DOUBLE_PRECISION); |
| 28 | |
| 29 | textSource->SetText("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"); |
| 30 | textSource->Update(); |
| 31 | |
| 32 | polyData = textSource->GetOutput(); |
| 33 | points = polyData->GetPoints(); |
| 34 | |
| 35 | if (points->GetDataType() != VTK_DOUBLE) |
| 36 | { |
| 37 | return EXIT_FAILURE; |
| 38 | } |
| 39 | |
| 40 | return EXIT_SUCCESS; |
| 41 | } |
nothing calls this directly
no test coverage detected