| 138 | } |
| 139 | |
| 140 | void 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 | |
| 166 | void vtkLabeledTreeMapDataMapper::PrintSelf(ostream& os, vtkIndent indent) |
| 167 | { |
no test coverage detected