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

Method RebuildLayout

Rendering/Annotation/vtkScalarBarActor.cxx:785–846  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

783
784//------------------------------------------------------------------------------
785void vtkScalarBarActor::RebuildLayout(vtkViewport* viewport)
786{
787 vtkDebugMacro(<< "Rebuilding subobjects");
788
789 this->P->Viewport = viewport;
790 this->FreeLayoutStorage();
791
792 // Permute indices used to measure width and height
793 // so that thickness and length according to the orientation
794 // of the scalar bar instead.
795 if (this->Orientation == VTK_ORIENT_VERTICAL)
796 {
797 this->P->TL[0] = 0;
798 this->P->TL[1] = 1;
799 }
800 else
801 {
802 this->P->TL[0] = 1;
803 this->P->TL[1] = 0;
804 }
805 this->P->NumNotes = this->LookupTable->GetNumberOfAnnotatedValues();
806
807 // Warning: The order of these calls is extremely important
808 // as each updates members of this->P used by later methods!
809 this->ComputeFrame();
810 this->ComputeScalarBarThickness();
811 this->ComputeSwatchPad();
812 this->LayoutNanSwatch();
813 this->LayoutBelowRangeSwatch();
814 this->LayoutAboveRangeSwatch();
815
816 this->PrepareTitleText();
817 this->LayoutTitle();
818 this->ComputeScalarBarLength();
819
820 this->LayoutAboveRangeSwatchPosn();
821
822 this->LayoutTicks();
823
824 this->LayoutAnnotations();
825
826 if (this->UnconstrainedFontSize)
827 {
828 this->LayoutForUnconstrainedFont();
829 }
830
831 // Now generate/configure the VTK datasets and actors that
832 // illustrate the scalar bar when rendered using the
833 // layout computed above.
834 this->ConfigureAnnotations();
835 this->ConfigureFrame();
836 this->ConfigureScalarBar();
837 this->ConfigureTitle();
838 this->ConfigureTicks();
839 this->ConfigureNanSwatch();
840 this->ConfigureAboveBelowRangeSwatch(false);
841 this->ConfigureAboveBelowRangeSwatch(true);
842#ifdef VTK_DBG_LAYOUT

Callers 1

RebuildLayoutIfNeededMethod · 0.95

Calls 15

FreeLayoutStorageMethod · 0.95
ComputeFrameMethod · 0.95
ComputeSwatchPadMethod · 0.95
LayoutNanSwatchMethod · 0.95
PrepareTitleTextMethod · 0.95
LayoutTitleMethod · 0.95
LayoutTicksMethod · 0.95

Tested by

no test coverage detected