MCPcopy Create free account
hub / github.com/Kitware/VTK / TestFTStringToPath

Function TestFTStringToPath

Rendering/FreeType/Testing/Cxx/TestFTStringToPath.cxx:37–59  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

35
36//------------------------------------------------------------------------------
37int TestFTStringToPath(int, char*[])
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(460, 100);
43 vtkNew<StringToPathContextTest> test;
44 view->GetScene()->AddItem(test);
45
46 vtkNew<vtkPath> path;
47 vtkNew<vtkTextProperty> tprop;
48
49 vtkFreeTypeTools::GetInstance()->StringToPath(
50 tprop, "FreeType Path", view->GetRenderWindow()->GetDPI(), path);
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
62vtkStandardNewMacro(StringToPathContextTest);

Callers

nothing calls this directly

Calls 11

SetMultiSamplesMethod · 0.80
GetRendererMethod · 0.45
SetSizeMethod · 0.45
GetRenderWindowMethod · 0.45
AddItemMethod · 0.45
GetSceneMethod · 0.45
StringToPathMethod · 0.45
SetPathMethod · 0.45
InitializeMethod · 0.45
GetInteractorMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected