------------------------------------------------------------------------------
| 2412 | |
| 2413 | //------------------------------------------------------------------------------ |
| 2414 | int vtkOpenGLRenderWindow::SetRGBACharPixelData( |
| 2415 | int x1, int y1, int x2, int y2, vtkUnsignedCharArray* data, int front, int blend, int right) |
| 2416 | { |
| 2417 | int y_low, y_hi; |
| 2418 | int x_low, x_hi; |
| 2419 | int width, height; |
| 2420 | |
| 2421 | if (y1 < y2) |
| 2422 | { |
| 2423 | y_low = y1; |
| 2424 | y_hi = y2; |
| 2425 | } |
| 2426 | else |
| 2427 | { |
| 2428 | y_low = y2; |
| 2429 | y_hi = y1; |
| 2430 | } |
| 2431 | |
| 2432 | if (x1 < x2) |
| 2433 | { |
| 2434 | x_low = x1; |
| 2435 | x_hi = x2; |
| 2436 | } |
| 2437 | else |
| 2438 | { |
| 2439 | x_low = x2; |
| 2440 | x_hi = x1; |
| 2441 | } |
| 2442 | |
| 2443 | width = abs(x_hi - x_low) + 1; |
| 2444 | height = abs(y_hi - y_low) + 1; |
| 2445 | |
| 2446 | int size = 4 * width * height; |
| 2447 | if (data->GetMaxId() + 1 != size) |
| 2448 | { |
| 2449 | vtkErrorMacro( |
| 2450 | "Buffer is of wrong size. It is " << data->GetMaxId() + 1 << ", it should be: " << size); |
| 2451 | return VTK_ERROR; |
| 2452 | } |
| 2453 | |
| 2454 | return this->SetRGBACharPixelData(x1, y1, x2, y2, data->GetPointer(0), front, blend, right); |
| 2455 | } |
| 2456 | |
| 2457 | //------------------------------------------------------------------------------ |
| 2458 | int vtkOpenGLRenderWindow::SetRGBACharPixelData( |
nothing calls this directly
no test coverage detected