Files
comaps/drape_frontend/screen_operations.hpp
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

32 lines
1.2 KiB
C++

#pragma once
#include "geometry/screenbase.hpp"
namespace df
{
bool CheckMinScale(ScreenBase const & screen);
bool CheckMaxScale(ScreenBase const & screen);
bool CheckMaxScale(ScreenBase const & screen, uint32_t tileSize, double visualScale);
bool CheckBorders(ScreenBase const & screen);
bool CanShrinkInto(ScreenBase const & screen, m2::RectD const & boundRect);
ScreenBase const ShrinkInto(ScreenBase const & screen, m2::RectD const & boundRect);
ScreenBase const ScaleInto(ScreenBase const & screen, m2::RectD const & boundRect);
ScreenBase const ShrinkAndScaleInto(ScreenBase const & screen, m2::RectD const & boundRect);
bool IsScaleAllowableIn3d(int scale);
double CalculateScale(m2::RectD const & pixelRect, m2::RectD const & localRect);
m2::PointD CalculateCenter(ScreenBase const & screen, m2::PointD const & userPos,
m2::PointD const & pixelPos, double azimuth);
m2::PointD CalculateCenter(double scale, m2::RectD const & pixelRect,
m2::PointD const & userPos, m2::PointD const & pixelPos,
double azimuth);
bool ApplyScale(m2::PointD const & pixelScaleCenter, double factor, ScreenBase & screen);
} // namespace df