summaryrefslogtreecommitdiff
path: root/platform/ios/src/UIImage+MGLAdditions.h
diff options
context:
space:
mode:
authorRoman Blum <rmnblm@gmail.com>2016-12-06 02:16:13 +0100
committerMinh Nguyễn <mxn@1ec5.org>2016-12-05 17:16:13 -0800
commit1045934d5e62eaf85bc280ce2d75e7558f5a5104 (patch)
treecf299675768bb6ba1996d3a312823b60737bc109 /platform/ios/src/UIImage+MGLAdditions.h
parent5579e67804369777819babba5cf6e25eb91ee77e (diff)
downloadqtlocation-mapboxgl-1045934d5e62eaf85bc280ce2d75e7558f5a5104.tar.gz
[core, ios, macos] Add image accessor to MGLStyle (#7096)
* [core] Add interface to get image from sprite atlas * [tests] Add tests for Map::getImage * [ios, macos] WIP: get MGLImage for name from style * [ios, macos] Fixed -imageForName: Convert from sprite images to platform images using the existing encodePNG() function, which is also used for printing. Allow -imageForName: to return nil without an assertion failure. Added a basic test.
Diffstat (limited to 'platform/ios/src/UIImage+MGLAdditions.h')
-rw-r--r--platform/ios/src/UIImage+MGLAdditions.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/ios/src/UIImage+MGLAdditions.h b/platform/ios/src/UIImage+MGLAdditions.h
index 411220c503..f291a302c9 100644
--- a/platform/ios/src/UIImage+MGLAdditions.h
+++ b/platform/ios/src/UIImage+MGLAdditions.h
@@ -2,8 +2,14 @@
#include <mbgl/sprite/sprite_image.hpp>
+NS_ASSUME_NONNULL_BEGIN
+
@interface UIImage (MGLAdditions)
+- (nullable instancetype)initWithMGLSpriteImage:(const mbgl::SpriteImage *)spriteImage;
+
- (std::unique_ptr<mbgl::SpriteImage>)mgl_spriteImage;
@end
+
+NS_ASSUME_NONNULL_END