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

Method GetBounds

Rendering/FreeType/vtkTextRendererStringToImage.cxx:37–52  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

35
36//------------------------------------------------------------------------------
37vtkVector2i vtkTextRendererStringToImage::GetBounds(
38 vtkTextProperty* property, const vtkStdString& string, int dpi)
39{
40 vtkVector2i recti(0, 0);
41 int tmp[4];
42 if (!property || string.empty())
43 {
44 return recti;
45 }
46
47 this->Implementation->TextRenderer->GetBoundingBox(property, string, tmp, dpi);
48
49 recti.Set(tmp[1] - tmp[0] + 1, tmp[3] - tmp[2] + 1);
50
51 return recti;
52}
53
54//------------------------------------------------------------------------------
55int vtkTextRendererStringToImage::RenderString(vtkTextProperty* property,

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
GetBoundingBoxMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected