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

Method BuildLabels

Rendering/Annotation/vtkAxisActor.cxx:441–462  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Set label values and properties. ------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

439// Set label values and properties.
440//------------------------------------------------------------------------------
441void vtkAxisActor::BuildLabels(vtkViewport* viewport, bool force)
442{
443 if (!force && !this->LabelVisibility)
444 {
445 return;
446 }
447
448 for (int i = 0; i < this->NumberOfLabelsBuilt; i++)
449 {
450 vtkTextActorInterfaceInternal* currentLabel = this->LabelProps[i].get();
451 this->UpdateLabelActorProperty(i);
452 currentLabel->SetCamera(this->Camera);
453 currentLabel->AdjustScale();
454 }
455
456 if (force || this->BuildTime.GetMTime() < this->BoundsTime.GetMTime() ||
457 this->AxisPosition != this->LastAxisPosition || this->LastRange[0] != this->Range[0] ||
458 this->LastRange[1] != this->Range[1])
459 {
460 this->SetLabelPositions(viewport, force);
461 }
462}
463
464static constexpr int vtkAxisActorMultiplierTable1[4] = { -1, -1, 1, 1 };
465static constexpr int vtkAxisActorMultiplierTable2[4] = { -1, 1, 1, -1 };

Callers 1

BuildAxisMethod · 0.95

Calls 6

SetLabelPositionsMethod · 0.95
AdjustScaleMethod · 0.80
getMethod · 0.45
SetCameraMethod · 0.45
GetMTimeMethod · 0.45

Tested by

no test coverage detected