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

Function CheckMinMaxVisibleScale

libs/drape_frontend/navigator.cpp:331–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331void CheckMinMaxVisibleScale(m2::RectD & rect, int maxScale, uint32_t tileSize, double visualScale, double scale3d)
332{
333 CheckMinGlobalRect(rect, tileSize, visualScale, scale3d);
334 int scale = df::GetDrawTileScale(rect, tileSize, visualScale);
335 if (maxScale != -1 && scale > maxScale)
336 {
337 // limit on passed maximal scale
338 m2::PointD const c = rect.Center();
339 rect = df::GetRectForDrawScale(maxScale, c, tileSize, visualScale);
340 rect.Scale(scale3d);
341 }
342}
343
344void CheckMinMaxVisibleScale(m2::RectD & rect, int maxScale, double scale3d)
345{

Callers 2

SetFromScreenMethod · 0.85
SetRectMethod · 0.85

Calls 7

CheckMinGlobalRectFunction · 0.85
GetDrawTileScaleFunction · 0.85
GetRectForDrawScaleFunction · 0.85
GetTileSizeMethod · 0.80
GetVisualScaleMethod · 0.80
CenterMethod · 0.45
ScaleMethod · 0.45

Tested by

no test coverage detected