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

Method vtkTextMapper

Rendering/Core/vtkTextMapper.cxx:31–68  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Creates a new text mapper

Source from the content-addressed store, hash-verified

29//------------------------------------------------------------------------------
30// Creates a new text mapper
31vtkTextMapper::vtkTextMapper()
32{
33 this->Input = nullptr;
34 this->TextProperty = nullptr;
35
36 this->RenderedDPI = 0;
37
38 vtkNew<vtkTextProperty> tprop;
39 this->SetTextProperty(tprop);
40
41 this->Points->SetNumberOfPoints(4);
42 this->Points->SetPoint(0, 0., 0., 0.);
43 this->Points->SetPoint(1, 0., 0., 0.);
44 this->Points->SetPoint(2, 0., 0., 0.);
45 this->Points->SetPoint(3, 0., 0., 0.);
46 this->PolyData->SetPoints(this->Points);
47
48 vtkNew<vtkCellArray> quad;
49 quad->InsertNextCell(4);
50 quad->InsertCellPoint(0);
51 quad->InsertCellPoint(1);
52 quad->InsertCellPoint(2);
53 quad->InsertCellPoint(3);
54 this->PolyData->SetPolys(quad);
55
56 vtkNew<vtkFloatArray> tcoords;
57 tcoords->SetNumberOfComponents(2);
58 tcoords->SetNumberOfTuples(4);
59 tcoords->SetTuple2(0, 0., 0.);
60 tcoords->SetTuple2(1, 0., 0.);
61 tcoords->SetTuple2(2, 0., 0.);
62 tcoords->SetTuple2(3, 0., 0.);
63 this->PolyData->GetPointData()->SetTCoords(tcoords);
64 this->Mapper->SetInputData(this->PolyData);
65
66 this->Texture->SetInputData(this->Image);
67 this->TextDims[0] = this->TextDims[1] = 0;
68}
69
70//------------------------------------------------------------------------------
71// Shallow copy of an actor.

Callers

nothing calls this directly

Calls 13

InsertCellPointMethod · 0.80
SetPolysMethod · 0.80
SetTuple2Method · 0.80
SetTextPropertyMethod · 0.45
SetNumberOfPointsMethod · 0.45
SetPointMethod · 0.45
SetPointsMethod · 0.45
InsertNextCellMethod · 0.45
SetNumberOfComponentsMethod · 0.45
SetNumberOfTuplesMethod · 0.45
SetTCoordsMethod · 0.45
GetPointDataMethod · 0.45

Tested by

no test coverage detected