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

Method GetFontScale

Rendering/Core/vtkTextActor.cxx:589–598  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

587
588//------------------------------------------------------------------------------
589float vtkTextActor::GetFontScale(vtkViewport* viewport)
590{
591 const int* viewportSize = viewport->GetSize();
592
593 // Pretend the long dimension is the "width"
594 int viewportWidth = (viewportSize[0] > viewportSize[1]) ? viewportSize[0] : viewportSize[1];
595
596 // Scale based on the assumption of a 6 inch wide image at 72 DPI.
597 return static_cast<double>(viewportWidth) / (6 * 72);
598}
599
600//------------------------------------------------------------------------------
601void vtkTextActor::ComputeScaledFont(vtkViewport* viewport)

Callers

nothing calls this directly

Calls 1

GetSizeMethod · 0.45

Tested by

no test coverage detected