| 115 | PathTextContext::PathTextContext(m2::SharedSpline const & spline) : m_globalSpline(spline) {} |
| 116 | |
| 117 | void 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 | |
| 129 | ref_ptr<PathTextLayout> const PathTextContext::GetLayout() const |
| 130 | { |