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

Method GetBookmarkTapRect

libs/drape_frontend/frontend_renderer.cpp:2689–2700  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

2687
2688// static
2689m2::AnyRectD TapInfo::GetBookmarkTapRect(m2::PointD const & mercator, ScreenBase const & screen)
2690{
2691 static int constexpr kBmTouchPixelIncrease = 20;
2692
2693 m2::AnyRectD result;
2694 double const bmAddition = kBmTouchPixelIncrease * VisualParams::Instance().GetVisualScale();
2695 double const halfSize = VisualParams::Instance().GetTouchRectRadius();
2696 double const pxWidth = halfSize;
2697 double const pxHeight = halfSize + bmAddition;
2698 screen.GetTouchRect(screen.GtoP(mercator) + m2::PointD(0, bmAddition), pxWidth, pxHeight, result);
2699 return result;
2700}
2701
2702// static
2703m2::AnyRectD TapInfo::GetRoutingPointTapRect(m2::PointD const & mercator, ScreenBase const & screen)

Callers

nothing calls this directly

Calls 4

GetVisualScaleMethod · 0.80
GetTouchRectRadiusMethod · 0.80
GetTouchRectMethod · 0.45
GtoPMethod · 0.45

Tested by

no test coverage detected