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

Method UpdateFontSizes

Rendering/Label/vtkLabeledTreeMapDataMapper.cxx:140–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void vtkLabeledTreeMapDataMapper::UpdateFontSizes()
141{
142 char test[2];
143 test[1] = '\0';
144 int tSize[2], i;
145 // Make sure that there is a text mapper at index 0
146 if (!this->TextMappers[0])
147 {
148 this->TextMappers[0] = vtkTextMapper::New();
149 this->NumberOfLabels = 1;
150 }
151
152 for (i = 0; i <= this->MaxFontLevel; i++)
153 {
154 this->TextMappers[0]->SetTextProperty(this->HLabelProperties[i]);
155 this->FontHeights[i] = 0;
156 for (test[0] = 32; test[0] < 127; test[0]++)
157 {
158 this->TextMappers[0]->SetInput(test);
159 this->TextMappers[0]->GetSize(this->CurrentViewPort, tSize);
160 this->FontWidths[i][test[0] - 32] = tSize[0];
161 this->FontHeights[i] = std::max(this->FontHeights[i], tSize[1]);
162 }
163 }
164}
165
166void vtkLabeledTreeMapDataMapper::PrintSelf(ostream& os, vtkIndent indent)
167{

Callers 1

RenderOpaqueGeometryMethod · 0.95

Calls 5

NewFunction · 0.50
maxFunction · 0.50
SetTextPropertyMethod · 0.45
SetInputMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected