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

Method vtkLabeledTreeMapDataMapper

Rendering/Label/vtkLabeledTreeMapDataMapper.cxx:28–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26vtkStandardNewMacro(vtkLabeledTreeMapDataMapper);
27
28vtkLabeledTreeMapDataMapper::vtkLabeledTreeMapDataMapper()
29 : CurrentViewPort(nullptr)
30 , FontHeights(nullptr)
31 , FontWidths(nullptr)
32 , MaxFontLevel(0)
33 , MaxTreeLevels(100)
34 , ClipTextMode(0)
35 , ChildMotion(0)
36 , StartLevel(0)
37 , EndLevel(-1)
38 , DynamicLevel(0)
39{
40 this->BoxTrans[0][0] = this->BoxTrans[1][0] = 0.0;
41 this->BoxTrans[0][1] = this->BoxTrans[1][1] = 1.0;
42 this->WindowLimits[0][0] = this->WindowLimits[1][0] = 0.0;
43 this->WindowLimits[0][1] = this->WindowLimits[1][1] = 1.0;
44 this->VCoord = vtkCoordinate::New();
45 this->VertexList = vtkIdList::New();
46 this->VertexList->SetNumberOfIds(this->NumberOfLabelsAllocated);
47 this->TextPoints = vtkPoints::New();
48 this->TextPoints->Allocate(this->NumberOfLabelsAllocated);
49 this->VerticalLabelProperty = vtkTextProperty::New();
50 this->VerticalLabelProperty->SetFontSize(12);
51 this->VerticalLabelProperty->SetBold(1);
52 this->VerticalLabelProperty->SetItalic(1);
53 this->VerticalLabelProperty->SetShadow(1);
54 this->VerticalLabelProperty->SetFontFamilyToArial();
55 this->VerticalLabelProperty->SetJustificationToCentered();
56 this->GetLabelTextProperty()->SetJustificationToCentered();
57 this->VerticalLabelProperty->SetVerticalJustificationToCentered();
58 this->GetLabelTextProperty()->SetVerticalJustificationToCentered();
59 this->VerticalLabelProperty->SetOrientation(90.0);
60 this->VerticalLabelProperty->SetColor(1, 1, 1);
61 this->GetLabelTextProperty()->SetColor(1, 1, 1);
62 this->GetLabelTextProperty()->SetFontSize(12);
63 this->SetFontSizeRange(24, 10);
64 this->ChildrenCount = new int[this->MaxTreeLevels + 1];
65 this->LabelMasks = new float[this->MaxTreeLevels + 1][4];
66 this->SetRectanglesArrayName("area");
67 this->SetLabelFormat("{:s}");
68
69 // Take control of the TextMappers array.
70 // The superclass just created new TextMapper instances
71 // up to the currently allocated amount (default 50).
72 // Instead, we will store nullptr values until we need them.
73 // This class will manage the maintenance and deletion of
74 // this array.
75 for (int i = 0; i < this->NumberOfLabelsAllocated; i++)
76 {
77 this->TextMappers[i]->Delete();
78 this->TextMappers[i] = nullptr;
79 }
80}
81
82vtkLabeledTreeMapDataMapper::~vtkLabeledTreeMapDataMapper()
83{

Callers

nothing calls this directly

Calls 11

SetFontSizeRangeMethod · 0.95
SetNumberOfIdsMethod · 0.80
SetFontSizeMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
AllocateMethod · 0.45
GetLabelTextPropertyMethod · 0.45
SetOrientationMethod · 0.45
SetColorMethod · 0.45
SetLabelFormatMethod · 0.45

Tested by

no test coverage detected