------------------------------------------------------------------------------
| 933 | |
| 934 | //------------------------------------------------------------------------------ |
| 935 | void vtkParallelRenderManager::SetImageReductionFactor(double factor) |
| 936 | { |
| 937 | // Clamp factor. |
| 938 | factor = (factor < 1) ? 1 : factor; |
| 939 | factor = (factor > this->MaxImageReductionFactor) ? this->MaxImageReductionFactor : factor; |
| 940 | |
| 941 | if (this->MagnifyImageMethod == LINEAR) |
| 942 | { |
| 943 | // Make factor be a power of 2. |
| 944 | int pow_of_2 = 1; |
| 945 | while (pow_of_2 <= factor) |
| 946 | { |
| 947 | pow_of_2 <<= 1; |
| 948 | } |
| 949 | factor = pow_of_2 >> 1; |
| 950 | } |
| 951 | |
| 952 | if (factor == this->ImageReductionFactor) |
| 953 | { |
| 954 | return; |
| 955 | } |
| 956 | |
| 957 | this->ImageReductionFactor = factor; |
| 958 | this->Modified(); |
| 959 | } |
| 960 | |
| 961 | //------------------------------------------------------------------------------ |
| 962 | void vtkParallelRenderManager::SetMagnifyImageMethod(int method) |