summaryrefslogtreecommitdiff
path: root/src/mbgl/style/image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/image.cpp')
-rw-r--r--src/mbgl/style/image.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/mbgl/style/image.cpp b/src/mbgl/style/image.cpp
index 1747de5fcc..269f5f9d1a 100644
--- a/src/mbgl/style/image.cpp
+++ b/src/mbgl/style/image.cpp
@@ -6,11 +6,14 @@ namespace mbgl {
namespace style {
Image::Image(std::string id,
- PremultipliedImage &&image,
+ PremultipliedImage&& image,
const float pixelRatio,
- bool sdf)
- : baseImpl(makeMutable<Impl>(std::move(id), std::move(image), pixelRatio, sdf)) {
-}
+ bool sdf,
+ ImageStretches stretchX,
+ ImageStretches stretchY,
+ optional<ImageContent> content)
+ : baseImpl(makeMutable<Impl>(
+ std::move(id), std::move(image), pixelRatio, sdf, std::move(stretchX), std::move(stretchY), content)) {}
std::string Image::getID() const {
return baseImpl->id;
@@ -30,5 +33,17 @@ float Image::getPixelRatio() const {
return baseImpl->pixelRatio;
}
+const ImageStretches& Image::getStretchX() const {
+ return baseImpl->stretchX;
+}
+
+const ImageStretches& Image::getStretchY() const {
+ return baseImpl->stretchY;
+}
+
+const ImageContent& Image::getContent() const {
+ return baseImpl->content;
+}
+
} // namespace style
} // namespace mbgl