------------------------------------------------------------------------------
| 783 | |
| 784 | //------------------------------------------------------------------------------ |
| 785 | void 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 |
no test coverage detected