------------------------------------------------------------------------------
| 2231 | |
| 2232 | //------------------------------------------------------------------------------ |
| 2233 | int vtkOpenGLRenderWindow::SetRGBAPixelData( |
| 2234 | int x1, int y1, int x2, int y2, vtkFloatArray* data, int front, int blend, int right) |
| 2235 | { |
| 2236 | int y_low, y_hi; |
| 2237 | int x_low, x_hi; |
| 2238 | int width, height; |
| 2239 | |
| 2240 | if (y1 < y2) |
| 2241 | { |
| 2242 | y_low = y1; |
| 2243 | y_hi = y2; |
| 2244 | } |
| 2245 | else |
| 2246 | { |
| 2247 | y_low = y2; |
| 2248 | y_hi = y1; |
| 2249 | } |
| 2250 | |
| 2251 | if (x1 < x2) |
| 2252 | { |
| 2253 | x_low = x1; |
| 2254 | x_hi = x2; |
| 2255 | } |
| 2256 | else |
| 2257 | { |
| 2258 | x_low = x2; |
| 2259 | x_hi = x1; |
| 2260 | } |
| 2261 | |
| 2262 | width = abs(x_hi - x_low) + 1; |
| 2263 | height = abs(y_hi - y_low) + 1; |
| 2264 | |
| 2265 | int size = 4 * width * height; |
| 2266 | if (data->GetMaxId() + 1 != size) |
| 2267 | { |
| 2268 | vtkErrorMacro("Buffer is of wrong size."); |
| 2269 | return VTK_ERROR; |
| 2270 | } |
| 2271 | |
| 2272 | return this->SetRGBAPixelData(x1, y1, x2, y2, data->GetPointer(0), front, blend, right); |
| 2273 | } |
| 2274 | |
| 2275 | //------------------------------------------------------------------------------ |
| 2276 | int vtkOpenGLRenderWindow::SetRGBAPixelData( |
nothing calls this directly
no test coverage detected