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

Method BuildExponent2D

Rendering/Annotation/vtkAxisActor.cxx:957–981  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

955
956//------------------------------------------------------------------------------
957void vtkAxisActor::BuildExponent2D(vtkViewport* viewport, bool force)
958{
959 if (!this->NeedBuild2D && !force && !this->LabelVisibility)
960 {
961 return;
962 }
963
964 // for textactor instead of follower
965 this->UpdateExponentActorProperty();
966
967 int titleMult = 1;
968 if (this->TitleVisibility && this->TitleAlignLocation == this->ExponentLocation)
969 {
970 titleMult = 2;
971 }
972
973 double scenePos[3];
974 this->ExponentProp->GetReferencePosition(scenePos);
975
976 double position[2];
977 this->Get2DPosition(viewport, titleMult, scenePos, position);
978
979 this->ExponentProp->SetDisplayPosition(position[0], position[1]);
980 this->ExponentProp->RotateActor2DFromAxisProjection(this->GetPoint1(), this->GetPoint2());
981}
982
983//------------------------------------------------------------------------------
984// Transform the bounding box to display coordinates. Used

Callers 1

BuildAxisMethod · 0.95

Calls 7

Get2DPositionMethod · 0.95
GetPoint1Method · 0.95
GetPoint2Method · 0.95
GetReferencePositionMethod · 0.80
SetDisplayPositionMethod · 0.45

Tested by

no test coverage detected