blob: c5fecec2b254b0d93b2089c489c2feb7b236ce37 (
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
|
#include <mbgl/style/image.hpp>
#include <mbgl/style/image_impl.hpp>
#include <mbgl/util/exception.hpp>
namespace mbgl {
namespace style {
Image::Image(PremultipliedImage &&image,
const float pixelRatio,
bool sdf)
: impl(std::make_shared<Impl>(std::move(image), pixelRatio, sdf)) {
}
PremultipliedImage& Image::getImage() const {
assert(impl);
return impl->image;
}
bool Image::isSdf() const {
return impl->sdf;
}
float Image::getPixelRatio() const {
return impl->pixelRatio;
}
float Image::getWidth() const {
return impl->getWidth();
}
float Image::getHeight() const {
return impl->getHeight();
}
} // namespace style
} // namespace mbgl
|