* [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.
16 lines
299 B
Objective-C
16 lines
299 B
Objective-C
#import <UIKit/UIKit.h>
|
|
|
|
#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
|