blob: 0afa848fd8a564f313ff74cc1c9414fa2f6aa2c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#pragma once
#include <mbgl/util/image.hpp>
#include <mbgl/util/thread.hpp>
#include <mbgl/util/optional.hpp>
#include <exception>
#include <string>
#include <functional>
namespace mbgl {
template<class> class ActorRef;
struct CameraOptions;
class FileSource;
class Size;
class LatLngBounds;
class MapSnapshotter {
public:
MapSnapshotter(FileSource& fileSource,
Scheduler& scheduler,
const std::string& styleURL,
const Size&,
const float pixelRatio,
const CameraOptions&,
const optional<LatLngBounds> region,
const optional<std::string> cacheDir = {});
~MapSnapshotter();
using Callback = std::function<void (std::exception_ptr, PremultipliedImage)>;
void snapshot(ActorRef<Callback>);
private:
class Impl;
std::unique_ptr<util::Thread<Impl>> impl;
};
} // namespace mbgl
|