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

Method GetBounds

Rendering/FreeType/vtkFreeTypeStringToImage.cxx:39–54  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 1

RegressionTest_17233Function · 0.45

Calls 3

emptyMethod · 0.45
GetBoundingBoxMethod · 0.45
SetMethod · 0.45

Tested by 1

RegressionTest_17233Function · 0.36