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

Method Update

libs/drape_frontend/text_shape.cpp:63–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 }
62
63 bool Update(ScreenBase const & screen) override
64 {
65 if (!TBase::Update(screen))
66 return false;
67
68 if (m_layout != nullptr)
69 {
70 double zoom = 0.0;
71 int index = 0;
72 float lerpCoef = 0.0f;
73 ExtractZoomFactors(screen, zoom, index, lerpCoef);
74 m2::PointF symbolSize = InterpolateByZoomLevels(index, lerpCoef, m_symbolSizes);
75 auto const offset = m_layout->GetTextOffset(symbolSize, m_anchor, m_symbolAnchor);
76 m_buffer.clear();
77 m_layout->CacheDynamicGeometry(offset, m_buffer);
78 m_offset = glsl::ToPoint(offset);
79 }
80 return true;
81 }
82
83 m2::PointD GetPivot(ScreenBase const & screen, bool perspective) const override
84 {

Callers

nothing calls this directly

Calls 7

ExtractZoomFactorsFunction · 0.85
InterpolateByZoomLevelsFunction · 0.85
ToPointFunction · 0.85
GetTextOffsetMethod · 0.80
CacheDynamicGeometryMethod · 0.80
UpdateFunction · 0.50
clearMethod · 0.45

Tested by

no test coverage detected