------------------------------------------------------------------------------
| 925 | |
| 926 | //------------------------------------------------------------------------------ |
| 927 | void vtkAxisActor::Get2DPosition( |
| 928 | vtkViewport* viewport, double multi, double scenePos[3], double displayPos[2]) |
| 929 | { |
| 930 | double display[3]; |
| 931 | viewport->SetWorldPoint(scenePos[0], scenePos[1], scenePos[2], 1.0); |
| 932 | viewport->WorldToDisplay(); |
| 933 | viewport->GetDisplayPoint(display); |
| 934 | displayPos[0] = display[0]; |
| 935 | displayPos[1] = display[1]; |
| 936 | |
| 937 | int offsetSign = 1; |
| 938 | if (this->TitleAlignLocation == VTK_ALIGN_TOP) |
| 939 | { |
| 940 | offsetSign = -1; |
| 941 | } |
| 942 | |
| 943 | if (this->AxisType == VTK_AXIS_TYPE_X) |
| 944 | { |
| 945 | displayPos[1] += offsetSign * multi * this->VerticalOffsetXTitle2D; |
| 946 | } |
| 947 | else if (this->AxisType == VTK_AXIS_TYPE_Y) |
| 948 | { |
| 949 | displayPos[0] += offsetSign * multi * this->HorizontalOffsetYTitle2D; |
| 950 | } |
| 951 | |
| 952 | displayPos[0] = std::max(displayPos[0], 10.); |
| 953 | displayPos[1] = std::max(displayPos[1], 10.); |
| 954 | } |
| 955 | |
| 956 | //------------------------------------------------------------------------------ |
| 957 | void vtkAxisActor::BuildExponent2D(vtkViewport* viewport, bool force) |
no test coverage detected