-----------------------------------------------------------------------------
| 1369 | |
| 1370 | //----------------------------------------------------------------------------- |
| 1371 | double vtkAxisActor::ComputeMaxLabelLength() |
| 1372 | { |
| 1373 | double maxXSize = 0; |
| 1374 | double maxYSize = 0; |
| 1375 | for (int i = 0; i < this->NumberOfLabelsBuilt; i++) |
| 1376 | { |
| 1377 | vtkTextActorInterfaceInternal* currentLabel = this->LabelProps[i].get(); |
| 1378 | double bounds[6]; |
| 1379 | currentLabel->GetBounds(bounds); |
| 1380 | double xsize = bounds[1] - bounds[0]; |
| 1381 | double ysize = bounds[3] - bounds[2]; |
| 1382 | |
| 1383 | maxXSize = std::max(xsize, maxXSize); |
| 1384 | maxYSize = std::max(ysize, maxYSize); |
| 1385 | } |
| 1386 | |
| 1387 | return std::sqrt((maxXSize * maxXSize) + (maxYSize * maxYSize)); |
| 1388 | } |
| 1389 | |
| 1390 | //----------------------------------------------------------------------------- |
| 1391 | double vtkAxisActor::ComputeTitleLength() |