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

Function ShieldRuleProtoToFontDecl

libs/drape_frontend/apply_feature_functors.cpp:174–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174void ShieldRuleProtoToFontDecl(ShieldRuleProto const * shieldRule, dp::FontDecl & params)
175{
176 double const vs = df::VisualParams::Instance().GetVisualScale();
177 params.m_color = ToDrapeColor(shieldRule->text_color());
178 params.m_size = static_cast<float>(std::max(kMinVisibleFontSize, shieldRule->height() * vs));
179 if (shieldRule->text_stroke_color() != 0)
180 params.m_outlineColor = ToDrapeColor(shieldRule->text_stroke_color());
181}
182
183dp::Anchor GetAnchor(int offsetX, int offsetY)
184{

Callers 1

Calls 5

ToDrapeColorFunction · 0.85
GetVisualScaleMethod · 0.80
text_stroke_colorMethod · 0.60
text_colorMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected