------------------------------------------------------------------------------
| 1044 | |
| 1045 | //------------------------------------------------------------------------------ |
| 1046 | void vtkParallelRenderManager::SetRenderWindowSize() |
| 1047 | { |
| 1048 | if (!this->RenderWindow->GetOffScreenRendering()) |
| 1049 | { |
| 1050 | // Make sure we can support the requested image size. |
| 1051 | const int* screensize = this->RenderWindow->GetScreenSize(); |
| 1052 | if (this->FullImageSize[0] > screensize[0]) |
| 1053 | { |
| 1054 | // Reduce both dimensions to preserve aspect ratio. |
| 1055 | this->FullImageSize[1] = (this->FullImageSize[1] * screensize[0]) / this->FullImageSize[0]; |
| 1056 | this->FullImageSize[0] = screensize[0]; |
| 1057 | } |
| 1058 | if (this->FullImageSize[1] > screensize[1]) |
| 1059 | { |
| 1060 | // Reduce both dimensions to preserve aspect ratio. |
| 1061 | this->FullImageSize[0] = (this->FullImageSize[0] * screensize[1]) / this->FullImageSize[1]; |
| 1062 | this->FullImageSize[1] = screensize[1]; |
| 1063 | } |
| 1064 | |
| 1065 | // Make sure the reduced image is no bigger than the full image. |
| 1066 | this->ReducedImageSize[0] = std::min(this->ReducedImageSize[0], this->FullImageSize[0]); |
| 1067 | this->ReducedImageSize[1] = std::min(this->ReducedImageSize[1], this->FullImageSize[1]); |
| 1068 | } |
| 1069 | |
| 1070 | // Correct image reduction factor. |
| 1071 | this->ImageReductionFactor = (double)this->FullImageSize[0] / this->ReducedImageSize[0]; |
| 1072 | |
| 1073 | this->RenderWindow->SetSize(this->FullImageSize[0], this->FullImageSize[1]); |
| 1074 | } |
| 1075 | |
| 1076 | //------------------------------------------------------------------------------ |
| 1077 | vtkRendererCollection* vtkParallelRenderManager::GetRenderers() |
no test coverage detected