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

Function GetTileScaleBase

libs/drape_frontend/visual_params.cpp:163–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163int GetTileScaleBase(ScreenBase const & s, uint32_t tileSize)
164{
165 ScreenBase tmpS = s;
166 tmpS.Rotate(-tmpS.GetAngle());
167
168 auto const halfSize = tileSize / 2;
169
170 m2::RectD glbRect;
171 m2::PointD const pxCenter = tmpS.PixelRect().Center();
172 tmpS.PtoG(m2::RectD(pxCenter - m2::PointD(halfSize, halfSize), pxCenter + m2::PointD(halfSize, halfSize)), glbRect);
173
174 return GetTileScaleBase(glbRect);
175}
176
177int GetTileScaleBase(ScreenBase const & s)
178{

Callers 2

GetDrawTileScaleFunction · 0.85
GetScreenScaleFunction · 0.85

Calls 10

log2Function · 0.85
GetTileScaleIncrementFunction · 0.85
GetTileSizeMethod · 0.80
SizeXMethod · 0.80
SizeYMethod · 0.80
iroundFunction · 0.50
RotateMethod · 0.45
GetAngleMethod · 0.45
CenterMethod · 0.45
PtoGMethod · 0.45

Tested by

no test coverage detected