MCPcopy Create free account
hub / github.com/comaps/comaps / SetLayout

Method SetLayout

libs/drape_frontend/path_text_handle.cpp:117–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115PathTextContext::PathTextContext(m2::SharedSpline const & spline) : m_globalSpline(spline) {}
116
117void PathTextContext::SetLayout(drape_ptr<PathTextLayout> && layout, double baseGtoPScale)
118{
119 m_layout = std::move(layout);
120 m_globalOffsets.clear();
121 m_globalPivots.clear();
122 PathTextLayout::CalculatePositions(m_globalSpline->GetLength(), baseGtoPScale, m_layout->GetPixelLength(),
123 m_globalOffsets);
124 m_globalPivots.reserve(m_globalOffsets.size());
125 for (auto const offset : m_globalOffsets)
126 m_globalPivots.push_back(m_globalSpline->GetPoint(offset).m_pos);
127}
128
129ref_ptr<PathTextLayout> const PathTextContext::GetLayout() const
130{

Callers 2

CalculateLayoutMethod · 0.45
AcceptMessageMethod · 0.45

Calls 7

GetPixelLengthMethod · 0.80
clearMethod · 0.45
GetLengthMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
GetPointMethod · 0.45

Tested by

no test coverage detected