MCPcopy Create free account
hub / github.com/Kitware/VTK / SetRGBAPixelData

Method SetRGBAPixelData

Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx:2233–2273  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2231
2232//------------------------------------------------------------------------------
2233int 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//------------------------------------------------------------------------------
2276int vtkOpenGLRenderWindow::SetRGBAPixelData(

Callers

nothing calls this directly

Calls 11

DrawPixelsMethod · 0.95
ActivateDrawBufferMethod · 0.80
vtkglDisableMethod · 0.80
vtkglEnableMethod · 0.80
absFunction · 0.50
GetPointerMethod · 0.45
MakeCurrentMethod · 0.45
GetStateMethod · 0.45
BindMethod · 0.45

Tested by

no test coverage detected