core: rename mbgl directories to mln (#4511)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
95
src/mln/map/map_options.cpp
Normal file
95
src/mln/map/map_options.cpp
Normal file
@@ -0,0 +1,95 @@
|
||||
#include <mln/map/map_options.hpp>
|
||||
|
||||
namespace mln {
|
||||
|
||||
class MapOptions::Impl {
|
||||
public:
|
||||
MapMode mapMode = MapMode::Continuous;
|
||||
ConstrainMode constrainMode = ConstrainMode::HeightOnly;
|
||||
ViewportMode viewportMode = ViewportMode::Default;
|
||||
NorthOrientation orientation = NorthOrientation::Upwards;
|
||||
bool crossSourceCollisions = true;
|
||||
Size size = {64, 64};
|
||||
float pixelRatio = 1.0;
|
||||
bool fastPFOREnabled = false;
|
||||
};
|
||||
|
||||
// These requires the complete type of Impl.
|
||||
MapOptions::MapOptions()
|
||||
: impl_(std::make_unique<Impl>()) {}
|
||||
MapOptions::~MapOptions() = default;
|
||||
MapOptions::MapOptions(MapOptions&&) noexcept = default;
|
||||
|
||||
MapOptions& MapOptions::withMapMode(MapMode mode) {
|
||||
impl_->mapMode = mode;
|
||||
return *this;
|
||||
}
|
||||
|
||||
MapMode MapOptions::mapMode() const {
|
||||
return impl_->mapMode;
|
||||
}
|
||||
|
||||
MapOptions& MapOptions::withConstrainMode(ConstrainMode mode) {
|
||||
impl_->constrainMode = mode;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ConstrainMode MapOptions::constrainMode() const {
|
||||
return impl_->constrainMode;
|
||||
}
|
||||
|
||||
MapOptions& MapOptions::withViewportMode(ViewportMode mode) {
|
||||
impl_->viewportMode = mode;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ViewportMode MapOptions::viewportMode() const {
|
||||
return impl_->viewportMode;
|
||||
}
|
||||
|
||||
MapOptions& MapOptions::withCrossSourceCollisions(bool enableCollisions) {
|
||||
impl_->crossSourceCollisions = enableCollisions;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool MapOptions::crossSourceCollisions() const {
|
||||
return impl_->crossSourceCollisions;
|
||||
}
|
||||
|
||||
MapOptions& MapOptions::withNorthOrientation(NorthOrientation orientation) {
|
||||
impl_->orientation = orientation;
|
||||
return *this;
|
||||
}
|
||||
|
||||
NorthOrientation MapOptions::northOrientation() const {
|
||||
return impl_->orientation;
|
||||
}
|
||||
|
||||
MapOptions& MapOptions::withSize(Size size_) {
|
||||
impl_->size = size_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Size MapOptions::size() const {
|
||||
return impl_->size;
|
||||
}
|
||||
|
||||
MapOptions& MapOptions::withPixelRatio(float ratio) {
|
||||
impl_->pixelRatio = ratio;
|
||||
return *this;
|
||||
}
|
||||
|
||||
float MapOptions::pixelRatio() const {
|
||||
return impl_->pixelRatio;
|
||||
}
|
||||
|
||||
MapOptions& MapOptions::withFastPFOREnabled(bool enable) {
|
||||
impl_->fastPFOREnabled = enable;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool MapOptions::fastPFOREnabled() const {
|
||||
return impl_->fastPFOREnabled;
|
||||
}
|
||||
|
||||
} // namespace mln
|
||||
Reference in New Issue
Block a user