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

Method GetImageBoundingBox

Rendering/Core/vtkTextActor.cxx:339–354  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

337
338//------------------------------------------------------------------------------
339bool vtkTextActor::GetImageBoundingBox(vtkTextProperty* tprop, vtkViewport* vp, int bbox[4])
340{
341 std::string text;
342 if (this->Input && this->Input[0])
343 {
344 text = this->Input;
345 }
346
347 vtkWindow* win = vp->GetVTKWindow();
348 if (!win)
349 {
350 vtkErrorMacro(<< "No render window available: cannot determine DPI.");
351 return false;
352 }
353 return this->TextRenderer->GetBoundingBox(tprop, text, bbox, win->GetDPI());
354}
355
356//------------------------------------------------------------------------------
357void vtkTextActor::SetInput(const char* str)

Callers 1

ComputeRectangleMethod · 0.95

Calls 2

GetVTKWindowMethod · 0.80
GetBoundingBoxMethod · 0.45

Tested by

no test coverage detected