------------------------------------------------------------------------------
| 879 | |
| 880 | //------------------------------------------------------------------------------ |
| 881 | void vtkScalarBarActor::ComputeFrame() |
| 882 | { |
| 883 | // get the viewport size in display coordinates |
| 884 | int* p0; |
| 885 | int* p1; |
| 886 | int size[2]; |
| 887 | p0 = this->PositionCoordinate->GetComputedViewportValue(this->P->Viewport); |
| 888 | p1 = this->Position2Coordinate->GetComputedViewportValue(this->P->Viewport); |
| 889 | for (int i = 0; i < 2; ++i) |
| 890 | { |
| 891 | // this->P->Frame.Posn[i] = p0[i]; |
| 892 | this->P->Frame.Posn[i] = 0; // Translate the frame's coordinate system to p0 |
| 893 | size[i] = p1[i] - p0[i]; |
| 894 | } |
| 895 | |
| 896 | // Check if we have bounds on the maximum size |
| 897 | size[0] = size[0] > this->MaximumWidthInPixels ? this->MaximumWidthInPixels : size[0]; |
| 898 | size[1] = size[1] > this->MaximumHeightInPixels ? this->MaximumHeightInPixels : size[1]; |
| 899 | |
| 900 | for (int i = 0; i < 2; ++i) |
| 901 | { |
| 902 | this->P->Frame.Size[i] = size[this->P->TL[i]]; |
| 903 | } |
| 904 | |
| 905 | this->LastOrigin[0] = p0[0]; |
| 906 | this->LastOrigin[1] = p0[1]; |
| 907 | this->LastSize[0] = size[0]; |
| 908 | this->LastSize[1] = size[1]; |
| 909 | } |
| 910 | |
| 911 | //------------------------------------------------------------------------------ |
| 912 | void vtkScalarBarActor::ComputeScalarBarThickness() |
no test coverage detected