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

Method ExtractCaptionParams

libs/drape_frontend/apply_feature_functors.cpp:464–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464void ApplyPointFeature::ExtractCaptionParams(CaptionDefProto const * primaryProto,
465 CaptionDefProto const * secondaryProto, TextViewParams & params) const
466{
467 FillCommonParams(params);
468 params.m_depthLayer = DepthLayer::OverlayLayer;
469 params.m_depthTestEnabled = false;
470 params.m_posZ = m_posZ;
471
472 auto & titleDecl = params.m_titleDecl;
473
474 dp::FontDecl decl;
475 CaptionDefProtoToFontDecl(primaryProto, decl);
476 titleDecl.m_primaryTextFont = decl;
477 titleDecl.m_anchor = GetAnchor(primaryProto->offset_x(), primaryProto->offset_y());
478 // TODO(pastk) : remove offsets processing as de-facto "text-offset: *" is used to define anchors only.
479 titleDecl.m_primaryOffset = GetOffset(primaryProto->offset_x(), primaryProto->offset_y());
480 titleDecl.m_primaryOptional = primaryProto->is_optional();
481
482 if (!titleDecl.m_secondaryText.empty())
483 {
484 ASSERT(secondaryProto != nullptr, ());
485 dp::FontDecl auxDecl;
486 CaptionDefProtoToFontDecl(secondaryProto, auxDecl);
487 titleDecl.m_secondaryTextFont = auxDecl;
488 // Secondary captions are optional always.
489 titleDecl.m_secondaryOptional = true;
490 }
491}
492
493double BaseApplyFeature::PriorityToDepth(int priority, drule::TypeT ruleType, double areaDepth) const
494{

Callers

nothing calls this directly

Calls 8

GetAnchorFunction · 0.85
GetOffsetFunction · 0.85
ASSERTFunction · 0.85
is_optionalMethod · 0.60
offset_xMethod · 0.45
offset_yMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected