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

Function vtkSessionSetSize

Serialization/Manager/vtkSession.cxx:272–298  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

270
271 //-------------------------------------------------------------------------------
272 vtkSessionResult vtkSessionSetSize(
273 vtkSession session, vtkObjectHandle object, int width, int height)
274 {
275 auto objectImpl = session->Manager->GetObjectAtId(object);
276#if VTK_MODULE_ENABLE_VTK_RenderingCore
277 if (auto* renderWindow = vtkRenderWindow::SafeDownCast(objectImpl))
278 {
279 renderWindow->SetSize(width, height);
280 return vtkSessionResultSuccess;
281 }
282 else if (objectImpl != nullptr)
283 {
284 vtkLog(ERROR, << "Object " << objectImpl->GetObjectDescription() << " at id=" << object
285 << " is not a vtkRenderWindow!");
286 }
287 else
288 {
289 vtkLog(TRACE, << "Object at id=" << object << " is null");
290 }
291 return vtkSessionResultFailure;
292#else
293 (void)width;
294 (void)height;
295 vtkLog(ERROR, << "VTK_RenderingCore module is not enabled. Cannot set size.");
296 return vtkSessionResultFailure;
297#endif
298 }
299
300 //-------------------------------------------------------------------------------
301 vtkSessionResult vtkSessionRender(vtkSession session, vtkObjectHandle object)

Callers 1

SetSizeMethod · 0.85

Calls 3

GetObjectAtIdMethod · 0.45
SetSizeMethod · 0.45
GetObjectDescriptionMethod · 0.45

Tested by

no test coverage detected